diff --git a/bower.json b/bower.json index 5b53d5e1e..3675ec6c6 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "tabulator", "main": "dist/js/tabulator.js", - "version": "5.4.0", + "version": "5.4.1", "description": "Interactive table generation JavaScript library", "keywords": [ "table", diff --git a/dist/js/tabulator.js b/dist/js/tabulator.js index ebe33cde7..677b3f1cf 100644 --- a/dist/js/tabulator.js +++ b/dist/js/tabulator.js @@ -1,4 +1,4 @@ -/* Tabulator v5.4.0 (c) Oliver Folkerd 2022 */ +/* Tabulator v5.4.1 (c) Oliver Folkerd 2022 */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -2339,6 +2339,12 @@ this.fitDataColActualWidthCheck(column); this.rightCol++; // Don't move this below the >= check below + + this.getVisibleRows().forEach((row) => { + if(row.type !== "group"){ + row.modules.vdomHoz.rightCol = this.rightCol; + } + }); if(this.rightCol >= (this.columns.length - 1)){ this.vDomPadRight = 0; @@ -2378,6 +2384,12 @@ }); this.leftCol--; // don't move this below the <= check below + + this.getVisibleRows().forEach((row) => { + if(row.type !== "group"){ + row.modules.vdomHoz.leftCol = this.leftCol; + } + }); if(this.leftCol <= 0){ // replicating logic in addColRight this.vDomPadLeft = 0; @@ -2430,6 +2442,12 @@ this.vDomPadRight += column.getWidth(); this.rightCol --; + + this.getVisibleRows().forEach((row) => { + if(row.type !== "group"){ + row.modules.vdomHoz.rightCol = this.rightCol; + } + }); }else { working = false; } @@ -2468,6 +2486,12 @@ this.vDomPadLeft += column.getWidth(); this.leftCol ++; + + this.getVisibleRows().forEach((row) => { + if(row.type !== "group"){ + row.modules.vdomHoz.leftCol = this.leftCol; + } + }); }else { working = false; } @@ -11904,6 +11928,7 @@ this.listIteration = 0; this.lastAction=""; + this.filterTerm=""; this.blurable = true; @@ -15195,9 +15220,9 @@ }); editorElement.addEventListener("focus", (e) => { - var left = this.table.columnManager.element.scrollLeft; + var left = this.table.columnManager.contentsElement.scrollLeft; - var headerPos = this.table.rowManager.element.scrollLeft + parseInt(this.table.columnManager.element.style.marginLeft); + var headerPos = this.table.rowManager.element.scrollLeft; if(left !== headerPos){ this.table.rowManager.scrollHorizontal(left); @@ -18032,6 +18057,9 @@ this.groupList.forEach(function(group){ group.wipe(); }); + + this.groupList = []; + this.groups = {}; } } @@ -18118,8 +18146,13 @@ this.assignRowToGroup(row, oldGroups); }); } + + Object.values(oldGroups).forEach((group) => { + group.wipe(); + }); } + createGroup(groupID, level, oldGroups){ var groupKey = level + "_" + groupID, group; @@ -21485,6 +21518,7 @@ if(!this.initialLoad){ if(this.mode == "local" || force){ this.page = 1; + this.trackChanges(); } } } diff --git a/dist/js/tabulator.js.map b/dist/js/tabulator.js.map index c35a7c8ba..2ea617d67 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/DeprecationAdvisor.js","../../src/js/core/tools/TableRegistry.js","../../src/js/core/tools/Popup.js","../../src/js/core/Module.js","../../src/js/modules/Layout/defaults/modes/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/tools/Alert.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/date.js","../../src/js/modules/Edit/defaults/editors/time.js","../../src/js/modules/Edit/defaults/editors/datetime.js","../../src/js/modules/Edit/List.js","../../src/js/modules/Edit/defaults/editors/select.js","../../src/js/modules/Edit/defaults/editors/list.js","../../src/js/modules/Edit/defaults/editors/autocomplete.js","../../src/js/modules/Edit/defaults/editors/star.js","../../src/js/modules/Edit/defaults/editors/progress.js","../../src/js/modules/Edit/defaults/editors/tickCross.js","../../src/js/modules/Edit/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/array.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/Popup/Popup.js","../../src/js/modules/Print/Print.js","../../src/js/modules/ReactiveData/ReactiveData.js","../../src/js/modules/ResizeColumns/ResizeColumns.js","../../src/js/modules/ResizeRows/ResizeRows.js","../../src/js/modules/ResizeTable/ResizeTable.js","../../src/js/modules/ResponsiveLayout/ResponsiveLayout.js","../../src/js/modules/SelectRow/SelectRow.js","../../src/js/modules/Sort/defaults/sorters/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/Tooltip/Tooltip.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\tdebugInvalidComponentFuncs:true, //allow toggling of invalid component warnings\r\n\tdebugInitialization:true, //allow toggling of pre initialization function call warnings\r\n\tdebugDeprecation:true, //allow toggling of deprecation 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\tpopupContainer:false,\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\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\trowHeight: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, columnsChanged){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent, columnsChanged);\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(force){\r\n\t\treturn this.table.modules.layout.layout(force);\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\t//////////////////////////////////////////\r\n\t/////////// Deprecation Checks ///////////\r\n\t//////////////////////////////////////////\r\n\r\n\tdeprecationCheck(oldOption, newOption){\r\n\t\treturn this.table.deprecationAdvisor.check(oldOption, newOption);\r\n\t}\r\n\r\n\tdeprecationCheckMsg(oldOption, msg){\r\n\t\treturn this.table.deprecationAdvisor.checkMsg(oldOption, msg);\r\n\t}\r\n\r\n\tdeprecationMsg(msg){\r\n\t\treturn this.table.deprecationAdvisor.msg(msg);\r\n\t}\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.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\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"headerWordWrap\": false,\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}\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\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\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\t\tif(val != null){\r\n\t\t\t\t\t\tconsole.warn(\"Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", val);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\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//////////////////// 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, force){\r\n\t\tvar changed = this.setValueProcessData(value, mutate, force);\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, force){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value || force){\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\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\r\n\t\tthis.dispatch(\"cell-height\", this, \"\");\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\r\n\t\tthis.dispatch(\"cell-height\", this, 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}\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.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 pre-styled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum pre-styled 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 pre-styled 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\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\tswitch(this.table.options.columnHeaderVertAlign){\r\n\t\t\tcase \"middle\":\r\n\t\t\t\tel.style.justifyContent = \"center\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"bottom\":\r\n\t\t\t\tel.style.justifyContent = \"flex-end\";\r\n\t\t\t\tbreak;\r\n\t\t}\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//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._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.dispatch(\"column-init\", this);\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\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//assign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classNames = def.cssClass.split(\" \");\r\n\t\t\tclassNames.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 horizontal 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 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\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\t\t\r\n\t\tif(def.headerWordWrap){\r\n\t\t\ttitleHolderElement.classList.add(\"tabulator-col-title-wrap\");\r\n\t\t}\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\t\tif(contents instanceof Node){\r\n\t\t\t\t\tel.appendChild(contents);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.innerHTML = \"\";\r\n\t\t\t\t\tconsole.warn(\"Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", contents);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\t\tel.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\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 classNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclassNames.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\r\n\t\t\tcolumn.columnRendered();\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\tthis.dispatch(\"column-height\", this, this.element.style.height);\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\t// if(!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 alignment\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\r\n\t\tthis.dispatch(\"column-height\", this, \"\");\r\n\t}\r\n\r\n\t//// Retrieve 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 column 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(traverse){\r\n\t\tvar columns = [];\r\n\r\n\t\tif(traverse){\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumns.push(column);\r\n\t\t\t\t\t\r\n\t\t\t\tcolumns = columns.concat(column.getColumns(true));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumns = this.columns;\r\n\t\t}\r\n\t\t\r\n\t\treturn 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//retrieve 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.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.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\tif(this.maxWidth && minWidth > this.maxWidth){\r\n\t\t\tminWidth = this.maxWidth;\r\n\r\n\t\t\tconsole.warn(\"the minWidth (\"+ minWidth + \"px) for column '\" + this.field + \"' cannot be bigger that its maxWidth (\"+ this.maxWidthStyled + \")\");\r\n\t\t}\r\n\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\tif(this.minWidth && maxWidth < this.minWidth){\r\n\t\t\tmaxWidth = this.minWidth;\r\n\r\n\t\t\tconsole.warn(\"the maxWidth (\"+ maxWidth + \"px) for column '\" + this.field + \"' cannot be smaller that its minWidth (\"+ this.minWidthStyled + \")\");\r\n\t\t}\r\n\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\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.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\r\n\t\tthis.dispatch(\"column-rendered\", this);\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\t.then((column) => {\r\n\r\n\t\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\t\tthis.field = false; //clear field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\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;\r\n","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 (let 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 (let 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 determine how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the container 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 scrolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has resized, 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, return 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\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"top\":\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = rowEl.offsetTop;\t\t\t\t\t\r\n\t\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\n\r\nexport default class BasicHorizontal 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\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\t\t\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(){\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}\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}\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}\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\t\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\t\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\t\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\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\twidth;\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tif(!column.modules.frozen){\t\t\t\r\n\t\t\t\t\twidth = column.getWidth();\r\n\r\n\t\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\t\r\n\t\t\t\t\tconfig.width = width;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// column is hidden\r\n\t\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\t\tthis.vDomPadRight += width;\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.columns.push(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcolPos += width;\r\n\t\t\t\t}\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\trow, 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 && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\r\n\t\t\t\trow = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t})[0];\r\n\t\t\t\t\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(let colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rerenderColumns(false, true);\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 visibleRows = this.getVisibleRows(),\r\n\t\totherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\r\n\r\n\t\tvisibleRows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\r\n\t\totherRows.forEach((row) =>{\r\n\t\t\trow.deinitialize();\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\t\t\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\t\t\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\r\n\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().insertBefore(cell.getElement(), row.getCell(this.columns[this.rightCol]).getElement().nextSibling);\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\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().insertBefore(cell.getElement(), row.getCell(this.columns[this.leftCol]).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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\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\r\n\t\t\tif(this.table.modules.frozenColumns){\r\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((column) => {\r\n\t\t\t\t\tthis.appendCell(row, column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tthis.appendCell(row, this.columns[i]);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.frozenColumns){\r\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((column) => {\r\n\t\t\t\t\tthis.appendCell(row, column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tappendCell(row, column){\r\n\t\tif(column && column.visible){\r\n\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\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\t\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\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\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.contentsElement = 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\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockUpdate = null; //store latest redraw update only status\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\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.contentsElement = this.createHeaderContentsElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\t\t\r\n\t\tthis.contentsElement.insertBefore(this.headersElement, this.contentsElement.firstChild);\r\n\t\tthis.element.insertBefore(this.contentsElement, this.element.firstChild);\r\n\t\t\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"scrollbar-vertical\", this.padVerticalScrollbar.bind(this));\r\n\t}\r\n\r\n\tpadVerticalScrollbar(width){\r\n\t\tif(this.table.rtl){\r\n\t\t\tthis.headersElement.style.marginLeft = width + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.headersElement.style.marginRight = width + \"px\";\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\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\t\t\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\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}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", this.table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderContentsElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-header-contents\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\t\t\r\n\t\treturn el;\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\r\n\t//return containing contents element\r\n\tgetContentsElement(){\r\n\t\treturn this.contentsElement;\r\n\t}\r\n\t\r\n\t\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\t\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tthis.contentsElement.scrollLeft = left;\r\n\r\n\t\tthis.scrollLeft = left;\r\n\t\t\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\t\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\t\t\r\n\t\tif(data && data.length){\r\n\t\t\t\r\n\t\t\trow = data[0];\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tlet value = row[key];\r\n\t\t\t\t\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\t\tsorter = \"array\";\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\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t\t}else{\r\n\t\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\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcol.sorter = sorter;\r\n\t\t\t\t\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(definitions){\r\n\t\t\t\t\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\t\tObject.assign(col, 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\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\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\t\r\n\t\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\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\t\t\t\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\t\t\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\t\t\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\t\t\r\n\t\tthis._reIndexColumns();\r\n\t\t\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\t\t\r\n\t\tthis.rerenderColumns(false, true);\r\n\t\t\r\n\t\tthis.redraw(true);\r\n\t}\r\n\t\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\t\t\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\t\t\t\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\t\t\r\n\t\tcolumn.columnRendered();\r\n\t\t\r\n\t\treturn column;\r\n\t}\r\n\t\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\t\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\t\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\t\t\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\t\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\t\t\r\n\t\tif(!this.redrawBlock){\r\n\r\n\t\t\tthis.headersElement.style.height=\"\";\r\n\t\t\t\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumn.clearVerticalAlign();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tvar height = column.getHeight();\r\n\t\t\t\t\r\n\t\t\t\tif(height > minHeight){\r\n\t\t\t\t\tminHeight = height;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.headersElement.style.height = minHeight + \"px\";\r\n\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tvar columns;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\t\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\r\n\t\t\t\tcolumns = [];\r\n\r\n\t\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\t\tcolumns.push(column);\r\n\t\t\t\t\tcolumns = columns.concat(column.getColumns(true));\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = columns.find((column) => {\r\n\t\t\t\t\treturn column.element === 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\t\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\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\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\t\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\t\t\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\t\t\r\n\t\treturn matches;\r\n\t}\r\n\t\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\t\r\n\tgetFirstVisibleColumn(){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\t\t\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\t\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\t\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\t\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\t\r\n\t//traverse 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\t\r\n\t//get definitions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\t\t\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\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\t\t\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\t\t\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\t\t\r\n\t\treturn width;\r\n\t}\r\n\t\r\n\tmoveColumn(from, to, after){\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\t\t\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\t\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\t\t\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\t\t\r\n\t\tthis.rerenderColumns(true);\r\n\t\t\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\t\t\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\t\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\t\t\r\n\t\tif (fromIndex > -1) {\r\n\t\t\t\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\t\t\t\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\t\t\t\r\n\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\t\t\t\r\n\t\t\tif(updateRows){\r\n\t\t\t\t\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\t\t\t\t\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\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\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\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\t\t\t\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\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\t\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\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\t\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\t\t\t\t\t\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\t\t\t\t\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\t\t\t\t\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\t\t\t\t\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\t\t\t\t\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\t\t\t\r\n\t\t});\r\n\t}\r\n\t\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\t\t\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\t\t\r\n\t\treturn cells;\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\t\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\t\t\t\t\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn fixedWidth;\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis._reIndexColumns();\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\t\t\t\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.redraw(true);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t\t\r\n\t\t\tthis.rerenderColumns();\r\n\t\t\t\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\t\t\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\t\t\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.verticalAlignHeaders();\r\n\t\t\r\n\t\tthis.redraw();\r\n\t}\r\n\t\r\n\trerenderColumns(update, silent){\r\n\t\tif(!this.redrawBlock){\r\n\t\t\tthis.renderer.rerenderColumns(update, silent);\r\n\t\t}else{\r\n\t\t\tif(update === false || (update === true && this.redrawBlockUpdate === null)){\r\n\t\t\t\tthis.redrawBlockUpdate = update;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockRedraw(){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockUpdate = null;\r\n\t}\r\n\t\r\n\trestoreRedraw(){\r\n\t\tthis.redrawBlock = false;\r\n\t\tthis.verticalAlignHeaders();\r\n\t\tthis.renderer.rerenderColumns(this.redrawBlockUpdate);\r\n\t\t\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh(force);\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\t\t\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(){\r\n\t\treturn this._row.getPosition();\r\n\t}\r\n\r\n\twatchPosition(callback){\r\n\t\treturn this._row.watchPosition(callback);\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\t\t\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 pre-styled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //hold elements 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\t\tthis.position = 0; //store position of element in row list\r\n\t\tthis.positionWatchers = [];\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.created = false;\r\n\t\t\r\n\t\tthis.setData(data);\r\n\t}\r\n\t\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\t\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\t\t\r\n\t\tthis.element = el;\r\n\t}\r\n\t\r\n\tgetElement(){\r\n\t\tthis.create();\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\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\t\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\t\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\t\t\r\n\t\tif(!this.initialized || force){\r\n\t\t\t\r\n\t\t\tthis.deleteCells();\r\n\t\t\t\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\t\t\t\r\n\t\t\tthis.generateCells();\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t\t\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\t\t\t\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\t\t\t\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\t\t\t\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\t\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t\t\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\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\t\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\t\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\t\t\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\t\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight;\r\n\t\t\r\n\t\tif(this.table.options.rowHeight){\r\n\t\t\tthis.height = this.table.options.rowHeight;\r\n\t\t}else{\r\n\t\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\t\t\t\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tvar height = cell.getHeight();\r\n\t\t\t\tif(height > maxHeight){\r\n\t\t\t\t\tmaxHeight = height;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(force){\r\n\t\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t\t}else{\r\n\t\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\t\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\t\t\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\t\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\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force && !this.table.options.rowHeight){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\t\t\r\n\t\tthis.calcHeight(force);\r\n\t\t\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\t\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\t\t\t\r\n\t\t\tthis.manualHeight = true;\r\n\t\t\t\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\t\t\t\r\n\t\t\tthis.setCellHeight();\r\n\t\t\t\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\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\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\t\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\t\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\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\t\t\t\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\t\t\t\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\t\t\t\r\n\t\t\t//set data\r\n\t\t\tfor (let attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\t\t\t\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (let attrname in updatedData) {\r\n\t\t\t\t\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\t\t\t\t\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\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\t\t\t\t\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\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\t\t\t\r\n\t\t\t//this.reinitialize();\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\t\t\t\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\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\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\t\t\r\n\t\treturn this.data;\r\n\t}\r\n\t\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\t\t\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\t\t\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\t\t\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\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\t\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\t\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\t\t\r\n\t\treturn this.cells;\r\n\t}\r\n\t\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\t\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\t\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\t\t\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\t\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\t\t\r\n\t\tthis.deleteActual();\r\n\t\t\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\t\r\n\tdeleteActual(blockRedraw){\r\n\t\tthis.detachModules();\r\n\t\t\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\t\t\r\n\t\tthis.deleteCells();\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\t\t\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\t\r\n\tdetachModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\t\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\t\t\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\t\r\n\twipe(){\r\n\t\tthis.detachModules();\r\n\t\tthis.deleteCells();\r\n\t\t\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\t\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\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tisDisplayed(){\r\n\t\treturn this.table.rowManager.getDisplayRows().includes(this);\r\n\t}\r\n\r\n\tgetPosition(){\r\n\t\treturn this.isDisplayed() ? this.position : false;\r\n\t}\r\n\r\n\tsetPosition(position){\r\n\t\tif(position != this.position){\r\n\t\t\tthis.position = position;\r\n\r\n\t\t\tthis.positionWatchers.forEach((callback) => {\r\n\t\t\t\tcallback(this.position);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchPosition(callback){\r\n\t\tthis.positionWatchers.push(callback);\r\n\r\n\t\tcallback(this.position);\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\t\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\t\t\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 BasicVertical 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 position 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\tif(this.rows().length){\r\n\t\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\t\t}else{\r\n\t\t\tthis.clear();\r\n\t\t\tthis.table.rowManager._showPlaceholder();\r\n\t\t}\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 row height 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\t\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t\t}\r\n\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\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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.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\r\n\t\tthis.scrollbarWidth = 0;\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\t// el.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\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\t\t\t\t\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}else if(subject === null){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\"){\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){\r\n\t\treturn this.getDisplayRows().find((row) => {\r\n\t\t\treturn row.getPosition() === position && row.isDisplayed();\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.regenerateRowPositions();\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 rows = [];\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\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.regenerateRowPositions();\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.regenerateRowPositions();\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\t\r\n\t\tif(!this.table.destroyed){\r\n\t\t\tif(typeof handler === \"function\"){\r\n\t\t\t\tindex = this.dataPipeline.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 = \"dataPipeline\";\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.dataPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"display\";\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\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(index > -1){\r\n\t\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tindex++;\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.error(\"Unable to refresh data, invalid handler provided\", handler);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tstage = handler || \"all\";\r\n\t\t\t\tindex = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.redrawBlock){\r\n\t\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\t\thandler: handler,\r\n\t\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\t\tstage:stage,\r\n\t\t\t\t\t\tindex:index,\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t}else{\r\n\t\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\t\tthis.table.columnManager.redraw(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\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t\t}\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 all data needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\t\tindex = 0;\r\n\t\t\t\tthis.resetDisplayRows();\r\n\t\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\r\n\t\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t\t\tthis.regenerateRowPositions();\r\n\t\t}\r\n\r\n\t\tif(this.getDisplayRows().length){\r\n\t\t\tthis._clearPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row positions\r\n\tregenerateRowPositions(){\r\n\t\tvar rows = this.getDisplayRows();\r\n\t\tvar index = 1;\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tif (row.type === \"row\"){\r\n\t\t\t\trow.setPosition(index);\r\n\t\t\t\tindex++;\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\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\tthis.displayRows[index] = displayRows;\r\n\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}\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 across 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\r\n\t\tif(!type || type === true){\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}else{\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\t\trows = this.activeRows;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"display\":\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\t\t\tbreak;\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\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.dispatchExternal(\"renderStarted\");\r\n\t\t\t\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\r\n\t\t\tif(!this.fixedHeight){\r\n\t\t\t\tthis.adjustTableSize();\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollBarCheck();\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tscrollBarCheck(){\r\n\t\tvar scrollbarWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(this.element.scrollHeight > this.element.clientHeight){\r\n\t\t\tscrollbarWidth = this.element.offsetWidth - this.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tif(scrollbarWidth !== this.scrollbarWidth){\r\n\t\t\tthis.scrollbarWidth = scrollbarWidth;\r\n\t\t\tthis.dispatch(\"scrollbar-vertical\", scrollbarWidth);\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.renderMode = this.table.options.renderVertical;\r\n\t\t\t\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:\", this.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(true);\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\r\n\t\tthis.scrollBarCheck();\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(){\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\r\n\t\t// clear empty table placeholder min\r\n\t\tthis.tableElement.style.minWidth = \"\";\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, minHeight;\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\tminHeight = isNaN(this.table.options.minHeight) ? this.table.options.minHeight : this.table.options.minHeight + \"px\";\r\n\t\t\t\t\r\n\t\t\t\tthis.element.style.minHeight = 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\r\n\t\t\tthis.scrollBarCheck();\r\n\t\t}\r\n\t\t\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//reinitialize 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 left = 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}\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\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\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){\r\n\t\tthis.activate();\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){\r\n\t\tthis.activate();\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(){\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\t}\r\n\r\n\tredraw(){\r\n\t\tthis.dispatch(\"footer-redraw\");\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.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\"mouseup\",\r\n\t\t\t\"mousedown\",\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, this.pseudoTrackers[key].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\tif(!targets[this.componentMap[target]]){\r\n\t\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t\t}\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\tmatches = {},\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\ttarget = targets[key],\r\n\t\t\tpreviousTarget = 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\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\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\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\t\treturn row.getElement() === target;\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\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\t\ttargets[key] = 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\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t\t}\r\n\t\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\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\t\tif(matches[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\t\tcomponent = matches[\"row\"].findCell(target);\r\n\t\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\t\t\t\t\t\t\t\t\tconsole.warn(\"Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?\");\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\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\tmatches[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 matches;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\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\tif(this.table.options.debugInvalidComponentFuncs){\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\t}\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.requestOrder = 0; //prevent requests coming 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\r\n\tload(data, params, config, replace, silent, columnsChanged){\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.alertLoader();\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.clearAlert();\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, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\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.alertError();\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.clearAlert();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t\t.finally(() => {\r\n\t\t\t\t\tthis.loading = false;\r\n\t\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, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\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\talertLoader(){\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.table.alertManager.alert(this.table.options.dataLoaderLoading || this.langText(\"data|loading\"));\r\n\t\t}\r\n\t}\r\n\r\n\talertError(){\r\n\t\tthis.table.alertManager.alert(this.table.options.dataLoaderError || this.langText(\"data|error\"), \"error\");\r\n\t}\r\n\r\n\tclearAlert(){\r\n\t\tthis.table.alertManager.clear();\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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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_notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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_notifySubscriptionChange(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\tsubscriber.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 CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DeprecationAdvisor extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\t\r\n\t_warnUser(){\r\n\t\tif(this.options(\"debugDeprecation\")){\r\n\t\t\tconsole.warn(...arguments);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheck(oldOption, newOption){\r\n\t\tvar msg = \"\";\r\n\t\t\r\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\r\n\t\t\tmsg = \"Deprecated Setup Option - Use of the %c\" + oldOption + \"%c option is now deprecated\";\r\n\t\t\t\r\n\t\t\tif(newOption){\r\n\t\t\t\tmsg = msg + \", Please use the %c\" + newOption + \"%c option instead\";\r\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t}else{\r\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMsg(oldOption, msg){\r\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\r\n\t\t\tthis._warnUser(\"%cDeprecated Setup Option - Use of the %c\" + oldOption + \" %c option is now deprecated, \" + msg, 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tmsg(msg){\r\n\t\tthis._warnUser(msg);\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\nimport Helpers from './Helpers.js';\r\n\r\nexport default class Popup extends CoreFeature{\r\n\tconstructor(table, element, parent){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = element;\r\n\t\tthis.container = this._lookupContainer();\r\n\t\t\r\n\t\tthis.parent = parent;\r\n\t\t\r\n\t\tthis.reversedX = false;\r\n\t\tthis.childPopup = null;\r\n\t\tthis.blurable = false;\r\n\t\tthis.blurCallback = null;\r\n\t\tthis.blurEventsBound = false;\r\n\t\tthis.renderedCallback = null;\r\n\t\t\r\n\t\tthis.visible = false;\r\n\t\tthis.hideable = true;\r\n\t\t\r\n\t\tthis.element.classList.add(\"tabulator-popup-container\");\r\n\t\t\r\n\t\tthis.blurEvent = this.hide.bind(this, false);\r\n\t\tthis.escEvent = this._escapeCheck.bind(this);\r\n\t\t\r\n\t\tthis.destroyBinding = this.tableDestroyed;\r\n\t\tthis.destroyed = false;\r\n\t}\r\n\t\r\n\ttableDestroyed(){\r\n\t\tthis.destroyed = true;\r\n\t\tthis.hide(true);\r\n\t}\r\n\t\r\n\t_lookupContainer(){\r\n\t\tvar container = this.table.options.popupContainer;\r\n\t\t\r\n\t\tif(typeof container === \"string\"){\r\n\t\t\tcontainer = document.querySelector(container);\r\n\t\t\t\r\n\t\t\tif(!container){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.popupContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (container === true){\r\n\t\t\tcontainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(container && !this._checkContainerIsParent(container)){\r\n\t\t\tcontainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.popupContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!container){\r\n\t\t\tcontainer = document.body;\r\n\t\t}\r\n\t\t\r\n\t\treturn container;\r\n\t}\r\n\t\r\n\t_checkContainerIsParent(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._checkContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\trenderCallback(callback){\r\n\t\tthis.renderedCallback = callback;\r\n\t}\r\n\t\r\n\tcontainerEventCoords(e){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar x = touch ? e.touches[0].pageX : e.pageX;\r\n\t\tvar y = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\r\n\t\tif(this.container !== document.body){\r\n\t\t\tlet parentOffset = Helpers.elOffset(this.container);\r\n\t\t\t\r\n\t\t\tx -= parentOffset.left;\r\n\t\t\ty -= parentOffset.top;\r\n\t\t}\r\n\t\t\r\n\t\treturn {x, y};\r\n\t}\r\n\t\r\n\telementPositionCoords(element, position = \"right\"){\r\n\t\tvar offset = Helpers.elOffset(element),\r\n\t\tcontainerOffset, x, y;\r\n\t\t\r\n\t\tif(this.container !== document.body){\r\n\t\t\tcontainerOffset = Helpers.elOffset(this.container);\r\n\t\t\t\r\n\t\t\toffset.left -= containerOffset.left;\r\n\t\t\toffset.top -= containerOffset.top;\r\n\t\t}\r\n\t\t\r\n\t\tswitch(position){\r\n\t\t\tcase \"right\":\r\n\t\t\t\tx = offset.left + element.offsetWidth;\r\n\t\t\t\ty = offset.top - 1;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"bottom\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top + element.offsetHeight;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"left\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top - 1;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"top\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"center\":\r\n\t\t\t\tx = offset.left + (element.offsetWidth / 2);\r\n\t\t\t\ty = offset.top + (element.offsetHeight / 2);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn {x, y, offset};\r\n\t}\r\n\t\r\n\tshow(origin, position){\r\n\t\tvar x, y, parentEl, parentOffset, coords;\r\n\t\t\r\n\t\tif(this.destroyed || this.table.destroyed){\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\tif(origin instanceof HTMLElement){\r\n\t\t\tparentEl = origin;\r\n\t\t\tcoords = this.elementPositionCoords(origin, position);\r\n\t\t\t\r\n\t\t\tparentOffset = coords.offset;\r\n\t\t\tx = coords.x;\r\n\t\t\ty = coords.y;\r\n\t\t\t\r\n\t\t}else if(typeof origin === \"number\"){\r\n\t\t\tparentOffset = {top:0, left:0};\r\n\t\t\tx = origin;\r\n\t\t\ty = position;\r\n\t\t}else{\r\n\t\t\tcoords = this.containerEventCoords(origin);\r\n\t\t\t\r\n\t\t\tx = coords.x;\r\n\t\t\ty = coords.y;\r\n\t\t\t\r\n\t\t\tthis.reversedX = false;\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.style.top = y + \"px\";\r\n\t\tthis.element.style.left = x + \"px\";\r\n\t\t\r\n\t\tthis.container.appendChild(this.element);\r\n\t\t\r\n\t\tif(typeof this.renderedCallback === \"function\"){\r\n\t\t\tthis.renderedCallback();\r\n\t\t}\r\n\t\t\r\n\t\tthis._fitToScreen(x, y, parentEl, parentOffset, position);\r\n\t\t\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.destroyBinding);\r\n\t\t\r\n\t\tthis.element.addEventListener(\"mousedown\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\t_fitToScreen(x, y, parentEl, parentOffset, position){\r\n\t\tvar scrollTop = this.container === document.body ? document.documentElement.scrollTop : this.container.scrollTop;\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 + this.element.offsetWidth) >= this.container.offsetWidth || this.reversedX){\r\n\t\t\tthis.element.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.reversedX = 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 + this.element.offsetHeight) > Math.max(this.container.offsetHeight, scrollTop ? this.container.scrollHeight : 0)) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"bottom\":\r\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight - parentEl.offsetHeight - 1) + \"px\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisVisible(){\r\n\t\treturn this.visible;\r\n\t}\r\n\t\r\n\thideOnBlur(callback){\r\n\t\tthis.blurable = true;\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tif(this.visible){\r\n\t\t\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\t\t\tthis.subscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"mousedown\", this.blurEvent);\r\n\t\t\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\r\n\t\t\t\t\tthis.blurEventsBound = true;\r\n\t\t\t\t}\r\n\t\t\t}, 100);\r\n\t\t\t\r\n\t\t\tthis.blurCallback = callback;\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\t_escapeCheck(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockHide(){\r\n\t\tthis.hideable = false;\r\n\t}\r\n\t\r\n\trestoreHide(){\r\n\t\tthis.hideable = true;\r\n\t}\r\n\t\r\n\thide(silent = false){\r\n\t\tif(this.visible && this.hideable){\r\n\t\t\tif(this.blurable && this.blurEventsBound){\r\n\t\t\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"mousedown\", this.blurEvent);\r\n\t\t\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\t\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\t\t\tthis.unsubscribe(\"cell-editing\", this.blurEvent);\r\n\r\n\t\t\t\tthis.blurEventsBound = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.childPopup){\r\n\t\t\t\tthis.childPopup.hide();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.childPopup = null;\r\n\t\t\t}\r\n\t\t\t\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\t\r\n\t\t\tthis.visible = false;\r\n\t\t\t\r\n\t\t\tif(this.blurCallback && !silent){\r\n\t\t\t\tthis.blurCallback();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.unsubscribe(\"table-destroy\", this.destroyBinding);\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\tchild(element){\r\n\t\tif(this.childPopup){\r\n\t\t\tthis.childPopup.hide();\r\n\t\t}\r\n\t\t\r\n\t\tthis.childPopup = new Popup(this.table, element, this);\r\n\t\t\r\n\t\treturn this.childPopup;\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Popup from './tools/Popup.js';\r\n\r\nclass Module extends CoreFeature{\r\n\t\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis._handler = null;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overridden in module\r\n\t}\r\n\t\r\n\t\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\t\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\t\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t/// Public Function Registration ///\r\n\t///////////////////////////////////\r\n\t\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = (...args) => {\r\n\t\t\t\tthis.table.initGuard(name);\r\n\t\t\t\t\r\n\t\t\t\treturn func(...args);\r\n\t\t\t};\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\t\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\t\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\t\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\t\r\n\tdisplayRows(adjust){\r\n\t\tvar index = this.table.rowManager.displayRows.length - 1, \r\n\t\tlookupIndex;\r\n\t\t\r\n\t\tif(this._handler){\r\n\t\t\tlookupIndex = this.table.rowManager.displayPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === this._handler;\r\n\t\t\t});\r\n\r\n\t\t\tif(lookupIndex > -1){\r\n\t\t\t\tindex = lookupIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(adjust){\r\n\t\t\tindex = index + adjust;\r\n\t\t}\r\n\r\n\t\tif(this._handler){\r\n\t\t\tif(index > -1){\r\n\t\t\t\treturn this.table.rowManager.getDisplayRows(index);\r\n\t\t\t}else{\r\n\t\t\t\treturn this.activeRows();\r\n\t\t\t}\r\n\t\t}\t\r\n\t}\r\n\t\r\n\tactiveRows(){\r\n\t\treturn this.table.rowManager.activeRows;\r\n\t}\r\n\t\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\t\t\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\t\r\n\t///////////////////////////////////\r\n\t//////// Footer Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tfooterAppend(element){\r\n\t\treturn this.table.footerManager.append(element);\r\n\t}\r\n\t\r\n\tfooterPrepend(element){\r\n\t\treturn this.table.footerManager.prepend(element);\r\n\t}\r\n\t\r\n\tfooterRemove(element){\r\n\t\treturn this.table.footerManager.remove(element);\r\n\t} \r\n\t\r\n\t///////////////////////////////////\r\n\t//////// Popups Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tpopup(menuEl, menuContainer){\r\n\t\treturn new Popup(this.table, menuEl, menuContainer);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t//////// Alert Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\talert(content, type){\r\n\t\treturn this.table.alertManager.alert(content, type);\r\n\t}\r\n\t\r\n\tclearAlert(){\r\n\t\treturn this.table.alertManager.clear();\r\n\t}\r\n\t\r\n}\r\n\r\nexport default Module;","//resize columns to fit data they contain\r\nexport default function(columns, forced){\r\n\tif(forced){\r\n\t\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\t}\r\n\t\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, forced){\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, forced){\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, forced){\r\n\tvar totalWidth = this.table.rowManager.element.getBoundingClientRect().width; //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 across 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 across 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\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 = 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\tgapFill = 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//calculate 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(gapFill && 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(dataChanged){\r\n\t\tthis.dispatch(\"layout-refreshing\");\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex, dataChanged);\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 placeholder\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 language 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//determining 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 fillPath = value ? path + \"|\" + value : path,\r\n\t\tpathArray = fillPath.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//iterate 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\t\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFunctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\t\t\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\t\r\n\tbindStaticFunctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\t\t\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\t\t\t\t\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\t\t\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\t\t\t\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\t\t\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\t\t\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\t\t\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedStartMods = [],\r\n\t\t\torderedEndMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\t\t\t\r\n\t\t\tthis.modules = {};\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.modules[name] = module;\r\n\t\t\t\t\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\tif(mod.moduleInitOrder < 0){\r\n\t\t\t\t\t\t\torderedStartMods.push(module);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\torderedEndMods.push(module);\r\n\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\tunOrderedMods.push(module);\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\torderedStartMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\t\t\torderedEndMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\t\t\t\r\n\t\t\tthis.modulesRegular = orderedStartMods.concat(unOrderedMods.concat(orderedEndMods));\r\n\t\t};\r\n\t}\r\n\t\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\t\t\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\t\t\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class Alert extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n \r\n\t\tthis.element = this._createAlertElement();\r\n\t\tthis.msgElement = this._createMsgElement();\r\n\t\tthis.type = null;\r\n \r\n\t\tthis.element.appendChild(this.msgElement);\r\n\t}\r\n \r\n\t_createAlertElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-alert\");\r\n\t\treturn el;\r\n\t}\r\n \r\n\t_createMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-alert-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\t\treturn el;\r\n\t}\r\n \r\n\t_typeClass(){\r\n\t\treturn \"tabulator-alert-state-\" + this.type;\r\n\t}\r\n \r\n\talert(content, type = \"msg\"){\r\n\t\tif(content){\r\n\t\t\tthis.clear();\r\n \r\n\t\t\tthis.type = type;\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.add(this._typeClass());\r\n \r\n\t\t\tif(typeof content === \"function\"){\r\n\t\t\t\tcontent = content();\r\n\t\t\t}\r\n \r\n\t\t\tif(content instanceof HTMLElement){\r\n\t\t\t\tthis.msgElement.appendChild(content);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = content;\r\n\t\t\t}\r\n \r\n\t\t\tthis.table.element.appendChild(this.element);\r\n\t\t}\r\n\t}\r\n \r\n\tclear(){\r\n\t\tif(this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n \r\n\t\tthis.msgElement.classList.remove(this._typeClass());\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 DeprecationAdvisor from './tools/DeprecationAdvisor.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\nimport Alert from './tools/Alert.js';\r\n\r\nclass Tabulator {\r\n\t\r\n\tconstructor(element, options){\r\n\t\t\r\n\t\tthis.options = {};\r\n\t\t\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.alertManager = null; //hold Alert 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\t\t\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\t\t\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\t\t\r\n\t\tthis.deprecationAdvisor = new DeprecationAdvisor(this);\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.destroyed = false;\r\n\t\t\r\n\t\tif(this.initializeElement(element)){\r\n\t\t\t\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\t\t\t\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\t\t\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\t\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\t\t\t\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\t\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\t\tthis.alertManager = new Alert(this);\r\n\t\t\r\n\t\tthis.bindModules();\r\n\t\t\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options);\r\n\t\t\r\n\t\tthis._clearObjectPointers();\r\n\t\t\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\t\t\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\t\t\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\t\t\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\t\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\t\r\n\t_clearSelection(){\r\n\t\t\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\tif (window.getSelection) {\r\n\t\t\tif (window.getSelection().empty) { // Chrome\r\n\t\t\t\twindow.getSelection().empty();\r\n\t\t\t} else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t}\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\t\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\t\t\r\n\t\tthis._rtlCheck();\r\n\t\t\r\n\t\tthis._buildElement();\r\n\t\t\r\n\t\tthis._initializeTable();\r\n\t\t\r\n\t\tthis._loadInitialData();\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\t\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\t\t\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"rtl\":\r\n\t\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\t\tthis.rtl = true;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"ltr\":\r\n\t\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\t\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\t\t\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\t\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\t\t\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\t\t\t\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\t\t\t\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\t\t\t\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\t\t\t\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\t\t\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\t\t\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\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\t\t\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\t\t\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\t\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\t\t\r\n\t\tthis.interactionMonitor.initialize();\r\n\t\t\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\t\t\r\n\t\tthis._detectBrowser();\r\n\t\t\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\t\t\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\t\t\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\t\t\r\n\t\tif(options.autoColumns && options.data){\r\n\t\t\t\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\t\t\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\t\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\t\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\t\t\r\n\t\tthis.destroyed = true;\r\n\t\t\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\t\t\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\t\t\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\t\t\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\t\t\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\r\n\t\tthis.externalEvents.dispatch(\"tableDestroyed\");\r\n\t}\r\n\t\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\t\t\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\t\t\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\t\r\n\tinitGuard(func, msg){\r\n\t\tvar stack, line;\r\n\t\t\r\n\t\tif(this.options.debugInitialization && !this.initialized){\r\n\t\t\tif(!func){\r\n\t\t\t\tstack = new Error().stack.split(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tline = stack[0] == \"Error\" ? stack[2] : stack[1];\r\n\t\t\t\t\r\n\t\t\t\tif(line[0] == \" \"){\r\n\t\t\t\t\tfunc = line.trim().split(\" \")[1].split(\".\")[1];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfunc = line.trim().split(\"@\")[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconsole.warn(\"Table Not Initialized - Calling the \" + func + \" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function.\" + (msg ? \" \" + msg : \"\"));\r\n\t\t}\r\n\t\t\r\n\t\treturn this.initialized;\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-blocking\");\r\n\t\t\r\n\t\tthis.rowManager.blockRedraw();\r\n\t\tthis.columnManager.blockRedraw();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-blocked\");\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-restoring\");\r\n\r\n\t\tthis.rowManager.restoreRedraw();\r\n\t\tthis.columnManager.restoreRedraw();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-restored\");\r\n\t}\r\n\t\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tthis.initGuard(false, \"To set initial data please use the 'data' property in the table constructor.\");\r\n\t\t\r\n\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t}\r\n\t\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\t\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\t\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\t\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t}\r\n\t\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data && data.length > 0){\r\n\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\tresponses++;\r\n\t\t\t\t\t\t\r\n\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\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}\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\taddData(data, pos, index){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data){\r\n\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\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data && data.length > 0){\r\n\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tresponses++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\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\t\t\t\t\t\t\t\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}else{\r\n\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\t\t\t\t\t\t\t\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}\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\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\t\r\n\t//get row object\r\n\tgetRowFromPosition(position){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position);\r\n\t\t\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\t\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\t\t\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\t\t\t\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}\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\t\t\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\t\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\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}\r\n\t\r\n\t//update a row if it exists otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t\t.then(()=>{\r\n\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t\t.then((rows)=>{\r\n\t\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t\t.then(()=>{\r\n\t\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\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\t\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\t\t\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\t\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\t\r\n\t}\r\n\t\r\n\t//get position of row in table\r\n\tgetRowPosition(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.getPosition();\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\t\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tthis.initGuard(false, \"To set initial columns please use the 'columns' property in the table constructor\");\r\n\t\t\r\n\t\tthis.columnManager.setColumns(definition);\r\n\t}\r\n\t\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\t\r\n\tgetColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tif(column){\r\n\t\t\treturn column.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\t\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\t\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field); \r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t\t.then((column) => {\r\n\t\t\t\treturn column.getComponent();\r\n\t\t\t});\r\n\t}\r\n\t\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from),\r\n\t\ttoColumn = this.columnManager.findColumn(to);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\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\t\t\t\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\t\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.columnManager.redraw(force);\r\n\t\tthis.rowManager.redraw(force);\r\n\t}\r\n\t\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\t\r\n\t//////////////////// Event Bus ///////////////////\r\n\t\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\t\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\t\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments);\r\n\t\targs.shift();\r\n\t\t\r\n\t\tthis.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\t//////////////////// Alerts ///////////////////\r\n\r\n\talert(contents, type){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.alertManager.alert(contents, type);\r\n\t}\r\n\r\n\tclearAlert(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.alertManager.clear();\r\n\t}\r\n\t\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\t\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\t\t\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\t\t\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 defaultAccessors 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\t\tif(Accessor.accessors[value]){\r\n\t\t\t\t\taccessor = Accessor.accessors[value];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\taccessor = value;\r\n\t\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, colComponent;\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\tcolComponent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colComponent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colComponent, 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 = defaultAccessors;\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\t.then((response)=>{\r\n\t\t\t\t\tif(response.ok) {\r\n\t\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\t\treject(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\t.catch((error)=>{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\t\treject(error);\r\n\t\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\t.then((data)=>{\r\n\t\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\treturn data;\r\n\t\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\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\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); //DEPRECATED - 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\tlist = 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.generateHTMLTable(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\t\tvalue = JSON.stringify(col.value);\r\n\t\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\t\tvalue = \"\";\r\n\t\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\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 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\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\t\tif(!this.pasteAction){\r\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tthis.pasteAction = action;\r\n\t\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\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\t\tif(!this.pasteParser){\r\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tthis.pasteParser = parser;\r\n\t\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\t\r\n\t\tthis.blocked = false;\r\n\t\tthis.recalcAfterBlock = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\t\t\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\t\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\t\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\t\t\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\t\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"redraw-blocked\", this.blockRedraw.bind(this));\r\n\t\tthis.subscribe(\"redraw-restored\", this.restoreRedraw.bind(this));\r\n\t\t\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\t\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t\t\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockRedraw(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.recalcAfterBlock = false;\r\n\t}\r\n\t\r\n\t\r\n\trestoreRedraw(){\r\n\t\tthis.blocked = false;\r\n\t\t\r\n\t\tif(this.recalcAfterBlock){\r\n\t\t\tthis.recalcAfterBlock = false;\r\n\t\t\tthis.recalcActiveRowsRefresh();\r\n\t\t}\r\n\t}\r\n\t\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\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tblockCheck(){\r\n\t\tif(this.blocked){\r\n\t\t\tthis.recalcAfterBlock = true;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.blocked;\r\n\t}\r\n\t\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\t\t\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(row);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\t\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\t\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\t\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\t\t\t\t\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\t\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\t\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\t\t\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\t\t\r\n\t\tif(def.topCalc){\r\n\t\t\t\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\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\tcase \"function\":\r\n\t\t\t\t\tconfig.topCalc = def.topCalc;\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(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\t\t\t\t\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\t\t\t\r\n\t\t}\r\n\t\t\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\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\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\tcase \"function\":\r\n\t\t\t\t\tconfig.botCalc = def.bottomCalc;\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(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\t\t\t\t\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\t\t\r\n\t}\r\n\t\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){}\r\n\t\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\t\t\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\t\t\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.footerRemove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getContentsElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.footerPrepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botElement.scrollLeft = left;\r\n\t\t}\r\n\t}\r\n\t\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\t\t\r\n\t\tif(!this.blockCheck()){\r\n\t\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\t\tdata = this.rowsToData(rows);\r\n\t\t\t\t\r\n\t\t\t\tif(this.topInitialized){\r\n\t\t\t\t\tif(this.topRow){\r\n\t\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trow = this.generateRow(\"top\", data);\r\n\t\t\t\t\tthis.topRow = row;\r\n\t\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\t\trow.initialize(true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(this.botInitialized){\r\n\t\t\t\t\tif(this.botRow){\r\n\t\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trow = this.generateRow(\"bottom\", data);\r\n\t\t\t\t\tthis.botRow = row;\r\n\t\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\t\trow.initialize(true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t\t\t\r\n\t\t\t\t//set resizable handles\r\n\t\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\t\t\t\t\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\t\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\t\t\r\n\t\tif(!this.blockCheck()){\r\n\t\t\tif(group){\r\n\t\t\t\tif(group.calcs){\r\n\t\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\t\tgroup.calcs.top.reinitialize();\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\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\t\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\t\t\t\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\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\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\t\t\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\t\t\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\t\t\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\t\t\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\t\t\r\n\t\trow.component = false;\r\n\t\t\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\t\t\t\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\t\t\r\n\t\trow.generateCells = () => {\r\n\t\t\t\r\n\t\t\tvar cells = [];\r\n\t\t\t\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\t\r\n\t\t\t\t//set field name of mock column\r\n\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\t\t\t\t\r\n\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//ensure css class definition is replicated to calculation cell\r\n\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\t\t\t\t\r\n\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\tcell.getElement();\r\n\t\t\t\tcell.column = column;\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t\t\r\n\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\tcells.push(cell);\r\n\t\t\t\t\r\n\t\t\t\tif(!column.visible){\r\n\t\t\t\t\tcell.hide();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\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\t\t\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\t\t\t\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\t\t\t\t\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\t\t\t\t\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\t\t\r\n\t\treturn rowData;\r\n\t}\r\n\t\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\t\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\t\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\t\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\t\t\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\t\t\t\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\t\t\r\n\t\treturn results;\r\n\t}\r\n\t\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\t\t\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\t\t\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\t\t\r\n\t\treturn results;\r\n\t}\r\n\t\r\n\tadjustForScrollbar(width){\r\n\t\tif(this.botRow){\r\n\t\t\tif(this.table.rtl){\r\n\t\t\t\tthis.botElement.style.paddingLeft = width + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.botElement.style.paddingRight = width + \"px\";\r\n\t\t\t}\r\n\t\t}\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\nimport RowComponent from '../../core/row/RowComponent.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.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);//selecting 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(this.options(\"movableRows\")){\r\n\t\t\t\tconsole.warn(\"The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior\");\r\n\t\t\t}\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\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t\t};\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t\t};\r\n\t\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\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedrawing.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\ttableRedrawing(force){\r\n\t\tvar rows;\r\n\r\n\t\tif(force){\r\n\t\t\trows = this.table.rowManager.getRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.reinitializeRowChildren(row);\r\n\t\t\t});\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\toldControl = config.controlEl;\r\n\r\n\t\tel = el || row.getCells()[0].getElement();\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\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\tgetTreeParentRoot(row){\r\n\t\treturn row.modules.dataTree && row.modules.dataTree.parent ? this.getTreeParentRoot(row.modules.dataTree.parent) : row;\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}else if(subject === null){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\"){\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.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\t\tconsole.warn(\"Download Warning - CSV 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 - CSV downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\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\r\n\t\t\t\t\tif(col){\r\n\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\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\r\n\t\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\t\tcol.value = \"\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(item.join(delimiter));\r\n\t\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}\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\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(item);\r\n\t\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.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\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\t\theader.push(parseRow(row));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\tbody.push(parseRow(row));\r\n\t\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\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\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.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.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n}\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\tcompression = 'compress' in options ? options.compress : true,\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\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary', compression });\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.generateHTMLTable(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(\"downloadEncoder\", function(data, mimeType){\r\n\t\t\treturn new Blob([data],{type:mimeType});\r\n\t\t}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadReady\", undefined); //warn of function deprecation\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.deprecatedOptionsCheck();\r\n\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\tdeprecatedOptionsCheck(){\r\n\t\tthis.deprecationCheck(\"downloadReady\", \"downloadEncoder\");\r\n\t}\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 = this.table.options.downloadEncoder(data, mime);\r\n\r\n\t\tif(blob){\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\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\t\t\t\t\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\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\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\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\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\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\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\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\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\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\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;\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\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"hybrid\",\r\n\tvalue = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n\tinput = document.createElement(\"textarea\"),\r\n\tscrollHeight = 0;\r\n\r\n\t//create and style input\r\n\tinput.style.display = \"block\";\r\n\tinput.style.padding = \"2px\";\r\n\tinput.style.height = \"100%\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.whiteSpace = \"pre-wrap\";\r\n\tinput.style.resize = \"none\";\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\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\tinput.scrollHeight;\r\n\t\tinput.style.height = input.scrollHeight + \"px\";\r\n\t\tcell.getRow().normalizeHeight();\r\n\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\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\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tcell.getRow().normalizeHeight();\r\n\t\t\t},300);\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\tinput.addEventListener(\"keyup\", function(){\r\n\r\n\t\tinput.style.height = \"\";\r\n\r\n\t\tvar heightNow = input.scrollHeight;\r\n\r\n\t\tinput.style.height = heightNow + \"px\";\r\n\r\n\t\tif(heightNow != scrollHeight){\r\n\t\t\tscrollHeight = heightNow;\r\n\t\t\tcell.getRow().normalizeHeight();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\r\n\t\t\tcase 13:\r\n\t\t\t\tif(e.shiftKey && editorParams.shiftEnterSubmit){\r\n\t\t\t\t\tonChange(e);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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//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\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\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\t\tonChange();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\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\t\tif(vertNav == \"editor\"){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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\t\tonChange();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null;\r\n\t\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tfunction convertDate(value){\r\n\t\tvar newDatetime;\r\n\t\t\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\r\n\t\t\r\n\t\treturn newDatetime.toFormat(\"yyyy-MM-dd\");\r\n\t}\r\n\t\r\n\tinput.type = \"date\";\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.max){\r\n\t\tinput.setAttribute(\"max\", inputFormat ? convertDate(editorParams.max) : editorParams.max);\r\n\t}\r\n\r\n\tif(editorParams.min){\r\n\t\tinput.setAttribute(\"min\", inputFormat ? convertDate(editorParams.min) : editorParams.min);\r\n\t}\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\t\t\r\n\t\t\tcellValue = convertDate(cellValue);\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\t\t\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\t\t\t\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromFormat(String(value), \"yyyy-MM-dd\").toFormat(inputFormat);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \r\n\tnewDatetime;\r\n\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tinput.type = \"time\";\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\r\n\t\t\tif(DT.isDateTime(cellValue)){\r\n\t\t\t\tnewDatetime = cellValue;\r\n\t\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\r\n\t\t\t}else{\r\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tcellValue = newDatetime.toFormat(\"hh:mm\");\r\n\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromFormat(String(value), \"hh:mm\").toFormat(inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \r\n\tnewDatetime;\r\n\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tinput.type = \"datetime-local\";\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\r\n\t\t\tif(DT.isDateTime(cellValue)){\r\n\t\t\t\tnewDatetime = cellValue;\r\n\t\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\r\n\t\t\t}else{\r\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tcellValue = newDatetime.toFormat(\"yyyy-MM-dd\") + \"T\" + newDatetime.toFormat(\"hh:mm\");\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromISO(String(value)).toFormat(inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","import maskInput from './inputMask.js';\r\nimport urlBuilder from '../Ajax/defaults/urlGenerator.js';\r\n\r\nexport default class Edit{\r\n\tconstructor(editor, cell, onRendered, success, cancel, editorParams){\r\n\t\tthis.edit = editor;\r\n\t\tthis.table = editor.table;\r\n\t\tthis.cell = cell;\r\n\t\tthis.params = this._initializeParams(editorParams);\r\n\t\t\r\n\t\tthis.data = [];\r\n\t\tthis.displayItems = [];\r\n\t\tthis.currentItems = [];\r\n\t\tthis.focusedItem = null;\r\n\t\t\r\n\t\tthis.input = this._createInputElement();\r\n\t\tthis.listEl = this._createListElement();\r\n\t\t\r\n\t\tthis.initialValues = null; \r\n\t\t\r\n\t\tthis.isFilter = !cell._getSelf;\r\n\t\t\r\n\t\tthis.filterTimeout = null;\r\n\t\tthis.filtered = false;\r\n\t\tthis.typing = false;\r\n\t\t\r\n\t\tthis.values = []; \r\n\t\tthis.popup = null; \r\n\t\t\r\n\t\tthis.listIteration = 0;\r\n\t\t\r\n\t\tthis.lastAction=\"\";\r\n\t\t\r\n\t\tthis.blurable = true;\r\n\t\t\r\n\t\tthis.actions = {\r\n\t\t\tsuccess:success,\r\n\t\t\tcancel:cancel\r\n\t\t};\r\n\t\t\r\n\t\tthis._deprecatedOptionsCheck();\r\n\t\tthis._initializeValue();\r\n\t\t\r\n\t\tonRendered(this._onRendered.bind(this));\r\n\t}\r\n\t\r\n\t_deprecatedOptionsCheck(){\r\n\t\tif(this.params.listItemFormatter){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.sortValuesList){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.searchFunc){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.searchingPlaceholder){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t_initializeValue(){\r\n\t\tvar initialValue = this.cell.getValue();\r\n\t\t\r\n\t\tif(typeof initialValue === \"undefined\" && typeof this.params.defaultValue !== \"undefined\"){\r\n\t\t\tinitialValue = this.params.defaultValue;\r\n\t\t}\r\n\t\t\r\n\t\tthis.initialValues = this.params.multiselect ? initialValue : [initialValue];\r\n\t\t\r\n\t\tif(this.isFilter){\r\n\t\t\tthis.input.value = this.initialValues ? this.initialValues.join(\",\") : \"\";\r\n\t\t\tthis.headerFilterInitialListGen(); \r\n\t\t}\r\n\t}\r\n\t\r\n\t_onRendered(){\r\n\t\tvar cellEl = this.cell.getElement();\r\n\t\t\r\n\t\tfunction clickStop(e){\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\t\t\r\n\t\tthis.input.style.height = \"100%\";\r\n\t\tthis.input.focus({preventScroll: true});\r\n\t\t\r\n\t\t\r\n\t\tcellEl.addEventListener(\"click\", clickStop);\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tcellEl.removeEventListener(\"click\", clickStop);\r\n\t\t}, 1000);\r\n\t\t\r\n\t\tthis.input.addEventListener(\"mousedown\", this._preventPopupBlur.bind(this));\r\n\t}\r\n\t\r\n\t_createListElement(){\r\n\t\tvar listEl = document.createElement(\"div\");\r\n\t\tlistEl.classList.add(\"tabulator-edit-list\");\r\n\t\t\r\n\t\tlistEl.addEventListener(\"mousedown\", this._preventBlur.bind(this));\r\n\t\tlistEl.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\r\n\t\t\r\n\t\treturn listEl;\r\n\t}\r\n\t\r\n\t_setListWidth(){\r\n\t\tvar element = this.isFilter ? this.input : this.cell.getElement();\r\n\t\t\r\n\t\tthis.listEl.style.minWidth = element.offsetWidth + \"px\";\r\n\t\t\r\n\t\tif(this.params.maxWidth){\r\n\t\t\tif(this.params.maxWidth === true){\r\n\t\t\t\tthis.listEl.style.maxWidth = element.offsetWidth + \"px\";\r\n\t\t\t}else if(typeof this.params.maxWidth === \"number\"){\r\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\t_createInputElement(){\r\n\t\tvar attribs = this.params.elementAttributes;\r\n\t\tvar input = document.createElement(\"input\");\r\n\t\t\r\n\t\tinput.setAttribute(\"type\", this.params.clearable ? \"search\" : \"text\");\r\n\t\t\r\n\t\tinput.style.padding = \"4px\";\r\n\t\tinput.style.width = \"100%\";\r\n\t\tinput.style.boxSizing = \"border-box\";\r\n\t\t\r\n\t\tif(!this.params.autocomplete){\r\n\t\t\tinput.style.cursor = \"default\";\r\n\t\t\tinput.style.caretColor = \"transparent\";\r\n\t\t\t// input.readOnly = (this.edit.currentCell != false);\r\n\t\t}\r\n\t\t\r\n\t\tif(attribs && typeof attribs == \"object\"){\r\n\t\t\tfor (let key in attribs){\r\n\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + attribs[\"+\" + key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinput.setAttribute(key, attribs[key]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.mask){\r\n\t\t\tmaskInput(input, this.params);\r\n\t\t}\r\n\t\t\r\n\t\tthis._bindInputEvents(input);\r\n\t\t\r\n\t\treturn input;\r\n\t}\r\n\t\r\n\t_initializeParams(params){\r\n\t\tvar valueKeys = [\"values\", \"valuesURL\", \"valuesLookup\"],\r\n\t\tvalueCheck;\r\n\t\t\r\n\t\tparams = Object.assign({}, params);\r\n\t\t\r\n\t\tparams.verticalNavigation = params.verticalNavigation || \"editor\";\r\n\t\tparams.placeholderLoading = typeof params.placeholderLoading === \"undefined\" ? \"Searching ...\" : params.placeholderLoading;\r\n\t\tparams.placeholderEmpty = typeof params.placeholderEmpty === \"undefined\" ? \"No Results Found\" : params.placeholderEmpty;\r\n\t\tparams.filterDelay = typeof params.filterDelay === \"undefined\" ? 300 : params.filterDelay;\r\n\t\t\r\n\t\tparams.emptyValue = Object.keys(params).includes(\"emptyValue\") ? params.emptyValue : \"\";\r\n\t\t\r\n\t\tvalueCheck = Object.keys(params).filter(key => valueKeys.includes(key)).length;\r\n\t\t\r\n\t\tif(!valueCheck){\r\n\t\t\tconsole.warn(\"list editor config error - either the values, valuesURL, or valuesLookup option must be set\");\r\n\t\t}else if(valueCheck > 1){\r\n\t\t\tconsole.warn(\"list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor\");\r\n\t\t}\r\n\t\t\r\n\t\tif(params.autocomplete){\r\n\t\t\tif(params.multiselect){\r\n\t\t\t\tparams.multiselect = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - multiselect option is not available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(params.freetext){\r\n\t\t\t\tparams.freetext = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - freetext option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.filterFunc){\r\n\t\t\t\tparams.filterFunc = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - filterFunc option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.filterRemote){\r\n\t\t\t\tparams.filterRemote = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - filterRemote option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.mask){\r\n\t\t\t\tparams.mask = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - mask option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.allowEmpty){\r\n\t\t\t\tparams.allowEmpty = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - allowEmpty option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.listOnEmpty){\r\n\t\t\t\tparams.listOnEmpty = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - listOnEmpty option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(params.filterRemote && !(typeof params.valuesLookup === \"function\" || params.valuesURL)){\r\n\t\t\tparams.filterRemote = false;\r\n\t\t\tconsole.warn(\"list editor config error - filterRemote option should only be used when values list is populated from a remote source\");\r\n\t\t}\r\n\t\treturn params;\r\n\t}\r\n\t//////////////////////////////////////\r\n\t////////// Event Handling ////////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_bindInputEvents(input){\r\n\t\tinput.addEventListener(\"focus\", this._inputFocus.bind(this));\r\n\t\tinput.addEventListener(\"click\", this._inputClick.bind(this));\r\n\t\tinput.addEventListener(\"blur\", this._inputBlur.bind(this));\r\n\t\tinput.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\r\n\t\tinput.addEventListener(\"search\", this._inputSearch.bind(this));\r\n\t\t\r\n\t\tif(this.params.autocomplete){\r\n\t\t\tinput.addEventListener(\"keyup\", this._inputKeyUp.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t_inputFocus(e){\r\n\t\tthis.rebuildOptionsList();\r\n\t}\r\n\t\r\n\t_filter(){\r\n\t\tif(this.params.filterRemote){\r\n\t\t\tclearTimeout(this.filterTimeout);\r\n\t\t\t\r\n\t\t\tthis.filterTimeout = setTimeout(() => {\r\n\t\t\t\tthis.rebuildOptionsList();\r\n\t\t\t}, this.params.filterDelay);\r\n\t\t}else{\r\n\t\t\tthis._filterList();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputClick(e){\r\n\t\te.stopPropagation();\r\n\t}\r\n\t\r\n\t_inputBlur(e){\r\n\t\tif(this.blurable){\r\n\t\t\tif(this.popup){\r\n\t\t\t\tthis.popup.hide();\r\n\t\t\t}else{\r\n\t\t\t\tthis._resolveValue(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputSearch(){\r\n\t\tthis._clearChoices();\r\n\t}\r\n\t\r\n\t_inputKeyDown(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t\r\n\t\t\tcase 38: //up arrow\r\n\t\t\t\tthis._keyUp(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 40: //down arrow\r\n\t\t\t\tthis._keyDown(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\t\tthis._keySide(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tthis._keyEnter();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tthis._keyEsc();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t\tthis._keyHomeEnd(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 9: //tab\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis._keySelectLetter(e);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputKeyUp(e){\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\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis._keyAutoCompLetter(e);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_preventPopupBlur(){\r\n\t\tif(this.popup){\r\n\t\t\tthis.popup.blockHide();\r\n\t\t}\r\n\t\t\r\n\t\tsetTimeout(() =>{\r\n\t\t\tif(this.popup){\r\n\t\t\t\tthis.popup.restoreHide();\r\n\t\t\t}\r\n\t\t}, 10);\r\n\t}\r\n\t\r\n\t_preventBlur(){\r\n\t\tthis.blurable = false;\r\n\t\t\r\n\t\tsetTimeout(() =>{\r\n\t\t\tthis.blurable = true;\r\n\t\t}, 10);\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Keyboard Navigation /////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_keyUp(e){\r\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\r\n\t\t\r\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index)){\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tif(index > 0){\r\n\t\t\t\tthis._focusItem(this.displayItems[index - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyDown(e){\r\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\r\n\t\t\r\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index < this.displayItems.length - 1)){\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tif(index < this.displayItems.length - 1){\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tthis._focusItem(this.displayItems[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis._focusItem(this.displayItems[index + 1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keySide(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t}\r\n\t\r\n\t_keyEnter(e){\r\n\t\tif(this.params.autocomplete && this.lastAction === \"typing\"){\r\n\t\t\tthis._resolveValue(true);\r\n\t\t}else{\r\n\t\t\tif(this.focusedItem){\r\n\t\t\t\tthis._chooseItem(this.focusedItem);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyEsc(e){\r\n\t\tthis._cancel();\r\n\t}\r\n\t\r\n\t_keyHomeEnd(e){\r\n\t\tif(this.params.autocomplete){\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keySelectLetter(e){\r\n\t\tif(!this.params.autocomplete){\r\n\t\t\t// if(this.edit.currentCell === false){\r\n\t\t\te.preventDefault();\r\n\t\t\t// }\r\n\t\t\t\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tthis._scrollToValue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyAutoCompLetter(e){\r\n\t\tthis._filter();\r\n\t\tthis.lastAction = \"typing\";\r\n\t\tthis.typing = true;\r\n\t}\r\n\t\r\n\t\r\n\t_scrollToValue(char){\r\n\t\tclearTimeout(this.filterTimeout);\r\n\t\t\r\n\t\tvar character = String.fromCharCode(char).toLowerCase();\r\n\t\tthis.filterTerm += character.toLowerCase();\r\n\t\t\r\n\t\tvar match = this.displayItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(this.filterTerm);\r\n\t\t});\r\n\t\t\r\n\t\tif(match){\r\n\t\t\tthis._focusItem(match);\r\n\t\t}\r\n\t\t\r\n\t\tthis.filterTimeout = setTimeout(() => {\r\n\t\t\tthis.filterTerm = \"\";\r\n\t\t}, 800);\r\n\t}\r\n\t\r\n\t_focusItem(item){\r\n\t\tthis.lastAction = \"focus\";\r\n\t\t\r\n\t\tif(this.focusedItem && this.focusedItem.element){\r\n\t\t\tthis.focusedItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.focusedItem = item;\r\n\t\t\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t//////////////////////////////////////\r\n\t/////// Data List Generation /////////\r\n\t//////////////////////////////////////\r\n\theaderFilterInitialListGen(){\r\n\t\tthis._generateOptions(true);\r\n\t}\r\n\t\r\n\trebuildOptionsList(){\r\n\t\tthis._generateOptions()\r\n\t\t\t.then(this._sortOptions.bind(this))\r\n\t\t\t.then(this._buildList.bind(this))\r\n\t\t\t.then(this._showList.bind(this))\r\n\t\t\t.catch((e) => {\r\n\t\t\t\tif(!Number.isInteger(e)){\r\n\t\t\t\t\tconsole.error(\"List generation error\", e);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\t\r\n\t_filterList(){\r\n\t\tthis._buildList(this._filterOptions());\r\n\t\tthis._showList();\r\n\t}\r\n\t\r\n\t_generateOptions(silent){\r\n\t\tvar values = [];\r\n\t\tvar iteration = ++ this.listIteration;\r\n\t\t\r\n\t\tthis.filtered = false;\r\n\t\t\r\n\t\tif(this.params.values){\r\n\t\t\tvalues = this.params.values;\r\n\t\t}else if (this.params.valuesURL){\r\n\t\t\tvalues = this._ajaxRequest(this.params.valuesURL, this.input.value);\r\n\t\t}else{\r\n\t\t\tif(typeof this.params.valuesLookup === \"function\"){\r\n\t\t\t\tvalues = this.params.valuesLookup(this.cell, this.input.value);\r\n\t\t\t}else if(this.params.valuesLookup){\r\n\t\t\t\tvalues = this._uniqueColumnValues(this.params.valuesLookupField);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(values instanceof Promise){\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis._addPlaceholder(this.params.placeholderLoading);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn values.then()\r\n\t\t\t\t.then((responseValues) => {\r\n\t\t\t\t\tif(this.listIteration === iteration){\r\n\t\t\t\t\t\treturn this._parseList(responseValues);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\treturn Promise.reject(iteration);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.resolve(this._parseList(values));\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addPlaceholder(contents){\r\n\t\tvar placeholder = document.createElement(\"div\");\r\n\t\t\r\n\t\tif(typeof contents === \"function\"){\r\n\t\t\tcontents = contents(this.cell.getComponent(), this.listEl);\r\n\t\t}\r\n\t\t\r\n\t\tif(contents){\r\n\t\t\tthis._clearList();\r\n\t\t\t\r\n\t\t\tif(contents instanceof HTMLElement){\r\n\t\t\t\tplaceholder = contents;\r\n\t\t\t}else{\r\n\t\t\t\tplaceholder.classList.add(\"tabulator-edit-list-placeholder\");\r\n\t\t\t\tplaceholder.innerHTML = contents;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.listEl.appendChild(placeholder);\r\n\t\t\t\r\n\t\t\tthis._showList();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_ajaxRequest(url, term){\r\n\t\tvar params = this.params.filterRemote ? {term:term} : {};\r\n\t\turl = urlBuilder(url, {}, params);\r\n\t\t\r\n\t\treturn fetch(url)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\treturn response.json()\r\n\t\t\t\t\t\t.catch((error)=>{\r\n\t\t\t\t\t\t\tconsole.warn(\"List Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t\t\treturn Promise.reject(error);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"List Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treturn Promise.reject(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(\"List Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treturn Promise.reject(error);\r\n\t\t\t});\r\n\t}\r\n\t\r\n\t_uniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = this.table.getData(this.params.valuesLookup),\r\n\t\tcolumn;\r\n\t\t\r\n\t\tif(field){\r\n\t\t\tcolumn = this.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = this.cell.getColumn()._getSelf();\r\n\t\t}\r\n\t\t\r\n\t\tif(column){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\t\t\t\t\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\toutput = [];\r\n\t\t}\r\n\t\t\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\t\r\n\t\r\n\t_parseList(inputValues){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(!Array.isArray(inputValues)){\r\n\t\t\tinputValues = Object.entries(inputValues).map(([key, value]) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tlabel:value,\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tinputValues.forEach((value) => {\r\n\t\t\tif(typeof value !== \"object\"){\r\n\t\t\t\tvalue = {\r\n\t\t\t\t\tlabel:value,\r\n\t\t\t\t\tvalue:value,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._parseListItem(value, data, 0);\r\n\t\t});\r\n\t\t\r\n\t\tif(!this.currentItems.length && this.params.freetext){\r\n\t\t\tthis.input.value = this.initialValues;\r\n\t\t\tthis.typing = true;\r\n\t\t\tthis.lastAction = \"typing\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.data = data;\r\n\t\t\r\n\t\treturn data; \r\n\t}\r\n\t\r\n\t_parseListItem(option, data, level){\r\n\t\tvar item = {};\r\n\t\t\r\n\t\tif(option.options){\r\n\t\t\titem = this._parseListGroup(option, level + 1);\r\n\t\t}else{\r\n\t\t\titem = {\r\n\t\t\t\tlabel:option.label,\r\n\t\t\t\tvalue:option.value,\r\n\t\t\t\titemParams:option.itemParams,\r\n\t\t\t\telementAttributes: option.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t\tselected:false,\r\n\t\t\t\tvisible:true,\r\n\t\t\t\tlevel:level,\r\n\t\t\t\toriginal:option,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tif(this.initialValues && this.initialValues.indexOf(option.value) > -1){\r\n\t\t\t\tthis._chooseItem(item, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdata.push(item);\r\n\t}\r\n\t\r\n\t_parseListGroup(option, level){\r\n\t\tvar item = {\r\n\t\t\tlabel:option.label,\r\n\t\t\tgroup:true,\r\n\t\t\titemParams:option.itemParams,\r\n\t\t\telementAttributes:option.elementAttributes,\r\n\t\t\telement:false,\r\n\t\t\tvisible:true,\r\n\t\t\tlevel:level,\r\n\t\t\toptions:[],\r\n\t\t\toriginal:option,\r\n\t\t};\r\n\t\t\r\n\t\toption.options.forEach((child) => {\r\n\t\t\tthis._parseListItem(child, item.options, level);\r\n\t\t});\r\n\t\t\r\n\t\treturn item;\r\n\t}\r\n\t\r\n\t_sortOptions(options){\r\n\t\tvar sorter;\r\n\t\t\r\n\t\tif(this.params.sort){\r\n\t\t\tsorter = typeof this.params.sort === \"function\" ? this.params.sort : this._defaultSortFunction.bind(this);\r\n\t\t\t\r\n\t\t\tthis._sortGroup(sorter, options);\r\n\t\t}\r\n\t\t\r\n\t\treturn options;\r\n\t}\r\n\t\r\n\t_sortGroup(sorter, options){\r\n\t\toptions.sort((a,b) => {\r\n\t\t\treturn sorter(a.label, b.label, a.value, b.value, a.original, b.original);\r\n\t\t});\r\n\t\t\r\n\t\toptions.forEach((option) => {\r\n\t\t\tif(option.group){\r\n\t\t\t\tthis._sortGroup(sorter, option.options);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_defaultSortFunction(as, bs){\r\n\t\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\t\tvar emptyAlign = 0;\r\n\t\t\r\n\t\tif(this.params.sort === \"desc\"){\r\n\t\t\t[as, bs] = [bs, as];\r\n\t\t}\r\n\t\t\r\n\t\t//handle empty values\r\n\t\tif(!as && as!== 0){\r\n\t\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t\t}else if(!bs && bs!== 0){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\t\ta = String(as).toLowerCase();\r\n\t\t\tb = String(bs).toLowerCase();\r\n\t\t\tif(a === b) return 0;\r\n\t\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\t\ta = a.match(rx);\r\n\t\t\tb = b.match(rx);\r\n\t\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\t\twhile(i < L){\r\n\t\t\t\ta1= a[i];\r\n\t\t\t\tb1= b[i++];\r\n\t\t\t\tif(a1 !== b1){\r\n\t\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn a.length > b.length;\r\n\t\t}\r\n\t\t\r\n\t\treturn emptyAlign;\r\n\t}\r\n\t\r\n\t_filterOptions(){\r\n\t\tvar filterFunc = this.params.filterFunc || this._defaultFilterFunc,\r\n\t\tterm = this.input.value;\r\n\t\t\r\n\t\tif(term){\r\n\t\t\tthis.filtered = true;\r\n\t\t\t\r\n\t\t\tthis.data.forEach((item) => {\r\n\t\t\t\tthis._filterItem(filterFunc, term, item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.filtered = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.data;\r\n\t}\r\n\t\r\n\t_filterItem(func, term, item){\r\n\t\tvar matches = false;\r\n\t\t\r\n\t\tif(!item.group){\r\n\t\t\titem.visible = func(term, item.label, item.value, item.original);\r\n\t\t}else{\r\n\t\t\titem.options.forEach((option) => {\r\n\t\t\t\tif(this._filterItem(func, term, option)){\r\n\t\t\t\t\tmatches = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\titem.visible = matches;\r\n\t\t}\r\n\t\t\r\n\t\treturn item.visible;\r\n\t}\r\n\t\r\n\t_defaultFilterFunc(term, label, value, item){\r\n\t\tterm = String(term).toLowerCase();\r\n\t\t\r\n\t\tif(label !== null && typeof label !== \"undefined\"){\r\n\t\t\tif(String(label).toLowerCase().indexOf(term) > -1 || String(value).toLowerCase().indexOf(term) > -1){\r\n\t\t\t\treturn true;\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\t//////////////////////////////////////\r\n\t/////////// Display List /////////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_clearList(){\r\n\t\twhile(this.listEl.firstChild) this.listEl.removeChild(this.listEl.firstChild);\r\n\t\t\r\n\t\tthis.displayItems = [];\r\n\t}\r\n\t\r\n\t_buildList(data){\r\n\t\tthis._clearList();\r\n\t\t\r\n\t\tdata.forEach((option) => {\r\n\t\t\tthis._buildItem(option);\r\n\t\t});\r\n\t\t\r\n\t\tif(!this.displayItems.length){\r\n\t\t\tthis._addPlaceholder(this.params.placeholderEmpty);\r\n\t\t} \r\n\t}\r\n\t\r\n\t_buildItem(item){\r\n\t\tvar el = item.element,\r\n\t\tcontents;\r\n\t\t\r\n\t\tif(!this.filtered || item.visible){\r\n\t\t\t\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\r\n\t\t\t\tcontents = this.params.itemFormatter ? this.params.itemFormatter(item.label, item.value, item.original, el) : item.label;\r\n\t\t\t\t\r\n\t\t\t\tif(contents instanceof HTMLElement){\r\n\t\t\t\t\tel.appendChild(contents);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.innerHTML = contents;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-group\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-item\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tel.classList.add(\"tabulator-edit-list-group-level-\" + item.level);\r\n\t\t\t\t\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, this.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\t\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.addEventListener(\"click\", this._groupClick.bind(this, item));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.addEventListener(\"click\", this._itemClick.bind(this, item));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tel.addEventListener(\"mousedown\", this._preventBlur.bind(this));\r\n\t\t\t\t\r\n\t\t\t\titem.element = el;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t\tthis.listEl.appendChild(el);\r\n\t\t\t\r\n\t\t\tif(item.group){\r\n\t\t\t\titem.options.forEach((option) => {\r\n\t\t\t\t\tthis._buildItem(option);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayItems.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_showList(){\r\n\t\tvar startVis = this.popup && this.popup.isVisible();\r\n\t\t\r\n\t\tif(this.input.parentNode){\r\n\t\t\tif(this.params.autocomplete && this.input.value === \"\" && !this.params.listOnEmpty){\r\n\t\t\t\tif(this.popup){\r\n\t\t\t\t\tthis.popup.hide(true);\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setListWidth();\r\n\t\t\t\r\n\t\t\tif(!this.popup){\r\n\t\t\t\tthis.popup = this.edit.popup(this.listEl);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.popup.show(this.cell.getElement(), \"bottom\");\r\n\t\t\t\r\n\t\t\tif(!startVis){\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.popup.hideOnBlur(this._resolveValue.bind(this, true));\r\n\t\t\t\t}, 10);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_styleItem(item){\r\n\t\tif(item && item.element){\r\n\t\t\tif(item.selected){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}else{\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// User Interaction ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_itemClick(item, e){\r\n\t\te.stopPropagation();\r\n\t\t\r\n\t\tthis._chooseItem(item);\r\n\t}\r\n\t\r\n\t_groupClick(item, e){\r\n\t\te.stopPropagation();\r\n\t}\r\n\t\r\n\t\r\n\t//////////////////////////////////////\r\n\t////// Current Item Management ///////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_cancel(){\r\n\t\tthis.popup.hide(true);\r\n\t\tthis.actions.cancel();\r\n\t}\r\n\t\r\n\t_clearChoices(){\r\n\t\tthis.typing = true;\r\n\t\t\r\n\t\tthis.currentItems.forEach((item) => {\r\n\t\t\titem.selected = false;\r\n\t\t\tthis._styleItem(item);\r\n\t\t});\r\n\t\t\r\n\t\tthis.currentItems = [];\r\n\t\t\r\n\t\tthis.focusedItem = null;\r\n\t}\r\n\t\r\n\t_chooseItem(item, silent){\r\n\t\tvar index;\r\n\t\t\r\n\t\tthis.typing = false;\r\n\t\t\r\n\t\tif(this.params.multiselect){\r\n\t\t\tindex = this.currentItems.indexOf(item);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.currentItems.splice(index, 1);\r\n\t\t\t\titem.selected = false;\r\n\t\t\t}else{\r\n\t\t\t\tthis.currentItems.push(item);\r\n\t\t\t\titem.selected = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.input.value = this.currentItems.map(item => item.label).join(\",\");\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.currentItems = [item];\r\n\t\t\titem.selected = true;\r\n\t\t\t\r\n\t\t\tthis.input.value = item.label;\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis._resolveValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis._focusItem(item);\r\n\t}\r\n\t\r\n\t_resolveValue(blur){\r\n\t\tvar output, initialValue;\r\n\r\n\t\tif(this.popup){\r\n\t\t\tthis.popup.hide(true);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.multiselect){\r\n\t\t\toutput = this.currentItems.map(item => item.value);\r\n\t\t}else{\r\n\t\t\tif(blur && this.params.autocomplete && this.typing){\r\n\t\t\t\tif(this.params.freetext || (this.params.allowEmpty && this.input.value === \"\")){\r\n\t\t\t\t\toutput = this.input.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.actions.cancel();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.currentItems[0]){\r\n\t\t\t\t\toutput = this.currentItems[0].value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinitialValue = this.initialValues[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(initialValue === null || typeof initialValue === \"undefined\" || initialValue === \"\"){\r\n\t\t\t\t\t\toutput = initialValue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\toutput = this.params.emptyValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(output === \"\"){\r\n\t\t\toutput = this.params.emptyValue;\r\n\t\t}\r\n\t\t\r\n\t\tthis.actions.success(output);\r\n\t\t\r\n\t\tif(this.isFilter){\r\n\t\t\tthis.initialValues = output && !Array.isArray(output) ? [output] : output;\r\n\t\t\tthis.currentItems = [];\r\n\t\t}\r\n\t}\r\n\t\r\n}\r\n","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\r\n\tthis.deprecationMsg(\"The select editor has been deprecated, please use the new list editor\");\r\n\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\r\n\tthis.deprecationMsg(\"The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam\");\r\n\r\n\teditorParams.autocomplete = true;\r\n\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.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\t\tchangeValue(value + 1);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\t\tchangeValue(value - 1);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tsuccess(value);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tcancel();\r\n\t\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\t\te.preventDefault();\r\n\t\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tupdateValue();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tcancel();\r\n\t\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\ttrueValueSet = Object.keys(editorParams).includes(\"trueValue\"),\r\n\tfalseValueSet = Object.keys(editorParams).includes(\"falseValue\");\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 = trueValueSet ? value === editorParams.trueValue : (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\tvar checkedValue = input.checked;\r\n\r\n\t\tif(trueValueSet && checkedValue){\r\n\t\t\tcheckedValue = editorParams.trueValue;\r\n\t\t}else if(falseValueSet && !checkedValue){\r\n\t\t\tcheckedValue = editorParams.falseValue;\r\n\t\t}\r\n\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 checkedValue;\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 checkedValue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn checkedValue;\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 date from './editors/date.js';\r\nimport time from './editors/time.js';\r\nimport datetime from './editors/datetime.js';\r\nimport select from './editors/select.js';\r\nimport list from './editors/list.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\tnumber:number,\r\n\trange:range,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tselect:select,\r\n\tlist:list,\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overridden 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\t\t\r\n\t\tthis.editors = Edit.editors;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\t\t\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\t\t\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\t\t\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\t\t\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\t\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(\"cell-value-changed\", this.updateCellClass.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(\"row-layout\", this.rowEditableCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\t\t\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\t\r\n\t\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\t\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\t\t\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\t\t\t\t\t\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\t\t\t\t\t\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\t\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcellIsEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\t\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\t\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tupdateCellClass(cell){\r\n\t\tif(this.allowEdit(cell)) {\r\n\t\t\tcell.getElement().classList.add(\"tabulator-editable\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-editable\");\r\n\t\t}\r\n\t}\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\t\t\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\t\t\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\t\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnextCell = this.navigateLeft();\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findPrevEditableCell(prevRow, prevRow.cells.length);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnextCell = this.navigateRight();\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\t\t\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\t\t\t\t\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn nextCell;\r\n\t}\r\n\t\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\t\t\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\t\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn prevCell;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\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\t\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\t\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\trowEditableCheck(row){\r\n\t\trow.getCells().forEach((cell) => {\r\n\t\t\tif(cell.column.modules.edit && typeof cell.column.modules.edit.check === \"function\"){\r\n\t\t\t\tthis.updateCellClass(cell);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar config = {\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\t\t\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\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.definition.editor === true){\r\n\t\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\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(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\t\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\t\t\r\n\t\tthis.invalidEdit = false;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\t\t\t\r\n\t\t\tcellEl = cell.getElement();\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"edit-editor-clear\", cell, cancel);\r\n\t\t\t\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\t\t\t\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\t\t\t\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-editing\");\r\n\t\t\t\r\n\t\t\tcell.table.element.classList.remove(\"tabulator-editing\");\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\t\t\t\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\t\t\t\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\t\t\t\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\t\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\t\t\t\r\n\t\t\tthis.updateCellClass(cell);\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\t\t\t\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\t\t\t\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\t\t\t\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\t\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\t\t\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\t\t\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\t\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\t\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\t\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\t\t\t\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\t\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\t\t\t\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\t\t\t\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\t\t\t\t\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\t\r\n\tallowEdit(cell) {\r\n\t\tvar check = cell.column.modules.edit ? true : false;\r\n\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tif(cell.row.initialized){\r\n\t\t\t\t\t\tcheck = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\t\tcheck = !!cell.row.data[cell.column.modules.edit.check];\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tcheck = cell.column.modules.edit.check;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn check;\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\t//handle successful value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = self.chain(\"edit-success\", [cell, value], true, true);\r\n\t\t\t\t\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn valid === true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\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\t\t\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\t\t\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\t\t\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\t\t\t\r\n\t\t\tallowEdit = this.allowEdit(cell);\r\n\t\t\t\r\n\t\t\tif(allowEdit || forceEdit){\r\n\t\t\t\t\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t\t\r\n\t\t\t\tself.currentCell = cell;\r\n\t\t\t\t\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\t\t\t\t\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\t\t\t\t\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\t\t\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\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"cell-editing\", cell);\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\t\t\t\t\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\t\t\t\t\t\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-editing\");\r\n\t\t\t\t\t\tcell.table.element.classList.add(\"tabulator-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\t\t\t\t\t\t\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\t\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\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\t\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\t\t\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"edit-edited-clear\", cell);\r\n\t\t}\r\n\t\t\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\t\t\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 output 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\tgenerateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.generateTableElement(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\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\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\tvar visProp = column.definition[this.colVisProp];\r\n\r\n\t\tif(typeof visProp === \"function\"){\r\n\t\t\tvisProp = visProp.call(this.table, column.getComponent());\r\n\t\t}\r\n\r\n\t\treturn visProp !== false && (column.visible || (!column.visible && visProp));\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 depth\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\t\treturn this.config.rowGroups !== false;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\t\treturn this.config.columnCalcs !== false;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\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\t\tindent = row.level;\r\n\t\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\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\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t\t}\r\n\t\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\tgenerateTableElement(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\tlet rowEl;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\t\theaderEl.appendChild(this.generateHeaderElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\t\tbodyEl.appendChild(this.generateGroupElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\t\tbodyEl.appendChild(this.generateCalcElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\t\trowEl = this.generateRowElement(row, setup, styles);\r\n\r\n\t\t\t\t\tthis.mapElementStyles(((i % 2) && styles.evenRow) ? styles.evenRow : styles.oddRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\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\tgenerateHeaderElement(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\tgenerateGroupElement(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 = 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\tgenerateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.generateRowElement(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\tgenerateRowElement(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, i) => {\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\t\t\t\tcellStyle;\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\t\tvalue = value !== null ? JSON.stringify(value) : \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\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\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\tcellStyle = styles.styleCells && styles.styleCells[index] ? styles.styleCells[index] : styles.firstCell;\r\n\r\n\t\t\t\tif(cellStyle){\r\n\t\t\t\t\tthis.mapElementStyles(cellStyle, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\", \"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"text-align\"]);\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\tgenerateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.generateTableElement(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.generateHTMLTable(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\r\n\t\t//handle successfully 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\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\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\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t}else{\r\n\t\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\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\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 column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\ttype = filterFunc;\r\n\t\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\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\ttype = \"like\";\r\n\t\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\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t\t};\r\n\t\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};\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\tcolumn.modules.filter.value = value;\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\tcolumn.modules.filter.value = initialValue;\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;\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\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"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\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\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\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\t\treturn value !== true && value !== 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}else{\r\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\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}\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\tgetTable:() => {\r\n\t\t\t\t\t\treturn this.table;\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\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\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)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\t\tsuccess(editorElement.value);\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//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\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\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propagating 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//programmatically 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.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//programmatically 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(null, false, false);\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\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}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(true));\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(true), 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\tif (formatterParams.thousand !== false) {\r\n\t\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\t\twhile (rgx.test(integer)){\r\n\t\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t\t}\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\tfunction labelTraverse(path, data){\r\n\t\tvar item = path.shift(),\r\n\t\tvalue = data[item];\r\n\t\t\r\n\t\tif(path.length && typeof value === \"object\"){\r\n\t\t\treturn labelTraverse(path, value);\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = labelTraverse(formatterParams.labelField.split(this.table.options.nestedFieldSeparator), data);\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\t\tlabel = formatterParams.label;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tlabel = formatterParams.label(cell);\r\n\t\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\t\tvalue = formatterParams.url;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\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\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\t\tel.style.height = formatterParams.height;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\t\tel.style.width = formatterParams.width;\r\n\t\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\ttrueValueSet = Object.keys(formatterParams).includes(\"trueValue\"),\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((trueValueSet && value === formatterParams.trueValue) || (!trueValueSet && ((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;\r\n\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\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\tvar newDatetime;\r\n\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\treturn newDatetime.diff(date, unit).toHuman() + (suffix ? \" \" + 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\t\tcolor = colors;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tcolor = colors(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(colors)){\r\n\t\t\t\tvar unit = 100 / colors.length;\r\n\t\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tcolor = colors[index];\r\n\t\t\t\tbreak;\r\n\t\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.max ? formatterParams.max : 100,\r\n\tmin = formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor;\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\t\tcolor = formatterParams.color;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tcolor = formatterParams.color(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\t\tlet unit = 100 / formatterParams.color.length;\r\n\t\t\t\tlet index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tcolor = formatterParams.color[index];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tdefault:\r\n\t\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\t\tlegend = formatterParams.legend;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tlegend = formatterParams.legend(value);\r\n\t\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\t\tlegend = value;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\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\t\tlegendColor = formatterParams.legendColor;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\t\tlet unit = 100 / formatterParams.legendColor.length;\r\n\t\t\t\tlet index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\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.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\tvar content = document.createElement(\"span\");\r\n\tvar row = cell.getRow();\r\n\r\n\trow.watchPosition((position) => {\r\n\t\tcontent.innerText = position;\r\n\t});\r\n\t\r\n\treturn content;\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 el = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\t\r\n\tel.innerHTML = `\r\n \r\n \r\n\r\n\r\n\r\n \r\n`;\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\tcell.getTable().rowManager.adjustTableSize();\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\t\t\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\t\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\t\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\t\t\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\t\t\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\t\t\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\t\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\t\t\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\tconfig.formatter = formatter;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn config;\r\n\t}\r\n\t\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\t\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\t\t\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\t\t\t\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\t\t\t\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\tgetColumn:function(){\r\n\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t},\r\n\t\t\t\tgetTable:() => {\r\n\t\t\t\t\treturn this.table;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\t\t\t\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\t\t\t\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\t\r\n\t\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\t\t\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\t\t\t\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\t\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\t\t\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(cell.getComponent()) : formatter.params;\r\n\t\t\t\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\t\t\t\t\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\t\t\t\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\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\t\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\t\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\t\tformatter = Format.formatters[formatter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t//Custom formatter Function, do nothing\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\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.initializationMode = \"left\";\r\n\t\tthis.active = 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.active = false;\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(\"columns-loading\", this.reset.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"column-add\", this.reinitializeColumns.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.reinitializeColumns.bind(this));\r\n\t\t\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\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.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\treinitializeColumns(){\r\n\t\tthis.reset();\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t});\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\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}\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);\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.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.marginValue = leftMargin;\r\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\r\n\t\t\t\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\t\t\t\r\n\t\t\tcolumn.modules.frozen.marginValue = rightMargin;\r\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\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\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(){\t\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.reinitializeRows();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar visibleRows = this.table.rowManager.getVisibleRows(true);\r\n\t\tvar otherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\r\n\t\t\r\n\t\totherRows.forEach((row) =>{\r\n\t\t\trow.deinitialize();\r\n\t\t});\r\n\t\t\r\n\t\tvisibleRows.forEach((row) =>{\r\n\t\t\tif(row.type === \"row\"){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutRow(row){\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\tvar position;\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"sticky\";\r\n\r\n\t\t\tif(this.table.rtl){\r\n\t\t\t\tposition = column.modules.frozen.position === \"left\" ? \"right\" : \"left\";\r\n\t\t\t}else{\r\n\t\t\t\tposition = column.modules.frozen.position;\r\n\t\t\t}\r\n\t\t\r\n\t\t\telement.style[position] = column.modules.frozen.margin;\r\n\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\r\n\tadjustForScrollbar(width){\r\n\t\tif(this.rightColumns.length){\r\n\t\t\tthis.table.columnManager.getContentsElement().style.width = \"calc(100% - \" + width + \"px)\";\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\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"frozenRowsField\", \"id\"); //field to choose frozen rows by\r\n\t\tthis.registerTableOption(\"frozenRows\", false); //holder for frozen row identifiers\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.getContentsElement().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\r\n\t\tif(this.table.options.frozenRows){\r\n\t\t\tthis.subscribe(\"data-processed\", this.initializeRows.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRows(){\r\n\t\tthis.table.rowManager.getRows().forEach((row) => {\r\n\t\t\tthis.initializeRow(row);\r\n\t\t});\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar frozenRows = this.table.options.frozenRows,\r\n\t\trowType = typeof frozenRows;\r\n\r\n\t\tif(rowType === \"number\"){\r\n\t\t\tif(row.getPosition() && (row.getPosition() + this.rows.length) <= frozenRows){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}else if(rowType === \"function\"){\r\n\t\t\tif(frozenRows.call(this.table, row.getComponent())){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(frozenRows)){\r\n\t\t\tif(frozenRows.includes(row.data[this.options(\"frozenRowsField\")])){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}\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 output = 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\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.table.rowManager.adjustTableSize();\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\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 constraints\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(){\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\t\r\n\t\tif(this.calcs.top){\r\n\t\t\tthis.calcs.top.detachElement();\r\n\t\t\tthis.calcs.top.deleteCells();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.calcs.bottom){\r\n\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t}\r\n\t\t\r\n\t\t\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());\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\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(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\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\tif(this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\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(this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\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() == \"basic\" && !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.updateGroupRows(true);\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() == \"basic\" && !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.updateGroupRows(true);\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(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(component ? 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 Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\t\t\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\t\t\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\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\t\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\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\t\t\t\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\t\t\t\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\t\t\t\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\t\t\t\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\t\t\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\t\t\t\r\n\t\t\tthis.groupIDLookups = [];\r\n\t\t\t\r\n\t\t\tif(Array.isArray(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\t\t\t\t\t\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\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\t\t\t\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\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\t\t\t\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}else{\r\n\t\t\tthis.groupList = [];\r\n\t\t\tthis.groups = {};\r\n\t\t}\r\n\t}\r\n\t\r\n\trowSample(rows, prevValue){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar group = this.getGroups(false)[0];\r\n\t\t\t\r\n\t\t\tprevValue.push(group.getRows(false)[0]);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevValue;\r\n\t}\r\n\t\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\trows = rows.filter((row) => {\r\n\t\t\t\treturn row.type !== \"group\";\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\t\t}else{\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingIndex(row, index, top){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.assignRowToGroup(row);\r\n\t\t\t\r\n\t\t\tvar groupRows = row.modules.group.rows;\r\n\t\t\t\r\n\t\t\tif(groupRows.length > 1){\r\n\t\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\t\tif(top){\r\n\t\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\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\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn index;\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\t\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tthis.refreshData();\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\t\t\t\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\t\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\t\t\t\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\t\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\t\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ? this.getGroupedData() : this.getData();\r\n\t}\r\n\t\r\n\t\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\t\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\trowMoving(from, to, after){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tif(!after && to instanceof Group){\r\n\t\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\t\t\t\r\n\t\t\tif(toGroup === fromGroup){\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t\t}else{\r\n\t\t\t\tif(fromGroup){\r\n\t\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(this.table.options.groupBy && row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.updateGroupRows(true);\r\n\t\t}\t\r\n\t}\r\n\t\r\n\tcellUpdated(cell){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.reassignRowToGroup(cell.row);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\t\t\t\r\n\t\t\tthis.generateGroups(rows);\r\n\t\t\t\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\t\t\t\r\n\t\t\treturn this.updateGroupRows();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\t\t\r\n\t\treturn groupComponents;\r\n\t}\r\n\t\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\t\t\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\treturn groupComponents;\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.table.options.groupBy){\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}\r\n\t}\r\n\t\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\t\t\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\t\t\t\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\t\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\t\t\r\n\t\treturn groupListData;\r\n\t}\r\n\t\r\n\tgetGroupedData(){\r\n\t\t\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\t\r\n\t\tif(this.options(\"dataTree\")){\r\n\t\t\trow = this.table.modules.dataTree.getTreeParentRoot(row);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\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\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\t\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\t\t\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\t\t\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\t\t\t\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\t\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\t\t\r\n\t\toldGroups = oldGroups || [];\r\n\t\t\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\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\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\t\t\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\t\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\t\t\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\t\t\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\t\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;\r\n\t\t\t\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tsamePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\t\t\t\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\t\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\t\t\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\t\t\r\n\t\treturn groupPath;\r\n\t}\r\n\t\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\t\t\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tleft = left + \"px\";\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tgroup.scrollHeader(left);\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}\r\n\t}\r\n\t\r\n\tcheckBasicModeGroupHeaderWidth(){\r\n\t\tvar element = this.table.rowManager.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\t\t\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row, index) =>{\r\n\t\t\tthis.table.rowManager.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\t\t\t\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\t\t\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\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:from.getPosition(), posTo:to.getPosition(), 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()._getSelf().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\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\tif(this.table.originalElement.childNodes.length){\r\n\t\t\t\tthis.parseTable();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element.\");\r\n\t\t\t}\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\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [];\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 don't 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;\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\tvar data = [],\r\n\trow = 0, \r\n\tcol = 0,\r\n\tinQuote = false;\r\n \r\n\t//Iterate over each character\r\n\tfor (let index = 0; index < input.length; index++) {\r\n\t\tlet char = input[index], \r\n\t\tnextChar = input[index+1]; \r\n \r\n\t\t//Initialize empty row\r\n\t\tif(!data[row]){\r\n\t\t\tdata[row] = [];\r\n\t\t}\r\n\r\n\t\t//Initialize empty column\r\n\t\tif(!data[row][col]){\r\n\t\t\tdata[row][col] = \"\";\r\n\t\t}\r\n \r\n\t\t//Handle quotation mark inside string\r\n\t\tif (char == '\"' && inQuote && nextChar == '\"') { \r\n\t\t\tdata[row][col] += char; \r\n\t\t\tindex++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//Begin / End Quote\r\n\t\tif (char == '\"') { \r\n\t\t\tinQuote = !inQuote;\r\n\t\t\tcontinue;\r\n\t\t}\r\n \r\n\t\t//Next column (if not in quote)\r\n\t\tif (char == ',' && !inQuote) { \r\n\t\t\tcol++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//New row if new line and not in quote (CRLF) \r\n\t\tif (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n\t\t\tcol = 0; \r\n\t\t\trow++; \r\n\t\t\tindex++; \r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//New row if new line and not in quote (CR or LF) \r\n\t\tif ((char == '\\r' || char == '\\n') && !inQuote) { \r\n\t\t\tcol = 0;\r\n\t\t\trow++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n\r\n\t\t//Normal Character, append to column\r\n\t\tdata[row][col] += char;\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\nexport default csvImporter;","export default function(input){\r\n\ttry {\r\n\t\treturn JSON.parse(input);\r\n\t} catch(e) {\r\n\t\tconsole.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n\t\treturn Promise.reject();\r\n\t}\r\n}","function arrayImporter(input){\r\n\treturn input;\r\n}\r\n\r\nexport default arrayImporter;","import csv from './importers/csv.js';\r\nimport json from './importers/json.js';\r\nimport array from './importers/array.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tarray:array,\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\tconstructor(table){\r\n\t\tsuper(table);\r\n \r\n\t\tthis.registerTableOption(\"importFormat\");\r\n\t\tthis.registerTableOption(\"importReader\", \"text\");\r\n\t}\r\n \r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n\t\tif(this.table.options.importFormat){\r\n\t\t\tthis.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n\t\t\tthis.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n\t\t}\r\n\t}\r\n\r\n\tloadDataCheck(data){\r\n\t\treturn this.table.options.importFormat && (typeof data === \"string\" || (Array.isArray(data) && data.length && Array.isArray(data)));\r\n\t}\r\n\r\n\tloadData(data, params, config, silent, previousData){\r\n\t\treturn this.importData(this.lookupImporter(), data)\r\n\t\t\t.then(this.structureData.bind(this))\r\n\t\t\t.catch((err) => {\r\n\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import data\");\r\n\t\t\t\treturn Promise.reject(err);\r\n\t\t\t});\r\n\t}\r\n\r\n\tlookupImporter(importFormat){\r\n\t\tvar importer;\r\n \r\n\t\tif(!importFormat){\r\n\t\t\timportFormat = this.table.options.importFormat;\r\n\t\t}\r\n \r\n\t\tif(typeof importFormat === \"string\"){\r\n\t\t\timporter = Import.importers[importFormat];\r\n\t\t}else{\r\n\t\t\timporter = importFormat;\r\n\t\t}\r\n\r\n\t\tif(!importer){\r\n\t\t\tconsole.error(\"Import Error - Importer not found:\", importFormat);\r\n\t\t}\r\n \r\n\t\treturn importer;\r\n\t}\r\n \r\n\timportFromFile(importFormat, extension){\r\n\t\tvar importer = this.lookupImporter(importFormat);\r\n \r\n\t\tif(importer){\r\n\t\t\treturn this.pickFile(extension)\r\n\t\t\t\t.then(this.importData.bind(this, importer))\r\n\t\t\t\t.then(this.structureData.bind(this))\r\n\t\t\t\t.then(this.setData.bind(this))\r\n\t\t\t\t.catch((err) => {\r\n\t\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import file\");\r\n\t\t\t\t\treturn Promise.reject(err);\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n \r\n\tpickFile(extensions){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar input = document.createElement(\"input\");\r\n\t\t\tinput.type = \"file\";\r\n\t\t\tinput.accept = extensions;\r\n \r\n\t\t\tinput.addEventListener(\"change\", (e) => {\r\n\t\t\t\tvar file = input.files[0],\r\n\t\t\t\treader = new FileReader();\r\n \r\n\t\t\t\tswitch(this.table.options.importReader){\r\n\t\t\t\t\tcase \"buffer\":\r\n\t\t\t\t\t\treader.readAsArrayBuffer(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"binary\":\r\n\t\t\t\t\t\treader.readAsBinaryString(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"url\":\r\n\t\t\t\t\t\treader.readAsDataURL(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"text\":\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treader.readAsText(file);\r\n\t\t\t\t}\r\n \r\n\t\t\t\treader.onload = (e) => {\r\n\t\t\t\t\tresolve(reader.result);\r\n\t\t\t\t};\r\n \r\n\t\t\t\treader.onerror = (e) => {\r\n\t\t\t\t\tconsole.warn(\"File Load Error - Unable to read file\");\r\n\t\t\t\t\treject();\r\n\t\t\t\t};\r\n\t\t\t});\r\n \r\n\t\t\tinput.click();\r\n\t\t});\r\n\t}\r\n \r\n\timportData(importer, fileContents){\r\n\t\tvar data = importer.call(this.table, fileContents);\r\n \r\n\t\tif(data instanceof Promise){\r\n\t\t\treturn data;\r\n\t\t}else{\r\n\t\t\treturn data ? Promise.resolve(data) : Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tstructureData(parsedData){\r\n\t\tvar data = [];\r\n \r\n\t\tif(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n\t\t\tif(this.table.options.autoColumns){\r\n\t\t\t\tdata = this.structureArrayToObject(parsedData);\r\n\t\t\t}else{\r\n\t\t\t\tdata = this.structureArrayToColumns(parsedData);\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\t\t}else{\r\n\t\t\treturn parsedData;\r\n\t\t}\r\n\t}\r\n\r\n\tstructureArrayToObject(parsedData){\r\n\t\tvar columns = parsedData.shift();\r\n\r\n\t\tvar data = parsedData.map((values) => {\r\n\t\t\tvar row = {};\r\n\r\n\t\t\tcolumns.forEach((key, i) => {\r\n\t\t\t\trow[key] = values[i];\r\n\t\t\t});\r\n\r\n\t\t\treturn row;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tstructureArrayToColumns(parsedData){\r\n\t\tvar data = [],\r\n\t\tcolumns = this.table.getColumns();\r\n\r\n\t\t//remove first row if it is the column names\r\n\t\tif(columns[0] && parsedData[0][0]){\r\n\t\t\tif(columns[0].getDefinition().title === parsedData[0][0]){\r\n\t\t\t\tparsedData.shift();\r\n\t\t\t}\r\n\t\t}\r\n \r\n\t\t//convert row arrays to objects\r\n\t\tparsedData.forEach((rowData) => {\r\n\t\t\tvar row = {};\r\n\r\n\t\t\trowData.forEach((value, index) => {\r\n\t\t\t\tvar column = columns[index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\trow[column.getField()] = value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tdata.push(row);\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n \r\n\tsetData(data){\r\n\t\treturn this.table.setData(data);\r\n\t}\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\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\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\trowMouseDown:\"row-mousedown\",\r\n\t\t\trowMouseUp:\"row-mouseup\",\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\tcellMouseDown:\"cell-mousedown\",\r\n\t\t\tcellMouseUp:\"cell-mouseup\",\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\theaderMouseDown:\"column-mousedown\",\r\n\t\t\theaderMouseUp:\"column-mouseup\",\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\tgroupMouseDown:\"group-mousedown\",\r\n\t\t\tgroupMouseUp:\"group-mouseup\",\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(\"headerMouseDown\");\r\n\t\tthis.registerColumnOption(\"headerMouseUp\");\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(\"cellMouseDown\");\r\n\t\tthis.registerColumnOption(\"cellMouseUp\");\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\tvar range;\r\n\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === cell){\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\trange = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(cell.getElement());\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNode(cell.getElement());\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\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\t\twatchers.tap = true;\r\n\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\t\twatchers.tap = null;\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t\t}, 1000);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\t\twatchers.tap = null;\r\n\t\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(watchers.tapDbl){\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t\t}else{\r\n\t\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\t\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;\r\n","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\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\t\tbinding.ctrl = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\t\tbinding.shift = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\t\tbinding.meta = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\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\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.nestedMenuBlock = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\tthis.rootPopup = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"menuContainer\", undefined); //deprecated\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"rowDblClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupDblClickMenu\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerDblClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenuIcon\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t\tthis.registerColumnOption(\"dblClickMenu\");\r\n\t\t\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.deprecatedOptionsCheck();\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\tdeprecatedOptionsCheck(){\r\n\t\tif(!this.deprecationCheck(\"menuContainer\", \"popupContainer\")){\r\n\t\t\tthis.table.options.popupContainer = this.table.options.menuContainer;\r\n\t\t}\r\n\t}\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\t\r\n\t\tif(this.table.options.rowDblClickMenu){\r\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadMenuEvent.bind(this, this.table.options.rowDblClickMenu));\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\t\r\n\t\tif(this.table.options.groupDblClickMenu){\r\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadMenuEvent.bind(this, this.table.options.groupDblClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar\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.headerDblClickMenu && !this.columnSubscribers.headerDblClickMenu){\r\n\t\t\tthis.columnSubscribers.headerDblClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerDblClickMenu\");\r\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickMenu);\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\t\r\n\t\tif(def.dblClickMenu && !this.columnSubscribers.dblClickMenu){\r\n\t\t\tthis.columnSubscribers.dblClickMenu = this.loadMenuTableCellEvent.bind(this, \"dblClickMenu\");\r\n\t\t\tthis.subscribe(\"cell-dblclick\", this.columnSubscribers.dblClickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar icon = column.definition.headerMenuIcon,\r\n\t\theaderMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-popup-button\");\r\n\t\t\r\n\t\tif(icon){\r\n\t\t\tif(typeof icon === \"function\"){\r\n\t\t\t\ticon = icon(column.getComponent());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(icon instanceof HTMLElement){\r\n\t\t\t\theaderMenuEl.appendChild(icon);\r\n\t\t\t}else{\r\n\t\t\t\theaderMenuEl.innerHTML = icon;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t}\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, e, component.getComponent()) : 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, parentPopup){\r\n\t\tvar touch = !(e instanceof MouseEvent),\t\t\r\n\t\tmenuEl = document.createElement(\"div\"),\r\n\t\tpopup;\r\n\t\t\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.rootPopup){\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\tif(this.rootPopup){\r\n\t\t\t\tthis.rootPopup.hide();\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rootPopup = popup = this.popup(menuEl);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpopup = parentPopup.child(menuEl);\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.loadMenu(e, component, item.menu, itemEl, popup);\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\tif(this.rootPopup){\r\n\t\t\t\tthis.rootPopup.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tpopup.show(parentEl || e);\r\n\t\t\r\n\t\tif(popup === this.rootPopup){\r\n\t\t\tthis.rootPopup.hideOnBlur(() => {\r\n\t\t\t\tthis.rootPopup = null;\r\n\t\t\t\t\r\n\t\t\t\tif(this.currentComponent){\r\n\t\t\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\t\t\tthis.currentComponent = null;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.currentComponent = component;\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent());\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 destination 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 && !column.isGroup){\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\tnextCol, 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\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 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\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.getContentsElement(),\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\theaderElement.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.getContentsElement(),\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 destination 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\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, group);\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;\r\n\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\trowEl = 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\trowEl = 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\tnextRow, 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\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 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\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\t\r\n\t\tthis.hoverElement.style.top = Math.min(yPos - this.startY, this.table.rowManager.element.scrollHeight - this.hoverElement.offsetHeight) + \"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 incoming 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\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\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 ? this.moving.getComponent() : undefined, 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\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\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\t\treturn this.connect(table, data.row);\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\t\treturn this.disconnect(table);\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\t\treturn this.dropComplete(table, data.row, data.success);\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 mutation 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\tthis.registerColumnOption(\"mutateLink\");\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(\"cell-value-changed\", this.mutateLink.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\t\tif(Mutator.mutators[value]){\r\n\t\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tmutator = value;\r\n\t\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\tmutateLink(cell){\r\n\t\tvar links = cell.column.definition.mutateLink;\r\n\r\n\t\tif(links){\r\n\t\t\tif(!Array.isArray(links)){\r\n\t\t\t\tlinks = [links];\r\n\t\t\t}\r\n\r\n\t\t\tlinks.forEach((link) => {\r\n\t\t\t\tvar linkCell = cell.row.getCell(link);\r\n\r\n\t\t\t\tif(linkCell){\r\n\t\t\t\t\tlinkCell.setValue(linkCell.getValue(), true, true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\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\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\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.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\t\t\tthis.subscribe(\"footer-redraw\", this.footerRedraw.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\tdisplayRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(displayRows.length){\r\n\t\t\t\tindex = displayRows[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(displayRows.length){\r\n\t\t\t\tindex = displayRows[displayRows.length - 1];\r\n\t\t\t\ttop = displayRows.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\r\n\t\tthis.dispatchExternal(\"pageSizeChanged\", this.size);\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\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){\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.footerAppend(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.footerAppend(this.element);\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\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\t\treturn this.setPage(1);\r\n\t\r\n\t\t\tcase \"prev\":\r\n\t\t\t\treturn this.previousPage();\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\t\treturn this.nextPage();\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\t\treturn this.setPage(this.max);\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.displayRows(-1);\r\n\t\tvar index = rows.indexOf(row);\r\n\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\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t\tthis.dispatchExternal(\"pageSizeChanged\", 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\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//clear previous cell contents\r\n\t\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\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif(content != null){\r\n\t\t\t\t\t\t\tconsole.warn(\"Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:\", content);\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\tcase \"undefined\":\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\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\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\t\tthis.refreshData();\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\t\treturn Promise.resolve();\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\t\tthis.dataChanging = true;\r\n\t\t\t\treturn this.reloadData(null)\r\n\t\t\t\t\t.finally(() => {\r\n\t\t\t\t\t\tthis.dataChanging = false;\r\n\t\t\t\t\t});\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\treturn this.reloadData(null, true);\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar 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\t\tif(this.page == 1){\r\n\t\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\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}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t\t}\r\n\t\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\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\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\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\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\t\tthis.nextPage();\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\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;\r\n","// read persistance 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\tretrievedData;\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\tretrievedData = this.retrieveData(\"page\");\r\n\r\n\t\t\t\tif(retrievedData){\r\n\t\t\t\t\tif(typeof retrievedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retrievedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retrievedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retrievedData.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\tretrievedData = this.retrieveData(\"group\");\r\n\r\n\t\t\t\tif(retrievedData){\r\n\t\t\t\t\tif(typeof retrievedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retrievedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retrievedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retrievedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retrievedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retrievedData.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(\"column-width\", 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 sorters, 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\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: (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:() => {\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.retrieveData(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//retrieve data from memory\r\n\tretrieveData(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\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\t\treturn col.field === subject.field;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\t\treturn col === subject;\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\t\tdata = this.parseColumns(this.table.columnManager.getColumns());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tdata = this.getGroupConfig();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\t\tdata = this.getPageConfig();\r\n\t\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\tkeys.push(\"visible\");\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\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\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}\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 = -10;\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 Popup extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextPopup\", false);\r\n\t\tthis.registerTableOption(\"rowClickPopup\", false);\r\n\t\tthis.registerTableOption(\"rowDblClickPopup\", false);\r\n\t\tthis.registerTableOption(\"groupContextPopup\", false);\r\n\t\tthis.registerTableOption(\"groupClickPopup\", false);\r\n\t\tthis.registerTableOption(\"groupDblClickPopup\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextPopup\");\r\n\t\tthis.registerColumnOption(\"headerClickPopup\");\r\n\t\tthis.registerColumnOption(\"headerDblClickPopup\");\r\n\t\tthis.registerColumnOption(\"headerPopup\");\r\n\t\tthis.registerColumnOption(\"headerPopupIcon\");\r\n\t\tthis.registerColumnOption(\"contextPopup\");\r\n\t\tthis.registerColumnOption(\"clickPopup\");\r\n\t\tthis.registerColumnOption(\"dblClickPopup\");\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"group\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\t\r\n\t}\r\n\t\r\n\tinitialize(){\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\r\n\t_componentPopupCall(component, contents, position){\r\n\t\tthis.loadPopupEvent(contents, null, component, position);\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextPopup){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickPopup){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadPopupEvent.bind(this, this.table.options.rowClickPopup));\r\n\t\t}\r\n\r\n\t\tif(this.table.options.rowDblClickPopup){\r\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadPopupEvent.bind(this, this.table.options.rowDblClickPopup));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextPopup){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickPopup){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadPopupEvent.bind(this, this.table.options.groupClickPopup));\r\n\t\t}\r\n\r\n\t\tif(this.table.options.groupDblClickPopup){\r\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadPopupEvent.bind(this, this.table.options.groupDblClickPopup));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextPopup && !this.columnSubscribers.headerContextPopup){\r\n\t\t\tthis.columnSubscribers.headerContextPopup = this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextPopup);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickPopup && !this.columnSubscribers.headerClickPopup){\r\n\t\t\tthis.columnSubscribers.headerClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerClickPopup\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickPopup);\r\n\t\t\r\n\t\t\r\n\t\t}if(def.headerDblClickPopup && !this.columnSubscribers.headerDblClickPopup){\r\n\t\t\tthis.columnSubscribers.headerDblClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerDblClickPopup\");\r\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickPopup);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerPopup){\r\n\t\t\tthis.initializeColumnHeaderPopup(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextPopup && !this.columnSubscribers.contextPopup){\r\n\t\t\tthis.columnSubscribers.contextPopup = this.loadPopupTableCellEvent.bind(this, \"contextPopup\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextPopup);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadPopupTableCellEvent.bind(this, \"contextPopup\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickPopup && !this.columnSubscribers.clickPopup){\r\n\t\t\tthis.columnSubscribers.clickPopup = this.loadPopupTableCellEvent.bind(this, \"clickPopup\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickPopup);\r\n\t\t}\r\n\r\n\t\tif(def.dblClickPopup && !this.columnSubscribers.dblClickPopup){\r\n\t\t\tthis.columnSubscribers.dblClickPopup = this.loadPopupTableCellEvent.bind(this, \"dblClickPopup\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.dblClickPopup);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderPopup(column){\r\n\t\tvar icon = column.definition.headerPopupIcon,\r\n\t\theaderPopupEl;\r\n\t\t\r\n\t\theaderPopupEl = document.createElement(\"span\");\r\n\t\theaderPopupEl.classList.add(\"tabulator-header-popup-button\");\r\n\r\n\t\tif(icon){\r\n\t\t\tif(typeof icon === \"function\"){\r\n\t\t\t\ticon = icon(column.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tif(icon instanceof HTMLElement){\r\n\t\t\t\theaderPopupEl.appendChild(icon);\r\n\t\t\t}else{\r\n\t\t\t\theaderPopupEl.innerHTML = icon;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\theaderPopupEl.innerHTML = \"⋮\";\r\n\t\t}\r\n\t\t\r\n\t\theaderPopupEl.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.loadPopupEvent(column.definition.headerPopup, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerPopupEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadPopupTableCellEvent(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.loadPopupEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadPopupTableColumnEvent(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.loadPopupEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadPopupEvent(contents, e, component, position){\r\n\t\tvar renderedCallback;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trenderedCallback = callback;\r\n\t\t}\r\n\t\t\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\tcontents = typeof contents == \"function\" ? contents.call(this.table, e, component.getComponent(), onRendered) : contents;\r\n\t\t\r\n\t\tthis.loadPopup(e, component, contents, renderedCallback, position);\r\n\t}\r\n\t\r\n\tloadPopup(e, component, contents, renderedCallback, position){\r\n\t\tvar touch = !(e instanceof MouseEvent),\r\n\t\tcontentsEl, popup;\r\n\t\t\r\n\t\tif(contents instanceof HTMLElement){\r\n\t\t\tcontentsEl = contents;\r\n\t\t}else{\r\n\t\t\tcontentsEl = document.createElement(\"div\");\r\n\t\t\tcontentsEl.innerHTML = contents;\r\n\t\t}\r\n\t\t\r\n\t\tcontentsEl.classList.add(\"tabulator-popup\");\r\n\r\n\t\tcontentsEl.addEventListener(\"click\", (e) =>{\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\tpopup = this.popup(contentsEl);\r\n\r\n\t\tif(typeof renderedCallback === \"function\"){\r\n\t\t\tpopup.renderCallback(renderedCallback);\r\n\t\t}\r\n\r\n\t\tif(e){\r\n\t\t\tpopup.show(e);\r\n\t\t}else{\r\n\t\t\tpopup.show(component.getElement(), position || \"center\");\r\n\t\t}\r\n\r\n\t\t\r\n\t\tpopup.hideOnBlur(() => {\r\n\t\t\tthis.dispatchExternal(\"popupClosed\", component.getComponent());\r\n\t\t});\r\n\r\n\r\n\r\n\t\tthis.dispatchExternal(\"popupOpened\", component.getComponent());\r\n\t}\r\n}\r\n\r\nPopup.moduleName = \"popup\";\r\n\r\nexport default Popup;\r\n","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.generateTable(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.generateTable(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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\t\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\t\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, \"cellsave\"));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this, \"cellsave\"));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this, \"rowsave\"));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this, \"rowsave\"));\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\t\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tversion;\r\n\t\t\r\n\t\tthis.currentVersion ++;\r\n\t\t\r\n\t\tversion = this.currentVersion;\r\n\t\t\r\n\t\tthis.unwatchData();\r\n\t\t\r\n\t\tthis.data = data;\r\n\t\t\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\t\t\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\t\t\t\tresult;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\t\r\n\t\t\t\t\tself.block(\"data-push\");\r\n\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\t\r\n\t\t\t\t\tresult = self.origFuncs.push.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-push\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\t\t\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\t\t\t\tresult;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-unshift\");\r\n\t\t\t\t\t\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\t\r\n\t\t\t\t\tresult = self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-unshift\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\t\t\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, result;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-shift\");\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.shift.call(data);\r\n\r\n\t\t\t\t\tself.unblock(\"data-shift\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\t\t\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, result;\r\n\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-pop\");\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.pop.call(data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-pop\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\t\t\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, result;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-splice\");\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-splice\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result ;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\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\t\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\t\t\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\twatchTreeChildren (row){\r\n\t\tvar self = this,\r\n\t\tchildField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\t\t\r\n\t\tif(childField){\r\n\t\t\t\r\n\t\t\torigFuncs.push = childField.push;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-push\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-push\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-unshift\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-unshift\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-shift\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-shift\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-pop\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-pop\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-splice\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-splice\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\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\t\r\n\trebuildTree(row){\r\n\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t}\r\n\t\r\n\twatchKey(row, data, key){\r\n\t\tvar self = this,\r\n\t\tprops = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\t\t\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(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"key\");\r\n\t\t\t\t\t\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\t\r\n\t\t\t\t\tself.unblock(\"key\");\r\n\t\t\t\t}\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\t\t\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\t\r\n\tblock(key){\r\n\t\tif(!this.blocked){\r\n\t\t\tthis.blocked = key;\r\n\t\t}\r\n\t}\r\n\t\r\n\tunblock(key){\r\n\t\tif(this.blocked === key){\r\n\t\t\tthis.blocked = false;\r\n\t\t}\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.latestX = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.initialNextColumn = null;\r\n\t\tthis.nextColumn = null;\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t\tthis.registerTableOption(\"resizableColumnFit\", false);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-rendered\", this.layoutColumnHeader.bind(this));\r\n\t}\r\n\t\r\n\tinitializeEventWatchers(){\r\n\t\tif(!this.initialized){\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-rendered\", this.layoutCellHandles.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.deInitializeComponent.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-height\", this.resizeHandle.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.columnLayoutUpdated.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-hide\", this.deInitializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.columnLayoutUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"column-width\", this.columnWidthUpdated.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-delete\", this.deInitializeComponent.bind(this));\r\n\t\t\tthis.subscribe(\"column-height\", this.resizeHandle.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.deInitializeComponent(cell);\r\n\t\t\tthis.initializeColumn(\"cell\", cell, cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tif(column.definition.resizable){\r\n\t\t\tthis.initializeEventWatchers();\r\n\t\t\tthis.deInitializeComponent(column);\r\n\t\t\tthis.initializeColumn(\"header\", column, column, column.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolumnLayoutUpdated(column){\r\n\t\tvar prev = column.prevColumn();\r\n\t\t\r\n\t\tthis.reinitializeColumn(column);\r\n\t\t\r\n\t\tif(prev){\r\n\t\t\tthis.reinitializeColumn(prev);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolumnWidthUpdated(column){\r\n\t\tif(column.modules.frozen){\r\n\t\t\tif(this.table.modules.frozenColumns.leftColumns.includes(column)){\r\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((col) => {\r\n\t\t\t\t\tthis.reinitializeColumn(col);\r\n\t\t\t\t});\r\n\t\t\t}else if(this.table.modules.frozenColumns.rightColumns.includes(column)){\r\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((col) => {\r\n\t\t\t\t\tthis.reinitializeColumn(col);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfrozenColumnOffset(column){\r\n\t\tvar offset = false;\r\n\r\n\t\tif(column.modules.frozen){\r\n\t\t\toffset = column.modules.frozen.marginValue; \r\n\r\n\t\t\tif(column.modules.frozen.position === \"left\"){\r\n\t\t\t\toffset += column.getWidth() - 3;\r\n\t\t\t}else{\r\n\t\t\t\tif(offset){\r\n\t\t\t\t\toffset -= 3;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn offset !== false ? offset + \"px\" : false;\r\n\t}\r\n\t\r\n\treinitializeColumn(column){\r\n\t\tvar frozenOffset = this.frozenColumnOffset(column);\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(cell.modules.resize && cell.modules.resize.handleEl){\r\n\t\t\t\tif(frozenOffset){\r\n\t\t\t\t\tcell.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcell.element.after(cell.modules.resize.handleEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(column.modules.resize && column.modules.resize.handleEl){\r\n\t\t\tif(frozenOffset){\r\n\t\t\t\tcolumn.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.element.after(column.modules.resize.handleEl);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(type, component, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable,\r\n\t\tconfig = {},\r\n\t\tnearestColumn = column.getLastColumn();\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\tconfig = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif((mode === true || mode == type) && this._checkResizability(nearestColumn)){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('span');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\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\tself.startColumn = column;\r\n\t\t\t\tself.initialNextColumn = self.nextColumn = nearestColumn.nextColumn();\r\n\t\t\t\tself._mouseDown(e, nearestColumn, handle);\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//resize column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", (e) => {\r\n\t\t\t\tvar oldWidth = nearestColumn.getWidth();\r\n\t\t\t\t\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tnearestColumn.reinitializeWidth(true);\r\n\t\t\t\t\r\n\t\t\t\tif(oldWidth !== nearestColumn.getWidth()){\r\n\t\t\t\t\tself.dispatch(\"column-resized\", nearestColumn);\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", nearestColumn.getComponent());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen){\r\n\t\t\t\thandle.style.position = \"sticky\";\r\n\t\t\t\thandle.style[column.modules.frozen.position] = this.frozenColumnOffset(column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconfig.handleEl = handle;\r\n\t\t\t\r\n\t\t\tif(element.parentNode && column.visible){\r\n\t\t\t\telement.after(handle);\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcomponent.modules.resize = config;\r\n\t}\r\n\t\r\n\tdeInitializeColumn(column){\r\n\t\tthis.deInitializeComponent(column);\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tthis.deInitializeComponent(cell);\r\n\t\t});\r\n\t}\r\n\t\r\n\tdeInitializeComponent(component){\r\n\t\tvar handleEl;\r\n\t\t\r\n\t\tif(component.modules.resize){\r\n\t\t\thandleEl = component.modules.resize.handleEl;\r\n\t\t\t\r\n\t\t\tif(handleEl && handleEl.parentElement){\r\n\t\t\t\thandleEl.parentElement.removeChild(handleEl);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tresizeHandle(component, height){\r\n\t\tif(component.modules.resize && component.modules.resize.handleEl){\r\n\t\t\tcomponent.modules.resize.handleEl.style.height = height;\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\t\t\r\n\t\tfunction mouseMove(e){\r\n\t\t\tvar x = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX,\r\n\t\t\tstartDiff = x - self.startX,\r\n\t\t\tmoveDiff = x - self.latestX,\r\n\t\t\tblockedBefore, blockedAfter;\r\n\t\t\t\r\n\t\t\tself.latestX = x;\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tstartDiff = -startDiff;\r\n\t\t\t\tmoveDiff = -moveDiff;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tblockedBefore = column.width == column.minWidth || column.width == column.maxWidth;\r\n\t\t\t\r\n\t\t\tcolumn.setWidth(self.startWidth + startDiff);\r\n\t\t\t\r\n\t\t\tblockedAfter = column.width == column.minWidth || column.width == column.maxWidth;\r\n\t\t\t\r\n\t\t\tif(moveDiff < 0){\r\n\t\t\t\tself.nextColumn = self.initialNextColumn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.options.resizableColumnFit && self.nextColumn && !(blockedBefore && blockedAfter)){\r\n\t\t\t\tlet colWidth = self.nextColumn.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(moveDiff > 0){\r\n\t\t\t\t\tif(colWidth <= self.nextColumn.minWidth){\r\n\t\t\t\t\t\tself.nextColumn = self.nextColumn.nextColumn();\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(self.nextColumn){\r\n\t\t\t\t\tself.nextColumn.setWidth(self.nextColumn.getWidth() - moveDiff);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.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\t\t\t\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.table.columnManager.verticalAlignHeaders();\r\n\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 interfering 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.latestX = self.startX;\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 interfering 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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.binding = false;\r\n\t\tthis.visibilityObserver = false;\r\n\t\tthis.resizeObserver = false;\r\n\t\tthis.containerObserver = false;\r\n\t\t\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\t\t\r\n\t\tthis.autoResize = false;\r\n\t\t\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.initialRedraw = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\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\t\t\t\r\n\t\t\tif(typeof IntersectionObserver !== \"undefined\" && typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeVisibilityObserver();\r\n\t\t\t\t\r\n\t\t\t\tthis.autoResize = true;\r\n\t\t\t\t\r\n\t\t\t\tthis.resizeObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\t\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tthis.redrawTable();\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\tthis.resizeObserver.observe(table.element);\r\n\t\t\t\t\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tthis.redrawTable();\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.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\t\t\t\t\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\t\t\t\t\t\ttable.columnManager.rerenderColumns(true);\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeVisibilityObserver(){\r\n\t\tthis.visibilityObserver = new IntersectionObserver((entries) => {\r\n\t\t\tthis.visible = entries[0].isIntersecting;\r\n\t\t\t\r\n\t\t\tif(!this.initialized){\r\n\t\t\t\tthis.initialized = true;\r\n\t\t\t\tthis.initialRedraw = !this.visible;\r\n\t\t\t}else{\r\n\t\t\t\tif(this.visible){\r\n\t\t\t\t\tthis.redrawTable(this.initialRedraw);\r\n\t\t\t\t\tthis.initialRedraw = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.visibilityObserver.observe(this.table.element);\r\n\t}\r\n\t\r\n\tredrawTable(force){\r\n\t\tif(this.initialized && this.visible){\r\n\t\t\tthis.table.columnManager.rerenderColumns(true);\r\n\t\t\tthis.table.redraw(force);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\t\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.resizeObserver){\r\n\t\t\tthis.resizeObserver.unobserve(this.table.element);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.visibilityObserver){\r\n\t\t\tthis.visibilityObserver.unobserve(this.table.element);\r\n\t\t}\r\n\t\t\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\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\t\t\t\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.generateCollapsedRowContent.bind(this));\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 working = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = this.table.modules.layout.getMode() == \"fitColumns\" ? this.table.columnManager.getFlexBaseWidth() : this.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (this.table.options.headerVisible ? this.table.columnManager.element.clientWidth : this.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 = this.columns[this.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.hideColumn(column);\r\n\t\t\t\t\tthis.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 = this.columns[this.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\tthis.showColumn(column);\r\n\t\t\t\t\t\t\tthis.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(!this.table.rowManager.activeRowsCount){\r\n\t\t\t\tthis.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.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 data = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach((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 && this.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\tgetTable:() => {\r\n\t\t\t\t\t\t\treturn this.table;\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(this.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;\r\n","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 whether 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\t\tthis.table.rowManager.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\tthis._rowSelectionChanged();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\t\tif(rowMatch){\r\n\t\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowMatch = this.table.rowManager.getRows(rows);\r\n\t\t\t\t\t\r\n\t\t\t\t\trowMatch.forEach((row) => {\r\n\t\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(rowMatch.length){\r\n\t\t\t\t\t\tthis._rowSelectionChanged();\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\t\t\tdefault:\r\n\t\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t\t}\r\n\t\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\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\t\tif(params.locale){\r\n\t\t\t\t\tlocale = this.langLocale();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\t\tlocale = params.locale;\r\n\t\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\tif(!DT.isDateTime(a)){\r\n\t\t\tif(format === \"iso\"){\r\n\t\t\t\ta = DT.fromISO(String(a));\r\n\t\t\t}else{\r\n\t\t\t\ta = DT.fromFormat(String(a), format);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(!DT.isDateTime(b)){\r\n\t\t\tif(format === \"iso\"){\r\n\t\t\t\tb = DT.fromISO(String(b));\r\n\t\t\t}else{\r\n\t\t\t\tb = DT.fromFormat(String(b), format);\r\n\t\t\t}\r\n\t\t}\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 type = params.type || \"length\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\t\tvar result;\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\t\tresult = value.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\t\tresult = value.reduce(function(c, d){\r\n\t\t\t\t\treturn c + d;\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\t\tresult = Math.max.apply(null, value) ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\t\tresult = Math.min.apply(null, value) ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\t\tresult = value.reduce(function(c, d){\r\n\t\t\t\t\treturn c + d;\r\n\t\t\t\t}) / value.length;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\temptyAlign = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\treturn calc(b) - calc(a);\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\t\tthis.registerTableOption(\"headerSortClickElement\", \"header\"); //element which triggers sort when clicked\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\tinitialize(){\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\ttableBuilt(){\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\tremoteSortParams(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\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tsorter = column.definition.sorter;\r\n\t\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\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tswitch(this.table.options.headerSortClickElement){\r\n\t\t\t\tcase \"icon\":\r\n\t\t\t\t\tarrowEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tswitch(this.table.options.headerSortElement){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault:\r\n\t\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\tthis.setColumnHeaderSortIcon(column, \"none\");\r\n\r\n\t\t\t//sort on click\r\n\t\t\t(this.table.options.headerSortClickElement === \"icon\" ? arrowEl : colEl).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\t\tdir = \"desc\";\r\n\t\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\t\tdir = \"asc\";\r\n\t\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\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\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\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push(match);\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(null, false, false);\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\t\tsorter = \"string\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t\t}else{\r\n\t\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\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\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\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;\r\n\r\n\t\t\t\tif(item.column){\r\n\t\t\t\t\tsortObj = item.column.modules.sort;\r\n\r\n\t\t\t\t\tif(sortObj){\r\n\r\n\t\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t\t}\r\n\r\n\t\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\t\tsortListActual.push(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t\t}\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((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\tthis.setColumnHeaderSortIcon(column, \"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 === \"asc\" ? \"ascending\" : \"descending\");\r\n\t\tthis.setColumnHeaderSortIcon(column, dir);\r\n\t}\r\n\r\n\tsetColumnHeaderSortIcon(column, dir){\r\n\t\tvar sortEl = column.modules.sort.element,\r\n\t\tarrowEl;\r\n\r\n\t\tif(column.definition.headerSort && typeof this.table.options.headerSortElement === \"function\"){\r\n\t\t\twhile(sortEl.firstChild) sortEl.removeChild(sortEl.firstChild);\r\n\r\n\t\t\tarrowEl = this.table.options.headerSortElement.call(this.table, column.getComponent(), dir);\r\n\t\t\t\r\n\t\t\tif(typeof arrowEl === \"object\"){\r\n\t\t\t\tsortEl.appendChild(arrowEl);\r\n\t\t\t}else{\r\n\t\t\t\tsortEl.innerHTML = arrowEl;\r\n\t\t\t}\r\n\t\t}\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;\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;","import Module from '../../core/Module.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nclass Tooltip extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.tooltipSubscriber = null,\r\n\t\tthis.headerSubscriber = null,\r\n\t\t\r\n\t\tthis.timeout = null;\r\n\t\tthis.popupInstance = null;\r\n\t\t\r\n\t\tthis.registerTableOption(\"tooltipGenerationMode\", undefined); //deprecated\r\n\t\tthis.registerTableOption(\"tooltipDelay\", 300); \r\n\t\t\r\n\t\tthis.registerColumnOption(\"tooltip\");\r\n\t\tthis.registerColumnOption(\"headerTooltip\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.deprecatedOptionsCheck();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tdeprecatedOptionsCheck(){\r\n\t\tthis.deprecationCheckMsg(\"tooltipGenerationMode\", \"This option is no longer needed as tooltips are always generated on hover now\");\r\n\t}\t\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.headerTooltip && !this.headerSubscriber){\r\n\t\t\tthis.headerSubscriber = true;\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-mousemove\", this.mousemoveCheck.bind(this, \"headerTooltip\"));\r\n\t\t\tthis.subscribe(\"column-mouseout\", this.mouseoutCheck.bind(this, \"headerTooltip\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition.tooltip && !this.tooltipSubscriber){\r\n\t\t\tthis.tooltipSubscriber = true;\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-mousemove\", this.mousemoveCheck.bind(this, \"tooltip\"));\r\n\t\t\tthis.subscribe(\"cell-mouseout\", this.mouseoutCheck.bind(this, \"tooltip\"));\r\n\t\t}\r\n\t}\r\n\t\r\n\tmousemoveCheck(action, e, component){\r\n\t\tvar tooltip = action === \"tooltip\" ? component.column.definition.tooltip : component.definition.headerTooltip;\r\n\t\t\r\n\t\tif(tooltip){\r\n\t\t\tthis.clearPopup();\r\n\t\t\tthis.timeout = setTimeout(this.loadTooltip.bind(this, e, component, tooltip), this.table.options.tooltipDelay);\r\n\t\t}\r\n\t}\r\n\r\n\tmouseoutCheck(action, e, component){\r\n\t\tif(!this.popupInstance){\r\n\t\t\tthis.clearPopup();\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearPopup(action, e, component){\r\n\t\tclearTimeout(this.timeout);\r\n\t\tthis.timeout = null;\r\n\t\t\r\n\t\tif(this.popupInstance){\r\n\t\t\tthis.popupInstance.hide();\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadTooltip(e, component, tooltip){\r\n\t\tvar contentsEl, renderedCallback, coords;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trenderedCallback = callback;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof tooltip === \"function\"){\r\n\t\t\ttooltip = tooltip(e, component.getComponent(), onRendered);\r\n\t\t}\r\n\t\t\r\n\t\tif(tooltip instanceof HTMLElement){\r\n\t\t\tcontentsEl = tooltip;\r\n\t\t}else{\r\n\t\t\tcontentsEl = document.createElement(\"div\");\r\n\t\t\t\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(component instanceof Cell){\r\n\t\t\t\t\ttooltip = component.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(component.definition.field){\r\n\t\t\t\t\t\tthis.langBind(\"columns|\" + component.definition.field, (value) => {\r\n\t\t\t\t\t\t\tcontentsEl.innerHTML = tooltip = value || component.definition.title;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\ttooltip = component.definition.title;\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\tcontentsEl.innerHTML = tooltip;\r\n\t\t}\r\n\t\t\r\n\t\tif(tooltip || tooltip === 0 || tooltip === false){\r\n\t\t\tcontentsEl.classList.add(\"tabulator-tooltip\");\r\n\r\n\t\t\tcontentsEl.addEventListener(\"mousemove\", e => e.preventDefault());\r\n\t\t\t\r\n\t\t\tthis.popupInstance = this.popup(contentsEl);\r\n\t\t\t\r\n\t\t\tif(typeof renderedCallback === \"function\"){\r\n\t\t\t\tthis.popupInstance.renderCallback(renderedCallback);\r\n\t\t\t}\r\n\r\n\t\t\tcoords = this.popupInstance.containerEventCoords(e);\r\n\t\t\t\r\n\t\t\tthis.popupInstance.show(coords.x + 15, coords.y + 15).hideOnBlur(() => {\r\n\t\t\t\tthis.dispatchExternal(\"TooltipClosed\", component.getComponent());\r\n\t\t\t\tthis.popupInstance = null;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"TooltipOpened\", component.getComponent());\r\n\t\t}\r\n\t}\r\n}\r\n\r\nTooltip.moduleName = \"tooltip\";\r\n\r\nexport default Tooltip;\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\r\n\t\tvalue = Number(value);\r\n\r\n\t\treturn !isNaN(value) && 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\t\r\n\t\tvalue = Number(value);\r\n\r\n\t\treturn !isNaN(value) && 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\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn 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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.invalidCells = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\t\t\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\t\t\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\t\t\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\t\t\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\t\r\n\t\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\t\r\n\t\tthis.subscribe(\"edit-success\", this.editValidate.bind(this));\r\n\t\tthis.subscribe(\"edit-editor-clear\", this.editorClear.bind(this));\r\n\t\tthis.subscribe(\"edit-edited-clear\", this.editedClear.bind(this));\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Event Handling //////////\r\n\t///////////////////////////////////\r\n\t\r\n\teditValidate(cell, value, previousValue){\r\n\t\tvar valid = this.table.options.validationMode !== \"manual\" ? this.validate(cell.column.modules.validate, cell, value) : true;\r\n\t\t\r\n\t\t// allow time for editor to make render changes then style cell\r\n\t\tif(valid !== true){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\tthis.dispatchExternal(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn valid;\r\n\t}\r\n\t\r\n\teditorClear(cell, cancelled){\r\n\t\tif(cancelled){\r\n\t\t\tif(cell.column.modules.validate){\r\n\t\t\t\tthis.cellValidate(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t}\r\n\t\r\n\teditedClear(cell){\r\n\t\tif(cell.modules.validate){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? (cell.modules.validate.invalid || true) : true;\r\n\t}\r\n\t\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(this.cellValidate(cell) !== true){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\t\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\t\t\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(this.cellValidate(cell) !== true){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\t\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\t\t\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\t\t\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\t\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\t\t\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\t\t\t\r\n\t\t\tvar valid = row.validate();\r\n\t\t\t\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\t\t\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\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\t\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\t\t\r\n\t\tif(column.definition.validator){\r\n\t\t\t\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\t\t\t\t\t\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\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\t\t\t\t\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\t\t\t\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\t\t\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tpos = value.indexOf(':');\r\n\t\t\t\r\n\t\t\t\tif(pos > -1){\r\n\t\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttype = value;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\treturn this._buildValidator(type, params);\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\treturn this._buildValidator(value);\r\n\t\t\t\r\n\t\t\tcase \"object\":\r\n\t\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_buildValidator(type, params){\r\n\t\t\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\t\t\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\t\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tfailedValidators = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\t\t\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\tfailedValidators.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\t\t\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\t\t\r\n\t\tif(!failedValidators.length){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t\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 = failedValidators;\r\n\t\t\t\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\t\t\t\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\t\t\r\n\t\treturn failedValidators.length ? failedValidators : true;\r\n\t}\r\n\t\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\t\t\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\t\t\t\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\t\t\t\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;\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;"],"names":["defaultOptions","RendererVirtualDomHorizontal","RendererBasicHorizontal","RendererVirtualDomVertical","RendererBasicVertical","InteractionMonitor","generateParamsList","defaultURLGenerator","List","Edit","html","textarea","tickCross","datetime","star","progress","csv","json","array","Popup","number","date","time"],"mappings":";;;;;;;AAAA,sBAAe;AACf;CACA,CAAC,mBAAmB,CAAC,KAAK;CA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G,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;CACpC,GAAG,CAAC,CAAC;CACL;CACA,EAAE,OAAO,MAAM,CAAC;CAChB,EAAE;CACF;CACA,CAAC,eAAe,CAAC,IAAI,CAAC;CACtB,EAAE,IAAI,YAAY,CAAC;CACnB;CACA,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;CAC5D;CACA,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC;CACnE,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC;CACzC;CACA,GAAG,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;CAClD;CACA,GAAG,GAAG,YAAY,GAAG,CAAC,CAAC,CAAC;CACxB,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;CAC9C,IAAI;CACJ,GAAG;CACH,EAAE;CACF,CAAC;AACD;CACA,QAAQ,CAAC,UAAU,GAAG,UAAU,CAAC;AACjC;CACA;CACA,QAAQ,CAAC,UAAU,GAAG,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CC9SvC;AAIA;CACA,MAAM,aAAa,SAAS,SAAS,CAAC,EAAE;AACxC;CACA;CACA,IAAI,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC;;;;"} \ 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/DeprecationAdvisor.js","../../src/js/core/tools/TableRegistry.js","../../src/js/core/tools/Popup.js","../../src/js/core/Module.js","../../src/js/modules/Layout/defaults/modes/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/tools/Alert.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/date.js","../../src/js/modules/Edit/defaults/editors/time.js","../../src/js/modules/Edit/defaults/editors/datetime.js","../../src/js/modules/Edit/List.js","../../src/js/modules/Edit/defaults/editors/select.js","../../src/js/modules/Edit/defaults/editors/list.js","../../src/js/modules/Edit/defaults/editors/autocomplete.js","../../src/js/modules/Edit/defaults/editors/star.js","../../src/js/modules/Edit/defaults/editors/progress.js","../../src/js/modules/Edit/defaults/editors/tickCross.js","../../src/js/modules/Edit/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/array.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/Popup/Popup.js","../../src/js/modules/Print/Print.js","../../src/js/modules/ReactiveData/ReactiveData.js","../../src/js/modules/ResizeColumns/ResizeColumns.js","../../src/js/modules/ResizeRows/ResizeRows.js","../../src/js/modules/ResizeTable/ResizeTable.js","../../src/js/modules/ResponsiveLayout/ResponsiveLayout.js","../../src/js/modules/SelectRow/SelectRow.js","../../src/js/modules/Sort/defaults/sorters/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/Tooltip/Tooltip.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\tdebugInvalidComponentFuncs:true, //allow toggling of invalid component warnings\r\n\tdebugInitialization:true, //allow toggling of pre initialization function call warnings\r\n\tdebugDeprecation:true, //allow toggling of deprecation 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\tpopupContainer:false,\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\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\trowHeight: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, columnsChanged){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent, columnsChanged);\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(force){\r\n\t\treturn this.table.modules.layout.layout(force);\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\t//////////////////////////////////////////\r\n\t/////////// Deprecation Checks ///////////\r\n\t//////////////////////////////////////////\r\n\r\n\tdeprecationCheck(oldOption, newOption){\r\n\t\treturn this.table.deprecationAdvisor.check(oldOption, newOption);\r\n\t}\r\n\r\n\tdeprecationCheckMsg(oldOption, msg){\r\n\t\treturn this.table.deprecationAdvisor.checkMsg(oldOption, msg);\r\n\t}\r\n\r\n\tdeprecationMsg(msg){\r\n\t\treturn this.table.deprecationAdvisor.msg(msg);\r\n\t}\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.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\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"headerWordWrap\": false,\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}\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\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\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\t\tif(val != null){\r\n\t\t\t\t\t\tconsole.warn(\"Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", val);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\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//////////////////// 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, force){\r\n\t\tvar changed = this.setValueProcessData(value, mutate, force);\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, force){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value || force){\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\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\r\n\t\tthis.dispatch(\"cell-height\", this, \"\");\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\r\n\t\tthis.dispatch(\"cell-height\", this, 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}\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.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 pre-styled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum pre-styled 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 pre-styled 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\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\tswitch(this.table.options.columnHeaderVertAlign){\r\n\t\t\tcase \"middle\":\r\n\t\t\t\tel.style.justifyContent = \"center\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"bottom\":\r\n\t\t\t\tel.style.justifyContent = \"flex-end\";\r\n\t\t\t\tbreak;\r\n\t\t}\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//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._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.dispatch(\"column-init\", this);\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\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//assign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classNames = def.cssClass.split(\" \");\r\n\t\t\tclassNames.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 horizontal 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 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\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\t\t\r\n\t\tif(def.headerWordWrap){\r\n\t\t\ttitleHolderElement.classList.add(\"tabulator-col-title-wrap\");\r\n\t\t}\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\t\tif(contents instanceof Node){\r\n\t\t\t\t\tel.appendChild(contents);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.innerHTML = \"\";\r\n\t\t\t\t\tconsole.warn(\"Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", contents);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\t\tel.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\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 classNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclassNames.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\r\n\t\t\tcolumn.columnRendered();\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\tthis.dispatch(\"column-height\", this, this.element.style.height);\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\t// if(!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 alignment\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\r\n\t\tthis.dispatch(\"column-height\", this, \"\");\r\n\t}\r\n\r\n\t//// Retrieve 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 column 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(traverse){\r\n\t\tvar columns = [];\r\n\r\n\t\tif(traverse){\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumns.push(column);\r\n\t\t\t\t\t\r\n\t\t\t\tcolumns = columns.concat(column.getColumns(true));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumns = this.columns;\r\n\t\t}\r\n\t\t\r\n\t\treturn 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//retrieve 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.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.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\tif(this.maxWidth && minWidth > this.maxWidth){\r\n\t\t\tminWidth = this.maxWidth;\r\n\r\n\t\t\tconsole.warn(\"the minWidth (\"+ minWidth + \"px) for column '\" + this.field + \"' cannot be bigger that its maxWidth (\"+ this.maxWidthStyled + \")\");\r\n\t\t}\r\n\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\tif(this.minWidth && maxWidth < this.minWidth){\r\n\t\t\tmaxWidth = this.minWidth;\r\n\r\n\t\t\tconsole.warn(\"the maxWidth (\"+ maxWidth + \"px) for column '\" + this.field + \"' cannot be smaller that its minWidth (\"+ this.minWidthStyled + \")\");\r\n\t\t}\r\n\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\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.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\r\n\t\tthis.dispatch(\"column-rendered\", this);\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\t.then((column) => {\r\n\r\n\t\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\t\tthis.field = false; //clear field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\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;\r\n","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 (let 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 (let 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 determine how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the container 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 scrolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has resized, 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, return 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\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"top\":\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = rowEl.offsetTop;\t\t\t\t\t\r\n\t\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\n\r\nexport default class BasicHorizontal 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\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\t\t\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(){\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}\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}\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}\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\t\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\t\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\t\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\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\twidth;\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tif(!column.modules.frozen){\t\t\t\r\n\t\t\t\t\twidth = column.getWidth();\r\n\r\n\t\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\t\r\n\t\t\t\t\tconfig.width = width;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// column is hidden\r\n\t\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\t\tthis.vDomPadRight += width;\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.columns.push(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcolPos += width;\r\n\t\t\t\t}\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\trow, 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 && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\r\n\t\t\t\trow = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t})[0];\r\n\t\t\t\t\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(let colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rerenderColumns(false, true);\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 visibleRows = this.getVisibleRows(),\r\n\t\totherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\r\n\r\n\t\tvisibleRows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\r\n\t\totherRows.forEach((row) =>{\r\n\t\t\trow.deinitialize();\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\t\t\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\t\t\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\r\n\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().insertBefore(cell.getElement(), row.getCell(this.columns[this.rightCol]).getElement().nextSibling);\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\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\trow.modules.vdomHoz.rightCol = this.rightCol;\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(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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\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().insertBefore(cell.getElement(), row.getCell(this.columns[this.leftCol]).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\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\trow.modules.vdomHoz.leftCol = this.leftCol;\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(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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\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\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\trow.modules.vdomHoz.rightCol = this.rightCol;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\r\n\t\twhile(working){\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\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\trow.modules.vdomHoz.leftCol = this.leftCol;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\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\r\n\t\t\tif(this.table.modules.frozenColumns){\r\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((column) => {\r\n\t\t\t\t\tthis.appendCell(row, column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tthis.appendCell(row, this.columns[i]);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.frozenColumns){\r\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((column) => {\r\n\t\t\t\t\tthis.appendCell(row, column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tappendCell(row, column){\r\n\t\tif(column && column.visible){\r\n\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\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\t\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\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\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.contentsElement = 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\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockUpdate = null; //store latest redraw update only status\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\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.contentsElement = this.createHeaderContentsElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\t\t\r\n\t\tthis.contentsElement.insertBefore(this.headersElement, this.contentsElement.firstChild);\r\n\t\tthis.element.insertBefore(this.contentsElement, this.element.firstChild);\r\n\t\t\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"scrollbar-vertical\", this.padVerticalScrollbar.bind(this));\r\n\t}\r\n\r\n\tpadVerticalScrollbar(width){\r\n\t\tif(this.table.rtl){\r\n\t\t\tthis.headersElement.style.marginLeft = width + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.headersElement.style.marginRight = width + \"px\";\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\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\t\t\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\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}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", this.table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderContentsElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-header-contents\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\t\t\r\n\t\treturn el;\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\r\n\t//return containing contents element\r\n\tgetContentsElement(){\r\n\t\treturn this.contentsElement;\r\n\t}\r\n\t\r\n\t\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\t\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tthis.contentsElement.scrollLeft = left;\r\n\r\n\t\tthis.scrollLeft = left;\r\n\t\t\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\t\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\t\t\r\n\t\tif(data && data.length){\r\n\t\t\t\r\n\t\t\trow = data[0];\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tlet value = row[key];\r\n\t\t\t\t\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\t\tsorter = \"array\";\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\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t\t}else{\r\n\t\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\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcol.sorter = sorter;\r\n\t\t\t\t\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(definitions){\r\n\t\t\t\t\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\t\tObject.assign(col, 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\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\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\t\r\n\t\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\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\t\t\t\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\t\t\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\t\t\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\t\t\r\n\t\tthis._reIndexColumns();\r\n\t\t\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\t\t\r\n\t\tthis.rerenderColumns(false, true);\r\n\t\t\r\n\t\tthis.redraw(true);\r\n\t}\r\n\t\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\t\t\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\t\t\t\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\t\t\r\n\t\tcolumn.columnRendered();\r\n\t\t\r\n\t\treturn column;\r\n\t}\r\n\t\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\t\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\t\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\t\t\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\t\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\t\t\r\n\t\tif(!this.redrawBlock){\r\n\r\n\t\t\tthis.headersElement.style.height=\"\";\r\n\t\t\t\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumn.clearVerticalAlign();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tvar height = column.getHeight();\r\n\t\t\t\t\r\n\t\t\t\tif(height > minHeight){\r\n\t\t\t\t\tminHeight = height;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.headersElement.style.height = minHeight + \"px\";\r\n\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tvar columns;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\t\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\r\n\t\t\t\tcolumns = [];\r\n\r\n\t\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\t\tcolumns.push(column);\r\n\t\t\t\t\tcolumns = columns.concat(column.getColumns(true));\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = columns.find((column) => {\r\n\t\t\t\t\treturn column.element === 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\t\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\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\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\t\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\t\t\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\t\t\r\n\t\treturn matches;\r\n\t}\r\n\t\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\t\r\n\tgetFirstVisibleColumn(){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\t\t\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\t\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\t\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\t\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\t\r\n\t//traverse 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\t\r\n\t//get definitions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\t\t\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\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\t\t\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\t\t\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\t\t\r\n\t\treturn width;\r\n\t}\r\n\t\r\n\tmoveColumn(from, to, after){\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\t\t\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\t\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\t\t\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\t\t\r\n\t\tthis.rerenderColumns(true);\r\n\t\t\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\t\t\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\t\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\t\t\r\n\t\tif (fromIndex > -1) {\r\n\t\t\t\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\t\t\t\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\t\t\t\r\n\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\t\t\t\r\n\t\t\tif(updateRows){\r\n\t\t\t\t\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\t\t\t\t\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\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\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\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\t\t\t\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\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\t\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\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\t\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\t\t\t\t\t\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\t\t\t\t\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\t\t\t\t\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\t\t\t\t\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\t\t\t\t\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\t\t\t\r\n\t\t});\r\n\t}\r\n\t\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\t\t\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\t\t\r\n\t\treturn cells;\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\t\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\t\t\t\t\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn fixedWidth;\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis._reIndexColumns();\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\t\t\t\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.redraw(true);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t\t\r\n\t\t\tthis.rerenderColumns();\r\n\t\t\t\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\t\t\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\t\t\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.verticalAlignHeaders();\r\n\t\t\r\n\t\tthis.redraw();\r\n\t}\r\n\t\r\n\trerenderColumns(update, silent){\r\n\t\tif(!this.redrawBlock){\r\n\t\t\tthis.renderer.rerenderColumns(update, silent);\r\n\t\t}else{\r\n\t\t\tif(update === false || (update === true && this.redrawBlockUpdate === null)){\r\n\t\t\t\tthis.redrawBlockUpdate = update;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockRedraw(){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockUpdate = null;\r\n\t}\r\n\t\r\n\trestoreRedraw(){\r\n\t\tthis.redrawBlock = false;\r\n\t\tthis.verticalAlignHeaders();\r\n\t\tthis.renderer.rerenderColumns(this.redrawBlockUpdate);\r\n\t\t\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh(force);\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\t\t\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(){\r\n\t\treturn this._row.getPosition();\r\n\t}\r\n\r\n\twatchPosition(callback){\r\n\t\treturn this._row.watchPosition(callback);\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\t\t\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 pre-styled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //hold elements 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\t\tthis.position = 0; //store position of element in row list\r\n\t\tthis.positionWatchers = [];\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.created = false;\r\n\t\t\r\n\t\tthis.setData(data);\r\n\t}\r\n\t\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\t\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\t\t\r\n\t\tthis.element = el;\r\n\t}\r\n\t\r\n\tgetElement(){\r\n\t\tthis.create();\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\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\t\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\t\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\t\t\r\n\t\tif(!this.initialized || force){\r\n\t\t\t\r\n\t\t\tthis.deleteCells();\r\n\t\t\t\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\t\t\t\r\n\t\t\tthis.generateCells();\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t\t\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\t\t\t\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\t\t\t\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\t\t\t\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\t\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t\t\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\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\t\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\t\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\t\t\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\t\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight;\r\n\t\t\r\n\t\tif(this.table.options.rowHeight){\r\n\t\t\tthis.height = this.table.options.rowHeight;\r\n\t\t}else{\r\n\t\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\t\t\t\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tvar height = cell.getHeight();\r\n\t\t\t\tif(height > maxHeight){\r\n\t\t\t\t\tmaxHeight = height;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(force){\r\n\t\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t\t}else{\r\n\t\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\t\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\t\t\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\t\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\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force && !this.table.options.rowHeight){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\t\t\r\n\t\tthis.calcHeight(force);\r\n\t\t\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\t\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\t\t\t\r\n\t\t\tthis.manualHeight = true;\r\n\t\t\t\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\t\t\t\r\n\t\t\tthis.setCellHeight();\r\n\t\t\t\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\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\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\t\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\t\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\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\t\t\t\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\t\t\t\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\t\t\t\r\n\t\t\t//set data\r\n\t\t\tfor (let attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\t\t\t\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (let attrname in updatedData) {\r\n\t\t\t\t\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\t\t\t\t\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\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\t\t\t\t\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\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\t\t\t\r\n\t\t\t//this.reinitialize();\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\t\t\t\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\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\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\t\t\r\n\t\treturn this.data;\r\n\t}\r\n\t\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\t\t\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\t\t\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\t\t\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\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\t\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\t\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\t\t\r\n\t\treturn this.cells;\r\n\t}\r\n\t\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\t\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\t\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\t\t\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\t\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\t\t\r\n\t\tthis.deleteActual();\r\n\t\t\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\t\r\n\tdeleteActual(blockRedraw){\r\n\t\tthis.detachModules();\r\n\t\t\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\t\t\r\n\t\tthis.deleteCells();\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\t\t\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\t\r\n\tdetachModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\t\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\t\t\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\t\r\n\twipe(){\r\n\t\tthis.detachModules();\r\n\t\tthis.deleteCells();\r\n\t\t\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\t\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\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tisDisplayed(){\r\n\t\treturn this.table.rowManager.getDisplayRows().includes(this);\r\n\t}\r\n\r\n\tgetPosition(){\r\n\t\treturn this.isDisplayed() ? this.position : false;\r\n\t}\r\n\r\n\tsetPosition(position){\r\n\t\tif(position != this.position){\r\n\t\t\tthis.position = position;\r\n\r\n\t\t\tthis.positionWatchers.forEach((callback) => {\r\n\t\t\t\tcallback(this.position);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchPosition(callback){\r\n\t\tthis.positionWatchers.push(callback);\r\n\r\n\t\tcallback(this.position);\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\t\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\t\t\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 BasicVertical 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 position 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\tif(this.rows().length){\r\n\t\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\t\t}else{\r\n\t\t\tthis.clear();\r\n\t\t\tthis.table.rowManager._showPlaceholder();\r\n\t\t}\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 row height 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\t\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t\t}\r\n\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\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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.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\r\n\t\tthis.scrollbarWidth = 0;\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\t// el.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\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\t\t\t\t\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}else if(subject === null){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\"){\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){\r\n\t\treturn this.getDisplayRows().find((row) => {\r\n\t\t\treturn row.getPosition() === position && row.isDisplayed();\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.regenerateRowPositions();\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 rows = [];\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\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.regenerateRowPositions();\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.regenerateRowPositions();\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\t\r\n\t\tif(!this.table.destroyed){\r\n\t\t\tif(typeof handler === \"function\"){\r\n\t\t\t\tindex = this.dataPipeline.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 = \"dataPipeline\";\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.dataPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"display\";\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\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(index > -1){\r\n\t\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tindex++;\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.error(\"Unable to refresh data, invalid handler provided\", handler);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tstage = handler || \"all\";\r\n\t\t\t\tindex = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.redrawBlock){\r\n\t\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\t\thandler: handler,\r\n\t\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\t\tstage:stage,\r\n\t\t\t\t\t\tindex:index,\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t}else{\r\n\t\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\t\tthis.table.columnManager.redraw(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\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t\t}\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 all data needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\t\tindex = 0;\r\n\t\t\t\tthis.resetDisplayRows();\r\n\t\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\r\n\t\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t\t\tthis.regenerateRowPositions();\r\n\t\t}\r\n\r\n\t\tif(this.getDisplayRows().length){\r\n\t\t\tthis._clearPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row positions\r\n\tregenerateRowPositions(){\r\n\t\tvar rows = this.getDisplayRows();\r\n\t\tvar index = 1;\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tif (row.type === \"row\"){\r\n\t\t\t\trow.setPosition(index);\r\n\t\t\t\tindex++;\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\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\tthis.displayRows[index] = displayRows;\r\n\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}\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 across 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\r\n\t\tif(!type || type === true){\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}else{\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\t\trows = this.activeRows;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"display\":\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\t\t\tbreak;\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\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.dispatchExternal(\"renderStarted\");\r\n\t\t\t\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\r\n\t\t\tif(!this.fixedHeight){\r\n\t\t\t\tthis.adjustTableSize();\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollBarCheck();\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tscrollBarCheck(){\r\n\t\tvar scrollbarWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(this.element.scrollHeight > this.element.clientHeight){\r\n\t\t\tscrollbarWidth = this.element.offsetWidth - this.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tif(scrollbarWidth !== this.scrollbarWidth){\r\n\t\t\tthis.scrollbarWidth = scrollbarWidth;\r\n\t\t\tthis.dispatch(\"scrollbar-vertical\", scrollbarWidth);\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.renderMode = this.table.options.renderVertical;\r\n\t\t\t\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:\", this.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(true);\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\r\n\t\tthis.scrollBarCheck();\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(){\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\r\n\t\t// clear empty table placeholder min\r\n\t\tthis.tableElement.style.minWidth = \"\";\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, minHeight;\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\tminHeight = isNaN(this.table.options.minHeight) ? this.table.options.minHeight : this.table.options.minHeight + \"px\";\r\n\t\t\t\t\r\n\t\t\t\tthis.element.style.minHeight = 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\r\n\t\t\tthis.scrollBarCheck();\r\n\t\t}\r\n\t\t\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//reinitialize 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 left = 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}\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\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\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){\r\n\t\tthis.activate();\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){\r\n\t\tthis.activate();\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(){\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\t}\r\n\r\n\tredraw(){\r\n\t\tthis.dispatch(\"footer-redraw\");\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.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\"mouseup\",\r\n\t\t\t\"mousedown\",\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, this.pseudoTrackers[key].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\tif(!targets[this.componentMap[target]]){\r\n\t\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t\t}\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\tmatches = {},\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\ttarget = targets[key],\r\n\t\t\tpreviousTarget = 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\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\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\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\t\treturn row.getElement() === target;\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\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\t\ttargets[key] = 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\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t\t}\r\n\t\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\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\t\tif(matches[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\t\tcomponent = matches[\"row\"].findCell(target);\r\n\t\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\t\t\t\t\t\t\t\t\tconsole.warn(\"Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?\");\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\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\tmatches[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 matches;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\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\tif(this.table.options.debugInvalidComponentFuncs){\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\t}\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.requestOrder = 0; //prevent requests coming 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\r\n\tload(data, params, config, replace, silent, columnsChanged){\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.alertLoader();\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.clearAlert();\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, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\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.alertError();\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.clearAlert();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t\t.finally(() => {\r\n\t\t\t\t\tthis.loading = false;\r\n\t\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, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\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\talertLoader(){\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.table.alertManager.alert(this.table.options.dataLoaderLoading || this.langText(\"data|loading\"));\r\n\t\t}\r\n\t}\r\n\r\n\talertError(){\r\n\t\tthis.table.alertManager.alert(this.table.options.dataLoaderError || this.langText(\"data|error\"), \"error\");\r\n\t}\r\n\r\n\tclearAlert(){\r\n\t\tthis.table.alertManager.clear();\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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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_notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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_notifySubscriptionChange(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\tsubscriber.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 CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DeprecationAdvisor extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\t\r\n\t_warnUser(){\r\n\t\tif(this.options(\"debugDeprecation\")){\r\n\t\t\tconsole.warn(...arguments);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheck(oldOption, newOption){\r\n\t\tvar msg = \"\";\r\n\t\t\r\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\r\n\t\t\tmsg = \"Deprecated Setup Option - Use of the %c\" + oldOption + \"%c option is now deprecated\";\r\n\t\t\t\r\n\t\t\tif(newOption){\r\n\t\t\t\tmsg = msg + \", Please use the %c\" + newOption + \"%c option instead\";\r\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t}else{\r\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMsg(oldOption, msg){\r\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\r\n\t\t\tthis._warnUser(\"%cDeprecated Setup Option - Use of the %c\" + oldOption + \" %c option is now deprecated, \" + msg, 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tmsg(msg){\r\n\t\tthis._warnUser(msg);\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\nimport Helpers from './Helpers.js';\r\n\r\nexport default class Popup extends CoreFeature{\r\n\tconstructor(table, element, parent){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = element;\r\n\t\tthis.container = this._lookupContainer();\r\n\t\t\r\n\t\tthis.parent = parent;\r\n\t\t\r\n\t\tthis.reversedX = false;\r\n\t\tthis.childPopup = null;\r\n\t\tthis.blurable = false;\r\n\t\tthis.blurCallback = null;\r\n\t\tthis.blurEventsBound = false;\r\n\t\tthis.renderedCallback = null;\r\n\t\t\r\n\t\tthis.visible = false;\r\n\t\tthis.hideable = true;\r\n\t\t\r\n\t\tthis.element.classList.add(\"tabulator-popup-container\");\r\n\t\t\r\n\t\tthis.blurEvent = this.hide.bind(this, false);\r\n\t\tthis.escEvent = this._escapeCheck.bind(this);\r\n\t\t\r\n\t\tthis.destroyBinding = this.tableDestroyed;\r\n\t\tthis.destroyed = false;\r\n\t}\r\n\t\r\n\ttableDestroyed(){\r\n\t\tthis.destroyed = true;\r\n\t\tthis.hide(true);\r\n\t}\r\n\t\r\n\t_lookupContainer(){\r\n\t\tvar container = this.table.options.popupContainer;\r\n\t\t\r\n\t\tif(typeof container === \"string\"){\r\n\t\t\tcontainer = document.querySelector(container);\r\n\t\t\t\r\n\t\t\tif(!container){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.popupContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (container === true){\r\n\t\t\tcontainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(container && !this._checkContainerIsParent(container)){\r\n\t\t\tcontainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.popupContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!container){\r\n\t\t\tcontainer = document.body;\r\n\t\t}\r\n\t\t\r\n\t\treturn container;\r\n\t}\r\n\t\r\n\t_checkContainerIsParent(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._checkContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\trenderCallback(callback){\r\n\t\tthis.renderedCallback = callback;\r\n\t}\r\n\t\r\n\tcontainerEventCoords(e){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar x = touch ? e.touches[0].pageX : e.pageX;\r\n\t\tvar y = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\r\n\t\tif(this.container !== document.body){\r\n\t\t\tlet parentOffset = Helpers.elOffset(this.container);\r\n\t\t\t\r\n\t\t\tx -= parentOffset.left;\r\n\t\t\ty -= parentOffset.top;\r\n\t\t}\r\n\t\t\r\n\t\treturn {x, y};\r\n\t}\r\n\t\r\n\telementPositionCoords(element, position = \"right\"){\r\n\t\tvar offset = Helpers.elOffset(element),\r\n\t\tcontainerOffset, x, y;\r\n\t\t\r\n\t\tif(this.container !== document.body){\r\n\t\t\tcontainerOffset = Helpers.elOffset(this.container);\r\n\t\t\t\r\n\t\t\toffset.left -= containerOffset.left;\r\n\t\t\toffset.top -= containerOffset.top;\r\n\t\t}\r\n\t\t\r\n\t\tswitch(position){\r\n\t\t\tcase \"right\":\r\n\t\t\t\tx = offset.left + element.offsetWidth;\r\n\t\t\t\ty = offset.top - 1;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"bottom\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top + element.offsetHeight;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"left\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top - 1;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"top\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"center\":\r\n\t\t\t\tx = offset.left + (element.offsetWidth / 2);\r\n\t\t\t\ty = offset.top + (element.offsetHeight / 2);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn {x, y, offset};\r\n\t}\r\n\t\r\n\tshow(origin, position){\r\n\t\tvar x, y, parentEl, parentOffset, coords;\r\n\t\t\r\n\t\tif(this.destroyed || this.table.destroyed){\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\tif(origin instanceof HTMLElement){\r\n\t\t\tparentEl = origin;\r\n\t\t\tcoords = this.elementPositionCoords(origin, position);\r\n\t\t\t\r\n\t\t\tparentOffset = coords.offset;\r\n\t\t\tx = coords.x;\r\n\t\t\ty = coords.y;\r\n\t\t\t\r\n\t\t}else if(typeof origin === \"number\"){\r\n\t\t\tparentOffset = {top:0, left:0};\r\n\t\t\tx = origin;\r\n\t\t\ty = position;\r\n\t\t}else{\r\n\t\t\tcoords = this.containerEventCoords(origin);\r\n\t\t\t\r\n\t\t\tx = coords.x;\r\n\t\t\ty = coords.y;\r\n\t\t\t\r\n\t\t\tthis.reversedX = false;\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.style.top = y + \"px\";\r\n\t\tthis.element.style.left = x + \"px\";\r\n\t\t\r\n\t\tthis.container.appendChild(this.element);\r\n\t\t\r\n\t\tif(typeof this.renderedCallback === \"function\"){\r\n\t\t\tthis.renderedCallback();\r\n\t\t}\r\n\t\t\r\n\t\tthis._fitToScreen(x, y, parentEl, parentOffset, position);\r\n\t\t\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.destroyBinding);\r\n\t\t\r\n\t\tthis.element.addEventListener(\"mousedown\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\t_fitToScreen(x, y, parentEl, parentOffset, position){\r\n\t\tvar scrollTop = this.container === document.body ? document.documentElement.scrollTop : this.container.scrollTop;\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 + this.element.offsetWidth) >= this.container.offsetWidth || this.reversedX){\r\n\t\t\tthis.element.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.reversedX = 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 + this.element.offsetHeight) > Math.max(this.container.offsetHeight, scrollTop ? this.container.scrollHeight : 0)) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"bottom\":\r\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight - parentEl.offsetHeight - 1) + \"px\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisVisible(){\r\n\t\treturn this.visible;\r\n\t}\r\n\t\r\n\thideOnBlur(callback){\r\n\t\tthis.blurable = true;\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tif(this.visible){\r\n\t\t\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\t\t\tthis.subscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"mousedown\", this.blurEvent);\r\n\t\t\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\r\n\t\t\t\t\tthis.blurEventsBound = true;\r\n\t\t\t\t}\r\n\t\t\t}, 100);\r\n\t\t\t\r\n\t\t\tthis.blurCallback = callback;\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\t_escapeCheck(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockHide(){\r\n\t\tthis.hideable = false;\r\n\t}\r\n\t\r\n\trestoreHide(){\r\n\t\tthis.hideable = true;\r\n\t}\r\n\t\r\n\thide(silent = false){\r\n\t\tif(this.visible && this.hideable){\r\n\t\t\tif(this.blurable && this.blurEventsBound){\r\n\t\t\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"mousedown\", this.blurEvent);\r\n\t\t\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\t\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\t\t\tthis.unsubscribe(\"cell-editing\", this.blurEvent);\r\n\r\n\t\t\t\tthis.blurEventsBound = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.childPopup){\r\n\t\t\t\tthis.childPopup.hide();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.childPopup = null;\r\n\t\t\t}\r\n\t\t\t\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\t\r\n\t\t\tthis.visible = false;\r\n\t\t\t\r\n\t\t\tif(this.blurCallback && !silent){\r\n\t\t\t\tthis.blurCallback();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.unsubscribe(\"table-destroy\", this.destroyBinding);\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\tchild(element){\r\n\t\tif(this.childPopup){\r\n\t\t\tthis.childPopup.hide();\r\n\t\t}\r\n\t\t\r\n\t\tthis.childPopup = new Popup(this.table, element, this);\r\n\t\t\r\n\t\treturn this.childPopup;\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Popup from './tools/Popup.js';\r\n\r\nclass Module extends CoreFeature{\r\n\t\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis._handler = null;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overridden in module\r\n\t}\r\n\t\r\n\t\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\t\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\t\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t/// Public Function Registration ///\r\n\t///////////////////////////////////\r\n\t\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = (...args) => {\r\n\t\t\t\tthis.table.initGuard(name);\r\n\t\t\t\t\r\n\t\t\t\treturn func(...args);\r\n\t\t\t};\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\t\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\t\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\t\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\t\r\n\tdisplayRows(adjust){\r\n\t\tvar index = this.table.rowManager.displayRows.length - 1, \r\n\t\tlookupIndex;\r\n\t\t\r\n\t\tif(this._handler){\r\n\t\t\tlookupIndex = this.table.rowManager.displayPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === this._handler;\r\n\t\t\t});\r\n\r\n\t\t\tif(lookupIndex > -1){\r\n\t\t\t\tindex = lookupIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(adjust){\r\n\t\t\tindex = index + adjust;\r\n\t\t}\r\n\r\n\t\tif(this._handler){\r\n\t\t\tif(index > -1){\r\n\t\t\t\treturn this.table.rowManager.getDisplayRows(index);\r\n\t\t\t}else{\r\n\t\t\t\treturn this.activeRows();\r\n\t\t\t}\r\n\t\t}\t\r\n\t}\r\n\t\r\n\tactiveRows(){\r\n\t\treturn this.table.rowManager.activeRows;\r\n\t}\r\n\t\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\t\t\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\t\r\n\t///////////////////////////////////\r\n\t//////// Footer Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tfooterAppend(element){\r\n\t\treturn this.table.footerManager.append(element);\r\n\t}\r\n\t\r\n\tfooterPrepend(element){\r\n\t\treturn this.table.footerManager.prepend(element);\r\n\t}\r\n\t\r\n\tfooterRemove(element){\r\n\t\treturn this.table.footerManager.remove(element);\r\n\t} \r\n\t\r\n\t///////////////////////////////////\r\n\t//////// Popups Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tpopup(menuEl, menuContainer){\r\n\t\treturn new Popup(this.table, menuEl, menuContainer);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t//////// Alert Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\talert(content, type){\r\n\t\treturn this.table.alertManager.alert(content, type);\r\n\t}\r\n\t\r\n\tclearAlert(){\r\n\t\treturn this.table.alertManager.clear();\r\n\t}\r\n\t\r\n}\r\n\r\nexport default Module;","//resize columns to fit data they contain\r\nexport default function(columns, forced){\r\n\tif(forced){\r\n\t\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\t}\r\n\t\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, forced){\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, forced){\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, forced){\r\n\tvar totalWidth = this.table.rowManager.element.getBoundingClientRect().width; //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 across 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 across 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\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 = 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\tgapFill = 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//calculate 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(gapFill && 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(dataChanged){\r\n\t\tthis.dispatch(\"layout-refreshing\");\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex, dataChanged);\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 placeholder\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 language 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//determining 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 fillPath = value ? path + \"|\" + value : path,\r\n\t\tpathArray = fillPath.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//iterate 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\t\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFunctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\t\t\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\t\r\n\tbindStaticFunctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\t\t\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\t\t\t\t\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\t\t\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\t\t\t\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\t\t\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\t\t\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\t\t\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedStartMods = [],\r\n\t\t\torderedEndMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\t\t\t\r\n\t\t\tthis.modules = {};\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.modules[name] = module;\r\n\t\t\t\t\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\tif(mod.moduleInitOrder < 0){\r\n\t\t\t\t\t\t\torderedStartMods.push(module);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\torderedEndMods.push(module);\r\n\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\tunOrderedMods.push(module);\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\torderedStartMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\t\t\torderedEndMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\t\t\t\r\n\t\t\tthis.modulesRegular = orderedStartMods.concat(unOrderedMods.concat(orderedEndMods));\r\n\t\t};\r\n\t}\r\n\t\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\t\t\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\t\t\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class Alert extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n \r\n\t\tthis.element = this._createAlertElement();\r\n\t\tthis.msgElement = this._createMsgElement();\r\n\t\tthis.type = null;\r\n \r\n\t\tthis.element.appendChild(this.msgElement);\r\n\t}\r\n \r\n\t_createAlertElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-alert\");\r\n\t\treturn el;\r\n\t}\r\n \r\n\t_createMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-alert-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\t\treturn el;\r\n\t}\r\n \r\n\t_typeClass(){\r\n\t\treturn \"tabulator-alert-state-\" + this.type;\r\n\t}\r\n \r\n\talert(content, type = \"msg\"){\r\n\t\tif(content){\r\n\t\t\tthis.clear();\r\n \r\n\t\t\tthis.type = type;\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.add(this._typeClass());\r\n \r\n\t\t\tif(typeof content === \"function\"){\r\n\t\t\t\tcontent = content();\r\n\t\t\t}\r\n \r\n\t\t\tif(content instanceof HTMLElement){\r\n\t\t\t\tthis.msgElement.appendChild(content);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = content;\r\n\t\t\t}\r\n \r\n\t\t\tthis.table.element.appendChild(this.element);\r\n\t\t}\r\n\t}\r\n \r\n\tclear(){\r\n\t\tif(this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n \r\n\t\tthis.msgElement.classList.remove(this._typeClass());\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 DeprecationAdvisor from './tools/DeprecationAdvisor.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\nimport Alert from './tools/Alert.js';\r\n\r\nclass Tabulator {\r\n\t\r\n\tconstructor(element, options){\r\n\t\t\r\n\t\tthis.options = {};\r\n\t\t\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.alertManager = null; //hold Alert 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\t\t\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\t\t\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\t\t\r\n\t\tthis.deprecationAdvisor = new DeprecationAdvisor(this);\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.destroyed = false;\r\n\t\t\r\n\t\tif(this.initializeElement(element)){\r\n\t\t\t\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\t\t\t\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\t\t\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\t\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\t\t\t\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\t\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\t\tthis.alertManager = new Alert(this);\r\n\t\t\r\n\t\tthis.bindModules();\r\n\t\t\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options);\r\n\t\t\r\n\t\tthis._clearObjectPointers();\r\n\t\t\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\t\t\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\t\t\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\t\t\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\t\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\t\r\n\t_clearSelection(){\r\n\t\t\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\tif (window.getSelection) {\r\n\t\t\tif (window.getSelection().empty) { // Chrome\r\n\t\t\t\twindow.getSelection().empty();\r\n\t\t\t} else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t}\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\t\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\t\t\r\n\t\tthis._rtlCheck();\r\n\t\t\r\n\t\tthis._buildElement();\r\n\t\t\r\n\t\tthis._initializeTable();\r\n\t\t\r\n\t\tthis._loadInitialData();\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\t\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\t\t\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"rtl\":\r\n\t\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\t\tthis.rtl = true;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"ltr\":\r\n\t\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\t\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\t\t\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\t\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\t\t\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\t\t\t\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\t\t\t\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\t\t\t\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\t\t\t\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\t\t\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\t\t\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\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\t\t\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\t\t\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\t\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\t\t\r\n\t\tthis.interactionMonitor.initialize();\r\n\t\t\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\t\t\r\n\t\tthis._detectBrowser();\r\n\t\t\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\t\t\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\t\t\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\t\t\r\n\t\tif(options.autoColumns && options.data){\r\n\t\t\t\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\t\t\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\t\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\t\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\t\t\r\n\t\tthis.destroyed = true;\r\n\t\t\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\t\t\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\t\t\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\t\t\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\t\t\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\r\n\t\tthis.externalEvents.dispatch(\"tableDestroyed\");\r\n\t}\r\n\t\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\t\t\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\t\t\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\t\r\n\tinitGuard(func, msg){\r\n\t\tvar stack, line;\r\n\t\t\r\n\t\tif(this.options.debugInitialization && !this.initialized){\r\n\t\t\tif(!func){\r\n\t\t\t\tstack = new Error().stack.split(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tline = stack[0] == \"Error\" ? stack[2] : stack[1];\r\n\t\t\t\t\r\n\t\t\t\tif(line[0] == \" \"){\r\n\t\t\t\t\tfunc = line.trim().split(\" \")[1].split(\".\")[1];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfunc = line.trim().split(\"@\")[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconsole.warn(\"Table Not Initialized - Calling the \" + func + \" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function.\" + (msg ? \" \" + msg : \"\"));\r\n\t\t}\r\n\t\t\r\n\t\treturn this.initialized;\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-blocking\");\r\n\t\t\r\n\t\tthis.rowManager.blockRedraw();\r\n\t\tthis.columnManager.blockRedraw();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-blocked\");\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-restoring\");\r\n\r\n\t\tthis.rowManager.restoreRedraw();\r\n\t\tthis.columnManager.restoreRedraw();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-restored\");\r\n\t}\r\n\t\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tthis.initGuard(false, \"To set initial data please use the 'data' property in the table constructor.\");\r\n\t\t\r\n\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t}\r\n\t\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\t\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\t\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\t\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t}\r\n\t\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data && data.length > 0){\r\n\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\tresponses++;\r\n\t\t\t\t\t\t\r\n\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\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}\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\taddData(data, pos, index){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data){\r\n\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\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data && data.length > 0){\r\n\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tresponses++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\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\t\t\t\t\t\t\t\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}else{\r\n\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\t\t\t\t\t\t\t\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}\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\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\t\r\n\t//get row object\r\n\tgetRowFromPosition(position){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position);\r\n\t\t\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\t\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\t\t\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\t\t\t\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}\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\t\t\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\t\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\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}\r\n\t\r\n\t//update a row if it exists otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t\t.then(()=>{\r\n\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t\t.then((rows)=>{\r\n\t\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t\t.then(()=>{\r\n\t\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\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\t\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\t\t\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\t\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\t\r\n\t}\r\n\t\r\n\t//get position of row in table\r\n\tgetRowPosition(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.getPosition();\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\t\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tthis.initGuard(false, \"To set initial columns please use the 'columns' property in the table constructor\");\r\n\t\t\r\n\t\tthis.columnManager.setColumns(definition);\r\n\t}\r\n\t\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\t\r\n\tgetColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tif(column){\r\n\t\t\treturn column.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\t\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\t\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field); \r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t\t.then((column) => {\r\n\t\t\t\treturn column.getComponent();\r\n\t\t\t});\r\n\t}\r\n\t\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from),\r\n\t\ttoColumn = this.columnManager.findColumn(to);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\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\t\t\t\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\t\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.columnManager.redraw(force);\r\n\t\tthis.rowManager.redraw(force);\r\n\t}\r\n\t\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\t\r\n\t//////////////////// Event Bus ///////////////////\r\n\t\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\t\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\t\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments);\r\n\t\targs.shift();\r\n\t\t\r\n\t\tthis.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\t//////////////////// Alerts ///////////////////\r\n\r\n\talert(contents, type){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.alertManager.alert(contents, type);\r\n\t}\r\n\r\n\tclearAlert(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.alertManager.clear();\r\n\t}\r\n\t\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\t\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\t\t\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\t\t\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 defaultAccessors 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\t\tif(Accessor.accessors[value]){\r\n\t\t\t\t\taccessor = Accessor.accessors[value];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\taccessor = value;\r\n\t\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, colComponent;\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\tcolComponent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colComponent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colComponent, 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 = defaultAccessors;\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\t.then((response)=>{\r\n\t\t\t\t\tif(response.ok) {\r\n\t\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\t\treject(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\t.catch((error)=>{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\t\treject(error);\r\n\t\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\t.then((data)=>{\r\n\t\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\treturn data;\r\n\t\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\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\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); //DEPRECATED - 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\tlist = 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.generateHTMLTable(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\t\tvalue = JSON.stringify(col.value);\r\n\t\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\t\tvalue = \"\";\r\n\t\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\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 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\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\t\tif(!this.pasteAction){\r\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tthis.pasteAction = action;\r\n\t\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\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\t\tif(!this.pasteParser){\r\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tthis.pasteParser = parser;\r\n\t\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\t\r\n\t\tthis.blocked = false;\r\n\t\tthis.recalcAfterBlock = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\t\t\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\t\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\t\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\t\t\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\t\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"redraw-blocked\", this.blockRedraw.bind(this));\r\n\t\tthis.subscribe(\"redraw-restored\", this.restoreRedraw.bind(this));\r\n\t\t\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\t\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t\t\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockRedraw(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.recalcAfterBlock = false;\r\n\t}\r\n\t\r\n\t\r\n\trestoreRedraw(){\r\n\t\tthis.blocked = false;\r\n\t\t\r\n\t\tif(this.recalcAfterBlock){\r\n\t\t\tthis.recalcAfterBlock = false;\r\n\t\t\tthis.recalcActiveRowsRefresh();\r\n\t\t}\r\n\t}\r\n\t\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\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tblockCheck(){\r\n\t\tif(this.blocked){\r\n\t\t\tthis.recalcAfterBlock = true;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.blocked;\r\n\t}\r\n\t\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\t\t\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(row);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\t\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\t\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\t\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\t\t\t\t\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\t\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\t\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\t\t\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\t\t\r\n\t\tif(def.topCalc){\r\n\t\t\t\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\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\tcase \"function\":\r\n\t\t\t\t\tconfig.topCalc = def.topCalc;\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(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\t\t\t\t\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\t\t\t\r\n\t\t}\r\n\t\t\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\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\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\tcase \"function\":\r\n\t\t\t\t\tconfig.botCalc = def.bottomCalc;\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(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\t\t\t\t\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\t\t\r\n\t}\r\n\t\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){}\r\n\t\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\t\t\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\t\t\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.footerRemove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getContentsElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.footerPrepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botElement.scrollLeft = left;\r\n\t\t}\r\n\t}\r\n\t\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\t\t\r\n\t\tif(!this.blockCheck()){\r\n\t\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\t\tdata = this.rowsToData(rows);\r\n\t\t\t\t\r\n\t\t\t\tif(this.topInitialized){\r\n\t\t\t\t\tif(this.topRow){\r\n\t\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trow = this.generateRow(\"top\", data);\r\n\t\t\t\t\tthis.topRow = row;\r\n\t\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\t\trow.initialize(true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(this.botInitialized){\r\n\t\t\t\t\tif(this.botRow){\r\n\t\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trow = this.generateRow(\"bottom\", data);\r\n\t\t\t\t\tthis.botRow = row;\r\n\t\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\t\trow.initialize(true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t\t\t\r\n\t\t\t\t//set resizable handles\r\n\t\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\t\t\t\t\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\t\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\t\t\r\n\t\tif(!this.blockCheck()){\r\n\t\t\tif(group){\r\n\t\t\t\tif(group.calcs){\r\n\t\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\t\tgroup.calcs.top.reinitialize();\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\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\t\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\t\t\t\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\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\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\t\t\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\t\t\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\t\t\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\t\t\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\t\t\r\n\t\trow.component = false;\r\n\t\t\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\t\t\t\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\t\t\r\n\t\trow.generateCells = () => {\r\n\t\t\t\r\n\t\t\tvar cells = [];\r\n\t\t\t\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\t\r\n\t\t\t\t//set field name of mock column\r\n\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\t\t\t\t\r\n\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//ensure css class definition is replicated to calculation cell\r\n\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\t\t\t\t\r\n\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\tcell.getElement();\r\n\t\t\t\tcell.column = column;\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t\t\r\n\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\tcells.push(cell);\r\n\t\t\t\t\r\n\t\t\t\tif(!column.visible){\r\n\t\t\t\t\tcell.hide();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\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\t\t\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\t\t\t\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\t\t\t\t\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\t\t\t\t\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\t\t\r\n\t\treturn rowData;\r\n\t}\r\n\t\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\t\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\t\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\t\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\t\t\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\t\t\t\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\t\t\r\n\t\treturn results;\r\n\t}\r\n\t\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\t\t\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\t\t\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\t\t\r\n\t\treturn results;\r\n\t}\r\n\t\r\n\tadjustForScrollbar(width){\r\n\t\tif(this.botRow){\r\n\t\t\tif(this.table.rtl){\r\n\t\t\t\tthis.botElement.style.paddingLeft = width + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.botElement.style.paddingRight = width + \"px\";\r\n\t\t\t}\r\n\t\t}\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\nimport RowComponent from '../../core/row/RowComponent.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.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);//selecting 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(this.options(\"movableRows\")){\r\n\t\t\t\tconsole.warn(\"The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior\");\r\n\t\t\t}\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\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t\t};\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t\t};\r\n\t\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\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedrawing.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\ttableRedrawing(force){\r\n\t\tvar rows;\r\n\r\n\t\tif(force){\r\n\t\t\trows = this.table.rowManager.getRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.reinitializeRowChildren(row);\r\n\t\t\t});\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\toldControl = config.controlEl;\r\n\r\n\t\tel = el || row.getCells()[0].getElement();\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\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\tgetTreeParentRoot(row){\r\n\t\treturn row.modules.dataTree && row.modules.dataTree.parent ? this.getTreeParentRoot(row.modules.dataTree.parent) : row;\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}else if(subject === null){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\"){\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.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\t\tconsole.warn(\"Download Warning - CSV 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 - CSV downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\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\r\n\t\t\t\t\tif(col){\r\n\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\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\r\n\t\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\t\tcol.value = \"\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(item.join(delimiter));\r\n\t\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}\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\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(item);\r\n\t\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.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\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\t\theader.push(parseRow(row));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\tbody.push(parseRow(row));\r\n\t\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\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\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.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.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n}\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\tcompression = 'compress' in options ? options.compress : true,\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\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary', compression });\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.generateHTMLTable(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(\"downloadEncoder\", function(data, mimeType){\r\n\t\t\treturn new Blob([data],{type:mimeType});\r\n\t\t}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadReady\", undefined); //warn of function deprecation\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.deprecatedOptionsCheck();\r\n\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\tdeprecatedOptionsCheck(){\r\n\t\tthis.deprecationCheck(\"downloadReady\", \"downloadEncoder\");\r\n\t}\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 = this.table.options.downloadEncoder(data, mime);\r\n\r\n\t\tif(blob){\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\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\t\t\t\t\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\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\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\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\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\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\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\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\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\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\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;\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\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"hybrid\",\r\n\tvalue = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n\tinput = document.createElement(\"textarea\"),\r\n\tscrollHeight = 0;\r\n\r\n\t//create and style input\r\n\tinput.style.display = \"block\";\r\n\tinput.style.padding = \"2px\";\r\n\tinput.style.height = \"100%\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.whiteSpace = \"pre-wrap\";\r\n\tinput.style.resize = \"none\";\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\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\tinput.scrollHeight;\r\n\t\tinput.style.height = input.scrollHeight + \"px\";\r\n\t\tcell.getRow().normalizeHeight();\r\n\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\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\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tcell.getRow().normalizeHeight();\r\n\t\t\t},300);\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\tinput.addEventListener(\"keyup\", function(){\r\n\r\n\t\tinput.style.height = \"\";\r\n\r\n\t\tvar heightNow = input.scrollHeight;\r\n\r\n\t\tinput.style.height = heightNow + \"px\";\r\n\r\n\t\tif(heightNow != scrollHeight){\r\n\t\t\tscrollHeight = heightNow;\r\n\t\t\tcell.getRow().normalizeHeight();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\r\n\t\t\tcase 13:\r\n\t\t\t\tif(e.shiftKey && editorParams.shiftEnterSubmit){\r\n\t\t\t\t\tonChange(e);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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//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\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\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\t\tonChange();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\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\t\tif(vertNav == \"editor\"){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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\t\tonChange();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null;\r\n\t\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tfunction convertDate(value){\r\n\t\tvar newDatetime;\r\n\t\t\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\r\n\t\t\r\n\t\treturn newDatetime.toFormat(\"yyyy-MM-dd\");\r\n\t}\r\n\t\r\n\tinput.type = \"date\";\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.max){\r\n\t\tinput.setAttribute(\"max\", inputFormat ? convertDate(editorParams.max) : editorParams.max);\r\n\t}\r\n\r\n\tif(editorParams.min){\r\n\t\tinput.setAttribute(\"min\", inputFormat ? convertDate(editorParams.min) : editorParams.min);\r\n\t}\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\t\t\r\n\t\t\tcellValue = convertDate(cellValue);\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\t\t\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\t\t\t\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromFormat(String(value), \"yyyy-MM-dd\").toFormat(inputFormat);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \r\n\tnewDatetime;\r\n\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tinput.type = \"time\";\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\r\n\t\t\tif(DT.isDateTime(cellValue)){\r\n\t\t\t\tnewDatetime = cellValue;\r\n\t\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\r\n\t\t\t}else{\r\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tcellValue = newDatetime.toFormat(\"hh:mm\");\r\n\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromFormat(String(value), \"hh:mm\").toFormat(inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \r\n\tnewDatetime;\r\n\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tinput.type = \"datetime-local\";\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\r\n\t\t\tif(DT.isDateTime(cellValue)){\r\n\t\t\t\tnewDatetime = cellValue;\r\n\t\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\r\n\t\t\t}else{\r\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tcellValue = newDatetime.toFormat(\"yyyy-MM-dd\") + \"T\" + newDatetime.toFormat(\"hh:mm\");\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromISO(String(value)).toFormat(inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","import maskInput from './inputMask.js';\r\nimport urlBuilder from '../Ajax/defaults/urlGenerator.js';\r\n\r\nexport default class Edit{\r\n\tconstructor(editor, cell, onRendered, success, cancel, editorParams){\r\n\t\tthis.edit = editor;\r\n\t\tthis.table = editor.table;\r\n\t\tthis.cell = cell;\r\n\t\tthis.params = this._initializeParams(editorParams);\r\n\t\t\r\n\t\tthis.data = [];\r\n\t\tthis.displayItems = [];\r\n\t\tthis.currentItems = [];\r\n\t\tthis.focusedItem = null;\r\n\t\t\r\n\t\tthis.input = this._createInputElement();\r\n\t\tthis.listEl = this._createListElement();\r\n\t\t\r\n\t\tthis.initialValues = null; \r\n\t\t\r\n\t\tthis.isFilter = !cell._getSelf;\r\n\t\t\r\n\t\tthis.filterTimeout = null;\r\n\t\tthis.filtered = false;\r\n\t\tthis.typing = false;\r\n\t\t\r\n\t\tthis.values = []; \r\n\t\tthis.popup = null; \r\n\t\t\r\n\t\tthis.listIteration = 0;\r\n\t\t\r\n\t\tthis.lastAction=\"\";\r\n\t\tthis.filterTerm=\"\";\r\n\t\t\r\n\t\tthis.blurable = true;\r\n\t\t\r\n\t\tthis.actions = {\r\n\t\t\tsuccess:success,\r\n\t\t\tcancel:cancel\r\n\t\t};\r\n\t\t\r\n\t\tthis._deprecatedOptionsCheck();\r\n\t\tthis._initializeValue();\r\n\t\t\r\n\t\tonRendered(this._onRendered.bind(this));\r\n\t}\r\n\t\r\n\t_deprecatedOptionsCheck(){\r\n\t\tif(this.params.listItemFormatter){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.sortValuesList){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.searchFunc){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.searchingPlaceholder){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t_initializeValue(){\r\n\t\tvar initialValue = this.cell.getValue();\r\n\t\t\r\n\t\tif(typeof initialValue === \"undefined\" && typeof this.params.defaultValue !== \"undefined\"){\r\n\t\t\tinitialValue = this.params.defaultValue;\r\n\t\t}\r\n\t\t\r\n\t\tthis.initialValues = this.params.multiselect ? initialValue : [initialValue];\r\n\t\t\r\n\t\tif(this.isFilter){\r\n\t\t\tthis.input.value = this.initialValues ? this.initialValues.join(\",\") : \"\";\r\n\t\t\tthis.headerFilterInitialListGen(); \r\n\t\t}\r\n\t}\r\n\t\r\n\t_onRendered(){\r\n\t\tvar cellEl = this.cell.getElement();\r\n\t\t\r\n\t\tfunction clickStop(e){\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\t\t\r\n\t\tthis.input.style.height = \"100%\";\r\n\t\tthis.input.focus({preventScroll: true});\r\n\t\t\r\n\t\t\r\n\t\tcellEl.addEventListener(\"click\", clickStop);\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tcellEl.removeEventListener(\"click\", clickStop);\r\n\t\t}, 1000);\r\n\t\t\r\n\t\tthis.input.addEventListener(\"mousedown\", this._preventPopupBlur.bind(this));\r\n\t}\r\n\t\r\n\t_createListElement(){\r\n\t\tvar listEl = document.createElement(\"div\");\r\n\t\tlistEl.classList.add(\"tabulator-edit-list\");\r\n\t\t\r\n\t\tlistEl.addEventListener(\"mousedown\", this._preventBlur.bind(this));\r\n\t\tlistEl.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\r\n\t\t\r\n\t\treturn listEl;\r\n\t}\r\n\t\r\n\t_setListWidth(){\r\n\t\tvar element = this.isFilter ? this.input : this.cell.getElement();\r\n\t\t\r\n\t\tthis.listEl.style.minWidth = element.offsetWidth + \"px\";\r\n\t\t\r\n\t\tif(this.params.maxWidth){\r\n\t\t\tif(this.params.maxWidth === true){\r\n\t\t\t\tthis.listEl.style.maxWidth = element.offsetWidth + \"px\";\r\n\t\t\t}else if(typeof this.params.maxWidth === \"number\"){\r\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\t_createInputElement(){\r\n\t\tvar attribs = this.params.elementAttributes;\r\n\t\tvar input = document.createElement(\"input\");\r\n\t\t\r\n\t\tinput.setAttribute(\"type\", this.params.clearable ? \"search\" : \"text\");\r\n\t\t\r\n\t\tinput.style.padding = \"4px\";\r\n\t\tinput.style.width = \"100%\";\r\n\t\tinput.style.boxSizing = \"border-box\";\r\n\t\t\r\n\t\tif(!this.params.autocomplete){\r\n\t\t\tinput.style.cursor = \"default\";\r\n\t\t\tinput.style.caretColor = \"transparent\";\r\n\t\t\t// input.readOnly = (this.edit.currentCell != false);\r\n\t\t}\r\n\t\t\r\n\t\tif(attribs && typeof attribs == \"object\"){\r\n\t\t\tfor (let key in attribs){\r\n\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + attribs[\"+\" + key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinput.setAttribute(key, attribs[key]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.mask){\r\n\t\t\tmaskInput(input, this.params);\r\n\t\t}\r\n\t\t\r\n\t\tthis._bindInputEvents(input);\r\n\t\t\r\n\t\treturn input;\r\n\t}\r\n\t\r\n\t_initializeParams(params){\r\n\t\tvar valueKeys = [\"values\", \"valuesURL\", \"valuesLookup\"],\r\n\t\tvalueCheck;\r\n\t\t\r\n\t\tparams = Object.assign({}, params);\r\n\t\t\r\n\t\tparams.verticalNavigation = params.verticalNavigation || \"editor\";\r\n\t\tparams.placeholderLoading = typeof params.placeholderLoading === \"undefined\" ? \"Searching ...\" : params.placeholderLoading;\r\n\t\tparams.placeholderEmpty = typeof params.placeholderEmpty === \"undefined\" ? \"No Results Found\" : params.placeholderEmpty;\r\n\t\tparams.filterDelay = typeof params.filterDelay === \"undefined\" ? 300 : params.filterDelay;\r\n\t\t\r\n\t\tparams.emptyValue = Object.keys(params).includes(\"emptyValue\") ? params.emptyValue : \"\";\r\n\t\t\r\n\t\tvalueCheck = Object.keys(params).filter(key => valueKeys.includes(key)).length;\r\n\t\t\r\n\t\tif(!valueCheck){\r\n\t\t\tconsole.warn(\"list editor config error - either the values, valuesURL, or valuesLookup option must be set\");\r\n\t\t}else if(valueCheck > 1){\r\n\t\t\tconsole.warn(\"list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor\");\r\n\t\t}\r\n\t\t\r\n\t\tif(params.autocomplete){\r\n\t\t\tif(params.multiselect){\r\n\t\t\t\tparams.multiselect = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - multiselect option is not available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(params.freetext){\r\n\t\t\t\tparams.freetext = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - freetext option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.filterFunc){\r\n\t\t\t\tparams.filterFunc = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - filterFunc option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.filterRemote){\r\n\t\t\t\tparams.filterRemote = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - filterRemote option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.mask){\r\n\t\t\t\tparams.mask = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - mask option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.allowEmpty){\r\n\t\t\t\tparams.allowEmpty = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - allowEmpty option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.listOnEmpty){\r\n\t\t\t\tparams.listOnEmpty = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - listOnEmpty option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(params.filterRemote && !(typeof params.valuesLookup === \"function\" || params.valuesURL)){\r\n\t\t\tparams.filterRemote = false;\r\n\t\t\tconsole.warn(\"list editor config error - filterRemote option should only be used when values list is populated from a remote source\");\r\n\t\t}\r\n\t\treturn params;\r\n\t}\r\n\t//////////////////////////////////////\r\n\t////////// Event Handling ////////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_bindInputEvents(input){\r\n\t\tinput.addEventListener(\"focus\", this._inputFocus.bind(this));\r\n\t\tinput.addEventListener(\"click\", this._inputClick.bind(this));\r\n\t\tinput.addEventListener(\"blur\", this._inputBlur.bind(this));\r\n\t\tinput.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\r\n\t\tinput.addEventListener(\"search\", this._inputSearch.bind(this));\r\n\t\t\r\n\t\tif(this.params.autocomplete){\r\n\t\t\tinput.addEventListener(\"keyup\", this._inputKeyUp.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t_inputFocus(e){\r\n\t\tthis.rebuildOptionsList();\r\n\t}\r\n\t\r\n\t_filter(){\r\n\t\tif(this.params.filterRemote){\r\n\t\t\tclearTimeout(this.filterTimeout);\r\n\t\t\t\r\n\t\t\tthis.filterTimeout = setTimeout(() => {\r\n\t\t\t\tthis.rebuildOptionsList();\r\n\t\t\t}, this.params.filterDelay);\r\n\t\t}else{\r\n\t\t\tthis._filterList();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputClick(e){\r\n\t\te.stopPropagation();\r\n\t}\r\n\t\r\n\t_inputBlur(e){\r\n\t\tif(this.blurable){\r\n\t\t\tif(this.popup){\r\n\t\t\t\tthis.popup.hide();\r\n\t\t\t}else{\r\n\t\t\t\tthis._resolveValue(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputSearch(){\r\n\t\tthis._clearChoices();\r\n\t}\r\n\t\r\n\t_inputKeyDown(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t\r\n\t\t\tcase 38: //up arrow\r\n\t\t\t\tthis._keyUp(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 40: //down arrow\r\n\t\t\t\tthis._keyDown(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\t\tthis._keySide(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tthis._keyEnter();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tthis._keyEsc();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t\tthis._keyHomeEnd(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 9: //tab\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis._keySelectLetter(e);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputKeyUp(e){\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\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis._keyAutoCompLetter(e);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_preventPopupBlur(){\r\n\t\tif(this.popup){\r\n\t\t\tthis.popup.blockHide();\r\n\t\t}\r\n\t\t\r\n\t\tsetTimeout(() =>{\r\n\t\t\tif(this.popup){\r\n\t\t\t\tthis.popup.restoreHide();\r\n\t\t\t}\r\n\t\t}, 10);\r\n\t}\r\n\t\r\n\t_preventBlur(){\r\n\t\tthis.blurable = false;\r\n\t\t\r\n\t\tsetTimeout(() =>{\r\n\t\t\tthis.blurable = true;\r\n\t\t}, 10);\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Keyboard Navigation /////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_keyUp(e){\r\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\r\n\t\t\r\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index)){\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tif(index > 0){\r\n\t\t\t\tthis._focusItem(this.displayItems[index - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyDown(e){\r\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\r\n\t\t\r\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index < this.displayItems.length - 1)){\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tif(index < this.displayItems.length - 1){\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tthis._focusItem(this.displayItems[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis._focusItem(this.displayItems[index + 1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keySide(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t}\r\n\t\r\n\t_keyEnter(e){\r\n\t\tif(this.params.autocomplete && this.lastAction === \"typing\"){\r\n\t\t\tthis._resolveValue(true);\r\n\t\t}else{\r\n\t\t\tif(this.focusedItem){\r\n\t\t\t\tthis._chooseItem(this.focusedItem);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyEsc(e){\r\n\t\tthis._cancel();\r\n\t}\r\n\t\r\n\t_keyHomeEnd(e){\r\n\t\tif(this.params.autocomplete){\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keySelectLetter(e){\r\n\t\tif(!this.params.autocomplete){\r\n\t\t\t// if(this.edit.currentCell === false){\r\n\t\t\te.preventDefault();\r\n\t\t\t// }\r\n\t\t\t\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tthis._scrollToValue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyAutoCompLetter(e){\r\n\t\tthis._filter();\r\n\t\tthis.lastAction = \"typing\";\r\n\t\tthis.typing = true;\r\n\t}\r\n\t\r\n\t\r\n\t_scrollToValue(char){\r\n\t\tclearTimeout(this.filterTimeout);\r\n\t\t\r\n\t\tvar character = String.fromCharCode(char).toLowerCase();\r\n\t\tthis.filterTerm += character.toLowerCase();\r\n\t\t\r\n\t\tvar match = this.displayItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(this.filterTerm);\r\n\t\t});\r\n\t\t\r\n\t\tif(match){\r\n\t\t\tthis._focusItem(match);\r\n\t\t}\r\n\t\t\r\n\t\tthis.filterTimeout = setTimeout(() => {\r\n\t\t\tthis.filterTerm = \"\";\r\n\t\t}, 800);\r\n\t}\r\n\t\r\n\t_focusItem(item){\r\n\t\tthis.lastAction = \"focus\";\r\n\t\t\r\n\t\tif(this.focusedItem && this.focusedItem.element){\r\n\t\t\tthis.focusedItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.focusedItem = item;\r\n\t\t\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t//////////////////////////////////////\r\n\t/////// Data List Generation /////////\r\n\t//////////////////////////////////////\r\n\theaderFilterInitialListGen(){\r\n\t\tthis._generateOptions(true);\r\n\t}\r\n\t\r\n\trebuildOptionsList(){\r\n\t\tthis._generateOptions()\r\n\t\t\t.then(this._sortOptions.bind(this))\r\n\t\t\t.then(this._buildList.bind(this))\r\n\t\t\t.then(this._showList.bind(this))\r\n\t\t\t.catch((e) => {\r\n\t\t\t\tif(!Number.isInteger(e)){\r\n\t\t\t\t\tconsole.error(\"List generation error\", e);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\t\r\n\t_filterList(){\r\n\t\tthis._buildList(this._filterOptions());\r\n\t\tthis._showList();\r\n\t}\r\n\t\r\n\t_generateOptions(silent){\r\n\t\tvar values = [];\r\n\t\tvar iteration = ++ this.listIteration;\r\n\t\t\r\n\t\tthis.filtered = false;\r\n\t\t\r\n\t\tif(this.params.values){\r\n\t\t\tvalues = this.params.values;\r\n\t\t}else if (this.params.valuesURL){\r\n\t\t\tvalues = this._ajaxRequest(this.params.valuesURL, this.input.value);\r\n\t\t}else{\r\n\t\t\tif(typeof this.params.valuesLookup === \"function\"){\r\n\t\t\t\tvalues = this.params.valuesLookup(this.cell, this.input.value);\r\n\t\t\t}else if(this.params.valuesLookup){\r\n\t\t\t\tvalues = this._uniqueColumnValues(this.params.valuesLookupField);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(values instanceof Promise){\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis._addPlaceholder(this.params.placeholderLoading);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn values.then()\r\n\t\t\t\t.then((responseValues) => {\r\n\t\t\t\t\tif(this.listIteration === iteration){\r\n\t\t\t\t\t\treturn this._parseList(responseValues);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\treturn Promise.reject(iteration);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.resolve(this._parseList(values));\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addPlaceholder(contents){\r\n\t\tvar placeholder = document.createElement(\"div\");\r\n\t\t\r\n\t\tif(typeof contents === \"function\"){\r\n\t\t\tcontents = contents(this.cell.getComponent(), this.listEl);\r\n\t\t}\r\n\t\t\r\n\t\tif(contents){\r\n\t\t\tthis._clearList();\r\n\t\t\t\r\n\t\t\tif(contents instanceof HTMLElement){\r\n\t\t\t\tplaceholder = contents;\r\n\t\t\t}else{\r\n\t\t\t\tplaceholder.classList.add(\"tabulator-edit-list-placeholder\");\r\n\t\t\t\tplaceholder.innerHTML = contents;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.listEl.appendChild(placeholder);\r\n\t\t\t\r\n\t\t\tthis._showList();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_ajaxRequest(url, term){\r\n\t\tvar params = this.params.filterRemote ? {term:term} : {};\r\n\t\turl = urlBuilder(url, {}, params);\r\n\t\t\r\n\t\treturn fetch(url)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\treturn response.json()\r\n\t\t\t\t\t\t.catch((error)=>{\r\n\t\t\t\t\t\t\tconsole.warn(\"List Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t\t\treturn Promise.reject(error);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"List Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treturn Promise.reject(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(\"List Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treturn Promise.reject(error);\r\n\t\t\t});\r\n\t}\r\n\t\r\n\t_uniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = this.table.getData(this.params.valuesLookup),\r\n\t\tcolumn;\r\n\t\t\r\n\t\tif(field){\r\n\t\t\tcolumn = this.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = this.cell.getColumn()._getSelf();\r\n\t\t}\r\n\t\t\r\n\t\tif(column){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\t\t\t\t\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\toutput = [];\r\n\t\t}\r\n\t\t\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\t\r\n\t\r\n\t_parseList(inputValues){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(!Array.isArray(inputValues)){\r\n\t\t\tinputValues = Object.entries(inputValues).map(([key, value]) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tlabel:value,\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tinputValues.forEach((value) => {\r\n\t\t\tif(typeof value !== \"object\"){\r\n\t\t\t\tvalue = {\r\n\t\t\t\t\tlabel:value,\r\n\t\t\t\t\tvalue:value,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._parseListItem(value, data, 0);\r\n\t\t});\r\n\t\t\r\n\t\tif(!this.currentItems.length && this.params.freetext){\r\n\t\t\tthis.input.value = this.initialValues;\r\n\t\t\tthis.typing = true;\r\n\t\t\tthis.lastAction = \"typing\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.data = data;\r\n\t\t\r\n\t\treturn data; \r\n\t}\r\n\t\r\n\t_parseListItem(option, data, level){\r\n\t\tvar item = {};\r\n\t\t\r\n\t\tif(option.options){\r\n\t\t\titem = this._parseListGroup(option, level + 1);\r\n\t\t}else{\r\n\t\t\titem = {\r\n\t\t\t\tlabel:option.label,\r\n\t\t\t\tvalue:option.value,\r\n\t\t\t\titemParams:option.itemParams,\r\n\t\t\t\telementAttributes: option.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t\tselected:false,\r\n\t\t\t\tvisible:true,\r\n\t\t\t\tlevel:level,\r\n\t\t\t\toriginal:option,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tif(this.initialValues && this.initialValues.indexOf(option.value) > -1){\r\n\t\t\t\tthis._chooseItem(item, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdata.push(item);\r\n\t}\r\n\t\r\n\t_parseListGroup(option, level){\r\n\t\tvar item = {\r\n\t\t\tlabel:option.label,\r\n\t\t\tgroup:true,\r\n\t\t\titemParams:option.itemParams,\r\n\t\t\telementAttributes:option.elementAttributes,\r\n\t\t\telement:false,\r\n\t\t\tvisible:true,\r\n\t\t\tlevel:level,\r\n\t\t\toptions:[],\r\n\t\t\toriginal:option,\r\n\t\t};\r\n\t\t\r\n\t\toption.options.forEach((child) => {\r\n\t\t\tthis._parseListItem(child, item.options, level);\r\n\t\t});\r\n\t\t\r\n\t\treturn item;\r\n\t}\r\n\t\r\n\t_sortOptions(options){\r\n\t\tvar sorter;\r\n\t\t\r\n\t\tif(this.params.sort){\r\n\t\t\tsorter = typeof this.params.sort === \"function\" ? this.params.sort : this._defaultSortFunction.bind(this);\r\n\t\t\t\r\n\t\t\tthis._sortGroup(sorter, options);\r\n\t\t}\r\n\t\t\r\n\t\treturn options;\r\n\t}\r\n\t\r\n\t_sortGroup(sorter, options){\r\n\t\toptions.sort((a,b) => {\r\n\t\t\treturn sorter(a.label, b.label, a.value, b.value, a.original, b.original);\r\n\t\t});\r\n\t\t\r\n\t\toptions.forEach((option) => {\r\n\t\t\tif(option.group){\r\n\t\t\t\tthis._sortGroup(sorter, option.options);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_defaultSortFunction(as, bs){\r\n\t\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\t\tvar emptyAlign = 0;\r\n\t\t\r\n\t\tif(this.params.sort === \"desc\"){\r\n\t\t\t[as, bs] = [bs, as];\r\n\t\t}\r\n\t\t\r\n\t\t//handle empty values\r\n\t\tif(!as && as!== 0){\r\n\t\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t\t}else if(!bs && bs!== 0){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\t\ta = String(as).toLowerCase();\r\n\t\t\tb = String(bs).toLowerCase();\r\n\t\t\tif(a === b) return 0;\r\n\t\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\t\ta = a.match(rx);\r\n\t\t\tb = b.match(rx);\r\n\t\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\t\twhile(i < L){\r\n\t\t\t\ta1= a[i];\r\n\t\t\t\tb1= b[i++];\r\n\t\t\t\tif(a1 !== b1){\r\n\t\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn a.length > b.length;\r\n\t\t}\r\n\t\t\r\n\t\treturn emptyAlign;\r\n\t}\r\n\t\r\n\t_filterOptions(){\r\n\t\tvar filterFunc = this.params.filterFunc || this._defaultFilterFunc,\r\n\t\tterm = this.input.value;\r\n\t\t\r\n\t\tif(term){\r\n\t\t\tthis.filtered = true;\r\n\t\t\t\r\n\t\t\tthis.data.forEach((item) => {\r\n\t\t\t\tthis._filterItem(filterFunc, term, item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.filtered = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.data;\r\n\t}\r\n\t\r\n\t_filterItem(func, term, item){\r\n\t\tvar matches = false;\r\n\t\t\r\n\t\tif(!item.group){\r\n\t\t\titem.visible = func(term, item.label, item.value, item.original);\r\n\t\t}else{\r\n\t\t\titem.options.forEach((option) => {\r\n\t\t\t\tif(this._filterItem(func, term, option)){\r\n\t\t\t\t\tmatches = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\titem.visible = matches;\r\n\t\t}\r\n\t\t\r\n\t\treturn item.visible;\r\n\t}\r\n\t\r\n\t_defaultFilterFunc(term, label, value, item){\r\n\t\tterm = String(term).toLowerCase();\r\n\t\t\r\n\t\tif(label !== null && typeof label !== \"undefined\"){\r\n\t\t\tif(String(label).toLowerCase().indexOf(term) > -1 || String(value).toLowerCase().indexOf(term) > -1){\r\n\t\t\t\treturn true;\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\t//////////////////////////////////////\r\n\t/////////// Display List /////////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_clearList(){\r\n\t\twhile(this.listEl.firstChild) this.listEl.removeChild(this.listEl.firstChild);\r\n\t\t\r\n\t\tthis.displayItems = [];\r\n\t}\r\n\t\r\n\t_buildList(data){\r\n\t\tthis._clearList();\r\n\t\t\r\n\t\tdata.forEach((option) => {\r\n\t\t\tthis._buildItem(option);\r\n\t\t});\r\n\t\t\r\n\t\tif(!this.displayItems.length){\r\n\t\t\tthis._addPlaceholder(this.params.placeholderEmpty);\r\n\t\t} \r\n\t}\r\n\t\r\n\t_buildItem(item){\r\n\t\tvar el = item.element,\r\n\t\tcontents;\r\n\t\t\r\n\t\tif(!this.filtered || item.visible){\r\n\t\t\t\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\r\n\t\t\t\tcontents = this.params.itemFormatter ? this.params.itemFormatter(item.label, item.value, item.original, el) : item.label;\r\n\t\t\t\t\r\n\t\t\t\tif(contents instanceof HTMLElement){\r\n\t\t\t\t\tel.appendChild(contents);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.innerHTML = contents;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-group\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-item\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tel.classList.add(\"tabulator-edit-list-group-level-\" + item.level);\r\n\t\t\t\t\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, this.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\t\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.addEventListener(\"click\", this._groupClick.bind(this, item));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.addEventListener(\"click\", this._itemClick.bind(this, item));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tel.addEventListener(\"mousedown\", this._preventBlur.bind(this));\r\n\t\t\t\t\r\n\t\t\t\titem.element = el;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t\tthis.listEl.appendChild(el);\r\n\t\t\t\r\n\t\t\tif(item.group){\r\n\t\t\t\titem.options.forEach((option) => {\r\n\t\t\t\t\tthis._buildItem(option);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayItems.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_showList(){\r\n\t\tvar startVis = this.popup && this.popup.isVisible();\r\n\t\t\r\n\t\tif(this.input.parentNode){\r\n\t\t\tif(this.params.autocomplete && this.input.value === \"\" && !this.params.listOnEmpty){\r\n\t\t\t\tif(this.popup){\r\n\t\t\t\t\tthis.popup.hide(true);\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setListWidth();\r\n\t\t\t\r\n\t\t\tif(!this.popup){\r\n\t\t\t\tthis.popup = this.edit.popup(this.listEl);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.popup.show(this.cell.getElement(), \"bottom\");\r\n\t\t\t\r\n\t\t\tif(!startVis){\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.popup.hideOnBlur(this._resolveValue.bind(this, true));\r\n\t\t\t\t}, 10);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_styleItem(item){\r\n\t\tif(item && item.element){\r\n\t\t\tif(item.selected){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}else{\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// User Interaction ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_itemClick(item, e){\r\n\t\te.stopPropagation();\r\n\t\t\r\n\t\tthis._chooseItem(item);\r\n\t}\r\n\t\r\n\t_groupClick(item, e){\r\n\t\te.stopPropagation();\r\n\t}\r\n\t\r\n\t\r\n\t//////////////////////////////////////\r\n\t////// Current Item Management ///////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_cancel(){\r\n\t\tthis.popup.hide(true);\r\n\t\tthis.actions.cancel();\r\n\t}\r\n\t\r\n\t_clearChoices(){\r\n\t\tthis.typing = true;\r\n\t\t\r\n\t\tthis.currentItems.forEach((item) => {\r\n\t\t\titem.selected = false;\r\n\t\t\tthis._styleItem(item);\r\n\t\t});\r\n\t\t\r\n\t\tthis.currentItems = [];\r\n\t\t\r\n\t\tthis.focusedItem = null;\r\n\t}\r\n\t\r\n\t_chooseItem(item, silent){\r\n\t\tvar index;\r\n\t\t\r\n\t\tthis.typing = false;\r\n\t\t\r\n\t\tif(this.params.multiselect){\r\n\t\t\tindex = this.currentItems.indexOf(item);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.currentItems.splice(index, 1);\r\n\t\t\t\titem.selected = false;\r\n\t\t\t}else{\r\n\t\t\t\tthis.currentItems.push(item);\r\n\t\t\t\titem.selected = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.input.value = this.currentItems.map(item => item.label).join(\",\");\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.currentItems = [item];\r\n\t\t\titem.selected = true;\r\n\t\t\t\r\n\t\t\tthis.input.value = item.label;\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis._resolveValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis._focusItem(item);\r\n\t}\r\n\t\r\n\t_resolveValue(blur){\r\n\t\tvar output, initialValue;\r\n\r\n\t\tif(this.popup){\r\n\t\t\tthis.popup.hide(true);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.multiselect){\r\n\t\t\toutput = this.currentItems.map(item => item.value);\r\n\t\t}else{\r\n\t\t\tif(blur && this.params.autocomplete && this.typing){\r\n\t\t\t\tif(this.params.freetext || (this.params.allowEmpty && this.input.value === \"\")){\r\n\t\t\t\t\toutput = this.input.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.actions.cancel();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.currentItems[0]){\r\n\t\t\t\t\toutput = this.currentItems[0].value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinitialValue = this.initialValues[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(initialValue === null || typeof initialValue === \"undefined\" || initialValue === \"\"){\r\n\t\t\t\t\t\toutput = initialValue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\toutput = this.params.emptyValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(output === \"\"){\r\n\t\t\toutput = this.params.emptyValue;\r\n\t\t}\r\n\t\t\r\n\t\tthis.actions.success(output);\r\n\t\t\r\n\t\tif(this.isFilter){\r\n\t\t\tthis.initialValues = output && !Array.isArray(output) ? [output] : output;\r\n\t\t\tthis.currentItems = [];\r\n\t\t}\r\n\t}\r\n\t\r\n}\r\n","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\r\n\tthis.deprecationMsg(\"The select editor has been deprecated, please use the new list editor\");\r\n\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\r\n\tthis.deprecationMsg(\"The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam\");\r\n\r\n\teditorParams.autocomplete = true;\r\n\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.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\t\tchangeValue(value + 1);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\t\tchangeValue(value - 1);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tsuccess(value);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tcancel();\r\n\t\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\t\te.preventDefault();\r\n\t\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tupdateValue();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tcancel();\r\n\t\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\ttrueValueSet = Object.keys(editorParams).includes(\"trueValue\"),\r\n\tfalseValueSet = Object.keys(editorParams).includes(\"falseValue\");\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 = trueValueSet ? value === editorParams.trueValue : (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\tvar checkedValue = input.checked;\r\n\r\n\t\tif(trueValueSet && checkedValue){\r\n\t\t\tcheckedValue = editorParams.trueValue;\r\n\t\t}else if(falseValueSet && !checkedValue){\r\n\t\t\tcheckedValue = editorParams.falseValue;\r\n\t\t}\r\n\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 checkedValue;\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 checkedValue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn checkedValue;\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 date from './editors/date.js';\r\nimport time from './editors/time.js';\r\nimport datetime from './editors/datetime.js';\r\nimport select from './editors/select.js';\r\nimport list from './editors/list.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\tnumber:number,\r\n\trange:range,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tselect:select,\r\n\tlist:list,\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overridden 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\t\t\r\n\t\tthis.editors = Edit.editors;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\t\t\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\t\t\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\t\t\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\t\t\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\t\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(\"cell-value-changed\", this.updateCellClass.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(\"row-layout\", this.rowEditableCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\t\t\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\t\r\n\t\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\t\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\t\t\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\t\t\t\t\t\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\t\t\t\t\t\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\t\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcellIsEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\t\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\t\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tupdateCellClass(cell){\r\n\t\tif(this.allowEdit(cell)) {\r\n\t\t\tcell.getElement().classList.add(\"tabulator-editable\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-editable\");\r\n\t\t}\r\n\t}\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\t\t\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\t\t\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\t\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnextCell = this.navigateLeft();\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findPrevEditableCell(prevRow, prevRow.cells.length);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnextCell = this.navigateRight();\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\t\t\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\t\t\t\t\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn nextCell;\r\n\t}\r\n\t\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\t\t\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\t\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn prevCell;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\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\t\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\t\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\trowEditableCheck(row){\r\n\t\trow.getCells().forEach((cell) => {\r\n\t\t\tif(cell.column.modules.edit && typeof cell.column.modules.edit.check === \"function\"){\r\n\t\t\t\tthis.updateCellClass(cell);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar config = {\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\t\t\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\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.definition.editor === true){\r\n\t\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\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(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\t\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\t\t\r\n\t\tthis.invalidEdit = false;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\t\t\t\r\n\t\t\tcellEl = cell.getElement();\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"edit-editor-clear\", cell, cancel);\r\n\t\t\t\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\t\t\t\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\t\t\t\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-editing\");\r\n\t\t\t\r\n\t\t\tcell.table.element.classList.remove(\"tabulator-editing\");\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\t\t\t\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\t\t\t\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\t\t\t\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\t\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\t\t\t\r\n\t\t\tthis.updateCellClass(cell);\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\t\t\t\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\t\t\t\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\t\t\t\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\t\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\t\t\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\t\t\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\t\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\t\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\t\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\t\t\t\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\t\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\t\t\t\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\t\t\t\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\t\t\t\t\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\t\r\n\tallowEdit(cell) {\r\n\t\tvar check = cell.column.modules.edit ? true : false;\r\n\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tif(cell.row.initialized){\r\n\t\t\t\t\t\tcheck = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\t\tcheck = !!cell.row.data[cell.column.modules.edit.check];\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tcheck = cell.column.modules.edit.check;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn check;\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\t//handle successful value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = self.chain(\"edit-success\", [cell, value], true, true);\r\n\t\t\t\t\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn valid === true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\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\t\t\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\t\t\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\t\t\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\t\t\t\r\n\t\t\tallowEdit = this.allowEdit(cell);\r\n\t\t\t\r\n\t\t\tif(allowEdit || forceEdit){\r\n\t\t\t\t\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t\t\r\n\t\t\t\tself.currentCell = cell;\r\n\t\t\t\t\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\t\t\t\t\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\t\t\t\t\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\t\t\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\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"cell-editing\", cell);\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\t\t\t\t\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\t\t\t\t\t\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-editing\");\r\n\t\t\t\t\t\tcell.table.element.classList.add(\"tabulator-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\t\t\t\t\t\t\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\t\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\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\t\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\t\t\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"edit-edited-clear\", cell);\r\n\t\t}\r\n\t\t\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\t\t\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 output 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\tgenerateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.generateTableElement(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\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\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\tvar visProp = column.definition[this.colVisProp];\r\n\r\n\t\tif(typeof visProp === \"function\"){\r\n\t\t\tvisProp = visProp.call(this.table, column.getComponent());\r\n\t\t}\r\n\r\n\t\treturn visProp !== false && (column.visible || (!column.visible && visProp));\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 depth\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\t\treturn this.config.rowGroups !== false;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\t\treturn this.config.columnCalcs !== false;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\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\t\tindent = row.level;\r\n\t\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\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\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t\t}\r\n\t\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\tgenerateTableElement(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\tlet rowEl;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\t\theaderEl.appendChild(this.generateHeaderElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\t\tbodyEl.appendChild(this.generateGroupElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\t\tbodyEl.appendChild(this.generateCalcElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\t\trowEl = this.generateRowElement(row, setup, styles);\r\n\r\n\t\t\t\t\tthis.mapElementStyles(((i % 2) && styles.evenRow) ? styles.evenRow : styles.oddRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\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\tgenerateHeaderElement(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\tgenerateGroupElement(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 = 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\tgenerateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.generateRowElement(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\tgenerateRowElement(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, i) => {\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\t\t\t\tcellStyle;\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\t\tvalue = value !== null ? JSON.stringify(value) : \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\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\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\tcellStyle = styles.styleCells && styles.styleCells[index] ? styles.styleCells[index] : styles.firstCell;\r\n\r\n\t\t\t\tif(cellStyle){\r\n\t\t\t\t\tthis.mapElementStyles(cellStyle, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\", \"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"text-align\"]);\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\tgenerateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.generateTableElement(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.generateHTMLTable(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\r\n\t\t//handle successfully 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\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\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\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t}else{\r\n\t\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\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\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 column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\ttype = filterFunc;\r\n\t\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\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\ttype = \"like\";\r\n\t\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\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t\t};\r\n\t\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};\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\tcolumn.modules.filter.value = value;\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\tcolumn.modules.filter.value = initialValue;\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;\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\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"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\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\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\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\t\treturn value !== true && value !== 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}else{\r\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\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}\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\tgetTable:() => {\r\n\t\t\t\t\t\treturn this.table;\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\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\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.contentsElement.scrollLeft;\r\n\r\n\t\t\t\t\tvar headerPos = this.table.rowManager.element.scrollLeft;\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)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\t\tsuccess(editorElement.value);\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//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\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\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propagating 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//programmatically 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.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//programmatically 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(null, false, false);\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\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}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(true));\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(true), 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\tif (formatterParams.thousand !== false) {\r\n\t\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\t\twhile (rgx.test(integer)){\r\n\t\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t\t}\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\tfunction labelTraverse(path, data){\r\n\t\tvar item = path.shift(),\r\n\t\tvalue = data[item];\r\n\t\t\r\n\t\tif(path.length && typeof value === \"object\"){\r\n\t\t\treturn labelTraverse(path, value);\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = labelTraverse(formatterParams.labelField.split(this.table.options.nestedFieldSeparator), data);\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\t\tlabel = formatterParams.label;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tlabel = formatterParams.label(cell);\r\n\t\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\t\tvalue = formatterParams.url;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\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\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\t\tel.style.height = formatterParams.height;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\t\tel.style.width = formatterParams.width;\r\n\t\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\ttrueValueSet = Object.keys(formatterParams).includes(\"trueValue\"),\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((trueValueSet && value === formatterParams.trueValue) || (!trueValueSet && ((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;\r\n\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\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\tvar newDatetime;\r\n\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\treturn newDatetime.diff(date, unit).toHuman() + (suffix ? \" \" + 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\t\tcolor = colors;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tcolor = colors(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(colors)){\r\n\t\t\t\tvar unit = 100 / colors.length;\r\n\t\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tcolor = colors[index];\r\n\t\t\t\tbreak;\r\n\t\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.max ? formatterParams.max : 100,\r\n\tmin = formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor;\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\t\tcolor = formatterParams.color;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tcolor = formatterParams.color(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\t\tlet unit = 100 / formatterParams.color.length;\r\n\t\t\t\tlet index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tcolor = formatterParams.color[index];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tdefault:\r\n\t\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\t\tlegend = formatterParams.legend;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tlegend = formatterParams.legend(value);\r\n\t\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\t\tlegend = value;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\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\t\tlegendColor = formatterParams.legendColor;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\t\tlet unit = 100 / formatterParams.legendColor.length;\r\n\t\t\t\tlet index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\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.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\tvar content = document.createElement(\"span\");\r\n\tvar row = cell.getRow();\r\n\r\n\trow.watchPosition((position) => {\r\n\t\tcontent.innerText = position;\r\n\t});\r\n\t\r\n\treturn content;\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 el = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\t\r\n\tel.innerHTML = `\r\n \r\n \r\n\r\n\r\n\r\n \r\n`;\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\tcell.getTable().rowManager.adjustTableSize();\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\t\t\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\t\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\t\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\t\t\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\t\t\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\t\t\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\t\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\t\t\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\tconfig.formatter = formatter;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn config;\r\n\t}\r\n\t\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\t\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\t\t\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\t\t\t\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\t\t\t\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\tgetColumn:function(){\r\n\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t},\r\n\t\t\t\tgetTable:() => {\r\n\t\t\t\t\treturn this.table;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\t\t\t\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\t\t\t\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\t\r\n\t\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\t\t\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\t\t\t\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\t\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\t\t\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(cell.getComponent()) : formatter.params;\r\n\t\t\t\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\t\t\t\t\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\t\t\t\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\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\t\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\t\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\t\tformatter = Format.formatters[formatter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t//Custom formatter Function, do nothing\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\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.initializationMode = \"left\";\r\n\t\tthis.active = 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.active = false;\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(\"columns-loading\", this.reset.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"column-add\", this.reinitializeColumns.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.reinitializeColumns.bind(this));\r\n\t\t\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\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.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\treinitializeColumns(){\r\n\t\tthis.reset();\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t});\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\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}\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);\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.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.marginValue = leftMargin;\r\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\r\n\t\t\t\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\t\t\t\r\n\t\t\tcolumn.modules.frozen.marginValue = rightMargin;\r\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\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\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(){\t\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.reinitializeRows();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar visibleRows = this.table.rowManager.getVisibleRows(true);\r\n\t\tvar otherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\r\n\t\t\r\n\t\totherRows.forEach((row) =>{\r\n\t\t\trow.deinitialize();\r\n\t\t});\r\n\t\t\r\n\t\tvisibleRows.forEach((row) =>{\r\n\t\t\tif(row.type === \"row\"){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutRow(row){\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\tvar position;\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"sticky\";\r\n\r\n\t\t\tif(this.table.rtl){\r\n\t\t\t\tposition = column.modules.frozen.position === \"left\" ? \"right\" : \"left\";\r\n\t\t\t}else{\r\n\t\t\t\tposition = column.modules.frozen.position;\r\n\t\t\t}\r\n\t\t\r\n\t\t\telement.style[position] = column.modules.frozen.margin;\r\n\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\r\n\tadjustForScrollbar(width){\r\n\t\tif(this.rightColumns.length){\r\n\t\t\tthis.table.columnManager.getContentsElement().style.width = \"calc(100% - \" + width + \"px)\";\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\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"frozenRowsField\", \"id\"); //field to choose frozen rows by\r\n\t\tthis.registerTableOption(\"frozenRows\", false); //holder for frozen row identifiers\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.getContentsElement().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\r\n\t\tif(this.table.options.frozenRows){\r\n\t\t\tthis.subscribe(\"data-processed\", this.initializeRows.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRows(){\r\n\t\tthis.table.rowManager.getRows().forEach((row) => {\r\n\t\t\tthis.initializeRow(row);\r\n\t\t});\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar frozenRows = this.table.options.frozenRows,\r\n\t\trowType = typeof frozenRows;\r\n\r\n\t\tif(rowType === \"number\"){\r\n\t\t\tif(row.getPosition() && (row.getPosition() + this.rows.length) <= frozenRows){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}else if(rowType === \"function\"){\r\n\t\t\tif(frozenRows.call(this.table, row.getComponent())){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(frozenRows)){\r\n\t\t\tif(frozenRows.includes(row.data[this.options(\"frozenRowsField\")])){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}\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 output = 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\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.table.rowManager.adjustTableSize();\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\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 constraints\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(){\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\t\r\n\t\tif(this.calcs.top){\r\n\t\t\tthis.calcs.top.detachElement();\r\n\t\t\tthis.calcs.top.deleteCells();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.calcs.bottom){\r\n\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t}\r\n\t\t\r\n\t\t\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());\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\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(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\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\tif(this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\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(this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\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() == \"basic\" && !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.updateGroupRows(true);\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() == \"basic\" && !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.updateGroupRows(true);\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(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(component ? 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 Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\t\t\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\t\t\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\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\t\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\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\t\t\t\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\t\t\t\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\t\t\t\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\t\t\t\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\t\t\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\t\t\t\r\n\t\t\tthis.groupIDLookups = [];\r\n\t\t\t\r\n\t\t\tif(Array.isArray(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\t\t\t\t\t\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\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\t\t\t\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\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\t\t\t\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}else{\r\n\t\t\tthis.groupList = [];\r\n\t\t\tthis.groups = {};\r\n\t\t}\r\n\t}\r\n\t\r\n\trowSample(rows, prevValue){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar group = this.getGroups(false)[0];\r\n\t\t\t\r\n\t\t\tprevValue.push(group.getRows(false)[0]);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevValue;\r\n\t}\r\n\t\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\trows = rows.filter((row) => {\r\n\t\t\t\treturn row.type !== \"group\";\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\t\t}else{\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingIndex(row, index, top){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.assignRowToGroup(row);\r\n\t\t\t\r\n\t\t\tvar groupRows = row.modules.group.rows;\r\n\t\t\t\r\n\t\t\tif(groupRows.length > 1){\r\n\t\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\t\tif(top){\r\n\t\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\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\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn index;\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\t\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tthis.refreshData();\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\t\t\t\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\t\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\t\t\t\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\t\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\t\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ? this.getGroupedData() : this.getData();\r\n\t}\r\n\t\r\n\t\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\t\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\trowMoving(from, to, after){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tif(!after && to instanceof Group){\r\n\t\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\t\t\t\r\n\t\t\tif(toGroup === fromGroup){\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t\t}else{\r\n\t\t\t\tif(fromGroup){\r\n\t\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(this.table.options.groupBy && row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.updateGroupRows(true);\r\n\t\t}\t\r\n\t}\r\n\t\r\n\tcellUpdated(cell){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.reassignRowToGroup(cell.row);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\t\t\t\r\n\t\t\tthis.generateGroups(rows);\r\n\t\t\t\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\t\t\t\r\n\t\t\treturn this.updateGroupRows();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\t\t\r\n\t\treturn groupComponents;\r\n\t}\r\n\t\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\t\t\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\treturn groupComponents;\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.table.options.groupBy){\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\t\r\n\t\t\tthis.groupList = [];\r\n\t\t\tthis.groups = {};\r\n\t\t}\r\n\t}\r\n\t\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\t\t\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\t\t\t\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\t\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\t\t\r\n\t\treturn groupListData;\r\n\t}\r\n\t\r\n\tgetGroupedData(){\r\n\t\t\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\t\r\n\t\tif(this.options(\"dataTree\")){\r\n\t\t\trow = this.table.modules.dataTree.getTreeParentRoot(row);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\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\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\t\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\t\t\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\t\t\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\t\t\t\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\t\r\n\t\tObject.values(oldGroups).forEach((group) => {\r\n\t\t\tgroup.wipe();\r\n\t\t});\t\r\n\t}\r\n\t\r\n\t\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\t\t\r\n\t\toldGroups = oldGroups || [];\r\n\t\t\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\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\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\t\t\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\t\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\t\t\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\t\t\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\t\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;\r\n\t\t\t\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tsamePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\t\t\t\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\t\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\t\t\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\t\t\r\n\t\treturn groupPath;\r\n\t}\r\n\t\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\t\t\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tleft = left + \"px\";\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tgroup.scrollHeader(left);\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}\r\n\t}\r\n\t\r\n\tcheckBasicModeGroupHeaderWidth(){\r\n\t\tvar element = this.table.rowManager.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\t\t\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row, index) =>{\r\n\t\t\tthis.table.rowManager.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\t\t\t\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\t\t\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\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:from.getPosition(), posTo:to.getPosition(), 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()._getSelf().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\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\tif(this.table.originalElement.childNodes.length){\r\n\t\t\t\tthis.parseTable();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element.\");\r\n\t\t\t}\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\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [];\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 don't 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;\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\tvar data = [],\r\n\trow = 0, \r\n\tcol = 0,\r\n\tinQuote = false;\r\n \r\n\t//Iterate over each character\r\n\tfor (let index = 0; index < input.length; index++) {\r\n\t\tlet char = input[index], \r\n\t\tnextChar = input[index+1]; \r\n \r\n\t\t//Initialize empty row\r\n\t\tif(!data[row]){\r\n\t\t\tdata[row] = [];\r\n\t\t}\r\n\r\n\t\t//Initialize empty column\r\n\t\tif(!data[row][col]){\r\n\t\t\tdata[row][col] = \"\";\r\n\t\t}\r\n \r\n\t\t//Handle quotation mark inside string\r\n\t\tif (char == '\"' && inQuote && nextChar == '\"') { \r\n\t\t\tdata[row][col] += char; \r\n\t\t\tindex++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//Begin / End Quote\r\n\t\tif (char == '\"') { \r\n\t\t\tinQuote = !inQuote;\r\n\t\t\tcontinue;\r\n\t\t}\r\n \r\n\t\t//Next column (if not in quote)\r\n\t\tif (char == ',' && !inQuote) { \r\n\t\t\tcol++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//New row if new line and not in quote (CRLF) \r\n\t\tif (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n\t\t\tcol = 0; \r\n\t\t\trow++; \r\n\t\t\tindex++; \r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//New row if new line and not in quote (CR or LF) \r\n\t\tif ((char == '\\r' || char == '\\n') && !inQuote) { \r\n\t\t\tcol = 0;\r\n\t\t\trow++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n\r\n\t\t//Normal Character, append to column\r\n\t\tdata[row][col] += char;\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\nexport default csvImporter;","export default function(input){\r\n\ttry {\r\n\t\treturn JSON.parse(input);\r\n\t} catch(e) {\r\n\t\tconsole.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n\t\treturn Promise.reject();\r\n\t}\r\n}","function arrayImporter(input){\r\n\treturn input;\r\n}\r\n\r\nexport default arrayImporter;","import csv from './importers/csv.js';\r\nimport json from './importers/json.js';\r\nimport array from './importers/array.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tarray:array,\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\tconstructor(table){\r\n\t\tsuper(table);\r\n \r\n\t\tthis.registerTableOption(\"importFormat\");\r\n\t\tthis.registerTableOption(\"importReader\", \"text\");\r\n\t}\r\n \r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n\t\tif(this.table.options.importFormat){\r\n\t\t\tthis.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n\t\t\tthis.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n\t\t}\r\n\t}\r\n\r\n\tloadDataCheck(data){\r\n\t\treturn this.table.options.importFormat && (typeof data === \"string\" || (Array.isArray(data) && data.length && Array.isArray(data)));\r\n\t}\r\n\r\n\tloadData(data, params, config, silent, previousData){\r\n\t\treturn this.importData(this.lookupImporter(), data)\r\n\t\t\t.then(this.structureData.bind(this))\r\n\t\t\t.catch((err) => {\r\n\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import data\");\r\n\t\t\t\treturn Promise.reject(err);\r\n\t\t\t});\r\n\t}\r\n\r\n\tlookupImporter(importFormat){\r\n\t\tvar importer;\r\n \r\n\t\tif(!importFormat){\r\n\t\t\timportFormat = this.table.options.importFormat;\r\n\t\t}\r\n \r\n\t\tif(typeof importFormat === \"string\"){\r\n\t\t\timporter = Import.importers[importFormat];\r\n\t\t}else{\r\n\t\t\timporter = importFormat;\r\n\t\t}\r\n\r\n\t\tif(!importer){\r\n\t\t\tconsole.error(\"Import Error - Importer not found:\", importFormat);\r\n\t\t}\r\n \r\n\t\treturn importer;\r\n\t}\r\n \r\n\timportFromFile(importFormat, extension){\r\n\t\tvar importer = this.lookupImporter(importFormat);\r\n \r\n\t\tif(importer){\r\n\t\t\treturn this.pickFile(extension)\r\n\t\t\t\t.then(this.importData.bind(this, importer))\r\n\t\t\t\t.then(this.structureData.bind(this))\r\n\t\t\t\t.then(this.setData.bind(this))\r\n\t\t\t\t.catch((err) => {\r\n\t\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import file\");\r\n\t\t\t\t\treturn Promise.reject(err);\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n \r\n\tpickFile(extensions){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar input = document.createElement(\"input\");\r\n\t\t\tinput.type = \"file\";\r\n\t\t\tinput.accept = extensions;\r\n \r\n\t\t\tinput.addEventListener(\"change\", (e) => {\r\n\t\t\t\tvar file = input.files[0],\r\n\t\t\t\treader = new FileReader();\r\n \r\n\t\t\t\tswitch(this.table.options.importReader){\r\n\t\t\t\t\tcase \"buffer\":\r\n\t\t\t\t\t\treader.readAsArrayBuffer(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"binary\":\r\n\t\t\t\t\t\treader.readAsBinaryString(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"url\":\r\n\t\t\t\t\t\treader.readAsDataURL(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"text\":\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treader.readAsText(file);\r\n\t\t\t\t}\r\n \r\n\t\t\t\treader.onload = (e) => {\r\n\t\t\t\t\tresolve(reader.result);\r\n\t\t\t\t};\r\n \r\n\t\t\t\treader.onerror = (e) => {\r\n\t\t\t\t\tconsole.warn(\"File Load Error - Unable to read file\");\r\n\t\t\t\t\treject();\r\n\t\t\t\t};\r\n\t\t\t});\r\n \r\n\t\t\tinput.click();\r\n\t\t});\r\n\t}\r\n \r\n\timportData(importer, fileContents){\r\n\t\tvar data = importer.call(this.table, fileContents);\r\n \r\n\t\tif(data instanceof Promise){\r\n\t\t\treturn data;\r\n\t\t}else{\r\n\t\t\treturn data ? Promise.resolve(data) : Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tstructureData(parsedData){\r\n\t\tvar data = [];\r\n \r\n\t\tif(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n\t\t\tif(this.table.options.autoColumns){\r\n\t\t\t\tdata = this.structureArrayToObject(parsedData);\r\n\t\t\t}else{\r\n\t\t\t\tdata = this.structureArrayToColumns(parsedData);\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\t\t}else{\r\n\t\t\treturn parsedData;\r\n\t\t}\r\n\t}\r\n\r\n\tstructureArrayToObject(parsedData){\r\n\t\tvar columns = parsedData.shift();\r\n\r\n\t\tvar data = parsedData.map((values) => {\r\n\t\t\tvar row = {};\r\n\r\n\t\t\tcolumns.forEach((key, i) => {\r\n\t\t\t\trow[key] = values[i];\r\n\t\t\t});\r\n\r\n\t\t\treturn row;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tstructureArrayToColumns(parsedData){\r\n\t\tvar data = [],\r\n\t\tcolumns = this.table.getColumns();\r\n\r\n\t\t//remove first row if it is the column names\r\n\t\tif(columns[0] && parsedData[0][0]){\r\n\t\t\tif(columns[0].getDefinition().title === parsedData[0][0]){\r\n\t\t\t\tparsedData.shift();\r\n\t\t\t}\r\n\t\t}\r\n \r\n\t\t//convert row arrays to objects\r\n\t\tparsedData.forEach((rowData) => {\r\n\t\t\tvar row = {};\r\n\r\n\t\t\trowData.forEach((value, index) => {\r\n\t\t\t\tvar column = columns[index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\trow[column.getField()] = value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tdata.push(row);\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n \r\n\tsetData(data){\r\n\t\treturn this.table.setData(data);\r\n\t}\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\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\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\trowMouseDown:\"row-mousedown\",\r\n\t\t\trowMouseUp:\"row-mouseup\",\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\tcellMouseDown:\"cell-mousedown\",\r\n\t\t\tcellMouseUp:\"cell-mouseup\",\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\theaderMouseDown:\"column-mousedown\",\r\n\t\t\theaderMouseUp:\"column-mouseup\",\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\tgroupMouseDown:\"group-mousedown\",\r\n\t\t\tgroupMouseUp:\"group-mouseup\",\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(\"headerMouseDown\");\r\n\t\tthis.registerColumnOption(\"headerMouseUp\");\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(\"cellMouseDown\");\r\n\t\tthis.registerColumnOption(\"cellMouseUp\");\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\tvar range;\r\n\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === cell){\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\trange = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(cell.getElement());\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNode(cell.getElement());\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\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\t\twatchers.tap = true;\r\n\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\t\twatchers.tap = null;\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t\t}, 1000);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\t\twatchers.tap = null;\r\n\t\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(watchers.tapDbl){\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t\t}else{\r\n\t\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\t\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;\r\n","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\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\t\tbinding.ctrl = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\t\tbinding.shift = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\t\tbinding.meta = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\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\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.nestedMenuBlock = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\tthis.rootPopup = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"menuContainer\", undefined); //deprecated\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"rowDblClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupDblClickMenu\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerDblClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenuIcon\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t\tthis.registerColumnOption(\"dblClickMenu\");\r\n\t\t\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.deprecatedOptionsCheck();\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\tdeprecatedOptionsCheck(){\r\n\t\tif(!this.deprecationCheck(\"menuContainer\", \"popupContainer\")){\r\n\t\t\tthis.table.options.popupContainer = this.table.options.menuContainer;\r\n\t\t}\r\n\t}\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\t\r\n\t\tif(this.table.options.rowDblClickMenu){\r\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadMenuEvent.bind(this, this.table.options.rowDblClickMenu));\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\t\r\n\t\tif(this.table.options.groupDblClickMenu){\r\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadMenuEvent.bind(this, this.table.options.groupDblClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar\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.headerDblClickMenu && !this.columnSubscribers.headerDblClickMenu){\r\n\t\t\tthis.columnSubscribers.headerDblClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerDblClickMenu\");\r\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickMenu);\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\t\r\n\t\tif(def.dblClickMenu && !this.columnSubscribers.dblClickMenu){\r\n\t\t\tthis.columnSubscribers.dblClickMenu = this.loadMenuTableCellEvent.bind(this, \"dblClickMenu\");\r\n\t\t\tthis.subscribe(\"cell-dblclick\", this.columnSubscribers.dblClickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar icon = column.definition.headerMenuIcon,\r\n\t\theaderMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-popup-button\");\r\n\t\t\r\n\t\tif(icon){\r\n\t\t\tif(typeof icon === \"function\"){\r\n\t\t\t\ticon = icon(column.getComponent());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(icon instanceof HTMLElement){\r\n\t\t\t\theaderMenuEl.appendChild(icon);\r\n\t\t\t}else{\r\n\t\t\t\theaderMenuEl.innerHTML = icon;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t}\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, e, component.getComponent()) : 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, parentPopup){\r\n\t\tvar touch = !(e instanceof MouseEvent),\t\t\r\n\t\tmenuEl = document.createElement(\"div\"),\r\n\t\tpopup;\r\n\t\t\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.rootPopup){\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\tif(this.rootPopup){\r\n\t\t\t\tthis.rootPopup.hide();\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rootPopup = popup = this.popup(menuEl);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpopup = parentPopup.child(menuEl);\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.loadMenu(e, component, item.menu, itemEl, popup);\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\tif(this.rootPopup){\r\n\t\t\t\tthis.rootPopup.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tpopup.show(parentEl || e);\r\n\t\t\r\n\t\tif(popup === this.rootPopup){\r\n\t\t\tthis.rootPopup.hideOnBlur(() => {\r\n\t\t\t\tthis.rootPopup = null;\r\n\t\t\t\t\r\n\t\t\t\tif(this.currentComponent){\r\n\t\t\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\t\t\tthis.currentComponent = null;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.currentComponent = component;\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent());\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 destination 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 && !column.isGroup){\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\tnextCol, 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\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 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\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.getContentsElement(),\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\theaderElement.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.getContentsElement(),\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 destination 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\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, group);\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;\r\n\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\trowEl = 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\trowEl = 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\tnextRow, 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\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 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\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\t\r\n\t\tthis.hoverElement.style.top = Math.min(yPos - this.startY, this.table.rowManager.element.scrollHeight - this.hoverElement.offsetHeight) + \"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 incoming 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\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\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 ? this.moving.getComponent() : undefined, 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\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\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\t\treturn this.connect(table, data.row);\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\t\treturn this.disconnect(table);\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\t\treturn this.dropComplete(table, data.row, data.success);\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 mutation 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\tthis.registerColumnOption(\"mutateLink\");\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(\"cell-value-changed\", this.mutateLink.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\t\tif(Mutator.mutators[value]){\r\n\t\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tmutator = value;\r\n\t\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\tmutateLink(cell){\r\n\t\tvar links = cell.column.definition.mutateLink;\r\n\r\n\t\tif(links){\r\n\t\t\tif(!Array.isArray(links)){\r\n\t\t\t\tlinks = [links];\r\n\t\t\t}\r\n\r\n\t\t\tlinks.forEach((link) => {\r\n\t\t\t\tvar linkCell = cell.row.getCell(link);\r\n\r\n\t\t\t\tif(linkCell){\r\n\t\t\t\t\tlinkCell.setValue(linkCell.getValue(), true, true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\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\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\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.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\t\t\tthis.subscribe(\"footer-redraw\", this.footerRedraw.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\tdisplayRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(displayRows.length){\r\n\t\t\t\tindex = displayRows[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(displayRows.length){\r\n\t\t\t\tindex = displayRows[displayRows.length - 1];\r\n\t\t\t\ttop = displayRows.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\r\n\t\tthis.dispatchExternal(\"pageSizeChanged\", this.size);\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\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){\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.footerAppend(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.footerAppend(this.element);\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\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\tthis.trackChanges();\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\t\treturn this.setPage(1);\r\n\t\r\n\t\t\tcase \"prev\":\r\n\t\t\t\treturn this.previousPage();\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\t\treturn this.nextPage();\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\t\treturn this.setPage(this.max);\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.displayRows(-1);\r\n\t\tvar index = rows.indexOf(row);\r\n\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\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t\tthis.dispatchExternal(\"pageSizeChanged\", 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\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//clear previous cell contents\r\n\t\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\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif(content != null){\r\n\t\t\t\t\t\t\tconsole.warn(\"Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:\", content);\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\tcase \"undefined\":\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\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\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\t\tthis.refreshData();\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\t\treturn Promise.resolve();\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\t\tthis.dataChanging = true;\r\n\t\t\t\treturn this.reloadData(null)\r\n\t\t\t\t\t.finally(() => {\r\n\t\t\t\t\t\tthis.dataChanging = false;\r\n\t\t\t\t\t});\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\treturn this.reloadData(null, true);\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar 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\t\tif(this.page == 1){\r\n\t\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\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}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t\t}\r\n\t\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\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\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\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\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\t\tthis.nextPage();\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\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;\r\n","// read persistance 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\tretrievedData;\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\tretrievedData = this.retrieveData(\"page\");\r\n\r\n\t\t\t\tif(retrievedData){\r\n\t\t\t\t\tif(typeof retrievedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retrievedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retrievedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retrievedData.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\tretrievedData = this.retrieveData(\"group\");\r\n\r\n\t\t\t\tif(retrievedData){\r\n\t\t\t\t\tif(typeof retrievedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retrievedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retrievedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retrievedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retrievedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retrievedData.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(\"column-width\", 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 sorters, 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\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: (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:() => {\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.retrieveData(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//retrieve data from memory\r\n\tretrieveData(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\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\t\treturn col.field === subject.field;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\t\treturn col === subject;\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\t\tdata = this.parseColumns(this.table.columnManager.getColumns());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tdata = this.getGroupConfig();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\t\tdata = this.getPageConfig();\r\n\t\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\tkeys.push(\"visible\");\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\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\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}\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 = -10;\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 Popup extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextPopup\", false);\r\n\t\tthis.registerTableOption(\"rowClickPopup\", false);\r\n\t\tthis.registerTableOption(\"rowDblClickPopup\", false);\r\n\t\tthis.registerTableOption(\"groupContextPopup\", false);\r\n\t\tthis.registerTableOption(\"groupClickPopup\", false);\r\n\t\tthis.registerTableOption(\"groupDblClickPopup\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextPopup\");\r\n\t\tthis.registerColumnOption(\"headerClickPopup\");\r\n\t\tthis.registerColumnOption(\"headerDblClickPopup\");\r\n\t\tthis.registerColumnOption(\"headerPopup\");\r\n\t\tthis.registerColumnOption(\"headerPopupIcon\");\r\n\t\tthis.registerColumnOption(\"contextPopup\");\r\n\t\tthis.registerColumnOption(\"clickPopup\");\r\n\t\tthis.registerColumnOption(\"dblClickPopup\");\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"group\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\t\r\n\t}\r\n\t\r\n\tinitialize(){\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\r\n\t_componentPopupCall(component, contents, position){\r\n\t\tthis.loadPopupEvent(contents, null, component, position);\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextPopup){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickPopup){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadPopupEvent.bind(this, this.table.options.rowClickPopup));\r\n\t\t}\r\n\r\n\t\tif(this.table.options.rowDblClickPopup){\r\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadPopupEvent.bind(this, this.table.options.rowDblClickPopup));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextPopup){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickPopup){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadPopupEvent.bind(this, this.table.options.groupClickPopup));\r\n\t\t}\r\n\r\n\t\tif(this.table.options.groupDblClickPopup){\r\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadPopupEvent.bind(this, this.table.options.groupDblClickPopup));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextPopup && !this.columnSubscribers.headerContextPopup){\r\n\t\t\tthis.columnSubscribers.headerContextPopup = this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextPopup);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickPopup && !this.columnSubscribers.headerClickPopup){\r\n\t\t\tthis.columnSubscribers.headerClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerClickPopup\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickPopup);\r\n\t\t\r\n\t\t\r\n\t\t}if(def.headerDblClickPopup && !this.columnSubscribers.headerDblClickPopup){\r\n\t\t\tthis.columnSubscribers.headerDblClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerDblClickPopup\");\r\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickPopup);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerPopup){\r\n\t\t\tthis.initializeColumnHeaderPopup(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextPopup && !this.columnSubscribers.contextPopup){\r\n\t\t\tthis.columnSubscribers.contextPopup = this.loadPopupTableCellEvent.bind(this, \"contextPopup\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextPopup);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadPopupTableCellEvent.bind(this, \"contextPopup\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickPopup && !this.columnSubscribers.clickPopup){\r\n\t\t\tthis.columnSubscribers.clickPopup = this.loadPopupTableCellEvent.bind(this, \"clickPopup\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickPopup);\r\n\t\t}\r\n\r\n\t\tif(def.dblClickPopup && !this.columnSubscribers.dblClickPopup){\r\n\t\t\tthis.columnSubscribers.dblClickPopup = this.loadPopupTableCellEvent.bind(this, \"dblClickPopup\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.dblClickPopup);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderPopup(column){\r\n\t\tvar icon = column.definition.headerPopupIcon,\r\n\t\theaderPopupEl;\r\n\t\t\r\n\t\theaderPopupEl = document.createElement(\"span\");\r\n\t\theaderPopupEl.classList.add(\"tabulator-header-popup-button\");\r\n\r\n\t\tif(icon){\r\n\t\t\tif(typeof icon === \"function\"){\r\n\t\t\t\ticon = icon(column.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tif(icon instanceof HTMLElement){\r\n\t\t\t\theaderPopupEl.appendChild(icon);\r\n\t\t\t}else{\r\n\t\t\t\theaderPopupEl.innerHTML = icon;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\theaderPopupEl.innerHTML = \"⋮\";\r\n\t\t}\r\n\t\t\r\n\t\theaderPopupEl.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.loadPopupEvent(column.definition.headerPopup, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerPopupEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadPopupTableCellEvent(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.loadPopupEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadPopupTableColumnEvent(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.loadPopupEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadPopupEvent(contents, e, component, position){\r\n\t\tvar renderedCallback;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trenderedCallback = callback;\r\n\t\t}\r\n\t\t\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\tcontents = typeof contents == \"function\" ? contents.call(this.table, e, component.getComponent(), onRendered) : contents;\r\n\t\t\r\n\t\tthis.loadPopup(e, component, contents, renderedCallback, position);\r\n\t}\r\n\t\r\n\tloadPopup(e, component, contents, renderedCallback, position){\r\n\t\tvar touch = !(e instanceof MouseEvent),\r\n\t\tcontentsEl, popup;\r\n\t\t\r\n\t\tif(contents instanceof HTMLElement){\r\n\t\t\tcontentsEl = contents;\r\n\t\t}else{\r\n\t\t\tcontentsEl = document.createElement(\"div\");\r\n\t\t\tcontentsEl.innerHTML = contents;\r\n\t\t}\r\n\t\t\r\n\t\tcontentsEl.classList.add(\"tabulator-popup\");\r\n\r\n\t\tcontentsEl.addEventListener(\"click\", (e) =>{\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\tpopup = this.popup(contentsEl);\r\n\r\n\t\tif(typeof renderedCallback === \"function\"){\r\n\t\t\tpopup.renderCallback(renderedCallback);\r\n\t\t}\r\n\r\n\t\tif(e){\r\n\t\t\tpopup.show(e);\r\n\t\t}else{\r\n\t\t\tpopup.show(component.getElement(), position || \"center\");\r\n\t\t}\r\n\r\n\t\t\r\n\t\tpopup.hideOnBlur(() => {\r\n\t\t\tthis.dispatchExternal(\"popupClosed\", component.getComponent());\r\n\t\t});\r\n\r\n\r\n\r\n\t\tthis.dispatchExternal(\"popupOpened\", component.getComponent());\r\n\t}\r\n}\r\n\r\nPopup.moduleName = \"popup\";\r\n\r\nexport default Popup;\r\n","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.generateTable(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.generateTable(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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\t\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\t\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, \"cellsave\"));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this, \"cellsave\"));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this, \"rowsave\"));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this, \"rowsave\"));\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\t\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tversion;\r\n\t\t\r\n\t\tthis.currentVersion ++;\r\n\t\t\r\n\t\tversion = this.currentVersion;\r\n\t\t\r\n\t\tthis.unwatchData();\r\n\t\t\r\n\t\tthis.data = data;\r\n\t\t\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\t\t\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\t\t\t\tresult;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\t\r\n\t\t\t\t\tself.block(\"data-push\");\r\n\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\t\r\n\t\t\t\t\tresult = self.origFuncs.push.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-push\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\t\t\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\t\t\t\tresult;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-unshift\");\r\n\t\t\t\t\t\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\t\r\n\t\t\t\t\tresult = self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-unshift\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\t\t\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, result;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-shift\");\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.shift.call(data);\r\n\r\n\t\t\t\t\tself.unblock(\"data-shift\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\t\t\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, result;\r\n\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-pop\");\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.pop.call(data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-pop\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\t\t\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, result;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-splice\");\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-splice\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result ;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\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\t\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\t\t\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\twatchTreeChildren (row){\r\n\t\tvar self = this,\r\n\t\tchildField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\t\t\r\n\t\tif(childField){\r\n\t\t\t\r\n\t\t\torigFuncs.push = childField.push;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-push\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-push\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-unshift\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-unshift\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-shift\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-shift\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-pop\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-pop\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-splice\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-splice\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\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\t\r\n\trebuildTree(row){\r\n\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t}\r\n\t\r\n\twatchKey(row, data, key){\r\n\t\tvar self = this,\r\n\t\tprops = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\t\t\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(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"key\");\r\n\t\t\t\t\t\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\t\r\n\t\t\t\t\tself.unblock(\"key\");\r\n\t\t\t\t}\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\t\t\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\t\r\n\tblock(key){\r\n\t\tif(!this.blocked){\r\n\t\t\tthis.blocked = key;\r\n\t\t}\r\n\t}\r\n\t\r\n\tunblock(key){\r\n\t\tif(this.blocked === key){\r\n\t\t\tthis.blocked = false;\r\n\t\t}\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.latestX = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.initialNextColumn = null;\r\n\t\tthis.nextColumn = null;\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t\tthis.registerTableOption(\"resizableColumnFit\", false);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-rendered\", this.layoutColumnHeader.bind(this));\r\n\t}\r\n\t\r\n\tinitializeEventWatchers(){\r\n\t\tif(!this.initialized){\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-rendered\", this.layoutCellHandles.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.deInitializeComponent.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-height\", this.resizeHandle.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.columnLayoutUpdated.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-hide\", this.deInitializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.columnLayoutUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"column-width\", this.columnWidthUpdated.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-delete\", this.deInitializeComponent.bind(this));\r\n\t\t\tthis.subscribe(\"column-height\", this.resizeHandle.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.deInitializeComponent(cell);\r\n\t\t\tthis.initializeColumn(\"cell\", cell, cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tif(column.definition.resizable){\r\n\t\t\tthis.initializeEventWatchers();\r\n\t\t\tthis.deInitializeComponent(column);\r\n\t\t\tthis.initializeColumn(\"header\", column, column, column.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolumnLayoutUpdated(column){\r\n\t\tvar prev = column.prevColumn();\r\n\t\t\r\n\t\tthis.reinitializeColumn(column);\r\n\t\t\r\n\t\tif(prev){\r\n\t\t\tthis.reinitializeColumn(prev);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolumnWidthUpdated(column){\r\n\t\tif(column.modules.frozen){\r\n\t\t\tif(this.table.modules.frozenColumns.leftColumns.includes(column)){\r\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((col) => {\r\n\t\t\t\t\tthis.reinitializeColumn(col);\r\n\t\t\t\t});\r\n\t\t\t}else if(this.table.modules.frozenColumns.rightColumns.includes(column)){\r\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((col) => {\r\n\t\t\t\t\tthis.reinitializeColumn(col);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfrozenColumnOffset(column){\r\n\t\tvar offset = false;\r\n\r\n\t\tif(column.modules.frozen){\r\n\t\t\toffset = column.modules.frozen.marginValue; \r\n\r\n\t\t\tif(column.modules.frozen.position === \"left\"){\r\n\t\t\t\toffset += column.getWidth() - 3;\r\n\t\t\t}else{\r\n\t\t\t\tif(offset){\r\n\t\t\t\t\toffset -= 3;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn offset !== false ? offset + \"px\" : false;\r\n\t}\r\n\t\r\n\treinitializeColumn(column){\r\n\t\tvar frozenOffset = this.frozenColumnOffset(column);\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(cell.modules.resize && cell.modules.resize.handleEl){\r\n\t\t\t\tif(frozenOffset){\r\n\t\t\t\t\tcell.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcell.element.after(cell.modules.resize.handleEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(column.modules.resize && column.modules.resize.handleEl){\r\n\t\t\tif(frozenOffset){\r\n\t\t\t\tcolumn.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.element.after(column.modules.resize.handleEl);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(type, component, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable,\r\n\t\tconfig = {},\r\n\t\tnearestColumn = column.getLastColumn();\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\tconfig = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif((mode === true || mode == type) && this._checkResizability(nearestColumn)){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('span');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\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\tself.startColumn = column;\r\n\t\t\t\tself.initialNextColumn = self.nextColumn = nearestColumn.nextColumn();\r\n\t\t\t\tself._mouseDown(e, nearestColumn, handle);\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//resize column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", (e) => {\r\n\t\t\t\tvar oldWidth = nearestColumn.getWidth();\r\n\t\t\t\t\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tnearestColumn.reinitializeWidth(true);\r\n\t\t\t\t\r\n\t\t\t\tif(oldWidth !== nearestColumn.getWidth()){\r\n\t\t\t\t\tself.dispatch(\"column-resized\", nearestColumn);\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", nearestColumn.getComponent());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen){\r\n\t\t\t\thandle.style.position = \"sticky\";\r\n\t\t\t\thandle.style[column.modules.frozen.position] = this.frozenColumnOffset(column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconfig.handleEl = handle;\r\n\t\t\t\r\n\t\t\tif(element.parentNode && column.visible){\r\n\t\t\t\telement.after(handle);\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcomponent.modules.resize = config;\r\n\t}\r\n\t\r\n\tdeInitializeColumn(column){\r\n\t\tthis.deInitializeComponent(column);\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tthis.deInitializeComponent(cell);\r\n\t\t});\r\n\t}\r\n\t\r\n\tdeInitializeComponent(component){\r\n\t\tvar handleEl;\r\n\t\t\r\n\t\tif(component.modules.resize){\r\n\t\t\thandleEl = component.modules.resize.handleEl;\r\n\t\t\t\r\n\t\t\tif(handleEl && handleEl.parentElement){\r\n\t\t\t\thandleEl.parentElement.removeChild(handleEl);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tresizeHandle(component, height){\r\n\t\tif(component.modules.resize && component.modules.resize.handleEl){\r\n\t\t\tcomponent.modules.resize.handleEl.style.height = height;\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\t\t\r\n\t\tfunction mouseMove(e){\r\n\t\t\tvar x = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX,\r\n\t\t\tstartDiff = x - self.startX,\r\n\t\t\tmoveDiff = x - self.latestX,\r\n\t\t\tblockedBefore, blockedAfter;\r\n\t\t\t\r\n\t\t\tself.latestX = x;\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tstartDiff = -startDiff;\r\n\t\t\t\tmoveDiff = -moveDiff;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tblockedBefore = column.width == column.minWidth || column.width == column.maxWidth;\r\n\t\t\t\r\n\t\t\tcolumn.setWidth(self.startWidth + startDiff);\r\n\t\t\t\r\n\t\t\tblockedAfter = column.width == column.minWidth || column.width == column.maxWidth;\r\n\t\t\t\r\n\t\t\tif(moveDiff < 0){\r\n\t\t\t\tself.nextColumn = self.initialNextColumn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.options.resizableColumnFit && self.nextColumn && !(blockedBefore && blockedAfter)){\r\n\t\t\t\tlet colWidth = self.nextColumn.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(moveDiff > 0){\r\n\t\t\t\t\tif(colWidth <= self.nextColumn.minWidth){\r\n\t\t\t\t\t\tself.nextColumn = self.nextColumn.nextColumn();\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(self.nextColumn){\r\n\t\t\t\t\tself.nextColumn.setWidth(self.nextColumn.getWidth() - moveDiff);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.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\t\t\t\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.table.columnManager.verticalAlignHeaders();\r\n\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 interfering 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.latestX = self.startX;\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 interfering 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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.binding = false;\r\n\t\tthis.visibilityObserver = false;\r\n\t\tthis.resizeObserver = false;\r\n\t\tthis.containerObserver = false;\r\n\t\t\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\t\t\r\n\t\tthis.autoResize = false;\r\n\t\t\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.initialRedraw = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\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\t\t\t\r\n\t\t\tif(typeof IntersectionObserver !== \"undefined\" && typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeVisibilityObserver();\r\n\t\t\t\t\r\n\t\t\t\tthis.autoResize = true;\r\n\t\t\t\t\r\n\t\t\t\tthis.resizeObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\t\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tthis.redrawTable();\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\tthis.resizeObserver.observe(table.element);\r\n\t\t\t\t\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tthis.redrawTable();\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.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\t\t\t\t\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\t\t\t\t\t\ttable.columnManager.rerenderColumns(true);\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeVisibilityObserver(){\r\n\t\tthis.visibilityObserver = new IntersectionObserver((entries) => {\r\n\t\t\tthis.visible = entries[0].isIntersecting;\r\n\t\t\t\r\n\t\t\tif(!this.initialized){\r\n\t\t\t\tthis.initialized = true;\r\n\t\t\t\tthis.initialRedraw = !this.visible;\r\n\t\t\t}else{\r\n\t\t\t\tif(this.visible){\r\n\t\t\t\t\tthis.redrawTable(this.initialRedraw);\r\n\t\t\t\t\tthis.initialRedraw = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.visibilityObserver.observe(this.table.element);\r\n\t}\r\n\t\r\n\tredrawTable(force){\r\n\t\tif(this.initialized && this.visible){\r\n\t\t\tthis.table.columnManager.rerenderColumns(true);\r\n\t\t\tthis.table.redraw(force);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\t\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.resizeObserver){\r\n\t\t\tthis.resizeObserver.unobserve(this.table.element);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.visibilityObserver){\r\n\t\t\tthis.visibilityObserver.unobserve(this.table.element);\r\n\t\t}\r\n\t\t\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\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\t\t\t\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.generateCollapsedRowContent.bind(this));\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 working = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = this.table.modules.layout.getMode() == \"fitColumns\" ? this.table.columnManager.getFlexBaseWidth() : this.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (this.table.options.headerVisible ? this.table.columnManager.element.clientWidth : this.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 = this.columns[this.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.hideColumn(column);\r\n\t\t\t\t\tthis.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 = this.columns[this.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\tthis.showColumn(column);\r\n\t\t\t\t\t\t\tthis.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(!this.table.rowManager.activeRowsCount){\r\n\t\t\t\tthis.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.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 data = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach((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 && this.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\tgetTable:() => {\r\n\t\t\t\t\t\t\treturn this.table;\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(this.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;\r\n","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 whether 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\t\tthis.table.rowManager.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\tthis._rowSelectionChanged();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\t\tif(rowMatch){\r\n\t\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowMatch = this.table.rowManager.getRows(rows);\r\n\t\t\t\t\t\r\n\t\t\t\t\trowMatch.forEach((row) => {\r\n\t\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(rowMatch.length){\r\n\t\t\t\t\t\tthis._rowSelectionChanged();\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\t\t\tdefault:\r\n\t\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t\t}\r\n\t\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\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\t\tif(params.locale){\r\n\t\t\t\t\tlocale = this.langLocale();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\t\tlocale = params.locale;\r\n\t\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\tif(!DT.isDateTime(a)){\r\n\t\t\tif(format === \"iso\"){\r\n\t\t\t\ta = DT.fromISO(String(a));\r\n\t\t\t}else{\r\n\t\t\t\ta = DT.fromFormat(String(a), format);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(!DT.isDateTime(b)){\r\n\t\t\tif(format === \"iso\"){\r\n\t\t\t\tb = DT.fromISO(String(b));\r\n\t\t\t}else{\r\n\t\t\t\tb = DT.fromFormat(String(b), format);\r\n\t\t\t}\r\n\t\t}\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 type = params.type || \"length\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\t\tvar result;\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\t\tresult = value.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\t\tresult = value.reduce(function(c, d){\r\n\t\t\t\t\treturn c + d;\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\t\tresult = Math.max.apply(null, value) ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\t\tresult = Math.min.apply(null, value) ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\t\tresult = value.reduce(function(c, d){\r\n\t\t\t\t\treturn c + d;\r\n\t\t\t\t}) / value.length;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\temptyAlign = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\treturn calc(b) - calc(a);\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\t\tthis.registerTableOption(\"headerSortClickElement\", \"header\"); //element which triggers sort when clicked\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\tinitialize(){\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\ttableBuilt(){\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\tremoteSortParams(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\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tsorter = column.definition.sorter;\r\n\t\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\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tswitch(this.table.options.headerSortClickElement){\r\n\t\t\t\tcase \"icon\":\r\n\t\t\t\t\tarrowEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tswitch(this.table.options.headerSortElement){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault:\r\n\t\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\tthis.setColumnHeaderSortIcon(column, \"none\");\r\n\r\n\t\t\t//sort on click\r\n\t\t\t(this.table.options.headerSortClickElement === \"icon\" ? arrowEl : colEl).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\t\tdir = \"desc\";\r\n\t\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\t\tdir = \"asc\";\r\n\t\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\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\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\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push(match);\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(null, false, false);\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\t\tsorter = \"string\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t\t}else{\r\n\t\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\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\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\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;\r\n\r\n\t\t\t\tif(item.column){\r\n\t\t\t\t\tsortObj = item.column.modules.sort;\r\n\r\n\t\t\t\t\tif(sortObj){\r\n\r\n\t\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t\t}\r\n\r\n\t\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\t\tsortListActual.push(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t\t}\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((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\tthis.setColumnHeaderSortIcon(column, \"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 === \"asc\" ? \"ascending\" : \"descending\");\r\n\t\tthis.setColumnHeaderSortIcon(column, dir);\r\n\t}\r\n\r\n\tsetColumnHeaderSortIcon(column, dir){\r\n\t\tvar sortEl = column.modules.sort.element,\r\n\t\tarrowEl;\r\n\r\n\t\tif(column.definition.headerSort && typeof this.table.options.headerSortElement === \"function\"){\r\n\t\t\twhile(sortEl.firstChild) sortEl.removeChild(sortEl.firstChild);\r\n\r\n\t\t\tarrowEl = this.table.options.headerSortElement.call(this.table, column.getComponent(), dir);\r\n\t\t\t\r\n\t\t\tif(typeof arrowEl === \"object\"){\r\n\t\t\t\tsortEl.appendChild(arrowEl);\r\n\t\t\t}else{\r\n\t\t\t\tsortEl.innerHTML = arrowEl;\r\n\t\t\t}\r\n\t\t}\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;\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;","import Module from '../../core/Module.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nclass Tooltip extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.tooltipSubscriber = null,\r\n\t\tthis.headerSubscriber = null,\r\n\t\t\r\n\t\tthis.timeout = null;\r\n\t\tthis.popupInstance = null;\r\n\t\t\r\n\t\tthis.registerTableOption(\"tooltipGenerationMode\", undefined); //deprecated\r\n\t\tthis.registerTableOption(\"tooltipDelay\", 300); \r\n\t\t\r\n\t\tthis.registerColumnOption(\"tooltip\");\r\n\t\tthis.registerColumnOption(\"headerTooltip\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.deprecatedOptionsCheck();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tdeprecatedOptionsCheck(){\r\n\t\tthis.deprecationCheckMsg(\"tooltipGenerationMode\", \"This option is no longer needed as tooltips are always generated on hover now\");\r\n\t}\t\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.headerTooltip && !this.headerSubscriber){\r\n\t\t\tthis.headerSubscriber = true;\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-mousemove\", this.mousemoveCheck.bind(this, \"headerTooltip\"));\r\n\t\t\tthis.subscribe(\"column-mouseout\", this.mouseoutCheck.bind(this, \"headerTooltip\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition.tooltip && !this.tooltipSubscriber){\r\n\t\t\tthis.tooltipSubscriber = true;\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-mousemove\", this.mousemoveCheck.bind(this, \"tooltip\"));\r\n\t\t\tthis.subscribe(\"cell-mouseout\", this.mouseoutCheck.bind(this, \"tooltip\"));\r\n\t\t}\r\n\t}\r\n\t\r\n\tmousemoveCheck(action, e, component){\r\n\t\tvar tooltip = action === \"tooltip\" ? component.column.definition.tooltip : component.definition.headerTooltip;\r\n\t\t\r\n\t\tif(tooltip){\r\n\t\t\tthis.clearPopup();\r\n\t\t\tthis.timeout = setTimeout(this.loadTooltip.bind(this, e, component, tooltip), this.table.options.tooltipDelay);\r\n\t\t}\r\n\t}\r\n\r\n\tmouseoutCheck(action, e, component){\r\n\t\tif(!this.popupInstance){\r\n\t\t\tthis.clearPopup();\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearPopup(action, e, component){\r\n\t\tclearTimeout(this.timeout);\r\n\t\tthis.timeout = null;\r\n\t\t\r\n\t\tif(this.popupInstance){\r\n\t\t\tthis.popupInstance.hide();\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadTooltip(e, component, tooltip){\r\n\t\tvar contentsEl, renderedCallback, coords;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trenderedCallback = callback;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof tooltip === \"function\"){\r\n\t\t\ttooltip = tooltip(e, component.getComponent(), onRendered);\r\n\t\t}\r\n\t\t\r\n\t\tif(tooltip instanceof HTMLElement){\r\n\t\t\tcontentsEl = tooltip;\r\n\t\t}else{\r\n\t\t\tcontentsEl = document.createElement(\"div\");\r\n\t\t\t\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(component instanceof Cell){\r\n\t\t\t\t\ttooltip = component.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(component.definition.field){\r\n\t\t\t\t\t\tthis.langBind(\"columns|\" + component.definition.field, (value) => {\r\n\t\t\t\t\t\t\tcontentsEl.innerHTML = tooltip = value || component.definition.title;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\ttooltip = component.definition.title;\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\tcontentsEl.innerHTML = tooltip;\r\n\t\t}\r\n\t\t\r\n\t\tif(tooltip || tooltip === 0 || tooltip === false){\r\n\t\t\tcontentsEl.classList.add(\"tabulator-tooltip\");\r\n\r\n\t\t\tcontentsEl.addEventListener(\"mousemove\", e => e.preventDefault());\r\n\t\t\t\r\n\t\t\tthis.popupInstance = this.popup(contentsEl);\r\n\t\t\t\r\n\t\t\tif(typeof renderedCallback === \"function\"){\r\n\t\t\t\tthis.popupInstance.renderCallback(renderedCallback);\r\n\t\t\t}\r\n\r\n\t\t\tcoords = this.popupInstance.containerEventCoords(e);\r\n\t\t\t\r\n\t\t\tthis.popupInstance.show(coords.x + 15, coords.y + 15).hideOnBlur(() => {\r\n\t\t\t\tthis.dispatchExternal(\"TooltipClosed\", component.getComponent());\r\n\t\t\t\tthis.popupInstance = null;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"TooltipOpened\", component.getComponent());\r\n\t\t}\r\n\t}\r\n}\r\n\r\nTooltip.moduleName = \"tooltip\";\r\n\r\nexport default Tooltip;\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\r\n\t\tvalue = Number(value);\r\n\r\n\t\treturn !isNaN(value) && 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\t\r\n\t\tvalue = Number(value);\r\n\r\n\t\treturn !isNaN(value) && 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\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn 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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.invalidCells = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\t\t\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\t\t\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\t\t\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\t\t\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\t\r\n\t\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\t\r\n\t\tthis.subscribe(\"edit-success\", this.editValidate.bind(this));\r\n\t\tthis.subscribe(\"edit-editor-clear\", this.editorClear.bind(this));\r\n\t\tthis.subscribe(\"edit-edited-clear\", this.editedClear.bind(this));\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Event Handling //////////\r\n\t///////////////////////////////////\r\n\t\r\n\teditValidate(cell, value, previousValue){\r\n\t\tvar valid = this.table.options.validationMode !== \"manual\" ? this.validate(cell.column.modules.validate, cell, value) : true;\r\n\t\t\r\n\t\t// allow time for editor to make render changes then style cell\r\n\t\tif(valid !== true){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\tthis.dispatchExternal(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn valid;\r\n\t}\r\n\t\r\n\teditorClear(cell, cancelled){\r\n\t\tif(cancelled){\r\n\t\t\tif(cell.column.modules.validate){\r\n\t\t\t\tthis.cellValidate(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t}\r\n\t\r\n\teditedClear(cell){\r\n\t\tif(cell.modules.validate){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? (cell.modules.validate.invalid || true) : true;\r\n\t}\r\n\t\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(this.cellValidate(cell) !== true){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\t\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\t\t\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(this.cellValidate(cell) !== true){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\t\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\t\t\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\t\t\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\t\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\t\t\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\t\t\t\r\n\t\t\tvar valid = row.validate();\r\n\t\t\t\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\t\t\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\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\t\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\t\t\r\n\t\tif(column.definition.validator){\r\n\t\t\t\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\t\t\t\t\t\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\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\t\t\t\t\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\t\t\t\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\t\t\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tpos = value.indexOf(':');\r\n\t\t\t\r\n\t\t\t\tif(pos > -1){\r\n\t\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttype = value;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\treturn this._buildValidator(type, params);\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\treturn this._buildValidator(value);\r\n\t\t\t\r\n\t\t\tcase \"object\":\r\n\t\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_buildValidator(type, params){\r\n\t\t\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\t\t\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\t\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tfailedValidators = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\t\t\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\tfailedValidators.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\t\t\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\t\t\r\n\t\tif(!failedValidators.length){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t\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 = failedValidators;\r\n\t\t\t\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\t\t\t\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\t\t\r\n\t\treturn failedValidators.length ? failedValidators : true;\r\n\t}\r\n\t\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\t\t\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\t\t\t\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\t\t\t\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;\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;"],"names":["defaultOptions","RendererVirtualDomHorizontal","RendererBasicHorizontal","RendererVirtualDomVertical","RendererBasicVertical","InteractionMonitor","generateParamsList","defaultURLGenerator","List","Edit","html","textarea","tickCross","datetime","star","progress","csv","json","array","Popup","number","date","time"],"mapp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,GAAG,EAAE,CAAC;CAClB;CACA,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK;CACtC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;CACpC,GAAG,CAAC,CAAC;CACL;CACA,EAAE,OAAO,MAAM,CAAC;CAChB,EAAE;CACF;CACA,CAAC,eAAe,CAAC,IAAI,CAAC;CACtB,EAAE,IAAI,YAAY,CAAC;CACnB;CACA,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;CAC5D;CACA,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC;CACnE,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC;CACzC;CACA,GAAG,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;CAClD;CACA,GAAG,GAAG,YAAY,GAAG,CAAC,CAAC,CAAC;CACxB,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;CAC9C,IAAI;CACJ,GAAG;CACH,EAAE;CACF,CAAC;AACD;CACA,QAAQ,CAAC,UAAU,GAAG,UAAU,CAAC;AACjC;CACA;CACA,QAAQ,CAAC,UAAU,GAAG,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CC9SvC;AAIA;CACA,MAAM,aAAa,SAAS,SAAS,CAAC,EAAE;AACxC;CACA;CACA,IAAI,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC;;;;"} \ No newline at end of file diff --git a/dist/js/tabulator.min.js b/dist/js/tabulator.min.js index f91295d8b..b91488fc4 100644 --- a/dist/js/tabulator.min.js +++ b/dist/js/tabulator.min.js @@ -1,3 +1,3 @@ -/* Tabulator v5.4.0 (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";class e{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}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(e){return this.table.modules.layout.layout(e)}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]}deprecationCheck(e,t){return this.table.deprecationAdvisor.check(e,t)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class t{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 n&&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.rerenderColumns(!0),t}}var i={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,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};class s{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 o 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")}_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)}));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":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){this.setValueProcessData(e,t,i)&&(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,i){var s=!1;return(this.value!==e||i)&&(s=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),s&&this.dispatch("cell-value-changed",this),s}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.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,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,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 s(this)),this.component}}class n 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.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 n(e,this);this.attachColumn(i)})),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end"}return 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(n.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach((e=>{-1===n.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)}_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._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;(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.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){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.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),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":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{t.push(e),t=t.concat(e.getColumns(!0))})):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach((function(e){t.push(e.getDefinition(!0))})),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach((function(t){t.visible&&(e=!0)})),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(e){e.show()})),this.isGroup||null!==this.width||this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(e){e.hide()})),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach((function(t){t.visible&&(e+=t.getWidth())})),this.contentElement.style.maxWidth=e-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-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.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach((function(e){e.setMinWidth()}))}setMaxWidth(e){this.minWidth&&e{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 t(this)),this.component}}n.defaultOptionList=i;class r{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 a{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(let e in t)i.hasOwnProperty(e)||console.warn("Invalid "+this.msgType+" option:",e);for(let e in i)e in t?i[e]=t[e]:Array.isArray(i[e])?i[e]=Object.assign([],i[e]):"object"==typeof i[e]&&null!==i[e]?i[e]=Object.assign({},i[e]):void 0===i[e]&&delete i[e];return i}}class l 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 s=this.rows().indexOf(e),o=e.getElement(),n=0;return new Promise(((a,l)=>{if(s>-1){if(void 0===i&&(i=this.table.options.scrollToRowIfVisible),!i&&r.elVisible(o)&&(n=r.elOffset(o).top-r.elOffset(this.elementVertical).top)>0&&n{e.element.appendChild(t.getElement()),t.cellRendered()}))}reinitializeColumnWidths(e){e.forEach((function(e){e.reinitializeWidth()}))}}class d extends l{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(){"fitDataTable"==this.options("layout")&&console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),this.options("responsiveLayout")&&console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),this.options("rtl")&&console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction")}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,i={};e.visible&&(e.modules.frozen||(t=e.getWidth(),i.leftPos=s,i.rightPos=s+t,i.width=t,this.isFitData&&(i.fitDataCheck=!e.modules.vdomHoz||e.modules.vdomHoz.fitDataCheck),s+t>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;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach((e=>{!e.definition.width&&e.visible&&(i=!0)})),i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,e=this.chain("rows-sample",[1],[],(()=>this.table.rowManager.getDisplayRows()))[0])){t=e.getElement(),e.generateCells(),this.tableElement.appendChild(t);for(let i=0;i{e!==this.columns[i]&&(t=!1)})),!t)}reinitializeRows(){var e=this.getVisibleRows(),t=this.table.rowManager.getRows().filter((t=>!e.includes(t)));e.forEach((e=>{this.reinitializeRow(e,!0)})),t.forEach((e=>{e.deinitialize()}))}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 t=e.getCell(i);e.getElement().insertBefore(t.getElement(),e.getCell(this.columns[this.rightCol]).getElement().nextSibling),t.cellRendered()}})),this.fitDataColActualWidthCheck(i),this.rightCol++,this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth()):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol-1];if(i)if(i.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){e=!0,this.getVisibleRows().forEach((e=>{if("group"!==e.type){var t=e.getCell(i);e.getElement().insertBefore(t.getElement(),e.getCell(this.columns[this.leftCol]).getElement()),t.cellRendered()}})),this.leftCol--,this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=i.getWidth();let t=this.fitDataColActualWidthCheck(i);t&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+t,this.vDomPadRight-=t)}else t=!1;else t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol];i&&i.modules.vdomHoz.leftPos>this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach((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)}}})),this.vDomPadRight+=i.getWidth(),this.rightCol--):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol];i&&i.modules.vdomHoz.rightPos{if("group"!==e.type){var t=e.getCell(i);try{e.getElement().removeChild(t.getElement())}catch(e){console.warn("Could not removeColLeft",e.message)}}})),this.vDomPadLeft+=i.getWidth(),this.leftCol++):t=!1}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},this.table.modules.frozenColumns&&this.table.modules.frozenColumns.leftColumns.forEach((t=>{this.appendCell(e,t)}));for(let t=this.leftCol;t<=this.rightCol;t++)this.appendCell(e,this.columns[t]);this.table.modules.frozenColumns&&this.table.modules.frozenColumns.rightColumns.forEach((t=>{this.appendCell(e,t)}))}}appendCell(e,t){if(t&&t.visible){let i=e.getCell(t);e.getElement().appendChild(i.getElement()),i.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 c extends e{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.contentsElement=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new a(this.table,"column definition",i),this.redrawBlock=!1,this.redrawBlockUpdate=null,this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.contentsElement=this.createHeaderContentsElement(),this.element=this.createHeaderElement(),this.contentsElement.insertBefore(this.headersElement,this.contentsElement.firstChild),this.element.insertBefore(this.contentsElement,this.element.firstChild),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("scrollbar-vertical",this.padVerticalScrollbar.bind(this))}padVerticalScrollbar(e){this.table.rtl?this.headersElement.style.marginLeft=e+"px":this.headersElement.style.marginRight=e+"px"}initializeRenderer(){var e,t={virtual:d,basic:h};(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:",this.table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderContentsElement(){var e=document.createElement("div");return e.classList.add("tabulator-header-contents"),e.setAttribute("role","rowgroup"),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}getContentsElement(){return this.contentsElement}getHeadersElement(){return this.headersElement}scrollHorizontal(e){this.contentsElement.scrollLeft=e,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.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,i){var s=new n(e,this),o=s.getElement(),r=i?this.findColumnIndex(i):i;if(i&&r>-1){var a=i.getTopColumn(),l=this.columns.indexOf(a),h=a.getElement();t?(this.columns.splice(l,0,s),h.parentNode.insertBefore(o,h)):(this.columns.splice(l+1,0,s),h.parentNode.insertBefore(o,h.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.redrawBlock||(this.headersElement.style.height="",this.columns.forEach((e=>{e.clearVerticalAlign()})),this.columns.forEach((t=>{var i=t.getHeight();i>e&&(e=i)})),this.headersElement.style.height=e+"px",this.columns.forEach((t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)})),this.table.rowManager.adjustTableSize())}findColumn(e){var i;if("object"!=typeof e)return this.columnsByField[e]||!1;if(e instanceof n)return e;if(e instanceof t)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return i=[],this.columns.forEach((e=>{i.push(e),i=i.concat(e.getColumns(!0))})),i.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(){var e=this.columnsByIndex.findIndex((e=>e.visible));return e>-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){t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.moveColumnActual(e,t,i),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.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.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()}rerenderColumns(e,t){this.redrawBlock?(!1===e||!0===e&&null===this.redrawBlockUpdate)&&(this.redrawBlockUpdate=e):this.renderer.rerenderColumns(e,t)}blockRedraw(){this.redrawBlock=!0,this.redrawBlockUpdate=null}restoreRedraw(){this.redrawBlock=!1,this.verticalAlignHeaders(),this.renderer.rerenderColumns(this.redrawBlockUpdate)}redraw(e){r.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(e),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class u{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(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(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 p 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.position=0,this.positionWatchers=[],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)}deinitialize(){this.initialized=!1}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,i=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(t=this.table.options.resizableRows?this.element.clientHeight:0,this.cells.forEach((function(e){var t=e.getHeight();t>i&&(i=t)})),this.height=e?Math.max(i,t):this.manualHeight?this.height:Math.max(i,t)),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.table.options.rowHeight&&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&&r.elVisible(this.element),s={};return new Promise(((o,n)=>{"string"==typeof e&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(s=Object.assign(s,this.data),s=Object.assign(s,e)),t=this.chain("row-data-changing",[this,s,e],null,e);for(let e in t)this.data[e]=t[e];this.dispatch("row-data-save-after",this);for(let s in e){this.table.columnManager.getColumnsByFieldRoot(s).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()),o()}))}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.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t{e(this.position)})))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new u(this)),this.component}}class m extends l{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=r.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=r.elOffset(t).top-r.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class g extends l{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.rows().length?this._virtualRenderFill(!1===i?this.rows.length-1:i,!0,s||0):(this.clear(),this.table.rowManager._showPlaceholder()),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 s=this.tableElement,o=this.elementVertical,n=0,a=0,l=0,h=0,d=0,c=this.rows(),u=c.length,p=this.elementVertical.clientHeight;if(i=i||0,e=e||0){for(;s.firstChild;)s.removeChild(s.firstChild);(l=(u-e+1)*this.vDomRowHeight)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*m),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-p),s.style.paddingTop=this.vDomTopPad+"px",s.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+h+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-p:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-p),this.elementVertical.scrollWidth>this.elementVertical.offsetWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-p),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,o.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,a=!0;a;)if(this.vDomTop){let l,h,d=e[n];d&&r=l?(this.styleRow(d,n),i.insertBefore(d.getElement(),i.firstChild),d.initialized&&d.heightInitialized||s.push(d),d.initialize(),h||(l=d.getElement().offsetHeight,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l)),t-=l,o+=l,this.vDomTop--,n--,r++):a=!1):a=!1}else a=!1;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,n=!0;n;){let r,a=e[this.vDomTop];a&&o=r?(this.vDomTop++,t-=r,s+=r,i.push(a),o++):n=!1):n=!1}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,a=!0;a;){let l,h,d=e[n];d&&r=l?(this.styleRow(d,n),i.appendChild(d.getElement()),d.initialized&&d.heightInitialized||s.push(d),d.initialize(),h||(l=d.getElement().offsetHeight,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l)),t-=l,o+=l,this.vDomBottom++,n++,r++):a=!1):a=!1}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,n=!0;n;){let r,a=e[this.vDomBottom];a&&o=r?(this.vDomBottom--,t-=r,s+=r,i.push(a),o++):n=!1):n=!1}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 b 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.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.scrollbarWidth=0,this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),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}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(void 0===e)return!1;return this.rows.find((t=>t.data[this.table.options.index]==e))||!1}if(e instanceof p)return e;if(e instanceof u)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){return this.getDisplayRows().find((t=>t.getPosition()===e&&t.isDisplayed()))}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 p(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.regenerateRowPositions(),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]),(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.regenerateRowPositions(),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 p?e:new p(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.regenerateRowPositions(),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 s=this.table,o="",n=0,a=["all","dataPipeline","display","displayPipeline","end"];if(!this.table.destroyed){if("function"==typeof e)if((n=this.dataPipeline.findIndex((t=>t.handler===e)))>-1)o="dataPipeline",t&&(n==this.dataPipeline.length-1?o="display":n++);else{if(!((n=this.displayPipeline.findIndex((t=>t.handler===e)))>-1))return void console.error("Unable to refresh data, invalid handler provided",e);o="displayPipeline",t&&(n==this.displayPipeline.length-1?o="end":n++)}else o=e||"all",n=0;if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===o&&n{"row"===e.type&&(e.setPosition(t),t++)}))}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}setDisplayRows(e,t){this.displayRows[t]=e,t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length)}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=[];if(e&&!0!==e)switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0)}else t=this.chain("rows-retrieve",e,null,this.rows)||this.rows;return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:(this.dispatchExternal("renderStarted"),this.renderer.rerenderRows(e),this.fixedHeight||this.adjustTableSize(),this.scrollBarCheck(),this.dispatchExternal("renderComplete"))}scrollBarCheck(){var e=0;this.element.scrollHeight>this.element.clientHeight&&(e=this.element.offsetWidth-this.element.clientWidth),e!==this.scrollbarWidth&&(this.scrollbarWidth=e,this.dispatch("scrollbar-vertical",e))}initializeRenderer(){var e,t={virtual:g,basic:m};(e="string"==typeof this.table.options.renderVertical?t[this.table.options.renderVertical]:this.table.options.renderVertical)?(this.renderMode=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:",this.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(!0))):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.scrollBarCheck(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){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),this.tableElement.style.minWidth=""}_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,t=this.element.clientHeight;if("fill"===this.renderer.verticalFillMode){let i=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?(e=isNaN(this.table.options.minHeight)?this.table.options.minHeight:this.table.options.minHeight+"px",this.element.style.minHeight=e||"calc(100% - "+i+"px)",this.element.style.height="calc(100% - "+i+"px)",this.element.style.maxHeight="calc(100% - "+i+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-i+"px",this.element.scrollTop=this.scrollTop),this.renderer.resize(),this.fixedHeight||t==this.element.clientHeight||(this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw()),this.scrollBarCheck()}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 f extends e{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1}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)if("string"==typeof this.table.options.footerElement)"<"===this.table.options.footerElement[0]?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement));else this.element=this.table.options.footerElement}getElement(){return this.element}append(e){this.activate(),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e){this.activate(),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(){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display=""))}redraw(){this.dispatch("footer-redraw")}}class v 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","mouseup","mousedown","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,this.pseudoTrackers[e].target),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]]||(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={},n={};for(let e of i){let i,r=t[e],a=this.previousTargets[e];if(a&&a.target===r)i=a.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()===r)),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(r));break;case"cell":s.components.includes("cell")&&(o.row instanceof p?i=o.row.findCell(r):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&&(o[e]=i,n[e]={target:r,component:i})}return this.previousTargets=n,o}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 w{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("_")||this.table.options.debugInvalidComponentFuncs&&console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class C extends e{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,i,s,o,n){var r=++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.alertLoader(),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);r==this.requestOrder?(this.clearAlert(),!1!==t&&(this.dispatchExternal("dataLoaded",t),this.table.rowManager.setData(t,s,void 0===n?!s:n))):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.alertError(),setTimeout((()=>{this.clearAlert()}),this.table.options.dataLoaderErrorTimeout)})).finally((()=>{this.loading=!1}))):(this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,s,void 0===n?!s:n),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++}alertLoader(){("function"==typeof this.table.options.dataLoader?this.table.options.dataLoader():this.table.options.dataLoader)&&this.table.alertManager.alert(this.table.options.dataLoaderLoading||this.langText("data|loading"))}alertError(){this.table.alertManager.alert(this.table.options.dataLoaderError||this.langText("data|error"),"error")}clearAlert(){this.table.alertManager.clear()}}class E{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._notifySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifySubscriptionChange(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._notifySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}subscribed(e){return this.events[e]&&this.events[e].length}_notifySubscriptionChange(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 y{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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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}_notifySubscriptionChange(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 R extends e{constructor(e){super(e)}_warnUser(){this.options("debugDeprecation")&&console.warn(...arguments)}check(e,t){var i="";return void 0===this.options(e)||(i="Deprecated Setup Option - Use of the %c"+e+"%c option is now deprecated",t?(i=i+", Please use the %c"+t+"%c option instead",this._warnUser(i,"font-weight: bold;","font-weight: normal;","font-weight: bold;","font-weight: normal;")):this._warnUser(i,"font-weight: bold;","font-weight: normal;"),!1)}checkMsg(e,t){return void 0===this.options(e)||(this._warnUser("%cDeprecated Setup Option - Use of the %c"+e+" %c option is now deprecated, "+t,"font-weight: normal;","font-weight: bold;","font-weight: normal;"),!1)}msg(e){this._warnUser(e)}}class x{static register(e){x.tables.push(e)}static deregister(e){var t=x.tables.indexOf(e);t>-1&&x.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.stopPropagation()}))),this}_fitToScreen(e,t,i,s,o){var n=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;if((e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",this.element.style.right=i?this.container.offsetWidth-s.left+"px":this.container.offsetWidth-e+"px",this.reversedX=!0),t+this.element.offsetHeight>Math.max(this.container.offsetHeight,n?this.container.scrollHeight:0))if(i)if("bottom"===o)this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";else this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px";else this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout((()=>{this.visible&&(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),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)}),100),this.blurCallback=e),this}_escapeCheck(e){27==e.keyCode&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new T(this.table,e,this),this.childPopup}}class k 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]=(...i)=>(this.table.initGuard(e),t(...i)):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}displayRows(e){var t,i=this.table.rowManager.displayRows.length-1;if(this._handler&&(t=this.table.rowManager.displayPipeline.findIndex((e=>e.handler===this._handler)))>-1&&(i=t),e&&(i+=e),this._handler)return i>-1?this.table.rowManager.getDisplayRows(i):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new T(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}function M(e,t){e.forEach((function(e){e.reinitializeWidth()})),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}var L={fitData:function(e,t){t&&this.table.columnManager.renderer.reinitializeColumnWidths(e),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataFill:M,fitDataTable:M,fitDataStretch:function(e,t){var i=0,s=this.table.rowManager.element.clientWidth,o=0,n=!1;e.forEach(((e,t)=>{e.widthFixed||e.reinitializeWidth(),(this.table.options.responsiveLayout?e.modules.responsive.visible:e.visible)&&(n=e),e.visible&&(i+=e.getWidth())})),n?(o=s-i+n.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(n.setWidth(0),this.table.modules.responsiveLayout.update()),o>0?n.setWidth(o):n.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e,t){var i,s,o=this.table.rowManager.element.getBoundingClientRect().width,n=0,r=0,a=0,l=[],h=[],d=0,c=0;function u(e){return"string"==typeof e?e.indexOf("%")>-1?o/100*parseInt(e):parseInt(e):e}function p(e,t,i,s){var o=[],n=0,r=0,l=0,h=a,d=0,c=0,m=[];function g(e){return i*(e.column.definition.widthGrow||1)}function b(e){return u(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&&(o-=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=u(t),n+=s>i?s:i,e.definition.widthShrink&&(h.push({column:e,width:s>i?s:i}),d+=e.definition.widthShrink)):(l.push({column:e,width:0}),a+=e.definition.widthGrow||1))})),r=o-n,i=Math.floor(r/a),c=p(l,r,i,!1),l.length&&c>0&&(l[l.length-1].width+=c),l.forEach((function(e){r-=e.width})),(s=Math.abs(c)+r)>0&&d&&(c=p(h,s,Math.floor(s/d),!0)),c&&h.length&&(h[h.length-1].width-=c),l.forEach((function(e){e.column.setWidth(e.width)})),h.forEach((function(e){e.column.setWidth(e.width)}))}};class D extends k{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;D.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(e){this.dispatch("layout-refreshing"),D.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),this.dispatch("layout-refreshed")}}D.moduleName="layout",D.modes=L;class S extends k{constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=r.deepClone(S.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=r.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=(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)}))}}S.moduleName="localize",S.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 P extends k{constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[];return x.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)}}P.moduleName="comms";var z=Object.freeze({__proto__:null,LayoutModule:D,LocalizeModule:S,CommsModule:P});class F{constructor(e,t){this.bindStaticFunctionality(e),this.bindModules(e,z,!0),t&&this.bindModules(e,t)}bindStaticFunctionality(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=x.lookupTable(e,!0);return!(Array.isArray(t)&&!t.length)&&t},e.prototype.bindModules=function(){var t=[],i=[],s=[];for(var o in this.modules={},e.moduleBindings){let n=e.moduleBindings[o],r=new n(this);this.modules[o]=r,n.prototype.moduleCore?this.modulesCore.push(r):n.moduleInitOrder?n.moduleInitOrder<0?t.push(r):i.push(r):s.push(r)}t.sort(((e,t)=>e.moduleInitOrder>t.moduleInitOrder?1:-1)),i.sort(((e,t)=>e.moduleInitOrder>t.moduleInitOrder?1:-1)),this.modulesRegular=t.concat(s.concat(i))}}bindModules(e,t,i){var s=Object.values(t);i&&s.forEach((e=>{e.prototype.moduleCore=!0})),e.registerModule(s)}}class H extends e{constructor(e){super(e),this.element=this._createAlertElement(),this.msgElement=this._createMsgElement(),this.type=null,this.element.appendChild(this.msgElement)}_createAlertElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert"),e}_createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert-msg"),e.setAttribute("role","alert"),e}_typeClass(){return"tabulator-alert-state-"+this.type}alert(e,t="msg"){if(e){for(this.clear(),this.type=t;this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.add(this._typeClass()),"function"==typeof e&&(e=e()),e instanceof HTMLElement?this.msgElement.appendChild(e):this.msgElement.innerHTML=e,this.table.element.appendChild(this.element)}}clear(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.msgElement.classList.remove(this._typeClass())}}class O{constructor(e,t){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.alertManager=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 w(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new R(this),this.optionsList=new a(this,"table constructor"),this.initialized=!1,this.destroyed=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout((()=>{this._create()}))),x.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 c(this),this.rowManager=new b(this),this.footerManager=new f(this),this.dataLoader=new C(this),this.alertManager=new H(this),this.bindModules(),this.options=this.optionsList.generate(O.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new E(this,this.options,this.options.debugEventsExternal),this.eventBus=new y(this.options.debugEventsInternal),this.interactionMonitor=new v(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(this.destroyed=!0,x.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"),this.externalEvents.dispatch("tableDestroyed")}_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))}initGuard(e,t){var i,s;return this.options.debugInitialization&&!this.initialized&&(e||(e=" "==(s="Error"==(i=(new Error).stack.split("\n"))[0]?i[2]:i[1])[0]?s.trim().split(" ")[1].split(".")[1]:s.trim().split("@")[0]),console.warn("Table Not Initialized - Calling the "+e+" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function."+(t?" "+t:""))),this.initialized}blockRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-blocking"),this.rowManager.blockRedraw(),this.columnManager.blockRedraw(),this.eventBus.dispatch("redraw-blocked")}restoreRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-restoring"),this.rowManager.restoreRedraw(),this.columnManager.restoreRedraw(),this.eventBus.dispatch("redraw-restored")}setData(e,t,i){return this.initGuard(!1,"To set initial data please use the 'data' property in the table constructor."),this.dataLoader.load(e,t,i,!1)}clearData(){this.initGuard(),this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,i){return this.initGuard(),this.dataLoader.load(e,t,i,!0,!0)}updateData(e){var t=0;return this.initGuard(),new Promise(((i,s)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e&&e.length>0?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"))}))}addData(e,t,i){return this.initGuard(),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"))}))}updateOrAddData(e){var t=[],i=0;return this.initGuard(),new Promise(((s,o)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e&&e.length>0?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"))}))}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e){var t=this.rowManager.getRowFromPosition(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];this.initGuard(),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){return this.initGuard(),"string"==typeof e&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i).then((e=>e[0].getComponent()))}updateOrAddRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),"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 this.initGuard(),"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);this.initGuard(),s?s.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e){var t=this.rowManager.findRow(e);return t?t.getPosition():(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initGuard(!1,"To set initial columns please use the 'columns' property in the table constructor"),this.columnManager.setColumns(e)}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(this.initGuard(),!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show()}hideColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide()}toggleColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),!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.initGuard(),this.columnManager.addColumn(e,t,s).then((e=>e.getComponent()))}deleteColumn(e){var t=this.columnManager.findColumn(e);return this.initGuard(),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 this.initGuard(),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);this.initGuard(),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.initGuard(),this.columnManager.redraw(e),this.rowManager.redraw(e)}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)}alert(e,t){this.initGuard(),this.alertManager.alert(e,t)}clearAlert(){this.initGuard(),this.alertManager.clear()}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}}O.defaultOptions={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,debugInvalidComponentFuncs:!0,debugInitialization:!0,debugDeprecation:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",popupContainer:!1,columns:[],columnDefaults:{},data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",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,rowHeight:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{}},new F(O);class A extends k{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":A.accessors[e]?t=A.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)),s=e.getComponent(),o=r.deepClone(e.data||{});return this.table.columnManager.traverse((function(e){var n,r,a,l;e.modules.accessor&&(r=e.modules.accessor[i]||e.modules.accessor.accessor||!1)&&"undefined"!=(n=e.getFieldValue(o))&&(l=e.getComponent(),a="function"==typeof r.params?r.params(n,o,t,l,s):r.params,e.setFieldValue(o,r.accessor(n,o,t,a,l,s)))})),o}}A.moduleName="accessor",A.accessors={};function _(e,t){var i=[];if(t=t||"",Array.isArray(e))e.forEach(((e,s)=>{i=i.concat(_(e,t?t+"["+s+"]":s))}));else if("object"==typeof e)for(var s in e)i=i.concat(_(e[s],t?t+"["+s+"]":s));else i.push({key:t,value:e});return i}function B(e){var t=_(e),i=[];return t.forEach((function(e){i.push(encodeURIComponent(e.key)+"="+encodeURIComponent(e.value))})),i.join("&")}function I(e,t,i){return e&&i&&Object.keys(i).length&&(t.method&&"get"!=t.method.toLowerCase()||(t.method="get",e+=(e.includes("?")?"&":"?")+B(i))),e}function V(e,t){var i=[];if(t=t||"",Array.isArray(e))e.forEach(((e,s)=>{i=i.concat(V(e,t?t+"["+s+"]":s))}));else if("object"==typeof e)for(var s in e)i=i.concat(V(e[s],t?t+"["+s+"]":s));else i.push({key:t,value:e});return i}var N={json:{headers:{"Content-Type":"application/json"},body:function(e,t,i){return JSON.stringify(i)}},form:{headers:{},body:function(e,t,i){var s=V(i),o=new FormData;return s.forEach((function(e){o.append(e.key,e.value)})),o}}};class W extends k{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=W.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||W.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||W.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({},W.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()}}W.moduleName="ajax",W.defaultConfig={method:"GET"},W.defaultURLGenerator=I,W.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([]))}))},W.contentTypeFormatters=N;class j extends k{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,s;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(s=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),t=(i=this.table.modules.export.generateHTMLTable(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=j.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=j.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}}j.moduleName="clipboard",j.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)}},j.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 G{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}}var U={avg:function(e,t,i){var s=0,o=void 0!==i.precision?i.precision:2;return e.length&&(s=e.reduce((function(e,t){return Number(e)+Number(t)})),s/=e.length,s=!1!==o?s.toFixed(o):s),parseFloat(s).toString()},max:function(e,t,i){var s=null,o=void 0!==i.precision&&i.precision;return e.forEach((function(e){((e=Number(e))>s||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;this.blockCheck()||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 p(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 G(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 n=new o(this.genColumn,i);n.getElement(),n.column=s,n.setWidth(),s.cells.push(n),t.push(n),s.visible||n.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}}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}}X.moduleName="columnCalcs",X.calculations=U;class q extends k{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.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,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),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.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){e&&this.table.rowManager.getRows().forEach((e=>{this.reinitializeRowChildren(e)}))}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=i.controlEl;t=t||e.getCells()[0].getElement(),!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))}getRows(e){var t=[];return e.forEach(((e,i)=>{var s;t.push(e),e instanceof p&&(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 p(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()}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}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 p&&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 p?i=e.data:e instanceof u?i=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find((t=>t instanceof p&&t.element===e)))&&(i=i.data):null===e&&(i=!1):i=void 0!==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 p&&(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]}}q.moduleName="dataTree";var K={csv:function(e,t={},i){var s=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=null!==e.value?JSON.stringify(e.value):"";break;case"undefined":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.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=null!==e.value?JSON.stringify(e.value):"";break;case"undefined":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.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.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),a=!("compress"in i)||i.compress;function l(){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(l());else{if(i.sheets)for(var h in i.sheets)!0===i.sheets[h]?(n.SheetNames.push(h),n.Sheets[h]=l()):(n.SheetNames.push(h),r.commsSend(i.sheets[h],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function(e){n.Sheets[h]=e}}));else n.SheetNames.push(o),n.Sheets[o]=l();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",compression:a})),"application/octet-stream")}},html:function(e,t,i){this.modExists("export",!0)&&i(this.modules.export.generateHTMLTable(e),"text/html")}};class J extends k{constructor(e){super(e),this.registerTableOption("downloadEncoder",(function(e,t){return new Blob([e],{type:t})})),this.registerTableOption("downloadReady",void 0),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.deprecatedOptionsCheck(),this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("downloadReady","downloadEncoder")}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:J.downloaders[e]?n=J.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=this.table.options.downloadEncoder(e,t);r&&(o?window.open(window.URL.createObjectURL(r)):(s=s||"Tabulator."+("function"==typeof i?"txt":i),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){if("intercept"===t)this.download(i.type,"",i.options,i.active,i.intercept)}}function Y(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)}J.moduleName="download",J.downloaders=K;class ${constructor(e,t,i,s,o,n){this.edit=e,this.table=e.table,this.cell=t,this.params=this._initializeParams(n),this.data=[],this.displayItems=[],this.currentItems=[],this.focusedItem=null,this.input=this._createInputElement(),this.listEl=this._createListElement(),this.initialValues=null,this.isFilter=!t._getSelf,this.filterTimeout=null,this.filtered=!1,this.typing=!1,this.values=[],this.popup=null,this.listIteration=0,this.lastAction="",this.blurable=!0,this.actions={success:s,cancel:o},this._deprecatedOptionsCheck(),this._initializeValue(),i(this._onRendered.bind(this))}_deprecatedOptionsCheck(){this.params.listItemFormatter&&this.cell.getTable().deprecationAdvisor.msg("The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.sortValuesList&&this.cell.getTable().deprecationAdvisor.msg("The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchFunc&&this.cell.getTable().deprecationAdvisor.msg("The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchingPlaceholder&&this.cell.getTable().deprecationAdvisor.msg("The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options")}_initializeValue(){var e=this.cell.getValue();void 0===e&&void 0!==this.params.defaultValue&&(e=this.params.defaultValue),this.initialValues=this.params.multiselect?e:[e],this.isFilter&&(this.input.value=this.initialValues?this.initialValues.join(","):"",this.headerFilterInitialListGen())}_onRendered(){var e=this.cell.getElement();function t(e){e.stopPropagation()}this.input.style.height="100%",this.input.focus({preventScroll:!0}),e.addEventListener("click",t),setTimeout((()=>{e.removeEventListener("click",t)}),1e3),this.input.addEventListener("mousedown",this._preventPopupBlur.bind(this))}_createListElement(){var e=document.createElement("div");return e.classList.add("tabulator-edit-list"),e.addEventListener("mousedown",this._preventBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e}_setListWidth(){var e=this.isFilter?this.input:this.cell.getElement();this.listEl.style.minWidth=e.offsetWidth+"px",this.params.maxWidth&&(!0===this.params.maxWidth?this.listEl.style.maxWidth=e.offsetWidth+"px":"number"==typeof this.params.maxWidth?this.listEl.style.maxWidth=this.params.maxWidth+"px":this.listEl.style.maxWidth=this.params.maxWidth)}_createInputElement(){var e=this.params.elementAttributes,t=document.createElement("input");if(t.setAttribute("type",this.params.clearable?"search":"text"),t.style.padding="4px",t.style.width="100%",t.style.boxSizing="border-box",this.params.autocomplete||(t.style.cursor="default",t.style.caretColor="transparent"),e&&"object"==typeof e)for(let i in e)"+"==i.charAt(0)?(i=i.slice(1),t.setAttribute(i,t.getAttribute(i)+e["+"+i])):t.setAttribute(i,e[i]);return this.params.mask&&Y(t,this.params),this._bindInputEvents(t),t}_initializeParams(e){var t,i=["values","valuesURL","valuesLookup"];return(e=Object.assign({},e)).verticalNavigation=e.verticalNavigation||"editor",e.placeholderLoading=void 0===e.placeholderLoading?"Searching ...":e.placeholderLoading,e.placeholderEmpty=void 0===e.placeholderEmpty?"No Results Found":e.placeholderEmpty,e.filterDelay=void 0===e.filterDelay?300:e.filterDelay,e.emptyValue=Object.keys(e).includes("emptyValue")?e.emptyValue:"",(t=Object.keys(e).filter((e=>i.includes(e))).length)?t>1&&console.warn("list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor"):console.warn("list editor config error - either the values, valuesURL, or valuesLookup option must be set"),e.autocomplete?e.multiselect&&(e.multiselect=!1,console.warn("list editor config error - multiselect option is not available when autocomplete is enabled")):(e.freetext&&(e.freetext=!1,console.warn("list editor config error - freetext option is only available when autocomplete is enabled")),e.filterFunc&&(e.filterFunc=!1,console.warn("list editor config error - filterFunc option is only available when autocomplete is enabled")),e.filterRemote&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option is only available when autocomplete is enabled")),e.mask&&(e.mask=!1,console.warn("list editor config error - mask option is only available when autocomplete is enabled")),e.allowEmpty&&(e.allowEmpty=!1,console.warn("list editor config error - allowEmpty option is only available when autocomplete is enabled")),e.listOnEmpty&&(e.listOnEmpty=!1,console.warn("list editor config error - listOnEmpty option is only available when autocomplete is enabled"))),e.filterRemote&&"function"!=typeof e.valuesLookup&&!e.valuesURL&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source")),e}_bindInputEvents(e){e.addEventListener("focus",this._inputFocus.bind(this)),e.addEventListener("click",this._inputClick.bind(this)),e.addEventListener("blur",this._inputBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e.addEventListener("search",this._inputSearch.bind(this)),this.params.autocomplete&&e.addEventListener("keyup",this._inputKeyUp.bind(this))}_inputFocus(e){this.rebuildOptionsList()}_filter(){this.params.filterRemote?(clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout((()=>{this.rebuildOptionsList()}),this.params.filterDelay)):this._filterList()}_inputClick(e){e.stopPropagation()}_inputBlur(e){this.blurable&&(this.popup?this.popup.hide():this._resolveValue(!0))}_inputSearch(){this._clearChoices()}_inputKeyDown(e){switch(e.keyCode){case 38:this._keyUp(e);break;case 40:this._keyDown(e);break;case 37:case 39:this._keySide(e);break;case 13:this._keyEnter();break;case 27:this._keyEsc();break;case 36:case 35:this._keyHomeEnd(e);break;case 9:break;default:this._keySelectLetter(e)}}_inputKeyUp(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:this._keyAutoCompLetter(e)}}_preventPopupBlur(){this.popup&&this.popup.blockHide(),setTimeout((()=>{this.popup&&this.popup.restoreHide()}),10)}_preventBlur(){this.blurable=!1,setTimeout((()=>{this.blurable=!0}),10)}_keyUp(e){var t=this.displayItems.indexOf(this.focusedItem);("editor"==this.params.verticalNavigation||"hybrid"==this.params.verticalNavigation&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&this._focusItem(this.displayItems[t-1]))}_keyDown(e){var t=this.displayItems.indexOf(this.focusedItem);("editor"==this.params.verticalNavigation||"hybrid"==this.params.verticalNavigation&&t=38&&e.keyCode<=90&&this._scrollToValue(e.keyCode))}_keyAutoCompLetter(e){this._filter(),this.lastAction="typing",this.typing=!0}_scrollToValue(e){clearTimeout(this.filterTimeout);var t=String.fromCharCode(e).toLowerCase();this.filterTerm+=t.toLowerCase();var i=this.displayItems.find((e=>void 0!==e.label&&e.label.toLowerCase().startsWith(this.filterTerm)));i&&this._focusItem(i),this.filterTimeout=setTimeout((()=>{this.filterTerm=""}),800)}_focusItem(e){this.lastAction="focus",this.focusedItem&&this.focusedItem.element&&this.focusedItem.element.classList.remove("focused"),this.focusedItem=e,e&&e.element&&(e.element.classList.add("focused"),e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}))}headerFilterInitialListGen(){this._generateOptions(!0)}rebuildOptionsList(){this._generateOptions().then(this._sortOptions.bind(this)).then(this._buildList.bind(this)).then(this._showList.bind(this)).catch((e=>{Number.isInteger(e)||console.error("List generation error",e)}))}_filterList(){this._buildList(this._filterOptions()),this._showList()}_generateOptions(e){var t=[],i=++this.listIteration;return this.filtered=!1,this.params.values?t=this.params.values:this.params.valuesURL?t=this._ajaxRequest(this.params.valuesURL,this.input.value):"function"==typeof this.params.valuesLookup?t=this.params.valuesLookup(this.cell,this.input.value):this.params.valuesLookup&&(t=this._uniqueColumnValues(this.params.valuesLookupField)),t instanceof Promise?(e||this._addPlaceholder(this.params.placeholderLoading),t.then().then((e=>this.listIteration===i?this._parseList(e):Promise.reject(i)))):Promise.resolve(this._parseList(t))}_addPlaceholder(e){var t=document.createElement("div");"function"==typeof e&&(e=e(this.cell.getComponent(),this.listEl)),e&&(this._clearList(),e instanceof HTMLElement?t=e:(t.classList.add("tabulator-edit-list-placeholder"),t.innerHTML=e),this.listEl.appendChild(t),this._showList())}_ajaxRequest(e,t){return e=I(e,{},this.params.filterRemote?{term:t}:{}),fetch(e).then((e=>e.ok?e.json().catch((e=>(console.warn("List Ajax Load Error - Invalid JSON returned",e),Promise.reject(e)))):(console.error("List Ajax Load Error - Connection Error: "+e.status,e.statusText),Promise.reject(e)))).catch((e=>(console.error("List Ajax Load Error - Connection Error: ",e),Promise.reject(e))))}_uniqueColumnValues(e){var t,i={},s=this.table.getData(this.params.valuesLookup);return(t=e?this.table.columnManager.getColumnByField(e):this.cell.getColumn()._getSelf())?s.forEach((e=>{var s=t.getFieldValue(e);null!=s&&""!==s&&(i[s]=!0)})):(console.warn("unable to find matching column to create select lookup list:",e),i=[]),Object.keys(i)}_parseList(e){var t=[];return Array.isArray(e)||(e=Object.entries(e).map((([e,t])=>({label:t,value:e})))),e.forEach((e=>{"object"!=typeof e&&(e={label:e,value:e}),this._parseListItem(e,t,0)})),!this.currentItems.length&&this.params.freetext&&(this.input.value=this.initialValues,this.typing=!0,this.lastAction="typing"),this.data=t,t}_parseListItem(e,t,i){var s={};e.options?s=this._parseListGroup(e,i+1):(s={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,selected:!1,visible:!0,level:i,original:e},this.initialValues&&this.initialValues.indexOf(e.value)>-1&&this._chooseItem(s,!0)),t.push(s)}_parseListGroup(e,t){var i={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,visible:!0,level:t,options:[],original:e};return e.options.forEach((e=>{this._parseListItem(e,i.options,t)})),i}_sortOptions(e){var t;return this.params.sort&&(t="function"==typeof this.params.sort?this.params.sort:this._defaultSortFunction.bind(this),this._sortGroup(t,e)),e}_sortGroup(e,t){t.sort(((t,i)=>e(t.label,i.label,t.value,i.value,t.original,i.original))),t.forEach((t=>{t.group&&this._sortGroup(e,t.options)}))}_defaultSortFunction(e,t){var i,s,o,n,r,a=0,l=/(\d+)|(\D+)/g,h=/\d/,d=0;if("desc"===this.params.sort&&([e,t]=[t,e]),e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if((i=String(e).toLowerCase())===(s=String(t).toLowerCase()))return 0;if(!h.test(i)||!h.test(s))return i>s?1:-1;for(i=i.match(l),s=s.match(l),r=i.length>s.length?s.length:i.length;an?1:-1;return i.length>s.length}d=1}else d=t||0===t?-1:0;return d}_filterOptions(){var e=this.params.filterFunc||this._defaultFilterFunc,t=this.input.value;return t?(this.filtered=!0,this.data.forEach((i=>{this._filterItem(e,t,i)}))):this.filtered=!1,this.data}_filterItem(e,t,i){var s=!1;return i.group?(i.options.forEach((i=>{this._filterItem(e,t,i)&&(s=!0)})),i.visible=s):i.visible=e(t,i.label,i.value,i.original),i.visible}_defaultFilterFunc(e,t,i,s){return e=String(e).toLowerCase(),null!=t&&(String(t).toLowerCase().indexOf(e)>-1||String(i).toLowerCase().indexOf(e)>-1)}_clearList(){for(;this.listEl.firstChild;)this.listEl.removeChild(this.listEl.firstChild);this.displayItems=[]}_buildList(e){this._clearList(),e.forEach((e=>{this._buildItem(e)})),this.displayItems.length||this._addPlaceholder(this.params.placeholderEmpty)}_buildItem(e){var t,i=e.element;if(!this.filtered||e.visible){if(!i){if((i=document.createElement("div")).tabIndex=0,(t=this.params.itemFormatter?this.params.itemFormatter(e.label,e.value,e.original,i):e.label)instanceof HTMLElement?i.appendChild(t):i.innerHTML=t,e.group?i.classList.add("tabulator-edit-list-group"):i.classList.add("tabulator-edit-list-item"),i.classList.add("tabulator-edit-list-group-level-"+e.level),e.elementAttributes&&"object"==typeof e.elementAttributes)for(let t in e.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),i.setAttribute(t,this.input.getAttribute(t)+e.elementAttributes["+"+t])):i.setAttribute(t,e.elementAttributes[t]);e.group?i.addEventListener("click",this._groupClick.bind(this,e)):i.addEventListener("click",this._itemClick.bind(this,e)),i.addEventListener("mousedown",this._preventBlur.bind(this)),e.element=i}this._styleItem(e),this.listEl.appendChild(i),e.group?e.options.forEach((e=>{this._buildItem(e)})):this.displayItems.push(e)}}_showList(){var e=this.popup&&this.popup.isVisible();if(this.input.parentNode){if(this.params.autocomplete&&""===this.input.value&&!this.params.listOnEmpty)return void(this.popup&&this.popup.hide(!0));this._setListWidth(),this.popup||(this.popup=this.edit.popup(this.listEl)),this.popup.show(this.cell.getElement(),"bottom"),e||setTimeout((()=>{this.popup.hideOnBlur(this._resolveValue.bind(this,!0))}),10)}}_styleItem(e){e&&e.element&&(e.selected?e.element.classList.add("active"):e.element.classList.remove("active"))}_itemClick(e,t){t.stopPropagation(),this._chooseItem(e)}_groupClick(e,t){t.stopPropagation()}_cancel(){this.popup.hide(!0),this.actions.cancel()}_clearChoices(){this.typing=!0,this.currentItems.forEach((e=>{e.selected=!1,this._styleItem(e)})),this.currentItems=[],this.focusedItem=null}_chooseItem(e,t){var i;this.typing=!1,this.params.multiselect?((i=this.currentItems.indexOf(e))>-1?(this.currentItems.splice(i,1),e.selected=!1):(this.currentItems.push(e),e.selected=!0),this.input.value=this.currentItems.map((e=>e.label)).join(","),this._styleItem(e)):(this.currentItems=[e],e.selected=!0,this.input.value=e.label,this._styleItem(e),t||this._resolveValue()),this._focusItem(e)}_resolveValue(e){var t,i;if(this.popup&&this.popup.hide(!0),this.params.multiselect)t=this.currentItems.map((e=>e.value));else if(e&&this.params.autocomplete&&this.typing){if(!(this.params.freetext||this.params.allowEmpty&&""===this.input.value))return void this.actions.cancel();t=this.input.value}else t=this.currentItems[0]?this.currentItems[0].value:null==(i=this.initialValues[0])||""===i?i:this.params.emptyValue;""===t&&(t=this.params.emptyValue),this.actions.success(t),this.isFilter&&(this.initialValues=t&&!Array.isArray(t)?[t]:t,this.currentItems=[])}}var Z={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%",o.selectContents&&r.select()})),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&&Y(r,o),r},textarea:function(e,t,i,s,o){var n=e.getValue(),r=o.verticalNavigation||"hybrid",a=String(null!=n?n:""),l=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(),o.selectContents&&l.select()})),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 13:e.shiftKey&&o.shiftEnterSubmit&&d();break;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&&Y(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),o.selectContents&&a.select()})),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&&Y(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},date:function(e,t,i,s,o){var n=o.format,r=n?window.DateTime||luxon.DateTime:null,a=e.getValue(),l=document.createElement("input");function h(e){return(r.isDateTime(e)?e:"iso"===n?r.fromISO(String(e)):r.fromFormat(String(e),n)).toFormat("yyyy-MM-dd")}if(l.type="date",l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.max&&l.setAttribute("max",n?h(o.max):o.max),o.min&&l.setAttribute("min",n?h(o.min):o.min),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(e){var t=l.value;null==a&&""!==t||t!==a?(t&&n&&(t=r.fromFormat(String(t),"yyyy-MM-dd").toFormat(n)),i(t)&&(a=l.value)):s()}return a=void 0!==a?a:"",n&&(r?a=h(a):console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js")),l.value=a,t((function(){l.focus({preventScroll:!0}),l.style.height="100%",o.selectContents&&l.select()})),l.addEventListener("change",d),l.addEventListener("blur",d),l.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),l},time:function(e,t,i,s,o){var n,r=o.format,a=r?window.DateTime||luxon.DateTime:null,l=e.getValue(),h=document.createElement("input");if(h.type="time",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),h.setAttribute(e,h.getAttribute(e)+o.elementAttributes["+"+e])):h.setAttribute(e,o.elementAttributes[e]);function d(e){var t=h.value;null==l&&""!==t||t!==l?(t&&r&&(t=a.fromFormat(String(t),"hh:mm").toFormat(r)),i(t)&&(l=h.value)):s()}return l=void 0!==l?l:"",r&&(a?(n=a.isDateTime(l)?l:"iso"===r?a.fromISO(String(l)):a.fromFormat(String(l),r),l=n.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js")),h.value=l,t((function(){h.focus({preventScroll:!0}),h.style.height="100%",o.selectContents&&h.select()})),h.addEventListener("change",d),h.addEventListener("blur",d),h.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),h},datetime:function(e,t,i,s,o){var n,r=o.format,a=r?window.DateTime||luxon.DateTime:null,l=e.getValue(),h=document.createElement("input");if(h.type="datetime-local",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),h.setAttribute(e,h.getAttribute(e)+o.elementAttributes["+"+e])):h.setAttribute(e,o.elementAttributes[e]);function d(e){var t=h.value;null==l&&""!==t||t!==l?(t&&r&&(t=a.fromISO(String(t)).toFormat(r)),i(t)&&(l=h.value)):s()}return l=void 0!==l?l:"",r&&(a?(n=a.isDateTime(l)?l:"iso"===r?a.fromISO(String(l)):a.fromFormat(String(l),r),l=n.toFormat("yyyy-MM-dd")+"T"+n.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js")),h.value=l,t((function(){h.focus({preventScroll:!0}),h.style.height="100%",o.selectContents&&h.select()})),h.addEventListener("change",d),h.addEventListener("blur",d),h.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),h},select:function(e,t,i,s,o){return this.deprecationMsg("The select editor has been deprecated, please use the new list editor"),new $(this,e,t,i,s,o).input},list:function(e,t,i,s,o){return new $(this,e,t,i,s,o).input},autocomplete:function(e,t,i,s,o){return this.deprecationMsg("The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam"),o.autocomplete=!0,new $(this,e,t,i,s,o).input},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 p(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 m(e){var t=document.createElement("span"),s=u.cloneNode(!0);d.push(s),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(),i(e),r.blur()})),t.appendChild(s),c.appendChild(t)}function g(e){a=e,p(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++)m(b);return p(a=Math.min(parseInt(a),l)),c.addEventListener("mousemove",(function(e){p(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"),p=document.createElement("div");function m(){var e=window.getComputedStyle(a,null),t=d*Math.round(p.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"),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%",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),p.setAttribute(e,p.getAttribute(e)+o.elementAttributes["+"+e])):p.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),p.style.width=c+"%",a.setAttribute("aria-valuemin",h),a.setAttribute("aria-valuemax",l),p.appendChild(u),u.addEventListener("mousedown",(function(e){n=e.screenX,r=p.offsetWidth})),u.addEventListener("mouseover",(function(){u.style.cursor="ew-resize"})),a.addEventListener("mousemove",(function(e){n&&(p.style.width=r+e.screenX-n+"px")})),a.addEventListener("mouseup",(function(e){n&&(e.stopPropagation(),e.stopImmediatePropagation(),n=!1,r=!1,m())})),a.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:e.preventDefault(),p.style.width=p.clientWidth+a.clientWidth/100+"px";break;case 37:e.preventDefault(),p.style.width=p.clientWidth-a.clientWidth/100+"px";break;case 9:case 13:m();break;case 27:s()}})),a.addEventListener("blur",(function(){s()})),p},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,d=Object.keys(o).includes("trueValue"),c=Object.keys(o).includes("falseValue");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 u(e){var t=r.checked;return d&&t?t=o.trueValue:c&&!t&&(t=o.falseValue),a?e?h?l:t:r.checked&&!h?(r.checked=!1,r.indeterminate=!0,h=!0,l):(h=!1,t):t}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=d?n===o.trueValue:!0===n||"true"===n||"True"===n||1===n,t((function(){r.focus()})),r.addEventListener("change",(function(e){i(u())})),r.addEventListener("blur",(function(e){i(u(!0))})),r.addEventListener("keydown",(function(e){13==e.keyCode&&i(u()),27==e.keyCode&&s()})),r}};class Q extends k{constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.editors=Q.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("cell-value-changed",this.updateCellClass.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("row-layout",this.rowEditableCheck.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 ")}updateCellClass(e){this.allowEdit(e)?e.getElement().classList.add("tabulator-editable"):e.getElement().classList.remove("tabulator-editable")}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.findPrevEditableCell(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 s=t-1;s>=0;s--){let t=e.cells[s];if(t.column.modules.edit&&r.elVisible(t.getElement())){if(this.allowEdit(t)){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()}rowEditableCheck(e){e.getCells().forEach((e=>{e.column.modules.edit&&"function"==typeof e.column.modules.edit.check&&this.updateCellClass(e)}))}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(),this.dispatch("edit-editor-clear",i,e),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);i.row.getElement().classList.remove("tabulator-editing"),i.table.element.classList.remove("tabulator-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);this.updateCellClass(e),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.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();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)}}allowEdit(e){var t=!!e.column.modules.edit;if(e.column.modules.edit)switch(typeof e.column.modules.edit.check){case"function":e.row.initialized&&(t=e.column.modules.edit.check(e.getComponent()));break;case"string":t=!!e.row.data[e.column.modules.edit.check];break;case"boolean":t=e.column.modules.edit.check}return t}edit(e,t,i){var s,o,n,r=this,a=function(){},l=e.getElement();if(!this.currentCell){if(e.column.modules.edit.blocked)return this.mouseClick=!1,l.blur(),!1;if(t&&t.stopPropagation(),this.allowEdit(e)||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){a=e}),(function(t){if(r.currentCell===e){var i=r.chain("edit-success",[e,t],!0,!0);return!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):(r.invalidEdit=!0,r.focusCellNoEvent(e,!0),a(),!1)}}),(function(){r.currentCell===e&&r.cancelEdit()}),n)))return l.blur(),!1;if(!(s instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",s),l.blur(),!1;for(l.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-editing"),e.table.element.classList.add("tabulator-editing");l.firstChild;)l.removeChild(l.firstChild);l.appendChild(s),a();for(var h=l.children,d=0;d{e.push(t.getComponent())})),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,this.dispatch("edit-edited-clear",e)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)}}Q.moduleName="edit",Q.editors=Z;class ee{constructor(e,t,i,s){this.type=e,this.columns=t,this.component=i||!1,this.indent=s||0}}class te{constructor(e,t,i,s,o){this.value=e,this.component=t||!1,this.width=i,this.height=s,this.depth=o}}class ie extends k{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)}generateTable(e,t,i,s){var o=this.generateExportList(e,t,i,s);return this.generateTableElement(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;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){var t=e.definition[this.colVisProp];return"function"==typeof t&&(t=t.call(this.table,e.getComponent())),!1!==t&&(e.visible||!e.visible&&t)}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 te(i,e.column.getComponent(),e.width,e.height,e.depth))}else t.push(null)})),s.push(new ee("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 te(e.key,e.getComponent(),t.length,1));break;case"calc":case"row":t.forEach((e=>{n.push(new te(e._column.getFieldValue(o),e,1,1))})),this.table.options.dataTree&&!1!==this.config.dataTree&&(r=e.modules.dataTree.index)}i.push(new ee(e.type,n,e.getComponent(),r))})),i}generateTableElement(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)=>{let n;switch(e.type){case"header":i.appendChild(this.generateHeaderElement(e,r,o));break;case"group":s.appendChild(this.generateGroupElement(e,r,o));break;case"calc":s.appendChild(this.generateCalcElement(e,r,o));break;case"row":n=this.generateRowElement(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}generateHeaderElement(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}generateGroupElement(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=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}generateCalcElement(e,t,i){var s=this.generateRowElement(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}generateRowElement(e,t,i){var s=document.createElement("tr");return s.classList.add("tabulator-print-table-row"),e.columns.forEach(((o,n)=>{if(o){var r,a=document.createElement("td"),l=o.component._column,h=this.table.columnManager.findColumnIndex(l),d=o.value,c={modules:{},getValue:function(){return d},getField:function(){return l.definition.field},getElement:function(){return a},getColumn:function(){return l.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getComponent:function(){return c},column:l};if((l.definition.cssClass?l.definition.cssClass.split(" "):[]).forEach((function(e){a.classList.add(e)})),this.table.modExists("format")&&!1!==this.config.formatCells)d=this.table.modules.format.formatExportValue(c,this.colVisProp);else switch(typeof d){case"object":d=null!==d?JSON.stringify(d):"";break;case"undefined":d=""}d instanceof Node?a.appendChild(d):a.innerHTML=d,(r=i.styleCells&&i.styleCells[h]?i.styleCells[h]:i.firstCell)&&(this.mapElementStyles(r,a,["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"]),l.definition.align&&(a.style.textAlign=l.definition.align)),this.table.options.dataTree&&!1!==this.config.dataTree&&(t.treeElementField&&t.treeElementField==l.field||!t.treeElementField&&0==n)&&(e.component._row.modules.dataTree.controlEl&&a.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),a.firstChild),e.component._row.modules.dataTree.branchEl&&a.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),a.firstChild)),s.appendChild(a),c.modules.format&&c.modules.format.renderedCallback&&c.modules.format.renderedCallback(),t.rowFormatter&&!1!==this.config.formatCells&&t.rowFormatter(e.component)}})),s}generateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.generateTableElement(e)),t.innerHTML}getHtml(e,t,i,s){var o=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,s||"htmlOutput");return this.generateHTMLTable(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)}))}}}}ie.moduleName="export";var se={"=":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 oe extends k{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":oe.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,oe.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)if("partial"===n)o=function(i){var s=e.getFieldValue(i);return null!=s&&String(s).toLowerCase().indexOf(String(t).toLowerCase())>-1},r="like";else o=function(i){return e.getFieldValue(i)==t},r="=";i.headerFilters[s]={value:t,func:o,type:r}}e.modules.filter.value=t,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.value=t,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},(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()},getTable:()=>this.table,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);d.langBind("headerFilters|columns|"+e.definition.field,(function(e){n.setAttribute("placeholder",void 0!==e&&e?e:d.langText("headerFilters|default"))})),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.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(null,!1,!1):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||{})}:oe.filters[e.type]?i=(t=this.table.columnManager.getColumnByField(e.field))?function(i){return oe.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return oe.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(!0)),"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(!0),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}}oe.moduleName="filter",oe.filters=se;var ne={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||"",p=!!t.symbolAfter,m=void 0!==t.precision?t.precision:2;if(isNaN(a))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));if(a<0&&(a=Math.abs(a),l=c),s=!1!==m?a.toFixed(m):a,o=(s=String(s).split("."))[0],n=s.length>1?h+s[1]:"",!1!==t.thousand)for(r=/(\d+)(\d{3})/;r.test(o);)o=o.replace(r,"$1"+d+"$2");return p?l+o+n+u:l+u+o+n},link:function(e,t,i){var s,o=e.getValue(),n=t.urlPrefix||"",r=t.download,a=o,l=document.createElement("a");if(t.labelField&&(s=e.getData(),a=function e(t,i){var s=i[t.shift()];return t.length&&"object"==typeof s?e(t,s):s}(t.labelField.split(this.table.options.nestedFieldSeparator),s)),t.label)switch(typeof t.label){case"string":a=t.label;break;case"function":a=t.label(e)}if(a){if(t.urlField&&(o=(s=e.getData())[t.urlField]),t.url)switch(typeof t.url){case"string":o=t.url;break;case"function":o=t.url(e)}return l.setAttribute("href",n+o),t.target&&l.setAttribute("target",t.target),t.download&&(r="function"==typeof r?r(e):!0===r?"":r,l.setAttribute("download",r)),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(a)),l}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=Object.keys(t).includes("trueValue"),l=void 0!==t.tickElement?t.tickElement:'',h=void 0!==t.crossElement?t.crossElement:'';return a&&s===t.trueValue||!a&&(r&&s||!0===s||"true"===s||"True"===s||1===s||"1"===s)?(o.setAttribute("aria-checked",!0),l||""):!n||"null"!==s&&""!==s&&null!=s?(o.setAttribute("aria-checked",!1),h||""):(o.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,i){var s,o=window.DateTime||luxon.DateTime,n=t.inputFormat||"yyyy-MM-dd HH:mm:ss",r=t.outputFormat||"dd/MM/yyyy HH:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",l=e.getValue();if(void 0!==o)return(s=o.isDateTime(l)?l:"iso"===n?o.fromISO(String(l)):o.fromFormat(String(l),n)).isValid?(t.timezone&&(s=s.setZone(t.timezone)),s.toFormat(r)):!0!==a&&l?"function"==typeof a?a(l):a:l;console.error("Format Error - 'datetime' formatter is dependant on luxon.js")},datetimediff:function(e,t,i){var s,o=window.DateTime||luxon.DateTime,n=t.inputFormat||"yyyy-MM-dd HH:mm:ss",r=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",a=void 0!==t.suffix&&t.suffix,l=void 0!==t.unit?t.unit:"days",h=void 0!==t.humanize&&t.humanize,d=void 0!==t.date?t.date:o.now(),c=e.getValue();if(void 0!==o)return(s=o.isDateTime(c)?c:"iso"===n?o.fromISO(String(c)):o.fromFormat(String(c),n)).isValid?h?s.diff(d,l).toHuman()+(a?" "+a:""):parseInt(s.diff(d,l)[l])+(a?" "+a:""):!0===r?c:"function"==typeof r?r(c):r;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 o,n,r,a,l,h=this.sanitizeHTML(e.getValue())||0,d=e.getElement(),c=t.max?t.max:100,u=t.min?t.min:0,p=t.legendAlign?t.legendAlign:"center";switch(n=parseFloat(h)<=c?parseFloat(h):c,n=parseFloat(n)>=u?parseFloat(n):u,o=(c-u)/100,n=Math.round((n-u)/o),typeof t.color){case"string":r=t.color;break;case"function":r=t.color(h);break;case"object":if(Array.isArray(t.color)){let e=100/t.color.length,i=Math.floor(n/e);i=Math.min(i,t.color.length-1),i=Math.max(i,0),r=t.color[i];break}default:r="#2DC214"}switch(typeof t.legend){case"string":a=t.legend;break;case"function":a=t.legend(h);break;case"boolean":a=h;break;default:a=!1}switch(typeof t.legendColor){case"string":l=t.legendColor;break;case"function":l=t.legendColor(h);break;case"object":if(Array.isArray(t.legendColor)){let e=100/t.legendColor.length,i=Math.floor(n/e);i=Math.min(i,t.legendColor.length-1),i=Math.max(i,0),l=t.legendColor[i]}break;default:l="#000"}d.style.minWidth="30px",d.style.position="relative",d.setAttribute("aria-label",n);var m=document.createElement("div");m.style.display="inline-block",m.style.width=n+"%",m.style.backgroundColor=r,m.style.height="100%",m.setAttribute("data-max",c),m.setAttribute("data-min",u);var g=document.createElement("div");if(g.style.position="relative",g.style.width="100%",g.style.height="100%",a){var b=document.createElement("div");b.style.position="absolute",b.style.top=0,b.style.left=0,b.style.textAlign=p,b.style.width="100%",b.style.color=l,b.innerHTML=a}return i((function(){if(!(e instanceof s)){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",d.appendChild(t),d=t}d.appendChild(g),g.appendChild(m),a&&g.appendChild(b)})),""},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){var s=document.createElement("span");return e.getRow().watchPosition((e=>{s.innerText=e})),s},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='\n \n \n\n\n\n \n',e.getElement().classList.add("tabulator-row-handle"),s.addEventListener("click",(function(t){t.stopImmediatePropagation(),n(!o.open),e.getTable().rowManager.adjustTableSize()})),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 u?(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 re extends k{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":re.formatters[s]?i.formatter=re.formatters[s]:(console.warn("Formatter Error - No such formatter found: ",s),i.formatter=re.formatters.plaintext);break;case"function":i.formatter=s;break;default:i.formatter=re.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},getColumn:function(){return e.getComponent()},getTable:()=>this.table},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){function o(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}return i="function"==typeof s.params?s.params(e.getComponent()):s.params,s.formatter.call(this,e.getComponent(),i,o)}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":re.formatters[e]?e=re.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=re.formatters.plaintext);break;case"function":break;default:e=re.formatters.plaintext}return e}}re.moduleName="format",re.formatters=ne;class ae extends k{constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.initializationMode="left",this.active=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1}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("columns-loading",this.reset.bind(this)),this.subscribe("column-add",this.reinitializeColumns.bind(this)),this.subscribe("column-delete",this.reinitializeColumns.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)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}reinitializeColumns(){this.reset(),this.table.columnManager.columnsByIndex.forEach((e=>{this.initializeColumn(e)}))}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}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)}))}layoutColumnPosition(e){var t=[],i=0,s=0;this.leftColumns.forEach(((s,o)=>{if(s.modules.frozen.marginValue=i,s.modules.frozen.margin=s.modules.frozen.marginValue+"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.modules.frozen.marginValue=s,t.modules.frozen.margin=t.modules.frozen.marginValue+"px",t.visible&&(s+=t.getWidth()),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.layoutColumnPosition(),this.reinitializeRows(),this.layoutCalcRows())}reinitializeRows(){var e=this.table.rowManager.getVisibleRows(!0);this.table.rowManager.getRows().filter((t=>!e.includes(t))).forEach((e=>{e.deinitialize()})),e.forEach((e=>{"row"===e.type&&this.layoutRow(e)}))}layoutRow(e){"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){var i;t.modules.frozen&&(e.style.position="sticky",i=this.table.rtl?"left"===t.modules.frozen.position?"right":"left":t.modules.frozen.position,e.style[i]=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))}adjustForScrollbar(e){this.rightColumns.length&&(this.table.columnManager.getContentsElement().style.width="calc(100% - "+e+"px)")}_calcSpace(e,t){var i=0;for(let s=0;s{this.initializeRow(e)}))}initializeRow(e){var t=this.table.options.frozenRows,i=typeof t;"number"===i?e.getPosition()&&e.getPosition()+this.rows.length<=t&&this.freezeRow(e):"function"===i?t.call(this.table,e.getComponent())&&this.freezeRow(e):Array.isArray(t)&&t.includes(e.data[this.options("frozenRowsField")])&&this.freezeRow(e)}isRowFrozen(e){return this.rows.indexOf(e)>-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.rows.push(e),this.refreshData(!1,"display"),this.table.rowManager.adjustTableSize(),this.styleRows())}unfreezeRow(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)}))}}le.moduleName="frozenRows";class he{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 de{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 de(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(){var e=[];return e.push(this),this._visSet(),this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.visible?this.groupList.length?this.groupList.forEach((function(t){e=e.concat(t.getHeadersAndRows())})):("table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))),e}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,"basic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination||(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.updateGroupRows(!0),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,"basic"!=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.updateGroupRows(!0)}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))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])}else this.groupList=[],this.groups={}}rowSample(e,t){if(this.table.options.groupBy){var i=this.getGroups(!1)[0];t.push(i.getRows(!1)[0])}return t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();if(!this.table.options.groupBy)return t;t=t.filter((e=>"group"!==e.type)),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px"}rowAddingIndex(e,t,i){if(this.table.options.groupBy){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.initialize(),this.configureGroupSetup(),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){if(this.table.options.groupBy){!i&&t instanceof de&&(t=this.table.rowManager.prevDisplayRow(e)||t);var s=t instanceof de?t:t.modules.group,o=e instanceof de?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){this.table.options.groupBy&&e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.table.options.groupBy&&this.updateGroupRows(!0)}cellUpdated(e){this.table.options.groupBy&&this.reassignRowToGroup(e.row)}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.table.options.groupBy&&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.options("dataTree")&&(e=this.table.modules.dataTree.getTreeParentRoot(e)),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 de(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){this.table.options.groupBy&&("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))}checkBasicModeGroupHeaderWidth(){var e=this.table.rowManager.tableElement,t=!0;this.table.rowManager.getDisplayRows().forEach(((i,s)=>{this.table.rowManager.styleRow(i,s),e.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(t=!1)})),e.style.minWidth=t?this.table.columnManager.getWidth()+"px":""}}ce.moduleName="groupRows";class ue extends k{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:e.getPosition(),posTo:t.getPosition(),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()._getSelf().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 ue.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 ue.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 p)i.component===e&&(i.component=t);else if(i.component instanceof o&&i.component.row===e){var s=i.component.column.getField();s&&(i.component=t.getCell(s))}}))}}ue.moduleName="history",ue.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()}},ue.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 pe extends k{constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&"TABLE"===this.table.originalElement.tagName&&(this.table.originalElement.childNodes.length?this.parseTable():console.warn("Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element."))}parseTable(){var e=this.table.originalElement,t=this.table.options,i=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?ge.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;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)}}ge.moduleName="import",ge.importers=me;class be extends k{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",rowMouseDown:"row-mousedown",rowMouseUp:"row-mouseup",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",cellMouseDown:"cell-mousedown",cellMouseUp:"cell-mouseup",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",headerMouseDown:"column-mousedown",headerMouseUp:"column-mouseup",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",groupMouseDown:"group-mousedown",groupMouseUp:"group-mouseup",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("headerMouseDown"),this.registerColumnOption("headerMouseUp"),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("cellMouseDown"),this.registerColumnOption("cellMouseUp"),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){var i;if(!this.table.modExists("edit")||this.table.modules.edit.currentCell!==t){e.preventDefault();try{document.selection?((i=document.body.createTextRange()).moveToElementText(t.getElement()),i.select()):window.getSelection&&((i=document.createRange()).selectNode(t.getElement()),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,r=i.getComponent();this.columnSubscribers[e]&&(i instanceof o?s=i.column.definition[e]:i instanceof n&&(s=i.definition[e]),s&&s(t,r)),this.dispatchExternal(e,t,r)}}be.moduleName="interaction";class fe extends k{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,fe.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)fe.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:fe.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)}}fe.moduleName="keybindings",fe.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"]},fe.actions={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,i=t.scrollTop-t.element.clientHeight;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 ve extends k{constructor(e){super(e),this.menuContainer=null,this.nestedMenuBlock=!1,this.currentComponent=null,this.rootPopup=null,this.columnSubscribers={},this.registerTableOption("menuContainer",void 0),this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("rowDblClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("groupDblClickMenu",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerDblClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("headerMenuIcon"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu"),this.registerColumnOption("dblClickMenu")}initialize(){this.deprecatedOptionsCheck(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("menuContainer","popupContainer")||(this.table.options.popupContainer=this.table.options.menuContainer)}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)),this.table.options.rowDblClickMenu&&this.subscribe("row-dblclick",this.loadMenuEvent.bind(this,this.table.options.rowDblClickMenu))}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)),this.table.options.groupDblClickMenu&&this.subscribe("group-dblclick",this.loadMenuEvent.bind(this,this.table.options.groupDblClickMenu))}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.headerDblClickMenu&&!this.columnSubscribers.headerDblClickMenu&&(this.columnSubscribers.headerDblClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerDblClickMenu"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickMenu)),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)),t.dblClickMenu&&!this.columnSubscribers.dblClickMenu&&(this.columnSubscribers.dblClickMenu=this.loadMenuTableCellEvent.bind(this,"dblClickMenu"),this.subscribe("cell-dblclick",this.columnSubscribers.dblClickMenu))}initializeColumnHeaderMenu(e){var t,i=e.definition.headerMenuIcon;(t=document.createElement("span")).classList.add("tabulator-header-popup-button"),i?("function"==typeof i&&(i=i(e.getComponent())),i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i):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,t,i.getComponent()):e,this.loadMenu(t,i,e)}loadMenu(e,t,i,s,o){var n,r=!(e instanceof MouseEvent),a=document.createElement("div");if(a.classList.add("tabulator-menu"),r||e.preventDefault(),i&&i.length){if(s)n=o.child(a);else{if(this.nestedMenuBlock){if(this.rootPopup)return}else this.nestedMenuBlock=setTimeout((()=>{this.nestedMenuBlock=!1}),100);this.rootPopup&&this.rootPopup.hide(),this.rootPopup=n=this.popup(a)}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.loadMenu(s,t,e.menu,i,n)})):e.action&&i.addEventListener("click",(i=>{e.action(i,t.getComponent())})),e.menu&&e.menu.length&&i.classList.add("tabulator-menu-item-submenu")),a.appendChild(i)})),a.addEventListener("click",(e=>{this.rootPopup&&this.rootPopup.hide()})),n.show(s||e),n===this.rootPopup&&(this.rootPopup.hideOnBlur((()=>{this.rootPopup=null,this.currentComponent&&(this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)})),this.currentComponent=t,this.dispatchExternal("menuOpened",t.getComponent()))}}}ve.moduleName="menu";class we extends k{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,s={};e.modules.frozen||e.isGroup||(t=e.getElement(),s.mousemove=function(s){e.parent===i.moving.parent&&((i.touchMove?s.touches[0].pageX:s.pageX)-r.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=s}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(),s=this.table.columnManager.getContentsElement(),o=this.table.columnManager.getHeadersElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-r.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"),s.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=s.clientHeight-o.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.getContentsElement(),s=i.scrollLeft,o=(this.touchMove?e.touches[0].pageX:e.pageX)-r.elOffset(i).left+s;this.hoverElement.style.left=o-this.startX+"px",o-s{t=Math.max(0,s-5),this.table.rowManager.getElement().scrollLeft=t,this.autoScrollTimeout=!1}),1))),s+i.clientWidth-o{t=Math.min(i.clientWidth,s+5),this.table.rowManager.getElement().scrollLeft=t,this.autoScrollTimeout=!1}),1)))}}we.moduleName="moveColumn";class Ce extends k{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(i){t.tableRowDrop(i,e)}.bind(t),i.mousemove=function(i){var s;i.pageY-r.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?t.toRow===e&&t.toRowAfter||((s=e.getElement()).parentNode.insertBefore(t.placeholderElement,s.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(s=e.getElement()).previousSibling&&(s.parentNode.insertBefore(t.placeholderElement,s),t.moveRow(e,!1))}.bind(t),e.modules.moveRow=i}initializeRow(e){var t,i=this,s={};s.mouseup=function(t){i.tableRowDrop(t,e)}.bind(i),s.mousemove=function(t){var s=e.getElement();t.pageY-r.elOffset(s).top+i.table.rowManager.element.scrollTop>e.getHeight()/2?i.toRow===e&&i.toRowAfter||(s.parentNode.insertBefore(i.placeholderElement,s.nextSibling),i.moveRow(e,!0)):(i.toRow!==e||i.toRowAfter)&&(s.parentNode.insertBefore(i.placeholderElement,s),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=s}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=Math.min(s-this.startY,this.table.rowManager.element.scrollHeight-this.hoverElement.offsetHeight)+"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?this.moving.getComponent():void 0,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)}}}Ce.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)}},Ce.prototype.senders={delete:function(e,t,i){e.delete()}},Ce.moduleName="moveRow";class Ee extends k{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"),this.registerColumnOption("mutateLink")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("cell-value-changed",this.mutateLink.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":Ee.mutators[e]?t=Ee.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}mutateLink(e){var t=e.column.definition.mutateLink;t&&(Array.isArray(t)||(t=[t]),t.forEach((t=>{var i=e.row.getCell(t);i&&i.setValue(i.getValue(),!0,!0)})))}enable(){this.enabled=!0}disable(){this.enabled=!1}}Ee.moduleName="mutator",Ee.mutators={};var ye={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 Re extends k{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.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)),this.subscribe("footer-redraw",this.footerRedraw.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:Re.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||(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.footerAppend(this.pageCounterElement)),this.footerAppend(this.element)),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")}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.displayRows(-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.dispatchExternal("pageSizeChanged",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":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"))}}Re.moduleName="page",Re.pageCounters=ye;var xe={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)}},Te={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 ke extends k{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:ke.readers[this.table.options.persistenceReaderFunc]?this.readFunc=ke.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):ke.readers[this.mode]?this.readFunc=ke.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:ke.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=ke.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):ke.writers[this.mode]?this.writeFunc=ke.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.retrieveData("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.retrieveData("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("column-width",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.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:e=>{s=e,this.defWatcherBlock||this.save("columns"),i.set&&i.set(e)},get:()=>(i.get&&i.get(),s)})})),this.defWatcherBlock=!1)}load(e,t){var i=this.retrieveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}retrieveData(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.push("visible")):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}}ke.moduleName="persistence",ke.moduleInitOrder=-10,ke.readers=xe,ke.writers=Te;class Me extends k{constructor(e){super(e),this.columnSubscribers={},this.registerTableOption("rowContextPopup",!1),this.registerTableOption("rowClickPopup",!1),this.registerTableOption("rowDblClickPopup",!1),this.registerTableOption("groupContextPopup",!1),this.registerTableOption("groupClickPopup",!1),this.registerTableOption("groupDblClickPopup",!1),this.registerColumnOption("headerContextPopup"),this.registerColumnOption("headerClickPopup"),this.registerColumnOption("headerDblClickPopup"),this.registerColumnOption("headerPopup"),this.registerColumnOption("headerPopupIcon"),this.registerColumnOption("contextPopup"),this.registerColumnOption("clickPopup"),this.registerColumnOption("dblClickPopup"),this.registerComponentFunction("cell","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("column","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("row","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("group","popup",this._componentPopupCall.bind(this))}initialize(){this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}_componentPopupCall(e,t,i){this.loadPopupEvent(t,null,e,i)}initializeRowWatchers(){this.table.options.rowContextPopup&&(this.subscribe("row-contextmenu",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup)),this.table.on("rowTapHold",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup))),this.table.options.rowClickPopup&&this.subscribe("row-click",this.loadPopupEvent.bind(this,this.table.options.rowClickPopup)),this.table.options.rowDblClickPopup&&this.subscribe("row-dblclick",this.loadPopupEvent.bind(this,this.table.options.rowDblClickPopup))}initializeGroupWatchers(){this.table.options.groupContextPopup&&(this.subscribe("group-contextmenu",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup)),this.table.on("groupTapHold",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup))),this.table.options.groupClickPopup&&this.subscribe("group-click",this.loadPopupEvent.bind(this,this.table.options.groupClickPopup)),this.table.options.groupDblClickPopup&&this.subscribe("group-dblclick",this.loadPopupEvent.bind(this,this.table.options.groupDblClickPopup))}initializeColumn(e){var t=e.definition;t.headerContextPopup&&!this.columnSubscribers.headerContextPopup&&(this.columnSubscribers.headerContextPopup=this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextPopup),this.table.on("headerTapHold",this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"))),t.headerClickPopup&&!this.columnSubscribers.headerClickPopup&&(this.columnSubscribers.headerClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerClickPopup"),this.subscribe("column-click",this.columnSubscribers.headerClickPopup)),t.headerDblClickPopup&&!this.columnSubscribers.headerDblClickPopup&&(this.columnSubscribers.headerDblClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerDblClickPopup"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickPopup)),t.headerPopup&&this.initializeColumnHeaderPopup(e),t.contextPopup&&!this.columnSubscribers.contextPopup&&(this.columnSubscribers.contextPopup=this.loadPopupTableCellEvent.bind(this,"contextPopup"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextPopup),this.table.on("cellTapHold",this.loadPopupTableCellEvent.bind(this,"contextPopup"))),t.clickPopup&&!this.columnSubscribers.clickPopup&&(this.columnSubscribers.clickPopup=this.loadPopupTableCellEvent.bind(this,"clickPopup"),this.subscribe("cell-click",this.columnSubscribers.clickPopup)),t.dblClickPopup&&!this.columnSubscribers.dblClickPopup&&(this.columnSubscribers.dblClickPopup=this.loadPopupTableCellEvent.bind(this,"dblClickPopup"),this.subscribe("cell-click",this.columnSubscribers.dblClickPopup))}initializeColumnHeaderPopup(e){var t,i=e.definition.headerPopupIcon;(t=document.createElement("span")).classList.add("tabulator-header-popup-button"),i?("function"==typeof i&&(i=i(e.getComponent())),i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i):t.innerHTML="⋮",t.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),this.loadPopupEvent(e.definition.headerPopup,t,e)})),e.titleElement.insertBefore(t,e.titleElement.firstChild)}loadPopupTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadPopupEvent(i.column.definition[e],t,i)}loadPopupTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadPopupEvent(i.definition[e],t,i)}loadPopupEvent(e,t,i,s){var o;i._group?i=i._group:i._row&&(i=i._row),e="function"==typeof e?e.call(this.table,t,i.getComponent(),(function(e){o=e})):e,this.loadPopup(t,i,e,o,s)}loadPopup(e,t,i,s,o){var n,r,a=!(e instanceof MouseEvent);i instanceof HTMLElement?n=i:(n=document.createElement("div")).innerHTML=i,n.classList.add("tabulator-popup"),n.addEventListener("click",(e=>{e.stopPropagation()})),a||e.preventDefault(),r=this.popup(n),"function"==typeof s&&r.renderCallback(s),e?r.show(e):r.show(t.getElement(),o||"center"),r.hideOnBlur((()=>{this.dispatchExternal("popupClosed",t.getComponent())})),this.dispatchExternal("popupOpened",t.getComponent())}}Me.moduleName="popup";class Le extends k{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.generateTable(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.generateTable(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}}Le.moduleName="print";class De extends k{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,"cellsave")),this.subscribe("cell-value-save-after",this.unblock.bind(this,"cellsave")),this.subscribe("row-data-save-before",this.block.bind(this,"rowsave")),this.subscribe("row-data-save-after",this.unblock.bind(this,"rowsave")),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,o=Array.from(arguments);return i.blocked||t!==i.currentVersion||(i.block("data-push"),o.forEach((e=>{i.table.rowManager.addRowActual(e,!1)})),s=i.origFuncs.push.apply(e,arguments),i.unblock("data-push")),s}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var s,o=Array.from(arguments);return i.blocked||t!==i.currentVersion||(i.block("data-unshift"),o.forEach((e=>{i.table.rowManager.addRowActual(e,!0)})),s=i.origFuncs.unshift.apply(e,arguments),i.unblock("data-unshift")),s}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var s,o;return i.blocked||t!==i.currentVersion||(i.block("data-shift"),i.data.length&&(s=i.table.rowManager.getRowFromDataObject(i.data[0]))&&s.deleteActual(),o=i.origFuncs.shift.call(e),i.unblock("data-shift")),o}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var s,o;return i.blocked||t!==i.currentVersion||(i.block("data-pop"),i.data.length&&(s=i.table.rowManager.getRowFromDataObject(i.data[i.data.length-1]))&&s.deleteActual(),o=i.origFuncs.pop.call(e),i.unblock("data-pop")),o}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var s,o,n=Array.from(arguments),r=n[0]<0?e.length+n[0]:n[0],a=n[1],l=!!n[2]&&n.slice(2);if(!i.blocked&&t===i.currentVersion){if(i.block("data-splice"),l&&((s=!!e[r]&&i.table.rowManager.getRowFromDataObject(e[r]))?l.forEach((e=>{i.table.rowManager.addRowActual(e,!0,s,!0)})):(l=l.slice().reverse()).forEach((e=>{i.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==a){var h=e.slice(r,void 0===n[1]?n[1]:r+a);h.forEach(((e,t)=>{var s=i.table.rowManager.getRowFromDataObject(e);s&&s.deleteActual(t!==h.length-1)}))}(l||0!==a)&&i.table.rowManager.reRenderInPosition(),o=i.origFuncs.splice.apply(e,arguments),i.unblock("data-splice")}return o}})}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 t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e)}watchTreeChildren(e){var t=this,i=e.getData()[this.table.options.dataTreeChildField],s={};i&&(s.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-push");var o=s.push.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-push")}return o}}),s.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-unshift");var o=s.unshift.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-unshift")}return o}}),s.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-shift");var o=s.shift.call(i);this.rebuildTree(e),t.unblock("tree-shift")}return o}}),s.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-pop");var o=s.pop.call(i);this.rebuildTree(e),t.unblock("tree-pop")}return o}}),s.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-splice");var o=s.splice.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-splice")}return o}}))}rebuildTree(e){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}watchKey(e,t,i){var s=this,o=Object.getOwnPropertyDescriptor(t,i),n=t[i],r=this.currentVersion;Object.defineProperty(t,i,{set:t=>{if(n=t,!s.blocked&&r===s.currentVersion){s.block("key");var a={};a[i]=t,e.updateData(a),s.unblock("key")}o.set&&o.set(t)},get:()=>(o.get&&o.get(),n)})}unwatchRow(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}block(e){this.blocked||(this.blocked=e)}unblock(e){this.blocked===e&&(this.blocked=!1)}}De.moduleName="reactiveData";class Se extends k{constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.latestX=!1,this.handle=null,this.initialNextColumn=null,this.nextColumn=null,this.initialized=!1,this.registerColumnOption("resizable",!0),this.registerTableOption("resizableColumnFit",!1)}initialize(){this.subscribe("column-rendered",this.layoutColumnHeader.bind(this))}initializeEventWatchers(){this.initialized||(this.subscribe("cell-rendered",this.layoutCellHandles.bind(this)),this.subscribe("cell-delete",this.deInitializeComponent.bind(this)),this.subscribe("cell-height",this.resizeHandle.bind(this)),this.subscribe("column-moved",this.columnLayoutUpdated.bind(this)),this.subscribe("column-hide",this.deInitializeColumn.bind(this)),this.subscribe("column-show",this.columnLayoutUpdated.bind(this)),this.subscribe("column-width",this.columnWidthUpdated.bind(this)),this.subscribe("column-delete",this.deInitializeComponent.bind(this)),this.subscribe("column-height",this.resizeHandle.bind(this)),this.initialized=!0)}layoutCellHandles(e){"row"===e.row.type&&(this.deInitializeComponent(e),this.initializeColumn("cell",e,e.column,e.element))}layoutColumnHeader(e){e.definition.resizable&&(this.initializeEventWatchers(),this.deInitializeComponent(e),this.initializeColumn("header",e,e,e.element))}columnLayoutUpdated(e){var t=e.prevColumn();this.reinitializeColumn(e),t&&this.reinitializeColumn(t)}columnWidthUpdated(e){e.modules.frozen&&(this.table.modules.frozenColumns.leftColumns.includes(e)?this.table.modules.frozenColumns.leftColumns.forEach((e=>{this.reinitializeColumn(e)})):this.table.modules.frozenColumns.rightColumns.includes(e)&&this.table.modules.frozenColumns.rightColumns.forEach((e=>{this.reinitializeColumn(e)})))}frozenColumnOffset(e){var t=!1;return e.modules.frozen&&(t=e.modules.frozen.marginValue,"left"===e.modules.frozen.position?t+=e.getWidth()-3:t&&(t-=3)),!1!==t&&t+"px"}reinitializeColumn(e){var t=this.frozenColumnOffset(e);e.cells.forEach((i=>{i.modules.resize&&i.modules.resize.handleEl&&(t&&(i.modules.resize.handleEl.style[e.modules.frozen.position]=t),i.element.after(i.modules.resize.handleEl))})),e.modules.resize&&e.modules.resize.handleEl&&(t&&(e.modules.resize.handleEl.style[e.modules.frozen.position]=t),e.element.after(e.modules.resize.handleEl))}initializeColumn(e,t,i,s){var o=this,n=i.definition.resizable,r={},a=i.getLastColumn();if("header"===e&&(r={variableHeight:"textarea"==i.definition.formatter||i.definition.variableHeight}),(!0===n||n==e)&&this._checkResizability(a)){var l=document.createElement("span");l.className="tabulator-col-resize-handle",l.addEventListener("click",(function(e){e.stopPropagation()}));var h=function(e){o.startColumn=i,o.initialNextColumn=o.nextColumn=a.nextColumn(),o._mouseDown(e,a,l)};l.addEventListener("mousedown",h),l.addEventListener("touchstart",h,{passive:!0}),l.addEventListener("dblclick",(e=>{var t=a.getWidth();e.stopPropagation(),a.reinitializeWidth(!0),t!==a.getWidth()&&(o.dispatch("column-resized",a),o.table.externalEvents.dispatch("columnResized",a.getComponent()))})),i.modules.frozen&&(l.style.position="sticky",l.style[i.modules.frozen.position]=this.frozenColumnOffset(i)),r.handleEl=l,s.parentNode&&i.visible&&s.after(l)}t.modules.resize=r}deInitializeColumn(e){this.deInitializeComponent(e),e.cells.forEach((e=>{this.deInitializeComponent(e)}))}deInitializeComponent(e){var t;e.modules.resize&&(t=e.modules.resize.handleEl)&&t.parentElement&&t.parentElement.removeChild(t)}resizeHandle(e,t){e.modules.resize&&e.modules.resize.handleEl&&(e.modules.resize.handleEl.style.height=t)}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,i){var s=this;function o(e){var i,o,n=void 0===e.screenX?e.touches[0].screenX:e.screenX,r=n-s.startX,a=n-s.latestX;if(s.latestX=n,s.table.rtl&&(r=-r,a=-a),i=t.width==t.minWidth||t.width==t.maxWidth,t.setWidth(s.startWidth+r),o=t.width==t.minWidth||t.width==t.maxWidth,a<0&&(s.nextColumn=s.initialNextColumn),s.table.options.resizableColumnFit&&s.nextColumn&&(!i||!o)){let e=s.nextColumn.getWidth();a>0&&e<=s.nextColumn.minWidth&&(s.nextColumn=s.nextColumn.nextColumn()),s.nextColumn&&s.nextColumn.setWidth(s.nextColumn.getWidth()-a)}s.table.columnManager.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.table.columnManager.verticalAlignHeaders(),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.latestX=s.startX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",n),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",n)}}Se.moduleName="resizeColumns";class Pe extends k{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)}}Pe.moduleName="resizeRows";class ze extends k{constructor(e){super(e),this.binding=!1,this.visibilityObserver=!1,this.resizeObserver=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.visible=!1,this.initialized=!1,this.initialRedraw=!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 IntersectionObserver&&"undefined"!=typeof ResizeObserver&&"virtual"===t.rowManager.getRenderMode()?(this.initializeVisibilityObserver(),this.autoResize=!0,this.resizeObserver=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.redrawTable())}})),this.resizeObserver.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),this.redrawTable()}})),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.rerenderColumns(!0),t.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}initializeVisibilityObserver(){this.visibilityObserver=new IntersectionObserver((e=>{this.visible=e[0].isIntersecting,this.initialized?this.visible&&(this.redrawTable(this.initialRedraw),this.initialRedraw=!1):(this.initialized=!0,this.initialRedraw=!this.visible)})),this.visibilityObserver.observe(this.table.element)}redrawTable(e){this.initialized&&this.visible&&(this.table.columnManager.rerenderColumns(!0),this.table.redraw(e))}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.resizeObserver&&this.resizeObserver.unobserve(this.table.element),this.visibilityObserver&&this.visibilityObserver.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}ze.moduleName="resizeTable";class Fe extends k{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-data-changed",this.generateCollapsedRowContent.bind(this)),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=!0;e;){let t="fitColumns"==this.table.modules.layout.getMode()?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),i=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-t;if(i<0){let t=this.columns[this.index];t?(this.hideColumn(t),this.index++):e=!1}else{let t=this.columns[this.index-1];t&&i>0&&i>=t.getWidth()?(this.showColumn(t),this.index--):e=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){this.table.rowManager.getDisplayRows().forEach((e=>{this.generateCollapsedRowContent(e)}))}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=e.getData(),s=[];return this.hiddenColumns.forEach((o=>{var n=o.getFieldValue(i);if(o.definition.title&&o.field)if(o.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){function r(e){e()}t={value:!1,data:{},getValue:function(){return n},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return o.getComponent()},getTable:()=>this.table},s.push({field:o.field,title:o.definition.title,value:o.modules.format.formatter.call(this.table.modules.format,t,o.modules.format.params,r)})}else s.push({field:o.field,title:o.definition.title,value:n})})),s}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:""}}Fe.moduleName="responsiveLayout";class He extends k{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._rowSelectionChanged()):((t=this.table.rowManager.getRows(e)).forEach((e=>{this._selectRow(e,!0,!0)})),t.length&&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 Oe(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(a.isDateTime(e)||(e="iso"===l?a.fromISO(String(e)):a.fromFormat(String(e),l)),a.isDateTime(t)||(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")}He.moduleName="selectRow";var Ae={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"),Oe.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"),Oe.call(this,e,t,i,s,o,n,r)},datetime:Oe,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){var t;switch(a){case"length":t=e.length;break;case"sum":t=e.reduce((function(e,t){return e+t}));break;case"max":t=Math.max.apply(null,e);break;case"min":t=Math.min.apply(null,e);break;case"avg":t=e.reduce((function(e,t){return e+t}))/e.length}return t}if(Array.isArray(e)){if(Array.isArray(t))return d(t)-d(e);h=1}else h=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,p=/(\d+)|(\D+)/g,m=/\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(!m.test(a)||!m.test(l))return a>l?1:-1;for(a=a.match(p),l=l.match(p),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 _e extends k{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.registerTableOption("headerSortClickElement","header"),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":_e.sorters[e.definition.sorter]?s=_e.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":s=e.definition.sorter}if(e.modules.sort={sorter:s,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},!1!==e.definition.headerSort){if((t=e.getElement()).classList.add("tabulator-sortable"),(i=document.createElement("div")).classList.add("tabulator-col-sorter"),"icon"===this.table.options.headerSortClickElement)i.classList.add("tabulator-col-sorter-element");else t.classList.add("tabulator-col-sorter-element");switch(this.table.options.headerSortElement){case"function":break;case"object":i.appendChild(this.table.options.headerSortElement);break;default:i.innerHTML=this.table.options.headerSortElement}e.titleHolderElement.appendChild(i),e.modules.sort.element=i,this.setColumnHeaderSortIcon(e,"none"),("icon"===this.table.options.headerSortClickElement?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())),o>-1?(s[o].dir=i,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(null,!1,!1):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 _e.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&&((o=e.column.modules.sort)&&(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((e=>{e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"),this.setColumnHeaderSortIcon(e,"none"))}))}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort","asc"===t?"ascending":"descending"),this.setColumnHeaderSortIcon(e,t)}setColumnHeaderSortIcon(e,t){var i,s=e.modules.sort.element;if(e.definition.headerSort&&"function"==typeof this.table.options.headerSortElement){for(;s.firstChild;)s.removeChild(s.firstChild);"object"==typeof(i=this.table.options.headerSortElement.call(this.table,e.getComponent(),t))?s.appendChild(i):s.innerHTML=i}}_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)}}_e.moduleName="sort",_e.sorters=Ae;class Be extends k{constructor(e){super(e),this.tooltipSubscriber=null,this.headerSubscriber=null,this.timeout=null,this.popupInstance=null,this.registerTableOption("tooltipGenerationMode",void 0),this.registerTableOption("tooltipDelay",300),this.registerColumnOption("tooltip"),this.registerColumnOption("headerTooltip")}initialize(){this.deprecatedOptionsCheck(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheckMsg("tooltipGenerationMode","This option is no longer needed as tooltips are always generated on hover now")}initializeColumn(e){e.definition.headerTooltip&&!this.headerSubscriber&&(this.headerSubscriber=!0,this.subscribe("column-mousemove",this.mousemoveCheck.bind(this,"headerTooltip")),this.subscribe("column-mouseout",this.mouseoutCheck.bind(this,"headerTooltip"))),e.definition.tooltip&&!this.tooltipSubscriber&&(this.tooltipSubscriber=!0,this.subscribe("cell-mousemove",this.mousemoveCheck.bind(this,"tooltip")),this.subscribe("cell-mouseout",this.mouseoutCheck.bind(this,"tooltip")))}mousemoveCheck(e,t,i){var s="tooltip"===e?i.column.definition.tooltip:i.definition.headerTooltip;s&&(this.clearPopup(),this.timeout=setTimeout(this.loadTooltip.bind(this,t,i,s),this.table.options.tooltipDelay))}mouseoutCheck(e,t,i){this.popupInstance||this.clearPopup()}clearPopup(e,t,i){clearTimeout(this.timeout),this.timeout=null,this.popupInstance&&this.popupInstance.hide()}loadTooltip(e,t,i){var s,n,r;"function"==typeof i&&(i=i(e,t.getComponent(),(function(e){n=e}))),i instanceof HTMLElement?s=i:(s=document.createElement("div"),!0===i&&(t instanceof o?i=t.value:t.definition.field?this.langBind("columns|"+t.definition.field,(e=>{s.innerHTML=i=e||t.definition.title})):i=t.definition.title),s.innerHTML=i),(i||0===i||!1===i)&&(s.classList.add("tabulator-tooltip"),s.addEventListener("mousemove",(e=>e.preventDefault())),this.popupInstance=this.popup(s),"function"==typeof n&&this.popupInstance.renderCallback(n),r=this.popupInstance.containerEventCoords(e),this.popupInstance.show(r.x+15,r.y+15).hideOnBlur((()=>{this.dispatchExternal("TooltipClosed",t.getComponent()),this.popupInstance=null})),this.dispatchExternal("TooltipOpened",t.getComponent()))}}Be.moduleName="tooltip";var Ie={integer:function(e,t,i){return""===t||null==t||(t=Number(t),!isNaN(t)&&isFinite(t)&&Math.floor(t)===t)},float:function(e,t,i){return""===t||null==t||(t=Number(t),!isNaN(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("|")),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 Ve extends k{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)),this.subscribe("edit-success",this.editValidate.bind(this)),this.subscribe("edit-editor-clear",this.editorClear.bind(this)),this.subscribe("edit-edited-clear",this.editedClear.bind(this))}editValidate(e,t,i){var s="manual"===this.table.options.validationMode||this.validate(e.column.modules.validate,e,t);return!0!==s&&setTimeout((()=>{e.getElement().classList.add("tabulator-validation-fail"),this.dispatchExternal("validationFailed",e.getComponent(),t,s)})),s}editorClear(e,t){t&&e.column.modules.validate&&this.cellValidate(e),e.getElement().classList.remove("tabulator-validation-fail")}editedClear(e){e.modules.validate&&(e.modules.validate.invalid=!1)}cellIsValid(e){return e.modules.validate&&e.modules.validate.invalid||!0}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach((e=>{!0!==this.cellValidate(e)&&t.push(e.getComponent())})),!t.length||t}rowValidate(e){var t=[];return e.cells.forEach((e=>{!0!==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:Ve.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})})),t.modules.validate||(t.modules.validate={}),o.length?(t.modules.validate.invalid=o,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==n&&this.invalidCells.push(t)):(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),n>-1&&this.invalidCells.splice(n,1)),!o.length||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))}}Ve.moduleName="validate",Ve.validators=Ie;var Ne=Object.freeze({__proto__:null,AccessorModule:A,AjaxModule:W,ClipboardModule:j,ColumnCalcsModule:X,DataTreeModule:q,DownloadModule:J,EditModule:Q,ExportModule:ie,FilterModule:oe,FormatModule:re,FrozenColumnsModule:ae,FrozenRowsModule:le,GroupRowsModule:ce,HistoryModule:ue,HtmlTableImportModule:pe,ImportModule:ge,InteractionModule:be,KeybindingsModule:fe,MenuModule:ve,MoveColumnsModule:we,MoveRowsModule:Ce,MutatorModule:Ee,PageModule:Re,PersistenceModule:ke,PopupModule:Me,PrintModule:Le,ReactiveDataModule:De,ResizeColumnsModule:Se,ResizeRowsModule:Pe,ResizeTableModule:ze,ResponsiveLayoutModule:Fe,SelectRowModule:He,SortModule:_e,TooltipModule:Be,ValidateModule:Ve});class We extends O{}return new F(We,Ne),We})); +/* Tabulator v5.4.1 (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";class e{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}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(e){return this.table.modules.layout.layout(e)}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]}deprecationCheck(e,t){return this.table.deprecationAdvisor.check(e,t)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class t{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 n&&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.rerenderColumns(!0),t}}var i={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,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};class s{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 o 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")}_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)}));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":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){this.setValueProcessData(e,t,i)&&(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,i){var s=!1;return(this.value!==e||i)&&(s=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),s&&this.dispatch("cell-value-changed",this),s}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.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,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,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 s(this)),this.component}}class n 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.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 n(e,this);this.attachColumn(i)})),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end"}return 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(n.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach((e=>{-1===n.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)}_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._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;(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.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){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.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),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":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{t.push(e),t=t.concat(e.getColumns(!0))})):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach((function(e){t.push(e.getDefinition(!0))})),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach((function(t){t.visible&&(e=!0)})),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(e){e.show()})),this.isGroup||null!==this.width||this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(e){e.hide()})),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach((function(t){t.visible&&(e+=t.getWidth())})),this.contentElement.style.maxWidth=e-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-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.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach((function(e){e.setMinWidth()}))}setMaxWidth(e){this.minWidth&&e{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 t(this)),this.component}}n.defaultOptionList=i;class r{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 a{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(let e in t)i.hasOwnProperty(e)||console.warn("Invalid "+this.msgType+" option:",e);for(let e in i)e in t?i[e]=t[e]:Array.isArray(i[e])?i[e]=Object.assign([],i[e]):"object"==typeof i[e]&&null!==i[e]?i[e]=Object.assign({},i[e]):void 0===i[e]&&delete i[e];return i}}class l 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 s=this.rows().indexOf(e),o=e.getElement(),n=0;return new Promise(((a,l)=>{if(s>-1){if(void 0===i&&(i=this.table.options.scrollToRowIfVisible),!i&&r.elVisible(o)&&(n=r.elOffset(o).top-r.elOffset(this.elementVertical).top)>0&&n{e.element.appendChild(t.getElement()),t.cellRendered()}))}reinitializeColumnWidths(e){e.forEach((function(e){e.reinitializeWidth()}))}}class d extends l{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(){"fitDataTable"==this.options("layout")&&console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),this.options("responsiveLayout")&&console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),this.options("rtl")&&console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction")}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,i={};e.visible&&(e.modules.frozen||(t=e.getWidth(),i.leftPos=s,i.rightPos=s+t,i.width=t,this.isFitData&&(i.fitDataCheck=!e.modules.vdomHoz||e.modules.vdomHoz.fitDataCheck),s+t>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;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach((e=>{!e.definition.width&&e.visible&&(i=!0)})),i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,e=this.chain("rows-sample",[1],[],(()=>this.table.rowManager.getDisplayRows()))[0])){t=e.getElement(),e.generateCells(),this.tableElement.appendChild(t);for(let i=0;i{e!==this.columns[i]&&(t=!1)})),!t)}reinitializeRows(){var e=this.getVisibleRows(),t=this.table.rowManager.getRows().filter((t=>!e.includes(t)));e.forEach((e=>{this.reinitializeRow(e,!0)})),t.forEach((e=>{e.deinitialize()}))}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 t=e.getCell(i);e.getElement().insertBefore(t.getElement(),e.getCell(this.columns[this.rightCol]).getElement().nextSibling),t.cellRendered()}})),this.fitDataColActualWidthCheck(i),this.rightCol++,this.getVisibleRows().forEach((e=>{"group"!==e.type&&(e.modules.vdomHoz.rightCol=this.rightCol)})),this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth()):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol-1];if(i)if(i.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){e=!0,this.getVisibleRows().forEach((e=>{if("group"!==e.type){var t=e.getCell(i);e.getElement().insertBefore(t.getElement(),e.getCell(this.columns[this.leftCol]).getElement()),t.cellRendered()}})),this.leftCol--,this.getVisibleRows().forEach((e=>{"group"!==e.type&&(e.modules.vdomHoz.leftCol=this.leftCol)})),this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=i.getWidth();let t=this.fitDataColActualWidthCheck(i);t&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+t,this.vDomPadRight-=t)}else t=!1;else t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol];i&&i.modules.vdomHoz.leftPos>this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach((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)}}})),this.vDomPadRight+=i.getWidth(),this.rightCol--,this.getVisibleRows().forEach((e=>{"group"!==e.type&&(e.modules.vdomHoz.rightCol=this.rightCol)}))):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol];i&&i.modules.vdomHoz.rightPos{if("group"!==e.type){var t=e.getCell(i);try{e.getElement().removeChild(t.getElement())}catch(e){console.warn("Could not removeColLeft",e.message)}}})),this.vDomPadLeft+=i.getWidth(),this.leftCol++,this.getVisibleRows().forEach((e=>{"group"!==e.type&&(e.modules.vdomHoz.leftCol=this.leftCol)}))):t=!1}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},this.table.modules.frozenColumns&&this.table.modules.frozenColumns.leftColumns.forEach((t=>{this.appendCell(e,t)}));for(let t=this.leftCol;t<=this.rightCol;t++)this.appendCell(e,this.columns[t]);this.table.modules.frozenColumns&&this.table.modules.frozenColumns.rightColumns.forEach((t=>{this.appendCell(e,t)}))}}appendCell(e,t){if(t&&t.visible){let i=e.getCell(t);e.getElement().appendChild(i.getElement()),i.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 c extends e{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.contentsElement=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new a(this.table,"column definition",i),this.redrawBlock=!1,this.redrawBlockUpdate=null,this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.contentsElement=this.createHeaderContentsElement(),this.element=this.createHeaderElement(),this.contentsElement.insertBefore(this.headersElement,this.contentsElement.firstChild),this.element.insertBefore(this.contentsElement,this.element.firstChild),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("scrollbar-vertical",this.padVerticalScrollbar.bind(this))}padVerticalScrollbar(e){this.table.rtl?this.headersElement.style.marginLeft=e+"px":this.headersElement.style.marginRight=e+"px"}initializeRenderer(){var e,t={virtual:d,basic:h};(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:",this.table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderContentsElement(){var e=document.createElement("div");return e.classList.add("tabulator-header-contents"),e.setAttribute("role","rowgroup"),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}getContentsElement(){return this.contentsElement}getHeadersElement(){return this.headersElement}scrollHorizontal(e){this.contentsElement.scrollLeft=e,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.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,i){var s=new n(e,this),o=s.getElement(),r=i?this.findColumnIndex(i):i;if(i&&r>-1){var a=i.getTopColumn(),l=this.columns.indexOf(a),h=a.getElement();t?(this.columns.splice(l,0,s),h.parentNode.insertBefore(o,h)):(this.columns.splice(l+1,0,s),h.parentNode.insertBefore(o,h.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.redrawBlock||(this.headersElement.style.height="",this.columns.forEach((e=>{e.clearVerticalAlign()})),this.columns.forEach((t=>{var i=t.getHeight();i>e&&(e=i)})),this.headersElement.style.height=e+"px",this.columns.forEach((t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)})),this.table.rowManager.adjustTableSize())}findColumn(e){var i;if("object"!=typeof e)return this.columnsByField[e]||!1;if(e instanceof n)return e;if(e instanceof t)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return i=[],this.columns.forEach((e=>{i.push(e),i=i.concat(e.getColumns(!0))})),i.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(){var e=this.columnsByIndex.findIndex((e=>e.visible));return e>-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){t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.moveColumnActual(e,t,i),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.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.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()}rerenderColumns(e,t){this.redrawBlock?(!1===e||!0===e&&null===this.redrawBlockUpdate)&&(this.redrawBlockUpdate=e):this.renderer.rerenderColumns(e,t)}blockRedraw(){this.redrawBlock=!0,this.redrawBlockUpdate=null}restoreRedraw(){this.redrawBlock=!1,this.verticalAlignHeaders(),this.renderer.rerenderColumns(this.redrawBlockUpdate)}redraw(e){r.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(e),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class u{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(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(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 p 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.position=0,this.positionWatchers=[],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)}deinitialize(){this.initialized=!1}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,i=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(t=this.table.options.resizableRows?this.element.clientHeight:0,this.cells.forEach((function(e){var t=e.getHeight();t>i&&(i=t)})),this.height=e?Math.max(i,t):this.manualHeight?this.height:Math.max(i,t)),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.table.options.rowHeight&&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&&r.elVisible(this.element),s={};return new Promise(((o,n)=>{"string"==typeof e&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(s=Object.assign(s,this.data),s=Object.assign(s,e)),t=this.chain("row-data-changing",[this,s,e],null,e);for(let e in t)this.data[e]=t[e];this.dispatch("row-data-save-after",this);for(let s in e){this.table.columnManager.getColumnsByFieldRoot(s).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()),o()}))}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.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t{e(this.position)})))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new u(this)),this.component}}class m extends l{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=r.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=r.elOffset(t).top-r.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class g extends l{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.rows().length?this._virtualRenderFill(!1===i?this.rows.length-1:i,!0,s||0):(this.clear(),this.table.rowManager._showPlaceholder()),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 s=this.tableElement,o=this.elementVertical,n=0,a=0,l=0,h=0,d=0,c=this.rows(),u=c.length,p=this.elementVertical.clientHeight;if(i=i||0,e=e||0){for(;s.firstChild;)s.removeChild(s.firstChild);(l=(u-e+1)*this.vDomRowHeight)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*m),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-p),s.style.paddingTop=this.vDomTopPad+"px",s.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+h+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-p:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-p),this.elementVertical.scrollWidth>this.elementVertical.offsetWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-p),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,o.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,a=!0;a;)if(this.vDomTop){let l,h,d=e[n];d&&r=l?(this.styleRow(d,n),i.insertBefore(d.getElement(),i.firstChild),d.initialized&&d.heightInitialized||s.push(d),d.initialize(),h||(l=d.getElement().offsetHeight,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l)),t-=l,o+=l,this.vDomTop--,n--,r++):a=!1):a=!1}else a=!1;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,n=!0;n;){let r,a=e[this.vDomTop];a&&o=r?(this.vDomTop++,t-=r,s+=r,i.push(a),o++):n=!1):n=!1}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,a=!0;a;){let l,h,d=e[n];d&&r=l?(this.styleRow(d,n),i.appendChild(d.getElement()),d.initialized&&d.heightInitialized||s.push(d),d.initialize(),h||(l=d.getElement().offsetHeight,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l)),t-=l,o+=l,this.vDomBottom++,n++,r++):a=!1):a=!1}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,n=!0;n;){let r,a=e[this.vDomBottom];a&&o=r?(this.vDomBottom--,t-=r,s+=r,i.push(a),o++):n=!1):n=!1}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 b 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.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.scrollbarWidth=0,this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),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}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(void 0===e)return!1;return this.rows.find((t=>t.data[this.table.options.index]==e))||!1}if(e instanceof p)return e;if(e instanceof u)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){return this.getDisplayRows().find((t=>t.getPosition()===e&&t.isDisplayed()))}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 p(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.regenerateRowPositions(),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]),(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.regenerateRowPositions(),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 p?e:new p(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.regenerateRowPositions(),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 s=this.table,o="",n=0,a=["all","dataPipeline","display","displayPipeline","end"];if(!this.table.destroyed){if("function"==typeof e)if((n=this.dataPipeline.findIndex((t=>t.handler===e)))>-1)o="dataPipeline",t&&(n==this.dataPipeline.length-1?o="display":n++);else{if(!((n=this.displayPipeline.findIndex((t=>t.handler===e)))>-1))return void console.error("Unable to refresh data, invalid handler provided",e);o="displayPipeline",t&&(n==this.displayPipeline.length-1?o="end":n++)}else o=e||"all",n=0;if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===o&&n{"row"===e.type&&(e.setPosition(t),t++)}))}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}setDisplayRows(e,t){this.displayRows[t]=e,t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length)}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=[];if(e&&!0!==e)switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0)}else t=this.chain("rows-retrieve",e,null,this.rows)||this.rows;return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:(this.dispatchExternal("renderStarted"),this.renderer.rerenderRows(e),this.fixedHeight||this.adjustTableSize(),this.scrollBarCheck(),this.dispatchExternal("renderComplete"))}scrollBarCheck(){var e=0;this.element.scrollHeight>this.element.clientHeight&&(e=this.element.offsetWidth-this.element.clientWidth),e!==this.scrollbarWidth&&(this.scrollbarWidth=e,this.dispatch("scrollbar-vertical",e))}initializeRenderer(){var e,t={virtual:g,basic:m};(e="string"==typeof this.table.options.renderVertical?t[this.table.options.renderVertical]:this.table.options.renderVertical)?(this.renderMode=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:",this.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(!0))):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.scrollBarCheck(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){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),this.tableElement.style.minWidth=""}_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,t=this.element.clientHeight;if("fill"===this.renderer.verticalFillMode){let i=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?(e=isNaN(this.table.options.minHeight)?this.table.options.minHeight:this.table.options.minHeight+"px",this.element.style.minHeight=e||"calc(100% - "+i+"px)",this.element.style.height="calc(100% - "+i+"px)",this.element.style.maxHeight="calc(100% - "+i+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-i+"px",this.element.scrollTop=this.scrollTop),this.renderer.resize(),this.fixedHeight||t==this.element.clientHeight||(this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw()),this.scrollBarCheck()}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 f extends e{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1}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)if("string"==typeof this.table.options.footerElement)"<"===this.table.options.footerElement[0]?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement));else this.element=this.table.options.footerElement}getElement(){return this.element}append(e){this.activate(),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e){this.activate(),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(){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display=""))}redraw(){this.dispatch("footer-redraw")}}class v 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","mouseup","mousedown","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,this.pseudoTrackers[e].target),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]]||(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={},n={};for(let e of i){let i,r=t[e],a=this.previousTargets[e];if(a&&a.target===r)i=a.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()===r)),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(r));break;case"cell":s.components.includes("cell")&&(o.row instanceof p?i=o.row.findCell(r):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&&(o[e]=i,n[e]={target:r,component:i})}return this.previousTargets=n,o}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 w{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("_")||this.table.options.debugInvalidComponentFuncs&&console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class C extends e{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,i,s,o,n){var r=++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.alertLoader(),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);r==this.requestOrder?(this.clearAlert(),!1!==t&&(this.dispatchExternal("dataLoaded",t),this.table.rowManager.setData(t,s,void 0===n?!s:n))):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.alertError(),setTimeout((()=>{this.clearAlert()}),this.table.options.dataLoaderErrorTimeout)})).finally((()=>{this.loading=!1}))):(this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,s,void 0===n?!s:n),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++}alertLoader(){("function"==typeof this.table.options.dataLoader?this.table.options.dataLoader():this.table.options.dataLoader)&&this.table.alertManager.alert(this.table.options.dataLoaderLoading||this.langText("data|loading"))}alertError(){this.table.alertManager.alert(this.table.options.dataLoaderError||this.langText("data|error"),"error")}clearAlert(){this.table.alertManager.clear()}}class E{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._notifySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifySubscriptionChange(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._notifySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}subscribed(e){return this.events[e]&&this.events[e].length}_notifySubscriptionChange(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 y{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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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}_notifySubscriptionChange(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 R extends e{constructor(e){super(e)}_warnUser(){this.options("debugDeprecation")&&console.warn(...arguments)}check(e,t){var i="";return void 0===this.options(e)||(i="Deprecated Setup Option - Use of the %c"+e+"%c option is now deprecated",t?(i=i+", Please use the %c"+t+"%c option instead",this._warnUser(i,"font-weight: bold;","font-weight: normal;","font-weight: bold;","font-weight: normal;")):this._warnUser(i,"font-weight: bold;","font-weight: normal;"),!1)}checkMsg(e,t){return void 0===this.options(e)||(this._warnUser("%cDeprecated Setup Option - Use of the %c"+e+" %c option is now deprecated, "+t,"font-weight: normal;","font-weight: bold;","font-weight: normal;"),!1)}msg(e){this._warnUser(e)}}class x{static register(e){x.tables.push(e)}static deregister(e){var t=x.tables.indexOf(e);t>-1&&x.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.stopPropagation()}))),this}_fitToScreen(e,t,i,s,o){var n=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;if((e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",this.element.style.right=i?this.container.offsetWidth-s.left+"px":this.container.offsetWidth-e+"px",this.reversedX=!0),t+this.element.offsetHeight>Math.max(this.container.offsetHeight,n?this.container.scrollHeight:0))if(i)if("bottom"===o)this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";else this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px";else this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout((()=>{this.visible&&(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),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)}),100),this.blurCallback=e),this}_escapeCheck(e){27==e.keyCode&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new T(this.table,e,this),this.childPopup}}class k 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]=(...i)=>(this.table.initGuard(e),t(...i)):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}displayRows(e){var t,i=this.table.rowManager.displayRows.length-1;if(this._handler&&(t=this.table.rowManager.displayPipeline.findIndex((e=>e.handler===this._handler)))>-1&&(i=t),e&&(i+=e),this._handler)return i>-1?this.table.rowManager.getDisplayRows(i):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new T(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}function M(e,t){e.forEach((function(e){e.reinitializeWidth()})),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}var L={fitData:function(e,t){t&&this.table.columnManager.renderer.reinitializeColumnWidths(e),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataFill:M,fitDataTable:M,fitDataStretch:function(e,t){var i=0,s=this.table.rowManager.element.clientWidth,o=0,n=!1;e.forEach(((e,t)=>{e.widthFixed||e.reinitializeWidth(),(this.table.options.responsiveLayout?e.modules.responsive.visible:e.visible)&&(n=e),e.visible&&(i+=e.getWidth())})),n?(o=s-i+n.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(n.setWidth(0),this.table.modules.responsiveLayout.update()),o>0?n.setWidth(o):n.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e,t){var i,s,o=this.table.rowManager.element.getBoundingClientRect().width,n=0,r=0,a=0,l=[],h=[],d=0,c=0;function u(e){return"string"==typeof e?e.indexOf("%")>-1?o/100*parseInt(e):parseInt(e):e}function p(e,t,i,s){var o=[],n=0,r=0,l=0,h=a,d=0,c=0,m=[];function g(e){return i*(e.column.definition.widthGrow||1)}function b(e){return u(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&&(o-=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=u(t),n+=s>i?s:i,e.definition.widthShrink&&(h.push({column:e,width:s>i?s:i}),d+=e.definition.widthShrink)):(l.push({column:e,width:0}),a+=e.definition.widthGrow||1))})),r=o-n,i=Math.floor(r/a),c=p(l,r,i,!1),l.length&&c>0&&(l[l.length-1].width+=c),l.forEach((function(e){r-=e.width})),(s=Math.abs(c)+r)>0&&d&&(c=p(h,s,Math.floor(s/d),!0)),c&&h.length&&(h[h.length-1].width-=c),l.forEach((function(e){e.column.setWidth(e.width)})),h.forEach((function(e){e.column.setWidth(e.width)}))}};class D extends k{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;D.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(e){this.dispatch("layout-refreshing"),D.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),this.dispatch("layout-refreshed")}}D.moduleName="layout",D.modes=L;class S extends k{constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=r.deepClone(S.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=r.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=(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)}))}}S.moduleName="localize",S.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 P extends k{constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[];return x.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)}}P.moduleName="comms";var z=Object.freeze({__proto__:null,LayoutModule:D,LocalizeModule:S,CommsModule:P});class F{constructor(e,t){this.bindStaticFunctionality(e),this.bindModules(e,z,!0),t&&this.bindModules(e,t)}bindStaticFunctionality(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=x.lookupTable(e,!0);return!(Array.isArray(t)&&!t.length)&&t},e.prototype.bindModules=function(){var t=[],i=[],s=[];for(var o in this.modules={},e.moduleBindings){let n=e.moduleBindings[o],r=new n(this);this.modules[o]=r,n.prototype.moduleCore?this.modulesCore.push(r):n.moduleInitOrder?n.moduleInitOrder<0?t.push(r):i.push(r):s.push(r)}t.sort(((e,t)=>e.moduleInitOrder>t.moduleInitOrder?1:-1)),i.sort(((e,t)=>e.moduleInitOrder>t.moduleInitOrder?1:-1)),this.modulesRegular=t.concat(s.concat(i))}}bindModules(e,t,i){var s=Object.values(t);i&&s.forEach((e=>{e.prototype.moduleCore=!0})),e.registerModule(s)}}class H extends e{constructor(e){super(e),this.element=this._createAlertElement(),this.msgElement=this._createMsgElement(),this.type=null,this.element.appendChild(this.msgElement)}_createAlertElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert"),e}_createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert-msg"),e.setAttribute("role","alert"),e}_typeClass(){return"tabulator-alert-state-"+this.type}alert(e,t="msg"){if(e){for(this.clear(),this.type=t;this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.add(this._typeClass()),"function"==typeof e&&(e=e()),e instanceof HTMLElement?this.msgElement.appendChild(e):this.msgElement.innerHTML=e,this.table.element.appendChild(this.element)}}clear(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.msgElement.classList.remove(this._typeClass())}}class O{constructor(e,t){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.alertManager=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 w(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new R(this),this.optionsList=new a(this,"table constructor"),this.initialized=!1,this.destroyed=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout((()=>{this._create()}))),x.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 c(this),this.rowManager=new b(this),this.footerManager=new f(this),this.dataLoader=new C(this),this.alertManager=new H(this),this.bindModules(),this.options=this.optionsList.generate(O.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new E(this,this.options,this.options.debugEventsExternal),this.eventBus=new y(this.options.debugEventsInternal),this.interactionMonitor=new v(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(this.destroyed=!0,x.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"),this.externalEvents.dispatch("tableDestroyed")}_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))}initGuard(e,t){var i,s;return this.options.debugInitialization&&!this.initialized&&(e||(e=" "==(s="Error"==(i=(new Error).stack.split("\n"))[0]?i[2]:i[1])[0]?s.trim().split(" ")[1].split(".")[1]:s.trim().split("@")[0]),console.warn("Table Not Initialized - Calling the "+e+" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function."+(t?" "+t:""))),this.initialized}blockRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-blocking"),this.rowManager.blockRedraw(),this.columnManager.blockRedraw(),this.eventBus.dispatch("redraw-blocked")}restoreRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-restoring"),this.rowManager.restoreRedraw(),this.columnManager.restoreRedraw(),this.eventBus.dispatch("redraw-restored")}setData(e,t,i){return this.initGuard(!1,"To set initial data please use the 'data' property in the table constructor."),this.dataLoader.load(e,t,i,!1)}clearData(){this.initGuard(),this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,i){return this.initGuard(),this.dataLoader.load(e,t,i,!0,!0)}updateData(e){var t=0;return this.initGuard(),new Promise(((i,s)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e&&e.length>0?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"))}))}addData(e,t,i){return this.initGuard(),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"))}))}updateOrAddData(e){var t=[],i=0;return this.initGuard(),new Promise(((s,o)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e&&e.length>0?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"))}))}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e){var t=this.rowManager.getRowFromPosition(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];this.initGuard(),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){return this.initGuard(),"string"==typeof e&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i).then((e=>e[0].getComponent()))}updateOrAddRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),"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 this.initGuard(),"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);this.initGuard(),s?s.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e){var t=this.rowManager.findRow(e);return t?t.getPosition():(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initGuard(!1,"To set initial columns please use the 'columns' property in the table constructor"),this.columnManager.setColumns(e)}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(this.initGuard(),!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show()}hideColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide()}toggleColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),!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.initGuard(),this.columnManager.addColumn(e,t,s).then((e=>e.getComponent()))}deleteColumn(e){var t=this.columnManager.findColumn(e);return this.initGuard(),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 this.initGuard(),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);this.initGuard(),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.initGuard(),this.columnManager.redraw(e),this.rowManager.redraw(e)}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)}alert(e,t){this.initGuard(),this.alertManager.alert(e,t)}clearAlert(){this.initGuard(),this.alertManager.clear()}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}}O.defaultOptions={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,debugInvalidComponentFuncs:!0,debugInitialization:!0,debugDeprecation:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",popupContainer:!1,columns:[],columnDefaults:{},data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",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,rowHeight:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{}},new F(O);class A extends k{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":A.accessors[e]?t=A.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)),s=e.getComponent(),o=r.deepClone(e.data||{});return this.table.columnManager.traverse((function(e){var n,r,a,l;e.modules.accessor&&(r=e.modules.accessor[i]||e.modules.accessor.accessor||!1)&&"undefined"!=(n=e.getFieldValue(o))&&(l=e.getComponent(),a="function"==typeof r.params?r.params(n,o,t,l,s):r.params,e.setFieldValue(o,r.accessor(n,o,t,a,l,s)))})),o}}A.moduleName="accessor",A.accessors={};function _(e,t){var i=[];if(t=t||"",Array.isArray(e))e.forEach(((e,s)=>{i=i.concat(_(e,t?t+"["+s+"]":s))}));else if("object"==typeof e)for(var s in e)i=i.concat(_(e[s],t?t+"["+s+"]":s));else i.push({key:t,value:e});return i}function B(e){var t=_(e),i=[];return t.forEach((function(e){i.push(encodeURIComponent(e.key)+"="+encodeURIComponent(e.value))})),i.join("&")}function V(e,t,i){return e&&i&&Object.keys(i).length&&(t.method&&"get"!=t.method.toLowerCase()||(t.method="get",e+=(e.includes("?")?"&":"?")+B(i))),e}function I(e,t){var i=[];if(t=t||"",Array.isArray(e))e.forEach(((e,s)=>{i=i.concat(I(e,t?t+"["+s+"]":s))}));else if("object"==typeof e)for(var s in e)i=i.concat(I(e[s],t?t+"["+s+"]":s));else i.push({key:t,value:e});return i}var N={json:{headers:{"Content-Type":"application/json"},body:function(e,t,i){return JSON.stringify(i)}},form:{headers:{},body:function(e,t,i){var s=I(i),o=new FormData;return s.forEach((function(e){o.append(e.key,e.value)})),o}}};class W extends k{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=W.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||W.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||W.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({},W.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()}}W.moduleName="ajax",W.defaultConfig={method:"GET"},W.defaultURLGenerator=V,W.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([]))}))},W.contentTypeFormatters=N;class j extends k{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,s;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(s=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),t=(i=this.table.modules.export.generateHTMLTable(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=j.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=j.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}}j.moduleName="clipboard",j.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)}},j.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 G{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}}var U={avg:function(e,t,i){var s=0,o=void 0!==i.precision?i.precision:2;return e.length&&(s=e.reduce((function(e,t){return Number(e)+Number(t)})),s/=e.length,s=!1!==o?s.toFixed(o):s),parseFloat(s).toString()},max:function(e,t,i){var s=null,o=void 0!==i.precision&&i.precision;return e.forEach((function(e){((e=Number(e))>s||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;this.blockCheck()||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 p(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 G(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 n=new o(this.genColumn,i);n.getElement(),n.column=s,n.setWidth(),s.cells.push(n),t.push(n),s.visible||n.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}}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}}X.moduleName="columnCalcs",X.calculations=U;class q extends k{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.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,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),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.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){e&&this.table.rowManager.getRows().forEach((e=>{this.reinitializeRowChildren(e)}))}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=i.controlEl;t=t||e.getCells()[0].getElement(),!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))}getRows(e){var t=[];return e.forEach(((e,i)=>{var s;t.push(e),e instanceof p&&(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 p(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()}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}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 p&&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 p?i=e.data:e instanceof u?i=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find((t=>t instanceof p&&t.element===e)))&&(i=i.data):null===e&&(i=!1):i=void 0!==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 p&&(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]}}q.moduleName="dataTree";var K={csv:function(e,t={},i){var s=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=null!==e.value?JSON.stringify(e.value):"";break;case"undefined":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.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=null!==e.value?JSON.stringify(e.value):"";break;case"undefined":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.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.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),a=!("compress"in i)||i.compress;function l(){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(l());else{if(i.sheets)for(var h in i.sheets)!0===i.sheets[h]?(n.SheetNames.push(h),n.Sheets[h]=l()):(n.SheetNames.push(h),r.commsSend(i.sheets[h],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function(e){n.Sheets[h]=e}}));else n.SheetNames.push(o),n.Sheets[o]=l();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",compression:a})),"application/octet-stream")}},html:function(e,t,i){this.modExists("export",!0)&&i(this.modules.export.generateHTMLTable(e),"text/html")}};class J extends k{constructor(e){super(e),this.registerTableOption("downloadEncoder",(function(e,t){return new Blob([e],{type:t})})),this.registerTableOption("downloadReady",void 0),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.deprecatedOptionsCheck(),this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("downloadReady","downloadEncoder")}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:J.downloaders[e]?n=J.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=this.table.options.downloadEncoder(e,t);r&&(o?window.open(window.URL.createObjectURL(r)):(s=s||"Tabulator."+("function"==typeof i?"txt":i),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){if("intercept"===t)this.download(i.type,"",i.options,i.active,i.intercept)}}function Y(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)}J.moduleName="download",J.downloaders=K;class ${constructor(e,t,i,s,o,n){this.edit=e,this.table=e.table,this.cell=t,this.params=this._initializeParams(n),this.data=[],this.displayItems=[],this.currentItems=[],this.focusedItem=null,this.input=this._createInputElement(),this.listEl=this._createListElement(),this.initialValues=null,this.isFilter=!t._getSelf,this.filterTimeout=null,this.filtered=!1,this.typing=!1,this.values=[],this.popup=null,this.listIteration=0,this.lastAction="",this.filterTerm="",this.blurable=!0,this.actions={success:s,cancel:o},this._deprecatedOptionsCheck(),this._initializeValue(),i(this._onRendered.bind(this))}_deprecatedOptionsCheck(){this.params.listItemFormatter&&this.cell.getTable().deprecationAdvisor.msg("The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.sortValuesList&&this.cell.getTable().deprecationAdvisor.msg("The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchFunc&&this.cell.getTable().deprecationAdvisor.msg("The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchingPlaceholder&&this.cell.getTable().deprecationAdvisor.msg("The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options")}_initializeValue(){var e=this.cell.getValue();void 0===e&&void 0!==this.params.defaultValue&&(e=this.params.defaultValue),this.initialValues=this.params.multiselect?e:[e],this.isFilter&&(this.input.value=this.initialValues?this.initialValues.join(","):"",this.headerFilterInitialListGen())}_onRendered(){var e=this.cell.getElement();function t(e){e.stopPropagation()}this.input.style.height="100%",this.input.focus({preventScroll:!0}),e.addEventListener("click",t),setTimeout((()=>{e.removeEventListener("click",t)}),1e3),this.input.addEventListener("mousedown",this._preventPopupBlur.bind(this))}_createListElement(){var e=document.createElement("div");return e.classList.add("tabulator-edit-list"),e.addEventListener("mousedown",this._preventBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e}_setListWidth(){var e=this.isFilter?this.input:this.cell.getElement();this.listEl.style.minWidth=e.offsetWidth+"px",this.params.maxWidth&&(!0===this.params.maxWidth?this.listEl.style.maxWidth=e.offsetWidth+"px":"number"==typeof this.params.maxWidth?this.listEl.style.maxWidth=this.params.maxWidth+"px":this.listEl.style.maxWidth=this.params.maxWidth)}_createInputElement(){var e=this.params.elementAttributes,t=document.createElement("input");if(t.setAttribute("type",this.params.clearable?"search":"text"),t.style.padding="4px",t.style.width="100%",t.style.boxSizing="border-box",this.params.autocomplete||(t.style.cursor="default",t.style.caretColor="transparent"),e&&"object"==typeof e)for(let i in e)"+"==i.charAt(0)?(i=i.slice(1),t.setAttribute(i,t.getAttribute(i)+e["+"+i])):t.setAttribute(i,e[i]);return this.params.mask&&Y(t,this.params),this._bindInputEvents(t),t}_initializeParams(e){var t,i=["values","valuesURL","valuesLookup"];return(e=Object.assign({},e)).verticalNavigation=e.verticalNavigation||"editor",e.placeholderLoading=void 0===e.placeholderLoading?"Searching ...":e.placeholderLoading,e.placeholderEmpty=void 0===e.placeholderEmpty?"No Results Found":e.placeholderEmpty,e.filterDelay=void 0===e.filterDelay?300:e.filterDelay,e.emptyValue=Object.keys(e).includes("emptyValue")?e.emptyValue:"",(t=Object.keys(e).filter((e=>i.includes(e))).length)?t>1&&console.warn("list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor"):console.warn("list editor config error - either the values, valuesURL, or valuesLookup option must be set"),e.autocomplete?e.multiselect&&(e.multiselect=!1,console.warn("list editor config error - multiselect option is not available when autocomplete is enabled")):(e.freetext&&(e.freetext=!1,console.warn("list editor config error - freetext option is only available when autocomplete is enabled")),e.filterFunc&&(e.filterFunc=!1,console.warn("list editor config error - filterFunc option is only available when autocomplete is enabled")),e.filterRemote&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option is only available when autocomplete is enabled")),e.mask&&(e.mask=!1,console.warn("list editor config error - mask option is only available when autocomplete is enabled")),e.allowEmpty&&(e.allowEmpty=!1,console.warn("list editor config error - allowEmpty option is only available when autocomplete is enabled")),e.listOnEmpty&&(e.listOnEmpty=!1,console.warn("list editor config error - listOnEmpty option is only available when autocomplete is enabled"))),e.filterRemote&&"function"!=typeof e.valuesLookup&&!e.valuesURL&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source")),e}_bindInputEvents(e){e.addEventListener("focus",this._inputFocus.bind(this)),e.addEventListener("click",this._inputClick.bind(this)),e.addEventListener("blur",this._inputBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e.addEventListener("search",this._inputSearch.bind(this)),this.params.autocomplete&&e.addEventListener("keyup",this._inputKeyUp.bind(this))}_inputFocus(e){this.rebuildOptionsList()}_filter(){this.params.filterRemote?(clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout((()=>{this.rebuildOptionsList()}),this.params.filterDelay)):this._filterList()}_inputClick(e){e.stopPropagation()}_inputBlur(e){this.blurable&&(this.popup?this.popup.hide():this._resolveValue(!0))}_inputSearch(){this._clearChoices()}_inputKeyDown(e){switch(e.keyCode){case 38:this._keyUp(e);break;case 40:this._keyDown(e);break;case 37:case 39:this._keySide(e);break;case 13:this._keyEnter();break;case 27:this._keyEsc();break;case 36:case 35:this._keyHomeEnd(e);break;case 9:break;default:this._keySelectLetter(e)}}_inputKeyUp(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:this._keyAutoCompLetter(e)}}_preventPopupBlur(){this.popup&&this.popup.blockHide(),setTimeout((()=>{this.popup&&this.popup.restoreHide()}),10)}_preventBlur(){this.blurable=!1,setTimeout((()=>{this.blurable=!0}),10)}_keyUp(e){var t=this.displayItems.indexOf(this.focusedItem);("editor"==this.params.verticalNavigation||"hybrid"==this.params.verticalNavigation&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&this._focusItem(this.displayItems[t-1]))}_keyDown(e){var t=this.displayItems.indexOf(this.focusedItem);("editor"==this.params.verticalNavigation||"hybrid"==this.params.verticalNavigation&&t=38&&e.keyCode<=90&&this._scrollToValue(e.keyCode))}_keyAutoCompLetter(e){this._filter(),this.lastAction="typing",this.typing=!0}_scrollToValue(e){clearTimeout(this.filterTimeout);var t=String.fromCharCode(e).toLowerCase();this.filterTerm+=t.toLowerCase();var i=this.displayItems.find((e=>void 0!==e.label&&e.label.toLowerCase().startsWith(this.filterTerm)));i&&this._focusItem(i),this.filterTimeout=setTimeout((()=>{this.filterTerm=""}),800)}_focusItem(e){this.lastAction="focus",this.focusedItem&&this.focusedItem.element&&this.focusedItem.element.classList.remove("focused"),this.focusedItem=e,e&&e.element&&(e.element.classList.add("focused"),e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}))}headerFilterInitialListGen(){this._generateOptions(!0)}rebuildOptionsList(){this._generateOptions().then(this._sortOptions.bind(this)).then(this._buildList.bind(this)).then(this._showList.bind(this)).catch((e=>{Number.isInteger(e)||console.error("List generation error",e)}))}_filterList(){this._buildList(this._filterOptions()),this._showList()}_generateOptions(e){var t=[],i=++this.listIteration;return this.filtered=!1,this.params.values?t=this.params.values:this.params.valuesURL?t=this._ajaxRequest(this.params.valuesURL,this.input.value):"function"==typeof this.params.valuesLookup?t=this.params.valuesLookup(this.cell,this.input.value):this.params.valuesLookup&&(t=this._uniqueColumnValues(this.params.valuesLookupField)),t instanceof Promise?(e||this._addPlaceholder(this.params.placeholderLoading),t.then().then((e=>this.listIteration===i?this._parseList(e):Promise.reject(i)))):Promise.resolve(this._parseList(t))}_addPlaceholder(e){var t=document.createElement("div");"function"==typeof e&&(e=e(this.cell.getComponent(),this.listEl)),e&&(this._clearList(),e instanceof HTMLElement?t=e:(t.classList.add("tabulator-edit-list-placeholder"),t.innerHTML=e),this.listEl.appendChild(t),this._showList())}_ajaxRequest(e,t){return e=V(e,{},this.params.filterRemote?{term:t}:{}),fetch(e).then((e=>e.ok?e.json().catch((e=>(console.warn("List Ajax Load Error - Invalid JSON returned",e),Promise.reject(e)))):(console.error("List Ajax Load Error - Connection Error: "+e.status,e.statusText),Promise.reject(e)))).catch((e=>(console.error("List Ajax Load Error - Connection Error: ",e),Promise.reject(e))))}_uniqueColumnValues(e){var t,i={},s=this.table.getData(this.params.valuesLookup);return(t=e?this.table.columnManager.getColumnByField(e):this.cell.getColumn()._getSelf())?s.forEach((e=>{var s=t.getFieldValue(e);null!=s&&""!==s&&(i[s]=!0)})):(console.warn("unable to find matching column to create select lookup list:",e),i=[]),Object.keys(i)}_parseList(e){var t=[];return Array.isArray(e)||(e=Object.entries(e).map((([e,t])=>({label:t,value:e})))),e.forEach((e=>{"object"!=typeof e&&(e={label:e,value:e}),this._parseListItem(e,t,0)})),!this.currentItems.length&&this.params.freetext&&(this.input.value=this.initialValues,this.typing=!0,this.lastAction="typing"),this.data=t,t}_parseListItem(e,t,i){var s={};e.options?s=this._parseListGroup(e,i+1):(s={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,selected:!1,visible:!0,level:i,original:e},this.initialValues&&this.initialValues.indexOf(e.value)>-1&&this._chooseItem(s,!0)),t.push(s)}_parseListGroup(e,t){var i={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,visible:!0,level:t,options:[],original:e};return e.options.forEach((e=>{this._parseListItem(e,i.options,t)})),i}_sortOptions(e){var t;return this.params.sort&&(t="function"==typeof this.params.sort?this.params.sort:this._defaultSortFunction.bind(this),this._sortGroup(t,e)),e}_sortGroup(e,t){t.sort(((t,i)=>e(t.label,i.label,t.value,i.value,t.original,i.original))),t.forEach((t=>{t.group&&this._sortGroup(e,t.options)}))}_defaultSortFunction(e,t){var i,s,o,n,r,a=0,l=/(\d+)|(\D+)/g,h=/\d/,d=0;if("desc"===this.params.sort&&([e,t]=[t,e]),e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if((i=String(e).toLowerCase())===(s=String(t).toLowerCase()))return 0;if(!h.test(i)||!h.test(s))return i>s?1:-1;for(i=i.match(l),s=s.match(l),r=i.length>s.length?s.length:i.length;an?1:-1;return i.length>s.length}d=1}else d=t||0===t?-1:0;return d}_filterOptions(){var e=this.params.filterFunc||this._defaultFilterFunc,t=this.input.value;return t?(this.filtered=!0,this.data.forEach((i=>{this._filterItem(e,t,i)}))):this.filtered=!1,this.data}_filterItem(e,t,i){var s=!1;return i.group?(i.options.forEach((i=>{this._filterItem(e,t,i)&&(s=!0)})),i.visible=s):i.visible=e(t,i.label,i.value,i.original),i.visible}_defaultFilterFunc(e,t,i,s){return e=String(e).toLowerCase(),null!=t&&(String(t).toLowerCase().indexOf(e)>-1||String(i).toLowerCase().indexOf(e)>-1)}_clearList(){for(;this.listEl.firstChild;)this.listEl.removeChild(this.listEl.firstChild);this.displayItems=[]}_buildList(e){this._clearList(),e.forEach((e=>{this._buildItem(e)})),this.displayItems.length||this._addPlaceholder(this.params.placeholderEmpty)}_buildItem(e){var t,i=e.element;if(!this.filtered||e.visible){if(!i){if((i=document.createElement("div")).tabIndex=0,(t=this.params.itemFormatter?this.params.itemFormatter(e.label,e.value,e.original,i):e.label)instanceof HTMLElement?i.appendChild(t):i.innerHTML=t,e.group?i.classList.add("tabulator-edit-list-group"):i.classList.add("tabulator-edit-list-item"),i.classList.add("tabulator-edit-list-group-level-"+e.level),e.elementAttributes&&"object"==typeof e.elementAttributes)for(let t in e.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),i.setAttribute(t,this.input.getAttribute(t)+e.elementAttributes["+"+t])):i.setAttribute(t,e.elementAttributes[t]);e.group?i.addEventListener("click",this._groupClick.bind(this,e)):i.addEventListener("click",this._itemClick.bind(this,e)),i.addEventListener("mousedown",this._preventBlur.bind(this)),e.element=i}this._styleItem(e),this.listEl.appendChild(i),e.group?e.options.forEach((e=>{this._buildItem(e)})):this.displayItems.push(e)}}_showList(){var e=this.popup&&this.popup.isVisible();if(this.input.parentNode){if(this.params.autocomplete&&""===this.input.value&&!this.params.listOnEmpty)return void(this.popup&&this.popup.hide(!0));this._setListWidth(),this.popup||(this.popup=this.edit.popup(this.listEl)),this.popup.show(this.cell.getElement(),"bottom"),e||setTimeout((()=>{this.popup.hideOnBlur(this._resolveValue.bind(this,!0))}),10)}}_styleItem(e){e&&e.element&&(e.selected?e.element.classList.add("active"):e.element.classList.remove("active"))}_itemClick(e,t){t.stopPropagation(),this._chooseItem(e)}_groupClick(e,t){t.stopPropagation()}_cancel(){this.popup.hide(!0),this.actions.cancel()}_clearChoices(){this.typing=!0,this.currentItems.forEach((e=>{e.selected=!1,this._styleItem(e)})),this.currentItems=[],this.focusedItem=null}_chooseItem(e,t){var i;this.typing=!1,this.params.multiselect?((i=this.currentItems.indexOf(e))>-1?(this.currentItems.splice(i,1),e.selected=!1):(this.currentItems.push(e),e.selected=!0),this.input.value=this.currentItems.map((e=>e.label)).join(","),this._styleItem(e)):(this.currentItems=[e],e.selected=!0,this.input.value=e.label,this._styleItem(e),t||this._resolveValue()),this._focusItem(e)}_resolveValue(e){var t,i;if(this.popup&&this.popup.hide(!0),this.params.multiselect)t=this.currentItems.map((e=>e.value));else if(e&&this.params.autocomplete&&this.typing){if(!(this.params.freetext||this.params.allowEmpty&&""===this.input.value))return void this.actions.cancel();t=this.input.value}else t=this.currentItems[0]?this.currentItems[0].value:null==(i=this.initialValues[0])||""===i?i:this.params.emptyValue;""===t&&(t=this.params.emptyValue),this.actions.success(t),this.isFilter&&(this.initialValues=t&&!Array.isArray(t)?[t]:t,this.currentItems=[])}}var Z={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%",o.selectContents&&r.select()})),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&&Y(r,o),r},textarea:function(e,t,i,s,o){var n=e.getValue(),r=o.verticalNavigation||"hybrid",a=String(null!=n?n:""),l=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(),o.selectContents&&l.select()})),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 13:e.shiftKey&&o.shiftEnterSubmit&&d();break;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&&Y(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),o.selectContents&&a.select()})),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&&Y(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},date:function(e,t,i,s,o){var n=o.format,r=n?window.DateTime||luxon.DateTime:null,a=e.getValue(),l=document.createElement("input");function h(e){return(r.isDateTime(e)?e:"iso"===n?r.fromISO(String(e)):r.fromFormat(String(e),n)).toFormat("yyyy-MM-dd")}if(l.type="date",l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.max&&l.setAttribute("max",n?h(o.max):o.max),o.min&&l.setAttribute("min",n?h(o.min):o.min),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(e){var t=l.value;null==a&&""!==t||t!==a?(t&&n&&(t=r.fromFormat(String(t),"yyyy-MM-dd").toFormat(n)),i(t)&&(a=l.value)):s()}return a=void 0!==a?a:"",n&&(r?a=h(a):console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js")),l.value=a,t((function(){l.focus({preventScroll:!0}),l.style.height="100%",o.selectContents&&l.select()})),l.addEventListener("change",d),l.addEventListener("blur",d),l.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),l},time:function(e,t,i,s,o){var n,r=o.format,a=r?window.DateTime||luxon.DateTime:null,l=e.getValue(),h=document.createElement("input");if(h.type="time",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),h.setAttribute(e,h.getAttribute(e)+o.elementAttributes["+"+e])):h.setAttribute(e,o.elementAttributes[e]);function d(e){var t=h.value;null==l&&""!==t||t!==l?(t&&r&&(t=a.fromFormat(String(t),"hh:mm").toFormat(r)),i(t)&&(l=h.value)):s()}return l=void 0!==l?l:"",r&&(a?(n=a.isDateTime(l)?l:"iso"===r?a.fromISO(String(l)):a.fromFormat(String(l),r),l=n.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js")),h.value=l,t((function(){h.focus({preventScroll:!0}),h.style.height="100%",o.selectContents&&h.select()})),h.addEventListener("change",d),h.addEventListener("blur",d),h.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),h},datetime:function(e,t,i,s,o){var n,r=o.format,a=r?window.DateTime||luxon.DateTime:null,l=e.getValue(),h=document.createElement("input");if(h.type="datetime-local",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),h.setAttribute(e,h.getAttribute(e)+o.elementAttributes["+"+e])):h.setAttribute(e,o.elementAttributes[e]);function d(e){var t=h.value;null==l&&""!==t||t!==l?(t&&r&&(t=a.fromISO(String(t)).toFormat(r)),i(t)&&(l=h.value)):s()}return l=void 0!==l?l:"",r&&(a?(n=a.isDateTime(l)?l:"iso"===r?a.fromISO(String(l)):a.fromFormat(String(l),r),l=n.toFormat("yyyy-MM-dd")+"T"+n.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js")),h.value=l,t((function(){h.focus({preventScroll:!0}),h.style.height="100%",o.selectContents&&h.select()})),h.addEventListener("change",d),h.addEventListener("blur",d),h.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),h},select:function(e,t,i,s,o){return this.deprecationMsg("The select editor has been deprecated, please use the new list editor"),new $(this,e,t,i,s,o).input},list:function(e,t,i,s,o){return new $(this,e,t,i,s,o).input},autocomplete:function(e,t,i,s,o){return this.deprecationMsg("The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam"),o.autocomplete=!0,new $(this,e,t,i,s,o).input},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 p(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 m(e){var t=document.createElement("span"),s=u.cloneNode(!0);d.push(s),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(),i(e),r.blur()})),t.appendChild(s),c.appendChild(t)}function g(e){a=e,p(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++)m(b);return p(a=Math.min(parseInt(a),l)),c.addEventListener("mousemove",(function(e){p(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"),p=document.createElement("div");function m(){var e=window.getComputedStyle(a,null),t=d*Math.round(p.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"),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%",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),p.setAttribute(e,p.getAttribute(e)+o.elementAttributes["+"+e])):p.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),p.style.width=c+"%",a.setAttribute("aria-valuemin",h),a.setAttribute("aria-valuemax",l),p.appendChild(u),u.addEventListener("mousedown",(function(e){n=e.screenX,r=p.offsetWidth})),u.addEventListener("mouseover",(function(){u.style.cursor="ew-resize"})),a.addEventListener("mousemove",(function(e){n&&(p.style.width=r+e.screenX-n+"px")})),a.addEventListener("mouseup",(function(e){n&&(e.stopPropagation(),e.stopImmediatePropagation(),n=!1,r=!1,m())})),a.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:e.preventDefault(),p.style.width=p.clientWidth+a.clientWidth/100+"px";break;case 37:e.preventDefault(),p.style.width=p.clientWidth-a.clientWidth/100+"px";break;case 9:case 13:m();break;case 27:s()}})),a.addEventListener("blur",(function(){s()})),p},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,d=Object.keys(o).includes("trueValue"),c=Object.keys(o).includes("falseValue");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 u(e){var t=r.checked;return d&&t?t=o.trueValue:c&&!t&&(t=o.falseValue),a?e?h?l:t:r.checked&&!h?(r.checked=!1,r.indeterminate=!0,h=!0,l):(h=!1,t):t}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=d?n===o.trueValue:!0===n||"true"===n||"True"===n||1===n,t((function(){r.focus()})),r.addEventListener("change",(function(e){i(u())})),r.addEventListener("blur",(function(e){i(u(!0))})),r.addEventListener("keydown",(function(e){13==e.keyCode&&i(u()),27==e.keyCode&&s()})),r}};class Q extends k{constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.editors=Q.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("cell-value-changed",this.updateCellClass.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("row-layout",this.rowEditableCheck.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 ")}updateCellClass(e){this.allowEdit(e)?e.getElement().classList.add("tabulator-editable"):e.getElement().classList.remove("tabulator-editable")}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.findPrevEditableCell(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 s=t-1;s>=0;s--){let t=e.cells[s];if(t.column.modules.edit&&r.elVisible(t.getElement())){if(this.allowEdit(t)){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()}rowEditableCheck(e){e.getCells().forEach((e=>{e.column.modules.edit&&"function"==typeof e.column.modules.edit.check&&this.updateCellClass(e)}))}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(),this.dispatch("edit-editor-clear",i,e),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);i.row.getElement().classList.remove("tabulator-editing"),i.table.element.classList.remove("tabulator-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);this.updateCellClass(e),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.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();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)}}allowEdit(e){var t=!!e.column.modules.edit;if(e.column.modules.edit)switch(typeof e.column.modules.edit.check){case"function":e.row.initialized&&(t=e.column.modules.edit.check(e.getComponent()));break;case"string":t=!!e.row.data[e.column.modules.edit.check];break;case"boolean":t=e.column.modules.edit.check}return t}edit(e,t,i){var s,o,n,r=this,a=function(){},l=e.getElement();if(!this.currentCell){if(e.column.modules.edit.blocked)return this.mouseClick=!1,l.blur(),!1;if(t&&t.stopPropagation(),this.allowEdit(e)||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){a=e}),(function(t){if(r.currentCell===e){var i=r.chain("edit-success",[e,t],!0,!0);return!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):(r.invalidEdit=!0,r.focusCellNoEvent(e,!0),a(),!1)}}),(function(){r.currentCell===e&&r.cancelEdit()}),n)))return l.blur(),!1;if(!(s instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",s),l.blur(),!1;for(l.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-editing"),e.table.element.classList.add("tabulator-editing");l.firstChild;)l.removeChild(l.firstChild);l.appendChild(s),a();for(var h=l.children,d=0;d{e.push(t.getComponent())})),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,this.dispatch("edit-edited-clear",e)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)}}Q.moduleName="edit",Q.editors=Z;class ee{constructor(e,t,i,s){this.type=e,this.columns=t,this.component=i||!1,this.indent=s||0}}class te{constructor(e,t,i,s,o){this.value=e,this.component=t||!1,this.width=i,this.height=s,this.depth=o}}class ie extends k{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)}generateTable(e,t,i,s){var o=this.generateExportList(e,t,i,s);return this.generateTableElement(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;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){var t=e.definition[this.colVisProp];return"function"==typeof t&&(t=t.call(this.table,e.getComponent())),!1!==t&&(e.visible||!e.visible&&t)}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 te(i,e.column.getComponent(),e.width,e.height,e.depth))}else t.push(null)})),s.push(new ee("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 te(e.key,e.getComponent(),t.length,1));break;case"calc":case"row":t.forEach((e=>{n.push(new te(e._column.getFieldValue(o),e,1,1))})),this.table.options.dataTree&&!1!==this.config.dataTree&&(r=e.modules.dataTree.index)}i.push(new ee(e.type,n,e.getComponent(),r))})),i}generateTableElement(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)=>{let n;switch(e.type){case"header":i.appendChild(this.generateHeaderElement(e,r,o));break;case"group":s.appendChild(this.generateGroupElement(e,r,o));break;case"calc":s.appendChild(this.generateCalcElement(e,r,o));break;case"row":n=this.generateRowElement(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}generateHeaderElement(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}generateGroupElement(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=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}generateCalcElement(e,t,i){var s=this.generateRowElement(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}generateRowElement(e,t,i){var s=document.createElement("tr");return s.classList.add("tabulator-print-table-row"),e.columns.forEach(((o,n)=>{if(o){var r,a=document.createElement("td"),l=o.component._column,h=this.table.columnManager.findColumnIndex(l),d=o.value,c={modules:{},getValue:function(){return d},getField:function(){return l.definition.field},getElement:function(){return a},getColumn:function(){return l.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getComponent:function(){return c},column:l};if((l.definition.cssClass?l.definition.cssClass.split(" "):[]).forEach((function(e){a.classList.add(e)})),this.table.modExists("format")&&!1!==this.config.formatCells)d=this.table.modules.format.formatExportValue(c,this.colVisProp);else switch(typeof d){case"object":d=null!==d?JSON.stringify(d):"";break;case"undefined":d=""}d instanceof Node?a.appendChild(d):a.innerHTML=d,(r=i.styleCells&&i.styleCells[h]?i.styleCells[h]:i.firstCell)&&(this.mapElementStyles(r,a,["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"]),l.definition.align&&(a.style.textAlign=l.definition.align)),this.table.options.dataTree&&!1!==this.config.dataTree&&(t.treeElementField&&t.treeElementField==l.field||!t.treeElementField&&0==n)&&(e.component._row.modules.dataTree.controlEl&&a.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),a.firstChild),e.component._row.modules.dataTree.branchEl&&a.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),a.firstChild)),s.appendChild(a),c.modules.format&&c.modules.format.renderedCallback&&c.modules.format.renderedCallback(),t.rowFormatter&&!1!==this.config.formatCells&&t.rowFormatter(e.component)}})),s}generateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.generateTableElement(e)),t.innerHTML}getHtml(e,t,i,s){var o=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,s||"htmlOutput");return this.generateHTMLTable(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)}))}}}}ie.moduleName="export";var se={"=":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 oe extends k{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":oe.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,oe.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)if("partial"===n)o=function(i){var s=e.getFieldValue(i);return null!=s&&String(s).toLowerCase().indexOf(String(t).toLowerCase())>-1},r="like";else o=function(i){return e.getFieldValue(i)==t},r="=";i.headerFilters[s]={value:t,func:o,type:r}}e.modules.filter.value=t,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.value=t,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},(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()},getTable:()=>this.table,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);d.langBind("headerFilters|columns|"+e.definition.field,(function(e){n.setAttribute("placeholder",void 0!==e&&e?e:d.langText("headerFilters|default"))})),n.addEventListener("click",(function(e){e.stopPropagation(),n.focus()})),n.addEventListener("focus",(e=>{var t=this.table.columnManager.contentsElement.scrollLeft;t!==this.table.rowManager.element.scrollLeft&&(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.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(null,!1,!1):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||{})}:oe.filters[e.type]?i=(t=this.table.columnManager.getColumnByField(e.field))?function(i){return oe.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return oe.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(!0)),"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(!0),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}}oe.moduleName="filter",oe.filters=se;var ne={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||"",p=!!t.symbolAfter,m=void 0!==t.precision?t.precision:2;if(isNaN(a))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));if(a<0&&(a=Math.abs(a),l=c),s=!1!==m?a.toFixed(m):a,o=(s=String(s).split("."))[0],n=s.length>1?h+s[1]:"",!1!==t.thousand)for(r=/(\d+)(\d{3})/;r.test(o);)o=o.replace(r,"$1"+d+"$2");return p?l+o+n+u:l+u+o+n},link:function(e,t,i){var s,o=e.getValue(),n=t.urlPrefix||"",r=t.download,a=o,l=document.createElement("a");if(t.labelField&&(s=e.getData(),a=function e(t,i){var s=i[t.shift()];return t.length&&"object"==typeof s?e(t,s):s}(t.labelField.split(this.table.options.nestedFieldSeparator),s)),t.label)switch(typeof t.label){case"string":a=t.label;break;case"function":a=t.label(e)}if(a){if(t.urlField&&(o=(s=e.getData())[t.urlField]),t.url)switch(typeof t.url){case"string":o=t.url;break;case"function":o=t.url(e)}return l.setAttribute("href",n+o),t.target&&l.setAttribute("target",t.target),t.download&&(r="function"==typeof r?r(e):!0===r?"":r,l.setAttribute("download",r)),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(a)),l}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=Object.keys(t).includes("trueValue"),l=void 0!==t.tickElement?t.tickElement:'',h=void 0!==t.crossElement?t.crossElement:'';return a&&s===t.trueValue||!a&&(r&&s||!0===s||"true"===s||"True"===s||1===s||"1"===s)?(o.setAttribute("aria-checked",!0),l||""):!n||"null"!==s&&""!==s&&null!=s?(o.setAttribute("aria-checked",!1),h||""):(o.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,i){var s,o=window.DateTime||luxon.DateTime,n=t.inputFormat||"yyyy-MM-dd HH:mm:ss",r=t.outputFormat||"dd/MM/yyyy HH:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",l=e.getValue();if(void 0!==o)return(s=o.isDateTime(l)?l:"iso"===n?o.fromISO(String(l)):o.fromFormat(String(l),n)).isValid?(t.timezone&&(s=s.setZone(t.timezone)),s.toFormat(r)):!0!==a&&l?"function"==typeof a?a(l):a:l;console.error("Format Error - 'datetime' formatter is dependant on luxon.js")},datetimediff:function(e,t,i){var s,o=window.DateTime||luxon.DateTime,n=t.inputFormat||"yyyy-MM-dd HH:mm:ss",r=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",a=void 0!==t.suffix&&t.suffix,l=void 0!==t.unit?t.unit:"days",h=void 0!==t.humanize&&t.humanize,d=void 0!==t.date?t.date:o.now(),c=e.getValue();if(void 0!==o)return(s=o.isDateTime(c)?c:"iso"===n?o.fromISO(String(c)):o.fromFormat(String(c),n)).isValid?h?s.diff(d,l).toHuman()+(a?" "+a:""):parseInt(s.diff(d,l)[l])+(a?" "+a:""):!0===r?c:"function"==typeof r?r(c):r;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 o,n,r,a,l,h=this.sanitizeHTML(e.getValue())||0,d=e.getElement(),c=t.max?t.max:100,u=t.min?t.min:0,p=t.legendAlign?t.legendAlign:"center";switch(n=parseFloat(h)<=c?parseFloat(h):c,n=parseFloat(n)>=u?parseFloat(n):u,o=(c-u)/100,n=Math.round((n-u)/o),typeof t.color){case"string":r=t.color;break;case"function":r=t.color(h);break;case"object":if(Array.isArray(t.color)){let e=100/t.color.length,i=Math.floor(n/e);i=Math.min(i,t.color.length-1),i=Math.max(i,0),r=t.color[i];break}default:r="#2DC214"}switch(typeof t.legend){case"string":a=t.legend;break;case"function":a=t.legend(h);break;case"boolean":a=h;break;default:a=!1}switch(typeof t.legendColor){case"string":l=t.legendColor;break;case"function":l=t.legendColor(h);break;case"object":if(Array.isArray(t.legendColor)){let e=100/t.legendColor.length,i=Math.floor(n/e);i=Math.min(i,t.legendColor.length-1),i=Math.max(i,0),l=t.legendColor[i]}break;default:l="#000"}d.style.minWidth="30px",d.style.position="relative",d.setAttribute("aria-label",n);var m=document.createElement("div");m.style.display="inline-block",m.style.width=n+"%",m.style.backgroundColor=r,m.style.height="100%",m.setAttribute("data-max",c),m.setAttribute("data-min",u);var g=document.createElement("div");if(g.style.position="relative",g.style.width="100%",g.style.height="100%",a){var b=document.createElement("div");b.style.position="absolute",b.style.top=0,b.style.left=0,b.style.textAlign=p,b.style.width="100%",b.style.color=l,b.innerHTML=a}return i((function(){if(!(e instanceof s)){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",d.appendChild(t),d=t}d.appendChild(g),g.appendChild(m),a&&g.appendChild(b)})),""},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){var s=document.createElement("span");return e.getRow().watchPosition((e=>{s.innerText=e})),s},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='\n \n \n\n\n\n \n',e.getElement().classList.add("tabulator-row-handle"),s.addEventListener("click",(function(t){t.stopImmediatePropagation(),n(!o.open),e.getTable().rowManager.adjustTableSize()})),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 u?(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 re extends k{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":re.formatters[s]?i.formatter=re.formatters[s]:(console.warn("Formatter Error - No such formatter found: ",s),i.formatter=re.formatters.plaintext);break;case"function":i.formatter=s;break;default:i.formatter=re.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},getColumn:function(){return e.getComponent()},getTable:()=>this.table},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){function o(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}return i="function"==typeof s.params?s.params(e.getComponent()):s.params,s.formatter.call(this,e.getComponent(),i,o)}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":re.formatters[e]?e=re.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=re.formatters.plaintext);break;case"function":break;default:e=re.formatters.plaintext}return e}}re.moduleName="format",re.formatters=ne;class ae extends k{constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.initializationMode="left",this.active=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1}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("columns-loading",this.reset.bind(this)),this.subscribe("column-add",this.reinitializeColumns.bind(this)),this.subscribe("column-delete",this.reinitializeColumns.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)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}reinitializeColumns(){this.reset(),this.table.columnManager.columnsByIndex.forEach((e=>{this.initializeColumn(e)}))}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}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)}))}layoutColumnPosition(e){var t=[],i=0,s=0;this.leftColumns.forEach(((s,o)=>{if(s.modules.frozen.marginValue=i,s.modules.frozen.margin=s.modules.frozen.marginValue+"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.modules.frozen.marginValue=s,t.modules.frozen.margin=t.modules.frozen.marginValue+"px",t.visible&&(s+=t.getWidth()),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.layoutColumnPosition(),this.reinitializeRows(),this.layoutCalcRows())}reinitializeRows(){var e=this.table.rowManager.getVisibleRows(!0);this.table.rowManager.getRows().filter((t=>!e.includes(t))).forEach((e=>{e.deinitialize()})),e.forEach((e=>{"row"===e.type&&this.layoutRow(e)}))}layoutRow(e){"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){var i;t.modules.frozen&&(e.style.position="sticky",i=this.table.rtl?"left"===t.modules.frozen.position?"right":"left":t.modules.frozen.position,e.style[i]=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))}adjustForScrollbar(e){this.rightColumns.length&&(this.table.columnManager.getContentsElement().style.width="calc(100% - "+e+"px)")}_calcSpace(e,t){var i=0;for(let s=0;s{this.initializeRow(e)}))}initializeRow(e){var t=this.table.options.frozenRows,i=typeof t;"number"===i?e.getPosition()&&e.getPosition()+this.rows.length<=t&&this.freezeRow(e):"function"===i?t.call(this.table,e.getComponent())&&this.freezeRow(e):Array.isArray(t)&&t.includes(e.data[this.options("frozenRowsField")])&&this.freezeRow(e)}isRowFrozen(e){return this.rows.indexOf(e)>-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.rows.push(e),this.refreshData(!1,"display"),this.table.rowManager.adjustTableSize(),this.styleRows())}unfreezeRow(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)}))}}le.moduleName="frozenRows";class he{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 de{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 de(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(){var e=[];return e.push(this),this._visSet(),this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.visible?this.groupList.length?this.groupList.forEach((function(t){e=e.concat(t.getHeadersAndRows())})):("table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))),e}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,"basic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination||(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.updateGroupRows(!0),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,"basic"!=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.updateGroupRows(!0)}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))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])}else this.groupList=[],this.groups={}}rowSample(e,t){if(this.table.options.groupBy){var i=this.getGroups(!1)[0];t.push(i.getRows(!1)[0])}return t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();if(!this.table.options.groupBy)return t;t=t.filter((e=>"group"!==e.type)),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px"}rowAddingIndex(e,t,i){if(this.table.options.groupBy){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.initialize(),this.configureGroupSetup(),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){if(this.table.options.groupBy){!i&&t instanceof de&&(t=this.table.rowManager.prevDisplayRow(e)||t);var s=t instanceof de?t:t.modules.group,o=e instanceof de?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){this.table.options.groupBy&&e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.table.options.groupBy&&this.updateGroupRows(!0)}cellUpdated(e){this.table.options.groupBy&&this.reassignRowToGroup(e.row)}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.table.options.groupBy&&(this.groupList.forEach((function(e){e.wipe()})),this.groupList=[],this.groups={})}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.options("dataTree")&&(e=this.table.modules.dataTree.getTreeParentRoot(e)),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)})),Object.values(t).forEach((e=>{e.wipe()}))}createGroup(e,t,i){var s,o=t+"_"+e;i=i||[],s=new de(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){this.table.options.groupBy&&("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))}checkBasicModeGroupHeaderWidth(){var e=this.table.rowManager.tableElement,t=!0;this.table.rowManager.getDisplayRows().forEach(((i,s)=>{this.table.rowManager.styleRow(i,s),e.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(t=!1)})),e.style.minWidth=t?this.table.columnManager.getWidth()+"px":""}}ce.moduleName="groupRows";class ue extends k{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:e.getPosition(),posTo:t.getPosition(),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()._getSelf().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 ue.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 ue.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 p)i.component===e&&(i.component=t);else if(i.component instanceof o&&i.component.row===e){var s=i.component.column.getField();s&&(i.component=t.getCell(s))}}))}}ue.moduleName="history",ue.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()}},ue.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 pe extends k{constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&"TABLE"===this.table.originalElement.tagName&&(this.table.originalElement.childNodes.length?this.parseTable():console.warn("Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element."))}parseTable(){var e=this.table.originalElement,t=this.table.options,i=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?ge.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;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)}}ge.moduleName="import",ge.importers=me;class be extends k{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",rowMouseDown:"row-mousedown",rowMouseUp:"row-mouseup",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",cellMouseDown:"cell-mousedown",cellMouseUp:"cell-mouseup",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",headerMouseDown:"column-mousedown",headerMouseUp:"column-mouseup",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",groupMouseDown:"group-mousedown",groupMouseUp:"group-mouseup",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("headerMouseDown"),this.registerColumnOption("headerMouseUp"),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("cellMouseDown"),this.registerColumnOption("cellMouseUp"),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){var i;if(!this.table.modExists("edit")||this.table.modules.edit.currentCell!==t){e.preventDefault();try{document.selection?((i=document.body.createTextRange()).moveToElementText(t.getElement()),i.select()):window.getSelection&&((i=document.createRange()).selectNode(t.getElement()),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,r=i.getComponent();this.columnSubscribers[e]&&(i instanceof o?s=i.column.definition[e]:i instanceof n&&(s=i.definition[e]),s&&s(t,r)),this.dispatchExternal(e,t,r)}}be.moduleName="interaction";class fe extends k{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,fe.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)fe.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:fe.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)}}fe.moduleName="keybindings",fe.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"]},fe.actions={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,i=t.scrollTop-t.element.clientHeight;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 ve extends k{constructor(e){super(e),this.menuContainer=null,this.nestedMenuBlock=!1,this.currentComponent=null,this.rootPopup=null,this.columnSubscribers={},this.registerTableOption("menuContainer",void 0),this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("rowDblClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("groupDblClickMenu",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerDblClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("headerMenuIcon"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu"),this.registerColumnOption("dblClickMenu")}initialize(){this.deprecatedOptionsCheck(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("menuContainer","popupContainer")||(this.table.options.popupContainer=this.table.options.menuContainer)}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)),this.table.options.rowDblClickMenu&&this.subscribe("row-dblclick",this.loadMenuEvent.bind(this,this.table.options.rowDblClickMenu))}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)),this.table.options.groupDblClickMenu&&this.subscribe("group-dblclick",this.loadMenuEvent.bind(this,this.table.options.groupDblClickMenu))}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.headerDblClickMenu&&!this.columnSubscribers.headerDblClickMenu&&(this.columnSubscribers.headerDblClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerDblClickMenu"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickMenu)),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)),t.dblClickMenu&&!this.columnSubscribers.dblClickMenu&&(this.columnSubscribers.dblClickMenu=this.loadMenuTableCellEvent.bind(this,"dblClickMenu"),this.subscribe("cell-dblclick",this.columnSubscribers.dblClickMenu))}initializeColumnHeaderMenu(e){var t,i=e.definition.headerMenuIcon;(t=document.createElement("span")).classList.add("tabulator-header-popup-button"),i?("function"==typeof i&&(i=i(e.getComponent())),i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i):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,t,i.getComponent()):e,this.loadMenu(t,i,e)}loadMenu(e,t,i,s,o){var n,r=!(e instanceof MouseEvent),a=document.createElement("div");if(a.classList.add("tabulator-menu"),r||e.preventDefault(),i&&i.length){if(s)n=o.child(a);else{if(this.nestedMenuBlock){if(this.rootPopup)return}else this.nestedMenuBlock=setTimeout((()=>{this.nestedMenuBlock=!1}),100);this.rootPopup&&this.rootPopup.hide(),this.rootPopup=n=this.popup(a)}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.loadMenu(s,t,e.menu,i,n)})):e.action&&i.addEventListener("click",(i=>{e.action(i,t.getComponent())})),e.menu&&e.menu.length&&i.classList.add("tabulator-menu-item-submenu")),a.appendChild(i)})),a.addEventListener("click",(e=>{this.rootPopup&&this.rootPopup.hide()})),n.show(s||e),n===this.rootPopup&&(this.rootPopup.hideOnBlur((()=>{this.rootPopup=null,this.currentComponent&&(this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)})),this.currentComponent=t,this.dispatchExternal("menuOpened",t.getComponent()))}}}ve.moduleName="menu";class we extends k{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,s={};e.modules.frozen||e.isGroup||(t=e.getElement(),s.mousemove=function(s){e.parent===i.moving.parent&&((i.touchMove?s.touches[0].pageX:s.pageX)-r.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=s}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(),s=this.table.columnManager.getContentsElement(),o=this.table.columnManager.getHeadersElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-r.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"),s.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=s.clientHeight-o.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.getContentsElement(),s=i.scrollLeft,o=(this.touchMove?e.touches[0].pageX:e.pageX)-r.elOffset(i).left+s;this.hoverElement.style.left=o-this.startX+"px",o-s{t=Math.max(0,s-5),this.table.rowManager.getElement().scrollLeft=t,this.autoScrollTimeout=!1}),1))),s+i.clientWidth-o{t=Math.min(i.clientWidth,s+5),this.table.rowManager.getElement().scrollLeft=t,this.autoScrollTimeout=!1}),1)))}}we.moduleName="moveColumn";class Ce extends k{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(i){t.tableRowDrop(i,e)}.bind(t),i.mousemove=function(i){var s;i.pageY-r.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?t.toRow===e&&t.toRowAfter||((s=e.getElement()).parentNode.insertBefore(t.placeholderElement,s.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(s=e.getElement()).previousSibling&&(s.parentNode.insertBefore(t.placeholderElement,s),t.moveRow(e,!1))}.bind(t),e.modules.moveRow=i}initializeRow(e){var t,i=this,s={};s.mouseup=function(t){i.tableRowDrop(t,e)}.bind(i),s.mousemove=function(t){var s=e.getElement();t.pageY-r.elOffset(s).top+i.table.rowManager.element.scrollTop>e.getHeight()/2?i.toRow===e&&i.toRowAfter||(s.parentNode.insertBefore(i.placeholderElement,s.nextSibling),i.moveRow(e,!0)):(i.toRow!==e||i.toRowAfter)&&(s.parentNode.insertBefore(i.placeholderElement,s),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=s}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=Math.min(s-this.startY,this.table.rowManager.element.scrollHeight-this.hoverElement.offsetHeight)+"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?this.moving.getComponent():void 0,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)}}}Ce.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)}},Ce.prototype.senders={delete:function(e,t,i){e.delete()}},Ce.moduleName="moveRow";class Ee extends k{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"),this.registerColumnOption("mutateLink")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("cell-value-changed",this.mutateLink.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":Ee.mutators[e]?t=Ee.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}mutateLink(e){var t=e.column.definition.mutateLink;t&&(Array.isArray(t)||(t=[t]),t.forEach((t=>{var i=e.row.getCell(t);i&&i.setValue(i.getValue(),!0,!0)})))}enable(){this.enabled=!0}disable(){this.enabled=!1}}Ee.moduleName="mutator",Ee.mutators={};var ye={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 Re extends k{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.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)),this.subscribe("footer-redraw",this.footerRedraw.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:Re.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||(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.footerAppend(this.pageCounterElement)),this.footerAppend(this.element)),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")}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,this.trackChanges())}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.displayRows(-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.dispatchExternal("pageSizeChanged",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":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"))}}Re.moduleName="page",Re.pageCounters=ye;var xe={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)}},Te={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 ke extends k{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:ke.readers[this.table.options.persistenceReaderFunc]?this.readFunc=ke.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):ke.readers[this.mode]?this.readFunc=ke.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:ke.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=ke.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):ke.writers[this.mode]?this.writeFunc=ke.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.retrieveData("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.retrieveData("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("column-width",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.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:e=>{s=e,this.defWatcherBlock||this.save("columns"),i.set&&i.set(e)},get:()=>(i.get&&i.get(),s)})})),this.defWatcherBlock=!1)}load(e,t){var i=this.retrieveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}retrieveData(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.push("visible")):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}}ke.moduleName="persistence",ke.moduleInitOrder=-10,ke.readers=xe,ke.writers=Te;class Me extends k{constructor(e){super(e),this.columnSubscribers={},this.registerTableOption("rowContextPopup",!1),this.registerTableOption("rowClickPopup",!1),this.registerTableOption("rowDblClickPopup",!1),this.registerTableOption("groupContextPopup",!1),this.registerTableOption("groupClickPopup",!1),this.registerTableOption("groupDblClickPopup",!1),this.registerColumnOption("headerContextPopup"),this.registerColumnOption("headerClickPopup"),this.registerColumnOption("headerDblClickPopup"),this.registerColumnOption("headerPopup"),this.registerColumnOption("headerPopupIcon"),this.registerColumnOption("contextPopup"),this.registerColumnOption("clickPopup"),this.registerColumnOption("dblClickPopup"),this.registerComponentFunction("cell","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("column","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("row","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("group","popup",this._componentPopupCall.bind(this))}initialize(){this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}_componentPopupCall(e,t,i){this.loadPopupEvent(t,null,e,i)}initializeRowWatchers(){this.table.options.rowContextPopup&&(this.subscribe("row-contextmenu",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup)),this.table.on("rowTapHold",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup))),this.table.options.rowClickPopup&&this.subscribe("row-click",this.loadPopupEvent.bind(this,this.table.options.rowClickPopup)),this.table.options.rowDblClickPopup&&this.subscribe("row-dblclick",this.loadPopupEvent.bind(this,this.table.options.rowDblClickPopup))}initializeGroupWatchers(){this.table.options.groupContextPopup&&(this.subscribe("group-contextmenu",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup)),this.table.on("groupTapHold",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup))),this.table.options.groupClickPopup&&this.subscribe("group-click",this.loadPopupEvent.bind(this,this.table.options.groupClickPopup)),this.table.options.groupDblClickPopup&&this.subscribe("group-dblclick",this.loadPopupEvent.bind(this,this.table.options.groupDblClickPopup))}initializeColumn(e){var t=e.definition;t.headerContextPopup&&!this.columnSubscribers.headerContextPopup&&(this.columnSubscribers.headerContextPopup=this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextPopup),this.table.on("headerTapHold",this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"))),t.headerClickPopup&&!this.columnSubscribers.headerClickPopup&&(this.columnSubscribers.headerClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerClickPopup"),this.subscribe("column-click",this.columnSubscribers.headerClickPopup)),t.headerDblClickPopup&&!this.columnSubscribers.headerDblClickPopup&&(this.columnSubscribers.headerDblClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerDblClickPopup"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickPopup)),t.headerPopup&&this.initializeColumnHeaderPopup(e),t.contextPopup&&!this.columnSubscribers.contextPopup&&(this.columnSubscribers.contextPopup=this.loadPopupTableCellEvent.bind(this,"contextPopup"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextPopup),this.table.on("cellTapHold",this.loadPopupTableCellEvent.bind(this,"contextPopup"))),t.clickPopup&&!this.columnSubscribers.clickPopup&&(this.columnSubscribers.clickPopup=this.loadPopupTableCellEvent.bind(this,"clickPopup"),this.subscribe("cell-click",this.columnSubscribers.clickPopup)),t.dblClickPopup&&!this.columnSubscribers.dblClickPopup&&(this.columnSubscribers.dblClickPopup=this.loadPopupTableCellEvent.bind(this,"dblClickPopup"),this.subscribe("cell-click",this.columnSubscribers.dblClickPopup))}initializeColumnHeaderPopup(e){var t,i=e.definition.headerPopupIcon;(t=document.createElement("span")).classList.add("tabulator-header-popup-button"),i?("function"==typeof i&&(i=i(e.getComponent())),i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i):t.innerHTML="⋮",t.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),this.loadPopupEvent(e.definition.headerPopup,t,e)})),e.titleElement.insertBefore(t,e.titleElement.firstChild)}loadPopupTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadPopupEvent(i.column.definition[e],t,i)}loadPopupTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadPopupEvent(i.definition[e],t,i)}loadPopupEvent(e,t,i,s){var o;i._group?i=i._group:i._row&&(i=i._row),e="function"==typeof e?e.call(this.table,t,i.getComponent(),(function(e){o=e})):e,this.loadPopup(t,i,e,o,s)}loadPopup(e,t,i,s,o){var n,r,a=!(e instanceof MouseEvent);i instanceof HTMLElement?n=i:(n=document.createElement("div")).innerHTML=i,n.classList.add("tabulator-popup"),n.addEventListener("click",(e=>{e.stopPropagation()})),a||e.preventDefault(),r=this.popup(n),"function"==typeof s&&r.renderCallback(s),e?r.show(e):r.show(t.getElement(),o||"center"),r.hideOnBlur((()=>{this.dispatchExternal("popupClosed",t.getComponent())})),this.dispatchExternal("popupOpened",t.getComponent())}}Me.moduleName="popup";class Le extends k{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.generateTable(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.generateTable(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}}Le.moduleName="print";class De extends k{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,"cellsave")),this.subscribe("cell-value-save-after",this.unblock.bind(this,"cellsave")),this.subscribe("row-data-save-before",this.block.bind(this,"rowsave")),this.subscribe("row-data-save-after",this.unblock.bind(this,"rowsave")),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,o=Array.from(arguments);return i.blocked||t!==i.currentVersion||(i.block("data-push"),o.forEach((e=>{i.table.rowManager.addRowActual(e,!1)})),s=i.origFuncs.push.apply(e,arguments),i.unblock("data-push")),s}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var s,o=Array.from(arguments);return i.blocked||t!==i.currentVersion||(i.block("data-unshift"),o.forEach((e=>{i.table.rowManager.addRowActual(e,!0)})),s=i.origFuncs.unshift.apply(e,arguments),i.unblock("data-unshift")),s}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var s,o;return i.blocked||t!==i.currentVersion||(i.block("data-shift"),i.data.length&&(s=i.table.rowManager.getRowFromDataObject(i.data[0]))&&s.deleteActual(),o=i.origFuncs.shift.call(e),i.unblock("data-shift")),o}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var s,o;return i.blocked||t!==i.currentVersion||(i.block("data-pop"),i.data.length&&(s=i.table.rowManager.getRowFromDataObject(i.data[i.data.length-1]))&&s.deleteActual(),o=i.origFuncs.pop.call(e),i.unblock("data-pop")),o}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var s,o,n=Array.from(arguments),r=n[0]<0?e.length+n[0]:n[0],a=n[1],l=!!n[2]&&n.slice(2);if(!i.blocked&&t===i.currentVersion){if(i.block("data-splice"),l&&((s=!!e[r]&&i.table.rowManager.getRowFromDataObject(e[r]))?l.forEach((e=>{i.table.rowManager.addRowActual(e,!0,s,!0)})):(l=l.slice().reverse()).forEach((e=>{i.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==a){var h=e.slice(r,void 0===n[1]?n[1]:r+a);h.forEach(((e,t)=>{var s=i.table.rowManager.getRowFromDataObject(e);s&&s.deleteActual(t!==h.length-1)}))}(l||0!==a)&&i.table.rowManager.reRenderInPosition(),o=i.origFuncs.splice.apply(e,arguments),i.unblock("data-splice")}return o}})}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 t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e)}watchTreeChildren(e){var t=this,i=e.getData()[this.table.options.dataTreeChildField],s={};i&&(s.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-push");var o=s.push.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-push")}return o}}),s.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-unshift");var o=s.unshift.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-unshift")}return o}}),s.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-shift");var o=s.shift.call(i);this.rebuildTree(e),t.unblock("tree-shift")}return o}}),s.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-pop");var o=s.pop.call(i);this.rebuildTree(e),t.unblock("tree-pop")}return o}}),s.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-splice");var o=s.splice.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-splice")}return o}}))}rebuildTree(e){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}watchKey(e,t,i){var s=this,o=Object.getOwnPropertyDescriptor(t,i),n=t[i],r=this.currentVersion;Object.defineProperty(t,i,{set:t=>{if(n=t,!s.blocked&&r===s.currentVersion){s.block("key");var a={};a[i]=t,e.updateData(a),s.unblock("key")}o.set&&o.set(t)},get:()=>(o.get&&o.get(),n)})}unwatchRow(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}block(e){this.blocked||(this.blocked=e)}unblock(e){this.blocked===e&&(this.blocked=!1)}}De.moduleName="reactiveData";class Se extends k{constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.latestX=!1,this.handle=null,this.initialNextColumn=null,this.nextColumn=null,this.initialized=!1,this.registerColumnOption("resizable",!0),this.registerTableOption("resizableColumnFit",!1)}initialize(){this.subscribe("column-rendered",this.layoutColumnHeader.bind(this))}initializeEventWatchers(){this.initialized||(this.subscribe("cell-rendered",this.layoutCellHandles.bind(this)),this.subscribe("cell-delete",this.deInitializeComponent.bind(this)),this.subscribe("cell-height",this.resizeHandle.bind(this)),this.subscribe("column-moved",this.columnLayoutUpdated.bind(this)),this.subscribe("column-hide",this.deInitializeColumn.bind(this)),this.subscribe("column-show",this.columnLayoutUpdated.bind(this)),this.subscribe("column-width",this.columnWidthUpdated.bind(this)),this.subscribe("column-delete",this.deInitializeComponent.bind(this)),this.subscribe("column-height",this.resizeHandle.bind(this)),this.initialized=!0)}layoutCellHandles(e){"row"===e.row.type&&(this.deInitializeComponent(e),this.initializeColumn("cell",e,e.column,e.element))}layoutColumnHeader(e){e.definition.resizable&&(this.initializeEventWatchers(),this.deInitializeComponent(e),this.initializeColumn("header",e,e,e.element))}columnLayoutUpdated(e){var t=e.prevColumn();this.reinitializeColumn(e),t&&this.reinitializeColumn(t)}columnWidthUpdated(e){e.modules.frozen&&(this.table.modules.frozenColumns.leftColumns.includes(e)?this.table.modules.frozenColumns.leftColumns.forEach((e=>{this.reinitializeColumn(e)})):this.table.modules.frozenColumns.rightColumns.includes(e)&&this.table.modules.frozenColumns.rightColumns.forEach((e=>{this.reinitializeColumn(e)})))}frozenColumnOffset(e){var t=!1;return e.modules.frozen&&(t=e.modules.frozen.marginValue,"left"===e.modules.frozen.position?t+=e.getWidth()-3:t&&(t-=3)),!1!==t&&t+"px"}reinitializeColumn(e){var t=this.frozenColumnOffset(e);e.cells.forEach((i=>{i.modules.resize&&i.modules.resize.handleEl&&(t&&(i.modules.resize.handleEl.style[e.modules.frozen.position]=t),i.element.after(i.modules.resize.handleEl))})),e.modules.resize&&e.modules.resize.handleEl&&(t&&(e.modules.resize.handleEl.style[e.modules.frozen.position]=t),e.element.after(e.modules.resize.handleEl))}initializeColumn(e,t,i,s){var o=this,n=i.definition.resizable,r={},a=i.getLastColumn();if("header"===e&&(r={variableHeight:"textarea"==i.definition.formatter||i.definition.variableHeight}),(!0===n||n==e)&&this._checkResizability(a)){var l=document.createElement("span");l.className="tabulator-col-resize-handle",l.addEventListener("click",(function(e){e.stopPropagation()}));var h=function(e){o.startColumn=i,o.initialNextColumn=o.nextColumn=a.nextColumn(),o._mouseDown(e,a,l)};l.addEventListener("mousedown",h),l.addEventListener("touchstart",h,{passive:!0}),l.addEventListener("dblclick",(e=>{var t=a.getWidth();e.stopPropagation(),a.reinitializeWidth(!0),t!==a.getWidth()&&(o.dispatch("column-resized",a),o.table.externalEvents.dispatch("columnResized",a.getComponent()))})),i.modules.frozen&&(l.style.position="sticky",l.style[i.modules.frozen.position]=this.frozenColumnOffset(i)),r.handleEl=l,s.parentNode&&i.visible&&s.after(l)}t.modules.resize=r}deInitializeColumn(e){this.deInitializeComponent(e),e.cells.forEach((e=>{this.deInitializeComponent(e)}))}deInitializeComponent(e){var t;e.modules.resize&&(t=e.modules.resize.handleEl)&&t.parentElement&&t.parentElement.removeChild(t)}resizeHandle(e,t){e.modules.resize&&e.modules.resize.handleEl&&(e.modules.resize.handleEl.style.height=t)}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,i){var s=this;function o(e){var i,o,n=void 0===e.screenX?e.touches[0].screenX:e.screenX,r=n-s.startX,a=n-s.latestX;if(s.latestX=n,s.table.rtl&&(r=-r,a=-a),i=t.width==t.minWidth||t.width==t.maxWidth,t.setWidth(s.startWidth+r),o=t.width==t.minWidth||t.width==t.maxWidth,a<0&&(s.nextColumn=s.initialNextColumn),s.table.options.resizableColumnFit&&s.nextColumn&&(!i||!o)){let e=s.nextColumn.getWidth();a>0&&e<=s.nextColumn.minWidth&&(s.nextColumn=s.nextColumn.nextColumn()),s.nextColumn&&s.nextColumn.setWidth(s.nextColumn.getWidth()-a)}s.table.columnManager.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.table.columnManager.verticalAlignHeaders(),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.latestX=s.startX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",n),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",n)}}Se.moduleName="resizeColumns";class Pe extends k{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)}}Pe.moduleName="resizeRows";class ze extends k{constructor(e){super(e),this.binding=!1,this.visibilityObserver=!1,this.resizeObserver=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.visible=!1,this.initialized=!1,this.initialRedraw=!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 IntersectionObserver&&"undefined"!=typeof ResizeObserver&&"virtual"===t.rowManager.getRenderMode()?(this.initializeVisibilityObserver(),this.autoResize=!0,this.resizeObserver=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.redrawTable())}})),this.resizeObserver.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),this.redrawTable()}})),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.rerenderColumns(!0),t.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}initializeVisibilityObserver(){this.visibilityObserver=new IntersectionObserver((e=>{this.visible=e[0].isIntersecting,this.initialized?this.visible&&(this.redrawTable(this.initialRedraw),this.initialRedraw=!1):(this.initialized=!0,this.initialRedraw=!this.visible)})),this.visibilityObserver.observe(this.table.element)}redrawTable(e){this.initialized&&this.visible&&(this.table.columnManager.rerenderColumns(!0),this.table.redraw(e))}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.resizeObserver&&this.resizeObserver.unobserve(this.table.element),this.visibilityObserver&&this.visibilityObserver.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}ze.moduleName="resizeTable";class Fe extends k{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-data-changed",this.generateCollapsedRowContent.bind(this)),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=!0;e;){let t="fitColumns"==this.table.modules.layout.getMode()?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),i=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-t;if(i<0){let t=this.columns[this.index];t?(this.hideColumn(t),this.index++):e=!1}else{let t=this.columns[this.index-1];t&&i>0&&i>=t.getWidth()?(this.showColumn(t),this.index--):e=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){this.table.rowManager.getDisplayRows().forEach((e=>{this.generateCollapsedRowContent(e)}))}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=e.getData(),s=[];return this.hiddenColumns.forEach((o=>{var n=o.getFieldValue(i);if(o.definition.title&&o.field)if(o.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){function r(e){e()}t={value:!1,data:{},getValue:function(){return n},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return o.getComponent()},getTable:()=>this.table},s.push({field:o.field,title:o.definition.title,value:o.modules.format.formatter.call(this.table.modules.format,t,o.modules.format.params,r)})}else s.push({field:o.field,title:o.definition.title,value:n})})),s}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:""}}Fe.moduleName="responsiveLayout";class He extends k{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._rowSelectionChanged()):((t=this.table.rowManager.getRows(e)).forEach((e=>{this._selectRow(e,!0,!0)})),t.length&&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 Oe(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(a.isDateTime(e)||(e="iso"===l?a.fromISO(String(e)):a.fromFormat(String(e),l)),a.isDateTime(t)||(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")}He.moduleName="selectRow";var Ae={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"),Oe.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"),Oe.call(this,e,t,i,s,o,n,r)},datetime:Oe,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){var t;switch(a){case"length":t=e.length;break;case"sum":t=e.reduce((function(e,t){return e+t}));break;case"max":t=Math.max.apply(null,e);break;case"min":t=Math.min.apply(null,e);break;case"avg":t=e.reduce((function(e,t){return e+t}))/e.length}return t}if(Array.isArray(e)){if(Array.isArray(t))return d(t)-d(e);h=1}else h=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,p=/(\d+)|(\D+)/g,m=/\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(!m.test(a)||!m.test(l))return a>l?1:-1;for(a=a.match(p),l=l.match(p),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 _e extends k{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.registerTableOption("headerSortClickElement","header"),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":_e.sorters[e.definition.sorter]?s=_e.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":s=e.definition.sorter}if(e.modules.sort={sorter:s,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},!1!==e.definition.headerSort){if((t=e.getElement()).classList.add("tabulator-sortable"),(i=document.createElement("div")).classList.add("tabulator-col-sorter"),"icon"===this.table.options.headerSortClickElement)i.classList.add("tabulator-col-sorter-element");else t.classList.add("tabulator-col-sorter-element");switch(this.table.options.headerSortElement){case"function":break;case"object":i.appendChild(this.table.options.headerSortElement);break;default:i.innerHTML=this.table.options.headerSortElement}e.titleHolderElement.appendChild(i),e.modules.sort.element=i,this.setColumnHeaderSortIcon(e,"none"),("icon"===this.table.options.headerSortClickElement?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())),o>-1?(s[o].dir=i,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(null,!1,!1):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 _e.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&&((o=e.column.modules.sort)&&(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((e=>{e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"),this.setColumnHeaderSortIcon(e,"none"))}))}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort","asc"===t?"ascending":"descending"),this.setColumnHeaderSortIcon(e,t)}setColumnHeaderSortIcon(e,t){var i,s=e.modules.sort.element;if(e.definition.headerSort&&"function"==typeof this.table.options.headerSortElement){for(;s.firstChild;)s.removeChild(s.firstChild);"object"==typeof(i=this.table.options.headerSortElement.call(this.table,e.getComponent(),t))?s.appendChild(i):s.innerHTML=i}}_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)}}_e.moduleName="sort",_e.sorters=Ae;class Be extends k{constructor(e){super(e),this.tooltipSubscriber=null,this.headerSubscriber=null,this.timeout=null,this.popupInstance=null,this.registerTableOption("tooltipGenerationMode",void 0),this.registerTableOption("tooltipDelay",300),this.registerColumnOption("tooltip"),this.registerColumnOption("headerTooltip")}initialize(){this.deprecatedOptionsCheck(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheckMsg("tooltipGenerationMode","This option is no longer needed as tooltips are always generated on hover now")}initializeColumn(e){e.definition.headerTooltip&&!this.headerSubscriber&&(this.headerSubscriber=!0,this.subscribe("column-mousemove",this.mousemoveCheck.bind(this,"headerTooltip")),this.subscribe("column-mouseout",this.mouseoutCheck.bind(this,"headerTooltip"))),e.definition.tooltip&&!this.tooltipSubscriber&&(this.tooltipSubscriber=!0,this.subscribe("cell-mousemove",this.mousemoveCheck.bind(this,"tooltip")),this.subscribe("cell-mouseout",this.mouseoutCheck.bind(this,"tooltip")))}mousemoveCheck(e,t,i){var s="tooltip"===e?i.column.definition.tooltip:i.definition.headerTooltip;s&&(this.clearPopup(),this.timeout=setTimeout(this.loadTooltip.bind(this,t,i,s),this.table.options.tooltipDelay))}mouseoutCheck(e,t,i){this.popupInstance||this.clearPopup()}clearPopup(e,t,i){clearTimeout(this.timeout),this.timeout=null,this.popupInstance&&this.popupInstance.hide()}loadTooltip(e,t,i){var s,n,r;"function"==typeof i&&(i=i(e,t.getComponent(),(function(e){n=e}))),i instanceof HTMLElement?s=i:(s=document.createElement("div"),!0===i&&(t instanceof o?i=t.value:t.definition.field?this.langBind("columns|"+t.definition.field,(e=>{s.innerHTML=i=e||t.definition.title})):i=t.definition.title),s.innerHTML=i),(i||0===i||!1===i)&&(s.classList.add("tabulator-tooltip"),s.addEventListener("mousemove",(e=>e.preventDefault())),this.popupInstance=this.popup(s),"function"==typeof n&&this.popupInstance.renderCallback(n),r=this.popupInstance.containerEventCoords(e),this.popupInstance.show(r.x+15,r.y+15).hideOnBlur((()=>{this.dispatchExternal("TooltipClosed",t.getComponent()),this.popupInstance=null})),this.dispatchExternal("TooltipOpened",t.getComponent()))}}Be.moduleName="tooltip";var Ve={integer:function(e,t,i){return""===t||null==t||(t=Number(t),!isNaN(t)&&isFinite(t)&&Math.floor(t)===t)},float:function(e,t,i){return""===t||null==t||(t=Number(t),!isNaN(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("|")),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 Ie extends k{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)),this.subscribe("edit-success",this.editValidate.bind(this)),this.subscribe("edit-editor-clear",this.editorClear.bind(this)),this.subscribe("edit-edited-clear",this.editedClear.bind(this))}editValidate(e,t,i){var s="manual"===this.table.options.validationMode||this.validate(e.column.modules.validate,e,t);return!0!==s&&setTimeout((()=>{e.getElement().classList.add("tabulator-validation-fail"),this.dispatchExternal("validationFailed",e.getComponent(),t,s)})),s}editorClear(e,t){t&&e.column.modules.validate&&this.cellValidate(e),e.getElement().classList.remove("tabulator-validation-fail")}editedClear(e){e.modules.validate&&(e.modules.validate.invalid=!1)}cellIsValid(e){return e.modules.validate&&e.modules.validate.invalid||!0}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach((e=>{!0!==this.cellValidate(e)&&t.push(e.getComponent())})),!t.length||t}rowValidate(e){var t=[];return e.cells.forEach((e=>{!0!==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:Ie.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})})),t.modules.validate||(t.modules.validate={}),o.length?(t.modules.validate.invalid=o,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==n&&this.invalidCells.push(t)):(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),n>-1&&this.invalidCells.splice(n,1)),!o.length||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))}}Ie.moduleName="validate",Ie.validators=Ve;var Ne=Object.freeze({__proto__:null,AccessorModule:A,AjaxModule:W,ClipboardModule:j,ColumnCalcsModule:X,DataTreeModule:q,DownloadModule:J,EditModule:Q,ExportModule:ie,FilterModule:oe,FormatModule:re,FrozenColumnsModule:ae,FrozenRowsModule:le,GroupRowsModule:ce,HistoryModule:ue,HtmlTableImportModule:pe,ImportModule:ge,InteractionModule:be,KeybindingsModule:fe,MenuModule:ve,MoveColumnsModule:we,MoveRowsModule:Ce,MutatorModule:Ee,PageModule:Re,PersistenceModule:ke,PopupModule:Me,PrintModule:Le,ReactiveDataModule:De,ResizeColumnsModule:Se,ResizeRowsModule:Pe,ResizeTableModule:ze,ResponsiveLayoutModule:Fe,SelectRowModule:He,SortModule:_e,TooltipModule:Be,ValidateModule:Ie});class We extends O{}return new F(We,Ne),We})); //# sourceMappingURL=tabulator.min.js.map diff --git a/dist/js/tabulator.min.js.map b/dist/js/tabulator.min.js.map index 2f4172aee..7e37df223 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/DeprecationAdvisor.js","../../src/js/core/tools/TableRegistry.js","../../src/js/core/tools/Popup.js","../../src/js/core/Module.js","../../src/js/modules/Layout/defaults/modes/fitDataGeneral.js","../../src/js/modules/Layout/defaults/modes.js","../../src/js/modules/Layout/defaults/modes/fitData.js","../../src/js/modules/Layout/defaults/modes/fitDataStretch.js","../../src/js/modules/Layout/defaults/modes/fitColumns.js","../../src/js/modules/Layout/Layout.js","../../src/js/modules/Localize/Localize.js","../../src/js/modules/Localize/defaults/langs.js","../../src/js/modules/Comms/Comms.js","../../src/js/core/tools/ModuleBinder.js","../../src/js/core/tools/Alert.js","../../src/js/core/Tabulator.js","../../src/js/core/defaults/options.js","../../src/js/modules/Accessor/Accessor.js","../../src/js/modules/Accessor/defaults/accessors.js","../../src/js/modules/Ajax/defaults/urlGenerator.js","../../src/js/modules/Ajax/defaults/contentTypeFormatters.js","../../src/js/modules/Ajax/Ajax.js","../../src/js/modules/Ajax/defaults/config.js","../../src/js/modules/Ajax/defaults/loaderPromise.js","../../src/js/modules/Clipboard/Clipboard.js","../../src/js/modules/Clipboard/defaults/pasteActions.js","../../src/js/modules/Clipboard/defaults/pasteParsers.js","../../src/js/modules/ColumnCalcs/CalcComponent.js","../../src/js/modules/ColumnCalcs/defaults/calculations.js","../../src/js/modules/ColumnCalcs/ColumnCalcs.js","../../src/js/modules/DataTree/DataTree.js","../../src/js/modules/Download/defaults/downloaders.js","../../src/js/modules/Download/defaults/downloaders/csv.js","../../src/js/modules/Download/defaults/downloaders/json.js","../../src/js/modules/Download/defaults/downloaders/jsonLines.js","../../src/js/modules/Download/defaults/downloaders/pdf.js","../../src/js/modules/Download/defaults/downloaders/xlsx.js","../../src/js/modules/Download/defaults/downloaders/html.js","../../src/js/modules/Download/Download.js","../../src/js/modules/Edit/inputMask.js","../../src/js/modules/Edit/List.js","../../src/js/modules/Edit/defaults/editors.js","../../src/js/modules/Edit/defaults/editors/input.js","../../src/js/modules/Edit/defaults/editors/textarea.js","../../src/js/modules/Edit/defaults/editors/number.js","../../src/js/modules/Edit/defaults/editors/range.js","../../src/js/modules/Edit/defaults/editors/date.js","../../src/js/modules/Edit/defaults/editors/time.js","../../src/js/modules/Edit/defaults/editors/datetime.js","../../src/js/modules/Edit/defaults/editors/select.js","../../src/js/modules/Edit/defaults/editors/list.js","../../src/js/modules/Edit/defaults/editors/autocomplete.js","../../src/js/modules/Edit/defaults/editors/star.js","../../src/js/modules/Edit/defaults/editors/progress.js","../../src/js/modules/Edit/defaults/editors/tickCross.js","../../src/js/modules/Edit/Edit.js","../../src/js/modules/Export/ExportRow.js","../../src/js/modules/Export/ExportColumn.js","../../src/js/modules/Export/Export.js","../../src/js/modules/Filter/defaults/filters.js","../../src/js/modules/Filter/Filter.js","../../src/js/modules/Format/defaults/formatters.js","../../src/js/modules/Format/defaults/formatters/plaintext.js","../../src/js/modules/Format/defaults/formatters/html.js","../../src/js/modules/Format/defaults/formatters/textarea.js","../../src/js/modules/Format/defaults/formatters/money.js","../../src/js/modules/Format/defaults/formatters/link.js","../../src/js/modules/Format/defaults/formatters/image.js","../../src/js/modules/Format/defaults/formatters/tickCross.js","../../src/js/modules/Format/defaults/formatters/datetime.js","../../src/js/modules/Format/defaults/formatters/datetimediff.js","../../src/js/modules/Format/defaults/formatters/lookup.js","../../src/js/modules/Format/defaults/formatters/star.js","../../src/js/modules/Format/defaults/formatters/traffic.js","../../src/js/modules/Format/defaults/formatters/progress.js","../../src/js/modules/Format/defaults/formatters/color.js","../../src/js/modules/Format/defaults/formatters/buttonTick.js","../../src/js/modules/Format/defaults/formatters/buttonCross.js","../../src/js/modules/Format/defaults/formatters/rownum.js","../../src/js/modules/Format/defaults/formatters/handle.js","../../src/js/modules/Format/defaults/formatters/responsiveCollapse.js","../../src/js/modules/Format/defaults/formatters/rowSelection.js","../../src/js/modules/Format/Format.js","../../src/js/modules/FrozenColumns/FrozenColumns.js","../../src/js/modules/FrozenRows/FrozenRows.js","../../src/js/modules/GroupRows/GroupComponent.js","../../src/js/modules/GroupRows/Group.js","../../src/js/modules/GroupRows/GroupRows.js","../../src/js/modules/History/History.js","../../src/js/modules/History/defaults/undoers.js","../../src/js/modules/History/defaults/redoers.js","../../src/js/modules/HtmlTableImport/HtmlTableImport.js","../../src/js/modules/Import/defaults/importers.js","../../src/js/modules/Import/defaults/importers/csv.js","../../src/js/modules/Import/defaults/importers/json.js","../../src/js/modules/Import/defaults/importers/array.js","../../src/js/modules/Import/Import.js","../../src/js/modules/Interaction/Interaction.js","../../src/js/modules/Keybindings/Keybindings.js","../../src/js/modules/Keybindings/defaults/bindings.js","../../src/js/modules/Keybindings/defaults/actions.js","../../src/js/modules/Menu/Menu.js","../../src/js/modules/MoveColumns/MoveColumns.js","../../src/js/modules/MoveRows/MoveRows.js","../../src/js/modules/Mutator/Mutator.js","../../src/js/modules/Mutator/defaults/mutators.js","../../src/js/modules/Page/defaults/pageCounters.js","../../src/js/modules/Page/defaults/pageCounters/rows.js","../../src/js/modules/Page/defaults/pageCounters/pages.js","../../src/js/modules/Page/Page.js","../../src/js/modules/Persistence/defaults/readers.js","../../src/js/modules/Persistence/defaults/writers.js","../../src/js/modules/Persistence/Persistence.js","../../src/js/modules/Popup/Popup.js","../../src/js/modules/Print/Print.js","../../src/js/modules/ReactiveData/ReactiveData.js","../../src/js/modules/ResizeColumns/ResizeColumns.js","../../src/js/modules/ResizeRows/ResizeRows.js","../../src/js/modules/ResizeTable/ResizeTable.js","../../src/js/modules/ResponsiveLayout/ResponsiveLayout.js","../../src/js/modules/SelectRow/SelectRow.js","../../src/js/modules/Sort/defaults/sorters/datetime.js","../../src/js/modules/Sort/defaults/sorters.js","../../src/js/modules/Sort/defaults/sorters/number.js","../../src/js/modules/Sort/defaults/sorters/string.js","../../src/js/modules/Sort/defaults/sorters/date.js","../../src/js/modules/Sort/defaults/sorters/time.js","../../src/js/modules/Sort/defaults/sorters/boolean.js","../../src/js/modules/Sort/defaults/sorters/array.js","../../src/js/modules/Sort/defaults/sorters/exists.js","../../src/js/modules/Sort/defaults/sorters/alphanum.js","../../src/js/modules/Sort/Sort.js","../../src/js/modules/Tooltip/Tooltip.js","../../src/js/modules/Validate/defaults/validators.js","../../src/js/modules/Validate/Validate.js","../../src/js/core/TabulatorFull.js"],"sourcesContent":["export default class CoreFeature{\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, columnsChanged){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent, columnsChanged);\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(force){\r\n\t\treturn this.table.modules.layout.layout(force);\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\t//////////////////////////////////////////\r\n\t/////////// Deprecation Checks ///////////\r\n\t//////////////////////////////////////////\r\n\r\n\tdeprecationCheck(oldOption, newOption){\r\n\t\treturn this.table.deprecationAdvisor.check(oldOption, newOption);\r\n\t}\r\n\r\n\tdeprecationCheckMsg(oldOption, msg){\r\n\t\treturn this.table.deprecationAdvisor.checkMsg(oldOption, msg);\r\n\t}\r\n\r\n\tdeprecationMsg(msg){\r\n\t\treturn this.table.deprecationAdvisor.msg(msg);\r\n\t}\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.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\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"headerWordWrap\": false,\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}\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\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\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\t\tif(val != null){\r\n\t\t\t\t\t\tconsole.warn(\"Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", val);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\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//////////////////// 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, force){\r\n\t\tvar changed = this.setValueProcessData(value, mutate, force);\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, force){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value || force){\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\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\r\n\t\tthis.dispatch(\"cell-height\", this, \"\");\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\r\n\t\tthis.dispatch(\"cell-height\", this, 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}\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.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 pre-styled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum pre-styled 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 pre-styled 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\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\tswitch(this.table.options.columnHeaderVertAlign){\r\n\t\t\tcase \"middle\":\r\n\t\t\t\tel.style.justifyContent = \"center\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"bottom\":\r\n\t\t\t\tel.style.justifyContent = \"flex-end\";\r\n\t\t\t\tbreak;\r\n\t\t}\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//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._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.dispatch(\"column-init\", this);\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\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//assign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classNames = def.cssClass.split(\" \");\r\n\t\t\tclassNames.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 horizontal 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 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\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\t\t\r\n\t\tif(def.headerWordWrap){\r\n\t\t\ttitleHolderElement.classList.add(\"tabulator-col-title-wrap\");\r\n\t\t}\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\t\tif(contents instanceof Node){\r\n\t\t\t\t\tel.appendChild(contents);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.innerHTML = \"\";\r\n\t\t\t\t\tconsole.warn(\"Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", contents);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\t\tel.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\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 classNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclassNames.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\r\n\t\t\tcolumn.columnRendered();\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\tthis.dispatch(\"column-height\", this, this.element.style.height);\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\t// if(!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 alignment\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\r\n\t\tthis.dispatch(\"column-height\", this, \"\");\r\n\t}\r\n\r\n\t//// Retrieve 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 column 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(traverse){\r\n\t\tvar columns = [];\r\n\r\n\t\tif(traverse){\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumns.push(column);\r\n\t\t\t\t\t\r\n\t\t\t\tcolumns = columns.concat(column.getColumns(true));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumns = this.columns;\r\n\t\t}\r\n\t\t\r\n\t\treturn 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//retrieve 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.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.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\tif(this.maxWidth && minWidth > this.maxWidth){\r\n\t\t\tminWidth = this.maxWidth;\r\n\r\n\t\t\tconsole.warn(\"the minWidth (\"+ minWidth + \"px) for column '\" + this.field + \"' cannot be bigger that its maxWidth (\"+ this.maxWidthStyled + \")\");\r\n\t\t}\r\n\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\tif(this.minWidth && maxWidth < this.minWidth){\r\n\t\t\tmaxWidth = this.minWidth;\r\n\r\n\t\t\tconsole.warn(\"the maxWidth (\"+ maxWidth + \"px) for column '\" + this.field + \"' cannot be smaller that its minWidth (\"+ this.minWidthStyled + \")\");\r\n\t\t}\r\n\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\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.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\r\n\t\tthis.dispatch(\"column-rendered\", this);\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\t.then((column) => {\r\n\r\n\t\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\t\tthis.field = false; //clear field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\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;\r\n","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 (let 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 (let 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 determine how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the container 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 scrolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has resized, 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, return 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\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"top\":\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = rowEl.offsetTop;\t\t\t\t\t\r\n\t\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\n\r\nexport default class BasicHorizontal 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\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\t\t\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(){\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}\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}\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}\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\t\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\t\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\t\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\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\twidth;\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tif(!column.modules.frozen){\t\t\t\r\n\t\t\t\t\twidth = column.getWidth();\r\n\r\n\t\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\t\r\n\t\t\t\t\tconfig.width = width;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// column is hidden\r\n\t\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\t\tthis.vDomPadRight += width;\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.columns.push(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcolPos += width;\r\n\t\t\t\t}\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\trow, 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 && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\r\n\t\t\t\trow = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t})[0];\r\n\t\t\t\t\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(let colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rerenderColumns(false, true);\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 visibleRows = this.getVisibleRows(),\r\n\t\totherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\r\n\r\n\t\tvisibleRows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\r\n\t\totherRows.forEach((row) =>{\r\n\t\t\trow.deinitialize();\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\t\t\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\t\t\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\r\n\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().insertBefore(cell.getElement(), row.getCell(this.columns[this.rightCol]).getElement().nextSibling);\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\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().insertBefore(cell.getElement(), row.getCell(this.columns[this.leftCol]).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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\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\r\n\t\t\tif(this.table.modules.frozenColumns){\r\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((column) => {\r\n\t\t\t\t\tthis.appendCell(row, column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tthis.appendCell(row, this.columns[i]);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.frozenColumns){\r\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((column) => {\r\n\t\t\t\t\tthis.appendCell(row, column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tappendCell(row, column){\r\n\t\tif(column && column.visible){\r\n\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\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\t\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\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\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.contentsElement = 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\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockUpdate = null; //store latest redraw update only status\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\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.contentsElement = this.createHeaderContentsElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\t\t\r\n\t\tthis.contentsElement.insertBefore(this.headersElement, this.contentsElement.firstChild);\r\n\t\tthis.element.insertBefore(this.contentsElement, this.element.firstChild);\r\n\t\t\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"scrollbar-vertical\", this.padVerticalScrollbar.bind(this));\r\n\t}\r\n\r\n\tpadVerticalScrollbar(width){\r\n\t\tif(this.table.rtl){\r\n\t\t\tthis.headersElement.style.marginLeft = width + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.headersElement.style.marginRight = width + \"px\";\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\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\t\t\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\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}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", this.table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderContentsElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-header-contents\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\t\t\r\n\t\treturn el;\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\r\n\t//return containing contents element\r\n\tgetContentsElement(){\r\n\t\treturn this.contentsElement;\r\n\t}\r\n\t\r\n\t\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\t\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tthis.contentsElement.scrollLeft = left;\r\n\r\n\t\tthis.scrollLeft = left;\r\n\t\t\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\t\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\t\t\r\n\t\tif(data && data.length){\r\n\t\t\t\r\n\t\t\trow = data[0];\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tlet value = row[key];\r\n\t\t\t\t\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\t\tsorter = \"array\";\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\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t\t}else{\r\n\t\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\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcol.sorter = sorter;\r\n\t\t\t\t\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(definitions){\r\n\t\t\t\t\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\t\tObject.assign(col, 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\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\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\t\r\n\t\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\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\t\t\t\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\t\t\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\t\t\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\t\t\r\n\t\tthis._reIndexColumns();\r\n\t\t\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\t\t\r\n\t\tthis.rerenderColumns(false, true);\r\n\t\t\r\n\t\tthis.redraw(true);\r\n\t}\r\n\t\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\t\t\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\t\t\t\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\t\t\r\n\t\tcolumn.columnRendered();\r\n\t\t\r\n\t\treturn column;\r\n\t}\r\n\t\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\t\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\t\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\t\t\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\t\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\t\t\r\n\t\tif(!this.redrawBlock){\r\n\r\n\t\t\tthis.headersElement.style.height=\"\";\r\n\t\t\t\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumn.clearVerticalAlign();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tvar height = column.getHeight();\r\n\t\t\t\t\r\n\t\t\t\tif(height > minHeight){\r\n\t\t\t\t\tminHeight = height;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.headersElement.style.height = minHeight + \"px\";\r\n\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tvar columns;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\t\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\r\n\t\t\t\tcolumns = [];\r\n\r\n\t\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\t\tcolumns.push(column);\r\n\t\t\t\t\tcolumns = columns.concat(column.getColumns(true));\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = columns.find((column) => {\r\n\t\t\t\t\treturn column.element === 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\t\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\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\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\t\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\t\t\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\t\t\r\n\t\treturn matches;\r\n\t}\r\n\t\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\t\r\n\tgetFirstVisibleColumn(){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\t\t\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\t\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\t\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\t\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\t\r\n\t//traverse 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\t\r\n\t//get definitions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\t\t\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\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\t\t\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\t\t\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\t\t\r\n\t\treturn width;\r\n\t}\r\n\t\r\n\tmoveColumn(from, to, after){\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\t\t\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\t\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\t\t\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\t\t\r\n\t\tthis.rerenderColumns(true);\r\n\t\t\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\t\t\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\t\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\t\t\r\n\t\tif (fromIndex > -1) {\r\n\t\t\t\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\t\t\t\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\t\t\t\r\n\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\t\t\t\r\n\t\t\tif(updateRows){\r\n\t\t\t\t\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\t\t\t\t\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\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\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\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\t\t\t\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\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\t\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\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\t\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\t\t\t\t\t\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\t\t\t\t\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\t\t\t\t\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\t\t\t\t\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\t\t\t\t\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\t\t\t\r\n\t\t});\r\n\t}\r\n\t\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\t\t\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\t\t\r\n\t\treturn cells;\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\t\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\t\t\t\t\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn fixedWidth;\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis._reIndexColumns();\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\t\t\t\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.redraw(true);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t\t\r\n\t\t\tthis.rerenderColumns();\r\n\t\t\t\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\t\t\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\t\t\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.verticalAlignHeaders();\r\n\t\t\r\n\t\tthis.redraw();\r\n\t}\r\n\t\r\n\trerenderColumns(update, silent){\r\n\t\tif(!this.redrawBlock){\r\n\t\t\tthis.renderer.rerenderColumns(update, silent);\r\n\t\t}else{\r\n\t\t\tif(update === false || (update === true && this.redrawBlockUpdate === null)){\r\n\t\t\t\tthis.redrawBlockUpdate = update;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockRedraw(){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockUpdate = null;\r\n\t}\r\n\t\r\n\trestoreRedraw(){\r\n\t\tthis.redrawBlock = false;\r\n\t\tthis.verticalAlignHeaders();\r\n\t\tthis.renderer.rerenderColumns(this.redrawBlockUpdate);\r\n\t\t\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh(force);\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\t\t\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(){\r\n\t\treturn this._row.getPosition();\r\n\t}\r\n\r\n\twatchPosition(callback){\r\n\t\treturn this._row.watchPosition(callback);\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\t\t\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 pre-styled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //hold elements 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\t\tthis.position = 0; //store position of element in row list\r\n\t\tthis.positionWatchers = [];\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.created = false;\r\n\t\t\r\n\t\tthis.setData(data);\r\n\t}\r\n\t\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\t\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\t\t\r\n\t\tthis.element = el;\r\n\t}\r\n\t\r\n\tgetElement(){\r\n\t\tthis.create();\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\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\t\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\t\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\t\t\r\n\t\tif(!this.initialized || force){\r\n\t\t\t\r\n\t\t\tthis.deleteCells();\r\n\t\t\t\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\t\t\t\r\n\t\t\tthis.generateCells();\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t\t\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\t\t\t\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\t\t\t\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\t\t\t\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\t\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t\t\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\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\t\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\t\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\t\t\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\t\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight;\r\n\t\t\r\n\t\tif(this.table.options.rowHeight){\r\n\t\t\tthis.height = this.table.options.rowHeight;\r\n\t\t}else{\r\n\t\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\t\t\t\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tvar height = cell.getHeight();\r\n\t\t\t\tif(height > maxHeight){\r\n\t\t\t\t\tmaxHeight = height;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(force){\r\n\t\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t\t}else{\r\n\t\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\t\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\t\t\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\t\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\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force && !this.table.options.rowHeight){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\t\t\r\n\t\tthis.calcHeight(force);\r\n\t\t\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\t\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\t\t\t\r\n\t\t\tthis.manualHeight = true;\r\n\t\t\t\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\t\t\t\r\n\t\t\tthis.setCellHeight();\r\n\t\t\t\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\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\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\t\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\t\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\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\t\t\t\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\t\t\t\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\t\t\t\r\n\t\t\t//set data\r\n\t\t\tfor (let attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\t\t\t\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (let attrname in updatedData) {\r\n\t\t\t\t\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\t\t\t\t\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\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\t\t\t\t\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\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\t\t\t\r\n\t\t\t//this.reinitialize();\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\t\t\t\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\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\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\t\t\r\n\t\treturn this.data;\r\n\t}\r\n\t\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\t\t\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\t\t\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\t\t\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\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\t\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\t\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\t\t\r\n\t\treturn this.cells;\r\n\t}\r\n\t\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\t\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\t\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\t\t\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\t\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\t\t\r\n\t\tthis.deleteActual();\r\n\t\t\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\t\r\n\tdeleteActual(blockRedraw){\r\n\t\tthis.detachModules();\r\n\t\t\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\t\t\r\n\t\tthis.deleteCells();\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\t\t\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\t\r\n\tdetachModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\t\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\t\t\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\t\r\n\twipe(){\r\n\t\tthis.detachModules();\r\n\t\tthis.deleteCells();\r\n\t\t\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\t\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\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tisDisplayed(){\r\n\t\treturn this.table.rowManager.getDisplayRows().includes(this);\r\n\t}\r\n\r\n\tgetPosition(){\r\n\t\treturn this.isDisplayed() ? this.position : false;\r\n\t}\r\n\r\n\tsetPosition(position){\r\n\t\tif(position != this.position){\r\n\t\t\tthis.position = position;\r\n\r\n\t\t\tthis.positionWatchers.forEach((callback) => {\r\n\t\t\t\tcallback(this.position);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchPosition(callback){\r\n\t\tthis.positionWatchers.push(callback);\r\n\r\n\t\tcallback(this.position);\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\t\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\t\t\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 BasicVertical 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 position 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\tif(this.rows().length){\r\n\t\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\t\t}else{\r\n\t\t\tthis.clear();\r\n\t\t\tthis.table.rowManager._showPlaceholder();\r\n\t\t}\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 row height 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\t\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t\t}\r\n\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\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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.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\r\n\t\tthis.scrollbarWidth = 0;\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\t// el.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\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\t\t\t\t\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}else if(subject === null){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\"){\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){\r\n\t\treturn this.getDisplayRows().find((row) => {\r\n\t\t\treturn row.getPosition() === position && row.isDisplayed();\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.regenerateRowPositions();\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 rows = [];\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\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.regenerateRowPositions();\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.regenerateRowPositions();\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\t\r\n\t\tif(!this.table.destroyed){\r\n\t\t\tif(typeof handler === \"function\"){\r\n\t\t\t\tindex = this.dataPipeline.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 = \"dataPipeline\";\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.dataPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"display\";\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\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(index > -1){\r\n\t\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tindex++;\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.error(\"Unable to refresh data, invalid handler provided\", handler);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tstage = handler || \"all\";\r\n\t\t\t\tindex = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.redrawBlock){\r\n\t\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\t\thandler: handler,\r\n\t\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\t\tstage:stage,\r\n\t\t\t\t\t\tindex:index,\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t}else{\r\n\t\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\t\tthis.table.columnManager.redraw(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\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t\t}\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 all data needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\t\tindex = 0;\r\n\t\t\t\tthis.resetDisplayRows();\r\n\t\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\r\n\t\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t\t\tthis.regenerateRowPositions();\r\n\t\t}\r\n\r\n\t\tif(this.getDisplayRows().length){\r\n\t\t\tthis._clearPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row positions\r\n\tregenerateRowPositions(){\r\n\t\tvar rows = this.getDisplayRows();\r\n\t\tvar index = 1;\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tif (row.type === \"row\"){\r\n\t\t\t\trow.setPosition(index);\r\n\t\t\t\tindex++;\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\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\tthis.displayRows[index] = displayRows;\r\n\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}\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 across 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\r\n\t\tif(!type || type === true){\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}else{\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\t\trows = this.activeRows;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"display\":\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\t\t\tbreak;\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\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.dispatchExternal(\"renderStarted\");\r\n\t\t\t\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\r\n\t\t\tif(!this.fixedHeight){\r\n\t\t\t\tthis.adjustTableSize();\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollBarCheck();\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tscrollBarCheck(){\r\n\t\tvar scrollbarWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(this.element.scrollHeight > this.element.clientHeight){\r\n\t\t\tscrollbarWidth = this.element.offsetWidth - this.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tif(scrollbarWidth !== this.scrollbarWidth){\r\n\t\t\tthis.scrollbarWidth = scrollbarWidth;\r\n\t\t\tthis.dispatch(\"scrollbar-vertical\", scrollbarWidth);\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.renderMode = this.table.options.renderVertical;\r\n\t\t\t\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:\", this.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(true);\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\r\n\t\tthis.scrollBarCheck();\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(){\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\r\n\t\t// clear empty table placeholder min\r\n\t\tthis.tableElement.style.minWidth = \"\";\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, minHeight;\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\tminHeight = isNaN(this.table.options.minHeight) ? this.table.options.minHeight : this.table.options.minHeight + \"px\";\r\n\t\t\t\t\r\n\t\t\t\tthis.element.style.minHeight = 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\r\n\t\t\tthis.scrollBarCheck();\r\n\t\t}\r\n\t\t\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//reinitialize 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 left = 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}\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\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\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){\r\n\t\tthis.activate();\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){\r\n\t\tthis.activate();\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(){\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\t}\r\n\r\n\tredraw(){\r\n\t\tthis.dispatch(\"footer-redraw\");\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.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\"mouseup\",\r\n\t\t\t\"mousedown\",\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, this.pseudoTrackers[key].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\tif(!targets[this.componentMap[target]]){\r\n\t\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t\t}\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\tmatches = {},\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\ttarget = targets[key],\r\n\t\t\tpreviousTarget = 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\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\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\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\t\treturn row.getElement() === target;\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\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\t\ttargets[key] = 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\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t\t}\r\n\t\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\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\t\tif(matches[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\t\tcomponent = matches[\"row\"].findCell(target);\r\n\t\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\t\t\t\t\t\t\t\t\tconsole.warn(\"Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?\");\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\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\tmatches[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 matches;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\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\tif(this.table.options.debugInvalidComponentFuncs){\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\t}\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.requestOrder = 0; //prevent requests coming 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\r\n\tload(data, params, config, replace, silent, columnsChanged){\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.alertLoader();\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.clearAlert();\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, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\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.alertError();\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.clearAlert();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t\t.finally(() => {\r\n\t\t\t\t\tthis.loading = false;\r\n\t\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, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\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\talertLoader(){\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.table.alertManager.alert(this.table.options.dataLoaderLoading || this.langText(\"data|loading\"));\r\n\t\t}\r\n\t}\r\n\r\n\talertError(){\r\n\t\tthis.table.alertManager.alert(this.table.options.dataLoaderError || this.langText(\"data|error\"), \"error\");\r\n\t}\r\n\r\n\tclearAlert(){\r\n\t\tthis.table.alertManager.clear();\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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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_notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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_notifySubscriptionChange(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\tsubscriber.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 CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DeprecationAdvisor extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\t\r\n\t_warnUser(){\r\n\t\tif(this.options(\"debugDeprecation\")){\r\n\t\t\tconsole.warn(...arguments);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheck(oldOption, newOption){\r\n\t\tvar msg = \"\";\r\n\t\t\r\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\r\n\t\t\tmsg = \"Deprecated Setup Option - Use of the %c\" + oldOption + \"%c option is now deprecated\";\r\n\t\t\t\r\n\t\t\tif(newOption){\r\n\t\t\t\tmsg = msg + \", Please use the %c\" + newOption + \"%c option instead\";\r\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t}else{\r\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMsg(oldOption, msg){\r\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\r\n\t\t\tthis._warnUser(\"%cDeprecated Setup Option - Use of the %c\" + oldOption + \" %c option is now deprecated, \" + msg, 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tmsg(msg){\r\n\t\tthis._warnUser(msg);\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\nimport Helpers from './Helpers.js';\r\n\r\nexport default class Popup extends CoreFeature{\r\n\tconstructor(table, element, parent){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = element;\r\n\t\tthis.container = this._lookupContainer();\r\n\t\t\r\n\t\tthis.parent = parent;\r\n\t\t\r\n\t\tthis.reversedX = false;\r\n\t\tthis.childPopup = null;\r\n\t\tthis.blurable = false;\r\n\t\tthis.blurCallback = null;\r\n\t\tthis.blurEventsBound = false;\r\n\t\tthis.renderedCallback = null;\r\n\t\t\r\n\t\tthis.visible = false;\r\n\t\tthis.hideable = true;\r\n\t\t\r\n\t\tthis.element.classList.add(\"tabulator-popup-container\");\r\n\t\t\r\n\t\tthis.blurEvent = this.hide.bind(this, false);\r\n\t\tthis.escEvent = this._escapeCheck.bind(this);\r\n\t\t\r\n\t\tthis.destroyBinding = this.tableDestroyed;\r\n\t\tthis.destroyed = false;\r\n\t}\r\n\t\r\n\ttableDestroyed(){\r\n\t\tthis.destroyed = true;\r\n\t\tthis.hide(true);\r\n\t}\r\n\t\r\n\t_lookupContainer(){\r\n\t\tvar container = this.table.options.popupContainer;\r\n\t\t\r\n\t\tif(typeof container === \"string\"){\r\n\t\t\tcontainer = document.querySelector(container);\r\n\t\t\t\r\n\t\t\tif(!container){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.popupContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (container === true){\r\n\t\t\tcontainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(container && !this._checkContainerIsParent(container)){\r\n\t\t\tcontainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.popupContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!container){\r\n\t\t\tcontainer = document.body;\r\n\t\t}\r\n\t\t\r\n\t\treturn container;\r\n\t}\r\n\t\r\n\t_checkContainerIsParent(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._checkContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\trenderCallback(callback){\r\n\t\tthis.renderedCallback = callback;\r\n\t}\r\n\t\r\n\tcontainerEventCoords(e){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar x = touch ? e.touches[0].pageX : e.pageX;\r\n\t\tvar y = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\r\n\t\tif(this.container !== document.body){\r\n\t\t\tlet parentOffset = Helpers.elOffset(this.container);\r\n\t\t\t\r\n\t\t\tx -= parentOffset.left;\r\n\t\t\ty -= parentOffset.top;\r\n\t\t}\r\n\t\t\r\n\t\treturn {x, y};\r\n\t}\r\n\t\r\n\telementPositionCoords(element, position = \"right\"){\r\n\t\tvar offset = Helpers.elOffset(element),\r\n\t\tcontainerOffset, x, y;\r\n\t\t\r\n\t\tif(this.container !== document.body){\r\n\t\t\tcontainerOffset = Helpers.elOffset(this.container);\r\n\t\t\t\r\n\t\t\toffset.left -= containerOffset.left;\r\n\t\t\toffset.top -= containerOffset.top;\r\n\t\t}\r\n\t\t\r\n\t\tswitch(position){\r\n\t\t\tcase \"right\":\r\n\t\t\t\tx = offset.left + element.offsetWidth;\r\n\t\t\t\ty = offset.top - 1;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"bottom\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top + element.offsetHeight;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"left\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top - 1;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"top\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"center\":\r\n\t\t\t\tx = offset.left + (element.offsetWidth / 2);\r\n\t\t\t\ty = offset.top + (element.offsetHeight / 2);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn {x, y, offset};\r\n\t}\r\n\t\r\n\tshow(origin, position){\r\n\t\tvar x, y, parentEl, parentOffset, coords;\r\n\t\t\r\n\t\tif(this.destroyed || this.table.destroyed){\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\tif(origin instanceof HTMLElement){\r\n\t\t\tparentEl = origin;\r\n\t\t\tcoords = this.elementPositionCoords(origin, position);\r\n\t\t\t\r\n\t\t\tparentOffset = coords.offset;\r\n\t\t\tx = coords.x;\r\n\t\t\ty = coords.y;\r\n\t\t\t\r\n\t\t}else if(typeof origin === \"number\"){\r\n\t\t\tparentOffset = {top:0, left:0};\r\n\t\t\tx = origin;\r\n\t\t\ty = position;\r\n\t\t}else{\r\n\t\t\tcoords = this.containerEventCoords(origin);\r\n\t\t\t\r\n\t\t\tx = coords.x;\r\n\t\t\ty = coords.y;\r\n\t\t\t\r\n\t\t\tthis.reversedX = false;\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.style.top = y + \"px\";\r\n\t\tthis.element.style.left = x + \"px\";\r\n\t\t\r\n\t\tthis.container.appendChild(this.element);\r\n\t\t\r\n\t\tif(typeof this.renderedCallback === \"function\"){\r\n\t\t\tthis.renderedCallback();\r\n\t\t}\r\n\t\t\r\n\t\tthis._fitToScreen(x, y, parentEl, parentOffset, position);\r\n\t\t\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.destroyBinding);\r\n\t\t\r\n\t\tthis.element.addEventListener(\"mousedown\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\t_fitToScreen(x, y, parentEl, parentOffset, position){\r\n\t\tvar scrollTop = this.container === document.body ? document.documentElement.scrollTop : this.container.scrollTop;\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 + this.element.offsetWidth) >= this.container.offsetWidth || this.reversedX){\r\n\t\t\tthis.element.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.reversedX = 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 + this.element.offsetHeight) > Math.max(this.container.offsetHeight, scrollTop ? this.container.scrollHeight : 0)) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"bottom\":\r\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight - parentEl.offsetHeight - 1) + \"px\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisVisible(){\r\n\t\treturn this.visible;\r\n\t}\r\n\t\r\n\thideOnBlur(callback){\r\n\t\tthis.blurable = true;\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tif(this.visible){\r\n\t\t\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\t\t\tthis.subscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"mousedown\", this.blurEvent);\r\n\t\t\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\r\n\t\t\t\t\tthis.blurEventsBound = true;\r\n\t\t\t\t}\r\n\t\t\t}, 100);\r\n\t\t\t\r\n\t\t\tthis.blurCallback = callback;\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\t_escapeCheck(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockHide(){\r\n\t\tthis.hideable = false;\r\n\t}\r\n\t\r\n\trestoreHide(){\r\n\t\tthis.hideable = true;\r\n\t}\r\n\t\r\n\thide(silent = false){\r\n\t\tif(this.visible && this.hideable){\r\n\t\t\tif(this.blurable && this.blurEventsBound){\r\n\t\t\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"mousedown\", this.blurEvent);\r\n\t\t\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\t\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\t\t\tthis.unsubscribe(\"cell-editing\", this.blurEvent);\r\n\r\n\t\t\t\tthis.blurEventsBound = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.childPopup){\r\n\t\t\t\tthis.childPopup.hide();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.childPopup = null;\r\n\t\t\t}\r\n\t\t\t\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\t\r\n\t\t\tthis.visible = false;\r\n\t\t\t\r\n\t\t\tif(this.blurCallback && !silent){\r\n\t\t\t\tthis.blurCallback();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.unsubscribe(\"table-destroy\", this.destroyBinding);\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\tchild(element){\r\n\t\tif(this.childPopup){\r\n\t\t\tthis.childPopup.hide();\r\n\t\t}\r\n\t\t\r\n\t\tthis.childPopup = new Popup(this.table, element, this);\r\n\t\t\r\n\t\treturn this.childPopup;\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Popup from './tools/Popup.js';\r\n\r\nclass Module extends CoreFeature{\r\n\t\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis._handler = null;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overridden in module\r\n\t}\r\n\t\r\n\t\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\t\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\t\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t/// Public Function Registration ///\r\n\t///////////////////////////////////\r\n\t\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = (...args) => {\r\n\t\t\t\tthis.table.initGuard(name);\r\n\t\t\t\t\r\n\t\t\t\treturn func(...args);\r\n\t\t\t};\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\t\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\t\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\t\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\t\r\n\tdisplayRows(adjust){\r\n\t\tvar index = this.table.rowManager.displayRows.length - 1, \r\n\t\tlookupIndex;\r\n\t\t\r\n\t\tif(this._handler){\r\n\t\t\tlookupIndex = this.table.rowManager.displayPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === this._handler;\r\n\t\t\t});\r\n\r\n\t\t\tif(lookupIndex > -1){\r\n\t\t\t\tindex = lookupIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(adjust){\r\n\t\t\tindex = index + adjust;\r\n\t\t}\r\n\r\n\t\tif(this._handler){\r\n\t\t\tif(index > -1){\r\n\t\t\t\treturn this.table.rowManager.getDisplayRows(index);\r\n\t\t\t}else{\r\n\t\t\t\treturn this.activeRows();\r\n\t\t\t}\r\n\t\t}\t\r\n\t}\r\n\t\r\n\tactiveRows(){\r\n\t\treturn this.table.rowManager.activeRows;\r\n\t}\r\n\t\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\t\t\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\t\r\n\t///////////////////////////////////\r\n\t//////// Footer Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tfooterAppend(element){\r\n\t\treturn this.table.footerManager.append(element);\r\n\t}\r\n\t\r\n\tfooterPrepend(element){\r\n\t\treturn this.table.footerManager.prepend(element);\r\n\t}\r\n\t\r\n\tfooterRemove(element){\r\n\t\treturn this.table.footerManager.remove(element);\r\n\t} \r\n\t\r\n\t///////////////////////////////////\r\n\t//////// Popups Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tpopup(menuEl, menuContainer){\r\n\t\treturn new Popup(this.table, menuEl, menuContainer);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t//////// Alert Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\talert(content, type){\r\n\t\treturn this.table.alertManager.alert(content, type);\r\n\t}\r\n\t\r\n\tclearAlert(){\r\n\t\treturn this.table.alertManager.clear();\r\n\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, forced){\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, forced){\r\n\tif(forced){\r\n\t\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\t}\r\n\t\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, forced){\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, forced){\r\n\tvar totalWidth = this.table.rowManager.element.getBoundingClientRect().width; //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 across 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 across 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\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 = 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\tgapFill = 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//calculate 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(gapFill && 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(dataChanged){\r\n\t\tthis.dispatch(\"layout-refreshing\");\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex, dataChanged);\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 placeholder\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 language 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//determining 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 fillPath = value ? path + \"|\" + value : path,\r\n\t\tpathArray = fillPath.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//iterate 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\t\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFunctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\t\t\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\t\r\n\tbindStaticFunctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\t\t\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\t\t\t\t\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\t\t\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\t\t\t\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\t\t\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\t\t\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\t\t\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedStartMods = [],\r\n\t\t\torderedEndMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\t\t\t\r\n\t\t\tthis.modules = {};\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.modules[name] = module;\r\n\t\t\t\t\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\tif(mod.moduleInitOrder < 0){\r\n\t\t\t\t\t\t\torderedStartMods.push(module);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\torderedEndMods.push(module);\r\n\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\tunOrderedMods.push(module);\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\torderedStartMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\t\t\torderedEndMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\t\t\t\r\n\t\t\tthis.modulesRegular = orderedStartMods.concat(unOrderedMods.concat(orderedEndMods));\r\n\t\t};\r\n\t}\r\n\t\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\t\t\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\t\t\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class Alert extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n \r\n\t\tthis.element = this._createAlertElement();\r\n\t\tthis.msgElement = this._createMsgElement();\r\n\t\tthis.type = null;\r\n \r\n\t\tthis.element.appendChild(this.msgElement);\r\n\t}\r\n \r\n\t_createAlertElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-alert\");\r\n\t\treturn el;\r\n\t}\r\n \r\n\t_createMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-alert-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\t\treturn el;\r\n\t}\r\n \r\n\t_typeClass(){\r\n\t\treturn \"tabulator-alert-state-\" + this.type;\r\n\t}\r\n \r\n\talert(content, type = \"msg\"){\r\n\t\tif(content){\r\n\t\t\tthis.clear();\r\n \r\n\t\t\tthis.type = type;\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.add(this._typeClass());\r\n \r\n\t\t\tif(typeof content === \"function\"){\r\n\t\t\t\tcontent = content();\r\n\t\t\t}\r\n \r\n\t\t\tif(content instanceof HTMLElement){\r\n\t\t\t\tthis.msgElement.appendChild(content);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = content;\r\n\t\t\t}\r\n \r\n\t\t\tthis.table.element.appendChild(this.element);\r\n\t\t}\r\n\t}\r\n \r\n\tclear(){\r\n\t\tif(this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n \r\n\t\tthis.msgElement.classList.remove(this._typeClass());\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 DeprecationAdvisor from './tools/DeprecationAdvisor.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\nimport Alert from './tools/Alert.js';\r\n\r\nclass Tabulator {\r\n\t\r\n\tconstructor(element, options){\r\n\t\t\r\n\t\tthis.options = {};\r\n\t\t\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.alertManager = null; //hold Alert 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\t\t\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\t\t\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\t\t\r\n\t\tthis.deprecationAdvisor = new DeprecationAdvisor(this);\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.destroyed = false;\r\n\t\t\r\n\t\tif(this.initializeElement(element)){\r\n\t\t\t\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\t\t\t\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\t\t\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\t\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\t\t\t\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\t\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\t\tthis.alertManager = new Alert(this);\r\n\t\t\r\n\t\tthis.bindModules();\r\n\t\t\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options);\r\n\t\t\r\n\t\tthis._clearObjectPointers();\r\n\t\t\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\t\t\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\t\t\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\t\t\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\t\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\t\r\n\t_clearSelection(){\r\n\t\t\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\tif (window.getSelection) {\r\n\t\t\tif (window.getSelection().empty) { // Chrome\r\n\t\t\t\twindow.getSelection().empty();\r\n\t\t\t} else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t}\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\t\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\t\t\r\n\t\tthis._rtlCheck();\r\n\t\t\r\n\t\tthis._buildElement();\r\n\t\t\r\n\t\tthis._initializeTable();\r\n\t\t\r\n\t\tthis._loadInitialData();\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\t\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\t\t\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"rtl\":\r\n\t\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\t\tthis.rtl = true;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"ltr\":\r\n\t\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\t\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\t\t\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\t\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\t\t\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\t\t\t\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\t\t\t\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\t\t\t\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\t\t\t\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\t\t\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\t\t\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\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\t\t\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\t\t\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\t\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\t\t\r\n\t\tthis.interactionMonitor.initialize();\r\n\t\t\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\t\t\r\n\t\tthis._detectBrowser();\r\n\t\t\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\t\t\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\t\t\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\t\t\r\n\t\tif(options.autoColumns && options.data){\r\n\t\t\t\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\t\t\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\t\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\t\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\t\t\r\n\t\tthis.destroyed = true;\r\n\t\t\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\t\t\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\t\t\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\t\t\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\t\t\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\r\n\t\tthis.externalEvents.dispatch(\"tableDestroyed\");\r\n\t}\r\n\t\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\t\t\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\t\t\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\t\r\n\tinitGuard(func, msg){\r\n\t\tvar stack, line;\r\n\t\t\r\n\t\tif(this.options.debugInitialization && !this.initialized){\r\n\t\t\tif(!func){\r\n\t\t\t\tstack = new Error().stack.split(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tline = stack[0] == \"Error\" ? stack[2] : stack[1];\r\n\t\t\t\t\r\n\t\t\t\tif(line[0] == \" \"){\r\n\t\t\t\t\tfunc = line.trim().split(\" \")[1].split(\".\")[1];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfunc = line.trim().split(\"@\")[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconsole.warn(\"Table Not Initialized - Calling the \" + func + \" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function.\" + (msg ? \" \" + msg : \"\"));\r\n\t\t}\r\n\t\t\r\n\t\treturn this.initialized;\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-blocking\");\r\n\t\t\r\n\t\tthis.rowManager.blockRedraw();\r\n\t\tthis.columnManager.blockRedraw();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-blocked\");\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-restoring\");\r\n\r\n\t\tthis.rowManager.restoreRedraw();\r\n\t\tthis.columnManager.restoreRedraw();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-restored\");\r\n\t}\r\n\t\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tthis.initGuard(false, \"To set initial data please use the 'data' property in the table constructor.\");\r\n\t\t\r\n\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t}\r\n\t\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\t\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\t\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\t\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t}\r\n\t\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data && data.length > 0){\r\n\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\tresponses++;\r\n\t\t\t\t\t\t\r\n\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\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}\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\taddData(data, pos, index){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data){\r\n\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\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data && data.length > 0){\r\n\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tresponses++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\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\t\t\t\t\t\t\t\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}else{\r\n\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\t\t\t\t\t\t\t\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}\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\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\t\r\n\t//get row object\r\n\tgetRowFromPosition(position){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position);\r\n\t\t\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\t\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\t\t\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\t\t\t\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}\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\t\t\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\t\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\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}\r\n\t\r\n\t//update a row if it exists otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t\t.then(()=>{\r\n\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t\t.then((rows)=>{\r\n\t\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t\t.then(()=>{\r\n\t\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\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\t\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\t\t\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\t\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\t\r\n\t}\r\n\t\r\n\t//get position of row in table\r\n\tgetRowPosition(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.getPosition();\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\t\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tthis.initGuard(false, \"To set initial columns please use the 'columns' property in the table constructor\");\r\n\t\t\r\n\t\tthis.columnManager.setColumns(definition);\r\n\t}\r\n\t\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\t\r\n\tgetColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tif(column){\r\n\t\t\treturn column.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\t\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\t\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field); \r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t\t.then((column) => {\r\n\t\t\t\treturn column.getComponent();\r\n\t\t\t});\r\n\t}\r\n\t\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from),\r\n\t\ttoColumn = this.columnManager.findColumn(to);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\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\t\t\t\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\t\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.columnManager.redraw(force);\r\n\t\tthis.rowManager.redraw(force);\r\n\t}\r\n\t\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\t\r\n\t//////////////////// Event Bus ///////////////////\r\n\t\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\t\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\t\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments);\r\n\t\targs.shift();\r\n\t\t\r\n\t\tthis.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\t//////////////////// Alerts ///////////////////\r\n\r\n\talert(contents, type){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.alertManager.alert(contents, type);\r\n\t}\r\n\r\n\tclearAlert(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.alertManager.clear();\r\n\t}\r\n\t\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\t\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\t\t\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\t\t\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\tdebugInvalidComponentFuncs:true, //allow toggling of invalid component warnings\r\n\tdebugInitialization:true, //allow toggling of pre initialization function call warnings\r\n\tdebugDeprecation:true, //allow toggling of deprecation 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\tpopupContainer:false,\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\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\trowHeight: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 defaultAccessors 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\t\tif(Accessor.accessors[value]){\r\n\t\t\t\t\taccessor = Accessor.accessors[value];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\taccessor = value;\r\n\t\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, colComponent;\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\tcolComponent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colComponent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colComponent, 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 = defaultAccessors;\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\t.then((data)=>{\r\n\t\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\treturn data;\r\n\t\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\t.then((response)=>{\r\n\t\t\t\t\tif(response.ok) {\r\n\t\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\t\treject(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\t.catch((error)=>{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\t\treject(error);\r\n\t\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); //DEPRECATED - 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\tlist = 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.generateHTMLTable(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\t\tvalue = JSON.stringify(col.value);\r\n\t\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\t\tvalue = \"\";\r\n\t\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\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 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\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\t\tif(!this.pasteAction){\r\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tthis.pasteAction = action;\r\n\t\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\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\t\tif(!this.pasteParser){\r\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tthis.pasteParser = parser;\r\n\t\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\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\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\t\r\n\t\tthis.blocked = false;\r\n\t\tthis.recalcAfterBlock = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\t\t\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\t\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\t\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\t\t\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\t\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"redraw-blocked\", this.blockRedraw.bind(this));\r\n\t\tthis.subscribe(\"redraw-restored\", this.restoreRedraw.bind(this));\r\n\t\t\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\t\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t\t\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockRedraw(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.recalcAfterBlock = false;\r\n\t}\r\n\t\r\n\t\r\n\trestoreRedraw(){\r\n\t\tthis.blocked = false;\r\n\t\t\r\n\t\tif(this.recalcAfterBlock){\r\n\t\t\tthis.recalcAfterBlock = false;\r\n\t\t\tthis.recalcActiveRowsRefresh();\r\n\t\t}\r\n\t}\r\n\t\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\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tblockCheck(){\r\n\t\tif(this.blocked){\r\n\t\t\tthis.recalcAfterBlock = true;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.blocked;\r\n\t}\r\n\t\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\t\t\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(row);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\t\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\t\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\t\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\t\t\t\t\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\t\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\t\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\t\t\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\t\t\r\n\t\tif(def.topCalc){\r\n\t\t\t\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\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\tcase \"function\":\r\n\t\t\t\t\tconfig.topCalc = def.topCalc;\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(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\t\t\t\t\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\t\t\t\r\n\t\t}\r\n\t\t\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\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\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\tcase \"function\":\r\n\t\t\t\t\tconfig.botCalc = def.bottomCalc;\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(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\t\t\t\t\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\t\t\r\n\t}\r\n\t\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){}\r\n\t\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\t\t\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\t\t\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.footerRemove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getContentsElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.footerPrepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botElement.scrollLeft = left;\r\n\t\t}\r\n\t}\r\n\t\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\t\t\r\n\t\tif(!this.blockCheck()){\r\n\t\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\t\tdata = this.rowsToData(rows);\r\n\t\t\t\t\r\n\t\t\t\tif(this.topInitialized){\r\n\t\t\t\t\tif(this.topRow){\r\n\t\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trow = this.generateRow(\"top\", data);\r\n\t\t\t\t\tthis.topRow = row;\r\n\t\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\t\trow.initialize(true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(this.botInitialized){\r\n\t\t\t\t\tif(this.botRow){\r\n\t\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trow = this.generateRow(\"bottom\", data);\r\n\t\t\t\t\tthis.botRow = row;\r\n\t\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\t\trow.initialize(true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t\t\t\r\n\t\t\t\t//set resizable handles\r\n\t\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\t\t\t\t\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\t\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\t\t\r\n\t\tif(!this.blockCheck()){\r\n\t\t\tif(group){\r\n\t\t\t\tif(group.calcs){\r\n\t\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\t\tgroup.calcs.top.reinitialize();\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\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\t\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\t\t\t\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\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\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\t\t\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\t\t\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\t\t\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\t\t\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\t\t\r\n\t\trow.component = false;\r\n\t\t\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\t\t\t\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\t\t\r\n\t\trow.generateCells = () => {\r\n\t\t\t\r\n\t\t\tvar cells = [];\r\n\t\t\t\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\t\r\n\t\t\t\t//set field name of mock column\r\n\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\t\t\t\t\r\n\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//ensure css class definition is replicated to calculation cell\r\n\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\t\t\t\t\r\n\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\tcell.getElement();\r\n\t\t\t\tcell.column = column;\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t\t\r\n\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\tcells.push(cell);\r\n\t\t\t\t\r\n\t\t\t\tif(!column.visible){\r\n\t\t\t\t\tcell.hide();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\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\t\t\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\t\t\t\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\t\t\t\t\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\t\t\t\t\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\t\t\r\n\t\treturn rowData;\r\n\t}\r\n\t\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\t\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\t\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\t\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\t\t\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\t\t\t\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\t\t\r\n\t\treturn results;\r\n\t}\r\n\t\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\t\t\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\t\t\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\t\t\r\n\t\treturn results;\r\n\t}\r\n\t\r\n\tadjustForScrollbar(width){\r\n\t\tif(this.botRow){\r\n\t\t\tif(this.table.rtl){\r\n\t\t\t\tthis.botElement.style.paddingLeft = width + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.botElement.style.paddingRight = width + \"px\";\r\n\t\t\t}\r\n\t\t}\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\nimport RowComponent from '../../core/row/RowComponent.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.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);//selecting 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(this.options(\"movableRows\")){\r\n\t\t\t\tconsole.warn(\"The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior\");\r\n\t\t\t}\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\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t\t};\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t\t};\r\n\t\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\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedrawing.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\ttableRedrawing(force){\r\n\t\tvar rows;\r\n\r\n\t\tif(force){\r\n\t\t\trows = this.table.rowManager.getRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.reinitializeRowChildren(row);\r\n\t\t\t});\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\toldControl = config.controlEl;\r\n\r\n\t\tel = el || row.getCells()[0].getElement();\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\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\tgetTreeParentRoot(row){\r\n\t\treturn row.modules.dataTree && row.modules.dataTree.parent ? this.getTreeParentRoot(row.modules.dataTree.parent) : row;\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}else if(subject === null){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\"){\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.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\t\tconsole.warn(\"Download Warning - CSV 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 - CSV downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\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\r\n\t\t\t\t\tif(col){\r\n\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\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\r\n\t\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\t\tcol.value = \"\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(item.join(delimiter));\r\n\t\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}\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\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(item);\r\n\t\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.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\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\t\theader.push(parseRow(row));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\tbody.push(parseRow(row));\r\n\t\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\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\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.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.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n}\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\tcompression = 'compress' in options ? options.compress : true,\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\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary', compression });\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.generateHTMLTable(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(\"downloadEncoder\", function(data, mimeType){\r\n\t\t\treturn new Blob([data],{type:mimeType});\r\n\t\t}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadReady\", undefined); //warn of function deprecation\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.deprecatedOptionsCheck();\r\n\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\tdeprecatedOptionsCheck(){\r\n\t\tthis.deprecationCheck(\"downloadReady\", \"downloadEncoder\");\r\n\t}\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 = this.table.options.downloadEncoder(data, mime);\r\n\r\n\t\tif(blob){\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\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\t\t\t\t\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\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\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\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\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\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\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\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\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\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\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;\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\nimport urlBuilder from '../Ajax/defaults/urlGenerator.js';\r\n\r\nexport default class Edit{\r\n\tconstructor(editor, cell, onRendered, success, cancel, editorParams){\r\n\t\tthis.edit = editor;\r\n\t\tthis.table = editor.table;\r\n\t\tthis.cell = cell;\r\n\t\tthis.params = this._initializeParams(editorParams);\r\n\t\t\r\n\t\tthis.data = [];\r\n\t\tthis.displayItems = [];\r\n\t\tthis.currentItems = [];\r\n\t\tthis.focusedItem = null;\r\n\t\t\r\n\t\tthis.input = this._createInputElement();\r\n\t\tthis.listEl = this._createListElement();\r\n\t\t\r\n\t\tthis.initialValues = null; \r\n\t\t\r\n\t\tthis.isFilter = !cell._getSelf;\r\n\t\t\r\n\t\tthis.filterTimeout = null;\r\n\t\tthis.filtered = false;\r\n\t\tthis.typing = false;\r\n\t\t\r\n\t\tthis.values = []; \r\n\t\tthis.popup = null; \r\n\t\t\r\n\t\tthis.listIteration = 0;\r\n\t\t\r\n\t\tthis.lastAction=\"\";\r\n\t\t\r\n\t\tthis.blurable = true;\r\n\t\t\r\n\t\tthis.actions = {\r\n\t\t\tsuccess:success,\r\n\t\t\tcancel:cancel\r\n\t\t};\r\n\t\t\r\n\t\tthis._deprecatedOptionsCheck();\r\n\t\tthis._initializeValue();\r\n\t\t\r\n\t\tonRendered(this._onRendered.bind(this));\r\n\t}\r\n\t\r\n\t_deprecatedOptionsCheck(){\r\n\t\tif(this.params.listItemFormatter){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.sortValuesList){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.searchFunc){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.searchingPlaceholder){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t_initializeValue(){\r\n\t\tvar initialValue = this.cell.getValue();\r\n\t\t\r\n\t\tif(typeof initialValue === \"undefined\" && typeof this.params.defaultValue !== \"undefined\"){\r\n\t\t\tinitialValue = this.params.defaultValue;\r\n\t\t}\r\n\t\t\r\n\t\tthis.initialValues = this.params.multiselect ? initialValue : [initialValue];\r\n\t\t\r\n\t\tif(this.isFilter){\r\n\t\t\tthis.input.value = this.initialValues ? this.initialValues.join(\",\") : \"\";\r\n\t\t\tthis.headerFilterInitialListGen(); \r\n\t\t}\r\n\t}\r\n\t\r\n\t_onRendered(){\r\n\t\tvar cellEl = this.cell.getElement();\r\n\t\t\r\n\t\tfunction clickStop(e){\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\t\t\r\n\t\tthis.input.style.height = \"100%\";\r\n\t\tthis.input.focus({preventScroll: true});\r\n\t\t\r\n\t\t\r\n\t\tcellEl.addEventListener(\"click\", clickStop);\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tcellEl.removeEventListener(\"click\", clickStop);\r\n\t\t}, 1000);\r\n\t\t\r\n\t\tthis.input.addEventListener(\"mousedown\", this._preventPopupBlur.bind(this));\r\n\t}\r\n\t\r\n\t_createListElement(){\r\n\t\tvar listEl = document.createElement(\"div\");\r\n\t\tlistEl.classList.add(\"tabulator-edit-list\");\r\n\t\t\r\n\t\tlistEl.addEventListener(\"mousedown\", this._preventBlur.bind(this));\r\n\t\tlistEl.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\r\n\t\t\r\n\t\treturn listEl;\r\n\t}\r\n\t\r\n\t_setListWidth(){\r\n\t\tvar element = this.isFilter ? this.input : this.cell.getElement();\r\n\t\t\r\n\t\tthis.listEl.style.minWidth = element.offsetWidth + \"px\";\r\n\t\t\r\n\t\tif(this.params.maxWidth){\r\n\t\t\tif(this.params.maxWidth === true){\r\n\t\t\t\tthis.listEl.style.maxWidth = element.offsetWidth + \"px\";\r\n\t\t\t}else if(typeof this.params.maxWidth === \"number\"){\r\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\t_createInputElement(){\r\n\t\tvar attribs = this.params.elementAttributes;\r\n\t\tvar input = document.createElement(\"input\");\r\n\t\t\r\n\t\tinput.setAttribute(\"type\", this.params.clearable ? \"search\" : \"text\");\r\n\t\t\r\n\t\tinput.style.padding = \"4px\";\r\n\t\tinput.style.width = \"100%\";\r\n\t\tinput.style.boxSizing = \"border-box\";\r\n\t\t\r\n\t\tif(!this.params.autocomplete){\r\n\t\t\tinput.style.cursor = \"default\";\r\n\t\t\tinput.style.caretColor = \"transparent\";\r\n\t\t\t// input.readOnly = (this.edit.currentCell != false);\r\n\t\t}\r\n\t\t\r\n\t\tif(attribs && typeof attribs == \"object\"){\r\n\t\t\tfor (let key in attribs){\r\n\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + attribs[\"+\" + key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinput.setAttribute(key, attribs[key]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.mask){\r\n\t\t\tmaskInput(input, this.params);\r\n\t\t}\r\n\t\t\r\n\t\tthis._bindInputEvents(input);\r\n\t\t\r\n\t\treturn input;\r\n\t}\r\n\t\r\n\t_initializeParams(params){\r\n\t\tvar valueKeys = [\"values\", \"valuesURL\", \"valuesLookup\"],\r\n\t\tvalueCheck;\r\n\t\t\r\n\t\tparams = Object.assign({}, params);\r\n\t\t\r\n\t\tparams.verticalNavigation = params.verticalNavigation || \"editor\";\r\n\t\tparams.placeholderLoading = typeof params.placeholderLoading === \"undefined\" ? \"Searching ...\" : params.placeholderLoading;\r\n\t\tparams.placeholderEmpty = typeof params.placeholderEmpty === \"undefined\" ? \"No Results Found\" : params.placeholderEmpty;\r\n\t\tparams.filterDelay = typeof params.filterDelay === \"undefined\" ? 300 : params.filterDelay;\r\n\t\t\r\n\t\tparams.emptyValue = Object.keys(params).includes(\"emptyValue\") ? params.emptyValue : \"\";\r\n\t\t\r\n\t\tvalueCheck = Object.keys(params).filter(key => valueKeys.includes(key)).length;\r\n\t\t\r\n\t\tif(!valueCheck){\r\n\t\t\tconsole.warn(\"list editor config error - either the values, valuesURL, or valuesLookup option must be set\");\r\n\t\t}else if(valueCheck > 1){\r\n\t\t\tconsole.warn(\"list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor\");\r\n\t\t}\r\n\t\t\r\n\t\tif(params.autocomplete){\r\n\t\t\tif(params.multiselect){\r\n\t\t\t\tparams.multiselect = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - multiselect option is not available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(params.freetext){\r\n\t\t\t\tparams.freetext = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - freetext option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.filterFunc){\r\n\t\t\t\tparams.filterFunc = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - filterFunc option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.filterRemote){\r\n\t\t\t\tparams.filterRemote = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - filterRemote option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.mask){\r\n\t\t\t\tparams.mask = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - mask option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.allowEmpty){\r\n\t\t\t\tparams.allowEmpty = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - allowEmpty option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.listOnEmpty){\r\n\t\t\t\tparams.listOnEmpty = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - listOnEmpty option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(params.filterRemote && !(typeof params.valuesLookup === \"function\" || params.valuesURL)){\r\n\t\t\tparams.filterRemote = false;\r\n\t\t\tconsole.warn(\"list editor config error - filterRemote option should only be used when values list is populated from a remote source\");\r\n\t\t}\r\n\t\treturn params;\r\n\t}\r\n\t//////////////////////////////////////\r\n\t////////// Event Handling ////////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_bindInputEvents(input){\r\n\t\tinput.addEventListener(\"focus\", this._inputFocus.bind(this));\r\n\t\tinput.addEventListener(\"click\", this._inputClick.bind(this));\r\n\t\tinput.addEventListener(\"blur\", this._inputBlur.bind(this));\r\n\t\tinput.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\r\n\t\tinput.addEventListener(\"search\", this._inputSearch.bind(this));\r\n\t\t\r\n\t\tif(this.params.autocomplete){\r\n\t\t\tinput.addEventListener(\"keyup\", this._inputKeyUp.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t_inputFocus(e){\r\n\t\tthis.rebuildOptionsList();\r\n\t}\r\n\t\r\n\t_filter(){\r\n\t\tif(this.params.filterRemote){\r\n\t\t\tclearTimeout(this.filterTimeout);\r\n\t\t\t\r\n\t\t\tthis.filterTimeout = setTimeout(() => {\r\n\t\t\t\tthis.rebuildOptionsList();\r\n\t\t\t}, this.params.filterDelay);\r\n\t\t}else{\r\n\t\t\tthis._filterList();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputClick(e){\r\n\t\te.stopPropagation();\r\n\t}\r\n\t\r\n\t_inputBlur(e){\r\n\t\tif(this.blurable){\r\n\t\t\tif(this.popup){\r\n\t\t\t\tthis.popup.hide();\r\n\t\t\t}else{\r\n\t\t\t\tthis._resolveValue(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputSearch(){\r\n\t\tthis._clearChoices();\r\n\t}\r\n\t\r\n\t_inputKeyDown(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t\r\n\t\t\tcase 38: //up arrow\r\n\t\t\t\tthis._keyUp(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 40: //down arrow\r\n\t\t\t\tthis._keyDown(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\t\tthis._keySide(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tthis._keyEnter();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tthis._keyEsc();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t\tthis._keyHomeEnd(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 9: //tab\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis._keySelectLetter(e);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputKeyUp(e){\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\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis._keyAutoCompLetter(e);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_preventPopupBlur(){\r\n\t\tif(this.popup){\r\n\t\t\tthis.popup.blockHide();\r\n\t\t}\r\n\t\t\r\n\t\tsetTimeout(() =>{\r\n\t\t\tif(this.popup){\r\n\t\t\t\tthis.popup.restoreHide();\r\n\t\t\t}\r\n\t\t}, 10);\r\n\t}\r\n\t\r\n\t_preventBlur(){\r\n\t\tthis.blurable = false;\r\n\t\t\r\n\t\tsetTimeout(() =>{\r\n\t\t\tthis.blurable = true;\r\n\t\t}, 10);\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Keyboard Navigation /////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_keyUp(e){\r\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\r\n\t\t\r\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index)){\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tif(index > 0){\r\n\t\t\t\tthis._focusItem(this.displayItems[index - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyDown(e){\r\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\r\n\t\t\r\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index < this.displayItems.length - 1)){\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tif(index < this.displayItems.length - 1){\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tthis._focusItem(this.displayItems[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis._focusItem(this.displayItems[index + 1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keySide(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t}\r\n\t\r\n\t_keyEnter(e){\r\n\t\tif(this.params.autocomplete && this.lastAction === \"typing\"){\r\n\t\t\tthis._resolveValue(true);\r\n\t\t}else{\r\n\t\t\tif(this.focusedItem){\r\n\t\t\t\tthis._chooseItem(this.focusedItem);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyEsc(e){\r\n\t\tthis._cancel();\r\n\t}\r\n\t\r\n\t_keyHomeEnd(e){\r\n\t\tif(this.params.autocomplete){\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keySelectLetter(e){\r\n\t\tif(!this.params.autocomplete){\r\n\t\t\t// if(this.edit.currentCell === false){\r\n\t\t\te.preventDefault();\r\n\t\t\t// }\r\n\t\t\t\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tthis._scrollToValue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyAutoCompLetter(e){\r\n\t\tthis._filter();\r\n\t\tthis.lastAction = \"typing\";\r\n\t\tthis.typing = true;\r\n\t}\r\n\t\r\n\t\r\n\t_scrollToValue(char){\r\n\t\tclearTimeout(this.filterTimeout);\r\n\t\t\r\n\t\tvar character = String.fromCharCode(char).toLowerCase();\r\n\t\tthis.filterTerm += character.toLowerCase();\r\n\t\t\r\n\t\tvar match = this.displayItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(this.filterTerm);\r\n\t\t});\r\n\t\t\r\n\t\tif(match){\r\n\t\t\tthis._focusItem(match);\r\n\t\t}\r\n\t\t\r\n\t\tthis.filterTimeout = setTimeout(() => {\r\n\t\t\tthis.filterTerm = \"\";\r\n\t\t}, 800);\r\n\t}\r\n\t\r\n\t_focusItem(item){\r\n\t\tthis.lastAction = \"focus\";\r\n\t\t\r\n\t\tif(this.focusedItem && this.focusedItem.element){\r\n\t\t\tthis.focusedItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.focusedItem = item;\r\n\t\t\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t//////////////////////////////////////\r\n\t/////// Data List Generation /////////\r\n\t//////////////////////////////////////\r\n\theaderFilterInitialListGen(){\r\n\t\tthis._generateOptions(true);\r\n\t}\r\n\t\r\n\trebuildOptionsList(){\r\n\t\tthis._generateOptions()\r\n\t\t\t.then(this._sortOptions.bind(this))\r\n\t\t\t.then(this._buildList.bind(this))\r\n\t\t\t.then(this._showList.bind(this))\r\n\t\t\t.catch((e) => {\r\n\t\t\t\tif(!Number.isInteger(e)){\r\n\t\t\t\t\tconsole.error(\"List generation error\", e);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\t\r\n\t_filterList(){\r\n\t\tthis._buildList(this._filterOptions());\r\n\t\tthis._showList();\r\n\t}\r\n\t\r\n\t_generateOptions(silent){\r\n\t\tvar values = [];\r\n\t\tvar iteration = ++ this.listIteration;\r\n\t\t\r\n\t\tthis.filtered = false;\r\n\t\t\r\n\t\tif(this.params.values){\r\n\t\t\tvalues = this.params.values;\r\n\t\t}else if (this.params.valuesURL){\r\n\t\t\tvalues = this._ajaxRequest(this.params.valuesURL, this.input.value);\r\n\t\t}else{\r\n\t\t\tif(typeof this.params.valuesLookup === \"function\"){\r\n\t\t\t\tvalues = this.params.valuesLookup(this.cell, this.input.value);\r\n\t\t\t}else if(this.params.valuesLookup){\r\n\t\t\t\tvalues = this._uniqueColumnValues(this.params.valuesLookupField);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(values instanceof Promise){\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis._addPlaceholder(this.params.placeholderLoading);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn values.then()\r\n\t\t\t\t.then((responseValues) => {\r\n\t\t\t\t\tif(this.listIteration === iteration){\r\n\t\t\t\t\t\treturn this._parseList(responseValues);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\treturn Promise.reject(iteration);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.resolve(this._parseList(values));\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addPlaceholder(contents){\r\n\t\tvar placeholder = document.createElement(\"div\");\r\n\t\t\r\n\t\tif(typeof contents === \"function\"){\r\n\t\t\tcontents = contents(this.cell.getComponent(), this.listEl);\r\n\t\t}\r\n\t\t\r\n\t\tif(contents){\r\n\t\t\tthis._clearList();\r\n\t\t\t\r\n\t\t\tif(contents instanceof HTMLElement){\r\n\t\t\t\tplaceholder = contents;\r\n\t\t\t}else{\r\n\t\t\t\tplaceholder.classList.add(\"tabulator-edit-list-placeholder\");\r\n\t\t\t\tplaceholder.innerHTML = contents;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.listEl.appendChild(placeholder);\r\n\t\t\t\r\n\t\t\tthis._showList();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_ajaxRequest(url, term){\r\n\t\tvar params = this.params.filterRemote ? {term:term} : {};\r\n\t\turl = urlBuilder(url, {}, params);\r\n\t\t\r\n\t\treturn fetch(url)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\treturn response.json()\r\n\t\t\t\t\t\t.catch((error)=>{\r\n\t\t\t\t\t\t\tconsole.warn(\"List Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t\t\treturn Promise.reject(error);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"List Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treturn Promise.reject(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(\"List Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treturn Promise.reject(error);\r\n\t\t\t});\r\n\t}\r\n\t\r\n\t_uniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = this.table.getData(this.params.valuesLookup),\r\n\t\tcolumn;\r\n\t\t\r\n\t\tif(field){\r\n\t\t\tcolumn = this.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = this.cell.getColumn()._getSelf();\r\n\t\t}\r\n\t\t\r\n\t\tif(column){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\t\t\t\t\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\toutput = [];\r\n\t\t}\r\n\t\t\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\t\r\n\t\r\n\t_parseList(inputValues){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(!Array.isArray(inputValues)){\r\n\t\t\tinputValues = Object.entries(inputValues).map(([key, value]) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tlabel:value,\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tinputValues.forEach((value) => {\r\n\t\t\tif(typeof value !== \"object\"){\r\n\t\t\t\tvalue = {\r\n\t\t\t\t\tlabel:value,\r\n\t\t\t\t\tvalue:value,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._parseListItem(value, data, 0);\r\n\t\t});\r\n\t\t\r\n\t\tif(!this.currentItems.length && this.params.freetext){\r\n\t\t\tthis.input.value = this.initialValues;\r\n\t\t\tthis.typing = true;\r\n\t\t\tthis.lastAction = \"typing\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.data = data;\r\n\t\t\r\n\t\treturn data; \r\n\t}\r\n\t\r\n\t_parseListItem(option, data, level){\r\n\t\tvar item = {};\r\n\t\t\r\n\t\tif(option.options){\r\n\t\t\titem = this._parseListGroup(option, level + 1);\r\n\t\t}else{\r\n\t\t\titem = {\r\n\t\t\t\tlabel:option.label,\r\n\t\t\t\tvalue:option.value,\r\n\t\t\t\titemParams:option.itemParams,\r\n\t\t\t\telementAttributes: option.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t\tselected:false,\r\n\t\t\t\tvisible:true,\r\n\t\t\t\tlevel:level,\r\n\t\t\t\toriginal:option,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tif(this.initialValues && this.initialValues.indexOf(option.value) > -1){\r\n\t\t\t\tthis._chooseItem(item, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdata.push(item);\r\n\t}\r\n\t\r\n\t_parseListGroup(option, level){\r\n\t\tvar item = {\r\n\t\t\tlabel:option.label,\r\n\t\t\tgroup:true,\r\n\t\t\titemParams:option.itemParams,\r\n\t\t\telementAttributes:option.elementAttributes,\r\n\t\t\telement:false,\r\n\t\t\tvisible:true,\r\n\t\t\tlevel:level,\r\n\t\t\toptions:[],\r\n\t\t\toriginal:option,\r\n\t\t};\r\n\t\t\r\n\t\toption.options.forEach((child) => {\r\n\t\t\tthis._parseListItem(child, item.options, level);\r\n\t\t});\r\n\t\t\r\n\t\treturn item;\r\n\t}\r\n\t\r\n\t_sortOptions(options){\r\n\t\tvar sorter;\r\n\t\t\r\n\t\tif(this.params.sort){\r\n\t\t\tsorter = typeof this.params.sort === \"function\" ? this.params.sort : this._defaultSortFunction.bind(this);\r\n\t\t\t\r\n\t\t\tthis._sortGroup(sorter, options);\r\n\t\t}\r\n\t\t\r\n\t\treturn options;\r\n\t}\r\n\t\r\n\t_sortGroup(sorter, options){\r\n\t\toptions.sort((a,b) => {\r\n\t\t\treturn sorter(a.label, b.label, a.value, b.value, a.original, b.original);\r\n\t\t});\r\n\t\t\r\n\t\toptions.forEach((option) => {\r\n\t\t\tif(option.group){\r\n\t\t\t\tthis._sortGroup(sorter, option.options);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_defaultSortFunction(as, bs){\r\n\t\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\t\tvar emptyAlign = 0;\r\n\t\t\r\n\t\tif(this.params.sort === \"desc\"){\r\n\t\t\t[as, bs] = [bs, as];\r\n\t\t}\r\n\t\t\r\n\t\t//handle empty values\r\n\t\tif(!as && as!== 0){\r\n\t\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t\t}else if(!bs && bs!== 0){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\t\ta = String(as).toLowerCase();\r\n\t\t\tb = String(bs).toLowerCase();\r\n\t\t\tif(a === b) return 0;\r\n\t\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\t\ta = a.match(rx);\r\n\t\t\tb = b.match(rx);\r\n\t\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\t\twhile(i < L){\r\n\t\t\t\ta1= a[i];\r\n\t\t\t\tb1= b[i++];\r\n\t\t\t\tif(a1 !== b1){\r\n\t\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn a.length > b.length;\r\n\t\t}\r\n\t\t\r\n\t\treturn emptyAlign;\r\n\t}\r\n\t\r\n\t_filterOptions(){\r\n\t\tvar filterFunc = this.params.filterFunc || this._defaultFilterFunc,\r\n\t\tterm = this.input.value;\r\n\t\t\r\n\t\tif(term){\r\n\t\t\tthis.filtered = true;\r\n\t\t\t\r\n\t\t\tthis.data.forEach((item) => {\r\n\t\t\t\tthis._filterItem(filterFunc, term, item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.filtered = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.data;\r\n\t}\r\n\t\r\n\t_filterItem(func, term, item){\r\n\t\tvar matches = false;\r\n\t\t\r\n\t\tif(!item.group){\r\n\t\t\titem.visible = func(term, item.label, item.value, item.original);\r\n\t\t}else{\r\n\t\t\titem.options.forEach((option) => {\r\n\t\t\t\tif(this._filterItem(func, term, option)){\r\n\t\t\t\t\tmatches = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\titem.visible = matches;\r\n\t\t}\r\n\t\t\r\n\t\treturn item.visible;\r\n\t}\r\n\t\r\n\t_defaultFilterFunc(term, label, value, item){\r\n\t\tterm = String(term).toLowerCase();\r\n\t\t\r\n\t\tif(label !== null && typeof label !== \"undefined\"){\r\n\t\t\tif(String(label).toLowerCase().indexOf(term) > -1 || String(value).toLowerCase().indexOf(term) > -1){\r\n\t\t\t\treturn true;\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\t//////////////////////////////////////\r\n\t/////////// Display List /////////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_clearList(){\r\n\t\twhile(this.listEl.firstChild) this.listEl.removeChild(this.listEl.firstChild);\r\n\t\t\r\n\t\tthis.displayItems = [];\r\n\t}\r\n\t\r\n\t_buildList(data){\r\n\t\tthis._clearList();\r\n\t\t\r\n\t\tdata.forEach((option) => {\r\n\t\t\tthis._buildItem(option);\r\n\t\t});\r\n\t\t\r\n\t\tif(!this.displayItems.length){\r\n\t\t\tthis._addPlaceholder(this.params.placeholderEmpty);\r\n\t\t} \r\n\t}\r\n\t\r\n\t_buildItem(item){\r\n\t\tvar el = item.element,\r\n\t\tcontents;\r\n\t\t\r\n\t\tif(!this.filtered || item.visible){\r\n\t\t\t\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\r\n\t\t\t\tcontents = this.params.itemFormatter ? this.params.itemFormatter(item.label, item.value, item.original, el) : item.label;\r\n\t\t\t\t\r\n\t\t\t\tif(contents instanceof HTMLElement){\r\n\t\t\t\t\tel.appendChild(contents);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.innerHTML = contents;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-group\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-item\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tel.classList.add(\"tabulator-edit-list-group-level-\" + item.level);\r\n\t\t\t\t\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, this.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\t\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.addEventListener(\"click\", this._groupClick.bind(this, item));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.addEventListener(\"click\", this._itemClick.bind(this, item));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tel.addEventListener(\"mousedown\", this._preventBlur.bind(this));\r\n\t\t\t\t\r\n\t\t\t\titem.element = el;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t\tthis.listEl.appendChild(el);\r\n\t\t\t\r\n\t\t\tif(item.group){\r\n\t\t\t\titem.options.forEach((option) => {\r\n\t\t\t\t\tthis._buildItem(option);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayItems.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_showList(){\r\n\t\tvar startVis = this.popup && this.popup.isVisible();\r\n\t\t\r\n\t\tif(this.input.parentNode){\r\n\t\t\tif(this.params.autocomplete && this.input.value === \"\" && !this.params.listOnEmpty){\r\n\t\t\t\tif(this.popup){\r\n\t\t\t\t\tthis.popup.hide(true);\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setListWidth();\r\n\t\t\t\r\n\t\t\tif(!this.popup){\r\n\t\t\t\tthis.popup = this.edit.popup(this.listEl);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.popup.show(this.cell.getElement(), \"bottom\");\r\n\t\t\t\r\n\t\t\tif(!startVis){\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.popup.hideOnBlur(this._resolveValue.bind(this, true));\r\n\t\t\t\t}, 10);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_styleItem(item){\r\n\t\tif(item && item.element){\r\n\t\t\tif(item.selected){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}else{\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// User Interaction ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_itemClick(item, e){\r\n\t\te.stopPropagation();\r\n\t\t\r\n\t\tthis._chooseItem(item);\r\n\t}\r\n\t\r\n\t_groupClick(item, e){\r\n\t\te.stopPropagation();\r\n\t}\r\n\t\r\n\t\r\n\t//////////////////////////////////////\r\n\t////// Current Item Management ///////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_cancel(){\r\n\t\tthis.popup.hide(true);\r\n\t\tthis.actions.cancel();\r\n\t}\r\n\t\r\n\t_clearChoices(){\r\n\t\tthis.typing = true;\r\n\t\t\r\n\t\tthis.currentItems.forEach((item) => {\r\n\t\t\titem.selected = false;\r\n\t\t\tthis._styleItem(item);\r\n\t\t});\r\n\t\t\r\n\t\tthis.currentItems = [];\r\n\t\t\r\n\t\tthis.focusedItem = null;\r\n\t}\r\n\t\r\n\t_chooseItem(item, silent){\r\n\t\tvar index;\r\n\t\t\r\n\t\tthis.typing = false;\r\n\t\t\r\n\t\tif(this.params.multiselect){\r\n\t\t\tindex = this.currentItems.indexOf(item);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.currentItems.splice(index, 1);\r\n\t\t\t\titem.selected = false;\r\n\t\t\t}else{\r\n\t\t\t\tthis.currentItems.push(item);\r\n\t\t\t\titem.selected = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.input.value = this.currentItems.map(item => item.label).join(\",\");\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.currentItems = [item];\r\n\t\t\titem.selected = true;\r\n\t\t\t\r\n\t\t\tthis.input.value = item.label;\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis._resolveValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis._focusItem(item);\r\n\t}\r\n\t\r\n\t_resolveValue(blur){\r\n\t\tvar output, initialValue;\r\n\r\n\t\tif(this.popup){\r\n\t\t\tthis.popup.hide(true);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.multiselect){\r\n\t\t\toutput = this.currentItems.map(item => item.value);\r\n\t\t}else{\r\n\t\t\tif(blur && this.params.autocomplete && this.typing){\r\n\t\t\t\tif(this.params.freetext || (this.params.allowEmpty && this.input.value === \"\")){\r\n\t\t\t\t\toutput = this.input.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.actions.cancel();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.currentItems[0]){\r\n\t\t\t\t\toutput = this.currentItems[0].value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinitialValue = this.initialValues[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(initialValue === null || typeof initialValue === \"undefined\" || initialValue === \"\"){\r\n\t\t\t\t\t\toutput = initialValue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\toutput = this.params.emptyValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(output === \"\"){\r\n\t\t\toutput = this.params.emptyValue;\r\n\t\t}\r\n\t\t\r\n\t\tthis.actions.success(output);\r\n\t\t\r\n\t\tif(this.isFilter){\r\n\t\t\tthis.initialValues = output && !Array.isArray(output) ? [output] : output;\r\n\t\t\tthis.currentItems = [];\r\n\t\t}\r\n\t}\r\n\t\r\n}\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 date from './editors/date.js';\r\nimport time from './editors/time.js';\r\nimport datetime from './editors/datetime.js';\r\nimport select from './editors/select.js';\r\nimport list from './editors/list.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\tnumber:number,\r\n\trange:range,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tselect:select,\r\n\tlist:list,\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\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"hybrid\",\r\n\tvalue = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n\tinput = document.createElement(\"textarea\"),\r\n\tscrollHeight = 0;\r\n\r\n\t//create and style input\r\n\tinput.style.display = \"block\";\r\n\tinput.style.padding = \"2px\";\r\n\tinput.style.height = \"100%\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.whiteSpace = \"pre-wrap\";\r\n\tinput.style.resize = \"none\";\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\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\tinput.scrollHeight;\r\n\t\tinput.style.height = input.scrollHeight + \"px\";\r\n\t\tcell.getRow().normalizeHeight();\r\n\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\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\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tcell.getRow().normalizeHeight();\r\n\t\t\t},300);\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\tinput.addEventListener(\"keyup\", function(){\r\n\r\n\t\tinput.style.height = \"\";\r\n\r\n\t\tvar heightNow = input.scrollHeight;\r\n\r\n\t\tinput.style.height = heightNow + \"px\";\r\n\r\n\t\tif(heightNow != scrollHeight){\r\n\t\t\tscrollHeight = heightNow;\r\n\t\t\tcell.getRow().normalizeHeight();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\r\n\t\t\tcase 13:\r\n\t\t\t\tif(e.shiftKey && editorParams.shiftEnterSubmit){\r\n\t\t\t\t\tonChange(e);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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//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\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\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\t\tonChange();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\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\t\tif(vertNav == \"editor\"){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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\t\tonChange();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null;\r\n\t\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tfunction convertDate(value){\r\n\t\tvar newDatetime;\r\n\t\t\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\r\n\t\t\r\n\t\treturn newDatetime.toFormat(\"yyyy-MM-dd\");\r\n\t}\r\n\t\r\n\tinput.type = \"date\";\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.max){\r\n\t\tinput.setAttribute(\"max\", inputFormat ? convertDate(editorParams.max) : editorParams.max);\r\n\t}\r\n\r\n\tif(editorParams.min){\r\n\t\tinput.setAttribute(\"min\", inputFormat ? convertDate(editorParams.min) : editorParams.min);\r\n\t}\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\t\t\r\n\t\t\tcellValue = convertDate(cellValue);\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\t\t\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\t\t\t\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromFormat(String(value), \"yyyy-MM-dd\").toFormat(inputFormat);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \r\n\tnewDatetime;\r\n\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tinput.type = \"time\";\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\r\n\t\t\tif(DT.isDateTime(cellValue)){\r\n\t\t\t\tnewDatetime = cellValue;\r\n\t\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\r\n\t\t\t}else{\r\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tcellValue = newDatetime.toFormat(\"hh:mm\");\r\n\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromFormat(String(value), \"hh:mm\").toFormat(inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \r\n\tnewDatetime;\r\n\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tinput.type = \"datetime-local\";\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\r\n\t\t\tif(DT.isDateTime(cellValue)){\r\n\t\t\t\tnewDatetime = cellValue;\r\n\t\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\r\n\t\t\t}else{\r\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tcellValue = newDatetime.toFormat(\"yyyy-MM-dd\") + \"T\" + newDatetime.toFormat(\"hh:mm\");\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromISO(String(value)).toFormat(inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\r\n\tthis.deprecationMsg(\"The select editor has been deprecated, please use the new list editor\");\r\n\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\r\n\tthis.deprecationMsg(\"The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam\");\r\n\r\n\teditorParams.autocomplete = true;\r\n\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.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\t\tchangeValue(value + 1);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\t\tchangeValue(value - 1);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tsuccess(value);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tcancel();\r\n\t\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\t\te.preventDefault();\r\n\t\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tupdateValue();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tcancel();\r\n\t\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\ttrueValueSet = Object.keys(editorParams).includes(\"trueValue\"),\r\n\tfalseValueSet = Object.keys(editorParams).includes(\"falseValue\");\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 = trueValueSet ? value === editorParams.trueValue : (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\tvar checkedValue = input.checked;\r\n\r\n\t\tif(trueValueSet && checkedValue){\r\n\t\t\tcheckedValue = editorParams.trueValue;\r\n\t\t}else if(falseValueSet && !checkedValue){\r\n\t\t\tcheckedValue = editorParams.falseValue;\r\n\t\t}\r\n\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 checkedValue;\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 checkedValue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn checkedValue;\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overridden 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\t\t\r\n\t\tthis.editors = Edit.editors;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\t\t\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\t\t\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\t\t\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\t\t\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\t\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(\"cell-value-changed\", this.updateCellClass.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(\"row-layout\", this.rowEditableCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\t\t\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\t\r\n\t\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\t\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\t\t\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\t\t\t\t\t\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\t\t\t\t\t\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\t\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcellIsEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\t\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\t\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tupdateCellClass(cell){\r\n\t\tif(this.allowEdit(cell)) {\r\n\t\t\tcell.getElement().classList.add(\"tabulator-editable\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-editable\");\r\n\t\t}\r\n\t}\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\t\t\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\t\t\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\t\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnextCell = this.navigateLeft();\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findPrevEditableCell(prevRow, prevRow.cells.length);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnextCell = this.navigateRight();\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\t\t\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\t\t\t\t\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn nextCell;\r\n\t}\r\n\t\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\t\t\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\t\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn prevCell;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\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\t\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\t\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\trowEditableCheck(row){\r\n\t\trow.getCells().forEach((cell) => {\r\n\t\t\tif(cell.column.modules.edit && typeof cell.column.modules.edit.check === \"function\"){\r\n\t\t\t\tthis.updateCellClass(cell);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar config = {\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\t\t\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\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.definition.editor === true){\r\n\t\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\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(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\t\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\t\t\r\n\t\tthis.invalidEdit = false;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\t\t\t\r\n\t\t\tcellEl = cell.getElement();\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"edit-editor-clear\", cell, cancel);\r\n\t\t\t\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\t\t\t\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\t\t\t\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-editing\");\r\n\t\t\t\r\n\t\t\tcell.table.element.classList.remove(\"tabulator-editing\");\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\t\t\t\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\t\t\t\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\t\t\t\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\t\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\t\t\t\r\n\t\t\tthis.updateCellClass(cell);\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\t\t\t\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\t\t\t\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\t\t\t\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\t\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\t\t\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\t\t\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\t\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\t\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\t\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\t\t\t\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\t\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\t\t\t\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\t\t\t\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\t\t\t\t\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\t\r\n\tallowEdit(cell) {\r\n\t\tvar check = cell.column.modules.edit ? true : false;\r\n\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tif(cell.row.initialized){\r\n\t\t\t\t\t\tcheck = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\t\tcheck = !!cell.row.data[cell.column.modules.edit.check];\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tcheck = cell.column.modules.edit.check;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn check;\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\t//handle successful value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = self.chain(\"edit-success\", [cell, value], true, true);\r\n\t\t\t\t\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn valid === true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\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\t\t\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\t\t\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\t\t\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\t\t\t\r\n\t\t\tallowEdit = this.allowEdit(cell);\r\n\t\t\t\r\n\t\t\tif(allowEdit || forceEdit){\r\n\t\t\t\t\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t\t\r\n\t\t\t\tself.currentCell = cell;\r\n\t\t\t\t\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\t\t\t\t\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\t\t\t\t\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\t\t\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\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"cell-editing\", cell);\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\t\t\t\t\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\t\t\t\t\t\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-editing\");\r\n\t\t\t\t\t\tcell.table.element.classList.add(\"tabulator-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\t\t\t\t\t\t\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\t\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\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\t\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\t\t\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"edit-edited-clear\", cell);\r\n\t\t}\r\n\t\t\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\t\t\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 output 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\tgenerateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.generateTableElement(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\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\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\tvar visProp = column.definition[this.colVisProp];\r\n\r\n\t\tif(typeof visProp === \"function\"){\r\n\t\t\tvisProp = visProp.call(this.table, column.getComponent());\r\n\t\t}\r\n\r\n\t\treturn visProp !== false && (column.visible || (!column.visible && visProp));\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 depth\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\t\treturn this.config.rowGroups !== false;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\t\treturn this.config.columnCalcs !== false;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\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\t\tindent = row.level;\r\n\t\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\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\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t\t}\r\n\t\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\tgenerateTableElement(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\tlet rowEl;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\t\theaderEl.appendChild(this.generateHeaderElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\t\tbodyEl.appendChild(this.generateGroupElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\t\tbodyEl.appendChild(this.generateCalcElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\t\trowEl = this.generateRowElement(row, setup, styles);\r\n\r\n\t\t\t\t\tthis.mapElementStyles(((i % 2) && styles.evenRow) ? styles.evenRow : styles.oddRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\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\tgenerateHeaderElement(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\tgenerateGroupElement(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 = 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\tgenerateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.generateRowElement(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\tgenerateRowElement(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, i) => {\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\t\t\t\tcellStyle;\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\t\tvalue = value !== null ? JSON.stringify(value) : \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\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\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\tcellStyle = styles.styleCells && styles.styleCells[index] ? styles.styleCells[index] : styles.firstCell;\r\n\r\n\t\t\t\tif(cellStyle){\r\n\t\t\t\t\tthis.mapElementStyles(cellStyle, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\", \"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"text-align\"]);\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\tgenerateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.generateTableElement(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.generateHTMLTable(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\r\n\t\t//handle successfully 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\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\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\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t}else{\r\n\t\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\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\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 column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\ttype = filterFunc;\r\n\t\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\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\ttype = \"like\";\r\n\t\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\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t\t};\r\n\t\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};\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\tcolumn.modules.filter.value = value;\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\tcolumn.modules.filter.value = initialValue;\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;\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\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"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\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\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\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\t\treturn value !== true && value !== 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}else{\r\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\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}\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\tgetTable:() => {\r\n\t\t\t\t\t\treturn this.table;\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\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\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)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\t\tsuccess(editorElement.value);\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//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\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\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propagating 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//programmatically 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.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//programmatically 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(null, false, false);\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\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}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(true));\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(true), 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\tif (formatterParams.thousand !== false) {\r\n\t\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\t\twhile (rgx.test(integer)){\r\n\t\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t\t}\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\tfunction labelTraverse(path, data){\r\n\t\tvar item = path.shift(),\r\n\t\tvalue = data[item];\r\n\t\t\r\n\t\tif(path.length && typeof value === \"object\"){\r\n\t\t\treturn labelTraverse(path, value);\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = labelTraverse(formatterParams.labelField.split(this.table.options.nestedFieldSeparator), data);\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\t\tlabel = formatterParams.label;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tlabel = formatterParams.label(cell);\r\n\t\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\t\tvalue = formatterParams.url;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\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\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\t\tel.style.height = formatterParams.height;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\t\tel.style.width = formatterParams.width;\r\n\t\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\ttrueValueSet = Object.keys(formatterParams).includes(\"trueValue\"),\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((trueValueSet && value === formatterParams.trueValue) || (!trueValueSet && ((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;\r\n\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\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\tvar newDatetime;\r\n\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\treturn newDatetime.diff(date, unit).toHuman() + (suffix ? \" \" + 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\t\tcolor = colors;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tcolor = colors(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(colors)){\r\n\t\t\t\tvar unit = 100 / colors.length;\r\n\t\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tcolor = colors[index];\r\n\t\t\t\tbreak;\r\n\t\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.max ? formatterParams.max : 100,\r\n\tmin = formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor;\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\t\tcolor = formatterParams.color;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tcolor = formatterParams.color(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\t\tlet unit = 100 / formatterParams.color.length;\r\n\t\t\t\tlet index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tcolor = formatterParams.color[index];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tdefault:\r\n\t\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\t\tlegend = formatterParams.legend;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tlegend = formatterParams.legend(value);\r\n\t\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\t\tlegend = value;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\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\t\tlegendColor = formatterParams.legendColor;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\t\tlet unit = 100 / formatterParams.legendColor.length;\r\n\t\t\t\tlet index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\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.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\tvar content = document.createElement(\"span\");\r\n\tvar row = cell.getRow();\r\n\r\n\trow.watchPosition((position) => {\r\n\t\tcontent.innerText = position;\r\n\t});\r\n\t\r\n\treturn content;\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 el = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\t\r\n\tel.innerHTML = `\r\n \r\n \r\n\r\n\r\n\r\n \r\n`;\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\tcell.getTable().rowManager.adjustTableSize();\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\t\t\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\t\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\t\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\t\t\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\t\t\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\t\t\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\t\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\t\t\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\tconfig.formatter = formatter;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn config;\r\n\t}\r\n\t\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\t\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\t\t\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\t\t\t\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\t\t\t\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\tgetColumn:function(){\r\n\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t},\r\n\t\t\t\tgetTable:() => {\r\n\t\t\t\t\treturn this.table;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\t\t\t\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\t\t\t\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\t\r\n\t\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\t\t\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\t\t\t\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\t\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\t\t\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(cell.getComponent()) : formatter.params;\r\n\t\t\t\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\t\t\t\t\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\t\t\t\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\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\t\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\t\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\t\tformatter = Format.formatters[formatter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t//Custom formatter Function, do nothing\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\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.initializationMode = \"left\";\r\n\t\tthis.active = 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.active = false;\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(\"columns-loading\", this.reset.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"column-add\", this.reinitializeColumns.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.reinitializeColumns.bind(this));\r\n\t\t\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\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.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\treinitializeColumns(){\r\n\t\tthis.reset();\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t});\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\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}\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);\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.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.marginValue = leftMargin;\r\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\r\n\t\t\t\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\t\t\t\r\n\t\t\tcolumn.modules.frozen.marginValue = rightMargin;\r\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\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\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(){\t\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.reinitializeRows();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar visibleRows = this.table.rowManager.getVisibleRows(true);\r\n\t\tvar otherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\r\n\t\t\r\n\t\totherRows.forEach((row) =>{\r\n\t\t\trow.deinitialize();\r\n\t\t});\r\n\t\t\r\n\t\tvisibleRows.forEach((row) =>{\r\n\t\t\tif(row.type === \"row\"){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutRow(row){\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\tvar position;\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"sticky\";\r\n\r\n\t\t\tif(this.table.rtl){\r\n\t\t\t\tposition = column.modules.frozen.position === \"left\" ? \"right\" : \"left\";\r\n\t\t\t}else{\r\n\t\t\t\tposition = column.modules.frozen.position;\r\n\t\t\t}\r\n\t\t\r\n\t\t\telement.style[position] = column.modules.frozen.margin;\r\n\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\r\n\tadjustForScrollbar(width){\r\n\t\tif(this.rightColumns.length){\r\n\t\t\tthis.table.columnManager.getContentsElement().style.width = \"calc(100% - \" + width + \"px)\";\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\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"frozenRowsField\", \"id\"); //field to choose frozen rows by\r\n\t\tthis.registerTableOption(\"frozenRows\", false); //holder for frozen row identifiers\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.getContentsElement().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\r\n\t\tif(this.table.options.frozenRows){\r\n\t\t\tthis.subscribe(\"data-processed\", this.initializeRows.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRows(){\r\n\t\tthis.table.rowManager.getRows().forEach((row) => {\r\n\t\t\tthis.initializeRow(row);\r\n\t\t});\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar frozenRows = this.table.options.frozenRows,\r\n\t\trowType = typeof frozenRows;\r\n\r\n\t\tif(rowType === \"number\"){\r\n\t\t\tif(row.getPosition() && (row.getPosition() + this.rows.length) <= frozenRows){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}else if(rowType === \"function\"){\r\n\t\t\tif(frozenRows.call(this.table, row.getComponent())){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(frozenRows)){\r\n\t\t\tif(frozenRows.includes(row.data[this.options(\"frozenRowsField\")])){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}\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 output = 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\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.table.rowManager.adjustTableSize();\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\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 constraints\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(){\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\t\r\n\t\tif(this.calcs.top){\r\n\t\t\tthis.calcs.top.detachElement();\r\n\t\t\tthis.calcs.top.deleteCells();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.calcs.bottom){\r\n\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t}\r\n\t\t\r\n\t\t\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());\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\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(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\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\tif(this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\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(this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\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() == \"basic\" && !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.updateGroupRows(true);\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() == \"basic\" && !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.updateGroupRows(true);\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(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(component ? 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 Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\t\t\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\t\t\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\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\t\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\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\t\t\t\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\t\t\t\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\t\t\t\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\t\t\t\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\t\t\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\t\t\t\r\n\t\t\tthis.groupIDLookups = [];\r\n\t\t\t\r\n\t\t\tif(Array.isArray(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\t\t\t\t\t\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\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\t\t\t\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\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\t\t\t\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}else{\r\n\t\t\tthis.groupList = [];\r\n\t\t\tthis.groups = {};\r\n\t\t}\r\n\t}\r\n\t\r\n\trowSample(rows, prevValue){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar group = this.getGroups(false)[0];\r\n\t\t\t\r\n\t\t\tprevValue.push(group.getRows(false)[0]);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevValue;\r\n\t}\r\n\t\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\trows = rows.filter((row) => {\r\n\t\t\t\treturn row.type !== \"group\";\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\t\t}else{\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingIndex(row, index, top){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.assignRowToGroup(row);\r\n\t\t\t\r\n\t\t\tvar groupRows = row.modules.group.rows;\r\n\t\t\t\r\n\t\t\tif(groupRows.length > 1){\r\n\t\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\t\tif(top){\r\n\t\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\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\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn index;\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\t\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tthis.refreshData();\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\t\t\t\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\t\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\t\t\t\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\t\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\t\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ? this.getGroupedData() : this.getData();\r\n\t}\r\n\t\r\n\t\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\t\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\trowMoving(from, to, after){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tif(!after && to instanceof Group){\r\n\t\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\t\t\t\r\n\t\t\tif(toGroup === fromGroup){\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t\t}else{\r\n\t\t\t\tif(fromGroup){\r\n\t\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(this.table.options.groupBy && row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.updateGroupRows(true);\r\n\t\t}\t\r\n\t}\r\n\t\r\n\tcellUpdated(cell){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.reassignRowToGroup(cell.row);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\t\t\t\r\n\t\t\tthis.generateGroups(rows);\r\n\t\t\t\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\t\t\t\r\n\t\t\treturn this.updateGroupRows();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\t\t\r\n\t\treturn groupComponents;\r\n\t}\r\n\t\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\t\t\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\treturn groupComponents;\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.table.options.groupBy){\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}\r\n\t}\r\n\t\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\t\t\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\t\t\t\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\t\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\t\t\r\n\t\treturn groupListData;\r\n\t}\r\n\t\r\n\tgetGroupedData(){\r\n\t\t\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\t\r\n\t\tif(this.options(\"dataTree\")){\r\n\t\t\trow = this.table.modules.dataTree.getTreeParentRoot(row);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\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\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\t\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\t\t\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\t\t\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\t\t\t\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\t\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\t\t\r\n\t\toldGroups = oldGroups || [];\r\n\t\t\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\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\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\t\t\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\t\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\t\t\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\t\t\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\t\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;\r\n\t\t\t\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tsamePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\t\t\t\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\t\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\t\t\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\t\t\r\n\t\treturn groupPath;\r\n\t}\r\n\t\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\t\t\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tleft = left + \"px\";\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tgroup.scrollHeader(left);\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}\r\n\t}\r\n\t\r\n\tcheckBasicModeGroupHeaderWidth(){\r\n\t\tvar element = this.table.rowManager.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\t\t\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row, index) =>{\r\n\t\t\tthis.table.rowManager.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\t\t\t\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\t\t\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\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:from.getPosition(), posTo:to.getPosition(), 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()._getSelf().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\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\tif(this.table.originalElement.childNodes.length){\r\n\t\t\t\tthis.parseTable();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element.\");\r\n\t\t\t}\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\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [];\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 don't 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;\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\nimport array from './importers/array.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tarray:array,\r\n};","function csvImporter(input){\r\n\tvar data = [],\r\n\trow = 0, \r\n\tcol = 0,\r\n\tinQuote = false;\r\n \r\n\t//Iterate over each character\r\n\tfor (let index = 0; index < input.length; index++) {\r\n\t\tlet char = input[index], \r\n\t\tnextChar = input[index+1]; \r\n \r\n\t\t//Initialize empty row\r\n\t\tif(!data[row]){\r\n\t\t\tdata[row] = [];\r\n\t\t}\r\n\r\n\t\t//Initialize empty column\r\n\t\tif(!data[row][col]){\r\n\t\t\tdata[row][col] = \"\";\r\n\t\t}\r\n \r\n\t\t//Handle quotation mark inside string\r\n\t\tif (char == '\"' && inQuote && nextChar == '\"') { \r\n\t\t\tdata[row][col] += char; \r\n\t\t\tindex++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//Begin / End Quote\r\n\t\tif (char == '\"') { \r\n\t\t\tinQuote = !inQuote;\r\n\t\t\tcontinue;\r\n\t\t}\r\n \r\n\t\t//Next column (if not in quote)\r\n\t\tif (char == ',' && !inQuote) { \r\n\t\t\tcol++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//New row if new line and not in quote (CRLF) \r\n\t\tif (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n\t\t\tcol = 0; \r\n\t\t\trow++; \r\n\t\t\tindex++; \r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//New row if new line and not in quote (CR or LF) \r\n\t\tif ((char == '\\r' || char == '\\n') && !inQuote) { \r\n\t\t\tcol = 0;\r\n\t\t\trow++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n\r\n\t\t//Normal Character, append to column\r\n\t\tdata[row][col] += char;\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\nexport default csvImporter;","export default function(input){\r\n\ttry {\r\n\t\treturn JSON.parse(input);\r\n\t} catch(e) {\r\n\t\tconsole.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n\t\treturn Promise.reject();\r\n\t}\r\n}","function arrayImporter(input){\r\n\treturn input;\r\n}\r\n\r\nexport default arrayImporter;","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\tconstructor(table){\r\n\t\tsuper(table);\r\n \r\n\t\tthis.registerTableOption(\"importFormat\");\r\n\t\tthis.registerTableOption(\"importReader\", \"text\");\r\n\t}\r\n \r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n\t\tif(this.table.options.importFormat){\r\n\t\t\tthis.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n\t\t\tthis.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n\t\t}\r\n\t}\r\n\r\n\tloadDataCheck(data){\r\n\t\treturn this.table.options.importFormat && (typeof data === \"string\" || (Array.isArray(data) && data.length && Array.isArray(data)));\r\n\t}\r\n\r\n\tloadData(data, params, config, silent, previousData){\r\n\t\treturn this.importData(this.lookupImporter(), data)\r\n\t\t\t.then(this.structureData.bind(this))\r\n\t\t\t.catch((err) => {\r\n\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import data\");\r\n\t\t\t\treturn Promise.reject(err);\r\n\t\t\t});\r\n\t}\r\n\r\n\tlookupImporter(importFormat){\r\n\t\tvar importer;\r\n \r\n\t\tif(!importFormat){\r\n\t\t\timportFormat = this.table.options.importFormat;\r\n\t\t}\r\n \r\n\t\tif(typeof importFormat === \"string\"){\r\n\t\t\timporter = Import.importers[importFormat];\r\n\t\t}else{\r\n\t\t\timporter = importFormat;\r\n\t\t}\r\n\r\n\t\tif(!importer){\r\n\t\t\tconsole.error(\"Import Error - Importer not found:\", importFormat);\r\n\t\t}\r\n \r\n\t\treturn importer;\r\n\t}\r\n \r\n\timportFromFile(importFormat, extension){\r\n\t\tvar importer = this.lookupImporter(importFormat);\r\n \r\n\t\tif(importer){\r\n\t\t\treturn this.pickFile(extension)\r\n\t\t\t\t.then(this.importData.bind(this, importer))\r\n\t\t\t\t.then(this.structureData.bind(this))\r\n\t\t\t\t.then(this.setData.bind(this))\r\n\t\t\t\t.catch((err) => {\r\n\t\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import file\");\r\n\t\t\t\t\treturn Promise.reject(err);\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n \r\n\tpickFile(extensions){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar input = document.createElement(\"input\");\r\n\t\t\tinput.type = \"file\";\r\n\t\t\tinput.accept = extensions;\r\n \r\n\t\t\tinput.addEventListener(\"change\", (e) => {\r\n\t\t\t\tvar file = input.files[0],\r\n\t\t\t\treader = new FileReader();\r\n \r\n\t\t\t\tswitch(this.table.options.importReader){\r\n\t\t\t\t\tcase \"buffer\":\r\n\t\t\t\t\t\treader.readAsArrayBuffer(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"binary\":\r\n\t\t\t\t\t\treader.readAsBinaryString(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"url\":\r\n\t\t\t\t\t\treader.readAsDataURL(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"text\":\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treader.readAsText(file);\r\n\t\t\t\t}\r\n \r\n\t\t\t\treader.onload = (e) => {\r\n\t\t\t\t\tresolve(reader.result);\r\n\t\t\t\t};\r\n \r\n\t\t\t\treader.onerror = (e) => {\r\n\t\t\t\t\tconsole.warn(\"File Load Error - Unable to read file\");\r\n\t\t\t\t\treject();\r\n\t\t\t\t};\r\n\t\t\t});\r\n \r\n\t\t\tinput.click();\r\n\t\t});\r\n\t}\r\n \r\n\timportData(importer, fileContents){\r\n\t\tvar data = importer.call(this.table, fileContents);\r\n \r\n\t\tif(data instanceof Promise){\r\n\t\t\treturn data;\r\n\t\t}else{\r\n\t\t\treturn data ? Promise.resolve(data) : Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tstructureData(parsedData){\r\n\t\tvar data = [];\r\n \r\n\t\tif(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n\t\t\tif(this.table.options.autoColumns){\r\n\t\t\t\tdata = this.structureArrayToObject(parsedData);\r\n\t\t\t}else{\r\n\t\t\t\tdata = this.structureArrayToColumns(parsedData);\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\t\t}else{\r\n\t\t\treturn parsedData;\r\n\t\t}\r\n\t}\r\n\r\n\tstructureArrayToObject(parsedData){\r\n\t\tvar columns = parsedData.shift();\r\n\r\n\t\tvar data = parsedData.map((values) => {\r\n\t\t\tvar row = {};\r\n\r\n\t\t\tcolumns.forEach((key, i) => {\r\n\t\t\t\trow[key] = values[i];\r\n\t\t\t});\r\n\r\n\t\t\treturn row;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tstructureArrayToColumns(parsedData){\r\n\t\tvar data = [],\r\n\t\tcolumns = this.table.getColumns();\r\n\r\n\t\t//remove first row if it is the column names\r\n\t\tif(columns[0] && parsedData[0][0]){\r\n\t\t\tif(columns[0].getDefinition().title === parsedData[0][0]){\r\n\t\t\t\tparsedData.shift();\r\n\t\t\t}\r\n\t\t}\r\n \r\n\t\t//convert row arrays to objects\r\n\t\tparsedData.forEach((rowData) => {\r\n\t\t\tvar row = {};\r\n\r\n\t\t\trowData.forEach((value, index) => {\r\n\t\t\t\tvar column = columns[index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\trow[column.getField()] = value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tdata.push(row);\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n \r\n\tsetData(data){\r\n\t\treturn this.table.setData(data);\r\n\t}\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\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\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\trowMouseDown:\"row-mousedown\",\r\n\t\t\trowMouseUp:\"row-mouseup\",\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\tcellMouseDown:\"cell-mousedown\",\r\n\t\t\tcellMouseUp:\"cell-mouseup\",\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\theaderMouseDown:\"column-mousedown\",\r\n\t\t\theaderMouseUp:\"column-mouseup\",\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\tgroupMouseDown:\"group-mousedown\",\r\n\t\t\tgroupMouseUp:\"group-mouseup\",\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(\"headerMouseDown\");\r\n\t\tthis.registerColumnOption(\"headerMouseUp\");\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(\"cellMouseDown\");\r\n\t\tthis.registerColumnOption(\"cellMouseUp\");\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\tvar range;\r\n\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === cell){\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\trange = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(cell.getElement());\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNode(cell.getElement());\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\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\t\twatchers.tap = true;\r\n\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\t\twatchers.tap = null;\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t\t}, 1000);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\t\twatchers.tap = null;\r\n\t\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(watchers.tapDbl){\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t\t}else{\r\n\t\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\t\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;\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\t\tbinding.ctrl = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\t\tbinding.shift = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\t\tbinding.meta = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\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\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\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.nestedMenuBlock = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\tthis.rootPopup = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"menuContainer\", undefined); //deprecated\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"rowDblClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupDblClickMenu\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerDblClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenuIcon\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t\tthis.registerColumnOption(\"dblClickMenu\");\r\n\t\t\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.deprecatedOptionsCheck();\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\tdeprecatedOptionsCheck(){\r\n\t\tif(!this.deprecationCheck(\"menuContainer\", \"popupContainer\")){\r\n\t\t\tthis.table.options.popupContainer = this.table.options.menuContainer;\r\n\t\t}\r\n\t}\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\t\r\n\t\tif(this.table.options.rowDblClickMenu){\r\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadMenuEvent.bind(this, this.table.options.rowDblClickMenu));\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\t\r\n\t\tif(this.table.options.groupDblClickMenu){\r\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadMenuEvent.bind(this, this.table.options.groupDblClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar\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.headerDblClickMenu && !this.columnSubscribers.headerDblClickMenu){\r\n\t\t\tthis.columnSubscribers.headerDblClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerDblClickMenu\");\r\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickMenu);\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\t\r\n\t\tif(def.dblClickMenu && !this.columnSubscribers.dblClickMenu){\r\n\t\t\tthis.columnSubscribers.dblClickMenu = this.loadMenuTableCellEvent.bind(this, \"dblClickMenu\");\r\n\t\t\tthis.subscribe(\"cell-dblclick\", this.columnSubscribers.dblClickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar icon = column.definition.headerMenuIcon,\r\n\t\theaderMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-popup-button\");\r\n\t\t\r\n\t\tif(icon){\r\n\t\t\tif(typeof icon === \"function\"){\r\n\t\t\t\ticon = icon(column.getComponent());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(icon instanceof HTMLElement){\r\n\t\t\t\theaderMenuEl.appendChild(icon);\r\n\t\t\t}else{\r\n\t\t\t\theaderMenuEl.innerHTML = icon;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t}\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, e, component.getComponent()) : 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, parentPopup){\r\n\t\tvar touch = !(e instanceof MouseEvent),\t\t\r\n\t\tmenuEl = document.createElement(\"div\"),\r\n\t\tpopup;\r\n\t\t\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.rootPopup){\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\tif(this.rootPopup){\r\n\t\t\t\tthis.rootPopup.hide();\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rootPopup = popup = this.popup(menuEl);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpopup = parentPopup.child(menuEl);\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.loadMenu(e, component, item.menu, itemEl, popup);\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\tif(this.rootPopup){\r\n\t\t\t\tthis.rootPopup.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tpopup.show(parentEl || e);\r\n\t\t\r\n\t\tif(popup === this.rootPopup){\r\n\t\t\tthis.rootPopup.hideOnBlur(() => {\r\n\t\t\t\tthis.rootPopup = null;\r\n\t\t\t\t\r\n\t\t\t\tif(this.currentComponent){\r\n\t\t\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\t\t\tthis.currentComponent = null;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.currentComponent = component;\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent());\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 destination 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 && !column.isGroup){\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\tnextCol, 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\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 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\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.getContentsElement(),\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\theaderElement.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.getContentsElement(),\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 destination 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\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, group);\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;\r\n\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\trowEl = 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\trowEl = 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\tnextRow, 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\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 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\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\t\r\n\t\tthis.hoverElement.style.top = Math.min(yPos - this.startY, this.table.rowManager.element.scrollHeight - this.hoverElement.offsetHeight) + \"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 incoming 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\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\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 ? this.moving.getComponent() : undefined, 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\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\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\t\treturn this.connect(table, data.row);\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\t\treturn this.disconnect(table);\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\t\treturn this.dropComplete(table, data.row, data.success);\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 mutation 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\tthis.registerColumnOption(\"mutateLink\");\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(\"cell-value-changed\", this.mutateLink.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\t\tif(Mutator.mutators[value]){\r\n\t\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tmutator = value;\r\n\t\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\tmutateLink(cell){\r\n\t\tvar links = cell.column.definition.mutateLink;\r\n\r\n\t\tif(links){\r\n\t\t\tif(!Array.isArray(links)){\r\n\t\t\t\tlinks = [links];\r\n\t\t\t}\r\n\r\n\t\t\tlinks.forEach((link) => {\r\n\t\t\t\tvar linkCell = cell.row.getCell(link);\r\n\r\n\t\t\t\tif(linkCell){\r\n\t\t\t\t\tlinkCell.setValue(linkCell.getValue(), true, true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\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\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\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.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\t\t\tthis.subscribe(\"footer-redraw\", this.footerRedraw.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\tdisplayRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(displayRows.length){\r\n\t\t\t\tindex = displayRows[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(displayRows.length){\r\n\t\t\t\tindex = displayRows[displayRows.length - 1];\r\n\t\t\t\ttop = displayRows.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\r\n\t\tthis.dispatchExternal(\"pageSizeChanged\", this.size);\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\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){\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.footerAppend(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.footerAppend(this.element);\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\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\t\treturn this.setPage(1);\r\n\t\r\n\t\t\tcase \"prev\":\r\n\t\t\t\treturn this.previousPage();\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\t\treturn this.nextPage();\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\t\treturn this.setPage(this.max);\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.displayRows(-1);\r\n\t\tvar index = rows.indexOf(row);\r\n\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\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t\tthis.dispatchExternal(\"pageSizeChanged\", 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\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//clear previous cell contents\r\n\t\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\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif(content != null){\r\n\t\t\t\t\t\t\tconsole.warn(\"Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:\", content);\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\tcase \"undefined\":\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\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\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\t\tthis.refreshData();\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\t\treturn Promise.resolve();\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\t\tthis.dataChanging = true;\r\n\t\t\t\treturn this.reloadData(null)\r\n\t\t\t\t\t.finally(() => {\r\n\t\t\t\t\t\tthis.dataChanging = false;\r\n\t\t\t\t\t});\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\treturn this.reloadData(null, true);\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar 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\t\tif(this.page == 1){\r\n\t\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\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}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t\t}\r\n\t\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\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\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\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\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\t\tthis.nextPage();\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\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;\r\n","// read persistance 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\tretrievedData;\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\tretrievedData = this.retrieveData(\"page\");\r\n\r\n\t\t\t\tif(retrievedData){\r\n\t\t\t\t\tif(typeof retrievedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retrievedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retrievedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retrievedData.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\tretrievedData = this.retrieveData(\"group\");\r\n\r\n\t\t\t\tif(retrievedData){\r\n\t\t\t\t\tif(typeof retrievedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retrievedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retrievedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retrievedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retrievedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retrievedData.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(\"column-width\", 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 sorters, 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\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: (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:() => {\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.retrieveData(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//retrieve data from memory\r\n\tretrieveData(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\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\t\treturn col.field === subject.field;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\t\treturn col === subject;\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\t\tdata = this.parseColumns(this.table.columnManager.getColumns());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tdata = this.getGroupConfig();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\t\tdata = this.getPageConfig();\r\n\t\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\tkeys.push(\"visible\");\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\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\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}\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 = -10;\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 Popup extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextPopup\", false);\r\n\t\tthis.registerTableOption(\"rowClickPopup\", false);\r\n\t\tthis.registerTableOption(\"rowDblClickPopup\", false);\r\n\t\tthis.registerTableOption(\"groupContextPopup\", false);\r\n\t\tthis.registerTableOption(\"groupClickPopup\", false);\r\n\t\tthis.registerTableOption(\"groupDblClickPopup\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextPopup\");\r\n\t\tthis.registerColumnOption(\"headerClickPopup\");\r\n\t\tthis.registerColumnOption(\"headerDblClickPopup\");\r\n\t\tthis.registerColumnOption(\"headerPopup\");\r\n\t\tthis.registerColumnOption(\"headerPopupIcon\");\r\n\t\tthis.registerColumnOption(\"contextPopup\");\r\n\t\tthis.registerColumnOption(\"clickPopup\");\r\n\t\tthis.registerColumnOption(\"dblClickPopup\");\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"group\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\t\r\n\t}\r\n\t\r\n\tinitialize(){\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\r\n\t_componentPopupCall(component, contents, position){\r\n\t\tthis.loadPopupEvent(contents, null, component, position);\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextPopup){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickPopup){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadPopupEvent.bind(this, this.table.options.rowClickPopup));\r\n\t\t}\r\n\r\n\t\tif(this.table.options.rowDblClickPopup){\r\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadPopupEvent.bind(this, this.table.options.rowDblClickPopup));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextPopup){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickPopup){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadPopupEvent.bind(this, this.table.options.groupClickPopup));\r\n\t\t}\r\n\r\n\t\tif(this.table.options.groupDblClickPopup){\r\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadPopupEvent.bind(this, this.table.options.groupDblClickPopup));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextPopup && !this.columnSubscribers.headerContextPopup){\r\n\t\t\tthis.columnSubscribers.headerContextPopup = this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextPopup);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickPopup && !this.columnSubscribers.headerClickPopup){\r\n\t\t\tthis.columnSubscribers.headerClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerClickPopup\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickPopup);\r\n\t\t\r\n\t\t\r\n\t\t}if(def.headerDblClickPopup && !this.columnSubscribers.headerDblClickPopup){\r\n\t\t\tthis.columnSubscribers.headerDblClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerDblClickPopup\");\r\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickPopup);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerPopup){\r\n\t\t\tthis.initializeColumnHeaderPopup(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextPopup && !this.columnSubscribers.contextPopup){\r\n\t\t\tthis.columnSubscribers.contextPopup = this.loadPopupTableCellEvent.bind(this, \"contextPopup\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextPopup);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadPopupTableCellEvent.bind(this, \"contextPopup\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickPopup && !this.columnSubscribers.clickPopup){\r\n\t\t\tthis.columnSubscribers.clickPopup = this.loadPopupTableCellEvent.bind(this, \"clickPopup\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickPopup);\r\n\t\t}\r\n\r\n\t\tif(def.dblClickPopup && !this.columnSubscribers.dblClickPopup){\r\n\t\t\tthis.columnSubscribers.dblClickPopup = this.loadPopupTableCellEvent.bind(this, \"dblClickPopup\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.dblClickPopup);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderPopup(column){\r\n\t\tvar icon = column.definition.headerPopupIcon,\r\n\t\theaderPopupEl;\r\n\t\t\r\n\t\theaderPopupEl = document.createElement(\"span\");\r\n\t\theaderPopupEl.classList.add(\"tabulator-header-popup-button\");\r\n\r\n\t\tif(icon){\r\n\t\t\tif(typeof icon === \"function\"){\r\n\t\t\t\ticon = icon(column.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tif(icon instanceof HTMLElement){\r\n\t\t\t\theaderPopupEl.appendChild(icon);\r\n\t\t\t}else{\r\n\t\t\t\theaderPopupEl.innerHTML = icon;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\theaderPopupEl.innerHTML = \"⋮\";\r\n\t\t}\r\n\t\t\r\n\t\theaderPopupEl.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.loadPopupEvent(column.definition.headerPopup, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerPopupEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadPopupTableCellEvent(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.loadPopupEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadPopupTableColumnEvent(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.loadPopupEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadPopupEvent(contents, e, component, position){\r\n\t\tvar renderedCallback;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trenderedCallback = callback;\r\n\t\t}\r\n\t\t\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\tcontents = typeof contents == \"function\" ? contents.call(this.table, e, component.getComponent(), onRendered) : contents;\r\n\t\t\r\n\t\tthis.loadPopup(e, component, contents, renderedCallback, position);\r\n\t}\r\n\t\r\n\tloadPopup(e, component, contents, renderedCallback, position){\r\n\t\tvar touch = !(e instanceof MouseEvent),\r\n\t\tcontentsEl, popup;\r\n\t\t\r\n\t\tif(contents instanceof HTMLElement){\r\n\t\t\tcontentsEl = contents;\r\n\t\t}else{\r\n\t\t\tcontentsEl = document.createElement(\"div\");\r\n\t\t\tcontentsEl.innerHTML = contents;\r\n\t\t}\r\n\t\t\r\n\t\tcontentsEl.classList.add(\"tabulator-popup\");\r\n\r\n\t\tcontentsEl.addEventListener(\"click\", (e) =>{\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\tpopup = this.popup(contentsEl);\r\n\r\n\t\tif(typeof renderedCallback === \"function\"){\r\n\t\t\tpopup.renderCallback(renderedCallback);\r\n\t\t}\r\n\r\n\t\tif(e){\r\n\t\t\tpopup.show(e);\r\n\t\t}else{\r\n\t\t\tpopup.show(component.getElement(), position || \"center\");\r\n\t\t}\r\n\r\n\t\t\r\n\t\tpopup.hideOnBlur(() => {\r\n\t\t\tthis.dispatchExternal(\"popupClosed\", component.getComponent());\r\n\t\t});\r\n\r\n\r\n\r\n\t\tthis.dispatchExternal(\"popupOpened\", component.getComponent());\r\n\t}\r\n}\r\n\r\nPopup.moduleName = \"popup\";\r\n\r\nexport default Popup;\r\n","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.generateTable(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.generateTable(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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\t\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\t\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, \"cellsave\"));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this, \"cellsave\"));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this, \"rowsave\"));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this, \"rowsave\"));\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\t\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tversion;\r\n\t\t\r\n\t\tthis.currentVersion ++;\r\n\t\t\r\n\t\tversion = this.currentVersion;\r\n\t\t\r\n\t\tthis.unwatchData();\r\n\t\t\r\n\t\tthis.data = data;\r\n\t\t\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\t\t\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\t\t\t\tresult;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\t\r\n\t\t\t\t\tself.block(\"data-push\");\r\n\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\t\r\n\t\t\t\t\tresult = self.origFuncs.push.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-push\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\t\t\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\t\t\t\tresult;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-unshift\");\r\n\t\t\t\t\t\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\t\r\n\t\t\t\t\tresult = self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-unshift\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\t\t\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, result;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-shift\");\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.shift.call(data);\r\n\r\n\t\t\t\t\tself.unblock(\"data-shift\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\t\t\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, result;\r\n\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-pop\");\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.pop.call(data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-pop\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\t\t\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, result;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-splice\");\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-splice\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result ;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\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\t\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\t\t\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\twatchTreeChildren (row){\r\n\t\tvar self = this,\r\n\t\tchildField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\t\t\r\n\t\tif(childField){\r\n\t\t\t\r\n\t\t\torigFuncs.push = childField.push;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-push\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-push\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-unshift\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-unshift\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-shift\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-shift\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-pop\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-pop\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-splice\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-splice\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\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\t\r\n\trebuildTree(row){\r\n\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t}\r\n\t\r\n\twatchKey(row, data, key){\r\n\t\tvar self = this,\r\n\t\tprops = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\t\t\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(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"key\");\r\n\t\t\t\t\t\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\t\r\n\t\t\t\t\tself.unblock(\"key\");\r\n\t\t\t\t}\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\t\t\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\t\r\n\tblock(key){\r\n\t\tif(!this.blocked){\r\n\t\t\tthis.blocked = key;\r\n\t\t}\r\n\t}\r\n\t\r\n\tunblock(key){\r\n\t\tif(this.blocked === key){\r\n\t\t\tthis.blocked = false;\r\n\t\t}\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.latestX = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.initialNextColumn = null;\r\n\t\tthis.nextColumn = null;\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t\tthis.registerTableOption(\"resizableColumnFit\", false);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-rendered\", this.layoutColumnHeader.bind(this));\r\n\t}\r\n\t\r\n\tinitializeEventWatchers(){\r\n\t\tif(!this.initialized){\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-rendered\", this.layoutCellHandles.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.deInitializeComponent.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-height\", this.resizeHandle.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.columnLayoutUpdated.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-hide\", this.deInitializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.columnLayoutUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"column-width\", this.columnWidthUpdated.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-delete\", this.deInitializeComponent.bind(this));\r\n\t\t\tthis.subscribe(\"column-height\", this.resizeHandle.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.deInitializeComponent(cell);\r\n\t\t\tthis.initializeColumn(\"cell\", cell, cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tif(column.definition.resizable){\r\n\t\t\tthis.initializeEventWatchers();\r\n\t\t\tthis.deInitializeComponent(column);\r\n\t\t\tthis.initializeColumn(\"header\", column, column, column.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolumnLayoutUpdated(column){\r\n\t\tvar prev = column.prevColumn();\r\n\t\t\r\n\t\tthis.reinitializeColumn(column);\r\n\t\t\r\n\t\tif(prev){\r\n\t\t\tthis.reinitializeColumn(prev);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolumnWidthUpdated(column){\r\n\t\tif(column.modules.frozen){\r\n\t\t\tif(this.table.modules.frozenColumns.leftColumns.includes(column)){\r\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((col) => {\r\n\t\t\t\t\tthis.reinitializeColumn(col);\r\n\t\t\t\t});\r\n\t\t\t}else if(this.table.modules.frozenColumns.rightColumns.includes(column)){\r\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((col) => {\r\n\t\t\t\t\tthis.reinitializeColumn(col);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfrozenColumnOffset(column){\r\n\t\tvar offset = false;\r\n\r\n\t\tif(column.modules.frozen){\r\n\t\t\toffset = column.modules.frozen.marginValue; \r\n\r\n\t\t\tif(column.modules.frozen.position === \"left\"){\r\n\t\t\t\toffset += column.getWidth() - 3;\r\n\t\t\t}else{\r\n\t\t\t\tif(offset){\r\n\t\t\t\t\toffset -= 3;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn offset !== false ? offset + \"px\" : false;\r\n\t}\r\n\t\r\n\treinitializeColumn(column){\r\n\t\tvar frozenOffset = this.frozenColumnOffset(column);\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(cell.modules.resize && cell.modules.resize.handleEl){\r\n\t\t\t\tif(frozenOffset){\r\n\t\t\t\t\tcell.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcell.element.after(cell.modules.resize.handleEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(column.modules.resize && column.modules.resize.handleEl){\r\n\t\t\tif(frozenOffset){\r\n\t\t\t\tcolumn.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.element.after(column.modules.resize.handleEl);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(type, component, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable,\r\n\t\tconfig = {},\r\n\t\tnearestColumn = column.getLastColumn();\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\tconfig = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif((mode === true || mode == type) && this._checkResizability(nearestColumn)){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('span');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\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\tself.startColumn = column;\r\n\t\t\t\tself.initialNextColumn = self.nextColumn = nearestColumn.nextColumn();\r\n\t\t\t\tself._mouseDown(e, nearestColumn, handle);\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//resize column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", (e) => {\r\n\t\t\t\tvar oldWidth = nearestColumn.getWidth();\r\n\t\t\t\t\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tnearestColumn.reinitializeWidth(true);\r\n\t\t\t\t\r\n\t\t\t\tif(oldWidth !== nearestColumn.getWidth()){\r\n\t\t\t\t\tself.dispatch(\"column-resized\", nearestColumn);\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", nearestColumn.getComponent());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen){\r\n\t\t\t\thandle.style.position = \"sticky\";\r\n\t\t\t\thandle.style[column.modules.frozen.position] = this.frozenColumnOffset(column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconfig.handleEl = handle;\r\n\t\t\t\r\n\t\t\tif(element.parentNode && column.visible){\r\n\t\t\t\telement.after(handle);\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcomponent.modules.resize = config;\r\n\t}\r\n\t\r\n\tdeInitializeColumn(column){\r\n\t\tthis.deInitializeComponent(column);\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tthis.deInitializeComponent(cell);\r\n\t\t});\r\n\t}\r\n\t\r\n\tdeInitializeComponent(component){\r\n\t\tvar handleEl;\r\n\t\t\r\n\t\tif(component.modules.resize){\r\n\t\t\thandleEl = component.modules.resize.handleEl;\r\n\t\t\t\r\n\t\t\tif(handleEl && handleEl.parentElement){\r\n\t\t\t\thandleEl.parentElement.removeChild(handleEl);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tresizeHandle(component, height){\r\n\t\tif(component.modules.resize && component.modules.resize.handleEl){\r\n\t\t\tcomponent.modules.resize.handleEl.style.height = height;\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\t\t\r\n\t\tfunction mouseMove(e){\r\n\t\t\tvar x = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX,\r\n\t\t\tstartDiff = x - self.startX,\r\n\t\t\tmoveDiff = x - self.latestX,\r\n\t\t\tblockedBefore, blockedAfter;\r\n\t\t\t\r\n\t\t\tself.latestX = x;\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tstartDiff = -startDiff;\r\n\t\t\t\tmoveDiff = -moveDiff;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tblockedBefore = column.width == column.minWidth || column.width == column.maxWidth;\r\n\t\t\t\r\n\t\t\tcolumn.setWidth(self.startWidth + startDiff);\r\n\t\t\t\r\n\t\t\tblockedAfter = column.width == column.minWidth || column.width == column.maxWidth;\r\n\t\t\t\r\n\t\t\tif(moveDiff < 0){\r\n\t\t\t\tself.nextColumn = self.initialNextColumn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.options.resizableColumnFit && self.nextColumn && !(blockedBefore && blockedAfter)){\r\n\t\t\t\tlet colWidth = self.nextColumn.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(moveDiff > 0){\r\n\t\t\t\t\tif(colWidth <= self.nextColumn.minWidth){\r\n\t\t\t\t\t\tself.nextColumn = self.nextColumn.nextColumn();\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(self.nextColumn){\r\n\t\t\t\t\tself.nextColumn.setWidth(self.nextColumn.getWidth() - moveDiff);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.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\t\t\t\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.table.columnManager.verticalAlignHeaders();\r\n\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 interfering 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.latestX = self.startX;\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 interfering 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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.binding = false;\r\n\t\tthis.visibilityObserver = false;\r\n\t\tthis.resizeObserver = false;\r\n\t\tthis.containerObserver = false;\r\n\t\t\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\t\t\r\n\t\tthis.autoResize = false;\r\n\t\t\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.initialRedraw = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\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\t\t\t\r\n\t\t\tif(typeof IntersectionObserver !== \"undefined\" && typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeVisibilityObserver();\r\n\t\t\t\t\r\n\t\t\t\tthis.autoResize = true;\r\n\t\t\t\t\r\n\t\t\t\tthis.resizeObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\t\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tthis.redrawTable();\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\tthis.resizeObserver.observe(table.element);\r\n\t\t\t\t\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tthis.redrawTable();\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.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\t\t\t\t\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\t\t\t\t\t\ttable.columnManager.rerenderColumns(true);\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeVisibilityObserver(){\r\n\t\tthis.visibilityObserver = new IntersectionObserver((entries) => {\r\n\t\t\tthis.visible = entries[0].isIntersecting;\r\n\t\t\t\r\n\t\t\tif(!this.initialized){\r\n\t\t\t\tthis.initialized = true;\r\n\t\t\t\tthis.initialRedraw = !this.visible;\r\n\t\t\t}else{\r\n\t\t\t\tif(this.visible){\r\n\t\t\t\t\tthis.redrawTable(this.initialRedraw);\r\n\t\t\t\t\tthis.initialRedraw = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.visibilityObserver.observe(this.table.element);\r\n\t}\r\n\t\r\n\tredrawTable(force){\r\n\t\tif(this.initialized && this.visible){\r\n\t\t\tthis.table.columnManager.rerenderColumns(true);\r\n\t\t\tthis.table.redraw(force);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\t\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.resizeObserver){\r\n\t\t\tthis.resizeObserver.unobserve(this.table.element);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.visibilityObserver){\r\n\t\t\tthis.visibilityObserver.unobserve(this.table.element);\r\n\t\t}\r\n\t\t\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\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\t\t\t\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.generateCollapsedRowContent.bind(this));\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 working = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = this.table.modules.layout.getMode() == \"fitColumns\" ? this.table.columnManager.getFlexBaseWidth() : this.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (this.table.options.headerVisible ? this.table.columnManager.element.clientWidth : this.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 = this.columns[this.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.hideColumn(column);\r\n\t\t\t\t\tthis.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 = this.columns[this.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\tthis.showColumn(column);\r\n\t\t\t\t\t\t\tthis.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(!this.table.rowManager.activeRowsCount){\r\n\t\t\t\tthis.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.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 data = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach((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 && this.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\tgetTable:() => {\r\n\t\t\t\t\t\t\treturn this.table;\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(this.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;\r\n","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 whether 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\t\tthis.table.rowManager.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\tthis._rowSelectionChanged();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\t\tif(rowMatch){\r\n\t\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowMatch = this.table.rowManager.getRows(rows);\r\n\t\t\t\t\t\r\n\t\t\t\t\trowMatch.forEach((row) => {\r\n\t\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(rowMatch.length){\r\n\t\t\t\t\t\tthis._rowSelectionChanged();\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\t\t\tdefault:\r\n\t\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t\t}\r\n\t\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\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\tif(!DT.isDateTime(a)){\r\n\t\t\tif(format === \"iso\"){\r\n\t\t\t\ta = DT.fromISO(String(a));\r\n\t\t\t}else{\r\n\t\t\t\ta = DT.fromFormat(String(a), format);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(!DT.isDateTime(b)){\r\n\t\t\tif(format === \"iso\"){\r\n\t\t\t\tb = DT.fromISO(String(b));\r\n\t\t\t}else{\r\n\t\t\t\tb = DT.fromFormat(String(b), format);\r\n\t\t\t}\r\n\t\t}\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\t\tif(params.locale){\r\n\t\t\t\t\tlocale = this.langLocale();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\t\tlocale = params.locale;\r\n\t\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 type = params.type || \"length\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\t\tvar result;\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\t\tresult = value.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\t\tresult = value.reduce(function(c, d){\r\n\t\t\t\t\treturn c + d;\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\t\tresult = Math.max.apply(null, value) ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\t\tresult = Math.min.apply(null, value) ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\t\tresult = value.reduce(function(c, d){\r\n\t\t\t\t\treturn c + d;\r\n\t\t\t\t}) / value.length;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\temptyAlign = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\treturn calc(b) - calc(a);\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\t\tthis.registerTableOption(\"headerSortClickElement\", \"header\"); //element which triggers sort when clicked\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\tinitialize(){\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\ttableBuilt(){\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\tremoteSortParams(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\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tsorter = column.definition.sorter;\r\n\t\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\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tswitch(this.table.options.headerSortClickElement){\r\n\t\t\t\tcase \"icon\":\r\n\t\t\t\t\tarrowEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tswitch(this.table.options.headerSortElement){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault:\r\n\t\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\tthis.setColumnHeaderSortIcon(column, \"none\");\r\n\r\n\t\t\t//sort on click\r\n\t\t\t(this.table.options.headerSortClickElement === \"icon\" ? arrowEl : colEl).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\t\tdir = \"desc\";\r\n\t\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\t\tdir = \"asc\";\r\n\t\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\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\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\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push(match);\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(null, false, false);\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\t\tsorter = \"string\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t\t}else{\r\n\t\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\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\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\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;\r\n\r\n\t\t\t\tif(item.column){\r\n\t\t\t\t\tsortObj = item.column.modules.sort;\r\n\r\n\t\t\t\t\tif(sortObj){\r\n\r\n\t\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t\t}\r\n\r\n\t\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\t\tsortListActual.push(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t\t}\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((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\tthis.setColumnHeaderSortIcon(column, \"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 === \"asc\" ? \"ascending\" : \"descending\");\r\n\t\tthis.setColumnHeaderSortIcon(column, dir);\r\n\t}\r\n\r\n\tsetColumnHeaderSortIcon(column, dir){\r\n\t\tvar sortEl = column.modules.sort.element,\r\n\t\tarrowEl;\r\n\r\n\t\tif(column.definition.headerSort && typeof this.table.options.headerSortElement === \"function\"){\r\n\t\t\twhile(sortEl.firstChild) sortEl.removeChild(sortEl.firstChild);\r\n\r\n\t\t\tarrowEl = this.table.options.headerSortElement.call(this.table, column.getComponent(), dir);\r\n\t\t\t\r\n\t\t\tif(typeof arrowEl === \"object\"){\r\n\t\t\t\tsortEl.appendChild(arrowEl);\r\n\t\t\t}else{\r\n\t\t\t\tsortEl.innerHTML = arrowEl;\r\n\t\t\t}\r\n\t\t}\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;\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;","import Module from '../../core/Module.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nclass Tooltip extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.tooltipSubscriber = null,\r\n\t\tthis.headerSubscriber = null,\r\n\t\t\r\n\t\tthis.timeout = null;\r\n\t\tthis.popupInstance = null;\r\n\t\t\r\n\t\tthis.registerTableOption(\"tooltipGenerationMode\", undefined); //deprecated\r\n\t\tthis.registerTableOption(\"tooltipDelay\", 300); \r\n\t\t\r\n\t\tthis.registerColumnOption(\"tooltip\");\r\n\t\tthis.registerColumnOption(\"headerTooltip\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.deprecatedOptionsCheck();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tdeprecatedOptionsCheck(){\r\n\t\tthis.deprecationCheckMsg(\"tooltipGenerationMode\", \"This option is no longer needed as tooltips are always generated on hover now\");\r\n\t}\t\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.headerTooltip && !this.headerSubscriber){\r\n\t\t\tthis.headerSubscriber = true;\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-mousemove\", this.mousemoveCheck.bind(this, \"headerTooltip\"));\r\n\t\t\tthis.subscribe(\"column-mouseout\", this.mouseoutCheck.bind(this, \"headerTooltip\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition.tooltip && !this.tooltipSubscriber){\r\n\t\t\tthis.tooltipSubscriber = true;\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-mousemove\", this.mousemoveCheck.bind(this, \"tooltip\"));\r\n\t\t\tthis.subscribe(\"cell-mouseout\", this.mouseoutCheck.bind(this, \"tooltip\"));\r\n\t\t}\r\n\t}\r\n\t\r\n\tmousemoveCheck(action, e, component){\r\n\t\tvar tooltip = action === \"tooltip\" ? component.column.definition.tooltip : component.definition.headerTooltip;\r\n\t\t\r\n\t\tif(tooltip){\r\n\t\t\tthis.clearPopup();\r\n\t\t\tthis.timeout = setTimeout(this.loadTooltip.bind(this, e, component, tooltip), this.table.options.tooltipDelay);\r\n\t\t}\r\n\t}\r\n\r\n\tmouseoutCheck(action, e, component){\r\n\t\tif(!this.popupInstance){\r\n\t\t\tthis.clearPopup();\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearPopup(action, e, component){\r\n\t\tclearTimeout(this.timeout);\r\n\t\tthis.timeout = null;\r\n\t\t\r\n\t\tif(this.popupInstance){\r\n\t\t\tthis.popupInstance.hide();\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadTooltip(e, component, tooltip){\r\n\t\tvar contentsEl, renderedCallback, coords;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trenderedCallback = callback;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof tooltip === \"function\"){\r\n\t\t\ttooltip = tooltip(e, component.getComponent(), onRendered);\r\n\t\t}\r\n\t\t\r\n\t\tif(tooltip instanceof HTMLElement){\r\n\t\t\tcontentsEl = tooltip;\r\n\t\t}else{\r\n\t\t\tcontentsEl = document.createElement(\"div\");\r\n\t\t\t\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(component instanceof Cell){\r\n\t\t\t\t\ttooltip = component.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(component.definition.field){\r\n\t\t\t\t\t\tthis.langBind(\"columns|\" + component.definition.field, (value) => {\r\n\t\t\t\t\t\t\tcontentsEl.innerHTML = tooltip = value || component.definition.title;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\ttooltip = component.definition.title;\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\tcontentsEl.innerHTML = tooltip;\r\n\t\t}\r\n\t\t\r\n\t\tif(tooltip || tooltip === 0 || tooltip === false){\r\n\t\t\tcontentsEl.classList.add(\"tabulator-tooltip\");\r\n\r\n\t\t\tcontentsEl.addEventListener(\"mousemove\", e => e.preventDefault());\r\n\t\t\t\r\n\t\t\tthis.popupInstance = this.popup(contentsEl);\r\n\t\t\t\r\n\t\t\tif(typeof renderedCallback === \"function\"){\r\n\t\t\t\tthis.popupInstance.renderCallback(renderedCallback);\r\n\t\t\t}\r\n\r\n\t\t\tcoords = this.popupInstance.containerEventCoords(e);\r\n\t\t\t\r\n\t\t\tthis.popupInstance.show(coords.x + 15, coords.y + 15).hideOnBlur(() => {\r\n\t\t\t\tthis.dispatchExternal(\"TooltipClosed\", component.getComponent());\r\n\t\t\t\tthis.popupInstance = null;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"TooltipOpened\", component.getComponent());\r\n\t\t}\r\n\t}\r\n}\r\n\r\nTooltip.moduleName = \"tooltip\";\r\n\r\nexport default Tooltip;\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\r\n\t\tvalue = Number(value);\r\n\r\n\t\treturn !isNaN(value) && 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\t\r\n\t\tvalue = Number(value);\r\n\r\n\t\treturn !isNaN(value) && 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\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn 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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.invalidCells = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\t\t\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\t\t\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\t\t\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\t\t\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\t\r\n\t\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\t\r\n\t\tthis.subscribe(\"edit-success\", this.editValidate.bind(this));\r\n\t\tthis.subscribe(\"edit-editor-clear\", this.editorClear.bind(this));\r\n\t\tthis.subscribe(\"edit-edited-clear\", this.editedClear.bind(this));\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Event Handling //////////\r\n\t///////////////////////////////////\r\n\t\r\n\teditValidate(cell, value, previousValue){\r\n\t\tvar valid = this.table.options.validationMode !== \"manual\" ? this.validate(cell.column.modules.validate, cell, value) : true;\r\n\t\t\r\n\t\t// allow time for editor to make render changes then style cell\r\n\t\tif(valid !== true){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\tthis.dispatchExternal(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn valid;\r\n\t}\r\n\t\r\n\teditorClear(cell, cancelled){\r\n\t\tif(cancelled){\r\n\t\t\tif(cell.column.modules.validate){\r\n\t\t\t\tthis.cellValidate(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t}\r\n\t\r\n\teditedClear(cell){\r\n\t\tif(cell.modules.validate){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? (cell.modules.validate.invalid || true) : true;\r\n\t}\r\n\t\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(this.cellValidate(cell) !== true){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\t\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\t\t\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(this.cellValidate(cell) !== true){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\t\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\t\t\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\t\t\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\t\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\t\t\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\t\t\t\r\n\t\t\tvar valid = row.validate();\r\n\t\t\t\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\t\t\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\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\t\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\t\t\r\n\t\tif(column.definition.validator){\r\n\t\t\t\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\t\t\t\t\t\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\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\t\t\t\t\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\t\t\t\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\t\t\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tpos = value.indexOf(':');\r\n\t\t\t\r\n\t\t\t\tif(pos > -1){\r\n\t\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttype = value;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\treturn this._buildValidator(type, params);\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\treturn this._buildValidator(value);\r\n\t\t\t\r\n\t\t\tcase \"object\":\r\n\t\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_buildValidator(type, params){\r\n\t\t\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\t\t\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\t\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tfailedValidators = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\t\t\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\tfailedValidators.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\t\t\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\t\t\r\n\t\tif(!failedValidators.length){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t\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 = failedValidators;\r\n\t\t\t\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\t\t\t\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\t\t\r\n\t\treturn failedValidators.length ? failedValidators : true;\r\n\t}\r\n\t\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\t\t\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\t\t\t\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\t\t\t\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;\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;"],"names":["CoreFeature","constructor","table","this","reloadData","data","silent","columnsChanged","dataLoader","load","undefined","langText","modules","localize","getText","arguments","langBind","bind","langLocale","getLocale","commsConnections","comms","getConnections","commsSend","send","layoutMode","layout","getMode","layoutRefresh","force","subscribe","eventBus","unsubscribe","subscribed","key","subscriptionChange","dispatch","chain","confirm","dispatchExternal","externalEvents","subscribedExternal","subscriptionChangeExternal","options","setOption","value","deprecationCheck","oldOption","newOption","deprecationAdvisor","check","deprecationCheckMsg","msg","checkMsg","deprecationMsg","module","ColumnComponent","column","_column","type","Proxy","get","target","name","receiver","componentFunctionBinder","handle","getElement","getDefinition","getField","getTitleDownload","getCells","cells","forEach","cell","push","getComponent","isVisible","visible","show","isGroup","columns","hide","toggle","delete","getSubColumns","output","length","getParentColumn","parent","Column","_getSelf","scrollTo","columnManager","scrollToColumn","getTable","move","to","after","toColumn","findColumn","moveColumn","console","warn","getNextColumn","nextCol","nextColumn","getPrevColumn","prevCol","prevColumn","updateDefinition","updates","getWidth","setWidth","width","result","reinitializeWidth","rerenderColumns","title","field","hozAlign","vertAlign","minWidth","maxWidth","maxInitialWidth","cssClass","variableHeight","headerVertical","headerHozAlign","headerWordWrap","editableTitle","CellComponent","_cell","getValue","getOldValue","getInitialValue","initialValue","getRow","row","getData","getColumn","setValue","mutate","restoreOldValue","setValueActual","restoreInitialValue","checkHeight","Cell","super","element","oldValue","height","component","loaded","build","generateElement","_configureCell","getFieldValue","document","createElement","className","setAttribute","style","textAlign","display","alignItems","top","bottom","middle","justifyContent","left","right","center","definition","split","classList","add","_generateContents","val","innerHTML","Node","firstChild","removeChild","appendChild","cellRendered","containerOnly","layoutElement","setValueProcessData","cellEdited","call","rowManager","changed","setFieldValue","widthStyled","clearWidth","offsetWidth","setMinWidth","minWidthStyled","setMaxWidth","maxWidthStyled","reinitializeHeight","clearHeight","setHeight","heightStyled","getHeight","offsetHeight","redrawBlock","parentNode","deleteCell","calcs","getIndex","getCellIndex","def","contentElement","titleHolderElement","titleElement","groupElement","createGroupElement","fieldStructure","titleDownload","titleFormatterRendered","mapDefinitions","setField","widthFixed","i","newCol","attachColumn","checkColumnVisibility","registerColumnField","_initialize","el","columnHeaderVertAlign","defaults","columnDefaults","optionsList","generate","defaultOptionList","checkDefinition","Object","keys","indexOf","nestedFieldSeparator","_getNestedData","_getFlatData","_setNestedData","_setFlatData","registerColumnPosition","reRegisterPosition","_buildColumnHeaderContent","_buildGroupHeader","_buildColumnHeader","parseInt","_buildColumnHeaderTitle","addEventListener","e","stopPropagation","focus","text","_formatColumnHeaderTitle","contents","dataObj","structure","columnRendered","verticalAlign","alignment","parentHeight","getGroupElement","clientHeight","getHeadersElement","minHeight","clearVerticalAlign","paddingTop","getFirstColumn","getLastColumn","getColumns","traverse","concat","getTopColumn","updateBranches","colDefs","responsiveToggle","verticalAlignHeaders","matchChildWidths","childWidth","child","index","splice","setWidthActual","isNaN","Math","floor","clientWidth","max","min","checkCellHeights","rows","heightInitialized","offsetParent","clearCellHeight","calcHeight","setCellHeight","ceil","getBoundingClientRect","Promise","resolve","reject","cellCount","deregisterColumn","generateCell","findColumnIndex","_nextVisibleColumn","getColumnByIndex","_prevVisibleColumn","fitToData","setTo","error","assign","addColumn","then","defaultOptions","Helpers","static","box","window","pageYOffset","documentElement","clientTop","pageXOffset","clientLeft","obj","clone","list","objectProto","__proto__","arrayProto","Array","isArray","match","copy","subject","findIndex","item","unshift","deepClone","OptionsList","msgType","registeredDefaults","register","option","userOptions","debugInvalidOptions","hasOwnProperty","Renderer","elementVertical","elementHorizontal","tableElement","verticalFillMode","initialize","clearRows","clearColumns","reinitializeColumnWidths","renderRows","renderColumns","rerenderRows","callback","update","blockRedraw","renderRowCells","rerenderRowCells","scrollColumns","dir","scrollRows","resize","scrollToRow","scrollToRowNearestTop","visibleRows","includingBuffer","getDisplayRows","styleRow","rowEl","remove","clear","render","rerender","scrollToRowPosition","position","ifVisible","rowIndex","offset","scrollToRowIfVisible","elVisible","elOffset","scrollHeight","scrollTop","offsetTop","BasicHorizontal","VirtualDomHorizontal","leftCol","rightCol","scrollLeft","vDomScrollPosLeft","vDomScrollPosRight","vDomPadLeft","vDomPadRight","fitDataColAvg","windowBuffer","initialized","isFitData","compatibilityCheck","layoutCheck","vertScrollListen","startsWith","clearVisRowCache","dataChange","scroll","calcWindowBuffer","buffer","columnsByIndex","old","cols","colPos","config","frozen","leftPos","rightPos","fitDataCheck","vdomHoz","paddingLeft","paddingRight","reinitChanged","reinitializeRows","initializeRow","reinitializeRow","deinitialize","change","generateCells","colEnd","col","getVisibleRows","otherRows","getRows","filter","includes","diff","abs","addColRight","removeColLeft","addColLeft","removeColRight","colPositionAdjust","start","end","changes","working","getCell","insertBefore","nextSibling","fitDataColActualWidthCheck","ex","message","newWidth","widthDiff","frozenColumns","leftColumns","appendCell","rightColumns","ColumnManager","blockHozScrollEvent","headersElement","contentsElement","columnsByField","defaultColumnOptions","redrawBlockUpdate","renderer","initializeRenderer","createHeadersElement","createHeaderContentsElement","createHeaderElement","scrollHorizontal","padVerticalScrollbar","rtl","marginLeft","marginRight","renderClass","renderers","virtual","RendererVirtualDomHorizontal","basic","RendererBasicHorizontal","renderHorizontal","headerVisible","getContentsElement","generateColumnsFromRowData","sorter","definitions","autoColumnsDefinitions","find","setColumns","_addColumn","_reIndexColumns","redraw","before","nextToColumn","colEl","topColumn","parentIndex","nextEl","adjustTableSize","HTMLElement","getColumnByField","getColumnsByFieldRoot","root","matches","getFirstVisibleColumn","getRealColumns","getDefinitions","active","getDefinitionTree","getComponents","structured","from","moveColumnActual","reinitialize","_moveColumnInArray","updateRows","toIndex","fromIndex","adjust","scrollToColumnPosition","scrollToColumnIfVisible","offsetLeft","scrollWidth","getFlexBaseWidth","totalWidth","fixedWidth","colWidth","restoreRedraw","resetScroll","footerManager","RowComponent","_row","transform","getPosition","watchPosition","moveToRow","updateData","normalizeHeight","reformat","getNextRow","nextRow","getPrevRow","prevRow","Row","manualHeight","outerHeight","positionWatchers","created","setData","create","detachElement","deleteCells","rowFormatter","deinitializeHeight","children","maxHeight","rowHeight","resizableRows","updatedData","newRowData","tempData","JSON","parse","attrname","findCell","nextDisplayRow","prevDisplayRow","toRow","findRow","moveRowActual","refreshActiveData","deleteActual","detachModules","deleteRow","wipe","isDisplayed","setPosition","getGroup","group","BasicVertical","visibility","onlyGroupHeaders","rowTop","VirtualDomVertical","vDomRowHeight","vDomTop","vDomBottom","vDomScrollPosTop","vDomScrollPosBottom","vDomTopPad","vDomBottomPad","vDomMaxRenderChain","vDomWindowBuffer","vDomWindowMinTotalRows","vDomWindowMinMarginRows","vDomTopNewRows","vDomBottomNewRows","paddingBottom","_virtualRenderFill","topRow","topOffset","_showPlaceholder","topDiff","bottomDiff","margin","_addTopRow","vDomScrollHeight","_removeBottomRow","_addBottomRow","_removeTopRow","renderVerticalBuffer","topEdge","bottomEdge","topFound","bottomRow","slice","forceMove","holder","topPad","rowsHeight","heightOccupied","topPadHeight","rowsCount","containerHeight","fillableSpace","addedRows","paddingAdjust","_quickNormalizeRowHeight","removableRows","RowManager","createHolderElement","createTableElement","heightFixer","placeholder","placeholderContents","firstRender","renderMode","fixedHeight","activeRowsPipeline","activeRows","activeRowsCount","displayRows","displayRowsCount","redrawBlockRestoreConfig","redrawBlockRenderInPosition","dataPipeline","displayPipeline","scrollbarWidth","initializePlaceholder","getTableElement","leftDir","topDir","_positionPlaceholder","getRowFromDataObject","getRowFromPosition","renderInPosition","pagination","_setDataActual","reRenderInPosition","autoColumns","_wipeElements","allIndex","activeIndex","setActiveRows","displayRowIterator","displayIndex","regenerateRowPositions","addRow","pos","addRowActual","addRows","findAddRowPos","reverse","_clearPlaceholder","addRowPos","chainResult","moveRow","moveRowInArray","clearData","getRowIndex","findRowIndex","getDisplayRowIndex","rowOnly","getDataCount","registerDataPipelineHandler","handler","priority","sort","a","b","registerDisplayPipelineHandler","skipStage","stage","cascadeOrder","destroyed","refreshPipelines","renderTable","layoutColumnsOnNewData","resetDisplayRows","setDisplayRows","viewable","scrollBarCheck","RendererVirtualDomVertical","RendererBasicVertical","renderVertical","getRenderMode","_clearTable","renderEmptyScroll","initialHeight","otherHeight","external","tableWidth","browser","event","createEvent","initEvent","dispatchEvent","Event","FooterManager","containerElement","createContainerElement","initializeElement","footerElement","querySelector","append","activate","prepend","deactivate","InteractionManager","abortClasses","previousTargets","listeners","componentMap","pseudoTrackers","subscriber","pseudoTracking","buildListenerMap","bindSubscriptionWatchers","listenerMap","listener","components","bindPseudoEvents","pseudoMouseEnter","pseudoMouseLeave","leaveList","linkedKeys","links","values","comp","subscriptionChanged","clearWatchers","added","updateEventListeners","track","removeEventListener","path","composedPath","targets","findTargets","bindComponents","triggerEvents","elTargets","targetMatches","previousTarget","closest","ComponentFunctionBinder","bindings","funcName","debugInvalidComponentFuncs","DataLoader","requestOrder","loading","params","replace","requestNo","alertLoader","mapParams","dataSendParams","response","objectInvert","dataReceiveParams","rowData","clearAlert","catch","alertError","setTimeout","dataLoaderErrorTimeout","finally","map","blockActiveLoad","alertManager","alert","dataLoaderLoading","dataLoaderError","ExternalEventBus","debug","events","subscriptionNotifiers","_debugDispatch","_dispatch","_notifySubscriptionChange","notifiers","args","shift","callResult","apply","log","InternalEventBus","_debugChain","_chain","_debugConfirm","_confirm","fallback","confirmed","DeprecationAdvisor","_warnUser","TableRegistry","tables","query","results","querySelectorAll","matchElement","Tabulator","lookupTable","Popup","container","_lookupContainer","reversedX","childPopup","blurable","blurCallback","blurEventsBound","renderedCallback","hideable","blurEvent","escEvent","_escapeCheck","destroyBinding","tableDestroyed","popupContainer","_checkContainerIsParent","body","renderCallback","containerEventCoords","touch","MouseEvent","x","touches","pageX","y","pageY","parentOffset","elementPositionCoords","containerOffset","origin","parentEl","coords","_fitToScreen","hideOnBlur","keyCode","blockHide","restoreHide","Module","_handler","registerTableOption","registerColumnOption","registerTableFunction","func","initGuard","registerComponentFunction","registerDataHandler","registerDisplayHandler","lookupIndex","refreshData","footerAppend","footerPrepend","footerRemove","popup","menuEl","menuContainer","content","forced","responsiveLayout","modExists","fitData","fitDataFill","fitDataGeneral","fitDataTable","fitDataStretch","colsWidth","gap","lastCol","responsive","fitColumns","flexColWidth","overflowWidth","flexWidth","flexGrowUnits","flexColumns","fixedShrinkColumns","flexShrinkUnits","gapFill","calcWidth","scaleColumns","freeSpace","shrinkCols","oversizeCols","oversizeSpace","remainingSpace","nextColWidth","remainingFlexGrowUnits","changeUnits","undersizeCols","calcGrow","widthGrow","calcShrink","widthShrink","Layout","mode","modes","dataChanged","moduleName","defaultModes","Localize","locale","lang","langList","langs","headerFilterPlaceholder","setHeaderFilterPlaceholder","installLang","setLocale","getLang","default","headerFilters","setHeaderFilterColumnPlaceholder","_setLangProp","desiredLocale","navigator","language","toLowerCase","prefix","traverseLang","trans","prop","_executeBindings","pathArray","_getLangElement","level","rootPath","binding","groups","items","page_size","page_title","first","first_title","last","last_title","prev","prev_title","next","next_title","all","counter","showing","of","pages","Comms","receive","selectors","connections","con","action","connection","tableComms","commsReceived","ModuleBinder","tabulator","bindStaticFunctionality","bindModules","coreModules","moduleBindings","extendModule","property","source","registerModule","mod","registerModuleBinding","findTable","prototype","orderedStartMods","orderedEndMods","unOrderedMods","moduleCore","modulesCore","moduleInitOrder","modulesRegular","core","mods","Alert","_createAlertElement","msgElement","_createMsgElement","_typeClass","interactionMonitor","browserSlow","browserMobile","originalElement","initializeCoreSystems","_create","_clearObjectPointers","_mapDeprecatedFunctionality","debugEventsExternal","debugEventsInternal","InteractionMonitor","_clearSelection","getSelection","empty","removeAllRanges","selection","_rtlCheck","_buildElement","_initializeTable","_loadInitialData","getComputedStyle","textDirection","direction","reactiveData","newElement","tagName","attributes","replaceChild","_detectBrowser","destroy","deregister","ua","userAgent","vendor","opera","test","stack","line","debugInitialization","Error","trim","replaceData","responses","addData","updateOrAddData","newRows","foundRows","updateOrAddRow","updateRow","fromRow","getRowPosition","getColumnDefinitions","showColumn","hideColumn","toggleColumn","deleteColumn","updateColumnDefinition","fromColumn","on","off","plugin","required","debugDeprecation","rowFormatterPrint","rowFormatterClipboard","rowFormatterHtmlOutput","Accessor","allowedTypes","initializeColumn","transformRow","accessor","charAt","toUpperCase","lookupAccessor","accessors","rowComponent","colComponent","generateParamsList","serializeParams","encoded","encodeURIComponent","join","url","method","json","headers","stringify","form","FormData","Ajax","urlGenerator","loaderPromise","contentTypeFormatters","ajaxRequestFunc","defaultLoaderPromise","ajaxURLGenerator","defaultURLGenerator","ajaxURL","setUrl","setDefaultConfig","ajaxConfig","getUrl","requestDataCheck","requestParams","requestData","ajaxParams","previousData","generateConfig","sendRequest","defaultConfig","ajaxRequesting","ajaxResponse","contentType","ajaxContentType","Accept","location","credentials","fetch","ok","status","statusText","defaultContentTypeFormatters","Clipboard","pasteParser","pasteAction","customSelection","rowRange","blocked","clipboard","clipboardCopyRowRange","plain","html","preventDefault","clipboardCopyFormatter","export","generateExportList","clipboardCopyConfig","clipboardCopyStyled","generateHTMLTable","generatePlainContent","clipboardData","originalEvent","reset","paste","setPasteParser","clipboardPasteParser","setPasteAction","clipboardPasteAction","getKey","range","internal","sel","textRange","createRange","selectNodeContents","toString","addRange","createTextRange","moveToElementText","select","execCommand","pasteActions","parser","pasteParsers","checkPaseOrigin","getPasteData","mutateData","mutator","valid","edit","currentCell","insert","headerFindSuccess","columnMap","CalcComponent","avg","calcParams","precision","reduce","sum","Number","toFixed","parseFloat","String","count","ColumnCalcs","topCalcs","botCalcs","genColumn","topElement","botElement","botRow","topInitialized","botInitialized","recalcAfterBlock","cellValueChanged","initializeColumnCheck","rowsUpdated","recalcActiveRows","recalcActiveRowsRefresh","tableRedraw","adjustForScrollbar","getResults","userRecalc","recalc","blockCheck","groupBy","recalcRowGroup","dataTreeStartExpanded","dataTree","recalcAll","topCalc","bottomCalc","columnCalcs","topCalcParams","botCalcParams","bottomCalcParams","calculations","initializeTopRow","botCalc","initializeBottomRow","removeCalcs","rowsToData","generateRow","recalcGroup","groupRows","getRowGroup","getChildGroups","generateRowData","generateTopRow","generateBottomRow","dataTreeChildColumnCalcs","open","getFilteredTreeChildren","disable","enable","format","formatter","getFormatter","paramKey","hasTopCalcs","hasBottomCalcs","getGroups","getGroupResults","groupObj","subGroups","getSubGroups","subGroupResults","subgroup","defaultCalculations","DataTree","indent","collapseEl","expandEl","branchEl","elementField","startOpen","collapseRow","expandRow","toggleRow","getTreeParent","getRowChildren","addTreeChildRow","isRowExpanded","dummyEl","dataTreeChildField","dataTreeChildIndent","dataTreeBranchElement","dataTreeCollapseElement","tabIndex","dataTreeExpandElement","layoutRow","rowDelete","rowDataChanged","columnMoving","initializeElementField","tableRedrawing","reinitializeRowChildren","firstCol","dataTreeElementColumn","getTreeChildren","redrawNeeded","childArray","controlEl","generateControlElement","cloneNode","getPropertyValue","oldControl","getChildren","allChildren","generateChildren","dataTreeFilter","dataTreeSort","sub","childData","childRow","getTreeParentRoot","childIndex","findChildIndex","recurse","getChildField","csv","setFileContents","delimiter","fileContents","depth","bom","jsonLines","pdf","header","autoTableParams","rowGroupStyles","fontStyle","fontSize","cellPadding","fillColor","rowCalcStyles","jsPDFParams","jsPDF","parseRow","styles","colSpan","rowSpan","orientation","unit","doc","jspdf","autoTable","didDrawPage","head","documentProcessing","xlsx","sheetName","workbook","XLSX","utils","book_new","tableFeatures","compression","compress","generateSheet","merges","worksheet","s","c","r","j","Date","sheet_add_aoa","encode_range","SheetNames","Sheets","sheetOnly","sheets","sheet","intercept","buf","ArrayBuffer","view","Uint8Array","charCodeAt","s2ab","write","bookType","bookSST","Download","mimeType","Blob","deprecatedOptionsCheck","download","downloadToTab","filename","interceptCallback","downloadFunc","downloaders","mime","triggerDownload","downloadConfig","downloadRowRange","groupHeader","groupHeaderDownload","_group","getRowCount","newTab","blob","downloadEncoder","URL","createObjectURL","msSaveOrOpenBlob","click","maskInput","mask","maskLetter","maskLetterChar","maskNumber","maskNumberChar","maskWildcard","maskWildcardChar","fillSymbols","symbol","char","maskAutoFill","defaultDownloaders","Edit","editor","onRendered","success","cancel","editorParams","_initializeParams","displayItems","currentItems","focusedItem","input","_createInputElement","listEl","_createListElement","initialValues","isFilter","filterTimeout","filtered","typing","listIteration","lastAction","actions","_deprecatedOptionsCheck","_initializeValue","_onRendered","listItemFormatter","sortValuesList","searchFunc","searchingPlaceholder","defaultValue","multiselect","headerFilterInitialListGen","cellEl","clickStop","preventScroll","_preventPopupBlur","_preventBlur","_inputKeyDown","_setListWidth","attribs","elementAttributes","clearable","padding","boxSizing","autocomplete","cursor","caretColor","getAttribute","_bindInputEvents","valueCheck","valueKeys","verticalNavigation","placeholderLoading","placeholderEmpty","filterDelay","emptyValue","freetext","filterFunc","filterRemote","allowEmpty","listOnEmpty","valuesLookup","valuesURL","_inputFocus","_inputClick","_inputBlur","_inputSearch","_inputKeyUp","rebuildOptionsList","_filter","clearTimeout","_filterList","_resolveValue","_clearChoices","_keyUp","_keyDown","_keySide","_keyEnter","_keyEsc","_keyHomeEnd","_keySelectLetter","_keyAutoCompLetter","stopImmediatePropagation","_focusItem","_chooseItem","_cancel","_scrollToValue","character","fromCharCode","filterTerm","label","scrollIntoView","behavior","block","inline","_generateOptions","_sortOptions","_buildList","_showList","isInteger","_filterOptions","iteration","_ajaxRequest","_uniqueColumnValues","valuesLookupField","_addPlaceholder","responseValues","_parseList","_clearList","term","urlBuilder","inputValues","entries","_parseListItem","_parseListGroup","itemParams","selected","original","_defaultSortFunction","_sortGroup","as","bs","a1","b1","L","rx","rd","emptyAlign","isFinite","_defaultFilterFunc","_filterItem","_buildItem","itemFormatter","_groupClick","_itemClick","_styleItem","startVis","blur","cellValue","search","onChange","selectContents","textarea","vertNav","whiteSpace","heightNow","shiftKey","shiftEnterSubmit","selectionStart","number","step","blurFunc","date","inputFormat","DT","DateTime","luxon","convertDate","isDateTime","fromISO","fromFormat","toFormat","time","newDatetime","datetime","List","star","self","maxStars","getElementsByTagName","size","stars","starsHolder","createElementNS","starChange","buildStar","starHolder","nextStar","changeValue","overflow","textOverflow","progress","mouseDrag","mouseDragWidth","percent","bar","updateValue","calcVal","round","backgroundColor","screenX","tickCross","tristate","indetermValue","indeterminateValue","indetermState","trueValueSet","falseValueSet","marginTop","checkedValue","checked","trueValue","falseValue","indeterminate","mouseClick","recursionBlock","invalidEdit","editedCells","editors","getEditedCells","clearCellEdited","navigatePrev","navigateNext","navigateLeft","navigateRight","navigateUp","navigateDown","cellIsEdited","clearEdited","editCell","cellCancelEdit","bindEditor","updateCellClass","columnDeleteCheck","rowDeleteCheck","rowEditableCheck","cancelEdit","keybindingNavigateNext","newRow","edited","allowEdit","nextCell","findPrevEditableCell","findNextEditableCell","prevCell","editable","getCurrentCell","clearEditor","cellEditCancelled","contains","button","focusCellNoEvent","forceEdit","focusScrollAdjust","leftEdge","rightEdge","leftMargin","rightMargin","cellEditor","rendered","cellClick","cellEditing","validationMode","editIndex","defaultEditors","ExportRow","ExportColumn","Export","cloneTableStyle","colVisProp","getHtml","columnHeaders","headersToExportRows","generateColumnGroupHeaders","bodyToExportRows","rowLookup","generateTable","generateTableElement","selectRow","selectedRows","columnGroups","colData","processColumnGroup","maxDepth","groupData","subGroup","subGroupData","columnVisCheck","visProp","headerDepth","exportRows","parseColumnGroup","rowGroups","exportCols","headerEl","bodyEl","lookupTableStyles","setup","treeElementField","mapElementStyles","generateHeaderElement","generateGroupElement","generateCalcElement","generateRowElement","evenRow","oddRow","calcRow","firstRow","firstGroup","getElementsByClassName","styleCells","firstCell","lastCell","classNames","generator","cellStyle","cellWrapper","formatCells","formatExportValue","align","htmlOutputConfig","props","lookup","color","fromStyle","filterVal","rowVal","filterParams","regex","RegExp","like","keywords","separator","keyword","matchAll","starts","ends","endsWith","in","Filter","filterList","headerFilterColumns","prevHeaderFilterChangeCheck","tableInitialized","searchRows","searchData","userSetFilter","userRefreshFilter","userAddFilter","getFilters","userSetHeaderFilterFocus","userGetHeaderFilterValue","userSetHeaderFilterValue","getHeaderFilters","userRemoveFilter","userClearFilter","userClearHeaderFilter","setHeaderFilterFocus","reloadHeaderFilter","getHeaderFilterValue","setHeaderFilterValue","initializeColumnHeaderFilter","hideHeaderFilterElements","showHeaderFilterElements","tableBuilt","filterMode","remoteFilterParams","initialFilter","setFilter","initialHeaderFilter","refreshFilter","addFilter","removeFilter","clearFilter","clearHeaderFilter","headerFilter","filterType","tagType","attrType","filterChangeCheck","prevSuccess","emptyFunc","headerFilterFunc","filters","headerFilterFuncParams","fieldVal","colVal","trackChanges","generateHeaderFilterElement","filterElement","editorElement","typingTimer","searchTrigger","headerElement","headerFilterEmptyCheck","headerFilterParams","headerFilterLiveFilterDelay","hasAttribute","headerFilterLiveFilter","hasChanged","findFilter","findSubFilters","ajax","filtersToArray","searchType","filterRecurse","rowList","activeRowComponents","filterRow","subFilter","defaultFilters","plaintext","formatterParams","emptyToSpace","sanitizeHTML","money","integer","decimal","rgx","floatVal","sign","decimalSym","thousandSym","thousand","negativeSign","symbolAfter","link","urlPrefix","labelField","labelTraverse","urlField","image","src","urlSuffix","truthy","allowTruthy","tick","tickElement","cross","crossElement","outputFormat","invalid","invalidPlaceholder","isValid","timezone","setZone","datetimediff","suffix","humanize","now","toHuman","traffic","percentValue","colors","legend","legendColor","legendAlign","barEl","barContainer","legendEl","holderEl","buttonTick","buttonCross","rownum","innerText","responsiveCollapse","toggleList","isOpen","rowSelection","checkbox","selectableRangeMode","toggleSelect","handleComplexRowClick","isSelected","registerRowSelectCheckbox","deselectRow","registerHeaderSelectCheckbox","Format","formatValue","formatHeader","lookupFormatter","formatterPrint","print","formatterClipboard","formatterHtmlOutput","htmlOutput","formatters","mockCell","titleFormatter","titleFormatterParams","entityMap","defaultFormatters","FrozenColumns","initializationMode","layoutCell","reinitializeColumns","blockLayout","unblockLayout","edge","frozenCheck","layoutCalcRows","layoutGroupCalcs","groupList","layoutColumnPosition","allCells","leftParents","marginValue","getColGroupParentElement","_calcSpace","FrozenRows","freezeRow","unfreezeRow","isRowFrozen","detachRow","frozenRows","initializeRows","rowType","isFrozen","styleRows","GroupComponent","groupManager","getParentGroup","toggleVisibility","Group","oldGroup","hasSubGroups","groupIDLookups","_addRowToGroup","_addRow","elementContents","arrowElement","createElements","addBindings","createValueGroups","arrow","movableRows","initializeGroupHeader","allowedValues","_createGroup","groupToggleElement","groupID","groupKey","headerGenerator","insertRow","conformRowData","generateGroupHeaderContents","updateGroupRows","scrollHeader","removeRow","groupValues","removeGroup","getHeadersAndRows","_visSet","groupClosedShowCalcs","getPath","childNodes","GroupRows","displayHandler","setGroupBy","setGroupValues","setGroupStartOpen","setGroupHeader","userGetGroups","userGetGroupedData","rowGetGroup","groupUpdateOnCellEdit","cellUpdated","reassignRowToGroup","configureGroupSetup","rowDeleting","scrollHeaders","rowMoving","rowAddingIndex","rowSample","virtualRenderFill","groupStartOpen","langValue","lookupFunc","prevValue","assignRowToGroup","getGroupedData","toGroup","fromGroup","generateGroups","groupComponents","pullGroupListData","groupListData","rowCount","headerContent","countGroups","oldGroups","createGroup","assignRowToExistingGroup","newGroupNeeded","oldRowGroup","oldGroupPath","newGroupPath","getExpectedPath","every","groupPath","groupId","checkBasicModeGroupHeaderWidth","History","history","clearComponentHistory","rowDeleted","rowAdded","rowMoved","undo","redo","getHistoryUndoSize","getHistoryRedoSize","posFrom","posTo","newValue","undoers","redoers","_rebindRow","oldRow","cellEdit","rowAdd","rowMove","HtmlTableImport","fieldIndex","hasIndex","tableElementCheck","parseTable","_extractOptions","_extractHeaders","_generateBlankHeaders","optionsArr","attrib","_attribValue","_findCol","exists","textContent","inQuote","nextChar","array","Import","importFromFile","importFormat","loadDataCheck","loadData","importData","lookupImporter","structureData","err","importer","importers","extension","pickFile","extensions","accept","file","files","reader","FileReader","importReader","readAsArrayBuffer","readAsBinaryString","readAsDataURL","readAsText","onload","onerror","parsedData","structureArrayToObject","structureArrayToColumns","defaultImporters","Interaction","eventMap","rowClick","rowDblClick","rowContext","rowMouseEnter","rowMouseLeave","rowMouseOver","rowMouseOut","rowMouseMove","rowMouseDown","rowMouseUp","rowTap","rowDblTap","rowTapHold","cellDblClick","cellContext","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellMouseDown","cellMouseUp","cellTap","cellDblTap","cellTapHold","headerClick","headerDblClick","headerContext","headerMouseEnter","headerMouseLeave","headerMouseOver","headerMouseOut","headerMouseMove","headerMouseDown","headerMouseUp","headerTap","headerDblTap","headerTapHold","groupClick","groupDblClick","groupContext","groupMouseEnter","groupMouseLeave","groupMouseOver","groupMouseOut","groupMouseMove","groupMouseDown","groupMouseUp","groupTap","groupDblTap","groupTapHold","subscribers","touchSubscribers","columnSubscribers","touchWatchers","tap","tapDbl","tapHold","initializeExternalEvents","cellContentsSelectionFixer","selectNode","subscribeTouchEvents","unsubscribeTouchEvents","handleTouch","noTouch","watchers","componentObj","Keybindings","watchKeys","pressedKeys","keyupBinding","keydownBinding","keybindings","mergedBindings","mapBindings","bindEvents","clearBindings","mapBinding","symbolsList","ctrl","meta","code","checkBinding","ctrlKey","metaKey","navPrev","navNext","navUp","navDown","scrollPageUp","scrollPageDown","scrollToStart","scrollToEnd","copyToClipboard","keyBlock","newPos","scrollMax","navLeft","navRight","Menu","nestedMenuBlock","currentComponent","rootPopup","initializeRowWatchers","initializeGroupWatchers","rowContextMenu","loadMenuEvent","rowClickMenu","rowDblClickMenu","groupContextMenu","groupClickMenu","groupDblClickMenu","headerContextMenu","loadMenuTableColumnEvent","headerClickMenu","headerDblClickMenu","headerMenu","initializeColumnHeaderMenu","contextMenu","loadMenuTableCellEvent","clickMenu","dblClickMenu","headerMenuEl","icon","headerMenuIcon","menu","loadMenu","parentPopup","itemEl","disabled","MoveColumns","placeholderElement","createPlaceholderElement","hoverElement","checkTimeout","checkPeriod","moving","toCol","toColAfter","startX","autoScrollMargin","autoScrollStep","autoScrollTimeout","touchMove","moveHover","endMove","movableColumns","mousemove","which","startMove","bindTouchEvents","prevColWidth","nextColWidthLast","prevColWidthLast","startXMove","passive","moveToCol","_bindMouseMove","_unbindMouseMove","movingCells","scrollPos","columnHolder","xPos","MoveRows","toRowAfter","hasHandle","startY","tableRowDropEvent","connectionSelectorsTables","connectionSelectorsElements","connectionElements","connectedTable","connectedRow","movableRowsConnectedTables","movableRowsConnectedElements","initializeCell","mouseup","tableRowDrop","previousSibling","rowHandle","nextRowHeight","prevRowHeight","nextRowHeightLast","prevRowHeightLast","startYMove","setStartPosition","connectToTables","pointerEvents","disconnectFromTables","moveHoverConnections","moveHoverTable","rowHolder","yPos","elementRowDrop","connectionTables","dropEvent","tabulatorElementDropEvent","connect","disconnect","dropComplete","sender","movableRowsSender","senders","movableRowsReceiver","receivers","fromTable","toTable","Mutator","enabled","transformCell","mutateLink","lookupMutator","mutators","mutatorEdit","linkCell","pageSize","currentRow","currentPage","totalRows","totalPages","showingEl","valueEl","ofEl","totalEl","rowsEl","Page","progressiveLoad","pageCounterElement","pageCounter","page","remoteRowCountEstimate","initialLoad","dataChanging","pageSizes","setMaxPage","setPage","userSetPageToRow","userSetPageSize","getPageSize","previousPage","nextPage","getPage","getPageMax","setPageToRow","initialLoadComplete","calculatePageSizes","footerRedraw","paginationAddRow","rowAddingPosition","paginationMode","remotePageParams","_parseRemoteData","restOnRenderBefore","initializePageCounter","initializePaginator","initializeProgressive","scrollVertical","testElRow","testElCell","paginationSize","generatePageSizeSelectList","setPageSize","progressiveLoadScrollMargin","pagesElement","firstBut","prevBut","nextBut","lastBut","paginationSizeSelector","pageSizeSelect","paginationCounter","pageCounters","hidden","pageSelectLabel","paginationCounterHolder","paginationElement","paginationCounterElement","paginationInitialPage","paginationButtonCount","setMaxRows","trigger","_setPageCounter","_setPageButtons","leftSize","rightSize","_generatePageButton","actualStartRow","actualRowPageSize","actualRows","last_page","last_row","progressiveLoadDelay","footer","defaultPageCounters","local","id","localStorage","getItem","cookie","cookiePos","setItem","expireDate","setDate","getDate","toUTCString","Persistence","defWatcherBlock","readFunc","writeFunc","localStorageTest","testKey","removeItem","persistence","retrievedData","persistenceMode","persistenceID","persistenceReaderFunc","readers","persistenceWriterFunc","writers","retrieveData","save","eventSave","getColumnLayout","setColumnLayout","sorters","initialSort","parseColumns","mergeDefinition","getOwnPropertyDescriptor","defineProperty","set","current","oldCols","newCols","_findColumn","validateSorters","getSort","getGroupConfig","getPageConfig","excludedKeys","defStore","colDef","defaultReaders","defaultWriters","_componentPopupCall","loadPopupEvent","rowContextPopup","rowClickPopup","rowDblClickPopup","groupContextPopup","groupClickPopup","groupDblClickPopup","headerContextPopup","loadPopupTableColumnEvent","headerClickPopup","headerDblClickPopup","headerPopup","initializeColumnHeaderPopup","contextPopup","loadPopupTableCellEvent","clickPopup","dblClickPopup","headerPopupEl","headerPopupIcon","loadPopup","contentsEl","Print","manualBlock","printAsHtml","replaceTable","cleanup","printFullscreen","printConfig","printStyled","printRowRange","footerContent","scrollX","scrollY","footerEl","tableEl","printHeader","printFooter","printFormatter","ReactiveData","origFuncs","currentVersion","unblock","watchRow","watchData","unwatchData","version","enumerable","configurable","arg","pop","startRow","oldRows","writable","watchKey","watchTreeChildren","childField","rebuildTree","unwatchRow","ResizeColumns","startColumn","startWidth","latestX","initialNextColumn","layoutColumnHeader","initializeEventWatchers","layoutCellHandles","deInitializeComponent","resizeHandle","columnLayoutUpdated","deInitializeColumn","columnWidthUpdated","resizable","reinitializeColumn","frozenColumnOffset","frozenOffset","handleEl","nearestColumn","_checkResizability","handleDown","_mouseDown","oldWidth","parentElement","mouseMove","blockedBefore","blockedAfter","startDiff","moveDiff","resizableColumnFit","mouseUp","ResizeRows","startHeight","prevHandle","prevHandleDown","screenY","ResizeTable","visibilityObserver","resizeObserver","containerObserver","tableHeight","containerWidth","autoResize","initialRedraw","tableStyle","IntersectionObserver","ResizeObserver","initializeVisibilityObserver","entry","nodeHeight","contentRect","nodeWidth","redrawTable","observe","tableResized","isIntersecting","unobserve","ResponsiveLayout","hiddenColumns","collapseFormatter","collapseStartOpen","collapseHandleColumn","updateColumnVisibility","initializeResponsivity","generateCollapsedRowContent","responsiveLayoutCollapseFormatter","formatCollapsedData","responsiveLayoutCollapseStartOpen","order","generateCollapsedContent","colCount","generateCollapsedRowData","mockCellComponent","responsiveLayoutCollapseUseFormatters","node_content","titleData","valueData","titleHighlight","SelectRow","selecting","lastClickedRow","selectPrev","headerCheckboxElement","selectRows","deselectRows","getSelectedRows","getSelectedData","isRowSelected","selectable","clearSelectionData","rowRetrieve","selectablePersistence","_deselectRow","_rowSelectionChanged","endSelect","selectableCheck","lastClickedRowIdx","rowIdx","fromRowIdx","toRowIdx","toggledRows","toggledRow","_selectRow","rowMatch","rowInfo","selectableRollingSelection","checkboxEl","dataTreeSelectPropagate","childRowSelection","selectedRow","aRow","bRow","alignEmptyValues","decimalSeparator","thousandSeparator","string","localeCompare","boolean","calc","d","alphanum","Sort","sortList","userSetSort","clearSort","sortMode","remoteSortParams","setSort","refreshSort","arrowEl","sorterParams","startingDir","headerSortStartingDir","headerSortTristate","headerSort","headerSortClickElement","headerSortElement","setColumnHeaderSortIcon","columnHeaderSortMulti","newSortList","findSorter","sortOrderReverse","sortListActual","rowComponents","clearColumnHeaders","sortObj","setColumnHeader","_sortItems","sortEl","sorterCount","sortItem","_sortRow","el1Comp","el2Comp","el1","el2","defaultSorters","Tooltip","tooltipSubscriber","headerSubscriber","timeout","popupInstance","headerTooltip","mousemoveCheck","mouseoutCheck","tooltip","clearPopup","loadTooltip","tooltipDelay","parameters","float","numeric","minLength","maxLength","unique","cellData","Validate","invalidCells","getInvalidCells","userClearCellValidation","userValidate","cellIsValid","clearValidation","cellValidate","columnValidate","rowValidate","editValidate","editorClear","editedClear","previousValue","validate","cancelled","validator","_extractValidator","substring","_buildValidator","validators","failedValidators","invalidIndex","defaultValidators","TabulatorFull"],"mappings":";0OAAe,MAAMA,EAEpBC,YAAYC,GACXC,KAAKD,MAAQA,EAOdE,WAAWC,EAAMC,EAAQC,GACxB,OAAOJ,KAAKD,MAAMM,WAAWC,KAAKJ,OAAMK,OAAWA,OAAWA,EAAWJ,EAAQC,GAOlFI,WACC,OAAOR,KAAKD,MAAMU,QAAQC,SAASC,WAAWC,WAG/CC,WACC,OAAOb,KAAKD,MAAMU,QAAQC,SAASI,QAAQF,WAG5CG,aACC,OAAOf,KAAKD,MAAMU,QAAQC,SAASM,aAAaJ,WAQjDK,mBACC,OAAOjB,KAAKD,MAAMU,QAAQS,MAAMC,kBAAkBP,WAGnDQ,YACC,OAAOpB,KAAKD,MAAMU,QAAQS,MAAMG,QAAQT,WAOzCU,aACC,OAAOtB,KAAKD,MAAMU,QAAQc,OAAOC,UAGlCC,cAAcC,GACb,OAAO1B,KAAKD,MAAMU,QAAQc,OAAOA,OAAOG,GAQzCC,YACC,OAAO3B,KAAKD,MAAM6B,SAASD,aAAaf,WAGzCiB,cACC,OAAO7B,KAAKD,MAAM6B,SAASC,eAAejB,WAG3CkB,WAAWC,GACV,OAAO/B,KAAKD,MAAM6B,SAASE,WAAWC,GAGvCC,qBACC,OAAOhC,KAAKD,MAAM6B,SAASI,sBAAsBpB,WAGlDqB,WACC,OAAOjC,KAAKD,MAAM6B,SAASK,YAAYrB,WAGxCsB,QACC,OAAOlC,KAAKD,MAAM6B,SAASM,SAAStB,WAGrCuB,UACC,OAAOnC,KAAKD,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,SACzD02D,EAAiB5iF,KAAK,CACrBhB,KAAK0R,EAAK1R,KACVgiF,WAAWtwE,EAAKwb,YAMhBnsB,EAAK9D,QAAQomF,WAChBtiF,EAAK9D,QAAQomF,SAAW,IAGrBO,EAAiBhiF,QAQpBb,EAAK9D,QAAQomF,SAASxzB,QAAU+zB,EAES,WAAtCpnF,KAAKD,MAAMyC,QAAQ0lD,gBACrB3jD,EAAKP,aAAa4G,UAAUC,IAAI,8BAGb,GAAjBw8E,GACFrnF,KAAKgmF,aAAaxhF,KAAKD,KAdxBA,EAAK9D,QAAQomF,SAASxzB,SAAU,EAChC9uD,EAAKP,aAAa4G,UAAU6M,OAAO,6BAEhC4vE,GAAgB,GAClBrnF,KAAKgmF,aAAar0E,OAAO01E,EAAc,KAclCD,EAAiBhiF,QAASgiF,EAGlCnB,kBACC,IAAI9gF,EAAS,GAMb,OAJAnF,KAAKgmF,aAAa1hF,SAASC,IAC1BY,EAAOX,KAAKD,EAAKE,eAAe,IAG1BU,EAGRkhF,gBAAgB9hF,GACf,IAAI8iF,EAED9iF,EAAK9D,QAAQomF,UAAYtiF,EAAK9D,QAAQomF,SAASxzB,UAEjD9uD,EAAKP,aAAa4G,UAAU6M,OAAO,6BACnClT,EAAK9D,QAAQomF,SAASxzB,SAAU,GAEhCg0B,EAAernF,KAAKgmF,aAAan3E,QAAQtK,KAEtB,GAClBvE,KAAKgmF,aAAar0E,OAAO01E,EAAc,KAM3CtB,GAAShsD,WAAa,WAGtBgsD,GAASoB,WAAaG,0qBCzStB,MAAMC,WAAsB3zD,UAG5B,IAAI2J,EAAagqD,GAAe9mF"} \ 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/DeprecationAdvisor.js","../../src/js/core/tools/TableRegistry.js","../../src/js/core/tools/Popup.js","../../src/js/core/Module.js","../../src/js/modules/Layout/defaults/modes/fitDataGeneral.js","../../src/js/modules/Layout/defaults/modes.js","../../src/js/modules/Layout/defaults/modes/fitData.js","../../src/js/modules/Layout/defaults/modes/fitDataStretch.js","../../src/js/modules/Layout/defaults/modes/fitColumns.js","../../src/js/modules/Layout/Layout.js","../../src/js/modules/Localize/Localize.js","../../src/js/modules/Localize/defaults/langs.js","../../src/js/modules/Comms/Comms.js","../../src/js/core/tools/ModuleBinder.js","../../src/js/core/tools/Alert.js","../../src/js/core/Tabulator.js","../../src/js/core/defaults/options.js","../../src/js/modules/Accessor/Accessor.js","../../src/js/modules/Accessor/defaults/accessors.js","../../src/js/modules/Ajax/defaults/urlGenerator.js","../../src/js/modules/Ajax/defaults/contentTypeFormatters.js","../../src/js/modules/Ajax/Ajax.js","../../src/js/modules/Ajax/defaults/config.js","../../src/js/modules/Ajax/defaults/loaderPromise.js","../../src/js/modules/Clipboard/Clipboard.js","../../src/js/modules/Clipboard/defaults/pasteActions.js","../../src/js/modules/Clipboard/defaults/pasteParsers.js","../../src/js/modules/ColumnCalcs/CalcComponent.js","../../src/js/modules/ColumnCalcs/defaults/calculations.js","../../src/js/modules/ColumnCalcs/ColumnCalcs.js","../../src/js/modules/DataTree/DataTree.js","../../src/js/modules/Download/defaults/downloaders.js","../../src/js/modules/Download/defaults/downloaders/csv.js","../../src/js/modules/Download/defaults/downloaders/json.js","../../src/js/modules/Download/defaults/downloaders/jsonLines.js","../../src/js/modules/Download/defaults/downloaders/pdf.js","../../src/js/modules/Download/defaults/downloaders/xlsx.js","../../src/js/modules/Download/defaults/downloaders/html.js","../../src/js/modules/Download/Download.js","../../src/js/modules/Edit/inputMask.js","../../src/js/modules/Edit/List.js","../../src/js/modules/Edit/defaults/editors.js","../../src/js/modules/Edit/defaults/editors/input.js","../../src/js/modules/Edit/defaults/editors/textarea.js","../../src/js/modules/Edit/defaults/editors/number.js","../../src/js/modules/Edit/defaults/editors/range.js","../../src/js/modules/Edit/defaults/editors/date.js","../../src/js/modules/Edit/defaults/editors/time.js","../../src/js/modules/Edit/defaults/editors/datetime.js","../../src/js/modules/Edit/defaults/editors/select.js","../../src/js/modules/Edit/defaults/editors/list.js","../../src/js/modules/Edit/defaults/editors/autocomplete.js","../../src/js/modules/Edit/defaults/editors/star.js","../../src/js/modules/Edit/defaults/editors/progress.js","../../src/js/modules/Edit/defaults/editors/tickCross.js","../../src/js/modules/Edit/Edit.js","../../src/js/modules/Export/ExportRow.js","../../src/js/modules/Export/ExportColumn.js","../../src/js/modules/Export/Export.js","../../src/js/modules/Filter/defaults/filters.js","../../src/js/modules/Filter/Filter.js","../../src/js/modules/Format/defaults/formatters.js","../../src/js/modules/Format/defaults/formatters/plaintext.js","../../src/js/modules/Format/defaults/formatters/html.js","../../src/js/modules/Format/defaults/formatters/textarea.js","../../src/js/modules/Format/defaults/formatters/money.js","../../src/js/modules/Format/defaults/formatters/link.js","../../src/js/modules/Format/defaults/formatters/image.js","../../src/js/modules/Format/defaults/formatters/tickCross.js","../../src/js/modules/Format/defaults/formatters/datetime.js","../../src/js/modules/Format/defaults/formatters/datetimediff.js","../../src/js/modules/Format/defaults/formatters/lookup.js","../../src/js/modules/Format/defaults/formatters/star.js","../../src/js/modules/Format/defaults/formatters/traffic.js","../../src/js/modules/Format/defaults/formatters/progress.js","../../src/js/modules/Format/defaults/formatters/color.js","../../src/js/modules/Format/defaults/formatters/buttonTick.js","../../src/js/modules/Format/defaults/formatters/buttonCross.js","../../src/js/modules/Format/defaults/formatters/rownum.js","../../src/js/modules/Format/defaults/formatters/handle.js","../../src/js/modules/Format/defaults/formatters/responsiveCollapse.js","../../src/js/modules/Format/defaults/formatters/rowSelection.js","../../src/js/modules/Format/Format.js","../../src/js/modules/FrozenColumns/FrozenColumns.js","../../src/js/modules/FrozenRows/FrozenRows.js","../../src/js/modules/GroupRows/GroupComponent.js","../../src/js/modules/GroupRows/Group.js","../../src/js/modules/GroupRows/GroupRows.js","../../src/js/modules/History/History.js","../../src/js/modules/History/defaults/undoers.js","../../src/js/modules/History/defaults/redoers.js","../../src/js/modules/HtmlTableImport/HtmlTableImport.js","../../src/js/modules/Import/defaults/importers.js","../../src/js/modules/Import/defaults/importers/csv.js","../../src/js/modules/Import/defaults/importers/json.js","../../src/js/modules/Import/defaults/importers/array.js","../../src/js/modules/Import/Import.js","../../src/js/modules/Interaction/Interaction.js","../../src/js/modules/Keybindings/Keybindings.js","../../src/js/modules/Keybindings/defaults/bindings.js","../../src/js/modules/Keybindings/defaults/actions.js","../../src/js/modules/Menu/Menu.js","../../src/js/modules/MoveColumns/MoveColumns.js","../../src/js/modules/MoveRows/MoveRows.js","../../src/js/modules/Mutator/Mutator.js","../../src/js/modules/Mutator/defaults/mutators.js","../../src/js/modules/Page/defaults/pageCounters.js","../../src/js/modules/Page/defaults/pageCounters/rows.js","../../src/js/modules/Page/defaults/pageCounters/pages.js","../../src/js/modules/Page/Page.js","../../src/js/modules/Persistence/defaults/readers.js","../../src/js/modules/Persistence/defaults/writers.js","../../src/js/modules/Persistence/Persistence.js","../../src/js/modules/Popup/Popup.js","../../src/js/modules/Print/Print.js","../../src/js/modules/ReactiveData/ReactiveData.js","../../src/js/modules/ResizeColumns/ResizeColumns.js","../../src/js/modules/ResizeRows/ResizeRows.js","../../src/js/modules/ResizeTable/ResizeTable.js","../../src/js/modules/ResponsiveLayout/ResponsiveLayout.js","../../src/js/modules/SelectRow/SelectRow.js","../../src/js/modules/Sort/defaults/sorters/datetime.js","../../src/js/modules/Sort/defaults/sorters.js","../../src/js/modules/Sort/defaults/sorters/number.js","../../src/js/modules/Sort/defaults/sorters/string.js","../../src/js/modules/Sort/defaults/sorters/date.js","../../src/js/modules/Sort/defaults/sorters/time.js","../../src/js/modules/Sort/defaults/sorters/boolean.js","../../src/js/modules/Sort/defaults/sorters/array.js","../../src/js/modules/Sort/defaults/sorters/exists.js","../../src/js/modules/Sort/defaults/sorters/alphanum.js","../../src/js/modules/Sort/Sort.js","../../src/js/modules/Tooltip/Tooltip.js","../../src/js/modules/Validate/defaults/validators.js","../../src/js/modules/Validate/Validate.js","../../src/js/core/TabulatorFull.js"],"sourcesContent":["export default class CoreFeature{\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, columnsChanged){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent, columnsChanged);\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(force){\r\n\t\treturn this.table.modules.layout.layout(force);\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\t//////////////////////////////////////////\r\n\t/////////// Deprecation Checks ///////////\r\n\t//////////////////////////////////////////\r\n\r\n\tdeprecationCheck(oldOption, newOption){\r\n\t\treturn this.table.deprecationAdvisor.check(oldOption, newOption);\r\n\t}\r\n\r\n\tdeprecationCheckMsg(oldOption, msg){\r\n\t\treturn this.table.deprecationAdvisor.checkMsg(oldOption, msg);\r\n\t}\r\n\r\n\tdeprecationMsg(msg){\r\n\t\treturn this.table.deprecationAdvisor.msg(msg);\r\n\t}\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.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\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"headerWordWrap\": false,\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}\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\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\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\t\tif(val != null){\r\n\t\t\t\t\t\tconsole.warn(\"Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", val);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\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//////////////////// 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, force){\r\n\t\tvar changed = this.setValueProcessData(value, mutate, force);\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, force){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value || force){\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\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\r\n\t\tthis.dispatch(\"cell-height\", this, \"\");\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\r\n\t\tthis.dispatch(\"cell-height\", this, 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}\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.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 pre-styled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum pre-styled 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 pre-styled 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\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\tswitch(this.table.options.columnHeaderVertAlign){\r\n\t\t\tcase \"middle\":\r\n\t\t\t\tel.style.justifyContent = \"center\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"bottom\":\r\n\t\t\t\tel.style.justifyContent = \"flex-end\";\r\n\t\t\t\tbreak;\r\n\t\t}\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//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._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.dispatch(\"column-init\", this);\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\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//assign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classNames = def.cssClass.split(\" \");\r\n\t\t\tclassNames.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 horizontal 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 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\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\t\t\r\n\t\tif(def.headerWordWrap){\r\n\t\t\ttitleHolderElement.classList.add(\"tabulator-col-title-wrap\");\r\n\t\t}\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\t\tif(contents instanceof Node){\r\n\t\t\t\t\tel.appendChild(contents);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.innerHTML = \"\";\r\n\t\t\t\t\tconsole.warn(\"Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", contents);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\t\tel.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\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 classNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclassNames.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\r\n\t\t\tcolumn.columnRendered();\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\tthis.dispatch(\"column-height\", this, this.element.style.height);\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\t// if(!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 alignment\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\r\n\t\tthis.dispatch(\"column-height\", this, \"\");\r\n\t}\r\n\r\n\t//// Retrieve 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 column 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(traverse){\r\n\t\tvar columns = [];\r\n\r\n\t\tif(traverse){\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumns.push(column);\r\n\t\t\t\t\t\r\n\t\t\t\tcolumns = columns.concat(column.getColumns(true));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumns = this.columns;\r\n\t\t}\r\n\t\t\r\n\t\treturn 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//retrieve 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.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.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\tif(this.maxWidth && minWidth > this.maxWidth){\r\n\t\t\tminWidth = this.maxWidth;\r\n\r\n\t\t\tconsole.warn(\"the minWidth (\"+ minWidth + \"px) for column '\" + this.field + \"' cannot be bigger that its maxWidth (\"+ this.maxWidthStyled + \")\");\r\n\t\t}\r\n\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\tif(this.minWidth && maxWidth < this.minWidth){\r\n\t\t\tmaxWidth = this.minWidth;\r\n\r\n\t\t\tconsole.warn(\"the maxWidth (\"+ maxWidth + \"px) for column '\" + this.field + \"' cannot be smaller that its minWidth (\"+ this.minWidthStyled + \")\");\r\n\t\t}\r\n\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\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.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\r\n\t\tthis.dispatch(\"column-rendered\", this);\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\t.then((column) => {\r\n\r\n\t\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\t\tthis.field = false; //clear field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\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;\r\n","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 (let 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 (let 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 determine how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the container 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 scrolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has resized, 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, return 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\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"top\":\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = rowEl.offsetTop;\t\t\t\t\t\r\n\t\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\n\r\nexport default class BasicHorizontal 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\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\t\t\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(){\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}\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}\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}\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\t\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\t\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\t\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\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\twidth;\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tif(!column.modules.frozen){\t\t\t\r\n\t\t\t\t\twidth = column.getWidth();\r\n\r\n\t\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\t\r\n\t\t\t\t\tconfig.width = width;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// column is hidden\r\n\t\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\t\tthis.vDomPadRight += width;\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.columns.push(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcolPos += width;\r\n\t\t\t\t}\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\trow, 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 && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\r\n\t\t\t\trow = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t})[0];\r\n\t\t\t\t\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(let colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rerenderColumns(false, true);\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 visibleRows = this.getVisibleRows(),\r\n\t\totherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\r\n\r\n\t\tvisibleRows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\r\n\t\totherRows.forEach((row) =>{\r\n\t\t\trow.deinitialize();\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\t\t\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\t\t\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\r\n\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().insertBefore(cell.getElement(), row.getCell(this.columns[this.rightCol]).getElement().nextSibling);\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\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\trow.modules.vdomHoz.rightCol = this.rightCol;\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(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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\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().insertBefore(cell.getElement(), row.getCell(this.columns[this.leftCol]).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\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\trow.modules.vdomHoz.leftCol = this.leftCol;\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(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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\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\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\trow.modules.vdomHoz.rightCol = this.rightCol;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\r\n\t\twhile(working){\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\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\trow.modules.vdomHoz.leftCol = this.leftCol;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\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\r\n\t\t\tif(this.table.modules.frozenColumns){\r\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((column) => {\r\n\t\t\t\t\tthis.appendCell(row, column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tthis.appendCell(row, this.columns[i]);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.frozenColumns){\r\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((column) => {\r\n\t\t\t\t\tthis.appendCell(row, column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tappendCell(row, column){\r\n\t\tif(column && column.visible){\r\n\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\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\t\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\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\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.contentsElement = 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\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockUpdate = null; //store latest redraw update only status\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\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.contentsElement = this.createHeaderContentsElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\t\t\r\n\t\tthis.contentsElement.insertBefore(this.headersElement, this.contentsElement.firstChild);\r\n\t\tthis.element.insertBefore(this.contentsElement, this.element.firstChild);\r\n\t\t\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"scrollbar-vertical\", this.padVerticalScrollbar.bind(this));\r\n\t}\r\n\r\n\tpadVerticalScrollbar(width){\r\n\t\tif(this.table.rtl){\r\n\t\t\tthis.headersElement.style.marginLeft = width + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.headersElement.style.marginRight = width + \"px\";\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\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\t\t\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\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}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", this.table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderContentsElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-header-contents\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\t\t\r\n\t\treturn el;\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\r\n\t//return containing contents element\r\n\tgetContentsElement(){\r\n\t\treturn this.contentsElement;\r\n\t}\r\n\t\r\n\t\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\t\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tthis.contentsElement.scrollLeft = left;\r\n\r\n\t\tthis.scrollLeft = left;\r\n\t\t\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\t\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\t\t\r\n\t\tif(data && data.length){\r\n\t\t\t\r\n\t\t\trow = data[0];\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tlet value = row[key];\r\n\t\t\t\t\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\t\tsorter = \"array\";\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\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t\t}else{\r\n\t\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\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcol.sorter = sorter;\r\n\t\t\t\t\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(definitions){\r\n\t\t\t\t\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\t\tObject.assign(col, 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\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\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\t\r\n\t\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\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\t\t\t\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\t\t\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\t\t\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\t\t\r\n\t\tthis._reIndexColumns();\r\n\t\t\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\t\t\r\n\t\tthis.rerenderColumns(false, true);\r\n\t\t\r\n\t\tthis.redraw(true);\r\n\t}\r\n\t\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\t\t\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\t\t\t\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\t\t\r\n\t\tcolumn.columnRendered();\r\n\t\t\r\n\t\treturn column;\r\n\t}\r\n\t\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\t\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\t\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\t\t\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\t\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\t\t\r\n\t\tif(!this.redrawBlock){\r\n\r\n\t\t\tthis.headersElement.style.height=\"\";\r\n\t\t\t\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumn.clearVerticalAlign();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tvar height = column.getHeight();\r\n\t\t\t\t\r\n\t\t\t\tif(height > minHeight){\r\n\t\t\t\t\tminHeight = height;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.headersElement.style.height = minHeight + \"px\";\r\n\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tvar columns;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\t\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\r\n\t\t\t\tcolumns = [];\r\n\r\n\t\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\t\tcolumns.push(column);\r\n\t\t\t\t\tcolumns = columns.concat(column.getColumns(true));\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = columns.find((column) => {\r\n\t\t\t\t\treturn column.element === 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\t\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\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\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\t\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\t\t\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\t\t\r\n\t\treturn matches;\r\n\t}\r\n\t\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\t\r\n\tgetFirstVisibleColumn(){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\t\t\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\t\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\t\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\t\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\t\r\n\t//traverse 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\t\r\n\t//get definitions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\t\t\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\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\t\t\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\t\t\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\t\t\r\n\t\treturn width;\r\n\t}\r\n\t\r\n\tmoveColumn(from, to, after){\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\t\t\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\t\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\t\t\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\t\t\r\n\t\tthis.rerenderColumns(true);\r\n\t\t\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\t\t\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\t\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\t\t\r\n\t\tif (fromIndex > -1) {\r\n\t\t\t\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\t\t\t\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\t\t\t\r\n\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\t\t\t\r\n\t\t\tif(updateRows){\r\n\t\t\t\t\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\t\t\t\t\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\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\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\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\t\t\t\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\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\t\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\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\t\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\t\t\t\t\t\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\t\t\t\t\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\t\t\t\t\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\t\t\t\t\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\t\t\t\t\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\t\t\t\r\n\t\t});\r\n\t}\r\n\t\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\t\t\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\t\t\r\n\t\treturn cells;\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\t\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\t\t\t\t\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn fixedWidth;\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis._reIndexColumns();\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\t\t\t\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.redraw(true);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t\t\r\n\t\t\tthis.rerenderColumns();\r\n\t\t\t\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\t\t\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\t\t\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.verticalAlignHeaders();\r\n\t\t\r\n\t\tthis.redraw();\r\n\t}\r\n\t\r\n\trerenderColumns(update, silent){\r\n\t\tif(!this.redrawBlock){\r\n\t\t\tthis.renderer.rerenderColumns(update, silent);\r\n\t\t}else{\r\n\t\t\tif(update === false || (update === true && this.redrawBlockUpdate === null)){\r\n\t\t\t\tthis.redrawBlockUpdate = update;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockRedraw(){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockUpdate = null;\r\n\t}\r\n\t\r\n\trestoreRedraw(){\r\n\t\tthis.redrawBlock = false;\r\n\t\tthis.verticalAlignHeaders();\r\n\t\tthis.renderer.rerenderColumns(this.redrawBlockUpdate);\r\n\t\t\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh(force);\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\t\t\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(){\r\n\t\treturn this._row.getPosition();\r\n\t}\r\n\r\n\twatchPosition(callback){\r\n\t\treturn this._row.watchPosition(callback);\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\t\t\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 pre-styled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //hold elements 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\t\tthis.position = 0; //store position of element in row list\r\n\t\tthis.positionWatchers = [];\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.created = false;\r\n\t\t\r\n\t\tthis.setData(data);\r\n\t}\r\n\t\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\t\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\t\t\r\n\t\tthis.element = el;\r\n\t}\r\n\t\r\n\tgetElement(){\r\n\t\tthis.create();\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\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\t\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\t\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\t\t\r\n\t\tif(!this.initialized || force){\r\n\t\t\t\r\n\t\t\tthis.deleteCells();\r\n\t\t\t\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\t\t\t\r\n\t\t\tthis.generateCells();\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t\t\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\t\t\t\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\t\t\t\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\t\t\t\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\t\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t\t\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\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\t\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\t\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\t\t\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\t\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight;\r\n\t\t\r\n\t\tif(this.table.options.rowHeight){\r\n\t\t\tthis.height = this.table.options.rowHeight;\r\n\t\t}else{\r\n\t\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\t\t\t\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tvar height = cell.getHeight();\r\n\t\t\t\tif(height > maxHeight){\r\n\t\t\t\t\tmaxHeight = height;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(force){\r\n\t\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t\t}else{\r\n\t\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\t\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\t\t\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\t\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\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force && !this.table.options.rowHeight){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\t\t\r\n\t\tthis.calcHeight(force);\r\n\t\t\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\t\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\t\t\t\r\n\t\t\tthis.manualHeight = true;\r\n\t\t\t\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\t\t\t\r\n\t\t\tthis.setCellHeight();\r\n\t\t\t\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\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\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\t\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\t\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\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\t\t\t\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\t\t\t\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\t\t\t\r\n\t\t\t//set data\r\n\t\t\tfor (let attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\t\t\t\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (let attrname in updatedData) {\r\n\t\t\t\t\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\t\t\t\t\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\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\t\t\t\t\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\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\t\t\t\r\n\t\t\t//this.reinitialize();\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\t\t\t\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\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\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\t\t\r\n\t\treturn this.data;\r\n\t}\r\n\t\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\t\t\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\t\t\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\t\t\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\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\t\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\t\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\t\t\r\n\t\treturn this.cells;\r\n\t}\r\n\t\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\t\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\t\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\t\t\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\t\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\t\t\r\n\t\tthis.deleteActual();\r\n\t\t\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\t\r\n\tdeleteActual(blockRedraw){\r\n\t\tthis.detachModules();\r\n\t\t\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\t\t\r\n\t\tthis.deleteCells();\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\t\t\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\t\r\n\tdetachModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\t\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\t\t\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\t\r\n\twipe(){\r\n\t\tthis.detachModules();\r\n\t\tthis.deleteCells();\r\n\t\t\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\t\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\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tisDisplayed(){\r\n\t\treturn this.table.rowManager.getDisplayRows().includes(this);\r\n\t}\r\n\r\n\tgetPosition(){\r\n\t\treturn this.isDisplayed() ? this.position : false;\r\n\t}\r\n\r\n\tsetPosition(position){\r\n\t\tif(position != this.position){\r\n\t\t\tthis.position = position;\r\n\r\n\t\t\tthis.positionWatchers.forEach((callback) => {\r\n\t\t\t\tcallback(this.position);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchPosition(callback){\r\n\t\tthis.positionWatchers.push(callback);\r\n\r\n\t\tcallback(this.position);\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\t\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\t\t\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 BasicVertical 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 position 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\tif(this.rows().length){\r\n\t\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\t\t}else{\r\n\t\t\tthis.clear();\r\n\t\t\tthis.table.rowManager._showPlaceholder();\r\n\t\t}\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 row height 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\t\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t\t}\r\n\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\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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.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\r\n\t\tthis.scrollbarWidth = 0;\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\t// el.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\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\t\t\t\t\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}else if(subject === null){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\"){\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){\r\n\t\treturn this.getDisplayRows().find((row) => {\r\n\t\t\treturn row.getPosition() === position && row.isDisplayed();\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.regenerateRowPositions();\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 rows = [];\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\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.regenerateRowPositions();\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.regenerateRowPositions();\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\t\r\n\t\tif(!this.table.destroyed){\r\n\t\t\tif(typeof handler === \"function\"){\r\n\t\t\t\tindex = this.dataPipeline.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 = \"dataPipeline\";\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.dataPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"display\";\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\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(index > -1){\r\n\t\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tindex++;\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.error(\"Unable to refresh data, invalid handler provided\", handler);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tstage = handler || \"all\";\r\n\t\t\t\tindex = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.redrawBlock){\r\n\t\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\t\thandler: handler,\r\n\t\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\t\tstage:stage,\r\n\t\t\t\t\t\tindex:index,\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t}else{\r\n\t\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\t\tthis.table.columnManager.redraw(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\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t\t}\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 all data needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\t\tindex = 0;\r\n\t\t\t\tthis.resetDisplayRows();\r\n\t\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\r\n\t\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t\t\tthis.regenerateRowPositions();\r\n\t\t}\r\n\r\n\t\tif(this.getDisplayRows().length){\r\n\t\t\tthis._clearPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row positions\r\n\tregenerateRowPositions(){\r\n\t\tvar rows = this.getDisplayRows();\r\n\t\tvar index = 1;\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tif (row.type === \"row\"){\r\n\t\t\t\trow.setPosition(index);\r\n\t\t\t\tindex++;\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\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\tthis.displayRows[index] = displayRows;\r\n\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}\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 across 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\r\n\t\tif(!type || type === true){\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}else{\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\t\trows = this.activeRows;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"display\":\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\t\t\tbreak;\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\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.dispatchExternal(\"renderStarted\");\r\n\t\t\t\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\r\n\t\t\tif(!this.fixedHeight){\r\n\t\t\t\tthis.adjustTableSize();\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollBarCheck();\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tscrollBarCheck(){\r\n\t\tvar scrollbarWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(this.element.scrollHeight > this.element.clientHeight){\r\n\t\t\tscrollbarWidth = this.element.offsetWidth - this.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tif(scrollbarWidth !== this.scrollbarWidth){\r\n\t\t\tthis.scrollbarWidth = scrollbarWidth;\r\n\t\t\tthis.dispatch(\"scrollbar-vertical\", scrollbarWidth);\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.renderMode = this.table.options.renderVertical;\r\n\t\t\t\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:\", this.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(true);\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\r\n\t\tthis.scrollBarCheck();\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(){\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\r\n\t\t// clear empty table placeholder min\r\n\t\tthis.tableElement.style.minWidth = \"\";\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, minHeight;\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\tminHeight = isNaN(this.table.options.minHeight) ? this.table.options.minHeight : this.table.options.minHeight + \"px\";\r\n\t\t\t\t\r\n\t\t\t\tthis.element.style.minHeight = 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\r\n\t\t\tthis.scrollBarCheck();\r\n\t\t}\r\n\t\t\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//reinitialize 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 left = 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}\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\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\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){\r\n\t\tthis.activate();\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){\r\n\t\tthis.activate();\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(){\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\t}\r\n\r\n\tredraw(){\r\n\t\tthis.dispatch(\"footer-redraw\");\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.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\"mouseup\",\r\n\t\t\t\"mousedown\",\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, this.pseudoTrackers[key].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\tif(!targets[this.componentMap[target]]){\r\n\t\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t\t}\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\tmatches = {},\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\ttarget = targets[key],\r\n\t\t\tpreviousTarget = 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\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\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\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\t\treturn row.getElement() === target;\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\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\t\ttargets[key] = 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\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t\t}\r\n\t\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\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\t\tif(matches[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\t\tcomponent = matches[\"row\"].findCell(target);\r\n\t\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\t\t\t\t\t\t\t\t\tconsole.warn(\"Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?\");\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\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\tmatches[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 matches;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\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\tif(this.table.options.debugInvalidComponentFuncs){\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\t}\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.requestOrder = 0; //prevent requests coming 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\r\n\tload(data, params, config, replace, silent, columnsChanged){\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.alertLoader();\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.clearAlert();\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, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\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.alertError();\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.clearAlert();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t\t.finally(() => {\r\n\t\t\t\t\tthis.loading = false;\r\n\t\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, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\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\talertLoader(){\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.table.alertManager.alert(this.table.options.dataLoaderLoading || this.langText(\"data|loading\"));\r\n\t\t}\r\n\t}\r\n\r\n\talertError(){\r\n\t\tthis.table.alertManager.alert(this.table.options.dataLoaderError || this.langText(\"data|error\"), \"error\");\r\n\t}\r\n\r\n\tclearAlert(){\r\n\t\tthis.table.alertManager.clear();\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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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_notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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_notifySubscriptionChange(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\tsubscriber.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 CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DeprecationAdvisor extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\t\r\n\t_warnUser(){\r\n\t\tif(this.options(\"debugDeprecation\")){\r\n\t\t\tconsole.warn(...arguments);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheck(oldOption, newOption){\r\n\t\tvar msg = \"\";\r\n\t\t\r\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\r\n\t\t\tmsg = \"Deprecated Setup Option - Use of the %c\" + oldOption + \"%c option is now deprecated\";\r\n\t\t\t\r\n\t\t\tif(newOption){\r\n\t\t\t\tmsg = msg + \", Please use the %c\" + newOption + \"%c option instead\";\r\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t}else{\r\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMsg(oldOption, msg){\r\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\r\n\t\t\tthis._warnUser(\"%cDeprecated Setup Option - Use of the %c\" + oldOption + \" %c option is now deprecated, \" + msg, 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tmsg(msg){\r\n\t\tthis._warnUser(msg);\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\nimport Helpers from './Helpers.js';\r\n\r\nexport default class Popup extends CoreFeature{\r\n\tconstructor(table, element, parent){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = element;\r\n\t\tthis.container = this._lookupContainer();\r\n\t\t\r\n\t\tthis.parent = parent;\r\n\t\t\r\n\t\tthis.reversedX = false;\r\n\t\tthis.childPopup = null;\r\n\t\tthis.blurable = false;\r\n\t\tthis.blurCallback = null;\r\n\t\tthis.blurEventsBound = false;\r\n\t\tthis.renderedCallback = null;\r\n\t\t\r\n\t\tthis.visible = false;\r\n\t\tthis.hideable = true;\r\n\t\t\r\n\t\tthis.element.classList.add(\"tabulator-popup-container\");\r\n\t\t\r\n\t\tthis.blurEvent = this.hide.bind(this, false);\r\n\t\tthis.escEvent = this._escapeCheck.bind(this);\r\n\t\t\r\n\t\tthis.destroyBinding = this.tableDestroyed;\r\n\t\tthis.destroyed = false;\r\n\t}\r\n\t\r\n\ttableDestroyed(){\r\n\t\tthis.destroyed = true;\r\n\t\tthis.hide(true);\r\n\t}\r\n\t\r\n\t_lookupContainer(){\r\n\t\tvar container = this.table.options.popupContainer;\r\n\t\t\r\n\t\tif(typeof container === \"string\"){\r\n\t\t\tcontainer = document.querySelector(container);\r\n\t\t\t\r\n\t\t\tif(!container){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.popupContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (container === true){\r\n\t\t\tcontainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(container && !this._checkContainerIsParent(container)){\r\n\t\t\tcontainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.popupContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!container){\r\n\t\t\tcontainer = document.body;\r\n\t\t}\r\n\t\t\r\n\t\treturn container;\r\n\t}\r\n\t\r\n\t_checkContainerIsParent(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._checkContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\trenderCallback(callback){\r\n\t\tthis.renderedCallback = callback;\r\n\t}\r\n\t\r\n\tcontainerEventCoords(e){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar x = touch ? e.touches[0].pageX : e.pageX;\r\n\t\tvar y = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\r\n\t\tif(this.container !== document.body){\r\n\t\t\tlet parentOffset = Helpers.elOffset(this.container);\r\n\t\t\t\r\n\t\t\tx -= parentOffset.left;\r\n\t\t\ty -= parentOffset.top;\r\n\t\t}\r\n\t\t\r\n\t\treturn {x, y};\r\n\t}\r\n\t\r\n\telementPositionCoords(element, position = \"right\"){\r\n\t\tvar offset = Helpers.elOffset(element),\r\n\t\tcontainerOffset, x, y;\r\n\t\t\r\n\t\tif(this.container !== document.body){\r\n\t\t\tcontainerOffset = Helpers.elOffset(this.container);\r\n\t\t\t\r\n\t\t\toffset.left -= containerOffset.left;\r\n\t\t\toffset.top -= containerOffset.top;\r\n\t\t}\r\n\t\t\r\n\t\tswitch(position){\r\n\t\t\tcase \"right\":\r\n\t\t\t\tx = offset.left + element.offsetWidth;\r\n\t\t\t\ty = offset.top - 1;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"bottom\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top + element.offsetHeight;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"left\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top - 1;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"top\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"center\":\r\n\t\t\t\tx = offset.left + (element.offsetWidth / 2);\r\n\t\t\t\ty = offset.top + (element.offsetHeight / 2);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn {x, y, offset};\r\n\t}\r\n\t\r\n\tshow(origin, position){\r\n\t\tvar x, y, parentEl, parentOffset, coords;\r\n\t\t\r\n\t\tif(this.destroyed || this.table.destroyed){\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\tif(origin instanceof HTMLElement){\r\n\t\t\tparentEl = origin;\r\n\t\t\tcoords = this.elementPositionCoords(origin, position);\r\n\t\t\t\r\n\t\t\tparentOffset = coords.offset;\r\n\t\t\tx = coords.x;\r\n\t\t\ty = coords.y;\r\n\t\t\t\r\n\t\t}else if(typeof origin === \"number\"){\r\n\t\t\tparentOffset = {top:0, left:0};\r\n\t\t\tx = origin;\r\n\t\t\ty = position;\r\n\t\t}else{\r\n\t\t\tcoords = this.containerEventCoords(origin);\r\n\t\t\t\r\n\t\t\tx = coords.x;\r\n\t\t\ty = coords.y;\r\n\t\t\t\r\n\t\t\tthis.reversedX = false;\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.style.top = y + \"px\";\r\n\t\tthis.element.style.left = x + \"px\";\r\n\t\t\r\n\t\tthis.container.appendChild(this.element);\r\n\t\t\r\n\t\tif(typeof this.renderedCallback === \"function\"){\r\n\t\t\tthis.renderedCallback();\r\n\t\t}\r\n\t\t\r\n\t\tthis._fitToScreen(x, y, parentEl, parentOffset, position);\r\n\t\t\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.destroyBinding);\r\n\t\t\r\n\t\tthis.element.addEventListener(\"mousedown\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\t_fitToScreen(x, y, parentEl, parentOffset, position){\r\n\t\tvar scrollTop = this.container === document.body ? document.documentElement.scrollTop : this.container.scrollTop;\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 + this.element.offsetWidth) >= this.container.offsetWidth || this.reversedX){\r\n\t\t\tthis.element.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.reversedX = 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 + this.element.offsetHeight) > Math.max(this.container.offsetHeight, scrollTop ? this.container.scrollHeight : 0)) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"bottom\":\r\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight - parentEl.offsetHeight - 1) + \"px\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisVisible(){\r\n\t\treturn this.visible;\r\n\t}\r\n\t\r\n\thideOnBlur(callback){\r\n\t\tthis.blurable = true;\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tif(this.visible){\r\n\t\t\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\t\t\tthis.subscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"mousedown\", this.blurEvent);\r\n\t\t\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\r\n\t\t\t\t\tthis.blurEventsBound = true;\r\n\t\t\t\t}\r\n\t\t\t}, 100);\r\n\t\t\t\r\n\t\t\tthis.blurCallback = callback;\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\t_escapeCheck(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockHide(){\r\n\t\tthis.hideable = false;\r\n\t}\r\n\t\r\n\trestoreHide(){\r\n\t\tthis.hideable = true;\r\n\t}\r\n\t\r\n\thide(silent = false){\r\n\t\tif(this.visible && this.hideable){\r\n\t\t\tif(this.blurable && this.blurEventsBound){\r\n\t\t\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"mousedown\", this.blurEvent);\r\n\t\t\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\t\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\t\t\tthis.unsubscribe(\"cell-editing\", this.blurEvent);\r\n\r\n\t\t\t\tthis.blurEventsBound = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.childPopup){\r\n\t\t\t\tthis.childPopup.hide();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.childPopup = null;\r\n\t\t\t}\r\n\t\t\t\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\t\r\n\t\t\tthis.visible = false;\r\n\t\t\t\r\n\t\t\tif(this.blurCallback && !silent){\r\n\t\t\t\tthis.blurCallback();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.unsubscribe(\"table-destroy\", this.destroyBinding);\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\tchild(element){\r\n\t\tif(this.childPopup){\r\n\t\t\tthis.childPopup.hide();\r\n\t\t}\r\n\t\t\r\n\t\tthis.childPopup = new Popup(this.table, element, this);\r\n\t\t\r\n\t\treturn this.childPopup;\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Popup from './tools/Popup.js';\r\n\r\nclass Module extends CoreFeature{\r\n\t\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis._handler = null;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overridden in module\r\n\t}\r\n\t\r\n\t\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\t\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\t\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t/// Public Function Registration ///\r\n\t///////////////////////////////////\r\n\t\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = (...args) => {\r\n\t\t\t\tthis.table.initGuard(name);\r\n\t\t\t\t\r\n\t\t\t\treturn func(...args);\r\n\t\t\t};\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\t\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\t\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\t\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\t\r\n\tdisplayRows(adjust){\r\n\t\tvar index = this.table.rowManager.displayRows.length - 1, \r\n\t\tlookupIndex;\r\n\t\t\r\n\t\tif(this._handler){\r\n\t\t\tlookupIndex = this.table.rowManager.displayPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === this._handler;\r\n\t\t\t});\r\n\r\n\t\t\tif(lookupIndex > -1){\r\n\t\t\t\tindex = lookupIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(adjust){\r\n\t\t\tindex = index + adjust;\r\n\t\t}\r\n\r\n\t\tif(this._handler){\r\n\t\t\tif(index > -1){\r\n\t\t\t\treturn this.table.rowManager.getDisplayRows(index);\r\n\t\t\t}else{\r\n\t\t\t\treturn this.activeRows();\r\n\t\t\t}\r\n\t\t}\t\r\n\t}\r\n\t\r\n\tactiveRows(){\r\n\t\treturn this.table.rowManager.activeRows;\r\n\t}\r\n\t\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\t\t\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\t\r\n\t///////////////////////////////////\r\n\t//////// Footer Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tfooterAppend(element){\r\n\t\treturn this.table.footerManager.append(element);\r\n\t}\r\n\t\r\n\tfooterPrepend(element){\r\n\t\treturn this.table.footerManager.prepend(element);\r\n\t}\r\n\t\r\n\tfooterRemove(element){\r\n\t\treturn this.table.footerManager.remove(element);\r\n\t} \r\n\t\r\n\t///////////////////////////////////\r\n\t//////// Popups Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tpopup(menuEl, menuContainer){\r\n\t\treturn new Popup(this.table, menuEl, menuContainer);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t//////// Alert Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\talert(content, type){\r\n\t\treturn this.table.alertManager.alert(content, type);\r\n\t}\r\n\t\r\n\tclearAlert(){\r\n\t\treturn this.table.alertManager.clear();\r\n\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, forced){\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, forced){\r\n\tif(forced){\r\n\t\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\t}\r\n\t\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, forced){\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, forced){\r\n\tvar totalWidth = this.table.rowManager.element.getBoundingClientRect().width; //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 across 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 across 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\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 = 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\tgapFill = 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//calculate 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(gapFill && 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(dataChanged){\r\n\t\tthis.dispatch(\"layout-refreshing\");\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex, dataChanged);\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 placeholder\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 language 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//determining 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 fillPath = value ? path + \"|\" + value : path,\r\n\t\tpathArray = fillPath.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//iterate 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\t\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFunctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\t\t\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\t\r\n\tbindStaticFunctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\t\t\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\t\t\t\t\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\t\t\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\t\t\t\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\t\t\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\t\t\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\t\t\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedStartMods = [],\r\n\t\t\torderedEndMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\t\t\t\r\n\t\t\tthis.modules = {};\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.modules[name] = module;\r\n\t\t\t\t\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\tif(mod.moduleInitOrder < 0){\r\n\t\t\t\t\t\t\torderedStartMods.push(module);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\torderedEndMods.push(module);\r\n\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\tunOrderedMods.push(module);\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\torderedStartMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\t\t\torderedEndMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\t\t\t\r\n\t\t\tthis.modulesRegular = orderedStartMods.concat(unOrderedMods.concat(orderedEndMods));\r\n\t\t};\r\n\t}\r\n\t\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\t\t\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\t\t\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class Alert extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n \r\n\t\tthis.element = this._createAlertElement();\r\n\t\tthis.msgElement = this._createMsgElement();\r\n\t\tthis.type = null;\r\n \r\n\t\tthis.element.appendChild(this.msgElement);\r\n\t}\r\n \r\n\t_createAlertElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-alert\");\r\n\t\treturn el;\r\n\t}\r\n \r\n\t_createMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-alert-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\t\treturn el;\r\n\t}\r\n \r\n\t_typeClass(){\r\n\t\treturn \"tabulator-alert-state-\" + this.type;\r\n\t}\r\n \r\n\talert(content, type = \"msg\"){\r\n\t\tif(content){\r\n\t\t\tthis.clear();\r\n \r\n\t\t\tthis.type = type;\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.add(this._typeClass());\r\n \r\n\t\t\tif(typeof content === \"function\"){\r\n\t\t\t\tcontent = content();\r\n\t\t\t}\r\n \r\n\t\t\tif(content instanceof HTMLElement){\r\n\t\t\t\tthis.msgElement.appendChild(content);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = content;\r\n\t\t\t}\r\n \r\n\t\t\tthis.table.element.appendChild(this.element);\r\n\t\t}\r\n\t}\r\n \r\n\tclear(){\r\n\t\tif(this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n \r\n\t\tthis.msgElement.classList.remove(this._typeClass());\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 DeprecationAdvisor from './tools/DeprecationAdvisor.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\nimport Alert from './tools/Alert.js';\r\n\r\nclass Tabulator {\r\n\t\r\n\tconstructor(element, options){\r\n\t\t\r\n\t\tthis.options = {};\r\n\t\t\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.alertManager = null; //hold Alert 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\t\t\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\t\t\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\t\t\r\n\t\tthis.deprecationAdvisor = new DeprecationAdvisor(this);\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.destroyed = false;\r\n\t\t\r\n\t\tif(this.initializeElement(element)){\r\n\t\t\t\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\t\t\t\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\t\t\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\t\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\t\t\t\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\t\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\t\tthis.alertManager = new Alert(this);\r\n\t\t\r\n\t\tthis.bindModules();\r\n\t\t\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options);\r\n\t\t\r\n\t\tthis._clearObjectPointers();\r\n\t\t\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\t\t\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\t\t\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\t\t\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\t\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\t\r\n\t_clearSelection(){\r\n\t\t\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\tif (window.getSelection) {\r\n\t\t\tif (window.getSelection().empty) { // Chrome\r\n\t\t\t\twindow.getSelection().empty();\r\n\t\t\t} else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t}\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\t\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\t\t\r\n\t\tthis._rtlCheck();\r\n\t\t\r\n\t\tthis._buildElement();\r\n\t\t\r\n\t\tthis._initializeTable();\r\n\t\t\r\n\t\tthis._loadInitialData();\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\t\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\t\t\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"rtl\":\r\n\t\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\t\tthis.rtl = true;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"ltr\":\r\n\t\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\t\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\t\t\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\t\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\t\t\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\t\t\t\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\t\t\t\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\t\t\t\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\t\t\t\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\t\t\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\t\t\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\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\t\t\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\t\t\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\t\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\t\t\r\n\t\tthis.interactionMonitor.initialize();\r\n\t\t\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\t\t\r\n\t\tthis._detectBrowser();\r\n\t\t\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\t\t\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\t\t\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\t\t\r\n\t\tif(options.autoColumns && options.data){\r\n\t\t\t\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\t\t\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\t\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\t\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\t\t\r\n\t\tthis.destroyed = true;\r\n\t\t\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\t\t\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\t\t\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\t\t\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\t\t\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\r\n\t\tthis.externalEvents.dispatch(\"tableDestroyed\");\r\n\t}\r\n\t\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\t\t\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\t\t\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\t\r\n\tinitGuard(func, msg){\r\n\t\tvar stack, line;\r\n\t\t\r\n\t\tif(this.options.debugInitialization && !this.initialized){\r\n\t\t\tif(!func){\r\n\t\t\t\tstack = new Error().stack.split(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tline = stack[0] == \"Error\" ? stack[2] : stack[1];\r\n\t\t\t\t\r\n\t\t\t\tif(line[0] == \" \"){\r\n\t\t\t\t\tfunc = line.trim().split(\" \")[1].split(\".\")[1];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfunc = line.trim().split(\"@\")[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconsole.warn(\"Table Not Initialized - Calling the \" + func + \" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function.\" + (msg ? \" \" + msg : \"\"));\r\n\t\t}\r\n\t\t\r\n\t\treturn this.initialized;\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-blocking\");\r\n\t\t\r\n\t\tthis.rowManager.blockRedraw();\r\n\t\tthis.columnManager.blockRedraw();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-blocked\");\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-restoring\");\r\n\r\n\t\tthis.rowManager.restoreRedraw();\r\n\t\tthis.columnManager.restoreRedraw();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-restored\");\r\n\t}\r\n\t\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tthis.initGuard(false, \"To set initial data please use the 'data' property in the table constructor.\");\r\n\t\t\r\n\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t}\r\n\t\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\t\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\t\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\t\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t}\r\n\t\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data && data.length > 0){\r\n\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\tresponses++;\r\n\t\t\t\t\t\t\r\n\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\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}\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\taddData(data, pos, index){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data){\r\n\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\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data && data.length > 0){\r\n\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tresponses++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\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\t\t\t\t\t\t\t\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}else{\r\n\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\t\t\t\t\t\t\t\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}\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\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\t\r\n\t//get row object\r\n\tgetRowFromPosition(position){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position);\r\n\t\t\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\t\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\t\t\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\t\t\t\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}\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\t\t\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\t\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\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}\r\n\t\r\n\t//update a row if it exists otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t\t.then(()=>{\r\n\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t\t.then((rows)=>{\r\n\t\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t\t.then(()=>{\r\n\t\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\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\t\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\t\t\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\t\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\t\r\n\t}\r\n\t\r\n\t//get position of row in table\r\n\tgetRowPosition(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.getPosition();\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\t\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tthis.initGuard(false, \"To set initial columns please use the 'columns' property in the table constructor\");\r\n\t\t\r\n\t\tthis.columnManager.setColumns(definition);\r\n\t}\r\n\t\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\t\r\n\tgetColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tif(column){\r\n\t\t\treturn column.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\t\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\t\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field); \r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t\t.then((column) => {\r\n\t\t\t\treturn column.getComponent();\r\n\t\t\t});\r\n\t}\r\n\t\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from),\r\n\t\ttoColumn = this.columnManager.findColumn(to);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\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\t\t\t\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\t\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.columnManager.redraw(force);\r\n\t\tthis.rowManager.redraw(force);\r\n\t}\r\n\t\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\t\r\n\t//////////////////// Event Bus ///////////////////\r\n\t\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\t\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\t\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments);\r\n\t\targs.shift();\r\n\t\t\r\n\t\tthis.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\t//////////////////// Alerts ///////////////////\r\n\r\n\talert(contents, type){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.alertManager.alert(contents, type);\r\n\t}\r\n\r\n\tclearAlert(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.alertManager.clear();\r\n\t}\r\n\t\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\t\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\t\t\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\t\t\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\tdebugInvalidComponentFuncs:true, //allow toggling of invalid component warnings\r\n\tdebugInitialization:true, //allow toggling of pre initialization function call warnings\r\n\tdebugDeprecation:true, //allow toggling of deprecation 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\tpopupContainer:false,\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\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\trowHeight: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 defaultAccessors 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\t\tif(Accessor.accessors[value]){\r\n\t\t\t\t\taccessor = Accessor.accessors[value];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\taccessor = value;\r\n\t\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, colComponent;\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\tcolComponent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colComponent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colComponent, 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 = defaultAccessors;\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\t.then((data)=>{\r\n\t\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\treturn data;\r\n\t\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\t.then((response)=>{\r\n\t\t\t\t\tif(response.ok) {\r\n\t\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\t\treject(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\t.catch((error)=>{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\t\treject(error);\r\n\t\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); //DEPRECATED - 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\tlist = 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.generateHTMLTable(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\t\tvalue = JSON.stringify(col.value);\r\n\t\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\t\tvalue = \"\";\r\n\t\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\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 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\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\t\tif(!this.pasteAction){\r\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tthis.pasteAction = action;\r\n\t\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\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\t\tif(!this.pasteParser){\r\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tthis.pasteParser = parser;\r\n\t\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\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\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\t\r\n\t\tthis.blocked = false;\r\n\t\tthis.recalcAfterBlock = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\t\t\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\t\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\t\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\t\t\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\t\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"redraw-blocked\", this.blockRedraw.bind(this));\r\n\t\tthis.subscribe(\"redraw-restored\", this.restoreRedraw.bind(this));\r\n\t\t\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\t\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t\t\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockRedraw(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.recalcAfterBlock = false;\r\n\t}\r\n\t\r\n\t\r\n\trestoreRedraw(){\r\n\t\tthis.blocked = false;\r\n\t\t\r\n\t\tif(this.recalcAfterBlock){\r\n\t\t\tthis.recalcAfterBlock = false;\r\n\t\t\tthis.recalcActiveRowsRefresh();\r\n\t\t}\r\n\t}\r\n\t\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\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tblockCheck(){\r\n\t\tif(this.blocked){\r\n\t\t\tthis.recalcAfterBlock = true;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.blocked;\r\n\t}\r\n\t\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\t\t\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(row);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\t\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\t\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\t\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\t\t\t\t\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\t\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\t\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\t\t\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\t\t\r\n\t\tif(def.topCalc){\r\n\t\t\t\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\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\tcase \"function\":\r\n\t\t\t\t\tconfig.topCalc = def.topCalc;\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(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\t\t\t\t\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\t\t\t\r\n\t\t}\r\n\t\t\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\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\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\tcase \"function\":\r\n\t\t\t\t\tconfig.botCalc = def.bottomCalc;\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(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\t\t\t\t\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\t\t\r\n\t}\r\n\t\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){}\r\n\t\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\t\t\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\t\t\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.footerRemove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getContentsElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.footerPrepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botElement.scrollLeft = left;\r\n\t\t}\r\n\t}\r\n\t\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\t\t\r\n\t\tif(!this.blockCheck()){\r\n\t\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\t\tdata = this.rowsToData(rows);\r\n\t\t\t\t\r\n\t\t\t\tif(this.topInitialized){\r\n\t\t\t\t\tif(this.topRow){\r\n\t\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trow = this.generateRow(\"top\", data);\r\n\t\t\t\t\tthis.topRow = row;\r\n\t\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\t\trow.initialize(true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(this.botInitialized){\r\n\t\t\t\t\tif(this.botRow){\r\n\t\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trow = this.generateRow(\"bottom\", data);\r\n\t\t\t\t\tthis.botRow = row;\r\n\t\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\t\trow.initialize(true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t\t\t\r\n\t\t\t\t//set resizable handles\r\n\t\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\t\t\t\t\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\t\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\t\t\r\n\t\tif(!this.blockCheck()){\r\n\t\t\tif(group){\r\n\t\t\t\tif(group.calcs){\r\n\t\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\t\tgroup.calcs.top.reinitialize();\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\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\t\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\t\t\t\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\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\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\t\t\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\t\t\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\t\t\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\t\t\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\t\t\r\n\t\trow.component = false;\r\n\t\t\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\t\t\t\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\t\t\r\n\t\trow.generateCells = () => {\r\n\t\t\t\r\n\t\t\tvar cells = [];\r\n\t\t\t\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\t\r\n\t\t\t\t//set field name of mock column\r\n\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\t\t\t\t\r\n\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//ensure css class definition is replicated to calculation cell\r\n\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\t\t\t\t\r\n\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\tcell.getElement();\r\n\t\t\t\tcell.column = column;\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t\t\r\n\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\tcells.push(cell);\r\n\t\t\t\t\r\n\t\t\t\tif(!column.visible){\r\n\t\t\t\t\tcell.hide();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\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\t\t\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\t\t\t\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\t\t\t\t\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\t\t\t\t\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\t\t\r\n\t\treturn rowData;\r\n\t}\r\n\t\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\t\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\t\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\t\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\t\t\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\t\t\t\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\t\t\r\n\t\treturn results;\r\n\t}\r\n\t\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\t\t\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\t\t\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\t\t\r\n\t\treturn results;\r\n\t}\r\n\t\r\n\tadjustForScrollbar(width){\r\n\t\tif(this.botRow){\r\n\t\t\tif(this.table.rtl){\r\n\t\t\t\tthis.botElement.style.paddingLeft = width + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.botElement.style.paddingRight = width + \"px\";\r\n\t\t\t}\r\n\t\t}\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\nimport RowComponent from '../../core/row/RowComponent.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.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);//selecting 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(this.options(\"movableRows\")){\r\n\t\t\t\tconsole.warn(\"The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior\");\r\n\t\t\t}\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\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t\t};\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t\t};\r\n\t\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\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedrawing.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\ttableRedrawing(force){\r\n\t\tvar rows;\r\n\r\n\t\tif(force){\r\n\t\t\trows = this.table.rowManager.getRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.reinitializeRowChildren(row);\r\n\t\t\t});\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\toldControl = config.controlEl;\r\n\r\n\t\tel = el || row.getCells()[0].getElement();\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\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\tgetTreeParentRoot(row){\r\n\t\treturn row.modules.dataTree && row.modules.dataTree.parent ? this.getTreeParentRoot(row.modules.dataTree.parent) : row;\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}else if(subject === null){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\"){\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.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\t\tconsole.warn(\"Download Warning - CSV 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 - CSV downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\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\r\n\t\t\t\t\tif(col){\r\n\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\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\r\n\t\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\t\tcol.value = \"\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(item.join(delimiter));\r\n\t\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}\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\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(item);\r\n\t\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.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\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\t\theader.push(parseRow(row));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\tbody.push(parseRow(row));\r\n\t\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\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\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.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.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n}\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\tcompression = 'compress' in options ? options.compress : true,\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\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary', compression });\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.generateHTMLTable(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(\"downloadEncoder\", function(data, mimeType){\r\n\t\t\treturn new Blob([data],{type:mimeType});\r\n\t\t}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadReady\", undefined); //warn of function deprecation\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.deprecatedOptionsCheck();\r\n\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\tdeprecatedOptionsCheck(){\r\n\t\tthis.deprecationCheck(\"downloadReady\", \"downloadEncoder\");\r\n\t}\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 = this.table.options.downloadEncoder(data, mime);\r\n\r\n\t\tif(blob){\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\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\t\t\t\t\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\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\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\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\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\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\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\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\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\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\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;\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\nimport urlBuilder from '../Ajax/defaults/urlGenerator.js';\r\n\r\nexport default class Edit{\r\n\tconstructor(editor, cell, onRendered, success, cancel, editorParams){\r\n\t\tthis.edit = editor;\r\n\t\tthis.table = editor.table;\r\n\t\tthis.cell = cell;\r\n\t\tthis.params = this._initializeParams(editorParams);\r\n\t\t\r\n\t\tthis.data = [];\r\n\t\tthis.displayItems = [];\r\n\t\tthis.currentItems = [];\r\n\t\tthis.focusedItem = null;\r\n\t\t\r\n\t\tthis.input = this._createInputElement();\r\n\t\tthis.listEl = this._createListElement();\r\n\t\t\r\n\t\tthis.initialValues = null; \r\n\t\t\r\n\t\tthis.isFilter = !cell._getSelf;\r\n\t\t\r\n\t\tthis.filterTimeout = null;\r\n\t\tthis.filtered = false;\r\n\t\tthis.typing = false;\r\n\t\t\r\n\t\tthis.values = []; \r\n\t\tthis.popup = null; \r\n\t\t\r\n\t\tthis.listIteration = 0;\r\n\t\t\r\n\t\tthis.lastAction=\"\";\r\n\t\tthis.filterTerm=\"\";\r\n\t\t\r\n\t\tthis.blurable = true;\r\n\t\t\r\n\t\tthis.actions = {\r\n\t\t\tsuccess:success,\r\n\t\t\tcancel:cancel\r\n\t\t};\r\n\t\t\r\n\t\tthis._deprecatedOptionsCheck();\r\n\t\tthis._initializeValue();\r\n\t\t\r\n\t\tonRendered(this._onRendered.bind(this));\r\n\t}\r\n\t\r\n\t_deprecatedOptionsCheck(){\r\n\t\tif(this.params.listItemFormatter){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.sortValuesList){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.searchFunc){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.searchingPlaceholder){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t_initializeValue(){\r\n\t\tvar initialValue = this.cell.getValue();\r\n\t\t\r\n\t\tif(typeof initialValue === \"undefined\" && typeof this.params.defaultValue !== \"undefined\"){\r\n\t\t\tinitialValue = this.params.defaultValue;\r\n\t\t}\r\n\t\t\r\n\t\tthis.initialValues = this.params.multiselect ? initialValue : [initialValue];\r\n\t\t\r\n\t\tif(this.isFilter){\r\n\t\t\tthis.input.value = this.initialValues ? this.initialValues.join(\",\") : \"\";\r\n\t\t\tthis.headerFilterInitialListGen(); \r\n\t\t}\r\n\t}\r\n\t\r\n\t_onRendered(){\r\n\t\tvar cellEl = this.cell.getElement();\r\n\t\t\r\n\t\tfunction clickStop(e){\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\t\t\r\n\t\tthis.input.style.height = \"100%\";\r\n\t\tthis.input.focus({preventScroll: true});\r\n\t\t\r\n\t\t\r\n\t\tcellEl.addEventListener(\"click\", clickStop);\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tcellEl.removeEventListener(\"click\", clickStop);\r\n\t\t}, 1000);\r\n\t\t\r\n\t\tthis.input.addEventListener(\"mousedown\", this._preventPopupBlur.bind(this));\r\n\t}\r\n\t\r\n\t_createListElement(){\r\n\t\tvar listEl = document.createElement(\"div\");\r\n\t\tlistEl.classList.add(\"tabulator-edit-list\");\r\n\t\t\r\n\t\tlistEl.addEventListener(\"mousedown\", this._preventBlur.bind(this));\r\n\t\tlistEl.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\r\n\t\t\r\n\t\treturn listEl;\r\n\t}\r\n\t\r\n\t_setListWidth(){\r\n\t\tvar element = this.isFilter ? this.input : this.cell.getElement();\r\n\t\t\r\n\t\tthis.listEl.style.minWidth = element.offsetWidth + \"px\";\r\n\t\t\r\n\t\tif(this.params.maxWidth){\r\n\t\t\tif(this.params.maxWidth === true){\r\n\t\t\t\tthis.listEl.style.maxWidth = element.offsetWidth + \"px\";\r\n\t\t\t}else if(typeof this.params.maxWidth === \"number\"){\r\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\t_createInputElement(){\r\n\t\tvar attribs = this.params.elementAttributes;\r\n\t\tvar input = document.createElement(\"input\");\r\n\t\t\r\n\t\tinput.setAttribute(\"type\", this.params.clearable ? \"search\" : \"text\");\r\n\t\t\r\n\t\tinput.style.padding = \"4px\";\r\n\t\tinput.style.width = \"100%\";\r\n\t\tinput.style.boxSizing = \"border-box\";\r\n\t\t\r\n\t\tif(!this.params.autocomplete){\r\n\t\t\tinput.style.cursor = \"default\";\r\n\t\t\tinput.style.caretColor = \"transparent\";\r\n\t\t\t// input.readOnly = (this.edit.currentCell != false);\r\n\t\t}\r\n\t\t\r\n\t\tif(attribs && typeof attribs == \"object\"){\r\n\t\t\tfor (let key in attribs){\r\n\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + attribs[\"+\" + key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinput.setAttribute(key, attribs[key]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.mask){\r\n\t\t\tmaskInput(input, this.params);\r\n\t\t}\r\n\t\t\r\n\t\tthis._bindInputEvents(input);\r\n\t\t\r\n\t\treturn input;\r\n\t}\r\n\t\r\n\t_initializeParams(params){\r\n\t\tvar valueKeys = [\"values\", \"valuesURL\", \"valuesLookup\"],\r\n\t\tvalueCheck;\r\n\t\t\r\n\t\tparams = Object.assign({}, params);\r\n\t\t\r\n\t\tparams.verticalNavigation = params.verticalNavigation || \"editor\";\r\n\t\tparams.placeholderLoading = typeof params.placeholderLoading === \"undefined\" ? \"Searching ...\" : params.placeholderLoading;\r\n\t\tparams.placeholderEmpty = typeof params.placeholderEmpty === \"undefined\" ? \"No Results Found\" : params.placeholderEmpty;\r\n\t\tparams.filterDelay = typeof params.filterDelay === \"undefined\" ? 300 : params.filterDelay;\r\n\t\t\r\n\t\tparams.emptyValue = Object.keys(params).includes(\"emptyValue\") ? params.emptyValue : \"\";\r\n\t\t\r\n\t\tvalueCheck = Object.keys(params).filter(key => valueKeys.includes(key)).length;\r\n\t\t\r\n\t\tif(!valueCheck){\r\n\t\t\tconsole.warn(\"list editor config error - either the values, valuesURL, or valuesLookup option must be set\");\r\n\t\t}else if(valueCheck > 1){\r\n\t\t\tconsole.warn(\"list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor\");\r\n\t\t}\r\n\t\t\r\n\t\tif(params.autocomplete){\r\n\t\t\tif(params.multiselect){\r\n\t\t\t\tparams.multiselect = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - multiselect option is not available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(params.freetext){\r\n\t\t\t\tparams.freetext = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - freetext option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.filterFunc){\r\n\t\t\t\tparams.filterFunc = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - filterFunc option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.filterRemote){\r\n\t\t\t\tparams.filterRemote = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - filterRemote option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.mask){\r\n\t\t\t\tparams.mask = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - mask option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.allowEmpty){\r\n\t\t\t\tparams.allowEmpty = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - allowEmpty option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.listOnEmpty){\r\n\t\t\t\tparams.listOnEmpty = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - listOnEmpty option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(params.filterRemote && !(typeof params.valuesLookup === \"function\" || params.valuesURL)){\r\n\t\t\tparams.filterRemote = false;\r\n\t\t\tconsole.warn(\"list editor config error - filterRemote option should only be used when values list is populated from a remote source\");\r\n\t\t}\r\n\t\treturn params;\r\n\t}\r\n\t//////////////////////////////////////\r\n\t////////// Event Handling ////////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_bindInputEvents(input){\r\n\t\tinput.addEventListener(\"focus\", this._inputFocus.bind(this));\r\n\t\tinput.addEventListener(\"click\", this._inputClick.bind(this));\r\n\t\tinput.addEventListener(\"blur\", this._inputBlur.bind(this));\r\n\t\tinput.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\r\n\t\tinput.addEventListener(\"search\", this._inputSearch.bind(this));\r\n\t\t\r\n\t\tif(this.params.autocomplete){\r\n\t\t\tinput.addEventListener(\"keyup\", this._inputKeyUp.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t_inputFocus(e){\r\n\t\tthis.rebuildOptionsList();\r\n\t}\r\n\t\r\n\t_filter(){\r\n\t\tif(this.params.filterRemote){\r\n\t\t\tclearTimeout(this.filterTimeout);\r\n\t\t\t\r\n\t\t\tthis.filterTimeout = setTimeout(() => {\r\n\t\t\t\tthis.rebuildOptionsList();\r\n\t\t\t}, this.params.filterDelay);\r\n\t\t}else{\r\n\t\t\tthis._filterList();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputClick(e){\r\n\t\te.stopPropagation();\r\n\t}\r\n\t\r\n\t_inputBlur(e){\r\n\t\tif(this.blurable){\r\n\t\t\tif(this.popup){\r\n\t\t\t\tthis.popup.hide();\r\n\t\t\t}else{\r\n\t\t\t\tthis._resolveValue(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputSearch(){\r\n\t\tthis._clearChoices();\r\n\t}\r\n\t\r\n\t_inputKeyDown(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t\r\n\t\t\tcase 38: //up arrow\r\n\t\t\t\tthis._keyUp(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 40: //down arrow\r\n\t\t\t\tthis._keyDown(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\t\tthis._keySide(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tthis._keyEnter();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tthis._keyEsc();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t\tthis._keyHomeEnd(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 9: //tab\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis._keySelectLetter(e);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputKeyUp(e){\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\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis._keyAutoCompLetter(e);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_preventPopupBlur(){\r\n\t\tif(this.popup){\r\n\t\t\tthis.popup.blockHide();\r\n\t\t}\r\n\t\t\r\n\t\tsetTimeout(() =>{\r\n\t\t\tif(this.popup){\r\n\t\t\t\tthis.popup.restoreHide();\r\n\t\t\t}\r\n\t\t}, 10);\r\n\t}\r\n\t\r\n\t_preventBlur(){\r\n\t\tthis.blurable = false;\r\n\t\t\r\n\t\tsetTimeout(() =>{\r\n\t\t\tthis.blurable = true;\r\n\t\t}, 10);\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Keyboard Navigation /////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_keyUp(e){\r\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\r\n\t\t\r\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index)){\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tif(index > 0){\r\n\t\t\t\tthis._focusItem(this.displayItems[index - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyDown(e){\r\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\r\n\t\t\r\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index < this.displayItems.length - 1)){\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tif(index < this.displayItems.length - 1){\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tthis._focusItem(this.displayItems[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis._focusItem(this.displayItems[index + 1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keySide(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t}\r\n\t\r\n\t_keyEnter(e){\r\n\t\tif(this.params.autocomplete && this.lastAction === \"typing\"){\r\n\t\t\tthis._resolveValue(true);\r\n\t\t}else{\r\n\t\t\tif(this.focusedItem){\r\n\t\t\t\tthis._chooseItem(this.focusedItem);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyEsc(e){\r\n\t\tthis._cancel();\r\n\t}\r\n\t\r\n\t_keyHomeEnd(e){\r\n\t\tif(this.params.autocomplete){\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keySelectLetter(e){\r\n\t\tif(!this.params.autocomplete){\r\n\t\t\t// if(this.edit.currentCell === false){\r\n\t\t\te.preventDefault();\r\n\t\t\t// }\r\n\t\t\t\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tthis._scrollToValue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyAutoCompLetter(e){\r\n\t\tthis._filter();\r\n\t\tthis.lastAction = \"typing\";\r\n\t\tthis.typing = true;\r\n\t}\r\n\t\r\n\t\r\n\t_scrollToValue(char){\r\n\t\tclearTimeout(this.filterTimeout);\r\n\t\t\r\n\t\tvar character = String.fromCharCode(char).toLowerCase();\r\n\t\tthis.filterTerm += character.toLowerCase();\r\n\t\t\r\n\t\tvar match = this.displayItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(this.filterTerm);\r\n\t\t});\r\n\t\t\r\n\t\tif(match){\r\n\t\t\tthis._focusItem(match);\r\n\t\t}\r\n\t\t\r\n\t\tthis.filterTimeout = setTimeout(() => {\r\n\t\t\tthis.filterTerm = \"\";\r\n\t\t}, 800);\r\n\t}\r\n\t\r\n\t_focusItem(item){\r\n\t\tthis.lastAction = \"focus\";\r\n\t\t\r\n\t\tif(this.focusedItem && this.focusedItem.element){\r\n\t\t\tthis.focusedItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.focusedItem = item;\r\n\t\t\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t//////////////////////////////////////\r\n\t/////// Data List Generation /////////\r\n\t//////////////////////////////////////\r\n\theaderFilterInitialListGen(){\r\n\t\tthis._generateOptions(true);\r\n\t}\r\n\t\r\n\trebuildOptionsList(){\r\n\t\tthis._generateOptions()\r\n\t\t\t.then(this._sortOptions.bind(this))\r\n\t\t\t.then(this._buildList.bind(this))\r\n\t\t\t.then(this._showList.bind(this))\r\n\t\t\t.catch((e) => {\r\n\t\t\t\tif(!Number.isInteger(e)){\r\n\t\t\t\t\tconsole.error(\"List generation error\", e);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\t\r\n\t_filterList(){\r\n\t\tthis._buildList(this._filterOptions());\r\n\t\tthis._showList();\r\n\t}\r\n\t\r\n\t_generateOptions(silent){\r\n\t\tvar values = [];\r\n\t\tvar iteration = ++ this.listIteration;\r\n\t\t\r\n\t\tthis.filtered = false;\r\n\t\t\r\n\t\tif(this.params.values){\r\n\t\t\tvalues = this.params.values;\r\n\t\t}else if (this.params.valuesURL){\r\n\t\t\tvalues = this._ajaxRequest(this.params.valuesURL, this.input.value);\r\n\t\t}else{\r\n\t\t\tif(typeof this.params.valuesLookup === \"function\"){\r\n\t\t\t\tvalues = this.params.valuesLookup(this.cell, this.input.value);\r\n\t\t\t}else if(this.params.valuesLookup){\r\n\t\t\t\tvalues = this._uniqueColumnValues(this.params.valuesLookupField);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(values instanceof Promise){\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis._addPlaceholder(this.params.placeholderLoading);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn values.then()\r\n\t\t\t\t.then((responseValues) => {\r\n\t\t\t\t\tif(this.listIteration === iteration){\r\n\t\t\t\t\t\treturn this._parseList(responseValues);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\treturn Promise.reject(iteration);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.resolve(this._parseList(values));\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addPlaceholder(contents){\r\n\t\tvar placeholder = document.createElement(\"div\");\r\n\t\t\r\n\t\tif(typeof contents === \"function\"){\r\n\t\t\tcontents = contents(this.cell.getComponent(), this.listEl);\r\n\t\t}\r\n\t\t\r\n\t\tif(contents){\r\n\t\t\tthis._clearList();\r\n\t\t\t\r\n\t\t\tif(contents instanceof HTMLElement){\r\n\t\t\t\tplaceholder = contents;\r\n\t\t\t}else{\r\n\t\t\t\tplaceholder.classList.add(\"tabulator-edit-list-placeholder\");\r\n\t\t\t\tplaceholder.innerHTML = contents;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.listEl.appendChild(placeholder);\r\n\t\t\t\r\n\t\t\tthis._showList();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_ajaxRequest(url, term){\r\n\t\tvar params = this.params.filterRemote ? {term:term} : {};\r\n\t\turl = urlBuilder(url, {}, params);\r\n\t\t\r\n\t\treturn fetch(url)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\treturn response.json()\r\n\t\t\t\t\t\t.catch((error)=>{\r\n\t\t\t\t\t\t\tconsole.warn(\"List Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t\t\treturn Promise.reject(error);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"List Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treturn Promise.reject(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(\"List Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treturn Promise.reject(error);\r\n\t\t\t});\r\n\t}\r\n\t\r\n\t_uniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = this.table.getData(this.params.valuesLookup),\r\n\t\tcolumn;\r\n\t\t\r\n\t\tif(field){\r\n\t\t\tcolumn = this.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = this.cell.getColumn()._getSelf();\r\n\t\t}\r\n\t\t\r\n\t\tif(column){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\t\t\t\t\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\toutput = [];\r\n\t\t}\r\n\t\t\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\t\r\n\t\r\n\t_parseList(inputValues){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(!Array.isArray(inputValues)){\r\n\t\t\tinputValues = Object.entries(inputValues).map(([key, value]) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tlabel:value,\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tinputValues.forEach((value) => {\r\n\t\t\tif(typeof value !== \"object\"){\r\n\t\t\t\tvalue = {\r\n\t\t\t\t\tlabel:value,\r\n\t\t\t\t\tvalue:value,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._parseListItem(value, data, 0);\r\n\t\t});\r\n\t\t\r\n\t\tif(!this.currentItems.length && this.params.freetext){\r\n\t\t\tthis.input.value = this.initialValues;\r\n\t\t\tthis.typing = true;\r\n\t\t\tthis.lastAction = \"typing\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.data = data;\r\n\t\t\r\n\t\treturn data; \r\n\t}\r\n\t\r\n\t_parseListItem(option, data, level){\r\n\t\tvar item = {};\r\n\t\t\r\n\t\tif(option.options){\r\n\t\t\titem = this._parseListGroup(option, level + 1);\r\n\t\t}else{\r\n\t\t\titem = {\r\n\t\t\t\tlabel:option.label,\r\n\t\t\t\tvalue:option.value,\r\n\t\t\t\titemParams:option.itemParams,\r\n\t\t\t\telementAttributes: option.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t\tselected:false,\r\n\t\t\t\tvisible:true,\r\n\t\t\t\tlevel:level,\r\n\t\t\t\toriginal:option,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tif(this.initialValues && this.initialValues.indexOf(option.value) > -1){\r\n\t\t\t\tthis._chooseItem(item, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdata.push(item);\r\n\t}\r\n\t\r\n\t_parseListGroup(option, level){\r\n\t\tvar item = {\r\n\t\t\tlabel:option.label,\r\n\t\t\tgroup:true,\r\n\t\t\titemParams:option.itemParams,\r\n\t\t\telementAttributes:option.elementAttributes,\r\n\t\t\telement:false,\r\n\t\t\tvisible:true,\r\n\t\t\tlevel:level,\r\n\t\t\toptions:[],\r\n\t\t\toriginal:option,\r\n\t\t};\r\n\t\t\r\n\t\toption.options.forEach((child) => {\r\n\t\t\tthis._parseListItem(child, item.options, level);\r\n\t\t});\r\n\t\t\r\n\t\treturn item;\r\n\t}\r\n\t\r\n\t_sortOptions(options){\r\n\t\tvar sorter;\r\n\t\t\r\n\t\tif(this.params.sort){\r\n\t\t\tsorter = typeof this.params.sort === \"function\" ? this.params.sort : this._defaultSortFunction.bind(this);\r\n\t\t\t\r\n\t\t\tthis._sortGroup(sorter, options);\r\n\t\t}\r\n\t\t\r\n\t\treturn options;\r\n\t}\r\n\t\r\n\t_sortGroup(sorter, options){\r\n\t\toptions.sort((a,b) => {\r\n\t\t\treturn sorter(a.label, b.label, a.value, b.value, a.original, b.original);\r\n\t\t});\r\n\t\t\r\n\t\toptions.forEach((option) => {\r\n\t\t\tif(option.group){\r\n\t\t\t\tthis._sortGroup(sorter, option.options);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_defaultSortFunction(as, bs){\r\n\t\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\t\tvar emptyAlign = 0;\r\n\t\t\r\n\t\tif(this.params.sort === \"desc\"){\r\n\t\t\t[as, bs] = [bs, as];\r\n\t\t}\r\n\t\t\r\n\t\t//handle empty values\r\n\t\tif(!as && as!== 0){\r\n\t\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t\t}else if(!bs && bs!== 0){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\t\ta = String(as).toLowerCase();\r\n\t\t\tb = String(bs).toLowerCase();\r\n\t\t\tif(a === b) return 0;\r\n\t\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\t\ta = a.match(rx);\r\n\t\t\tb = b.match(rx);\r\n\t\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\t\twhile(i < L){\r\n\t\t\t\ta1= a[i];\r\n\t\t\t\tb1= b[i++];\r\n\t\t\t\tif(a1 !== b1){\r\n\t\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn a.length > b.length;\r\n\t\t}\r\n\t\t\r\n\t\treturn emptyAlign;\r\n\t}\r\n\t\r\n\t_filterOptions(){\r\n\t\tvar filterFunc = this.params.filterFunc || this._defaultFilterFunc,\r\n\t\tterm = this.input.value;\r\n\t\t\r\n\t\tif(term){\r\n\t\t\tthis.filtered = true;\r\n\t\t\t\r\n\t\t\tthis.data.forEach((item) => {\r\n\t\t\t\tthis._filterItem(filterFunc, term, item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.filtered = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.data;\r\n\t}\r\n\t\r\n\t_filterItem(func, term, item){\r\n\t\tvar matches = false;\r\n\t\t\r\n\t\tif(!item.group){\r\n\t\t\titem.visible = func(term, item.label, item.value, item.original);\r\n\t\t}else{\r\n\t\t\titem.options.forEach((option) => {\r\n\t\t\t\tif(this._filterItem(func, term, option)){\r\n\t\t\t\t\tmatches = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\titem.visible = matches;\r\n\t\t}\r\n\t\t\r\n\t\treturn item.visible;\r\n\t}\r\n\t\r\n\t_defaultFilterFunc(term, label, value, item){\r\n\t\tterm = String(term).toLowerCase();\r\n\t\t\r\n\t\tif(label !== null && typeof label !== \"undefined\"){\r\n\t\t\tif(String(label).toLowerCase().indexOf(term) > -1 || String(value).toLowerCase().indexOf(term) > -1){\r\n\t\t\t\treturn true;\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\t//////////////////////////////////////\r\n\t/////////// Display List /////////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_clearList(){\r\n\t\twhile(this.listEl.firstChild) this.listEl.removeChild(this.listEl.firstChild);\r\n\t\t\r\n\t\tthis.displayItems = [];\r\n\t}\r\n\t\r\n\t_buildList(data){\r\n\t\tthis._clearList();\r\n\t\t\r\n\t\tdata.forEach((option) => {\r\n\t\t\tthis._buildItem(option);\r\n\t\t});\r\n\t\t\r\n\t\tif(!this.displayItems.length){\r\n\t\t\tthis._addPlaceholder(this.params.placeholderEmpty);\r\n\t\t} \r\n\t}\r\n\t\r\n\t_buildItem(item){\r\n\t\tvar el = item.element,\r\n\t\tcontents;\r\n\t\t\r\n\t\tif(!this.filtered || item.visible){\r\n\t\t\t\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\r\n\t\t\t\tcontents = this.params.itemFormatter ? this.params.itemFormatter(item.label, item.value, item.original, el) : item.label;\r\n\t\t\t\t\r\n\t\t\t\tif(contents instanceof HTMLElement){\r\n\t\t\t\t\tel.appendChild(contents);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.innerHTML = contents;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-group\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-item\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tel.classList.add(\"tabulator-edit-list-group-level-\" + item.level);\r\n\t\t\t\t\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, this.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\t\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.addEventListener(\"click\", this._groupClick.bind(this, item));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.addEventListener(\"click\", this._itemClick.bind(this, item));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tel.addEventListener(\"mousedown\", this._preventBlur.bind(this));\r\n\t\t\t\t\r\n\t\t\t\titem.element = el;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t\tthis.listEl.appendChild(el);\r\n\t\t\t\r\n\t\t\tif(item.group){\r\n\t\t\t\titem.options.forEach((option) => {\r\n\t\t\t\t\tthis._buildItem(option);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayItems.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_showList(){\r\n\t\tvar startVis = this.popup && this.popup.isVisible();\r\n\t\t\r\n\t\tif(this.input.parentNode){\r\n\t\t\tif(this.params.autocomplete && this.input.value === \"\" && !this.params.listOnEmpty){\r\n\t\t\t\tif(this.popup){\r\n\t\t\t\t\tthis.popup.hide(true);\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setListWidth();\r\n\t\t\t\r\n\t\t\tif(!this.popup){\r\n\t\t\t\tthis.popup = this.edit.popup(this.listEl);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.popup.show(this.cell.getElement(), \"bottom\");\r\n\t\t\t\r\n\t\t\tif(!startVis){\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.popup.hideOnBlur(this._resolveValue.bind(this, true));\r\n\t\t\t\t}, 10);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_styleItem(item){\r\n\t\tif(item && item.element){\r\n\t\t\tif(item.selected){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}else{\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// User Interaction ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_itemClick(item, e){\r\n\t\te.stopPropagation();\r\n\t\t\r\n\t\tthis._chooseItem(item);\r\n\t}\r\n\t\r\n\t_groupClick(item, e){\r\n\t\te.stopPropagation();\r\n\t}\r\n\t\r\n\t\r\n\t//////////////////////////////////////\r\n\t////// Current Item Management ///////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_cancel(){\r\n\t\tthis.popup.hide(true);\r\n\t\tthis.actions.cancel();\r\n\t}\r\n\t\r\n\t_clearChoices(){\r\n\t\tthis.typing = true;\r\n\t\t\r\n\t\tthis.currentItems.forEach((item) => {\r\n\t\t\titem.selected = false;\r\n\t\t\tthis._styleItem(item);\r\n\t\t});\r\n\t\t\r\n\t\tthis.currentItems = [];\r\n\t\t\r\n\t\tthis.focusedItem = null;\r\n\t}\r\n\t\r\n\t_chooseItem(item, silent){\r\n\t\tvar index;\r\n\t\t\r\n\t\tthis.typing = false;\r\n\t\t\r\n\t\tif(this.params.multiselect){\r\n\t\t\tindex = this.currentItems.indexOf(item);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.currentItems.splice(index, 1);\r\n\t\t\t\titem.selected = false;\r\n\t\t\t}else{\r\n\t\t\t\tthis.currentItems.push(item);\r\n\t\t\t\titem.selected = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.input.value = this.currentItems.map(item => item.label).join(\",\");\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.currentItems = [item];\r\n\t\t\titem.selected = true;\r\n\t\t\t\r\n\t\t\tthis.input.value = item.label;\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis._resolveValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis._focusItem(item);\r\n\t}\r\n\t\r\n\t_resolveValue(blur){\r\n\t\tvar output, initialValue;\r\n\r\n\t\tif(this.popup){\r\n\t\t\tthis.popup.hide(true);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.multiselect){\r\n\t\t\toutput = this.currentItems.map(item => item.value);\r\n\t\t}else{\r\n\t\t\tif(blur && this.params.autocomplete && this.typing){\r\n\t\t\t\tif(this.params.freetext || (this.params.allowEmpty && this.input.value === \"\")){\r\n\t\t\t\t\toutput = this.input.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.actions.cancel();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.currentItems[0]){\r\n\t\t\t\t\toutput = this.currentItems[0].value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinitialValue = this.initialValues[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(initialValue === null || typeof initialValue === \"undefined\" || initialValue === \"\"){\r\n\t\t\t\t\t\toutput = initialValue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\toutput = this.params.emptyValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(output === \"\"){\r\n\t\t\toutput = this.params.emptyValue;\r\n\t\t}\r\n\t\t\r\n\t\tthis.actions.success(output);\r\n\t\t\r\n\t\tif(this.isFilter){\r\n\t\t\tthis.initialValues = output && !Array.isArray(output) ? [output] : output;\r\n\t\t\tthis.currentItems = [];\r\n\t\t}\r\n\t}\r\n\t\r\n}\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 date from './editors/date.js';\r\nimport time from './editors/time.js';\r\nimport datetime from './editors/datetime.js';\r\nimport select from './editors/select.js';\r\nimport list from './editors/list.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\tnumber:number,\r\n\trange:range,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tselect:select,\r\n\tlist:list,\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\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"hybrid\",\r\n\tvalue = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n\tinput = document.createElement(\"textarea\"),\r\n\tscrollHeight = 0;\r\n\r\n\t//create and style input\r\n\tinput.style.display = \"block\";\r\n\tinput.style.padding = \"2px\";\r\n\tinput.style.height = \"100%\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.whiteSpace = \"pre-wrap\";\r\n\tinput.style.resize = \"none\";\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\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\tinput.scrollHeight;\r\n\t\tinput.style.height = input.scrollHeight + \"px\";\r\n\t\tcell.getRow().normalizeHeight();\r\n\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\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\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tcell.getRow().normalizeHeight();\r\n\t\t\t},300);\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\tinput.addEventListener(\"keyup\", function(){\r\n\r\n\t\tinput.style.height = \"\";\r\n\r\n\t\tvar heightNow = input.scrollHeight;\r\n\r\n\t\tinput.style.height = heightNow + \"px\";\r\n\r\n\t\tif(heightNow != scrollHeight){\r\n\t\t\tscrollHeight = heightNow;\r\n\t\t\tcell.getRow().normalizeHeight();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\r\n\t\t\tcase 13:\r\n\t\t\t\tif(e.shiftKey && editorParams.shiftEnterSubmit){\r\n\t\t\t\t\tonChange(e);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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//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\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\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\t\tonChange();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\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\t\tif(vertNav == \"editor\"){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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\t\tonChange();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null;\r\n\t\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tfunction convertDate(value){\r\n\t\tvar newDatetime;\r\n\t\t\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\r\n\t\t\r\n\t\treturn newDatetime.toFormat(\"yyyy-MM-dd\");\r\n\t}\r\n\t\r\n\tinput.type = \"date\";\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.max){\r\n\t\tinput.setAttribute(\"max\", inputFormat ? convertDate(editorParams.max) : editorParams.max);\r\n\t}\r\n\r\n\tif(editorParams.min){\r\n\t\tinput.setAttribute(\"min\", inputFormat ? convertDate(editorParams.min) : editorParams.min);\r\n\t}\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\t\t\r\n\t\t\tcellValue = convertDate(cellValue);\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\t\t\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\t\t\t\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromFormat(String(value), \"yyyy-MM-dd\").toFormat(inputFormat);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \r\n\tnewDatetime;\r\n\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tinput.type = \"time\";\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\r\n\t\t\tif(DT.isDateTime(cellValue)){\r\n\t\t\t\tnewDatetime = cellValue;\r\n\t\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\r\n\t\t\t}else{\r\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tcellValue = newDatetime.toFormat(\"hh:mm\");\r\n\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromFormat(String(value), \"hh:mm\").toFormat(inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \r\n\tnewDatetime;\r\n\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tinput.type = \"datetime-local\";\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\r\n\t\t\tif(DT.isDateTime(cellValue)){\r\n\t\t\t\tnewDatetime = cellValue;\r\n\t\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\r\n\t\t\t}else{\r\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tcellValue = newDatetime.toFormat(\"yyyy-MM-dd\") + \"T\" + newDatetime.toFormat(\"hh:mm\");\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromISO(String(value)).toFormat(inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\r\n\tthis.deprecationMsg(\"The select editor has been deprecated, please use the new list editor\");\r\n\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\r\n\tthis.deprecationMsg(\"The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam\");\r\n\r\n\teditorParams.autocomplete = true;\r\n\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.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\t\tchangeValue(value + 1);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\t\tchangeValue(value - 1);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tsuccess(value);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tcancel();\r\n\t\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\t\te.preventDefault();\r\n\t\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tupdateValue();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tcancel();\r\n\t\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\ttrueValueSet = Object.keys(editorParams).includes(\"trueValue\"),\r\n\tfalseValueSet = Object.keys(editorParams).includes(\"falseValue\");\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 = trueValueSet ? value === editorParams.trueValue : (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\tvar checkedValue = input.checked;\r\n\r\n\t\tif(trueValueSet && checkedValue){\r\n\t\t\tcheckedValue = editorParams.trueValue;\r\n\t\t}else if(falseValueSet && !checkedValue){\r\n\t\t\tcheckedValue = editorParams.falseValue;\r\n\t\t}\r\n\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 checkedValue;\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 checkedValue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn checkedValue;\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overridden 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\t\t\r\n\t\tthis.editors = Edit.editors;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\t\t\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\t\t\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\t\t\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\t\t\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\t\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(\"cell-value-changed\", this.updateCellClass.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(\"row-layout\", this.rowEditableCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\t\t\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\t\r\n\t\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\t\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\t\t\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\t\t\t\t\t\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\t\t\t\t\t\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\t\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcellIsEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\t\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\t\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tupdateCellClass(cell){\r\n\t\tif(this.allowEdit(cell)) {\r\n\t\t\tcell.getElement().classList.add(\"tabulator-editable\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-editable\");\r\n\t\t}\r\n\t}\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\t\t\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\t\t\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\t\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnextCell = this.navigateLeft();\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findPrevEditableCell(prevRow, prevRow.cells.length);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnextCell = this.navigateRight();\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\t\t\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\t\t\t\t\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn nextCell;\r\n\t}\r\n\t\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\t\t\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\t\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn prevCell;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\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\t\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\t\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\trowEditableCheck(row){\r\n\t\trow.getCells().forEach((cell) => {\r\n\t\t\tif(cell.column.modules.edit && typeof cell.column.modules.edit.check === \"function\"){\r\n\t\t\t\tthis.updateCellClass(cell);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar config = {\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\t\t\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\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.definition.editor === true){\r\n\t\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\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(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\t\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\t\t\r\n\t\tthis.invalidEdit = false;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\t\t\t\r\n\t\t\tcellEl = cell.getElement();\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"edit-editor-clear\", cell, cancel);\r\n\t\t\t\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\t\t\t\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\t\t\t\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-editing\");\r\n\t\t\t\r\n\t\t\tcell.table.element.classList.remove(\"tabulator-editing\");\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\t\t\t\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\t\t\t\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\t\t\t\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\t\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\t\t\t\r\n\t\t\tthis.updateCellClass(cell);\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\t\t\t\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\t\t\t\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\t\t\t\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\t\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\t\t\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\t\t\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\t\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\t\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\t\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\t\t\t\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\t\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\t\t\t\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\t\t\t\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\t\t\t\t\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\t\r\n\tallowEdit(cell) {\r\n\t\tvar check = cell.column.modules.edit ? true : false;\r\n\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tif(cell.row.initialized){\r\n\t\t\t\t\t\tcheck = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\t\tcheck = !!cell.row.data[cell.column.modules.edit.check];\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tcheck = cell.column.modules.edit.check;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn check;\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\t//handle successful value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = self.chain(\"edit-success\", [cell, value], true, true);\r\n\t\t\t\t\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn valid === true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\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\t\t\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\t\t\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\t\t\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\t\t\t\r\n\t\t\tallowEdit = this.allowEdit(cell);\r\n\t\t\t\r\n\t\t\tif(allowEdit || forceEdit){\r\n\t\t\t\t\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t\t\r\n\t\t\t\tself.currentCell = cell;\r\n\t\t\t\t\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\t\t\t\t\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\t\t\t\t\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\t\t\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\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"cell-editing\", cell);\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\t\t\t\t\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\t\t\t\t\t\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-editing\");\r\n\t\t\t\t\t\tcell.table.element.classList.add(\"tabulator-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\t\t\t\t\t\t\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\t\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\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\t\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\t\t\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"edit-edited-clear\", cell);\r\n\t\t}\r\n\t\t\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\t\t\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 output 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\tgenerateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.generateTableElement(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\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\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\tvar visProp = column.definition[this.colVisProp];\r\n\r\n\t\tif(typeof visProp === \"function\"){\r\n\t\t\tvisProp = visProp.call(this.table, column.getComponent());\r\n\t\t}\r\n\r\n\t\treturn visProp !== false && (column.visible || (!column.visible && visProp));\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 depth\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\t\treturn this.config.rowGroups !== false;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\t\treturn this.config.columnCalcs !== false;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\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\t\tindent = row.level;\r\n\t\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\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\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t\t}\r\n\t\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\tgenerateTableElement(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\tlet rowEl;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\t\theaderEl.appendChild(this.generateHeaderElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\t\tbodyEl.appendChild(this.generateGroupElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\t\tbodyEl.appendChild(this.generateCalcElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\t\trowEl = this.generateRowElement(row, setup, styles);\r\n\r\n\t\t\t\t\tthis.mapElementStyles(((i % 2) && styles.evenRow) ? styles.evenRow : styles.oddRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\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\tgenerateHeaderElement(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\tgenerateGroupElement(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 = 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\tgenerateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.generateRowElement(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\tgenerateRowElement(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, i) => {\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\t\t\t\tcellStyle;\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\t\tvalue = value !== null ? JSON.stringify(value) : \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\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\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\tcellStyle = styles.styleCells && styles.styleCells[index] ? styles.styleCells[index] : styles.firstCell;\r\n\r\n\t\t\t\tif(cellStyle){\r\n\t\t\t\t\tthis.mapElementStyles(cellStyle, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\", \"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"text-align\"]);\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\tgenerateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.generateTableElement(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.generateHTMLTable(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\r\n\t\t//handle successfully 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\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\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\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t}else{\r\n\t\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\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\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 column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\ttype = filterFunc;\r\n\t\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\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\ttype = \"like\";\r\n\t\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\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t\t};\r\n\t\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};\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\tcolumn.modules.filter.value = value;\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\tcolumn.modules.filter.value = initialValue;\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;\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\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"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\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\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\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\t\treturn value !== true && value !== 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}else{\r\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\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}\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\tgetTable:() => {\r\n\t\t\t\t\t\treturn this.table;\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\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\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.contentsElement.scrollLeft;\r\n\r\n\t\t\t\t\tvar headerPos = this.table.rowManager.element.scrollLeft;\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)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\t\tsuccess(editorElement.value);\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//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\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\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propagating 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//programmatically 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.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//programmatically 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(null, false, false);\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\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}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(true));\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(true), 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\tif (formatterParams.thousand !== false) {\r\n\t\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\t\twhile (rgx.test(integer)){\r\n\t\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t\t}\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\tfunction labelTraverse(path, data){\r\n\t\tvar item = path.shift(),\r\n\t\tvalue = data[item];\r\n\t\t\r\n\t\tif(path.length && typeof value === \"object\"){\r\n\t\t\treturn labelTraverse(path, value);\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = labelTraverse(formatterParams.labelField.split(this.table.options.nestedFieldSeparator), data);\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\t\tlabel = formatterParams.label;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tlabel = formatterParams.label(cell);\r\n\t\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\t\tvalue = formatterParams.url;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\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\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\t\tel.style.height = formatterParams.height;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\t\tel.style.width = formatterParams.width;\r\n\t\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\ttrueValueSet = Object.keys(formatterParams).includes(\"trueValue\"),\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((trueValueSet && value === formatterParams.trueValue) || (!trueValueSet && ((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;\r\n\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\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\tvar newDatetime;\r\n\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\treturn newDatetime.diff(date, unit).toHuman() + (suffix ? \" \" + 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\t\tcolor = colors;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tcolor = colors(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(colors)){\r\n\t\t\t\tvar unit = 100 / colors.length;\r\n\t\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tcolor = colors[index];\r\n\t\t\t\tbreak;\r\n\t\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.max ? formatterParams.max : 100,\r\n\tmin = formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor;\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\t\tcolor = formatterParams.color;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tcolor = formatterParams.color(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\t\tlet unit = 100 / formatterParams.color.length;\r\n\t\t\t\tlet index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tcolor = formatterParams.color[index];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tdefault:\r\n\t\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\t\tlegend = formatterParams.legend;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tlegend = formatterParams.legend(value);\r\n\t\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\t\tlegend = value;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\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\t\tlegendColor = formatterParams.legendColor;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\t\tlet unit = 100 / formatterParams.legendColor.length;\r\n\t\t\t\tlet index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\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.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\tvar content = document.createElement(\"span\");\r\n\tvar row = cell.getRow();\r\n\r\n\trow.watchPosition((position) => {\r\n\t\tcontent.innerText = position;\r\n\t});\r\n\t\r\n\treturn content;\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 el = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\t\r\n\tel.innerHTML = `\r\n \r\n \r\n\r\n\r\n\r\n \r\n`;\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\tcell.getTable().rowManager.adjustTableSize();\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\t\t\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\t\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\t\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\t\t\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\t\t\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\t\t\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\t\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\t\t\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\tconfig.formatter = formatter;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn config;\r\n\t}\r\n\t\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\t\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\t\t\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\t\t\t\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\t\t\t\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\tgetColumn:function(){\r\n\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t},\r\n\t\t\t\tgetTable:() => {\r\n\t\t\t\t\treturn this.table;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\t\t\t\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\t\t\t\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\t\r\n\t\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\t\t\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\t\t\t\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\t\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\t\t\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(cell.getComponent()) : formatter.params;\r\n\t\t\t\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\t\t\t\t\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\t\t\t\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\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\t\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\t\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\t\tformatter = Format.formatters[formatter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t//Custom formatter Function, do nothing\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\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.initializationMode = \"left\";\r\n\t\tthis.active = 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.active = false;\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(\"columns-loading\", this.reset.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"column-add\", this.reinitializeColumns.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.reinitializeColumns.bind(this));\r\n\t\t\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\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.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\treinitializeColumns(){\r\n\t\tthis.reset();\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t});\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\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}\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);\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.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.marginValue = leftMargin;\r\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\r\n\t\t\t\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\t\t\t\r\n\t\t\tcolumn.modules.frozen.marginValue = rightMargin;\r\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\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\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(){\t\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.reinitializeRows();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar visibleRows = this.table.rowManager.getVisibleRows(true);\r\n\t\tvar otherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\r\n\t\t\r\n\t\totherRows.forEach((row) =>{\r\n\t\t\trow.deinitialize();\r\n\t\t});\r\n\t\t\r\n\t\tvisibleRows.forEach((row) =>{\r\n\t\t\tif(row.type === \"row\"){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutRow(row){\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\tvar position;\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"sticky\";\r\n\r\n\t\t\tif(this.table.rtl){\r\n\t\t\t\tposition = column.modules.frozen.position === \"left\" ? \"right\" : \"left\";\r\n\t\t\t}else{\r\n\t\t\t\tposition = column.modules.frozen.position;\r\n\t\t\t}\r\n\t\t\r\n\t\t\telement.style[position] = column.modules.frozen.margin;\r\n\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\r\n\tadjustForScrollbar(width){\r\n\t\tif(this.rightColumns.length){\r\n\t\t\tthis.table.columnManager.getContentsElement().style.width = \"calc(100% - \" + width + \"px)\";\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\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"frozenRowsField\", \"id\"); //field to choose frozen rows by\r\n\t\tthis.registerTableOption(\"frozenRows\", false); //holder for frozen row identifiers\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.getContentsElement().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\r\n\t\tif(this.table.options.frozenRows){\r\n\t\t\tthis.subscribe(\"data-processed\", this.initializeRows.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRows(){\r\n\t\tthis.table.rowManager.getRows().forEach((row) => {\r\n\t\t\tthis.initializeRow(row);\r\n\t\t});\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar frozenRows = this.table.options.frozenRows,\r\n\t\trowType = typeof frozenRows;\r\n\r\n\t\tif(rowType === \"number\"){\r\n\t\t\tif(row.getPosition() && (row.getPosition() + this.rows.length) <= frozenRows){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}else if(rowType === \"function\"){\r\n\t\t\tif(frozenRows.call(this.table, row.getComponent())){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(frozenRows)){\r\n\t\t\tif(frozenRows.includes(row.data[this.options(\"frozenRowsField\")])){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}\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 output = 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\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.table.rowManager.adjustTableSize();\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\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 constraints\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(){\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\t\r\n\t\tif(this.calcs.top){\r\n\t\t\tthis.calcs.top.detachElement();\r\n\t\t\tthis.calcs.top.deleteCells();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.calcs.bottom){\r\n\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t}\r\n\t\t\r\n\t\t\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());\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\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(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\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\tif(this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\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(this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\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() == \"basic\" && !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.updateGroupRows(true);\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() == \"basic\" && !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.updateGroupRows(true);\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(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(component ? 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 Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\t\t\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\t\t\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\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\t\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\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\t\t\t\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\t\t\t\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\t\t\t\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\t\t\t\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\t\t\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\t\t\t\r\n\t\t\tthis.groupIDLookups = [];\r\n\t\t\t\r\n\t\t\tif(Array.isArray(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\t\t\t\t\t\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\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\t\t\t\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\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\t\t\t\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}else{\r\n\t\t\tthis.groupList = [];\r\n\t\t\tthis.groups = {};\r\n\t\t}\r\n\t}\r\n\t\r\n\trowSample(rows, prevValue){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar group = this.getGroups(false)[0];\r\n\t\t\t\r\n\t\t\tprevValue.push(group.getRows(false)[0]);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevValue;\r\n\t}\r\n\t\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\trows = rows.filter((row) => {\r\n\t\t\t\treturn row.type !== \"group\";\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\t\t}else{\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingIndex(row, index, top){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.assignRowToGroup(row);\r\n\t\t\t\r\n\t\t\tvar groupRows = row.modules.group.rows;\r\n\t\t\t\r\n\t\t\tif(groupRows.length > 1){\r\n\t\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\t\tif(top){\r\n\t\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\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\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn index;\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\t\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tthis.refreshData();\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\t\t\t\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\t\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\t\t\t\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\t\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\t\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ? this.getGroupedData() : this.getData();\r\n\t}\r\n\t\r\n\t\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\t\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\trowMoving(from, to, after){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tif(!after && to instanceof Group){\r\n\t\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\t\t\t\r\n\t\t\tif(toGroup === fromGroup){\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t\t}else{\r\n\t\t\t\tif(fromGroup){\r\n\t\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(this.table.options.groupBy && row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.updateGroupRows(true);\r\n\t\t}\t\r\n\t}\r\n\t\r\n\tcellUpdated(cell){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.reassignRowToGroup(cell.row);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\t\t\t\r\n\t\t\tthis.generateGroups(rows);\r\n\t\t\t\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\t\t\t\r\n\t\t\treturn this.updateGroupRows();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\t\t\r\n\t\treturn groupComponents;\r\n\t}\r\n\t\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\t\t\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\treturn groupComponents;\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.table.options.groupBy){\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\t\r\n\t\t\tthis.groupList = [];\r\n\t\t\tthis.groups = {};\r\n\t\t}\r\n\t}\r\n\t\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\t\t\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\t\t\t\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\t\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\t\t\r\n\t\treturn groupListData;\r\n\t}\r\n\t\r\n\tgetGroupedData(){\r\n\t\t\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\t\r\n\t\tif(this.options(\"dataTree\")){\r\n\t\t\trow = this.table.modules.dataTree.getTreeParentRoot(row);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\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\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\t\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\t\t\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\t\t\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\t\t\t\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\t\r\n\t\tObject.values(oldGroups).forEach((group) => {\r\n\t\t\tgroup.wipe();\r\n\t\t});\t\r\n\t}\r\n\t\r\n\t\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\t\t\r\n\t\toldGroups = oldGroups || [];\r\n\t\t\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\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\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\t\t\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\t\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\t\t\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\t\t\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\t\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;\r\n\t\t\t\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tsamePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\t\t\t\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\t\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\t\t\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\t\t\r\n\t\treturn groupPath;\r\n\t}\r\n\t\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\t\t\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tleft = left + \"px\";\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tgroup.scrollHeader(left);\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}\r\n\t}\r\n\t\r\n\tcheckBasicModeGroupHeaderWidth(){\r\n\t\tvar element = this.table.rowManager.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\t\t\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row, index) =>{\r\n\t\t\tthis.table.rowManager.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\t\t\t\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\t\t\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\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:from.getPosition(), posTo:to.getPosition(), 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()._getSelf().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\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\tif(this.table.originalElement.childNodes.length){\r\n\t\t\t\tthis.parseTable();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element.\");\r\n\t\t\t}\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\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [];\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 don't 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;\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\nimport array from './importers/array.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tarray:array,\r\n};","function csvImporter(input){\r\n\tvar data = [],\r\n\trow = 0, \r\n\tcol = 0,\r\n\tinQuote = false;\r\n \r\n\t//Iterate over each character\r\n\tfor (let index = 0; index < input.length; index++) {\r\n\t\tlet char = input[index], \r\n\t\tnextChar = input[index+1]; \r\n \r\n\t\t//Initialize empty row\r\n\t\tif(!data[row]){\r\n\t\t\tdata[row] = [];\r\n\t\t}\r\n\r\n\t\t//Initialize empty column\r\n\t\tif(!data[row][col]){\r\n\t\t\tdata[row][col] = \"\";\r\n\t\t}\r\n \r\n\t\t//Handle quotation mark inside string\r\n\t\tif (char == '\"' && inQuote && nextChar == '\"') { \r\n\t\t\tdata[row][col] += char; \r\n\t\t\tindex++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//Begin / End Quote\r\n\t\tif (char == '\"') { \r\n\t\t\tinQuote = !inQuote;\r\n\t\t\tcontinue;\r\n\t\t}\r\n \r\n\t\t//Next column (if not in quote)\r\n\t\tif (char == ',' && !inQuote) { \r\n\t\t\tcol++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//New row if new line and not in quote (CRLF) \r\n\t\tif (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n\t\t\tcol = 0; \r\n\t\t\trow++; \r\n\t\t\tindex++; \r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//New row if new line and not in quote (CR or LF) \r\n\t\tif ((char == '\\r' || char == '\\n') && !inQuote) { \r\n\t\t\tcol = 0;\r\n\t\t\trow++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n\r\n\t\t//Normal Character, append to column\r\n\t\tdata[row][col] += char;\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\nexport default csvImporter;","export default function(input){\r\n\ttry {\r\n\t\treturn JSON.parse(input);\r\n\t} catch(e) {\r\n\t\tconsole.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n\t\treturn Promise.reject();\r\n\t}\r\n}","function arrayImporter(input){\r\n\treturn input;\r\n}\r\n\r\nexport default arrayImporter;","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\tconstructor(table){\r\n\t\tsuper(table);\r\n \r\n\t\tthis.registerTableOption(\"importFormat\");\r\n\t\tthis.registerTableOption(\"importReader\", \"text\");\r\n\t}\r\n \r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n\t\tif(this.table.options.importFormat){\r\n\t\t\tthis.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n\t\t\tthis.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n\t\t}\r\n\t}\r\n\r\n\tloadDataCheck(data){\r\n\t\treturn this.table.options.importFormat && (typeof data === \"string\" || (Array.isArray(data) && data.length && Array.isArray(data)));\r\n\t}\r\n\r\n\tloadData(data, params, config, silent, previousData){\r\n\t\treturn this.importData(this.lookupImporter(), data)\r\n\t\t\t.then(this.structureData.bind(this))\r\n\t\t\t.catch((err) => {\r\n\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import data\");\r\n\t\t\t\treturn Promise.reject(err);\r\n\t\t\t});\r\n\t}\r\n\r\n\tlookupImporter(importFormat){\r\n\t\tvar importer;\r\n \r\n\t\tif(!importFormat){\r\n\t\t\timportFormat = this.table.options.importFormat;\r\n\t\t}\r\n \r\n\t\tif(typeof importFormat === \"string\"){\r\n\t\t\timporter = Import.importers[importFormat];\r\n\t\t}else{\r\n\t\t\timporter = importFormat;\r\n\t\t}\r\n\r\n\t\tif(!importer){\r\n\t\t\tconsole.error(\"Import Error - Importer not found:\", importFormat);\r\n\t\t}\r\n \r\n\t\treturn importer;\r\n\t}\r\n \r\n\timportFromFile(importFormat, extension){\r\n\t\tvar importer = this.lookupImporter(importFormat);\r\n \r\n\t\tif(importer){\r\n\t\t\treturn this.pickFile(extension)\r\n\t\t\t\t.then(this.importData.bind(this, importer))\r\n\t\t\t\t.then(this.structureData.bind(this))\r\n\t\t\t\t.then(this.setData.bind(this))\r\n\t\t\t\t.catch((err) => {\r\n\t\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import file\");\r\n\t\t\t\t\treturn Promise.reject(err);\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n \r\n\tpickFile(extensions){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar input = document.createElement(\"input\");\r\n\t\t\tinput.type = \"file\";\r\n\t\t\tinput.accept = extensions;\r\n \r\n\t\t\tinput.addEventListener(\"change\", (e) => {\r\n\t\t\t\tvar file = input.files[0],\r\n\t\t\t\treader = new FileReader();\r\n \r\n\t\t\t\tswitch(this.table.options.importReader){\r\n\t\t\t\t\tcase \"buffer\":\r\n\t\t\t\t\t\treader.readAsArrayBuffer(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"binary\":\r\n\t\t\t\t\t\treader.readAsBinaryString(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"url\":\r\n\t\t\t\t\t\treader.readAsDataURL(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"text\":\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treader.readAsText(file);\r\n\t\t\t\t}\r\n \r\n\t\t\t\treader.onload = (e) => {\r\n\t\t\t\t\tresolve(reader.result);\r\n\t\t\t\t};\r\n \r\n\t\t\t\treader.onerror = (e) => {\r\n\t\t\t\t\tconsole.warn(\"File Load Error - Unable to read file\");\r\n\t\t\t\t\treject();\r\n\t\t\t\t};\r\n\t\t\t});\r\n \r\n\t\t\tinput.click();\r\n\t\t});\r\n\t}\r\n \r\n\timportData(importer, fileContents){\r\n\t\tvar data = importer.call(this.table, fileContents);\r\n \r\n\t\tif(data instanceof Promise){\r\n\t\t\treturn data;\r\n\t\t}else{\r\n\t\t\treturn data ? Promise.resolve(data) : Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tstructureData(parsedData){\r\n\t\tvar data = [];\r\n \r\n\t\tif(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n\t\t\tif(this.table.options.autoColumns){\r\n\t\t\t\tdata = this.structureArrayToObject(parsedData);\r\n\t\t\t}else{\r\n\t\t\t\tdata = this.structureArrayToColumns(parsedData);\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\t\t}else{\r\n\t\t\treturn parsedData;\r\n\t\t}\r\n\t}\r\n\r\n\tstructureArrayToObject(parsedData){\r\n\t\tvar columns = parsedData.shift();\r\n\r\n\t\tvar data = parsedData.map((values) => {\r\n\t\t\tvar row = {};\r\n\r\n\t\t\tcolumns.forEach((key, i) => {\r\n\t\t\t\trow[key] = values[i];\r\n\t\t\t});\r\n\r\n\t\t\treturn row;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tstructureArrayToColumns(parsedData){\r\n\t\tvar data = [],\r\n\t\tcolumns = this.table.getColumns();\r\n\r\n\t\t//remove first row if it is the column names\r\n\t\tif(columns[0] && parsedData[0][0]){\r\n\t\t\tif(columns[0].getDefinition().title === parsedData[0][0]){\r\n\t\t\t\tparsedData.shift();\r\n\t\t\t}\r\n\t\t}\r\n \r\n\t\t//convert row arrays to objects\r\n\t\tparsedData.forEach((rowData) => {\r\n\t\t\tvar row = {};\r\n\r\n\t\t\trowData.forEach((value, index) => {\r\n\t\t\t\tvar column = columns[index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\trow[column.getField()] = value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tdata.push(row);\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n \r\n\tsetData(data){\r\n\t\treturn this.table.setData(data);\r\n\t}\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\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\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\trowMouseDown:\"row-mousedown\",\r\n\t\t\trowMouseUp:\"row-mouseup\",\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\tcellMouseDown:\"cell-mousedown\",\r\n\t\t\tcellMouseUp:\"cell-mouseup\",\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\theaderMouseDown:\"column-mousedown\",\r\n\t\t\theaderMouseUp:\"column-mouseup\",\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\tgroupMouseDown:\"group-mousedown\",\r\n\t\t\tgroupMouseUp:\"group-mouseup\",\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(\"headerMouseDown\");\r\n\t\tthis.registerColumnOption(\"headerMouseUp\");\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(\"cellMouseDown\");\r\n\t\tthis.registerColumnOption(\"cellMouseUp\");\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\tvar range;\r\n\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === cell){\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\trange = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(cell.getElement());\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNode(cell.getElement());\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\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\t\twatchers.tap = true;\r\n\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\t\twatchers.tap = null;\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t\t}, 1000);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\t\twatchers.tap = null;\r\n\t\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(watchers.tapDbl){\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t\t}else{\r\n\t\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\t\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;\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\t\tbinding.ctrl = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\t\tbinding.shift = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\t\tbinding.meta = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\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\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\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.nestedMenuBlock = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\tthis.rootPopup = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"menuContainer\", undefined); //deprecated\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"rowDblClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupDblClickMenu\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerDblClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenuIcon\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t\tthis.registerColumnOption(\"dblClickMenu\");\r\n\t\t\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.deprecatedOptionsCheck();\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\tdeprecatedOptionsCheck(){\r\n\t\tif(!this.deprecationCheck(\"menuContainer\", \"popupContainer\")){\r\n\t\t\tthis.table.options.popupContainer = this.table.options.menuContainer;\r\n\t\t}\r\n\t}\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\t\r\n\t\tif(this.table.options.rowDblClickMenu){\r\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadMenuEvent.bind(this, this.table.options.rowDblClickMenu));\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\t\r\n\t\tif(this.table.options.groupDblClickMenu){\r\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadMenuEvent.bind(this, this.table.options.groupDblClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar\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.headerDblClickMenu && !this.columnSubscribers.headerDblClickMenu){\r\n\t\t\tthis.columnSubscribers.headerDblClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerDblClickMenu\");\r\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickMenu);\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\t\r\n\t\tif(def.dblClickMenu && !this.columnSubscribers.dblClickMenu){\r\n\t\t\tthis.columnSubscribers.dblClickMenu = this.loadMenuTableCellEvent.bind(this, \"dblClickMenu\");\r\n\t\t\tthis.subscribe(\"cell-dblclick\", this.columnSubscribers.dblClickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar icon = column.definition.headerMenuIcon,\r\n\t\theaderMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-popup-button\");\r\n\t\t\r\n\t\tif(icon){\r\n\t\t\tif(typeof icon === \"function\"){\r\n\t\t\t\ticon = icon(column.getComponent());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(icon instanceof HTMLElement){\r\n\t\t\t\theaderMenuEl.appendChild(icon);\r\n\t\t\t}else{\r\n\t\t\t\theaderMenuEl.innerHTML = icon;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t}\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, e, component.getComponent()) : 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, parentPopup){\r\n\t\tvar touch = !(e instanceof MouseEvent),\t\t\r\n\t\tmenuEl = document.createElement(\"div\"),\r\n\t\tpopup;\r\n\t\t\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.rootPopup){\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\tif(this.rootPopup){\r\n\t\t\t\tthis.rootPopup.hide();\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rootPopup = popup = this.popup(menuEl);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpopup = parentPopup.child(menuEl);\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.loadMenu(e, component, item.menu, itemEl, popup);\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\tif(this.rootPopup){\r\n\t\t\t\tthis.rootPopup.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tpopup.show(parentEl || e);\r\n\t\t\r\n\t\tif(popup === this.rootPopup){\r\n\t\t\tthis.rootPopup.hideOnBlur(() => {\r\n\t\t\t\tthis.rootPopup = null;\r\n\t\t\t\t\r\n\t\t\t\tif(this.currentComponent){\r\n\t\t\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\t\t\tthis.currentComponent = null;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.currentComponent = component;\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent());\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 destination 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 && !column.isGroup){\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\tnextCol, 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\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 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\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.getContentsElement(),\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\theaderElement.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.getContentsElement(),\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 destination 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\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, group);\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;\r\n\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\trowEl = 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\trowEl = 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\tnextRow, 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\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 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\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\t\r\n\t\tthis.hoverElement.style.top = Math.min(yPos - this.startY, this.table.rowManager.element.scrollHeight - this.hoverElement.offsetHeight) + \"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 incoming 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\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\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 ? this.moving.getComponent() : undefined, 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\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\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\t\treturn this.connect(table, data.row);\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\t\treturn this.disconnect(table);\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\t\treturn this.dropComplete(table, data.row, data.success);\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 mutation 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\tthis.registerColumnOption(\"mutateLink\");\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(\"cell-value-changed\", this.mutateLink.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\t\tif(Mutator.mutators[value]){\r\n\t\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tmutator = value;\r\n\t\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\tmutateLink(cell){\r\n\t\tvar links = cell.column.definition.mutateLink;\r\n\r\n\t\tif(links){\r\n\t\t\tif(!Array.isArray(links)){\r\n\t\t\t\tlinks = [links];\r\n\t\t\t}\r\n\r\n\t\t\tlinks.forEach((link) => {\r\n\t\t\t\tvar linkCell = cell.row.getCell(link);\r\n\r\n\t\t\t\tif(linkCell){\r\n\t\t\t\t\tlinkCell.setValue(linkCell.getValue(), true, true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\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\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\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.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\t\t\tthis.subscribe(\"footer-redraw\", this.footerRedraw.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\tdisplayRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(displayRows.length){\r\n\t\t\t\tindex = displayRows[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(displayRows.length){\r\n\t\t\t\tindex = displayRows[displayRows.length - 1];\r\n\t\t\t\ttop = displayRows.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\r\n\t\tthis.dispatchExternal(\"pageSizeChanged\", this.size);\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\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){\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.footerAppend(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.footerAppend(this.element);\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\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\tthis.trackChanges();\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\t\treturn this.setPage(1);\r\n\t\r\n\t\t\tcase \"prev\":\r\n\t\t\t\treturn this.previousPage();\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\t\treturn this.nextPage();\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\t\treturn this.setPage(this.max);\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.displayRows(-1);\r\n\t\tvar index = rows.indexOf(row);\r\n\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\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t\tthis.dispatchExternal(\"pageSizeChanged\", 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\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//clear previous cell contents\r\n\t\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\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif(content != null){\r\n\t\t\t\t\t\t\tconsole.warn(\"Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:\", content);\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\tcase \"undefined\":\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\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\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\t\tthis.refreshData();\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\t\treturn Promise.resolve();\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\t\tthis.dataChanging = true;\r\n\t\t\t\treturn this.reloadData(null)\r\n\t\t\t\t\t.finally(() => {\r\n\t\t\t\t\t\tthis.dataChanging = false;\r\n\t\t\t\t\t});\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\treturn this.reloadData(null, true);\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar 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\t\tif(this.page == 1){\r\n\t\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\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}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t\t}\r\n\t\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\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\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\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\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\t\tthis.nextPage();\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\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;\r\n","// read persistance 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\tretrievedData;\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\tretrievedData = this.retrieveData(\"page\");\r\n\r\n\t\t\t\tif(retrievedData){\r\n\t\t\t\t\tif(typeof retrievedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retrievedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retrievedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retrievedData.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\tretrievedData = this.retrieveData(\"group\");\r\n\r\n\t\t\t\tif(retrievedData){\r\n\t\t\t\t\tif(typeof retrievedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retrievedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retrievedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retrievedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retrievedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retrievedData.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(\"column-width\", 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 sorters, 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\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: (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:() => {\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.retrieveData(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//retrieve data from memory\r\n\tretrieveData(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\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\t\treturn col.field === subject.field;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\t\treturn col === subject;\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\t\tdata = this.parseColumns(this.table.columnManager.getColumns());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tdata = this.getGroupConfig();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\t\tdata = this.getPageConfig();\r\n\t\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\tkeys.push(\"visible\");\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\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\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}\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 = -10;\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 Popup extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextPopup\", false);\r\n\t\tthis.registerTableOption(\"rowClickPopup\", false);\r\n\t\tthis.registerTableOption(\"rowDblClickPopup\", false);\r\n\t\tthis.registerTableOption(\"groupContextPopup\", false);\r\n\t\tthis.registerTableOption(\"groupClickPopup\", false);\r\n\t\tthis.registerTableOption(\"groupDblClickPopup\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextPopup\");\r\n\t\tthis.registerColumnOption(\"headerClickPopup\");\r\n\t\tthis.registerColumnOption(\"headerDblClickPopup\");\r\n\t\tthis.registerColumnOption(\"headerPopup\");\r\n\t\tthis.registerColumnOption(\"headerPopupIcon\");\r\n\t\tthis.registerColumnOption(\"contextPopup\");\r\n\t\tthis.registerColumnOption(\"clickPopup\");\r\n\t\tthis.registerColumnOption(\"dblClickPopup\");\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"group\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\t\r\n\t}\r\n\t\r\n\tinitialize(){\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\r\n\t_componentPopupCall(component, contents, position){\r\n\t\tthis.loadPopupEvent(contents, null, component, position);\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextPopup){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickPopup){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadPopupEvent.bind(this, this.table.options.rowClickPopup));\r\n\t\t}\r\n\r\n\t\tif(this.table.options.rowDblClickPopup){\r\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadPopupEvent.bind(this, this.table.options.rowDblClickPopup));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextPopup){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickPopup){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadPopupEvent.bind(this, this.table.options.groupClickPopup));\r\n\t\t}\r\n\r\n\t\tif(this.table.options.groupDblClickPopup){\r\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadPopupEvent.bind(this, this.table.options.groupDblClickPopup));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextPopup && !this.columnSubscribers.headerContextPopup){\r\n\t\t\tthis.columnSubscribers.headerContextPopup = this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextPopup);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickPopup && !this.columnSubscribers.headerClickPopup){\r\n\t\t\tthis.columnSubscribers.headerClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerClickPopup\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickPopup);\r\n\t\t\r\n\t\t\r\n\t\t}if(def.headerDblClickPopup && !this.columnSubscribers.headerDblClickPopup){\r\n\t\t\tthis.columnSubscribers.headerDblClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerDblClickPopup\");\r\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickPopup);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerPopup){\r\n\t\t\tthis.initializeColumnHeaderPopup(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextPopup && !this.columnSubscribers.contextPopup){\r\n\t\t\tthis.columnSubscribers.contextPopup = this.loadPopupTableCellEvent.bind(this, \"contextPopup\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextPopup);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadPopupTableCellEvent.bind(this, \"contextPopup\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickPopup && !this.columnSubscribers.clickPopup){\r\n\t\t\tthis.columnSubscribers.clickPopup = this.loadPopupTableCellEvent.bind(this, \"clickPopup\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickPopup);\r\n\t\t}\r\n\r\n\t\tif(def.dblClickPopup && !this.columnSubscribers.dblClickPopup){\r\n\t\t\tthis.columnSubscribers.dblClickPopup = this.loadPopupTableCellEvent.bind(this, \"dblClickPopup\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.dblClickPopup);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderPopup(column){\r\n\t\tvar icon = column.definition.headerPopupIcon,\r\n\t\theaderPopupEl;\r\n\t\t\r\n\t\theaderPopupEl = document.createElement(\"span\");\r\n\t\theaderPopupEl.classList.add(\"tabulator-header-popup-button\");\r\n\r\n\t\tif(icon){\r\n\t\t\tif(typeof icon === \"function\"){\r\n\t\t\t\ticon = icon(column.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tif(icon instanceof HTMLElement){\r\n\t\t\t\theaderPopupEl.appendChild(icon);\r\n\t\t\t}else{\r\n\t\t\t\theaderPopupEl.innerHTML = icon;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\theaderPopupEl.innerHTML = \"⋮\";\r\n\t\t}\r\n\t\t\r\n\t\theaderPopupEl.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.loadPopupEvent(column.definition.headerPopup, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerPopupEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadPopupTableCellEvent(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.loadPopupEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadPopupTableColumnEvent(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.loadPopupEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadPopupEvent(contents, e, component, position){\r\n\t\tvar renderedCallback;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trenderedCallback = callback;\r\n\t\t}\r\n\t\t\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\tcontents = typeof contents == \"function\" ? contents.call(this.table, e, component.getComponent(), onRendered) : contents;\r\n\t\t\r\n\t\tthis.loadPopup(e, component, contents, renderedCallback, position);\r\n\t}\r\n\t\r\n\tloadPopup(e, component, contents, renderedCallback, position){\r\n\t\tvar touch = !(e instanceof MouseEvent),\r\n\t\tcontentsEl, popup;\r\n\t\t\r\n\t\tif(contents instanceof HTMLElement){\r\n\t\t\tcontentsEl = contents;\r\n\t\t}else{\r\n\t\t\tcontentsEl = document.createElement(\"div\");\r\n\t\t\tcontentsEl.innerHTML = contents;\r\n\t\t}\r\n\t\t\r\n\t\tcontentsEl.classList.add(\"tabulator-popup\");\r\n\r\n\t\tcontentsEl.addEventListener(\"click\", (e) =>{\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\tpopup = this.popup(contentsEl);\r\n\r\n\t\tif(typeof renderedCallback === \"function\"){\r\n\t\t\tpopup.renderCallback(renderedCallback);\r\n\t\t}\r\n\r\n\t\tif(e){\r\n\t\t\tpopup.show(e);\r\n\t\t}else{\r\n\t\t\tpopup.show(component.getElement(), position || \"center\");\r\n\t\t}\r\n\r\n\t\t\r\n\t\tpopup.hideOnBlur(() => {\r\n\t\t\tthis.dispatchExternal(\"popupClosed\", component.getComponent());\r\n\t\t});\r\n\r\n\r\n\r\n\t\tthis.dispatchExternal(\"popupOpened\", component.getComponent());\r\n\t}\r\n}\r\n\r\nPopup.moduleName = \"popup\";\r\n\r\nexport default Popup;\r\n","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.generateTable(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.generateTable(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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\t\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\t\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, \"cellsave\"));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this, \"cellsave\"));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this, \"rowsave\"));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this, \"rowsave\"));\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\t\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tversion;\r\n\t\t\r\n\t\tthis.currentVersion ++;\r\n\t\t\r\n\t\tversion = this.currentVersion;\r\n\t\t\r\n\t\tthis.unwatchData();\r\n\t\t\r\n\t\tthis.data = data;\r\n\t\t\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\t\t\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\t\t\t\tresult;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\t\r\n\t\t\t\t\tself.block(\"data-push\");\r\n\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\t\r\n\t\t\t\t\tresult = self.origFuncs.push.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-push\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\t\t\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\t\t\t\tresult;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-unshift\");\r\n\t\t\t\t\t\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\t\r\n\t\t\t\t\tresult = self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-unshift\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\t\t\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, result;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-shift\");\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.shift.call(data);\r\n\r\n\t\t\t\t\tself.unblock(\"data-shift\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\t\t\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, result;\r\n\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-pop\");\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.pop.call(data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-pop\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\t\t\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, result;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-splice\");\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-splice\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result ;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\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\t\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\t\t\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\twatchTreeChildren (row){\r\n\t\tvar self = this,\r\n\t\tchildField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\t\t\r\n\t\tif(childField){\r\n\t\t\t\r\n\t\t\torigFuncs.push = childField.push;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-push\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-push\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-unshift\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-unshift\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-shift\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-shift\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-pop\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-pop\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-splice\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-splice\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\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\t\r\n\trebuildTree(row){\r\n\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t}\r\n\t\r\n\twatchKey(row, data, key){\r\n\t\tvar self = this,\r\n\t\tprops = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\t\t\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(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"key\");\r\n\t\t\t\t\t\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\t\r\n\t\t\t\t\tself.unblock(\"key\");\r\n\t\t\t\t}\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\t\t\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\t\r\n\tblock(key){\r\n\t\tif(!this.blocked){\r\n\t\t\tthis.blocked = key;\r\n\t\t}\r\n\t}\r\n\t\r\n\tunblock(key){\r\n\t\tif(this.blocked === key){\r\n\t\t\tthis.blocked = false;\r\n\t\t}\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.latestX = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.initialNextColumn = null;\r\n\t\tthis.nextColumn = null;\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t\tthis.registerTableOption(\"resizableColumnFit\", false);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-rendered\", this.layoutColumnHeader.bind(this));\r\n\t}\r\n\t\r\n\tinitializeEventWatchers(){\r\n\t\tif(!this.initialized){\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-rendered\", this.layoutCellHandles.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.deInitializeComponent.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-height\", this.resizeHandle.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.columnLayoutUpdated.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-hide\", this.deInitializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.columnLayoutUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"column-width\", this.columnWidthUpdated.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-delete\", this.deInitializeComponent.bind(this));\r\n\t\t\tthis.subscribe(\"column-height\", this.resizeHandle.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.deInitializeComponent(cell);\r\n\t\t\tthis.initializeColumn(\"cell\", cell, cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tif(column.definition.resizable){\r\n\t\t\tthis.initializeEventWatchers();\r\n\t\t\tthis.deInitializeComponent(column);\r\n\t\t\tthis.initializeColumn(\"header\", column, column, column.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolumnLayoutUpdated(column){\r\n\t\tvar prev = column.prevColumn();\r\n\t\t\r\n\t\tthis.reinitializeColumn(column);\r\n\t\t\r\n\t\tif(prev){\r\n\t\t\tthis.reinitializeColumn(prev);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolumnWidthUpdated(column){\r\n\t\tif(column.modules.frozen){\r\n\t\t\tif(this.table.modules.frozenColumns.leftColumns.includes(column)){\r\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((col) => {\r\n\t\t\t\t\tthis.reinitializeColumn(col);\r\n\t\t\t\t});\r\n\t\t\t}else if(this.table.modules.frozenColumns.rightColumns.includes(column)){\r\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((col) => {\r\n\t\t\t\t\tthis.reinitializeColumn(col);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfrozenColumnOffset(column){\r\n\t\tvar offset = false;\r\n\r\n\t\tif(column.modules.frozen){\r\n\t\t\toffset = column.modules.frozen.marginValue; \r\n\r\n\t\t\tif(column.modules.frozen.position === \"left\"){\r\n\t\t\t\toffset += column.getWidth() - 3;\r\n\t\t\t}else{\r\n\t\t\t\tif(offset){\r\n\t\t\t\t\toffset -= 3;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn offset !== false ? offset + \"px\" : false;\r\n\t}\r\n\t\r\n\treinitializeColumn(column){\r\n\t\tvar frozenOffset = this.frozenColumnOffset(column);\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(cell.modules.resize && cell.modules.resize.handleEl){\r\n\t\t\t\tif(frozenOffset){\r\n\t\t\t\t\tcell.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcell.element.after(cell.modules.resize.handleEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(column.modules.resize && column.modules.resize.handleEl){\r\n\t\t\tif(frozenOffset){\r\n\t\t\t\tcolumn.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.element.after(column.modules.resize.handleEl);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(type, component, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable,\r\n\t\tconfig = {},\r\n\t\tnearestColumn = column.getLastColumn();\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\tconfig = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif((mode === true || mode == type) && this._checkResizability(nearestColumn)){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('span');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\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\tself.startColumn = column;\r\n\t\t\t\tself.initialNextColumn = self.nextColumn = nearestColumn.nextColumn();\r\n\t\t\t\tself._mouseDown(e, nearestColumn, handle);\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//resize column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", (e) => {\r\n\t\t\t\tvar oldWidth = nearestColumn.getWidth();\r\n\t\t\t\t\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tnearestColumn.reinitializeWidth(true);\r\n\t\t\t\t\r\n\t\t\t\tif(oldWidth !== nearestColumn.getWidth()){\r\n\t\t\t\t\tself.dispatch(\"column-resized\", nearestColumn);\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", nearestColumn.getComponent());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen){\r\n\t\t\t\thandle.style.position = \"sticky\";\r\n\t\t\t\thandle.style[column.modules.frozen.position] = this.frozenColumnOffset(column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconfig.handleEl = handle;\r\n\t\t\t\r\n\t\t\tif(element.parentNode && column.visible){\r\n\t\t\t\telement.after(handle);\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcomponent.modules.resize = config;\r\n\t}\r\n\t\r\n\tdeInitializeColumn(column){\r\n\t\tthis.deInitializeComponent(column);\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tthis.deInitializeComponent(cell);\r\n\t\t});\r\n\t}\r\n\t\r\n\tdeInitializeComponent(component){\r\n\t\tvar handleEl;\r\n\t\t\r\n\t\tif(component.modules.resize){\r\n\t\t\thandleEl = component.modules.resize.handleEl;\r\n\t\t\t\r\n\t\t\tif(handleEl && handleEl.parentElement){\r\n\t\t\t\thandleEl.parentElement.removeChild(handleEl);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tresizeHandle(component, height){\r\n\t\tif(component.modules.resize && component.modules.resize.handleEl){\r\n\t\t\tcomponent.modules.resize.handleEl.style.height = height;\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\t\t\r\n\t\tfunction mouseMove(e){\r\n\t\t\tvar x = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX,\r\n\t\t\tstartDiff = x - self.startX,\r\n\t\t\tmoveDiff = x - self.latestX,\r\n\t\t\tblockedBefore, blockedAfter;\r\n\t\t\t\r\n\t\t\tself.latestX = x;\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tstartDiff = -startDiff;\r\n\t\t\t\tmoveDiff = -moveDiff;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tblockedBefore = column.width == column.minWidth || column.width == column.maxWidth;\r\n\t\t\t\r\n\t\t\tcolumn.setWidth(self.startWidth + startDiff);\r\n\t\t\t\r\n\t\t\tblockedAfter = column.width == column.minWidth || column.width == column.maxWidth;\r\n\t\t\t\r\n\t\t\tif(moveDiff < 0){\r\n\t\t\t\tself.nextColumn = self.initialNextColumn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.options.resizableColumnFit && self.nextColumn && !(blockedBefore && blockedAfter)){\r\n\t\t\t\tlet colWidth = self.nextColumn.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(moveDiff > 0){\r\n\t\t\t\t\tif(colWidth <= self.nextColumn.minWidth){\r\n\t\t\t\t\t\tself.nextColumn = self.nextColumn.nextColumn();\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(self.nextColumn){\r\n\t\t\t\t\tself.nextColumn.setWidth(self.nextColumn.getWidth() - moveDiff);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.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\t\t\t\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.table.columnManager.verticalAlignHeaders();\r\n\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 interfering 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.latestX = self.startX;\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 interfering 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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.binding = false;\r\n\t\tthis.visibilityObserver = false;\r\n\t\tthis.resizeObserver = false;\r\n\t\tthis.containerObserver = false;\r\n\t\t\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\t\t\r\n\t\tthis.autoResize = false;\r\n\t\t\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.initialRedraw = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\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\t\t\t\r\n\t\t\tif(typeof IntersectionObserver !== \"undefined\" && typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeVisibilityObserver();\r\n\t\t\t\t\r\n\t\t\t\tthis.autoResize = true;\r\n\t\t\t\t\r\n\t\t\t\tthis.resizeObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\t\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tthis.redrawTable();\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\tthis.resizeObserver.observe(table.element);\r\n\t\t\t\t\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tthis.redrawTable();\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.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\t\t\t\t\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\t\t\t\t\t\ttable.columnManager.rerenderColumns(true);\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeVisibilityObserver(){\r\n\t\tthis.visibilityObserver = new IntersectionObserver((entries) => {\r\n\t\t\tthis.visible = entries[0].isIntersecting;\r\n\t\t\t\r\n\t\t\tif(!this.initialized){\r\n\t\t\t\tthis.initialized = true;\r\n\t\t\t\tthis.initialRedraw = !this.visible;\r\n\t\t\t}else{\r\n\t\t\t\tif(this.visible){\r\n\t\t\t\t\tthis.redrawTable(this.initialRedraw);\r\n\t\t\t\t\tthis.initialRedraw = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.visibilityObserver.observe(this.table.element);\r\n\t}\r\n\t\r\n\tredrawTable(force){\r\n\t\tif(this.initialized && this.visible){\r\n\t\t\tthis.table.columnManager.rerenderColumns(true);\r\n\t\t\tthis.table.redraw(force);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\t\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.resizeObserver){\r\n\t\t\tthis.resizeObserver.unobserve(this.table.element);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.visibilityObserver){\r\n\t\t\tthis.visibilityObserver.unobserve(this.table.element);\r\n\t\t}\r\n\t\t\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\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\t\t\t\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.generateCollapsedRowContent.bind(this));\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 working = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = this.table.modules.layout.getMode() == \"fitColumns\" ? this.table.columnManager.getFlexBaseWidth() : this.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (this.table.options.headerVisible ? this.table.columnManager.element.clientWidth : this.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 = this.columns[this.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.hideColumn(column);\r\n\t\t\t\t\tthis.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 = this.columns[this.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\tthis.showColumn(column);\r\n\t\t\t\t\t\t\tthis.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(!this.table.rowManager.activeRowsCount){\r\n\t\t\t\tthis.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.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 data = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach((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 && this.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\tgetTable:() => {\r\n\t\t\t\t\t\t\treturn this.table;\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(this.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;\r\n","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 whether 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\t\tthis.table.rowManager.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\tthis._rowSelectionChanged();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\t\tif(rowMatch){\r\n\t\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowMatch = this.table.rowManager.getRows(rows);\r\n\t\t\t\t\t\r\n\t\t\t\t\trowMatch.forEach((row) => {\r\n\t\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(rowMatch.length){\r\n\t\t\t\t\t\tthis._rowSelectionChanged();\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\t\t\tdefault:\r\n\t\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t\t}\r\n\t\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\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\tif(!DT.isDateTime(a)){\r\n\t\t\tif(format === \"iso\"){\r\n\t\t\t\ta = DT.fromISO(String(a));\r\n\t\t\t}else{\r\n\t\t\t\ta = DT.fromFormat(String(a), format);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(!DT.isDateTime(b)){\r\n\t\t\tif(format === \"iso\"){\r\n\t\t\t\tb = DT.fromISO(String(b));\r\n\t\t\t}else{\r\n\t\t\t\tb = DT.fromFormat(String(b), format);\r\n\t\t\t}\r\n\t\t}\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\t\tif(params.locale){\r\n\t\t\t\t\tlocale = this.langLocale();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\t\tlocale = params.locale;\r\n\t\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 type = params.type || \"length\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\t\tvar result;\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\t\tresult = value.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\t\tresult = value.reduce(function(c, d){\r\n\t\t\t\t\treturn c + d;\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\t\tresult = Math.max.apply(null, value) ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\t\tresult = Math.min.apply(null, value) ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\t\tresult = value.reduce(function(c, d){\r\n\t\t\t\t\treturn c + d;\r\n\t\t\t\t}) / value.length;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\temptyAlign = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\treturn calc(b) - calc(a);\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\t\tthis.registerTableOption(\"headerSortClickElement\", \"header\"); //element which triggers sort when clicked\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\tinitialize(){\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\ttableBuilt(){\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\tremoteSortParams(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\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tsorter = column.definition.sorter;\r\n\t\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\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tswitch(this.table.options.headerSortClickElement){\r\n\t\t\t\tcase \"icon\":\r\n\t\t\t\t\tarrowEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tswitch(this.table.options.headerSortElement){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault:\r\n\t\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\tthis.setColumnHeaderSortIcon(column, \"none\");\r\n\r\n\t\t\t//sort on click\r\n\t\t\t(this.table.options.headerSortClickElement === \"icon\" ? arrowEl : colEl).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\t\tdir = \"desc\";\r\n\t\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\t\tdir = \"asc\";\r\n\t\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\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\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\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push(match);\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(null, false, false);\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\t\tsorter = \"string\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t\t}else{\r\n\t\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\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\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\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;\r\n\r\n\t\t\t\tif(item.column){\r\n\t\t\t\t\tsortObj = item.column.modules.sort;\r\n\r\n\t\t\t\t\tif(sortObj){\r\n\r\n\t\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t\t}\r\n\r\n\t\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\t\tsortListActual.push(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t\t}\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((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\tthis.setColumnHeaderSortIcon(column, \"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 === \"asc\" ? \"ascending\" : \"descending\");\r\n\t\tthis.setColumnHeaderSortIcon(column, dir);\r\n\t}\r\n\r\n\tsetColumnHeaderSortIcon(column, dir){\r\n\t\tvar sortEl = column.modules.sort.element,\r\n\t\tarrowEl;\r\n\r\n\t\tif(column.definition.headerSort && typeof this.table.options.headerSortElement === \"function\"){\r\n\t\t\twhile(sortEl.firstChild) sortEl.removeChild(sortEl.firstChild);\r\n\r\n\t\t\tarrowEl = this.table.options.headerSortElement.call(this.table, column.getComponent(), dir);\r\n\t\t\t\r\n\t\t\tif(typeof arrowEl === \"object\"){\r\n\t\t\t\tsortEl.appendChild(arrowEl);\r\n\t\t\t}else{\r\n\t\t\t\tsortEl.innerHTML = arrowEl;\r\n\t\t\t}\r\n\t\t}\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;\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;","import Module from '../../core/Module.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nclass Tooltip extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.tooltipSubscriber = null,\r\n\t\tthis.headerSubscriber = null,\r\n\t\t\r\n\t\tthis.timeout = null;\r\n\t\tthis.popupInstance = null;\r\n\t\t\r\n\t\tthis.registerTableOption(\"tooltipGenerationMode\", undefined); //deprecated\r\n\t\tthis.registerTableOption(\"tooltipDelay\", 300); \r\n\t\t\r\n\t\tthis.registerColumnOption(\"tooltip\");\r\n\t\tthis.registerColumnOption(\"headerTooltip\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.deprecatedOptionsCheck();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tdeprecatedOptionsCheck(){\r\n\t\tthis.deprecationCheckMsg(\"tooltipGenerationMode\", \"This option is no longer needed as tooltips are always generated on hover now\");\r\n\t}\t\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.headerTooltip && !this.headerSubscriber){\r\n\t\t\tthis.headerSubscriber = true;\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-mousemove\", this.mousemoveCheck.bind(this, \"headerTooltip\"));\r\n\t\t\tthis.subscribe(\"column-mouseout\", this.mouseoutCheck.bind(this, \"headerTooltip\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition.tooltip && !this.tooltipSubscriber){\r\n\t\t\tthis.tooltipSubscriber = true;\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-mousemove\", this.mousemoveCheck.bind(this, \"tooltip\"));\r\n\t\t\tthis.subscribe(\"cell-mouseout\", this.mouseoutCheck.bind(this, \"tooltip\"));\r\n\t\t}\r\n\t}\r\n\t\r\n\tmousemoveCheck(action, e, component){\r\n\t\tvar tooltip = action === \"tooltip\" ? component.column.definition.tooltip : component.definition.headerTooltip;\r\n\t\t\r\n\t\tif(tooltip){\r\n\t\t\tthis.clearPopup();\r\n\t\t\tthis.timeout = setTimeout(this.loadTooltip.bind(this, e, component, tooltip), this.table.options.tooltipDelay);\r\n\t\t}\r\n\t}\r\n\r\n\tmouseoutCheck(action, e, component){\r\n\t\tif(!this.popupInstance){\r\n\t\t\tthis.clearPopup();\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearPopup(action, e, component){\r\n\t\tclearTimeout(this.timeout);\r\n\t\tthis.timeout = null;\r\n\t\t\r\n\t\tif(this.popupInstance){\r\n\t\t\tthis.popupInstance.hide();\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadTooltip(e, component, tooltip){\r\n\t\tvar contentsEl, renderedCallback, coords;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trenderedCallback = callback;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof tooltip === \"function\"){\r\n\t\t\ttooltip = tooltip(e, component.getComponent(), onRendered);\r\n\t\t}\r\n\t\t\r\n\t\tif(tooltip instanceof HTMLElement){\r\n\t\t\tcontentsEl = tooltip;\r\n\t\t}else{\r\n\t\t\tcontentsEl = document.createElement(\"div\");\r\n\t\t\t\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(component instanceof Cell){\r\n\t\t\t\t\ttooltip = component.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(component.definition.field){\r\n\t\t\t\t\t\tthis.langBind(\"columns|\" + component.definition.field, (value) => {\r\n\t\t\t\t\t\t\tcontentsEl.innerHTML = tooltip = value || component.definition.title;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\ttooltip = component.definition.title;\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\tcontentsEl.innerHTML = tooltip;\r\n\t\t}\r\n\t\t\r\n\t\tif(tooltip || tooltip === 0 || tooltip === false){\r\n\t\t\tcontentsEl.classList.add(\"tabulator-tooltip\");\r\n\r\n\t\t\tcontentsEl.addEventListener(\"mousemove\", e => e.preventDefault());\r\n\t\t\t\r\n\t\t\tthis.popupInstance = this.popup(contentsEl);\r\n\t\t\t\r\n\t\t\tif(typeof renderedCallback === \"function\"){\r\n\t\t\t\tthis.popupInstance.renderCallback(renderedCallback);\r\n\t\t\t}\r\n\r\n\t\t\tcoords = this.popupInstance.containerEventCoords(e);\r\n\t\t\t\r\n\t\t\tthis.popupInstance.show(coords.x + 15, coords.y + 15).hideOnBlur(() => {\r\n\t\t\t\tthis.dispatchExternal(\"TooltipClosed\", component.getComponent());\r\n\t\t\t\tthis.popupInstance = null;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"TooltipOpened\", component.getComponent());\r\n\t\t}\r\n\t}\r\n}\r\n\r\nTooltip.moduleName = \"tooltip\";\r\n\r\nexport default Tooltip;\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\r\n\t\tvalue = Number(value);\r\n\r\n\t\treturn !isNaN(value) && 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\t\r\n\t\tvalue = Number(value);\r\n\r\n\t\treturn !isNaN(value) && 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\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn 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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.invalidCells = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\t\t\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\t\t\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\t\t\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\t\t\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\t\r\n\t\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\t\r\n\t\tthis.subscribe(\"edit-success\", this.editValidate.bind(this));\r\n\t\tthis.subscribe(\"edit-editor-clear\", this.editorClear.bind(this));\r\n\t\tthis.subscribe(\"edit-edited-clear\", this.editedClear.bind(this));\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Event Handling //////////\r\n\t///////////////////////////////////\r\n\t\r\n\teditValidate(cell, value, previousValue){\r\n\t\tvar valid = this.table.options.validationMode !== \"manual\" ? this.validate(cell.column.modules.validate, cell, value) : true;\r\n\t\t\r\n\t\t// allow time for editor to make render changes then style cell\r\n\t\tif(valid !== true){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\tthis.dispatchExternal(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn valid;\r\n\t}\r\n\t\r\n\teditorClear(cell, cancelled){\r\n\t\tif(cancelled){\r\n\t\t\tif(cell.column.modules.validate){\r\n\t\t\t\tthis.cellValidate(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t}\r\n\t\r\n\teditedClear(cell){\r\n\t\tif(cell.modules.validate){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? (cell.modules.validate.invalid || true) : true;\r\n\t}\r\n\t\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(this.cellValidate(cell) !== true){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\t\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\t\t\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(this.cellValidate(cell) !== true){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\t\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\t\t\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\t\t\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\t\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\t\t\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\t\t\t\r\n\t\t\tvar valid = row.validate();\r\n\t\t\t\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\t\t\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\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\t\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\t\t\r\n\t\tif(column.definition.validator){\r\n\t\t\t\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\t\t\t\t\t\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\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\t\t\t\t\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\t\t\t\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\t\t\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tpos = value.indexOf(':');\r\n\t\t\t\r\n\t\t\t\tif(pos > -1){\r\n\t\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttype = value;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\treturn this._buildValidator(type, params);\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\treturn this._buildValidator(value);\r\n\t\t\t\r\n\t\t\tcase \"object\":\r\n\t\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_buildValidator(type, params){\r\n\t\t\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\t\t\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\t\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tfailedValidators = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\t\t\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\tfailedValidators.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\t\t\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\t\t\r\n\t\tif(!failedValidators.length){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t\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 = failedValidators;\r\n\t\t\t\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\t\t\t\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\t\t\r\n\t\treturn failedValidators.length ? failedValidators : true;\r\n\t}\r\n\t\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\t\t\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\t\t\t\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\t\t\t\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;\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;"],"names":["CoreFeature","constructor","table","this","reloadData","data","silent","columnsChanged","dataLoader","load","undefined","langText","modules","localize","getText","arguments","langBind","bind","langLocale","getLocale","commsConnections","comms","getConnections","commsSend","send","layoutMode","layout","getMode","layoutRefresh","force","subscribe","eventBus","unsubscribe","subscribed","key","subscriptionChange","dispatch","chain","confirm","dispatchExternal","externalEvents","subscribedExternal","subscriptionChangeExternal","options","setOption","value","deprecationCheck","oldOption","newOption","deprecationAdvisor","check","deprecationCheckMsg","msg","checkMsg","deprecationMsg","module","ColumnComponent","column","_column","type","Proxy","get","target","name","receiver","componentFunctionBinder","handle","getElement","getDefinition","getField","getTitleDownload","getCells","cells","forEach","cell","push","getComponent","isVisible","visible","show","isGroup","columns","hide","toggle","delete","getSubColumns","output","length","getParentColumn","parent","Column","_getSelf","scrollTo","columnManager","scrollToColumn","getTable","move","to","after","toColumn","findColumn","moveColumn","console","warn","getNextColumn","nextCol","nextColumn","getPrevColumn","prevCol","prevColumn","updateDefinition","updates","getWidth","setWidth","width","result","reinitializeWidth","rerenderColumns","title","field","hozAlign","vertAlign","minWidth","maxWidth","maxInitialWidth","cssClass","variableHeight","headerVertical","headerHozAlign","headerWordWrap","editableTitle","CellComponent","_cell","getValue","getOldValue","getInitialValue","initialValue","getRow","row","getData","getColumn","setValue","mutate","restoreOldValue","setValueActual","restoreInitialValue","checkHeight","Cell","super","element","oldValue","height","component","loaded","build","generateElement","_configureCell","getFieldValue","document","createElement","className","setAttribute","style","textAlign","display","alignItems","top","bottom","middle","justifyContent","left","right","center","definition","split","classList","add","_generateContents","val","innerHTML","Node","firstChild","removeChild","appendChild","cellRendered","containerOnly","layoutElement","setValueProcessData","cellEdited","call","rowManager","changed","setFieldValue","widthStyled","clearWidth","offsetWidth","setMinWidth","minWidthStyled","setMaxWidth","maxWidthStyled","reinitializeHeight","clearHeight","setHeight","heightStyled","getHeight","offsetHeight","redrawBlock","parentNode","deleteCell","calcs","getIndex","getCellIndex","def","contentElement","titleHolderElement","titleElement","groupElement","createGroupElement","fieldStructure","titleDownload","titleFormatterRendered","mapDefinitions","setField","widthFixed","i","newCol","attachColumn","checkColumnVisibility","registerColumnField","_initialize","el","columnHeaderVertAlign","defaults","columnDefaults","optionsList","generate","defaultOptionList","checkDefinition","Object","keys","indexOf","nestedFieldSeparator","_getNestedData","_getFlatData","_setNestedData","_setFlatData","registerColumnPosition","reRegisterPosition","_buildColumnHeaderContent","_buildGroupHeader","_buildColumnHeader","parseInt","_buildColumnHeaderTitle","addEventListener","e","stopPropagation","focus","text","_formatColumnHeaderTitle","contents","dataObj","structure","columnRendered","verticalAlign","alignment","parentHeight","getGroupElement","clientHeight","getHeadersElement","minHeight","clearVerticalAlign","paddingTop","getFirstColumn","getLastColumn","getColumns","traverse","concat","getTopColumn","updateBranches","colDefs","responsiveToggle","verticalAlignHeaders","matchChildWidths","childWidth","child","index","splice","setWidthActual","isNaN","Math","floor","clientWidth","max","min","checkCellHeights","rows","heightInitialized","offsetParent","clearCellHeight","calcHeight","setCellHeight","ceil","getBoundingClientRect","Promise","resolve","reject","cellCount","deregisterColumn","generateCell","findColumnIndex","_nextVisibleColumn","getColumnByIndex","_prevVisibleColumn","fitToData","setTo","error","assign","addColumn","then","defaultOptions","Helpers","static","box","window","pageYOffset","documentElement","clientTop","pageXOffset","clientLeft","obj","clone","list","objectProto","__proto__","arrayProto","Array","isArray","match","copy","subject","findIndex","item","unshift","deepClone","OptionsList","msgType","registeredDefaults","register","option","userOptions","debugInvalidOptions","hasOwnProperty","Renderer","elementVertical","elementHorizontal","tableElement","verticalFillMode","initialize","clearRows","clearColumns","reinitializeColumnWidths","renderRows","renderColumns","rerenderRows","callback","update","blockRedraw","renderRowCells","rerenderRowCells","scrollColumns","dir","scrollRows","resize","scrollToRow","scrollToRowNearestTop","visibleRows","includingBuffer","getDisplayRows","styleRow","rowEl","remove","clear","render","rerender","scrollToRowPosition","position","ifVisible","rowIndex","offset","scrollToRowIfVisible","elVisible","elOffset","scrollHeight","scrollTop","offsetTop","BasicHorizontal","VirtualDomHorizontal","leftCol","rightCol","scrollLeft","vDomScrollPosLeft","vDomScrollPosRight","vDomPadLeft","vDomPadRight","fitDataColAvg","windowBuffer","initialized","isFitData","compatibilityCheck","layoutCheck","vertScrollListen","startsWith","clearVisRowCache","dataChange","scroll","calcWindowBuffer","buffer","columnsByIndex","old","cols","colPos","config","frozen","leftPos","rightPos","fitDataCheck","vdomHoz","paddingLeft","paddingRight","reinitChanged","reinitializeRows","initializeRow","reinitializeRow","deinitialize","change","generateCells","colEnd","col","getVisibleRows","otherRows","getRows","filter","includes","diff","abs","addColRight","removeColLeft","addColLeft","removeColRight","colPositionAdjust","start","end","changes","working","getCell","insertBefore","nextSibling","fitDataColActualWidthCheck","ex","message","newWidth","widthDiff","frozenColumns","leftColumns","appendCell","rightColumns","ColumnManager","blockHozScrollEvent","headersElement","contentsElement","columnsByField","defaultColumnOptions","redrawBlockUpdate","renderer","initializeRenderer","createHeadersElement","createHeaderContentsElement","createHeaderElement","scrollHorizontal","padVerticalScrollbar","rtl","marginLeft","marginRight","renderClass","renderers","virtual","RendererVirtualDomHorizontal","basic","RendererBasicHorizontal","renderHorizontal","headerVisible","getContentsElement","generateColumnsFromRowData","sorter","definitions","autoColumnsDefinitions","find","setColumns","_addColumn","_reIndexColumns","redraw","before","nextToColumn","colEl","topColumn","parentIndex","nextEl","adjustTableSize","HTMLElement","getColumnByField","getColumnsByFieldRoot","root","matches","getFirstVisibleColumn","getRealColumns","getDefinitions","active","getDefinitionTree","getComponents","structured","from","moveColumnActual","reinitialize","_moveColumnInArray","updateRows","toIndex","fromIndex","adjust","scrollToColumnPosition","scrollToColumnIfVisible","offsetLeft","scrollWidth","getFlexBaseWidth","totalWidth","fixedWidth","colWidth","restoreRedraw","resetScroll","footerManager","RowComponent","_row","transform","getPosition","watchPosition","moveToRow","updateData","normalizeHeight","reformat","getNextRow","nextRow","getPrevRow","prevRow","Row","manualHeight","outerHeight","positionWatchers","created","setData","create","detachElement","deleteCells","rowFormatter","deinitializeHeight","children","maxHeight","rowHeight","resizableRows","updatedData","newRowData","tempData","JSON","parse","attrname","findCell","nextDisplayRow","prevDisplayRow","toRow","findRow","moveRowActual","refreshActiveData","deleteActual","detachModules","deleteRow","wipe","isDisplayed","setPosition","getGroup","group","BasicVertical","visibility","onlyGroupHeaders","rowTop","VirtualDomVertical","vDomRowHeight","vDomTop","vDomBottom","vDomScrollPosTop","vDomScrollPosBottom","vDomTopPad","vDomBottomPad","vDomMaxRenderChain","vDomWindowBuffer","vDomWindowMinTotalRows","vDomWindowMinMarginRows","vDomTopNewRows","vDomBottomNewRows","paddingBottom","_virtualRenderFill","topRow","topOffset","_showPlaceholder","topDiff","bottomDiff","margin","_addTopRow","vDomScrollHeight","_removeBottomRow","_addBottomRow","_removeTopRow","renderVerticalBuffer","topEdge","bottomEdge","topFound","bottomRow","slice","forceMove","holder","topPad","rowsHeight","heightOccupied","topPadHeight","rowsCount","containerHeight","fillableSpace","addedRows","paddingAdjust","_quickNormalizeRowHeight","removableRows","RowManager","createHolderElement","createTableElement","heightFixer","placeholder","placeholderContents","firstRender","renderMode","fixedHeight","activeRowsPipeline","activeRows","activeRowsCount","displayRows","displayRowsCount","redrawBlockRestoreConfig","redrawBlockRenderInPosition","dataPipeline","displayPipeline","scrollbarWidth","initializePlaceholder","getTableElement","leftDir","topDir","_positionPlaceholder","getRowFromDataObject","getRowFromPosition","renderInPosition","pagination","_setDataActual","reRenderInPosition","autoColumns","_wipeElements","allIndex","activeIndex","setActiveRows","displayRowIterator","displayIndex","regenerateRowPositions","addRow","pos","addRowActual","addRows","findAddRowPos","reverse","_clearPlaceholder","addRowPos","chainResult","moveRow","moveRowInArray","clearData","getRowIndex","findRowIndex","getDisplayRowIndex","rowOnly","getDataCount","registerDataPipelineHandler","handler","priority","sort","a","b","registerDisplayPipelineHandler","skipStage","stage","cascadeOrder","destroyed","refreshPipelines","renderTable","layoutColumnsOnNewData","resetDisplayRows","setDisplayRows","viewable","scrollBarCheck","RendererVirtualDomVertical","RendererBasicVertical","renderVertical","getRenderMode","_clearTable","renderEmptyScroll","initialHeight","otherHeight","external","tableWidth","browser","event","createEvent","initEvent","dispatchEvent","Event","FooterManager","containerElement","createContainerElement","initializeElement","footerElement","querySelector","append","activate","prepend","deactivate","InteractionManager","abortClasses","previousTargets","listeners","componentMap","pseudoTrackers","subscriber","pseudoTracking","buildListenerMap","bindSubscriptionWatchers","listenerMap","listener","components","bindPseudoEvents","pseudoMouseEnter","pseudoMouseLeave","leaveList","linkedKeys","links","values","comp","subscriptionChanged","clearWatchers","added","updateEventListeners","track","removeEventListener","path","composedPath","targets","findTargets","bindComponents","triggerEvents","elTargets","targetMatches","previousTarget","closest","ComponentFunctionBinder","bindings","funcName","debugInvalidComponentFuncs","DataLoader","requestOrder","loading","params","replace","requestNo","alertLoader","mapParams","dataSendParams","response","objectInvert","dataReceiveParams","rowData","clearAlert","catch","alertError","setTimeout","dataLoaderErrorTimeout","finally","map","blockActiveLoad","alertManager","alert","dataLoaderLoading","dataLoaderError","ExternalEventBus","debug","events","subscriptionNotifiers","_debugDispatch","_dispatch","_notifySubscriptionChange","notifiers","args","shift","callResult","apply","log","InternalEventBus","_debugChain","_chain","_debugConfirm","_confirm","fallback","confirmed","DeprecationAdvisor","_warnUser","TableRegistry","tables","query","results","querySelectorAll","matchElement","Tabulator","lookupTable","Popup","container","_lookupContainer","reversedX","childPopup","blurable","blurCallback","blurEventsBound","renderedCallback","hideable","blurEvent","escEvent","_escapeCheck","destroyBinding","tableDestroyed","popupContainer","_checkContainerIsParent","body","renderCallback","containerEventCoords","touch","MouseEvent","x","touches","pageX","y","pageY","parentOffset","elementPositionCoords","containerOffset","origin","parentEl","coords","_fitToScreen","hideOnBlur","keyCode","blockHide","restoreHide","Module","_handler","registerTableOption","registerColumnOption","registerTableFunction","func","initGuard","registerComponentFunction","registerDataHandler","registerDisplayHandler","lookupIndex","refreshData","footerAppend","footerPrepend","footerRemove","popup","menuEl","menuContainer","content","forced","responsiveLayout","modExists","fitData","fitDataFill","fitDataGeneral","fitDataTable","fitDataStretch","colsWidth","gap","lastCol","responsive","fitColumns","flexColWidth","overflowWidth","flexWidth","flexGrowUnits","flexColumns","fixedShrinkColumns","flexShrinkUnits","gapFill","calcWidth","scaleColumns","freeSpace","shrinkCols","oversizeCols","oversizeSpace","remainingSpace","nextColWidth","remainingFlexGrowUnits","changeUnits","undersizeCols","calcGrow","widthGrow","calcShrink","widthShrink","Layout","mode","modes","dataChanged","moduleName","defaultModes","Localize","locale","lang","langList","langs","headerFilterPlaceholder","setHeaderFilterPlaceholder","installLang","setLocale","getLang","default","headerFilters","setHeaderFilterColumnPlaceholder","_setLangProp","desiredLocale","navigator","language","toLowerCase","prefix","traverseLang","trans","prop","_executeBindings","pathArray","_getLangElement","level","rootPath","binding","groups","items","page_size","page_title","first","first_title","last","last_title","prev","prev_title","next","next_title","all","counter","showing","of","pages","Comms","receive","selectors","connections","con","action","connection","tableComms","commsReceived","ModuleBinder","tabulator","bindStaticFunctionality","bindModules","coreModules","moduleBindings","extendModule","property","source","registerModule","mod","registerModuleBinding","findTable","prototype","orderedStartMods","orderedEndMods","unOrderedMods","moduleCore","modulesCore","moduleInitOrder","modulesRegular","core","mods","Alert","_createAlertElement","msgElement","_createMsgElement","_typeClass","interactionMonitor","browserSlow","browserMobile","originalElement","initializeCoreSystems","_create","_clearObjectPointers","_mapDeprecatedFunctionality","debugEventsExternal","debugEventsInternal","InteractionMonitor","_clearSelection","getSelection","empty","removeAllRanges","selection","_rtlCheck","_buildElement","_initializeTable","_loadInitialData","getComputedStyle","textDirection","direction","reactiveData","newElement","tagName","attributes","replaceChild","_detectBrowser","destroy","deregister","ua","userAgent","vendor","opera","test","stack","line","debugInitialization","Error","trim","replaceData","responses","addData","updateOrAddData","newRows","foundRows","updateOrAddRow","updateRow","fromRow","getRowPosition","getColumnDefinitions","showColumn","hideColumn","toggleColumn","deleteColumn","updateColumnDefinition","fromColumn","on","off","plugin","required","debugDeprecation","rowFormatterPrint","rowFormatterClipboard","rowFormatterHtmlOutput","Accessor","allowedTypes","initializeColumn","transformRow","accessor","charAt","toUpperCase","lookupAccessor","accessors","rowComponent","colComponent","generateParamsList","serializeParams","encoded","encodeURIComponent","join","url","method","json","headers","stringify","form","FormData","Ajax","urlGenerator","loaderPromise","contentTypeFormatters","ajaxRequestFunc","defaultLoaderPromise","ajaxURLGenerator","defaultURLGenerator","ajaxURL","setUrl","setDefaultConfig","ajaxConfig","getUrl","requestDataCheck","requestParams","requestData","ajaxParams","previousData","generateConfig","sendRequest","defaultConfig","ajaxRequesting","ajaxResponse","contentType","ajaxContentType","Accept","location","credentials","fetch","ok","status","statusText","defaultContentTypeFormatters","Clipboard","pasteParser","pasteAction","customSelection","rowRange","blocked","clipboard","clipboardCopyRowRange","plain","html","preventDefault","clipboardCopyFormatter","export","generateExportList","clipboardCopyConfig","clipboardCopyStyled","generateHTMLTable","generatePlainContent","clipboardData","originalEvent","reset","paste","setPasteParser","clipboardPasteParser","setPasteAction","clipboardPasteAction","getKey","range","internal","sel","textRange","createRange","selectNodeContents","toString","addRange","createTextRange","moveToElementText","select","execCommand","pasteActions","parser","pasteParsers","checkPaseOrigin","getPasteData","mutateData","mutator","valid","edit","currentCell","insert","headerFindSuccess","columnMap","CalcComponent","avg","calcParams","precision","reduce","sum","Number","toFixed","parseFloat","String","count","ColumnCalcs","topCalcs","botCalcs","genColumn","topElement","botElement","botRow","topInitialized","botInitialized","recalcAfterBlock","cellValueChanged","initializeColumnCheck","rowsUpdated","recalcActiveRows","recalcActiveRowsRefresh","tableRedraw","adjustForScrollbar","getResults","userRecalc","recalc","blockCheck","groupBy","recalcRowGroup","dataTreeStartExpanded","dataTree","recalcAll","topCalc","bottomCalc","columnCalcs","topCalcParams","botCalcParams","bottomCalcParams","calculations","initializeTopRow","botCalc","initializeBottomRow","removeCalcs","rowsToData","generateRow","recalcGroup","groupRows","getRowGroup","getChildGroups","generateRowData","generateTopRow","generateBottomRow","dataTreeChildColumnCalcs","open","getFilteredTreeChildren","disable","enable","format","formatter","getFormatter","paramKey","hasTopCalcs","hasBottomCalcs","getGroups","getGroupResults","groupObj","subGroups","getSubGroups","subGroupResults","subgroup","defaultCalculations","DataTree","indent","collapseEl","expandEl","branchEl","elementField","startOpen","collapseRow","expandRow","toggleRow","getTreeParent","getRowChildren","addTreeChildRow","isRowExpanded","dummyEl","dataTreeChildField","dataTreeChildIndent","dataTreeBranchElement","dataTreeCollapseElement","tabIndex","dataTreeExpandElement","layoutRow","rowDelete","rowDataChanged","columnMoving","initializeElementField","tableRedrawing","reinitializeRowChildren","firstCol","dataTreeElementColumn","getTreeChildren","redrawNeeded","childArray","controlEl","generateControlElement","cloneNode","getPropertyValue","oldControl","getChildren","allChildren","generateChildren","dataTreeFilter","dataTreeSort","sub","childData","childRow","getTreeParentRoot","childIndex","findChildIndex","recurse","getChildField","csv","setFileContents","delimiter","fileContents","depth","bom","jsonLines","pdf","header","autoTableParams","rowGroupStyles","fontStyle","fontSize","cellPadding","fillColor","rowCalcStyles","jsPDFParams","jsPDF","parseRow","styles","colSpan","rowSpan","orientation","unit","doc","jspdf","autoTable","didDrawPage","head","documentProcessing","xlsx","sheetName","workbook","XLSX","utils","book_new","tableFeatures","compression","compress","generateSheet","merges","worksheet","s","c","r","j","Date","sheet_add_aoa","encode_range","SheetNames","Sheets","sheetOnly","sheets","sheet","intercept","buf","ArrayBuffer","view","Uint8Array","charCodeAt","s2ab","write","bookType","bookSST","Download","mimeType","Blob","deprecatedOptionsCheck","download","downloadToTab","filename","interceptCallback","downloadFunc","downloaders","mime","triggerDownload","downloadConfig","downloadRowRange","groupHeader","groupHeaderDownload","_group","getRowCount","newTab","blob","downloadEncoder","URL","createObjectURL","msSaveOrOpenBlob","click","maskInput","mask","maskLetter","maskLetterChar","maskNumber","maskNumberChar","maskWildcard","maskWildcardChar","fillSymbols","symbol","char","maskAutoFill","defaultDownloaders","Edit","editor","onRendered","success","cancel","editorParams","_initializeParams","displayItems","currentItems","focusedItem","input","_createInputElement","listEl","_createListElement","initialValues","isFilter","filterTimeout","filtered","typing","listIteration","lastAction","filterTerm","actions","_deprecatedOptionsCheck","_initializeValue","_onRendered","listItemFormatter","sortValuesList","searchFunc","searchingPlaceholder","defaultValue","multiselect","headerFilterInitialListGen","cellEl","clickStop","preventScroll","_preventPopupBlur","_preventBlur","_inputKeyDown","_setListWidth","attribs","elementAttributes","clearable","padding","boxSizing","autocomplete","cursor","caretColor","getAttribute","_bindInputEvents","valueCheck","valueKeys","verticalNavigation","placeholderLoading","placeholderEmpty","filterDelay","emptyValue","freetext","filterFunc","filterRemote","allowEmpty","listOnEmpty","valuesLookup","valuesURL","_inputFocus","_inputClick","_inputBlur","_inputSearch","_inputKeyUp","rebuildOptionsList","_filter","clearTimeout","_filterList","_resolveValue","_clearChoices","_keyUp","_keyDown","_keySide","_keyEnter","_keyEsc","_keyHomeEnd","_keySelectLetter","_keyAutoCompLetter","stopImmediatePropagation","_focusItem","_chooseItem","_cancel","_scrollToValue","character","fromCharCode","label","scrollIntoView","behavior","block","inline","_generateOptions","_sortOptions","_buildList","_showList","isInteger","_filterOptions","iteration","_ajaxRequest","_uniqueColumnValues","valuesLookupField","_addPlaceholder","responseValues","_parseList","_clearList","term","urlBuilder","inputValues","entries","_parseListItem","_parseListGroup","itemParams","selected","original","_defaultSortFunction","_sortGroup","as","bs","a1","b1","L","rx","rd","emptyAlign","isFinite","_defaultFilterFunc","_filterItem","_buildItem","itemFormatter","_groupClick","_itemClick","_styleItem","startVis","blur","cellValue","search","onChange","selectContents","textarea","vertNav","whiteSpace","heightNow","shiftKey","shiftEnterSubmit","selectionStart","number","step","blurFunc","date","inputFormat","DT","DateTime","luxon","convertDate","isDateTime","fromISO","fromFormat","toFormat","time","newDatetime","datetime","List","star","self","maxStars","getElementsByTagName","size","stars","starsHolder","createElementNS","starChange","buildStar","starHolder","nextStar","changeValue","overflow","textOverflow","progress","mouseDrag","mouseDragWidth","percent","bar","updateValue","calcVal","round","backgroundColor","screenX","tickCross","tristate","indetermValue","indeterminateValue","indetermState","trueValueSet","falseValueSet","marginTop","checkedValue","checked","trueValue","falseValue","indeterminate","mouseClick","recursionBlock","invalidEdit","editedCells","editors","getEditedCells","clearCellEdited","navigatePrev","navigateNext","navigateLeft","navigateRight","navigateUp","navigateDown","cellIsEdited","clearEdited","editCell","cellCancelEdit","bindEditor","updateCellClass","columnDeleteCheck","rowDeleteCheck","rowEditableCheck","cancelEdit","keybindingNavigateNext","newRow","edited","allowEdit","nextCell","findPrevEditableCell","findNextEditableCell","prevCell","editable","getCurrentCell","clearEditor","cellEditCancelled","contains","button","focusCellNoEvent","forceEdit","focusScrollAdjust","leftEdge","rightEdge","leftMargin","rightMargin","cellEditor","rendered","cellClick","cellEditing","validationMode","editIndex","defaultEditors","ExportRow","ExportColumn","Export","cloneTableStyle","colVisProp","getHtml","columnHeaders","headersToExportRows","generateColumnGroupHeaders","bodyToExportRows","rowLookup","generateTable","generateTableElement","selectRow","selectedRows","columnGroups","colData","processColumnGroup","maxDepth","groupData","subGroup","subGroupData","columnVisCheck","visProp","headerDepth","exportRows","parseColumnGroup","rowGroups","exportCols","headerEl","bodyEl","lookupTableStyles","setup","treeElementField","mapElementStyles","generateHeaderElement","generateGroupElement","generateCalcElement","generateRowElement","evenRow","oddRow","calcRow","firstRow","firstGroup","getElementsByClassName","styleCells","firstCell","lastCell","classNames","generator","cellStyle","cellWrapper","formatCells","formatExportValue","align","htmlOutputConfig","props","lookup","color","fromStyle","filterVal","rowVal","filterParams","regex","RegExp","like","keywords","separator","keyword","matchAll","starts","ends","endsWith","in","Filter","filterList","headerFilterColumns","prevHeaderFilterChangeCheck","tableInitialized","searchRows","searchData","userSetFilter","userRefreshFilter","userAddFilter","getFilters","userSetHeaderFilterFocus","userGetHeaderFilterValue","userSetHeaderFilterValue","getHeaderFilters","userRemoveFilter","userClearFilter","userClearHeaderFilter","setHeaderFilterFocus","reloadHeaderFilter","getHeaderFilterValue","setHeaderFilterValue","initializeColumnHeaderFilter","hideHeaderFilterElements","showHeaderFilterElements","tableBuilt","filterMode","remoteFilterParams","initialFilter","setFilter","initialHeaderFilter","refreshFilter","addFilter","removeFilter","clearFilter","clearHeaderFilter","headerFilter","filterType","tagType","attrType","filterChangeCheck","prevSuccess","emptyFunc","headerFilterFunc","filters","headerFilterFuncParams","fieldVal","colVal","trackChanges","generateHeaderFilterElement","filterElement","editorElement","typingTimer","searchTrigger","headerElement","headerFilterEmptyCheck","headerFilterParams","headerFilterLiveFilterDelay","hasAttribute","headerFilterLiveFilter","hasChanged","findFilter","findSubFilters","ajax","filtersToArray","searchType","filterRecurse","rowList","activeRowComponents","filterRow","subFilter","defaultFilters","plaintext","formatterParams","emptyToSpace","sanitizeHTML","money","integer","decimal","rgx","floatVal","sign","decimalSym","thousandSym","thousand","negativeSign","symbolAfter","link","urlPrefix","labelField","labelTraverse","urlField","image","src","urlSuffix","truthy","allowTruthy","tick","tickElement","cross","crossElement","outputFormat","invalid","invalidPlaceholder","isValid","timezone","setZone","datetimediff","suffix","humanize","now","toHuman","traffic","percentValue","colors","legend","legendColor","legendAlign","barEl","barContainer","legendEl","holderEl","buttonTick","buttonCross","rownum","innerText","responsiveCollapse","toggleList","isOpen","rowSelection","checkbox","selectableRangeMode","toggleSelect","handleComplexRowClick","isSelected","registerRowSelectCheckbox","deselectRow","registerHeaderSelectCheckbox","Format","formatValue","formatHeader","lookupFormatter","formatterPrint","print","formatterClipboard","formatterHtmlOutput","htmlOutput","formatters","mockCell","titleFormatter","titleFormatterParams","entityMap","defaultFormatters","FrozenColumns","initializationMode","layoutCell","reinitializeColumns","blockLayout","unblockLayout","edge","frozenCheck","layoutCalcRows","layoutGroupCalcs","groupList","layoutColumnPosition","allCells","leftParents","marginValue","getColGroupParentElement","_calcSpace","FrozenRows","freezeRow","unfreezeRow","isRowFrozen","detachRow","frozenRows","initializeRows","rowType","isFrozen","styleRows","GroupComponent","groupManager","getParentGroup","toggleVisibility","Group","oldGroup","hasSubGroups","groupIDLookups","_addRowToGroup","_addRow","elementContents","arrowElement","createElements","addBindings","createValueGroups","arrow","movableRows","initializeGroupHeader","allowedValues","_createGroup","groupToggleElement","groupID","groupKey","headerGenerator","insertRow","conformRowData","generateGroupHeaderContents","updateGroupRows","scrollHeader","removeRow","groupValues","removeGroup","getHeadersAndRows","_visSet","groupClosedShowCalcs","getPath","childNodes","GroupRows","displayHandler","setGroupBy","setGroupValues","setGroupStartOpen","setGroupHeader","userGetGroups","userGetGroupedData","rowGetGroup","groupUpdateOnCellEdit","cellUpdated","reassignRowToGroup","configureGroupSetup","rowDeleting","scrollHeaders","rowMoving","rowAddingIndex","rowSample","virtualRenderFill","groupStartOpen","langValue","lookupFunc","prevValue","assignRowToGroup","getGroupedData","toGroup","fromGroup","generateGroups","groupComponents","pullGroupListData","groupListData","rowCount","headerContent","countGroups","oldGroups","createGroup","assignRowToExistingGroup","newGroupNeeded","oldRowGroup","oldGroupPath","newGroupPath","getExpectedPath","every","groupPath","groupId","checkBasicModeGroupHeaderWidth","History","history","clearComponentHistory","rowDeleted","rowAdded","rowMoved","undo","redo","getHistoryUndoSize","getHistoryRedoSize","posFrom","posTo","newValue","undoers","redoers","_rebindRow","oldRow","cellEdit","rowAdd","rowMove","HtmlTableImport","fieldIndex","hasIndex","tableElementCheck","parseTable","_extractOptions","_extractHeaders","_generateBlankHeaders","optionsArr","attrib","_attribValue","_findCol","exists","textContent","inQuote","nextChar","array","Import","importFromFile","importFormat","loadDataCheck","loadData","importData","lookupImporter","structureData","err","importer","importers","extension","pickFile","extensions","accept","file","files","reader","FileReader","importReader","readAsArrayBuffer","readAsBinaryString","readAsDataURL","readAsText","onload","onerror","parsedData","structureArrayToObject","structureArrayToColumns","defaultImporters","Interaction","eventMap","rowClick","rowDblClick","rowContext","rowMouseEnter","rowMouseLeave","rowMouseOver","rowMouseOut","rowMouseMove","rowMouseDown","rowMouseUp","rowTap","rowDblTap","rowTapHold","cellDblClick","cellContext","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellMouseDown","cellMouseUp","cellTap","cellDblTap","cellTapHold","headerClick","headerDblClick","headerContext","headerMouseEnter","headerMouseLeave","headerMouseOver","headerMouseOut","headerMouseMove","headerMouseDown","headerMouseUp","headerTap","headerDblTap","headerTapHold","groupClick","groupDblClick","groupContext","groupMouseEnter","groupMouseLeave","groupMouseOver","groupMouseOut","groupMouseMove","groupMouseDown","groupMouseUp","groupTap","groupDblTap","groupTapHold","subscribers","touchSubscribers","columnSubscribers","touchWatchers","tap","tapDbl","tapHold","initializeExternalEvents","cellContentsSelectionFixer","selectNode","subscribeTouchEvents","unsubscribeTouchEvents","handleTouch","noTouch","watchers","componentObj","Keybindings","watchKeys","pressedKeys","keyupBinding","keydownBinding","keybindings","mergedBindings","mapBindings","bindEvents","clearBindings","mapBinding","symbolsList","ctrl","meta","code","checkBinding","ctrlKey","metaKey","navPrev","navNext","navUp","navDown","scrollPageUp","scrollPageDown","scrollToStart","scrollToEnd","copyToClipboard","keyBlock","newPos","scrollMax","navLeft","navRight","Menu","nestedMenuBlock","currentComponent","rootPopup","initializeRowWatchers","initializeGroupWatchers","rowContextMenu","loadMenuEvent","rowClickMenu","rowDblClickMenu","groupContextMenu","groupClickMenu","groupDblClickMenu","headerContextMenu","loadMenuTableColumnEvent","headerClickMenu","headerDblClickMenu","headerMenu","initializeColumnHeaderMenu","contextMenu","loadMenuTableCellEvent","clickMenu","dblClickMenu","headerMenuEl","icon","headerMenuIcon","menu","loadMenu","parentPopup","itemEl","disabled","MoveColumns","placeholderElement","createPlaceholderElement","hoverElement","checkTimeout","checkPeriod","moving","toCol","toColAfter","startX","autoScrollMargin","autoScrollStep","autoScrollTimeout","touchMove","moveHover","endMove","movableColumns","mousemove","which","startMove","bindTouchEvents","prevColWidth","nextColWidthLast","prevColWidthLast","startXMove","passive","moveToCol","_bindMouseMove","_unbindMouseMove","movingCells","scrollPos","columnHolder","xPos","MoveRows","toRowAfter","hasHandle","startY","tableRowDropEvent","connectionSelectorsTables","connectionSelectorsElements","connectionElements","connectedTable","connectedRow","movableRowsConnectedTables","movableRowsConnectedElements","initializeCell","mouseup","tableRowDrop","previousSibling","rowHandle","nextRowHeight","prevRowHeight","nextRowHeightLast","prevRowHeightLast","startYMove","setStartPosition","connectToTables","pointerEvents","disconnectFromTables","moveHoverConnections","moveHoverTable","rowHolder","yPos","elementRowDrop","connectionTables","dropEvent","tabulatorElementDropEvent","connect","disconnect","dropComplete","sender","movableRowsSender","senders","movableRowsReceiver","receivers","fromTable","toTable","Mutator","enabled","transformCell","mutateLink","lookupMutator","mutators","mutatorEdit","linkCell","pageSize","currentRow","currentPage","totalRows","totalPages","showingEl","valueEl","ofEl","totalEl","rowsEl","Page","progressiveLoad","pageCounterElement","pageCounter","page","remoteRowCountEstimate","initialLoad","dataChanging","pageSizes","setMaxPage","setPage","userSetPageToRow","userSetPageSize","getPageSize","previousPage","nextPage","getPage","getPageMax","setPageToRow","initialLoadComplete","calculatePageSizes","footerRedraw","paginationAddRow","rowAddingPosition","paginationMode","remotePageParams","_parseRemoteData","restOnRenderBefore","initializePageCounter","initializePaginator","initializeProgressive","scrollVertical","testElRow","testElCell","paginationSize","generatePageSizeSelectList","setPageSize","progressiveLoadScrollMargin","pagesElement","firstBut","prevBut","nextBut","lastBut","paginationSizeSelector","pageSizeSelect","paginationCounter","pageCounters","hidden","pageSelectLabel","paginationCounterHolder","paginationElement","paginationCounterElement","paginationInitialPage","paginationButtonCount","setMaxRows","trigger","_setPageCounter","_setPageButtons","leftSize","rightSize","_generatePageButton","actualStartRow","actualRowPageSize","actualRows","last_page","last_row","progressiveLoadDelay","footer","defaultPageCounters","local","id","localStorage","getItem","cookie","cookiePos","setItem","expireDate","setDate","getDate","toUTCString","Persistence","defWatcherBlock","readFunc","writeFunc","localStorageTest","testKey","removeItem","persistence","retrievedData","persistenceMode","persistenceID","persistenceReaderFunc","readers","persistenceWriterFunc","writers","retrieveData","save","eventSave","getColumnLayout","setColumnLayout","sorters","initialSort","parseColumns","mergeDefinition","getOwnPropertyDescriptor","defineProperty","set","current","oldCols","newCols","_findColumn","validateSorters","getSort","getGroupConfig","getPageConfig","excludedKeys","defStore","colDef","defaultReaders","defaultWriters","_componentPopupCall","loadPopupEvent","rowContextPopup","rowClickPopup","rowDblClickPopup","groupContextPopup","groupClickPopup","groupDblClickPopup","headerContextPopup","loadPopupTableColumnEvent","headerClickPopup","headerDblClickPopup","headerPopup","initializeColumnHeaderPopup","contextPopup","loadPopupTableCellEvent","clickPopup","dblClickPopup","headerPopupEl","headerPopupIcon","loadPopup","contentsEl","Print","manualBlock","printAsHtml","replaceTable","cleanup","printFullscreen","printConfig","printStyled","printRowRange","footerContent","scrollX","scrollY","footerEl","tableEl","printHeader","printFooter","printFormatter","ReactiveData","origFuncs","currentVersion","unblock","watchRow","watchData","unwatchData","version","enumerable","configurable","arg","pop","startRow","oldRows","writable","watchKey","watchTreeChildren","childField","rebuildTree","unwatchRow","ResizeColumns","startColumn","startWidth","latestX","initialNextColumn","layoutColumnHeader","initializeEventWatchers","layoutCellHandles","deInitializeComponent","resizeHandle","columnLayoutUpdated","deInitializeColumn","columnWidthUpdated","resizable","reinitializeColumn","frozenColumnOffset","frozenOffset","handleEl","nearestColumn","_checkResizability","handleDown","_mouseDown","oldWidth","parentElement","mouseMove","blockedBefore","blockedAfter","startDiff","moveDiff","resizableColumnFit","mouseUp","ResizeRows","startHeight","prevHandle","prevHandleDown","screenY","ResizeTable","visibilityObserver","resizeObserver","containerObserver","tableHeight","containerWidth","autoResize","initialRedraw","tableStyle","IntersectionObserver","ResizeObserver","initializeVisibilityObserver","entry","nodeHeight","contentRect","nodeWidth","redrawTable","observe","tableResized","isIntersecting","unobserve","ResponsiveLayout","hiddenColumns","collapseFormatter","collapseStartOpen","collapseHandleColumn","updateColumnVisibility","initializeResponsivity","generateCollapsedRowContent","responsiveLayoutCollapseFormatter","formatCollapsedData","responsiveLayoutCollapseStartOpen","order","generateCollapsedContent","colCount","generateCollapsedRowData","mockCellComponent","responsiveLayoutCollapseUseFormatters","node_content","titleData","valueData","titleHighlight","SelectRow","selecting","lastClickedRow","selectPrev","headerCheckboxElement","selectRows","deselectRows","getSelectedRows","getSelectedData","isRowSelected","selectable","clearSelectionData","rowRetrieve","selectablePersistence","_deselectRow","_rowSelectionChanged","endSelect","selectableCheck","lastClickedRowIdx","rowIdx","fromRowIdx","toRowIdx","toggledRows","toggledRow","_selectRow","rowMatch","rowInfo","selectableRollingSelection","checkboxEl","dataTreeSelectPropagate","childRowSelection","selectedRow","aRow","bRow","alignEmptyValues","decimalSeparator","thousandSeparator","string","localeCompare","boolean","calc","d","alphanum","Sort","sortList","userSetSort","clearSort","sortMode","remoteSortParams","setSort","refreshSort","arrowEl","sorterParams","startingDir","headerSortStartingDir","headerSortTristate","headerSort","headerSortClickElement","headerSortElement","setColumnHeaderSortIcon","columnHeaderSortMulti","newSortList","findSorter","sortOrderReverse","sortListActual","rowComponents","clearColumnHeaders","sortObj","setColumnHeader","_sortItems","sortEl","sorterCount","sortItem","_sortRow","el1Comp","el2Comp","el1","el2","defaultSorters","Tooltip","tooltipSubscriber","headerSubscriber","timeout","popupInstance","headerTooltip","mousemoveCheck","mouseoutCheck","tooltip","clearPopup","loadTooltip","tooltipDelay","parameters","float","numeric","minLength","maxLength","unique","cellData","Validate","invalidCells","getInvalidCells","userClearCellValidation","userValidate","cellIsValid","clearValidation","cellValidate","columnValidate","rowValidate","editValidate","editorClear","editedClear","previousValue","validate","cancelled","validator","_extractValidator","substring","_buildValidator","validators","failedValidators","invalidIndex","defaultValidators","TabulatorFull"],"mappings":";0OAAe,MAAMA,EAEpBC,YAAYC,GACXC,KAAKD,MAAQA,EAOdE,WAAWC,EAAMC,EAAQC,GACxB,OAAOJ,KAAKD,MAAMM,WAAWC,KAAKJ,OAAMK,OAAWA,OAAWA,EAAWJ,EAAQC,GAOlFI,WACC,OAAOR,KAAKD,MAAMU,QAAQC,SAASC,WAAWC,WAG/CC,WACC,OAAOb,KAAKD,MAAMU,QAAQC,SAASI,QAAQF,WAG5CG,aACC,OAAOf,KAAKD,MAAMU,QAAQC,SAASM,aAAaJ,WAQjDK,mBACC,OAAOjB,KAAKD,MAAMU,QAAQS,MAAMC,kBAAkBP,WAGnDQ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,EAAKwb,YAMhBnsB,EAAK9D,QAAQomF,WAChBtiF,EAAK9D,QAAQomF,SAAW,IAGrBO,EAAiBhiF,QAQpBb,EAAK9D,QAAQomF,SAASxzB,QAAU+zB,EAES,WAAtCpnF,KAAKD,MAAMyC,QAAQ0lD,gBACrB3jD,EAAKP,aAAa4G,UAAUC,IAAI,8BAGb,GAAjBw8E,GACFrnF,KAAKgmF,aAAaxhF,KAAKD,KAdxBA,EAAK9D,QAAQomF,SAASxzB,SAAU,EAChC9uD,EAAKP,aAAa4G,UAAU6M,OAAO,6BAEhC4vE,GAAgB,GAClBrnF,KAAKgmF,aAAar0E,OAAO01E,EAAc,KAclCD,EAAiBhiF,QAASgiF,EAGlCnB,kBACC,IAAI9gF,EAAS,GAMb,OAJAnF,KAAKgmF,aAAa1hF,SAASC,IAC1BY,EAAOX,KAAKD,EAAKE,eAAe,IAG1BU,EAGRkhF,gBAAgB9hF,GACf,IAAI8iF,EAED9iF,EAAK9D,QAAQomF,UAAYtiF,EAAK9D,QAAQomF,SAASxzB,UAEjD9uD,EAAKP,aAAa4G,UAAU6M,OAAO,6BACnClT,EAAK9D,QAAQomF,SAASxzB,SAAU,GAEhCg0B,EAAernF,KAAKgmF,aAAan3E,QAAQtK,KAEtB,GAClBvE,KAAKgmF,aAAar0E,OAAO01E,EAAc,KAM3CtB,GAAShsD,WAAa,WAGtBgsD,GAASoB,WAAaG,0qBCzStB,MAAMC,WAAsB3zD,UAG5B,IAAI2J,EAAagqD,GAAe9mF"} \ No newline at end of file diff --git a/dist/js/tabulator_esm.js b/dist/js/tabulator_esm.js index 1cf480978..f336433ca 100644 --- a/dist/js/tabulator_esm.js +++ b/dist/js/tabulator_esm.js @@ -1,4 +1,4 @@ -/* Tabulator v5.4.0 (c) Oliver Folkerd 2022 */ +/* Tabulator v5.4.1 (c) Oliver Folkerd 2022 */ class CoreFeature{ constructor(table){ diff --git a/dist/js/tabulator_esm.min.js b/dist/js/tabulator_esm.min.js index 53313c68a..79895e951 100644 --- a/dist/js/tabulator_esm.min.js +++ b/dist/js/tabulator_esm.min.js @@ -1,3 +1,3 @@ -/* Tabulator v5.4.0 (c) Oliver Folkerd 2022 */ -class e{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}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(e){return this.table.modules.layout.layout(e)}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]}deprecationCheck(e,t){return this.table.deprecationAdvisor.check(e,t)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class t{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 i extends e{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed,this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return"string"==typeof e?(e=document.querySelector(e))||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)"):!0===e&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t||!!t.parentNode&&this._checkContainerIsParent(e,t.parentNode)}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var i=!(e instanceof MouseEvent),s=i?e.touches[0].pageX:e.pageX,o=i?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let e=t.elOffset(this.container);s-=e.left,o-=e.top}return{x:s,y:o}}elementPositionCoords(e,i="right"){var s,o,n,r=t.elOffset(e);switch(this.container!==document.body&&(s=t.elOffset(this.container),r.left-=s.left,r.top-=s.top),i){case"right":o=r.left+e.offsetWidth,n=r.top-1;break;case"bottom":o=r.left,n=r.top+e.offsetHeight;break;case"left":o=r.left,n=r.top-1;break;case"top":o=r.left,n=r.top;break;case"center":o=r.left+e.offsetWidth/2,n=r.top+e.offsetHeight/2}return{x:o,y:n,offset:r}}show(e,t){var i,s,o,n,r;return this.destroyed||this.table.destroyed||(e instanceof HTMLElement?(o=e,n=(r=this.elementPositionCoords(e,t)).offset,i=r.x,s=r.y):"number"==typeof e?(n={top:0,left:0},i=e,s=t):(i=(r=this.containerEventCoords(e)).x,s=r.y,this.reversedX=!1),this.element.style.top=s+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),"function"==typeof this.renderedCallback&&this.renderedCallback(),this._fitToScreen(i,s,o,n,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",(e=>{e.stopPropagation()}))),this}_fitToScreen(e,t,i,s,o){var n=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;if((e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",this.element.style.right=i?this.container.offsetWidth-s.left+"px":this.container.offsetWidth-e+"px",this.reversedX=!0),t+this.element.offsetHeight>Math.max(this.container.offsetHeight,n?this.container.scrollHeight:0))if(i)if("bottom"===o)this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";else this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px";else this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout((()=>{this.visible&&(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),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)}),100),this.blurCallback=e),this}_escapeCheck(e){27==e.keyCode&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new i(this.table,e,this),this.childPopup}}class s 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]=(...i)=>(this.table.initGuard(e),t(...i)):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}displayRows(e){var t,i=this.table.rowManager.displayRows.length-1;if(this._handler&&(t=this.table.rowManager.displayPipeline.findIndex((e=>e.handler===this._handler)))>-1&&(i=t),e&&(i+=e),this._handler)return i>-1?this.table.rowManager.getDisplayRows(i):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new i(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}class o extends s{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,i){var s="accessor"+(i.charAt(0).toUpperCase()+i.slice(1)),o=e.getComponent(),n=t.deepClone(e.data||{});return this.table.columnManager.traverse((function(e){var t,r,a,l;e.modules.accessor&&(r=e.modules.accessor[s]||e.modules.accessor.accessor||!1)&&"undefined"!=(t=e.getFieldValue(n))&&(l=e.getComponent(),a="function"==typeof r.params?r.params(t,n,i,l,o):r.params,e.setFieldValue(n,r.accessor(t,n,i,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,i){return e&&i&&Object.keys(i).length&&(t.method&&"get"!=t.method.toLowerCase()||(t.method="get",e+=(e.includes("?")?"&":"?")+r(i))),e}function l(e,t){var i=[];if(t=t||"",Array.isArray(e))e.forEach(((e,s)=>{i=i.concat(l(e,t?t+"["+s+"]":s))}));else if("object"==typeof e)for(var s in e)i=i.concat(l(e[s],t?t+"["+s+"]":s));else i.push({key:t,value:e});return i}var h={json:{headers:{"Content-Type":"application/json"},body:function(e,t,i){return JSON.stringify(i)}},form:{headers:{},body:function(e,t,i){var s=l(i),o=new FormData;return s.forEach((function(e){o.append(e.key,e.value)})),o}}};class d extends s{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=d.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||d.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||d.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({},d.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()}}d.moduleName="ajax",d.defaultConfig={method:"GET"},d.defaultURLGenerator=a,d.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([]))}))},d.contentTypeFormatters=h;class c extends s{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,s;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(s=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),t=(i=this.table.modules.export.generateHTMLTable(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=c.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=c.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}}c.moduleName="clipboard",c.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)}},c.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 u{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 p{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")}_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)}));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":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){this.setValueProcessData(e,t,i)&&(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,i){var s=!1;return(this.value!==e||i)&&(s=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),s&&this.dispatch("cell-value-changed",this),s}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.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,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,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 p(this)),this.component}}class g{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 f&&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.rerenderColumns(!0),t}}var b={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,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};class f 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.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 f(e,this);this.attachColumn(i)})),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end"}return 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(f.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach((e=>{-1===f.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)}_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._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;(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.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){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.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),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":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{t.push(e),t=t.concat(e.getColumns(!0))})):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach((function(e){t.push(e.getDefinition(!0))})),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach((function(t){t.visible&&(e=!0)})),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(e){e.show()})),this.isGroup||null!==this.width||this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(e){e.hide()})),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach((function(t){t.visible&&(e+=t.getWidth())})),this.contentElement.style.maxWidth=e-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-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.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach((function(e){e.setMinWidth()}))}setMaxWidth(e){this.minWidth&&e{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 g(this)),this.component}}f.defaultOptionList=b;class v{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(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(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 w 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.position=0,this.positionWatchers=[],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)}deinitialize(){this.initialized=!1}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,i=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(t=this.table.options.resizableRows?this.element.clientHeight:0,this.cells.forEach((function(e){var t=e.getHeight();t>i&&(i=t)})),this.height=e?Math.max(i,t):this.manualHeight?this.height:Math.max(i,t)),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.table.options.rowHeight&&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 i,s=this.element&&t.elVisible(this.element),o={};return new Promise(((t,n)=>{"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)),i=this.chain("row-data-changing",[this,o,e],null,e);for(let e in i)this.data[e]=i[e];this.dispatch("row-data-save-after",this);for(let t in e){this.table.columnManager.getColumnsByFieldRoot(t).forEach((e=>{let t=this.getCell(e.getField());if(t){let o=e.getFieldValue(i);t.getValue()!==o&&(t.setValueProcessData(o),s&&t.cellRendered())}}))}s?(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,s,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),t()}))}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.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t{e(this.position)})))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new v(this)),this.component}}var C={avg:function(e,t,i){var s=0,o=void 0!==i.precision?i.precision:2;return e.length&&(s=e.reduce((function(e,t){return Number(e)+Number(t)})),s/=e.length,s=!1!==o?s.toFixed(o):s),parseFloat(s).toString()},max:function(e,t,i){var s=null,o=void 0!==i.precision&&i.precision;return e.forEach((function(e){((e=Number(e))>s||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;this.blockCheck()||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 w(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 u(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}}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}}E.moduleName="columnCalcs",E.calculations=C;class y extends s{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.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,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),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.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){e&&this.table.rowManager.getRows().forEach((e=>{this.reinitializeRowChildren(e)}))}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=i.controlEl;t=t||e.getCells()[0].getElement(),!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))}getRows(e){var t=[];return e.forEach(((e,i)=>{var s;t.push(e),e instanceof w&&(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 w(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()}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}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 w&&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 w?i=e.data:e instanceof v?i=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find((t=>t instanceof w&&t.element===e)))&&(i=i.data):null===e&&(i=!1):i=void 0!==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 w&&(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]}}y.moduleName="dataTree";var R={csv:function(e,t={},i){var s=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=null!==e.value?JSON.stringify(e.value):"";break;case"undefined":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.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=null!==e.value?JSON.stringify(e.value):"";break;case"undefined":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.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.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),a=!("compress"in i)||i.compress;function l(){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(l());else{if(i.sheets)for(var h in i.sheets)!0===i.sheets[h]?(n.SheetNames.push(h),n.Sheets[h]=l()):(n.SheetNames.push(h),r.commsSend(i.sheets[h],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function(e){n.Sheets[h]=e}}));else n.SheetNames.push(o),n.Sheets[o]=l();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",compression:a})),"application/octet-stream")}},html:function(e,t,i){this.modExists("export",!0)&&i(this.modules.export.generateHTMLTable(e),"text/html")}};class x extends s{constructor(e){super(e),this.registerTableOption("downloadEncoder",(function(e,t){return new Blob([e],{type:t})})),this.registerTableOption("downloadReady",void 0),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.deprecatedOptionsCheck(),this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("downloadReady","downloadEncoder")}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:x.downloaders[e]?n=x.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=this.table.options.downloadEncoder(e,t);r&&(o?window.open(window.URL.createObjectURL(r)):(s=s||"Tabulator."+("function"==typeof i?"txt":i),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){if("intercept"===t)this.download(i.type,"",i.options,i.active,i.intercept)}}function T(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)}x.moduleName="download",x.downloaders=R;class M{constructor(e,t,i,s,o,n){this.edit=e,this.table=e.table,this.cell=t,this.params=this._initializeParams(n),this.data=[],this.displayItems=[],this.currentItems=[],this.focusedItem=null,this.input=this._createInputElement(),this.listEl=this._createListElement(),this.initialValues=null,this.isFilter=!t._getSelf,this.filterTimeout=null,this.filtered=!1,this.typing=!1,this.values=[],this.popup=null,this.listIteration=0,this.lastAction="",this.blurable=!0,this.actions={success:s,cancel:o},this._deprecatedOptionsCheck(),this._initializeValue(),i(this._onRendered.bind(this))}_deprecatedOptionsCheck(){this.params.listItemFormatter&&this.cell.getTable().deprecationAdvisor.msg("The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.sortValuesList&&this.cell.getTable().deprecationAdvisor.msg("The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchFunc&&this.cell.getTable().deprecationAdvisor.msg("The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchingPlaceholder&&this.cell.getTable().deprecationAdvisor.msg("The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options")}_initializeValue(){var e=this.cell.getValue();void 0===e&&void 0!==this.params.defaultValue&&(e=this.params.defaultValue),this.initialValues=this.params.multiselect?e:[e],this.isFilter&&(this.input.value=this.initialValues?this.initialValues.join(","):"",this.headerFilterInitialListGen())}_onRendered(){var e=this.cell.getElement();function t(e){e.stopPropagation()}this.input.style.height="100%",this.input.focus({preventScroll:!0}),e.addEventListener("click",t),setTimeout((()=>{e.removeEventListener("click",t)}),1e3),this.input.addEventListener("mousedown",this._preventPopupBlur.bind(this))}_createListElement(){var e=document.createElement("div");return e.classList.add("tabulator-edit-list"),e.addEventListener("mousedown",this._preventBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e}_setListWidth(){var e=this.isFilter?this.input:this.cell.getElement();this.listEl.style.minWidth=e.offsetWidth+"px",this.params.maxWidth&&(!0===this.params.maxWidth?this.listEl.style.maxWidth=e.offsetWidth+"px":"number"==typeof this.params.maxWidth?this.listEl.style.maxWidth=this.params.maxWidth+"px":this.listEl.style.maxWidth=this.params.maxWidth)}_createInputElement(){var e=this.params.elementAttributes,t=document.createElement("input");if(t.setAttribute("type",this.params.clearable?"search":"text"),t.style.padding="4px",t.style.width="100%",t.style.boxSizing="border-box",this.params.autocomplete||(t.style.cursor="default",t.style.caretColor="transparent"),e&&"object"==typeof e)for(let i in e)"+"==i.charAt(0)?(i=i.slice(1),t.setAttribute(i,t.getAttribute(i)+e["+"+i])):t.setAttribute(i,e[i]);return this.params.mask&&T(t,this.params),this._bindInputEvents(t),t}_initializeParams(e){var t,i=["values","valuesURL","valuesLookup"];return(e=Object.assign({},e)).verticalNavigation=e.verticalNavigation||"editor",e.placeholderLoading=void 0===e.placeholderLoading?"Searching ...":e.placeholderLoading,e.placeholderEmpty=void 0===e.placeholderEmpty?"No Results Found":e.placeholderEmpty,e.filterDelay=void 0===e.filterDelay?300:e.filterDelay,e.emptyValue=Object.keys(e).includes("emptyValue")?e.emptyValue:"",(t=Object.keys(e).filter((e=>i.includes(e))).length)?t>1&&console.warn("list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor"):console.warn("list editor config error - either the values, valuesURL, or valuesLookup option must be set"),e.autocomplete?e.multiselect&&(e.multiselect=!1,console.warn("list editor config error - multiselect option is not available when autocomplete is enabled")):(e.freetext&&(e.freetext=!1,console.warn("list editor config error - freetext option is only available when autocomplete is enabled")),e.filterFunc&&(e.filterFunc=!1,console.warn("list editor config error - filterFunc option is only available when autocomplete is enabled")),e.filterRemote&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option is only available when autocomplete is enabled")),e.mask&&(e.mask=!1,console.warn("list editor config error - mask option is only available when autocomplete is enabled")),e.allowEmpty&&(e.allowEmpty=!1,console.warn("list editor config error - allowEmpty option is only available when autocomplete is enabled")),e.listOnEmpty&&(e.listOnEmpty=!1,console.warn("list editor config error - listOnEmpty option is only available when autocomplete is enabled"))),e.filterRemote&&"function"!=typeof e.valuesLookup&&!e.valuesURL&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source")),e}_bindInputEvents(e){e.addEventListener("focus",this._inputFocus.bind(this)),e.addEventListener("click",this._inputClick.bind(this)),e.addEventListener("blur",this._inputBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e.addEventListener("search",this._inputSearch.bind(this)),this.params.autocomplete&&e.addEventListener("keyup",this._inputKeyUp.bind(this))}_inputFocus(e){this.rebuildOptionsList()}_filter(){this.params.filterRemote?(clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout((()=>{this.rebuildOptionsList()}),this.params.filterDelay)):this._filterList()}_inputClick(e){e.stopPropagation()}_inputBlur(e){this.blurable&&(this.popup?this.popup.hide():this._resolveValue(!0))}_inputSearch(){this._clearChoices()}_inputKeyDown(e){switch(e.keyCode){case 38:this._keyUp(e);break;case 40:this._keyDown(e);break;case 37:case 39:this._keySide(e);break;case 13:this._keyEnter();break;case 27:this._keyEsc();break;case 36:case 35:this._keyHomeEnd(e);break;case 9:break;default:this._keySelectLetter(e)}}_inputKeyUp(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:this._keyAutoCompLetter(e)}}_preventPopupBlur(){this.popup&&this.popup.blockHide(),setTimeout((()=>{this.popup&&this.popup.restoreHide()}),10)}_preventBlur(){this.blurable=!1,setTimeout((()=>{this.blurable=!0}),10)}_keyUp(e){var t=this.displayItems.indexOf(this.focusedItem);("editor"==this.params.verticalNavigation||"hybrid"==this.params.verticalNavigation&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&this._focusItem(this.displayItems[t-1]))}_keyDown(e){var t=this.displayItems.indexOf(this.focusedItem);("editor"==this.params.verticalNavigation||"hybrid"==this.params.verticalNavigation&&t=38&&e.keyCode<=90&&this._scrollToValue(e.keyCode))}_keyAutoCompLetter(e){this._filter(),this.lastAction="typing",this.typing=!0}_scrollToValue(e){clearTimeout(this.filterTimeout);var t=String.fromCharCode(e).toLowerCase();this.filterTerm+=t.toLowerCase();var i=this.displayItems.find((e=>void 0!==e.label&&e.label.toLowerCase().startsWith(this.filterTerm)));i&&this._focusItem(i),this.filterTimeout=setTimeout((()=>{this.filterTerm=""}),800)}_focusItem(e){this.lastAction="focus",this.focusedItem&&this.focusedItem.element&&this.focusedItem.element.classList.remove("focused"),this.focusedItem=e,e&&e.element&&(e.element.classList.add("focused"),e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}))}headerFilterInitialListGen(){this._generateOptions(!0)}rebuildOptionsList(){this._generateOptions().then(this._sortOptions.bind(this)).then(this._buildList.bind(this)).then(this._showList.bind(this)).catch((e=>{Number.isInteger(e)||console.error("List generation error",e)}))}_filterList(){this._buildList(this._filterOptions()),this._showList()}_generateOptions(e){var t=[],i=++this.listIteration;return this.filtered=!1,this.params.values?t=this.params.values:this.params.valuesURL?t=this._ajaxRequest(this.params.valuesURL,this.input.value):"function"==typeof this.params.valuesLookup?t=this.params.valuesLookup(this.cell,this.input.value):this.params.valuesLookup&&(t=this._uniqueColumnValues(this.params.valuesLookupField)),t instanceof Promise?(e||this._addPlaceholder(this.params.placeholderLoading),t.then().then((e=>this.listIteration===i?this._parseList(e):Promise.reject(i)))):Promise.resolve(this._parseList(t))}_addPlaceholder(e){var t=document.createElement("div");"function"==typeof e&&(e=e(this.cell.getComponent(),this.listEl)),e&&(this._clearList(),e instanceof HTMLElement?t=e:(t.classList.add("tabulator-edit-list-placeholder"),t.innerHTML=e),this.listEl.appendChild(t),this._showList())}_ajaxRequest(e,t){return e=a(e,{},this.params.filterRemote?{term:t}:{}),fetch(e).then((e=>e.ok?e.json().catch((e=>(console.warn("List Ajax Load Error - Invalid JSON returned",e),Promise.reject(e)))):(console.error("List Ajax Load Error - Connection Error: "+e.status,e.statusText),Promise.reject(e)))).catch((e=>(console.error("List Ajax Load Error - Connection Error: ",e),Promise.reject(e))))}_uniqueColumnValues(e){var t,i={},s=this.table.getData(this.params.valuesLookup);return(t=e?this.table.columnManager.getColumnByField(e):this.cell.getColumn()._getSelf())?s.forEach((e=>{var s=t.getFieldValue(e);null!=s&&""!==s&&(i[s]=!0)})):(console.warn("unable to find matching column to create select lookup list:",e),i=[]),Object.keys(i)}_parseList(e){var t=[];return Array.isArray(e)||(e=Object.entries(e).map((([e,t])=>({label:t,value:e})))),e.forEach((e=>{"object"!=typeof e&&(e={label:e,value:e}),this._parseListItem(e,t,0)})),!this.currentItems.length&&this.params.freetext&&(this.input.value=this.initialValues,this.typing=!0,this.lastAction="typing"),this.data=t,t}_parseListItem(e,t,i){var s={};e.options?s=this._parseListGroup(e,i+1):(s={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,selected:!1,visible:!0,level:i,original:e},this.initialValues&&this.initialValues.indexOf(e.value)>-1&&this._chooseItem(s,!0)),t.push(s)}_parseListGroup(e,t){var i={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,visible:!0,level:t,options:[],original:e};return e.options.forEach((e=>{this._parseListItem(e,i.options,t)})),i}_sortOptions(e){var t;return this.params.sort&&(t="function"==typeof this.params.sort?this.params.sort:this._defaultSortFunction.bind(this),this._sortGroup(t,e)),e}_sortGroup(e,t){t.sort(((t,i)=>e(t.label,i.label,t.value,i.value,t.original,i.original))),t.forEach((t=>{t.group&&this._sortGroup(e,t.options)}))}_defaultSortFunction(e,t){var i,s,o,n,r,a=0,l=/(\d+)|(\D+)/g,h=/\d/,d=0;if("desc"===this.params.sort&&([e,t]=[t,e]),e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if((i=String(e).toLowerCase())===(s=String(t).toLowerCase()))return 0;if(!h.test(i)||!h.test(s))return i>s?1:-1;for(i=i.match(l),s=s.match(l),r=i.length>s.length?s.length:i.length;an?1:-1;return i.length>s.length}d=1}else d=t||0===t?-1:0;return d}_filterOptions(){var e=this.params.filterFunc||this._defaultFilterFunc,t=this.input.value;return t?(this.filtered=!0,this.data.forEach((i=>{this._filterItem(e,t,i)}))):this.filtered=!1,this.data}_filterItem(e,t,i){var s=!1;return i.group?(i.options.forEach((i=>{this._filterItem(e,t,i)&&(s=!0)})),i.visible=s):i.visible=e(t,i.label,i.value,i.original),i.visible}_defaultFilterFunc(e,t,i,s){return e=String(e).toLowerCase(),null!=t&&(String(t).toLowerCase().indexOf(e)>-1||String(i).toLowerCase().indexOf(e)>-1)}_clearList(){for(;this.listEl.firstChild;)this.listEl.removeChild(this.listEl.firstChild);this.displayItems=[]}_buildList(e){this._clearList(),e.forEach((e=>{this._buildItem(e)})),this.displayItems.length||this._addPlaceholder(this.params.placeholderEmpty)}_buildItem(e){var t,i=e.element;if(!this.filtered||e.visible){if(!i){if((i=document.createElement("div")).tabIndex=0,(t=this.params.itemFormatter?this.params.itemFormatter(e.label,e.value,e.original,i):e.label)instanceof HTMLElement?i.appendChild(t):i.innerHTML=t,e.group?i.classList.add("tabulator-edit-list-group"):i.classList.add("tabulator-edit-list-item"),i.classList.add("tabulator-edit-list-group-level-"+e.level),e.elementAttributes&&"object"==typeof e.elementAttributes)for(let t in e.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),i.setAttribute(t,this.input.getAttribute(t)+e.elementAttributes["+"+t])):i.setAttribute(t,e.elementAttributes[t]);e.group?i.addEventListener("click",this._groupClick.bind(this,e)):i.addEventListener("click",this._itemClick.bind(this,e)),i.addEventListener("mousedown",this._preventBlur.bind(this)),e.element=i}this._styleItem(e),this.listEl.appendChild(i),e.group?e.options.forEach((e=>{this._buildItem(e)})):this.displayItems.push(e)}}_showList(){var e=this.popup&&this.popup.isVisible();if(this.input.parentNode){if(this.params.autocomplete&&""===this.input.value&&!this.params.listOnEmpty)return void(this.popup&&this.popup.hide(!0));this._setListWidth(),this.popup||(this.popup=this.edit.popup(this.listEl)),this.popup.show(this.cell.getElement(),"bottom"),e||setTimeout((()=>{this.popup.hideOnBlur(this._resolveValue.bind(this,!0))}),10)}}_styleItem(e){e&&e.element&&(e.selected?e.element.classList.add("active"):e.element.classList.remove("active"))}_itemClick(e,t){t.stopPropagation(),this._chooseItem(e)}_groupClick(e,t){t.stopPropagation()}_cancel(){this.popup.hide(!0),this.actions.cancel()}_clearChoices(){this.typing=!0,this.currentItems.forEach((e=>{e.selected=!1,this._styleItem(e)})),this.currentItems=[],this.focusedItem=null}_chooseItem(e,t){var i;this.typing=!1,this.params.multiselect?((i=this.currentItems.indexOf(e))>-1?(this.currentItems.splice(i,1),e.selected=!1):(this.currentItems.push(e),e.selected=!0),this.input.value=this.currentItems.map((e=>e.label)).join(","),this._styleItem(e)):(this.currentItems=[e],e.selected=!0,this.input.value=e.label,this._styleItem(e),t||this._resolveValue()),this._focusItem(e)}_resolveValue(e){var t,i;if(this.popup&&this.popup.hide(!0),this.params.multiselect)t=this.currentItems.map((e=>e.value));else if(e&&this.params.autocomplete&&this.typing){if(!(this.params.freetext||this.params.allowEmpty&&""===this.input.value))return void this.actions.cancel();t=this.input.value}else t=this.currentItems[0]?this.currentItems[0].value:null==(i=this.initialValues[0])||""===i?i:this.params.emptyValue;""===t&&(t=this.params.emptyValue),this.actions.success(t),this.isFilter&&(this.initialValues=t&&!Array.isArray(t)?[t]:t,this.currentItems=[])}}var k={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%",o.selectContents&&r.select()})),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&&T(r,o),r},textarea:function(e,t,i,s,o){var n=e.getValue(),r=o.verticalNavigation||"hybrid",a=String(null!=n?n:""),l=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(),o.selectContents&&l.select()})),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 13:e.shiftKey&&o.shiftEnterSubmit&&d();break;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&&T(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),o.selectContents&&a.select()})),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&&T(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},date:function(e,t,i,s,o){var n=o.format,r=n?window.DateTime||luxon.DateTime:null,a=e.getValue(),l=document.createElement("input");function h(e){return(r.isDateTime(e)?e:"iso"===n?r.fromISO(String(e)):r.fromFormat(String(e),n)).toFormat("yyyy-MM-dd")}if(l.type="date",l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.max&&l.setAttribute("max",n?h(o.max):o.max),o.min&&l.setAttribute("min",n?h(o.min):o.min),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(e){var t=l.value;null==a&&""!==t||t!==a?(t&&n&&(t=r.fromFormat(String(t),"yyyy-MM-dd").toFormat(n)),i(t)&&(a=l.value)):s()}return a=void 0!==a?a:"",n&&(r?a=h(a):console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js")),l.value=a,t((function(){l.focus({preventScroll:!0}),l.style.height="100%",o.selectContents&&l.select()})),l.addEventListener("change",d),l.addEventListener("blur",d),l.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),l},time:function(e,t,i,s,o){var n,r=o.format,a=r?window.DateTime||luxon.DateTime:null,l=e.getValue(),h=document.createElement("input");if(h.type="time",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),h.setAttribute(e,h.getAttribute(e)+o.elementAttributes["+"+e])):h.setAttribute(e,o.elementAttributes[e]);function d(e){var t=h.value;null==l&&""!==t||t!==l?(t&&r&&(t=a.fromFormat(String(t),"hh:mm").toFormat(r)),i(t)&&(l=h.value)):s()}return l=void 0!==l?l:"",r&&(a?(n=a.isDateTime(l)?l:"iso"===r?a.fromISO(String(l)):a.fromFormat(String(l),r),l=n.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js")),h.value=l,t((function(){h.focus({preventScroll:!0}),h.style.height="100%",o.selectContents&&h.select()})),h.addEventListener("change",d),h.addEventListener("blur",d),h.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),h},datetime:function(e,t,i,s,o){var n,r=o.format,a=r?window.DateTime||luxon.DateTime:null,l=e.getValue(),h=document.createElement("input");if(h.type="datetime-local",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),h.setAttribute(e,h.getAttribute(e)+o.elementAttributes["+"+e])):h.setAttribute(e,o.elementAttributes[e]);function d(e){var t=h.value;null==l&&""!==t||t!==l?(t&&r&&(t=a.fromISO(String(t)).toFormat(r)),i(t)&&(l=h.value)):s()}return l=void 0!==l?l:"",r&&(a?(n=a.isDateTime(l)?l:"iso"===r?a.fromISO(String(l)):a.fromFormat(String(l),r),l=n.toFormat("yyyy-MM-dd")+"T"+n.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js")),h.value=l,t((function(){h.focus({preventScroll:!0}),h.style.height="100%",o.selectContents&&h.select()})),h.addEventListener("change",d),h.addEventListener("blur",d),h.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),h},select:function(e,t,i,s,o){return this.deprecationMsg("The select editor has been deprecated, please use the new list editor"),new M(this,e,t,i,s,o).input},list:function(e,t,i,s,o){return new M(this,e,t,i,s,o).input},autocomplete:function(e,t,i,s,o){return this.deprecationMsg("The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam"),o.autocomplete=!0,new M(this,e,t,i,s,o).input},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 p(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 m(e){var t=document.createElement("span"),s=u.cloneNode(!0);d.push(s),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(),i(e),r.blur()})),t.appendChild(s),c.appendChild(t)}function g(e){a=e,p(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++)m(b);return p(a=Math.min(parseInt(a),l)),c.addEventListener("mousemove",(function(e){p(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"),p=document.createElement("div");function m(){var e=window.getComputedStyle(a,null),t=d*Math.round(p.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"),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%",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),p.setAttribute(e,p.getAttribute(e)+o.elementAttributes["+"+e])):p.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),p.style.width=c+"%",a.setAttribute("aria-valuemin",h),a.setAttribute("aria-valuemax",l),p.appendChild(u),u.addEventListener("mousedown",(function(e){n=e.screenX,r=p.offsetWidth})),u.addEventListener("mouseover",(function(){u.style.cursor="ew-resize"})),a.addEventListener("mousemove",(function(e){n&&(p.style.width=r+e.screenX-n+"px")})),a.addEventListener("mouseup",(function(e){n&&(e.stopPropagation(),e.stopImmediatePropagation(),n=!1,r=!1,m())})),a.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:e.preventDefault(),p.style.width=p.clientWidth+a.clientWidth/100+"px";break;case 37:e.preventDefault(),p.style.width=p.clientWidth-a.clientWidth/100+"px";break;case 9:case 13:m();break;case 27:s()}})),a.addEventListener("blur",(function(){s()})),p},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,d=Object.keys(o).includes("trueValue"),c=Object.keys(o).includes("falseValue");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 u(e){var t=r.checked;return d&&t?t=o.trueValue:c&&!t&&(t=o.falseValue),a?e?h?l:t:r.checked&&!h?(r.checked=!1,r.indeterminate=!0,h=!0,l):(h=!1,t):t}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=d?n===o.trueValue:!0===n||"true"===n||"True"===n||1===n,t((function(){r.focus()})),r.addEventListener("change",(function(e){i(u())})),r.addEventListener("blur",(function(e){i(u(!0))})),r.addEventListener("keydown",(function(e){13==e.keyCode&&i(u()),27==e.keyCode&&s()})),r}};class L extends s{constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.editors=L.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("cell-value-changed",this.updateCellClass.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("row-layout",this.rowEditableCheck.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 ")}updateCellClass(e){this.allowEdit(e)?e.getElement().classList.add("tabulator-editable"):e.getElement().classList.remove("tabulator-editable")}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.findPrevEditableCell(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,i){var s=!1;if(i0)for(var o=i-1;o>=0;o--){let i=e.cells[o];if(i.column.modules.edit&&t.elVisible(i.getElement())){if(this.allowEdit(i)){s=i;break}}}return s}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()}rowEditableCheck(e){e.getCells().forEach((e=>{e.column.modules.edit&&"function"==typeof e.column.modules.edit.check&&this.updateCellClass(e)}))}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(),this.dispatch("edit-editor-clear",i,e),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);i.row.getElement().classList.remove("tabulator-editing"),i.table.element.classList.remove("tabulator-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);this.updateCellClass(e),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.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();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)}}allowEdit(e){var t=!!e.column.modules.edit;if(e.column.modules.edit)switch(typeof e.column.modules.edit.check){case"function":e.row.initialized&&(t=e.column.modules.edit.check(e.getComponent()));break;case"string":t=!!e.row.data[e.column.modules.edit.check];break;case"boolean":t=e.column.modules.edit.check}return t}edit(e,t,i){var s,o,n,r=this,a=function(){},l=e.getElement();if(!this.currentCell){if(e.column.modules.edit.blocked)return this.mouseClick=!1,l.blur(),!1;if(t&&t.stopPropagation(),this.allowEdit(e)||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){a=e}),(function(t){if(r.currentCell===e){var i=r.chain("edit-success",[e,t],!0,!0);return!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):(r.invalidEdit=!0,r.focusCellNoEvent(e,!0),a(),!1)}}),(function(){r.currentCell===e&&r.cancelEdit()}),n)))return l.blur(),!1;if(!(s instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",s),l.blur(),!1;for(l.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-editing"),e.table.element.classList.add("tabulator-editing");l.firstChild;)l.removeChild(l.firstChild);l.appendChild(s),a();for(var h=l.children,d=0;d{e.push(t.getComponent())})),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,this.dispatch("edit-edited-clear",e)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)}}L.moduleName="edit",L.editors=k;class D{constructor(e,t,i,s){this.type=e,this.columns=t,this.component=i||!1,this.indent=s||0}}class S{constructor(e,t,i,s,o){this.value=e,this.component=t||!1,this.width=i,this.height=s,this.depth=o}}class P extends s{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)}generateTable(e,t,i,s){var o=this.generateExportList(e,t,i,s);return this.generateTableElement(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;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){var t=e.definition[this.colVisProp];return"function"==typeof t&&(t=t.call(this.table,e.getComponent())),!1!==t&&(e.visible||!e.visible&&t)}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 S(i,e.column.getComponent(),e.width,e.height,e.depth))}else t.push(null)})),s.push(new D("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 S(e.key,e.getComponent(),t.length,1));break;case"calc":case"row":t.forEach((e=>{n.push(new S(e._column.getFieldValue(o),e,1,1))})),this.table.options.dataTree&&!1!==this.config.dataTree&&(r=e.modules.dataTree.index)}i.push(new D(e.type,n,e.getComponent(),r))})),i}generateTableElement(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)=>{let n;switch(e.type){case"header":i.appendChild(this.generateHeaderElement(e,r,o));break;case"group":s.appendChild(this.generateGroupElement(e,r,o));break;case"calc":s.appendChild(this.generateCalcElement(e,r,o));break;case"row":n=this.generateRowElement(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}generateHeaderElement(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}generateGroupElement(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=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}generateCalcElement(e,t,i){var s=this.generateRowElement(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}generateRowElement(e,t,i){var s=document.createElement("tr");return s.classList.add("tabulator-print-table-row"),e.columns.forEach(((o,n)=>{if(o){var r,a=document.createElement("td"),l=o.component._column,h=this.table.columnManager.findColumnIndex(l),d=o.value,c={modules:{},getValue:function(){return d},getField:function(){return l.definition.field},getElement:function(){return a},getColumn:function(){return l.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getComponent:function(){return c},column:l};if((l.definition.cssClass?l.definition.cssClass.split(" "):[]).forEach((function(e){a.classList.add(e)})),this.table.modExists("format")&&!1!==this.config.formatCells)d=this.table.modules.format.formatExportValue(c,this.colVisProp);else switch(typeof d){case"object":d=null!==d?JSON.stringify(d):"";break;case"undefined":d=""}d instanceof Node?a.appendChild(d):a.innerHTML=d,(r=i.styleCells&&i.styleCells[h]?i.styleCells[h]:i.firstCell)&&(this.mapElementStyles(r,a,["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"]),l.definition.align&&(a.style.textAlign=l.definition.align)),this.table.options.dataTree&&!1!==this.config.dataTree&&(t.treeElementField&&t.treeElementField==l.field||!t.treeElementField&&0==n)&&(e.component._row.modules.dataTree.controlEl&&a.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),a.firstChild),e.component._row.modules.dataTree.branchEl&&a.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),a.firstChild)),s.appendChild(a),c.modules.format&&c.modules.format.renderedCallback&&c.modules.format.renderedCallback(),t.rowFormatter&&!1!==this.config.formatCells&&t.rowFormatter(e.component)}})),s}generateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.generateTableElement(e)),t.innerHTML}getHtml(e,t,i,s){var o=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,s||"htmlOutput");return this.generateHTMLTable(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)}))}}}}P.moduleName="export";var z={"=":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 s{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)if("partial"===n)o=function(i){var s=e.getFieldValue(i);return null!=s&&String(s).toLowerCase().indexOf(String(t).toLowerCase())>-1},r="like";else o=function(i){return e.getFieldValue(i)==t},r="=";i.headerFilters[s]={value:t,func:o,type:r}}e.modules.filter.value=t,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.value=t,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},(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()},getTable:()=>this.table,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);d.langBind("headerFilters|columns|"+e.definition.field,(function(e){n.setAttribute("placeholder",void 0!==e&&e?e:d.langText("headerFilters|default"))})),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.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(null,!1,!1):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(!0)),"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(!0),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=z;var H={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||"",p=!!t.symbolAfter,m=void 0!==t.precision?t.precision:2;if(isNaN(a))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));if(a<0&&(a=Math.abs(a),l=c),s=!1!==m?a.toFixed(m):a,o=(s=String(s).split("."))[0],n=s.length>1?h+s[1]:"",!1!==t.thousand)for(r=/(\d+)(\d{3})/;r.test(o);)o=o.replace(r,"$1"+d+"$2");return p?l+o+n+u:l+u+o+n},link:function(e,t,i){var s,o=e.getValue(),n=t.urlPrefix||"",r=t.download,a=o,l=document.createElement("a");if(t.labelField&&(s=e.getData(),a=function e(t,i){var s=i[t.shift()];return t.length&&"object"==typeof s?e(t,s):s}(t.labelField.split(this.table.options.nestedFieldSeparator),s)),t.label)switch(typeof t.label){case"string":a=t.label;break;case"function":a=t.label(e)}if(a){if(t.urlField&&(o=(s=e.getData())[t.urlField]),t.url)switch(typeof t.url){case"string":o=t.url;break;case"function":o=t.url(e)}return l.setAttribute("href",n+o),t.target&&l.setAttribute("target",t.target),t.download&&(r="function"==typeof r?r(e):!0===r?"":r,l.setAttribute("download",r)),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(a)),l}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=Object.keys(t).includes("trueValue"),l=void 0!==t.tickElement?t.tickElement:'',h=void 0!==t.crossElement?t.crossElement:'';return a&&s===t.trueValue||!a&&(r&&s||!0===s||"true"===s||"True"===s||1===s||"1"===s)?(o.setAttribute("aria-checked",!0),l||""):!n||"null"!==s&&""!==s&&null!=s?(o.setAttribute("aria-checked",!1),h||""):(o.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,i){var s,o=window.DateTime||luxon.DateTime,n=t.inputFormat||"yyyy-MM-dd HH:mm:ss",r=t.outputFormat||"dd/MM/yyyy HH:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",l=e.getValue();if(void 0!==o)return(s=o.isDateTime(l)?l:"iso"===n?o.fromISO(String(l)):o.fromFormat(String(l),n)).isValid?(t.timezone&&(s=s.setZone(t.timezone)),s.toFormat(r)):!0!==a&&l?"function"==typeof a?a(l):a:l;console.error("Format Error - 'datetime' formatter is dependant on luxon.js")},datetimediff:function(e,t,i){var s,o=window.DateTime||luxon.DateTime,n=t.inputFormat||"yyyy-MM-dd HH:mm:ss",r=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",a=void 0!==t.suffix&&t.suffix,l=void 0!==t.unit?t.unit:"days",h=void 0!==t.humanize&&t.humanize,d=void 0!==t.date?t.date:o.now(),c=e.getValue();if(void 0!==o)return(s=o.isDateTime(c)?c:"iso"===n?o.fromISO(String(c)):o.fromFormat(String(c),n)).isValid?h?s.diff(d,l).toHuman()+(a?" "+a:""):parseInt(s.diff(d,l)[l])+(a?" "+a:""):!0===r?c:"function"==typeof r?r(c):r;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.max?t.max:100,c=t.min?t.min:0,u=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)){let e=100/t.color.length,i=Math.floor(o/e);i=Math.min(i,t.color.length-1),i=Math.max(i,0),n=t.color[i];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)){let e=100/t.legendColor.length,i=Math.floor(o/e);i=Math.min(i,t.legendColor.length-1),i=Math.max(i,0),a=t.legendColor[i]}break;default:a="#000"}h.style.minWidth="30px",h.style.position="relative",h.setAttribute("aria-label",o);var m=document.createElement("div");m.style.display="inline-block",m.style.width=o+"%",m.style.backgroundColor=n,m.style.height="100%",m.setAttribute("data-max",d),m.setAttribute("data-min",c);var g=document.createElement("div");if(g.style.position="relative",g.style.width="100%",g.style.height="100%",r){var b=document.createElement("div");b.style.position="absolute",b.style.top=0,b.style.left=0,b.style.textAlign=u,b.style.width="100%",b.style.color=a,b.innerHTML=r}return i((function(){if(!(e instanceof p)){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(g),g.appendChild(m),r&&g.appendChild(b)})),""},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){var s=document.createElement("span");return e.getRow().watchPosition((e=>{s.innerText=e})),s},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='\n \n \n\n\n\n \n',e.getElement().classList.add("tabulator-row-handle"),s.addEventListener("click",(function(t){t.stopImmediatePropagation(),n(!o.open),e.getTable().rowManager.adjustTableSize()})),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 v?(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 O extends s{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":O.formatters[s]?i.formatter=O.formatters[s]:(console.warn("Formatter Error - No such formatter found: ",s),i.formatter=O.formatters.plaintext);break;case"function":i.formatter=s;break;default:i.formatter=O.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},getColumn:function(){return e.getComponent()},getTable:()=>this.table},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){function o(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}return i="function"==typeof s.params?s.params(e.getComponent()):s.params,s.formatter.call(this,e.getComponent(),i,o)}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":O.formatters[e]?e=O.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=O.formatters.plaintext);break;case"function":break;default:e=O.formatters.plaintext}return e}}O.moduleName="format",O.formatters=H;class A extends s{constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.initializationMode="left",this.active=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1}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("columns-loading",this.reset.bind(this)),this.subscribe("column-add",this.reinitializeColumns.bind(this)),this.subscribe("column-delete",this.reinitializeColumns.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)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}reinitializeColumns(){this.reset(),this.table.columnManager.columnsByIndex.forEach((e=>{this.initializeColumn(e)}))}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}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)}))}layoutColumnPosition(e){var t=[],i=0,s=0;this.leftColumns.forEach(((s,o)=>{if(s.modules.frozen.marginValue=i,s.modules.frozen.margin=s.modules.frozen.marginValue+"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.modules.frozen.marginValue=s,t.modules.frozen.margin=t.modules.frozen.marginValue+"px",t.visible&&(s+=t.getWidth()),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.layoutColumnPosition(),this.reinitializeRows(),this.layoutCalcRows())}reinitializeRows(){var e=this.table.rowManager.getVisibleRows(!0);this.table.rowManager.getRows().filter((t=>!e.includes(t))).forEach((e=>{e.deinitialize()})),e.forEach((e=>{"row"===e.type&&this.layoutRow(e)}))}layoutRow(e){"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){var i;t.modules.frozen&&(e.style.position="sticky",i=this.table.rtl?"left"===t.modules.frozen.position?"right":"left":t.modules.frozen.position,e.style[i]=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))}adjustForScrollbar(e){this.rightColumns.length&&(this.table.columnManager.getContentsElement().style.width="calc(100% - "+e+"px)")}_calcSpace(e,t){var i=0;for(let s=0;s{this.initializeRow(e)}))}initializeRow(e){var t=this.table.options.frozenRows,i=typeof t;"number"===i?e.getPosition()&&e.getPosition()+this.rows.length<=t&&this.freezeRow(e):"function"===i?t.call(this.table,e.getComponent())&&this.freezeRow(e):Array.isArray(t)&&t.includes(e.data[this.options("frozenRowsField")])&&this.freezeRow(e)}isRowFrozen(e){return this.rows.indexOf(e)>-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.rows.push(e),this.refreshData(!1,"display"),this.table.rowManager.adjustTableSize(),this.styleRows())}unfreezeRow(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)}))}}_.moduleName="frozenRows";class B{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 I{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 I(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(){var e=[];return e.push(this),this._visSet(),this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.visible?this.groupList.length?this.groupList.forEach((function(t){e=e.concat(t.getHeadersAndRows())})):("table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))),e}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,"basic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination||(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.updateGroupRows(!0),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,"basic"!=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.updateGroupRows(!0)}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))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])}else this.groupList=[],this.groups={}}rowSample(e,t){if(this.table.options.groupBy){var i=this.getGroups(!1)[0];t.push(i.getRows(!1)[0])}return t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();if(!this.table.options.groupBy)return t;t=t.filter((e=>"group"!==e.type)),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px"}rowAddingIndex(e,t,i){if(this.table.options.groupBy){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.initialize(),this.configureGroupSetup(),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){if(this.table.options.groupBy){!i&&t instanceof I&&(t=this.table.rowManager.prevDisplayRow(e)||t);var s=t instanceof I?t:t.modules.group,o=e instanceof I?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){this.table.options.groupBy&&e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.table.options.groupBy&&this.updateGroupRows(!0)}cellUpdated(e){this.table.options.groupBy&&this.reassignRowToGroup(e.row)}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.table.options.groupBy&&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.options("dataTree")&&(e=this.table.modules.dataTree.getTreeParentRoot(e)),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 I(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){this.table.options.groupBy&&("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))}checkBasicModeGroupHeaderWidth(){var e=this.table.rowManager.tableElement,t=!0;this.table.rowManager.getDisplayRows().forEach(((i,s)=>{this.table.rowManager.styleRow(i,s),e.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(t=!1)})),e.style.minWidth=t?this.table.columnManager.getWidth()+"px":""}}V.moduleName="groupRows";class N extends s{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:e.getPosition(),posTo:t.getPosition(),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()._getSelf().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 w)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 W extends s{constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&"TABLE"===this.table.originalElement.tagName&&(this.table.originalElement.childNodes.length?this.parseTable():console.warn("Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element."))}parseTable(){var e=this.table.originalElement,t=this.table.options,i=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?G.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;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)}}G.moduleName="import",G.importers=j;class U extends s{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",rowMouseDown:"row-mousedown",rowMouseUp:"row-mouseup",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",cellMouseDown:"cell-mousedown",cellMouseUp:"cell-mouseup",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",headerMouseDown:"column-mousedown",headerMouseUp:"column-mouseup",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",groupMouseDown:"group-mousedown",groupMouseUp:"group-mouseup",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("headerMouseDown"),this.registerColumnOption("headerMouseUp"),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("cellMouseDown"),this.registerColumnOption("cellMouseUp"),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){var i;if(!this.table.modExists("edit")||this.table.modules.edit.currentCell!==t){e.preventDefault();try{document.selection?((i=document.body.createTextRange()).moveToElementText(t.getElement()),i.select()):window.getSelection&&((i=document.createRange()).selectNode(t.getElement()),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 f&&(s=i.definition[e]),s&&s(t,o)),this.dispatchExternal(e,t,o)}}U.moduleName="interaction";class X extends s{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,X.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)X.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:X.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)}}X.moduleName="keybindings",X.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"]},X.actions={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,i=t.scrollTop-t.element.clientHeight;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 q extends s{constructor(e){super(e),this.menuContainer=null,this.nestedMenuBlock=!1,this.currentComponent=null,this.rootPopup=null,this.columnSubscribers={},this.registerTableOption("menuContainer",void 0),this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("rowDblClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("groupDblClickMenu",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerDblClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("headerMenuIcon"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu"),this.registerColumnOption("dblClickMenu")}initialize(){this.deprecatedOptionsCheck(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("menuContainer","popupContainer")||(this.table.options.popupContainer=this.table.options.menuContainer)}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)),this.table.options.rowDblClickMenu&&this.subscribe("row-dblclick",this.loadMenuEvent.bind(this,this.table.options.rowDblClickMenu))}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)),this.table.options.groupDblClickMenu&&this.subscribe("group-dblclick",this.loadMenuEvent.bind(this,this.table.options.groupDblClickMenu))}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.headerDblClickMenu&&!this.columnSubscribers.headerDblClickMenu&&(this.columnSubscribers.headerDblClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerDblClickMenu"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickMenu)),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)),t.dblClickMenu&&!this.columnSubscribers.dblClickMenu&&(this.columnSubscribers.dblClickMenu=this.loadMenuTableCellEvent.bind(this,"dblClickMenu"),this.subscribe("cell-dblclick",this.columnSubscribers.dblClickMenu))}initializeColumnHeaderMenu(e){var t,i=e.definition.headerMenuIcon;(t=document.createElement("span")).classList.add("tabulator-header-popup-button"),i?("function"==typeof i&&(i=i(e.getComponent())),i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i):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,t,i.getComponent()):e,this.loadMenu(t,i,e)}loadMenu(e,t,i,s,o){var n,r=!(e instanceof MouseEvent),a=document.createElement("div");if(a.classList.add("tabulator-menu"),r||e.preventDefault(),i&&i.length){if(s)n=o.child(a);else{if(this.nestedMenuBlock){if(this.rootPopup)return}else this.nestedMenuBlock=setTimeout((()=>{this.nestedMenuBlock=!1}),100);this.rootPopup&&this.rootPopup.hide(),this.rootPopup=n=this.popup(a)}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.loadMenu(s,t,e.menu,i,n)})):e.action&&i.addEventListener("click",(i=>{e.action(i,t.getComponent())})),e.menu&&e.menu.length&&i.classList.add("tabulator-menu-item-submenu")),a.appendChild(i)})),a.addEventListener("click",(e=>{this.rootPopup&&this.rootPopup.hide()})),n.show(s||e),n===this.rootPopup&&(this.rootPopup.hideOnBlur((()=>{this.rootPopup=null,this.currentComponent&&(this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)})),this.currentComponent=t,this.dispatchExternal("menuOpened",t.getComponent()))}}}q.moduleName="menu";class K extends s{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 i,s=this,o={};e.modules.frozen||e.isGroup||(i=e.getElement(),o.mousemove=function(o){e.parent===s.moving.parent&&((s.touchMove?o.touches[0].pageX:o.pageX)-t.elOffset(i).left+s.table.columnManager.element.scrollLeft>e.getWidth()/2?s.toCol===e&&s.toColAfter||(i.parentNode.insertBefore(s.placeholderElement,i.nextSibling),s.moveColumn(e,!0)):(s.toCol!==e||s.toColAfter)&&(i.parentNode.insertBefore(s.placeholderElement,i),s.moveColumn(e,!1)))}.bind(s),i.addEventListener("mousedown",(function(t){s.touchMove=!1,1===t.which&&(s.checkTimeout=setTimeout((function(){s.startMove(t,e)}),s.checkPeriod))})),i.addEventListener("mouseup",(function(e){1===e.which&&s.checkTimeout&&clearTimeout(s.checkTimeout)})),s.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,i){var s=i.getElement(),o=this.table.columnManager.getContentsElement(),n=this.table.columnManager.getHeadersElement();this.moving=i,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-t.elOffset(s).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=i.getWidth()+"px",this.placeholderElement.style.height=i.getHeight()+"px",s.parentNode.insertBefore(this.placeholderElement,s),s.parentNode.removeChild(s),this.hoverElement=s.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),o.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 i,s=this.table.columnManager.getContentsElement(),o=s.scrollLeft,n=(this.touchMove?e.touches[0].pageX:e.pageX)-t.elOffset(s).left+o;this.hoverElement.style.left=n-this.startX+"px",n-o{i=Math.max(0,o-5),this.table.rowManager.getElement().scrollLeft=i,this.autoScrollTimeout=!1}),1))),o+s.clientWidth-n{i=Math.min(s.clientWidth,o+5),this.table.rowManager.getElement().scrollLeft=i,this.autoScrollTimeout=!1}),1)))}}K.moduleName="moveColumn";class J extends s{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 i=this,s={};s.mouseup=function(t){i.tableRowDrop(t,e)}.bind(i),s.mousemove=function(s){var o;s.pageY-t.elOffset(e.element).top+i.table.rowManager.element.scrollTop>e.getHeight()/2?i.toRow===e&&i.toRowAfter||((o=e.getElement()).parentNode.insertBefore(i.placeholderElement,o.nextSibling),i.moveRow(e,!0)):(i.toRow!==e||i.toRowAfter)&&(o=e.getElement()).previousSibling&&(o.parentNode.insertBefore(i.placeholderElement,o),i.moveRow(e,!1))}.bind(i),e.modules.moveRow=s}initializeRow(e){var i,s=this,o={};o.mouseup=function(t){s.tableRowDrop(t,e)}.bind(s),o.mousemove=function(i){var o=e.getElement();i.pageY-t.elOffset(o).top+s.table.rowManager.element.scrollTop>e.getHeight()/2?s.toRow===e&&s.toRowAfter||(o.parentNode.insertBefore(s.placeholderElement,o.nextSibling),s.moveRow(e,!0)):(s.toRow!==e||s.toRowAfter)&&(o.parentNode.insertBefore(s.placeholderElement,o),s.moveRow(e,!1))}.bind(s),this.hasHandle||((i=e.getElement()).addEventListener("mousedown",(function(t){1===t.which&&(s.checkTimeout=setTimeout((function(){s.startMove(t,e)}),s.checkPeriod))})),i.addEventListener("mouseup",(function(e){1===e.which&&s.checkTimeout&&clearTimeout(s.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=Math.min(s-this.startY,this.table.rowManager.element.scrollHeight-this.hoverElement.offsetHeight)+"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?this.moving.getComponent():void 0,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)}}}J.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)}},J.prototype.senders={delete:function(e,t,i){e.delete()}},J.moduleName="moveRow";class Y extends s{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"),this.registerColumnOption("mutateLink")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("cell-value-changed",this.mutateLink.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":Y.mutators[e]?t=Y.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}mutateLink(e){var t=e.column.definition.mutateLink;t&&(Array.isArray(t)||(t=[t]),t.forEach((t=>{var i=e.row.getCell(t);i&&i.setValue(i.getValue(),!0,!0)})))}enable(){this.enabled=!0}disable(){this.enabled=!1}}Y.moduleName="mutator",Y.mutators={};var $={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 Z extends s{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.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)),this.subscribe("footer-redraw",this.footerRedraw.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:Z.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||(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.footerAppend(this.pageCounterElement)),this.footerAppend(this.element)),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")}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.displayRows(-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.dispatchExternal("pageSizeChanged",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":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"))}}Z.moduleName="page",Z.pageCounters=$;var Q={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)}},ee={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 te extends s{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:te.readers[this.table.options.persistenceReaderFunc]?this.readFunc=te.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):te.readers[this.mode]?this.readFunc=te.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:te.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=te.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):te.writers[this.mode]?this.writeFunc=te.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.retrieveData("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.retrieveData("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("column-width",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.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:e=>{s=e,this.defWatcherBlock||this.save("columns"),i.set&&i.set(e)},get:()=>(i.get&&i.get(),s)})})),this.defWatcherBlock=!1)}load(e,t){var i=this.retrieveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}retrieveData(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.push("visible")):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}}te.moduleName="persistence",te.moduleInitOrder=-10,te.readers=Q,te.writers=ee;class ie extends s{constructor(e){super(e),this.columnSubscribers={},this.registerTableOption("rowContextPopup",!1),this.registerTableOption("rowClickPopup",!1),this.registerTableOption("rowDblClickPopup",!1),this.registerTableOption("groupContextPopup",!1),this.registerTableOption("groupClickPopup",!1),this.registerTableOption("groupDblClickPopup",!1),this.registerColumnOption("headerContextPopup"),this.registerColumnOption("headerClickPopup"),this.registerColumnOption("headerDblClickPopup"),this.registerColumnOption("headerPopup"),this.registerColumnOption("headerPopupIcon"),this.registerColumnOption("contextPopup"),this.registerColumnOption("clickPopup"),this.registerColumnOption("dblClickPopup"),this.registerComponentFunction("cell","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("column","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("row","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("group","popup",this._componentPopupCall.bind(this))}initialize(){this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}_componentPopupCall(e,t,i){this.loadPopupEvent(t,null,e,i)}initializeRowWatchers(){this.table.options.rowContextPopup&&(this.subscribe("row-contextmenu",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup)),this.table.on("rowTapHold",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup))),this.table.options.rowClickPopup&&this.subscribe("row-click",this.loadPopupEvent.bind(this,this.table.options.rowClickPopup)),this.table.options.rowDblClickPopup&&this.subscribe("row-dblclick",this.loadPopupEvent.bind(this,this.table.options.rowDblClickPopup))}initializeGroupWatchers(){this.table.options.groupContextPopup&&(this.subscribe("group-contextmenu",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup)),this.table.on("groupTapHold",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup))),this.table.options.groupClickPopup&&this.subscribe("group-click",this.loadPopupEvent.bind(this,this.table.options.groupClickPopup)),this.table.options.groupDblClickPopup&&this.subscribe("group-dblclick",this.loadPopupEvent.bind(this,this.table.options.groupDblClickPopup))}initializeColumn(e){var t=e.definition;t.headerContextPopup&&!this.columnSubscribers.headerContextPopup&&(this.columnSubscribers.headerContextPopup=this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextPopup),this.table.on("headerTapHold",this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"))),t.headerClickPopup&&!this.columnSubscribers.headerClickPopup&&(this.columnSubscribers.headerClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerClickPopup"),this.subscribe("column-click",this.columnSubscribers.headerClickPopup)),t.headerDblClickPopup&&!this.columnSubscribers.headerDblClickPopup&&(this.columnSubscribers.headerDblClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerDblClickPopup"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickPopup)),t.headerPopup&&this.initializeColumnHeaderPopup(e),t.contextPopup&&!this.columnSubscribers.contextPopup&&(this.columnSubscribers.contextPopup=this.loadPopupTableCellEvent.bind(this,"contextPopup"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextPopup),this.table.on("cellTapHold",this.loadPopupTableCellEvent.bind(this,"contextPopup"))),t.clickPopup&&!this.columnSubscribers.clickPopup&&(this.columnSubscribers.clickPopup=this.loadPopupTableCellEvent.bind(this,"clickPopup"),this.subscribe("cell-click",this.columnSubscribers.clickPopup)),t.dblClickPopup&&!this.columnSubscribers.dblClickPopup&&(this.columnSubscribers.dblClickPopup=this.loadPopupTableCellEvent.bind(this,"dblClickPopup"),this.subscribe("cell-click",this.columnSubscribers.dblClickPopup))}initializeColumnHeaderPopup(e){var t,i=e.definition.headerPopupIcon;(t=document.createElement("span")).classList.add("tabulator-header-popup-button"),i?("function"==typeof i&&(i=i(e.getComponent())),i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i):t.innerHTML="⋮",t.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),this.loadPopupEvent(e.definition.headerPopup,t,e)})),e.titleElement.insertBefore(t,e.titleElement.firstChild)}loadPopupTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadPopupEvent(i.column.definition[e],t,i)}loadPopupTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadPopupEvent(i.definition[e],t,i)}loadPopupEvent(e,t,i,s){var o;i._group?i=i._group:i._row&&(i=i._row),e="function"==typeof e?e.call(this.table,t,i.getComponent(),(function(e){o=e})):e,this.loadPopup(t,i,e,o,s)}loadPopup(e,t,i,s,o){var n,r,a=!(e instanceof MouseEvent);i instanceof HTMLElement?n=i:(n=document.createElement("div")).innerHTML=i,n.classList.add("tabulator-popup"),n.addEventListener("click",(e=>{e.stopPropagation()})),a||e.preventDefault(),r=this.popup(n),"function"==typeof s&&r.renderCallback(s),e?r.show(e):r.show(t.getElement(),o||"center"),r.hideOnBlur((()=>{this.dispatchExternal("popupClosed",t.getComponent())})),this.dispatchExternal("popupOpened",t.getComponent())}}ie.moduleName="popup";class se extends s{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.generateTable(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.generateTable(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}}se.moduleName="print";class oe extends s{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,"cellsave")),this.subscribe("cell-value-save-after",this.unblock.bind(this,"cellsave")),this.subscribe("row-data-save-before",this.block.bind(this,"rowsave")),this.subscribe("row-data-save-after",this.unblock.bind(this,"rowsave")),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,o=Array.from(arguments);return i.blocked||t!==i.currentVersion||(i.block("data-push"),o.forEach((e=>{i.table.rowManager.addRowActual(e,!1)})),s=i.origFuncs.push.apply(e,arguments),i.unblock("data-push")),s}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var s,o=Array.from(arguments);return i.blocked||t!==i.currentVersion||(i.block("data-unshift"),o.forEach((e=>{i.table.rowManager.addRowActual(e,!0)})),s=i.origFuncs.unshift.apply(e,arguments),i.unblock("data-unshift")),s}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var s,o;return i.blocked||t!==i.currentVersion||(i.block("data-shift"),i.data.length&&(s=i.table.rowManager.getRowFromDataObject(i.data[0]))&&s.deleteActual(),o=i.origFuncs.shift.call(e),i.unblock("data-shift")),o}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var s,o;return i.blocked||t!==i.currentVersion||(i.block("data-pop"),i.data.length&&(s=i.table.rowManager.getRowFromDataObject(i.data[i.data.length-1]))&&s.deleteActual(),o=i.origFuncs.pop.call(e),i.unblock("data-pop")),o}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var s,o,n=Array.from(arguments),r=n[0]<0?e.length+n[0]:n[0],a=n[1],l=!!n[2]&&n.slice(2);if(!i.blocked&&t===i.currentVersion){if(i.block("data-splice"),l&&((s=!!e[r]&&i.table.rowManager.getRowFromDataObject(e[r]))?l.forEach((e=>{i.table.rowManager.addRowActual(e,!0,s,!0)})):(l=l.slice().reverse()).forEach((e=>{i.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==a){var h=e.slice(r,void 0===n[1]?n[1]:r+a);h.forEach(((e,t)=>{var s=i.table.rowManager.getRowFromDataObject(e);s&&s.deleteActual(t!==h.length-1)}))}(l||0!==a)&&i.table.rowManager.reRenderInPosition(),o=i.origFuncs.splice.apply(e,arguments),i.unblock("data-splice")}return o}})}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 t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e)}watchTreeChildren(e){var t=this,i=e.getData()[this.table.options.dataTreeChildField],s={};i&&(s.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-push");var o=s.push.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-push")}return o}}),s.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-unshift");var o=s.unshift.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-unshift")}return o}}),s.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-shift");var o=s.shift.call(i);this.rebuildTree(e),t.unblock("tree-shift")}return o}}),s.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-pop");var o=s.pop.call(i);this.rebuildTree(e),t.unblock("tree-pop")}return o}}),s.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-splice");var o=s.splice.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-splice")}return o}}))}rebuildTree(e){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}watchKey(e,t,i){var s=this,o=Object.getOwnPropertyDescriptor(t,i),n=t[i],r=this.currentVersion;Object.defineProperty(t,i,{set:t=>{if(n=t,!s.blocked&&r===s.currentVersion){s.block("key");var a={};a[i]=t,e.updateData(a),s.unblock("key")}o.set&&o.set(t)},get:()=>(o.get&&o.get(),n)})}unwatchRow(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}block(e){this.blocked||(this.blocked=e)}unblock(e){this.blocked===e&&(this.blocked=!1)}}oe.moduleName="reactiveData";class ne extends s{constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.latestX=!1,this.handle=null,this.initialNextColumn=null,this.nextColumn=null,this.initialized=!1,this.registerColumnOption("resizable",!0),this.registerTableOption("resizableColumnFit",!1)}initialize(){this.subscribe("column-rendered",this.layoutColumnHeader.bind(this))}initializeEventWatchers(){this.initialized||(this.subscribe("cell-rendered",this.layoutCellHandles.bind(this)),this.subscribe("cell-delete",this.deInitializeComponent.bind(this)),this.subscribe("cell-height",this.resizeHandle.bind(this)),this.subscribe("column-moved",this.columnLayoutUpdated.bind(this)),this.subscribe("column-hide",this.deInitializeColumn.bind(this)),this.subscribe("column-show",this.columnLayoutUpdated.bind(this)),this.subscribe("column-width",this.columnWidthUpdated.bind(this)),this.subscribe("column-delete",this.deInitializeComponent.bind(this)),this.subscribe("column-height",this.resizeHandle.bind(this)),this.initialized=!0)}layoutCellHandles(e){"row"===e.row.type&&(this.deInitializeComponent(e),this.initializeColumn("cell",e,e.column,e.element))}layoutColumnHeader(e){e.definition.resizable&&(this.initializeEventWatchers(),this.deInitializeComponent(e),this.initializeColumn("header",e,e,e.element))}columnLayoutUpdated(e){var t=e.prevColumn();this.reinitializeColumn(e),t&&this.reinitializeColumn(t)}columnWidthUpdated(e){e.modules.frozen&&(this.table.modules.frozenColumns.leftColumns.includes(e)?this.table.modules.frozenColumns.leftColumns.forEach((e=>{this.reinitializeColumn(e)})):this.table.modules.frozenColumns.rightColumns.includes(e)&&this.table.modules.frozenColumns.rightColumns.forEach((e=>{this.reinitializeColumn(e)})))}frozenColumnOffset(e){var t=!1;return e.modules.frozen&&(t=e.modules.frozen.marginValue,"left"===e.modules.frozen.position?t+=e.getWidth()-3:t&&(t-=3)),!1!==t&&t+"px"}reinitializeColumn(e){var t=this.frozenColumnOffset(e);e.cells.forEach((i=>{i.modules.resize&&i.modules.resize.handleEl&&(t&&(i.modules.resize.handleEl.style[e.modules.frozen.position]=t),i.element.after(i.modules.resize.handleEl))})),e.modules.resize&&e.modules.resize.handleEl&&(t&&(e.modules.resize.handleEl.style[e.modules.frozen.position]=t),e.element.after(e.modules.resize.handleEl))}initializeColumn(e,t,i,s){var o=this,n=i.definition.resizable,r={},a=i.getLastColumn();if("header"===e&&(r={variableHeight:"textarea"==i.definition.formatter||i.definition.variableHeight}),(!0===n||n==e)&&this._checkResizability(a)){var l=document.createElement("span");l.className="tabulator-col-resize-handle",l.addEventListener("click",(function(e){e.stopPropagation()}));var h=function(e){o.startColumn=i,o.initialNextColumn=o.nextColumn=a.nextColumn(),o._mouseDown(e,a,l)};l.addEventListener("mousedown",h),l.addEventListener("touchstart",h,{passive:!0}),l.addEventListener("dblclick",(e=>{var t=a.getWidth();e.stopPropagation(),a.reinitializeWidth(!0),t!==a.getWidth()&&(o.dispatch("column-resized",a),o.table.externalEvents.dispatch("columnResized",a.getComponent()))})),i.modules.frozen&&(l.style.position="sticky",l.style[i.modules.frozen.position]=this.frozenColumnOffset(i)),r.handleEl=l,s.parentNode&&i.visible&&s.after(l)}t.modules.resize=r}deInitializeColumn(e){this.deInitializeComponent(e),e.cells.forEach((e=>{this.deInitializeComponent(e)}))}deInitializeComponent(e){var t;e.modules.resize&&(t=e.modules.resize.handleEl)&&t.parentElement&&t.parentElement.removeChild(t)}resizeHandle(e,t){e.modules.resize&&e.modules.resize.handleEl&&(e.modules.resize.handleEl.style.height=t)}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,i){var s=this;function o(e){var i,o,n=void 0===e.screenX?e.touches[0].screenX:e.screenX,r=n-s.startX,a=n-s.latestX;if(s.latestX=n,s.table.rtl&&(r=-r,a=-a),i=t.width==t.minWidth||t.width==t.maxWidth,t.setWidth(s.startWidth+r),o=t.width==t.minWidth||t.width==t.maxWidth,a<0&&(s.nextColumn=s.initialNextColumn),s.table.options.resizableColumnFit&&s.nextColumn&&(!i||!o)){let e=s.nextColumn.getWidth();a>0&&e<=s.nextColumn.minWidth&&(s.nextColumn=s.nextColumn.nextColumn()),s.nextColumn&&s.nextColumn.setWidth(s.nextColumn.getWidth()-a)}s.table.columnManager.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.table.columnManager.verticalAlignHeaders(),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.latestX=s.startX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",n),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",n)}}ne.moduleName="resizeColumns";class re extends s{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)}}re.moduleName="resizeRows";class ae extends s{constructor(e){super(e),this.binding=!1,this.visibilityObserver=!1,this.resizeObserver=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.visible=!1,this.initialized=!1,this.initialRedraw=!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 IntersectionObserver&&"undefined"!=typeof ResizeObserver&&"virtual"===t.rowManager.getRenderMode()?(this.initializeVisibilityObserver(),this.autoResize=!0,this.resizeObserver=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.redrawTable())}})),this.resizeObserver.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),this.redrawTable()}})),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.rerenderColumns(!0),t.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}initializeVisibilityObserver(){this.visibilityObserver=new IntersectionObserver((e=>{this.visible=e[0].isIntersecting,this.initialized?this.visible&&(this.redrawTable(this.initialRedraw),this.initialRedraw=!1):(this.initialized=!0,this.initialRedraw=!this.visible)})),this.visibilityObserver.observe(this.table.element)}redrawTable(e){this.initialized&&this.visible&&(this.table.columnManager.rerenderColumns(!0),this.table.redraw(e))}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.resizeObserver&&this.resizeObserver.unobserve(this.table.element),this.visibilityObserver&&this.visibilityObserver.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}ae.moduleName="resizeTable";class le extends s{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-data-changed",this.generateCollapsedRowContent.bind(this)),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=!0;e;){let t="fitColumns"==this.table.modules.layout.getMode()?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),i=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-t;if(i<0){let t=this.columns[this.index];t?(this.hideColumn(t),this.index++):e=!1}else{let t=this.columns[this.index-1];t&&i>0&&i>=t.getWidth()?(this.showColumn(t),this.index--):e=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){this.table.rowManager.getDisplayRows().forEach((e=>{this.generateCollapsedRowContent(e)}))}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=e.getData(),s=[];return this.hiddenColumns.forEach((o=>{var n=o.getFieldValue(i);if(o.definition.title&&o.field)if(o.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){function r(e){e()}t={value:!1,data:{},getValue:function(){return n},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return o.getComponent()},getTable:()=>this.table},s.push({field:o.field,title:o.definition.title,value:o.modules.format.formatter.call(this.table.modules.format,t,o.modules.format.params,r)})}else s.push({field:o.field,title:o.definition.title,value:n})})),s}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:""}}le.moduleName="responsiveLayout";class he extends s{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._rowSelectionChanged()):((t=this.table.rowManager.getRows(e)).forEach((e=>{this._selectRow(e,!0,!0)})),t.length&&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 de(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(a.isDateTime(e)||(e="iso"===l?a.fromISO(String(e)):a.fromFormat(String(e),l)),a.isDateTime(t)||(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")}he.moduleName="selectRow";var ce={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"),de.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"),de.call(this,e,t,i,s,o,n,r)},datetime:de,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){var t;switch(a){case"length":t=e.length;break;case"sum":t=e.reduce((function(e,t){return e+t}));break;case"max":t=Math.max.apply(null,e);break;case"min":t=Math.min.apply(null,e);break;case"avg":t=e.reduce((function(e,t){return e+t}))/e.length}return t}if(Array.isArray(e)){if(Array.isArray(t))return d(t)-d(e);h=1}else h=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,p=/(\d+)|(\D+)/g,m=/\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(!m.test(a)||!m.test(l))return a>l?1:-1;for(a=a.match(p),l=l.match(p),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 ue extends s{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.registerTableOption("headerSortClickElement","header"),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":ue.sorters[e.definition.sorter]?s=ue.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":s=e.definition.sorter}if(e.modules.sort={sorter:s,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},!1!==e.definition.headerSort){if((t=e.getElement()).classList.add("tabulator-sortable"),(i=document.createElement("div")).classList.add("tabulator-col-sorter"),"icon"===this.table.options.headerSortClickElement)i.classList.add("tabulator-col-sorter-element");else t.classList.add("tabulator-col-sorter-element");switch(this.table.options.headerSortElement){case"function":break;case"object":i.appendChild(this.table.options.headerSortElement);break;default:i.innerHTML=this.table.options.headerSortElement}e.titleHolderElement.appendChild(i),e.modules.sort.element=i,this.setColumnHeaderSortIcon(e,"none"),("icon"===this.table.options.headerSortClickElement?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())),o>-1?(s[o].dir=i,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(null,!1,!1):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 ue.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&&((o=e.column.modules.sort)&&(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((e=>{e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"),this.setColumnHeaderSortIcon(e,"none"))}))}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort","asc"===t?"ascending":"descending"),this.setColumnHeaderSortIcon(e,t)}setColumnHeaderSortIcon(e,t){var i,s=e.modules.sort.element;if(e.definition.headerSort&&"function"==typeof this.table.options.headerSortElement){for(;s.firstChild;)s.removeChild(s.firstChild);"object"==typeof(i=this.table.options.headerSortElement.call(this.table,e.getComponent(),t))?s.appendChild(i):s.innerHTML=i}}_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)}}ue.moduleName="sort",ue.sorters=ce;class pe extends s{constructor(e){super(e),this.tooltipSubscriber=null,this.headerSubscriber=null,this.timeout=null,this.popupInstance=null,this.registerTableOption("tooltipGenerationMode",void 0),this.registerTableOption("tooltipDelay",300),this.registerColumnOption("tooltip"),this.registerColumnOption("headerTooltip")}initialize(){this.deprecatedOptionsCheck(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheckMsg("tooltipGenerationMode","This option is no longer needed as tooltips are always generated on hover now")}initializeColumn(e){e.definition.headerTooltip&&!this.headerSubscriber&&(this.headerSubscriber=!0,this.subscribe("column-mousemove",this.mousemoveCheck.bind(this,"headerTooltip")),this.subscribe("column-mouseout",this.mouseoutCheck.bind(this,"headerTooltip"))),e.definition.tooltip&&!this.tooltipSubscriber&&(this.tooltipSubscriber=!0,this.subscribe("cell-mousemove",this.mousemoveCheck.bind(this,"tooltip")),this.subscribe("cell-mouseout",this.mouseoutCheck.bind(this,"tooltip")))}mousemoveCheck(e,t,i){var s="tooltip"===e?i.column.definition.tooltip:i.definition.headerTooltip;s&&(this.clearPopup(),this.timeout=setTimeout(this.loadTooltip.bind(this,t,i,s),this.table.options.tooltipDelay))}mouseoutCheck(e,t,i){this.popupInstance||this.clearPopup()}clearPopup(e,t,i){clearTimeout(this.timeout),this.timeout=null,this.popupInstance&&this.popupInstance.hide()}loadTooltip(e,t,i){var s,o,n;"function"==typeof i&&(i=i(e,t.getComponent(),(function(e){o=e}))),i instanceof HTMLElement?s=i:(s=document.createElement("div"),!0===i&&(t instanceof m?i=t.value:t.definition.field?this.langBind("columns|"+t.definition.field,(e=>{s.innerHTML=i=e||t.definition.title})):i=t.definition.title),s.innerHTML=i),(i||0===i||!1===i)&&(s.classList.add("tabulator-tooltip"),s.addEventListener("mousemove",(e=>e.preventDefault())),this.popupInstance=this.popup(s),"function"==typeof o&&this.popupInstance.renderCallback(o),n=this.popupInstance.containerEventCoords(e),this.popupInstance.show(n.x+15,n.y+15).hideOnBlur((()=>{this.dispatchExternal("TooltipClosed",t.getComponent()),this.popupInstance=null})),this.dispatchExternal("TooltipOpened",t.getComponent()))}}pe.moduleName="tooltip";var me={integer:function(e,t,i){return""===t||null==t||(t=Number(t),!isNaN(t)&&isFinite(t)&&Math.floor(t)===t)},float:function(e,t,i){return""===t||null==t||(t=Number(t),!isNaN(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("|")),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 ge extends s{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)),this.subscribe("edit-success",this.editValidate.bind(this)),this.subscribe("edit-editor-clear",this.editorClear.bind(this)),this.subscribe("edit-edited-clear",this.editedClear.bind(this))}editValidate(e,t,i){var s="manual"===this.table.options.validationMode||this.validate(e.column.modules.validate,e,t);return!0!==s&&setTimeout((()=>{e.getElement().classList.add("tabulator-validation-fail"),this.dispatchExternal("validationFailed",e.getComponent(),t,s)})),s}editorClear(e,t){t&&e.column.modules.validate&&this.cellValidate(e),e.getElement().classList.remove("tabulator-validation-fail")}editedClear(e){e.modules.validate&&(e.modules.validate.invalid=!1)}cellIsValid(e){return e.modules.validate&&e.modules.validate.invalid||!0}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach((e=>{!0!==this.cellValidate(e)&&t.push(e.getComponent())})),!t.length||t}rowValidate(e){var t=[];return e.cells.forEach((e=>{!0!==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:ge.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})})),t.modules.validate||(t.modules.validate={}),o.length?(t.modules.validate.invalid=o,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==n&&this.invalidCells.push(t)):(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),n>-1&&this.invalidCells.splice(n,1)),!o.length||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))}}ge.moduleName="validate",ge.validators=me;var be=Object.freeze({__proto__:null,AccessorModule:o,AjaxModule:d,ClipboardModule:c,ColumnCalcsModule:E,DataTreeModule:y,DownloadModule:x,EditModule:L,ExportModule:P,FilterModule:F,FormatModule:O,FrozenColumnsModule:A,FrozenRowsModule:_,GroupRowsModule:V,HistoryModule:N,HtmlTableImportModule:W,ImportModule:G,InteractionModule:U,KeybindingsModule:X,MenuModule:q,MoveColumnsModule:K,MoveRowsModule:J,MutatorModule:Y,PageModule:Z,PersistenceModule:te,PopupModule:ie,PrintModule:se,ReactiveDataModule:oe,ResizeColumnsModule:ne,ResizeRowsModule:re,ResizeTableModule:ae,ResponsiveLayoutModule:le,SelectRowModule:he,SortModule:ue,TooltipModule:pe,ValidateModule:ge});class fe{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(let e in t)i.hasOwnProperty(e)||console.warn("Invalid "+this.msgType+" option:",e);for(let e in i)e in t?i[e]=t[e]:Array.isArray(i[e])?i[e]=Object.assign([],i[e]):"object"==typeof i[e]&&null!==i[e]?i[e]=Object.assign({},i[e]):void 0===i[e]&&delete i[e];return i}}class ve 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,i,s){var o=this.rows().indexOf(e),n=e.getElement(),r=0;return new Promise(((a,l)=>{if(o>-1){if(void 0===s&&(s=this.table.options.scrollToRowIfVisible),!s&&t.elVisible(n)&&(r=t.elOffset(n).top-t.elOffset(this.elementVertical).top)>0&&r{e.element.appendChild(t.getElement()),t.cellRendered()}))}reinitializeColumnWidths(e){e.forEach((function(e){e.reinitializeWidth()}))}}class Ce extends ve{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(){"fitDataTable"==this.options("layout")&&console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),this.options("responsiveLayout")&&console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),this.options("rtl")&&console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction")}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,i={};e.visible&&(e.modules.frozen||(t=e.getWidth(),i.leftPos=s,i.rightPos=s+t,i.width=t,this.isFitData&&(i.fitDataCheck=!e.modules.vdomHoz||e.modules.vdomHoz.fitDataCheck),s+t>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;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach((e=>{!e.definition.width&&e.visible&&(i=!0)})),i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,e=this.chain("rows-sample",[1],[],(()=>this.table.rowManager.getDisplayRows()))[0])){t=e.getElement(),e.generateCells(),this.tableElement.appendChild(t);for(let i=0;i{e!==this.columns[i]&&(t=!1)})),!t)}reinitializeRows(){var e=this.getVisibleRows(),t=this.table.rowManager.getRows().filter((t=>!e.includes(t)));e.forEach((e=>{this.reinitializeRow(e,!0)})),t.forEach((e=>{e.deinitialize()}))}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 t=e.getCell(i);e.getElement().insertBefore(t.getElement(),e.getCell(this.columns[this.rightCol]).getElement().nextSibling),t.cellRendered()}})),this.fitDataColActualWidthCheck(i),this.rightCol++,this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth()):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol-1];if(i)if(i.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){e=!0,this.getVisibleRows().forEach((e=>{if("group"!==e.type){var t=e.getCell(i);e.getElement().insertBefore(t.getElement(),e.getCell(this.columns[this.leftCol]).getElement()),t.cellRendered()}})),this.leftCol--,this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=i.getWidth();let t=this.fitDataColActualWidthCheck(i);t&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+t,this.vDomPadRight-=t)}else t=!1;else t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol];i&&i.modules.vdomHoz.leftPos>this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach((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)}}})),this.vDomPadRight+=i.getWidth(),this.rightCol--):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol];i&&i.modules.vdomHoz.rightPos{if("group"!==e.type){var t=e.getCell(i);try{e.getElement().removeChild(t.getElement())}catch(e){console.warn("Could not removeColLeft",e.message)}}})),this.vDomPadLeft+=i.getWidth(),this.leftCol++):t=!1}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},this.table.modules.frozenColumns&&this.table.modules.frozenColumns.leftColumns.forEach((t=>{this.appendCell(e,t)}));for(let t=this.leftCol;t<=this.rightCol;t++)this.appendCell(e,this.columns[t]);this.table.modules.frozenColumns&&this.table.modules.frozenColumns.rightColumns.forEach((t=>{this.appendCell(e,t)}))}}appendCell(e,t){if(t&&t.visible){let i=e.getCell(t);e.getElement().appendChild(i.getElement()),i.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 Ee extends e{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.contentsElement=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new fe(this.table,"column definition",b),this.redrawBlock=!1,this.redrawBlockUpdate=null,this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.contentsElement=this.createHeaderContentsElement(),this.element=this.createHeaderElement(),this.contentsElement.insertBefore(this.headersElement,this.contentsElement.firstChild),this.element.insertBefore(this.contentsElement,this.element.firstChild),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("scrollbar-vertical",this.padVerticalScrollbar.bind(this))}padVerticalScrollbar(e){this.table.rtl?this.headersElement.style.marginLeft=e+"px":this.headersElement.style.marginRight=e+"px"}initializeRenderer(){var e,t={virtual:Ce,basic:we};(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:",this.table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderContentsElement(){var e=document.createElement("div");return e.classList.add("tabulator-header-contents"),e.setAttribute("role","rowgroup"),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}getContentsElement(){return this.contentsElement}getHeadersElement(){return this.headersElement}scrollHorizontal(e){this.contentsElement.scrollLeft=e,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.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,i){var s=new f(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.redrawBlock||(this.headersElement.style.height="",this.columns.forEach((e=>{e.clearVerticalAlign()})),this.columns.forEach((t=>{var i=t.getHeight();i>e&&(e=i)})),this.headersElement.style.height=e+"px",this.columns.forEach((t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)})),this.table.rowManager.adjustTableSize())}findColumn(e){var t;if("object"!=typeof e)return this.columnsByField[e]||!1;if(e instanceof f)return e;if(e instanceof g)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return t=[],this.columns.forEach((e=>{t.push(e),t=t.concat(e.getColumns(!0))})),t.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(){var e=this.columnsByIndex.findIndex((e=>e.visible));return e>-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){t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.moveColumnActual(e,t,i),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.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.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()}rerenderColumns(e,t){this.redrawBlock?(!1===e||!0===e&&null===this.redrawBlockUpdate)&&(this.redrawBlockUpdate=e):this.renderer.rerenderColumns(e,t)}blockRedraw(){this.redrawBlock=!0,this.redrawBlockUpdate=null}restoreRedraw(){this.redrawBlock=!1,this.verticalAlignHeaders(),this.renderer.rerenderColumns(this.redrawBlockUpdate)}redraw(e){t.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(e),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class ye extends ve{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 i=t.elOffset(e.getElement()).top;return!(Math.abs(this.elementVertical.scrollTop-i)>Math.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-i))}scrollToRow(e){var i=e.getElement();this.elementVertical.scrollTop=t.elOffset(i).top-t.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class Re extends ve{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.rows().length?this._virtualRenderFill(!1===i?this.rows.length-1:i,!0,s||0):(this.clear(),this.table.rowManager._showPlaceholder()),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,i,s){var o=this.tableElement,n=this.elementVertical,r=0,a=0,l=0,h=0,d=0,c=this.rows(),u=c.length,p=this.elementVertical.clientHeight;if(s=s||0,e=e||0){for(;o.firstChild;)o.removeChild(o.firstChild);(l=(u-e+1)*this.vDomRowHeight)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*m),this.vDomBottom++,d++}e?(this.vDomTopPad=i?this.vDomRowHeight*this.vDomTop+s: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-p),o.style.paddingTop=this.vDomTopPad+"px",o.style.paddingBottom=this.vDomBottomPad+"px",i&&(this.scrollTop=this.vDomTopPad+h+s-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-p:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-p),this.elementVertical.scrollWidth>this.elementVertical.offsetWidth&&i&&(this.scrollTop+=this.elementVertical.offsetHeight-p),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,a=!0;a;)if(this.vDomTop){let l,h,d=e[n];d&&r=l?(this.styleRow(d,n),i.insertBefore(d.getElement(),i.firstChild),d.initialized&&d.heightInitialized||s.push(d),d.initialize(),h||(l=d.getElement().offsetHeight,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l)),t-=l,o+=l,this.vDomTop--,n--,r++):a=!1):a=!1}else a=!1;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,n=!0;n;){let r,a=e[this.vDomTop];a&&o=r?(this.vDomTop++,t-=r,s+=r,i.push(a),o++):n=!1):n=!1}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,a=!0;a;){let l,h,d=e[n];d&&r=l?(this.styleRow(d,n),i.appendChild(d.getElement()),d.initialized&&d.heightInitialized||s.push(d),d.initialize(),h||(l=d.getElement().offsetHeight,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l)),t-=l,o+=l,this.vDomBottom++,n++,r++):a=!1):a=!1}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,n=!0;n;){let r,a=e[this.vDomBottom];a&&o=r?(this.vDomBottom--,t-=r,s+=r,i.push(a),o++):n=!1):n=!1}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 xe 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.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.scrollbarWidth=0,this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),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}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(void 0===e)return!1;return this.rows.find((t=>t.data[this.table.options.index]==e))||!1}if(e instanceof w)return e;if(e instanceof v)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){return this.getDisplayRows().find((t=>t.getPosition()===e&&t.isDisplayed()))}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 w(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.regenerateRowPositions(),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]),(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.regenerateRowPositions(),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 w?e:new w(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.regenerateRowPositions(),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,i,s){var o=this.table,n="",r=0,a=["all","dataPipeline","display","displayPipeline","end"];if(!this.table.destroyed){if("function"==typeof e)if((r=this.dataPipeline.findIndex((t=>t.handler===e)))>-1)n="dataPipeline",i&&(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",i&&(r==this.displayPipeline.length-1?n="end":r++)}else n=e||"all",r=0;if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===n&&r{"row"===e.type&&(e.setPosition(t),t++)}))}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}setDisplayRows(e,t){this.displayRows[t]=e,t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length)}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=[];if(e&&!0!==e)switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0)}else t=this.chain("rows-retrieve",e,null,this.rows)||this.rows;return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:(this.dispatchExternal("renderStarted"),this.renderer.rerenderRows(e),this.fixedHeight||this.adjustTableSize(),this.scrollBarCheck(),this.dispatchExternal("renderComplete"))}scrollBarCheck(){var e=0;this.element.scrollHeight>this.element.clientHeight&&(e=this.element.offsetWidth-this.element.clientWidth),e!==this.scrollbarWidth&&(this.scrollbarWidth=e,this.dispatch("scrollbar-vertical",e))}initializeRenderer(){var e,t={virtual:Re,basic:ye};(e="string"==typeof this.table.options.renderVertical?t[this.table.options.renderVertical]:this.table.options.renderVertical)?(this.renderMode=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:",this.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(!0))):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.scrollBarCheck(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){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),this.tableElement.style.minWidth=""}_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,t=this.element.clientHeight;if("fill"===this.renderer.verticalFillMode){let i=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?(e=isNaN(this.table.options.minHeight)?this.table.options.minHeight:this.table.options.minHeight+"px",this.element.style.minHeight=e||"calc(100% - "+i+"px)",this.element.style.height="calc(100% - "+i+"px)",this.element.style.maxHeight="calc(100% - "+i+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-i+"px",this.element.scrollTop=this.scrollTop),this.renderer.resize(),this.fixedHeight||t==this.element.clientHeight||(this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw()),this.scrollBarCheck()}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 Te extends e{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1}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)if("string"==typeof this.table.options.footerElement)"<"===this.table.options.footerElement[0]?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement));else this.element=this.table.options.footerElement}getElement(){return this.element}append(e){this.activate(),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e){this.activate(),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(){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display=""))}redraw(){this.dispatch("footer-redraw")}}class Me 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","mouseup","mousedown","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,this.pseudoTrackers[e].target),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]]||(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={},n={};for(let e of i){let i,r=t[e],a=this.previousTargets[e];if(a&&a.target===r)i=a.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()===r)),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(r));break;case"cell":s.components.includes("cell")&&(o.row instanceof w?i=o.row.findCell(r):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&&(o[e]=i,n[e]={target:r,component:i})}return this.previousTargets=n,o}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 ke{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("_")||this.table.options.debugInvalidComponentFuncs&&console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class Le extends e{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,i,s,o,n){var r=++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.alertLoader(),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);r==this.requestOrder?(this.clearAlert(),!1!==t&&(this.dispatchExternal("dataLoaded",t),this.table.rowManager.setData(t,s,void 0===n?!s:n))):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.alertError(),setTimeout((()=>{this.clearAlert()}),this.table.options.dataLoaderErrorTimeout)})).finally((()=>{this.loading=!1}))):(this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,s,void 0===n?!s:n),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++}alertLoader(){("function"==typeof this.table.options.dataLoader?this.table.options.dataLoader():this.table.options.dataLoader)&&this.table.alertManager.alert(this.table.options.dataLoaderLoading||this.langText("data|loading"))}alertError(){this.table.alertManager.alert(this.table.options.dataLoaderError||this.langText("data|error"),"error")}clearAlert(){this.table.alertManager.clear()}}class De{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._notifySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifySubscriptionChange(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._notifySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}subscribed(e){return this.events[e]&&this.events[e].length}_notifySubscriptionChange(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 Se{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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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}_notifySubscriptionChange(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 Pe extends e{constructor(e){super(e)}_warnUser(){this.options("debugDeprecation")&&console.warn(...arguments)}check(e,t){var i="";return void 0===this.options(e)||(i="Deprecated Setup Option - Use of the %c"+e+"%c option is now deprecated",t?(i=i+", Please use the %c"+t+"%c option instead",this._warnUser(i,"font-weight: bold;","font-weight: normal;","font-weight: bold;","font-weight: normal;")):this._warnUser(i,"font-weight: bold;","font-weight: normal;"),!1)}checkMsg(e,t){return void 0===this.options(e)||(this._warnUser("%cDeprecated Setup Option - Use of the %c"+e+" %c option is now deprecated, "+t,"font-weight: normal;","font-weight: bold;","font-weight: normal;"),!1)}msg(e){this._warnUser(e)}}class ze{static register(e){ze.tables.push(e)}static deregister(e){var t=ze.tables.indexOf(e);t>-1&&ze.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)&&(n=e),e.visible&&(i+=e.getWidth())})),n?(o=s-i+n.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(n.setWidth(0),this.table.modules.responsiveLayout.update()),o>0?n.setWidth(o):n.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e,t){var i,s,o=this.table.rowManager.element.getBoundingClientRect().width,n=0,r=0,a=0,l=[],h=[],d=0,c=0;function u(e){return"string"==typeof e?e.indexOf("%")>-1?o/100*parseInt(e):parseInt(e):e}function p(e,t,i,s){var o=[],n=0,r=0,l=0,h=a,d=0,c=0,m=[];function g(e){return i*(e.column.definition.widthGrow||1)}function b(e){return u(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&&(o-=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=u(t),n+=s>i?s:i,e.definition.widthShrink&&(h.push({column:e,width:s>i?s:i}),d+=e.definition.widthShrink)):(l.push({column:e,width:0}),a+=e.definition.widthGrow||1))})),r=o-n,i=Math.floor(r/a),c=p(l,r,i,!1),l.length&&c>0&&(l[l.length-1].width+=c),l.forEach((function(e){r-=e.width})),(s=Math.abs(c)+r)>0&&d&&(c=p(h,s,Math.floor(s/d),!0)),c&&h.length&&(h[h.length-1].width-=c),l.forEach((function(e){e.column.setWidth(e.width)})),h.forEach((function(e){e.column.setWidth(e.width)}))}};class Oe extends s{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;Oe.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(e){this.dispatch("layout-refreshing"),Oe.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),this.dispatch("layout-refreshed")}}Oe.moduleName="layout",Oe.modes=He;class Ae extends s{constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=t.deepClone(Ae.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=t.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=(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)}))}}Ae.moduleName="localize",Ae.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 _e extends s{constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[];return ze.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)}}_e.moduleName="comms";var Be=Object.freeze({__proto__:null,LayoutModule:Oe,LocalizeModule:Ae,CommsModule:_e});class Ie{constructor(e,t){this.bindStaticFunctionality(e),this.bindModules(e,Be,!0),t&&this.bindModules(e,t)}bindStaticFunctionality(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=ze.lookupTable(e,!0);return!(Array.isArray(t)&&!t.length)&&t},e.prototype.bindModules=function(){var t=[],i=[],s=[];for(var o in this.modules={},e.moduleBindings){let n=e.moduleBindings[o],r=new n(this);this.modules[o]=r,n.prototype.moduleCore?this.modulesCore.push(r):n.moduleInitOrder?n.moduleInitOrder<0?t.push(r):i.push(r):s.push(r)}t.sort(((e,t)=>e.moduleInitOrder>t.moduleInitOrder?1:-1)),i.sort(((e,t)=>e.moduleInitOrder>t.moduleInitOrder?1:-1)),this.modulesRegular=t.concat(s.concat(i))}}bindModules(e,t,i){var s=Object.values(t);i&&s.forEach((e=>{e.prototype.moduleCore=!0})),e.registerModule(s)}}class Ve extends e{constructor(e){super(e),this.element=this._createAlertElement(),this.msgElement=this._createMsgElement(),this.type=null,this.element.appendChild(this.msgElement)}_createAlertElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert"),e}_createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert-msg"),e.setAttribute("role","alert"),e}_typeClass(){return"tabulator-alert-state-"+this.type}alert(e,t="msg"){if(e){for(this.clear(),this.type=t;this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.add(this._typeClass()),"function"==typeof e&&(e=e()),e instanceof HTMLElement?this.msgElement.appendChild(e):this.msgElement.innerHTML=e,this.table.element.appendChild(this.element)}}clear(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.msgElement.classList.remove(this._typeClass())}}class Ne{constructor(e,t){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.alertManager=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 ke(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new Pe(this),this.optionsList=new fe(this,"table constructor"),this.initialized=!1,this.destroyed=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout((()=>{this._create()}))),ze.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 Ee(this),this.rowManager=new xe(this),this.footerManager=new Te(this),this.dataLoader=new Le(this),this.alertManager=new Ve(this),this.bindModules(),this.options=this.optionsList.generate(Ne.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new De(this,this.options,this.options.debugEventsExternal),this.eventBus=new Se(this.options.debugEventsInternal),this.interactionMonitor=new Me(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(this.destroyed=!0,ze.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"),this.externalEvents.dispatch("tableDestroyed")}_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))}initGuard(e,t){var i,s;return this.options.debugInitialization&&!this.initialized&&(e||(e=" "==(s="Error"==(i=(new Error).stack.split("\n"))[0]?i[2]:i[1])[0]?s.trim().split(" ")[1].split(".")[1]:s.trim().split("@")[0]),console.warn("Table Not Initialized - Calling the "+e+" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function."+(t?" "+t:""))),this.initialized}blockRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-blocking"),this.rowManager.blockRedraw(),this.columnManager.blockRedraw(),this.eventBus.dispatch("redraw-blocked")}restoreRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-restoring"),this.rowManager.restoreRedraw(),this.columnManager.restoreRedraw(),this.eventBus.dispatch("redraw-restored")}setData(e,t,i){return this.initGuard(!1,"To set initial data please use the 'data' property in the table constructor."),this.dataLoader.load(e,t,i,!1)}clearData(){this.initGuard(),this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,i){return this.initGuard(),this.dataLoader.load(e,t,i,!0,!0)}updateData(e){var t=0;return this.initGuard(),new Promise(((i,s)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e&&e.length>0?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"))}))}addData(e,t,i){return this.initGuard(),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"))}))}updateOrAddData(e){var t=[],i=0;return this.initGuard(),new Promise(((s,o)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e&&e.length>0?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"))}))}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e){var t=this.rowManager.getRowFromPosition(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];this.initGuard(),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){return this.initGuard(),"string"==typeof e&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i).then((e=>e[0].getComponent()))}updateOrAddRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),"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 this.initGuard(),"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);this.initGuard(),s?s.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e){var t=this.rowManager.findRow(e);return t?t.getPosition():(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initGuard(!1,"To set initial columns please use the 'columns' property in the table constructor"),this.columnManager.setColumns(e)}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(this.initGuard(),!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show()}hideColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide()}toggleColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),!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.initGuard(),this.columnManager.addColumn(e,t,s).then((e=>e.getComponent()))}deleteColumn(e){var t=this.columnManager.findColumn(e);return this.initGuard(),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 this.initGuard(),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);this.initGuard(),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.initGuard(),this.columnManager.redraw(e),this.rowManager.redraw(e)}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)}alert(e,t){this.initGuard(),this.alertManager.alert(e,t)}clearAlert(){this.initGuard(),this.alertManager.clear()}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}}Ne.defaultOptions={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,debugInvalidComponentFuncs:!0,debugInitialization:!0,debugDeprecation:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",popupContainer:!1,columns:[],columnDefaults:{},data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",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,rowHeight:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{}},new Ie(Ne);class We extends Ne{}new Ie(We,be);class je{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,d as AjaxModule,u as CalcComponent,p as CellComponent,c as ClipboardModule,E as ColumnCalcsModule,g as ColumnComponent,y as DataTreeModule,x as DownloadModule,L as EditModule,P as ExportModule,F as FilterModule,O as FormatModule,A as FrozenColumnsModule,_ as FrozenRowsModule,B as GroupComponent,V as GroupRowsModule,N as HistoryModule,W as HtmlTableImportModule,G as ImportModule,U as InteractionModule,X as KeybindingsModule,q as MenuModule,s as Module,K as MoveColumnsModule,J as MoveRowsModule,Y as MutatorModule,Z as PageModule,te as PersistenceModule,ie as PopupModule,se as PrintModule,je as PseudoRow,oe as ReactiveDataModule,ve as Renderer,ne as ResizeColumnsModule,re as ResizeRowsModule,ae as ResizeTableModule,le as ResponsiveLayoutModule,v as RowComponent,he as SelectRowModule,ue as SortModule,Ne as Tabulator,We as TabulatorFull,pe as TooltipModule,ge as ValidateModule}; +/* Tabulator v5.4.1 (c) Oliver Folkerd 2022 */ +class e{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}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(e){return this.table.modules.layout.layout(e)}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]}deprecationCheck(e,t){return this.table.deprecationAdvisor.check(e,t)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class t{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 i extends e{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed,this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return"string"==typeof e?(e=document.querySelector(e))||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)"):!0===e&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t||!!t.parentNode&&this._checkContainerIsParent(e,t.parentNode)}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var i=!(e instanceof MouseEvent),s=i?e.touches[0].pageX:e.pageX,o=i?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let e=t.elOffset(this.container);s-=e.left,o-=e.top}return{x:s,y:o}}elementPositionCoords(e,i="right"){var s,o,n,r=t.elOffset(e);switch(this.container!==document.body&&(s=t.elOffset(this.container),r.left-=s.left,r.top-=s.top),i){case"right":o=r.left+e.offsetWidth,n=r.top-1;break;case"bottom":o=r.left,n=r.top+e.offsetHeight;break;case"left":o=r.left,n=r.top-1;break;case"top":o=r.left,n=r.top;break;case"center":o=r.left+e.offsetWidth/2,n=r.top+e.offsetHeight/2}return{x:o,y:n,offset:r}}show(e,t){var i,s,o,n,r;return this.destroyed||this.table.destroyed||(e instanceof HTMLElement?(o=e,n=(r=this.elementPositionCoords(e,t)).offset,i=r.x,s=r.y):"number"==typeof e?(n={top:0,left:0},i=e,s=t):(i=(r=this.containerEventCoords(e)).x,s=r.y,this.reversedX=!1),this.element.style.top=s+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),"function"==typeof this.renderedCallback&&this.renderedCallback(),this._fitToScreen(i,s,o,n,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",(e=>{e.stopPropagation()}))),this}_fitToScreen(e,t,i,s,o){var n=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;if((e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",this.element.style.right=i?this.container.offsetWidth-s.left+"px":this.container.offsetWidth-e+"px",this.reversedX=!0),t+this.element.offsetHeight>Math.max(this.container.offsetHeight,n?this.container.scrollHeight:0))if(i)if("bottom"===o)this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";else this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px";else this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout((()=>{this.visible&&(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),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)}),100),this.blurCallback=e),this}_escapeCheck(e){27==e.keyCode&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new i(this.table,e,this),this.childPopup}}class s 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]=(...i)=>(this.table.initGuard(e),t(...i)):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}displayRows(e){var t,i=this.table.rowManager.displayRows.length-1;if(this._handler&&(t=this.table.rowManager.displayPipeline.findIndex((e=>e.handler===this._handler)))>-1&&(i=t),e&&(i+=e),this._handler)return i>-1?this.table.rowManager.getDisplayRows(i):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new i(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}class o extends s{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,i){var s="accessor"+(i.charAt(0).toUpperCase()+i.slice(1)),o=e.getComponent(),n=t.deepClone(e.data||{});return this.table.columnManager.traverse((function(e){var t,r,a,l;e.modules.accessor&&(r=e.modules.accessor[s]||e.modules.accessor.accessor||!1)&&"undefined"!=(t=e.getFieldValue(n))&&(l=e.getComponent(),a="function"==typeof r.params?r.params(t,n,i,l,o):r.params,e.setFieldValue(n,r.accessor(t,n,i,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,i){return e&&i&&Object.keys(i).length&&(t.method&&"get"!=t.method.toLowerCase()||(t.method="get",e+=(e.includes("?")?"&":"?")+r(i))),e}function l(e,t){var i=[];if(t=t||"",Array.isArray(e))e.forEach(((e,s)=>{i=i.concat(l(e,t?t+"["+s+"]":s))}));else if("object"==typeof e)for(var s in e)i=i.concat(l(e[s],t?t+"["+s+"]":s));else i.push({key:t,value:e});return i}var h={json:{headers:{"Content-Type":"application/json"},body:function(e,t,i){return JSON.stringify(i)}},form:{headers:{},body:function(e,t,i){var s=l(i),o=new FormData;return s.forEach((function(e){o.append(e.key,e.value)})),o}}};class d extends s{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=d.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||d.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||d.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({},d.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()}}d.moduleName="ajax",d.defaultConfig={method:"GET"},d.defaultURLGenerator=a,d.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([]))}))},d.contentTypeFormatters=h;class c extends s{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,s;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(s=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),t=(i=this.table.modules.export.generateHTMLTable(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=c.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=c.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}}c.moduleName="clipboard",c.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)}},c.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 u{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 p{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")}_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)}));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":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){this.setValueProcessData(e,t,i)&&(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,i){var s=!1;return(this.value!==e||i)&&(s=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),s&&this.dispatch("cell-value-changed",this),s}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.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,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,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 p(this)),this.component}}class g{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 f&&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.rerenderColumns(!0),t}}var b={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,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};class f 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.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 f(e,this);this.attachColumn(i)})),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end"}return 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(f.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach((e=>{-1===f.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)}_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._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;(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.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){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.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),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":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{t.push(e),t=t.concat(e.getColumns(!0))})):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach((function(e){t.push(e.getDefinition(!0))})),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach((function(t){t.visible&&(e=!0)})),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(e){e.show()})),this.isGroup||null!==this.width||this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(e){e.hide()})),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach((function(t){t.visible&&(e+=t.getWidth())})),this.contentElement.style.maxWidth=e-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-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.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach((function(e){e.setMinWidth()}))}setMaxWidth(e){this.minWidth&&e{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 g(this)),this.component}}f.defaultOptionList=b;class v{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(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(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 w 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.position=0,this.positionWatchers=[],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)}deinitialize(){this.initialized=!1}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,i=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(t=this.table.options.resizableRows?this.element.clientHeight:0,this.cells.forEach((function(e){var t=e.getHeight();t>i&&(i=t)})),this.height=e?Math.max(i,t):this.manualHeight?this.height:Math.max(i,t)),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.table.options.rowHeight&&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 i,s=this.element&&t.elVisible(this.element),o={};return new Promise(((t,n)=>{"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)),i=this.chain("row-data-changing",[this,o,e],null,e);for(let e in i)this.data[e]=i[e];this.dispatch("row-data-save-after",this);for(let t in e){this.table.columnManager.getColumnsByFieldRoot(t).forEach((e=>{let t=this.getCell(e.getField());if(t){let o=e.getFieldValue(i);t.getValue()!==o&&(t.setValueProcessData(o),s&&t.cellRendered())}}))}s?(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,s,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),t()}))}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.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t{e(this.position)})))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new v(this)),this.component}}var C={avg:function(e,t,i){var s=0,o=void 0!==i.precision?i.precision:2;return e.length&&(s=e.reduce((function(e,t){return Number(e)+Number(t)})),s/=e.length,s=!1!==o?s.toFixed(o):s),parseFloat(s).toString()},max:function(e,t,i){var s=null,o=void 0!==i.precision&&i.precision;return e.forEach((function(e){((e=Number(e))>s||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;this.blockCheck()||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 w(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 u(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}}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}}E.moduleName="columnCalcs",E.calculations=C;class y extends s{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.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,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),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.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){e&&this.table.rowManager.getRows().forEach((e=>{this.reinitializeRowChildren(e)}))}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=i.controlEl;t=t||e.getCells()[0].getElement(),!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))}getRows(e){var t=[];return e.forEach(((e,i)=>{var s;t.push(e),e instanceof w&&(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 w(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()}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}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 w&&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 w?i=e.data:e instanceof v?i=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find((t=>t instanceof w&&t.element===e)))&&(i=i.data):null===e&&(i=!1):i=void 0!==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 w&&(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]}}y.moduleName="dataTree";var R={csv:function(e,t={},i){var s=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=null!==e.value?JSON.stringify(e.value):"";break;case"undefined":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.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=null!==e.value?JSON.stringify(e.value):"";break;case"undefined":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.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.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),a=!("compress"in i)||i.compress;function l(){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(l());else{if(i.sheets)for(var h in i.sheets)!0===i.sheets[h]?(n.SheetNames.push(h),n.Sheets[h]=l()):(n.SheetNames.push(h),r.commsSend(i.sheets[h],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function(e){n.Sheets[h]=e}}));else n.SheetNames.push(o),n.Sheets[o]=l();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",compression:a})),"application/octet-stream")}},html:function(e,t,i){this.modExists("export",!0)&&i(this.modules.export.generateHTMLTable(e),"text/html")}};class x extends s{constructor(e){super(e),this.registerTableOption("downloadEncoder",(function(e,t){return new Blob([e],{type:t})})),this.registerTableOption("downloadReady",void 0),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.deprecatedOptionsCheck(),this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("downloadReady","downloadEncoder")}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:x.downloaders[e]?n=x.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=this.table.options.downloadEncoder(e,t);r&&(o?window.open(window.URL.createObjectURL(r)):(s=s||"Tabulator."+("function"==typeof i?"txt":i),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){if("intercept"===t)this.download(i.type,"",i.options,i.active,i.intercept)}}function T(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)}x.moduleName="download",x.downloaders=R;class M{constructor(e,t,i,s,o,n){this.edit=e,this.table=e.table,this.cell=t,this.params=this._initializeParams(n),this.data=[],this.displayItems=[],this.currentItems=[],this.focusedItem=null,this.input=this._createInputElement(),this.listEl=this._createListElement(),this.initialValues=null,this.isFilter=!t._getSelf,this.filterTimeout=null,this.filtered=!1,this.typing=!1,this.values=[],this.popup=null,this.listIteration=0,this.lastAction="",this.filterTerm="",this.blurable=!0,this.actions={success:s,cancel:o},this._deprecatedOptionsCheck(),this._initializeValue(),i(this._onRendered.bind(this))}_deprecatedOptionsCheck(){this.params.listItemFormatter&&this.cell.getTable().deprecationAdvisor.msg("The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.sortValuesList&&this.cell.getTable().deprecationAdvisor.msg("The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchFunc&&this.cell.getTable().deprecationAdvisor.msg("The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchingPlaceholder&&this.cell.getTable().deprecationAdvisor.msg("The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options")}_initializeValue(){var e=this.cell.getValue();void 0===e&&void 0!==this.params.defaultValue&&(e=this.params.defaultValue),this.initialValues=this.params.multiselect?e:[e],this.isFilter&&(this.input.value=this.initialValues?this.initialValues.join(","):"",this.headerFilterInitialListGen())}_onRendered(){var e=this.cell.getElement();function t(e){e.stopPropagation()}this.input.style.height="100%",this.input.focus({preventScroll:!0}),e.addEventListener("click",t),setTimeout((()=>{e.removeEventListener("click",t)}),1e3),this.input.addEventListener("mousedown",this._preventPopupBlur.bind(this))}_createListElement(){var e=document.createElement("div");return e.classList.add("tabulator-edit-list"),e.addEventListener("mousedown",this._preventBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e}_setListWidth(){var e=this.isFilter?this.input:this.cell.getElement();this.listEl.style.minWidth=e.offsetWidth+"px",this.params.maxWidth&&(!0===this.params.maxWidth?this.listEl.style.maxWidth=e.offsetWidth+"px":"number"==typeof this.params.maxWidth?this.listEl.style.maxWidth=this.params.maxWidth+"px":this.listEl.style.maxWidth=this.params.maxWidth)}_createInputElement(){var e=this.params.elementAttributes,t=document.createElement("input");if(t.setAttribute("type",this.params.clearable?"search":"text"),t.style.padding="4px",t.style.width="100%",t.style.boxSizing="border-box",this.params.autocomplete||(t.style.cursor="default",t.style.caretColor="transparent"),e&&"object"==typeof e)for(let i in e)"+"==i.charAt(0)?(i=i.slice(1),t.setAttribute(i,t.getAttribute(i)+e["+"+i])):t.setAttribute(i,e[i]);return this.params.mask&&T(t,this.params),this._bindInputEvents(t),t}_initializeParams(e){var t,i=["values","valuesURL","valuesLookup"];return(e=Object.assign({},e)).verticalNavigation=e.verticalNavigation||"editor",e.placeholderLoading=void 0===e.placeholderLoading?"Searching ...":e.placeholderLoading,e.placeholderEmpty=void 0===e.placeholderEmpty?"No Results Found":e.placeholderEmpty,e.filterDelay=void 0===e.filterDelay?300:e.filterDelay,e.emptyValue=Object.keys(e).includes("emptyValue")?e.emptyValue:"",(t=Object.keys(e).filter((e=>i.includes(e))).length)?t>1&&console.warn("list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor"):console.warn("list editor config error - either the values, valuesURL, or valuesLookup option must be set"),e.autocomplete?e.multiselect&&(e.multiselect=!1,console.warn("list editor config error - multiselect option is not available when autocomplete is enabled")):(e.freetext&&(e.freetext=!1,console.warn("list editor config error - freetext option is only available when autocomplete is enabled")),e.filterFunc&&(e.filterFunc=!1,console.warn("list editor config error - filterFunc option is only available when autocomplete is enabled")),e.filterRemote&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option is only available when autocomplete is enabled")),e.mask&&(e.mask=!1,console.warn("list editor config error - mask option is only available when autocomplete is enabled")),e.allowEmpty&&(e.allowEmpty=!1,console.warn("list editor config error - allowEmpty option is only available when autocomplete is enabled")),e.listOnEmpty&&(e.listOnEmpty=!1,console.warn("list editor config error - listOnEmpty option is only available when autocomplete is enabled"))),e.filterRemote&&"function"!=typeof e.valuesLookup&&!e.valuesURL&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source")),e}_bindInputEvents(e){e.addEventListener("focus",this._inputFocus.bind(this)),e.addEventListener("click",this._inputClick.bind(this)),e.addEventListener("blur",this._inputBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e.addEventListener("search",this._inputSearch.bind(this)),this.params.autocomplete&&e.addEventListener("keyup",this._inputKeyUp.bind(this))}_inputFocus(e){this.rebuildOptionsList()}_filter(){this.params.filterRemote?(clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout((()=>{this.rebuildOptionsList()}),this.params.filterDelay)):this._filterList()}_inputClick(e){e.stopPropagation()}_inputBlur(e){this.blurable&&(this.popup?this.popup.hide():this._resolveValue(!0))}_inputSearch(){this._clearChoices()}_inputKeyDown(e){switch(e.keyCode){case 38:this._keyUp(e);break;case 40:this._keyDown(e);break;case 37:case 39:this._keySide(e);break;case 13:this._keyEnter();break;case 27:this._keyEsc();break;case 36:case 35:this._keyHomeEnd(e);break;case 9:break;default:this._keySelectLetter(e)}}_inputKeyUp(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:this._keyAutoCompLetter(e)}}_preventPopupBlur(){this.popup&&this.popup.blockHide(),setTimeout((()=>{this.popup&&this.popup.restoreHide()}),10)}_preventBlur(){this.blurable=!1,setTimeout((()=>{this.blurable=!0}),10)}_keyUp(e){var t=this.displayItems.indexOf(this.focusedItem);("editor"==this.params.verticalNavigation||"hybrid"==this.params.verticalNavigation&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&this._focusItem(this.displayItems[t-1]))}_keyDown(e){var t=this.displayItems.indexOf(this.focusedItem);("editor"==this.params.verticalNavigation||"hybrid"==this.params.verticalNavigation&&t=38&&e.keyCode<=90&&this._scrollToValue(e.keyCode))}_keyAutoCompLetter(e){this._filter(),this.lastAction="typing",this.typing=!0}_scrollToValue(e){clearTimeout(this.filterTimeout);var t=String.fromCharCode(e).toLowerCase();this.filterTerm+=t.toLowerCase();var i=this.displayItems.find((e=>void 0!==e.label&&e.label.toLowerCase().startsWith(this.filterTerm)));i&&this._focusItem(i),this.filterTimeout=setTimeout((()=>{this.filterTerm=""}),800)}_focusItem(e){this.lastAction="focus",this.focusedItem&&this.focusedItem.element&&this.focusedItem.element.classList.remove("focused"),this.focusedItem=e,e&&e.element&&(e.element.classList.add("focused"),e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}))}headerFilterInitialListGen(){this._generateOptions(!0)}rebuildOptionsList(){this._generateOptions().then(this._sortOptions.bind(this)).then(this._buildList.bind(this)).then(this._showList.bind(this)).catch((e=>{Number.isInteger(e)||console.error("List generation error",e)}))}_filterList(){this._buildList(this._filterOptions()),this._showList()}_generateOptions(e){var t=[],i=++this.listIteration;return this.filtered=!1,this.params.values?t=this.params.values:this.params.valuesURL?t=this._ajaxRequest(this.params.valuesURL,this.input.value):"function"==typeof this.params.valuesLookup?t=this.params.valuesLookup(this.cell,this.input.value):this.params.valuesLookup&&(t=this._uniqueColumnValues(this.params.valuesLookupField)),t instanceof Promise?(e||this._addPlaceholder(this.params.placeholderLoading),t.then().then((e=>this.listIteration===i?this._parseList(e):Promise.reject(i)))):Promise.resolve(this._parseList(t))}_addPlaceholder(e){var t=document.createElement("div");"function"==typeof e&&(e=e(this.cell.getComponent(),this.listEl)),e&&(this._clearList(),e instanceof HTMLElement?t=e:(t.classList.add("tabulator-edit-list-placeholder"),t.innerHTML=e),this.listEl.appendChild(t),this._showList())}_ajaxRequest(e,t){return e=a(e,{},this.params.filterRemote?{term:t}:{}),fetch(e).then((e=>e.ok?e.json().catch((e=>(console.warn("List Ajax Load Error - Invalid JSON returned",e),Promise.reject(e)))):(console.error("List Ajax Load Error - Connection Error: "+e.status,e.statusText),Promise.reject(e)))).catch((e=>(console.error("List Ajax Load Error - Connection Error: ",e),Promise.reject(e))))}_uniqueColumnValues(e){var t,i={},s=this.table.getData(this.params.valuesLookup);return(t=e?this.table.columnManager.getColumnByField(e):this.cell.getColumn()._getSelf())?s.forEach((e=>{var s=t.getFieldValue(e);null!=s&&""!==s&&(i[s]=!0)})):(console.warn("unable to find matching column to create select lookup list:",e),i=[]),Object.keys(i)}_parseList(e){var t=[];return Array.isArray(e)||(e=Object.entries(e).map((([e,t])=>({label:t,value:e})))),e.forEach((e=>{"object"!=typeof e&&(e={label:e,value:e}),this._parseListItem(e,t,0)})),!this.currentItems.length&&this.params.freetext&&(this.input.value=this.initialValues,this.typing=!0,this.lastAction="typing"),this.data=t,t}_parseListItem(e,t,i){var s={};e.options?s=this._parseListGroup(e,i+1):(s={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,selected:!1,visible:!0,level:i,original:e},this.initialValues&&this.initialValues.indexOf(e.value)>-1&&this._chooseItem(s,!0)),t.push(s)}_parseListGroup(e,t){var i={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,visible:!0,level:t,options:[],original:e};return e.options.forEach((e=>{this._parseListItem(e,i.options,t)})),i}_sortOptions(e){var t;return this.params.sort&&(t="function"==typeof this.params.sort?this.params.sort:this._defaultSortFunction.bind(this),this._sortGroup(t,e)),e}_sortGroup(e,t){t.sort(((t,i)=>e(t.label,i.label,t.value,i.value,t.original,i.original))),t.forEach((t=>{t.group&&this._sortGroup(e,t.options)}))}_defaultSortFunction(e,t){var i,s,o,n,r,a=0,l=/(\d+)|(\D+)/g,h=/\d/,d=0;if("desc"===this.params.sort&&([e,t]=[t,e]),e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if((i=String(e).toLowerCase())===(s=String(t).toLowerCase()))return 0;if(!h.test(i)||!h.test(s))return i>s?1:-1;for(i=i.match(l),s=s.match(l),r=i.length>s.length?s.length:i.length;an?1:-1;return i.length>s.length}d=1}else d=t||0===t?-1:0;return d}_filterOptions(){var e=this.params.filterFunc||this._defaultFilterFunc,t=this.input.value;return t?(this.filtered=!0,this.data.forEach((i=>{this._filterItem(e,t,i)}))):this.filtered=!1,this.data}_filterItem(e,t,i){var s=!1;return i.group?(i.options.forEach((i=>{this._filterItem(e,t,i)&&(s=!0)})),i.visible=s):i.visible=e(t,i.label,i.value,i.original),i.visible}_defaultFilterFunc(e,t,i,s){return e=String(e).toLowerCase(),null!=t&&(String(t).toLowerCase().indexOf(e)>-1||String(i).toLowerCase().indexOf(e)>-1)}_clearList(){for(;this.listEl.firstChild;)this.listEl.removeChild(this.listEl.firstChild);this.displayItems=[]}_buildList(e){this._clearList(),e.forEach((e=>{this._buildItem(e)})),this.displayItems.length||this._addPlaceholder(this.params.placeholderEmpty)}_buildItem(e){var t,i=e.element;if(!this.filtered||e.visible){if(!i){if((i=document.createElement("div")).tabIndex=0,(t=this.params.itemFormatter?this.params.itemFormatter(e.label,e.value,e.original,i):e.label)instanceof HTMLElement?i.appendChild(t):i.innerHTML=t,e.group?i.classList.add("tabulator-edit-list-group"):i.classList.add("tabulator-edit-list-item"),i.classList.add("tabulator-edit-list-group-level-"+e.level),e.elementAttributes&&"object"==typeof e.elementAttributes)for(let t in e.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),i.setAttribute(t,this.input.getAttribute(t)+e.elementAttributes["+"+t])):i.setAttribute(t,e.elementAttributes[t]);e.group?i.addEventListener("click",this._groupClick.bind(this,e)):i.addEventListener("click",this._itemClick.bind(this,e)),i.addEventListener("mousedown",this._preventBlur.bind(this)),e.element=i}this._styleItem(e),this.listEl.appendChild(i),e.group?e.options.forEach((e=>{this._buildItem(e)})):this.displayItems.push(e)}}_showList(){var e=this.popup&&this.popup.isVisible();if(this.input.parentNode){if(this.params.autocomplete&&""===this.input.value&&!this.params.listOnEmpty)return void(this.popup&&this.popup.hide(!0));this._setListWidth(),this.popup||(this.popup=this.edit.popup(this.listEl)),this.popup.show(this.cell.getElement(),"bottom"),e||setTimeout((()=>{this.popup.hideOnBlur(this._resolveValue.bind(this,!0))}),10)}}_styleItem(e){e&&e.element&&(e.selected?e.element.classList.add("active"):e.element.classList.remove("active"))}_itemClick(e,t){t.stopPropagation(),this._chooseItem(e)}_groupClick(e,t){t.stopPropagation()}_cancel(){this.popup.hide(!0),this.actions.cancel()}_clearChoices(){this.typing=!0,this.currentItems.forEach((e=>{e.selected=!1,this._styleItem(e)})),this.currentItems=[],this.focusedItem=null}_chooseItem(e,t){var i;this.typing=!1,this.params.multiselect?((i=this.currentItems.indexOf(e))>-1?(this.currentItems.splice(i,1),e.selected=!1):(this.currentItems.push(e),e.selected=!0),this.input.value=this.currentItems.map((e=>e.label)).join(","),this._styleItem(e)):(this.currentItems=[e],e.selected=!0,this.input.value=e.label,this._styleItem(e),t||this._resolveValue()),this._focusItem(e)}_resolveValue(e){var t,i;if(this.popup&&this.popup.hide(!0),this.params.multiselect)t=this.currentItems.map((e=>e.value));else if(e&&this.params.autocomplete&&this.typing){if(!(this.params.freetext||this.params.allowEmpty&&""===this.input.value))return void this.actions.cancel();t=this.input.value}else t=this.currentItems[0]?this.currentItems[0].value:null==(i=this.initialValues[0])||""===i?i:this.params.emptyValue;""===t&&(t=this.params.emptyValue),this.actions.success(t),this.isFilter&&(this.initialValues=t&&!Array.isArray(t)?[t]:t,this.currentItems=[])}}var k={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%",o.selectContents&&r.select()})),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&&T(r,o),r},textarea:function(e,t,i,s,o){var n=e.getValue(),r=o.verticalNavigation||"hybrid",a=String(null!=n?n:""),l=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(),o.selectContents&&l.select()})),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 13:e.shiftKey&&o.shiftEnterSubmit&&d();break;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&&T(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),o.selectContents&&a.select()})),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&&T(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},date:function(e,t,i,s,o){var n=o.format,r=n?window.DateTime||luxon.DateTime:null,a=e.getValue(),l=document.createElement("input");function h(e){return(r.isDateTime(e)?e:"iso"===n?r.fromISO(String(e)):r.fromFormat(String(e),n)).toFormat("yyyy-MM-dd")}if(l.type="date",l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.max&&l.setAttribute("max",n?h(o.max):o.max),o.min&&l.setAttribute("min",n?h(o.min):o.min),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(e){var t=l.value;null==a&&""!==t||t!==a?(t&&n&&(t=r.fromFormat(String(t),"yyyy-MM-dd").toFormat(n)),i(t)&&(a=l.value)):s()}return a=void 0!==a?a:"",n&&(r?a=h(a):console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js")),l.value=a,t((function(){l.focus({preventScroll:!0}),l.style.height="100%",o.selectContents&&l.select()})),l.addEventListener("change",d),l.addEventListener("blur",d),l.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),l},time:function(e,t,i,s,o){var n,r=o.format,a=r?window.DateTime||luxon.DateTime:null,l=e.getValue(),h=document.createElement("input");if(h.type="time",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),h.setAttribute(e,h.getAttribute(e)+o.elementAttributes["+"+e])):h.setAttribute(e,o.elementAttributes[e]);function d(e){var t=h.value;null==l&&""!==t||t!==l?(t&&r&&(t=a.fromFormat(String(t),"hh:mm").toFormat(r)),i(t)&&(l=h.value)):s()}return l=void 0!==l?l:"",r&&(a?(n=a.isDateTime(l)?l:"iso"===r?a.fromISO(String(l)):a.fromFormat(String(l),r),l=n.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js")),h.value=l,t((function(){h.focus({preventScroll:!0}),h.style.height="100%",o.selectContents&&h.select()})),h.addEventListener("change",d),h.addEventListener("blur",d),h.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),h},datetime:function(e,t,i,s,o){var n,r=o.format,a=r?window.DateTime||luxon.DateTime:null,l=e.getValue(),h=document.createElement("input");if(h.type="datetime-local",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),h.setAttribute(e,h.getAttribute(e)+o.elementAttributes["+"+e])):h.setAttribute(e,o.elementAttributes[e]);function d(e){var t=h.value;null==l&&""!==t||t!==l?(t&&r&&(t=a.fromISO(String(t)).toFormat(r)),i(t)&&(l=h.value)):s()}return l=void 0!==l?l:"",r&&(a?(n=a.isDateTime(l)?l:"iso"===r?a.fromISO(String(l)):a.fromFormat(String(l),r),l=n.toFormat("yyyy-MM-dd")+"T"+n.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js")),h.value=l,t((function(){h.focus({preventScroll:!0}),h.style.height="100%",o.selectContents&&h.select()})),h.addEventListener("change",d),h.addEventListener("blur",d),h.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:s();break;case 35:case 36:e.stopPropagation()}})),h},select:function(e,t,i,s,o){return this.deprecationMsg("The select editor has been deprecated, please use the new list editor"),new M(this,e,t,i,s,o).input},list:function(e,t,i,s,o){return new M(this,e,t,i,s,o).input},autocomplete:function(e,t,i,s,o){return this.deprecationMsg("The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam"),o.autocomplete=!0,new M(this,e,t,i,s,o).input},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 p(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 m(e){var t=document.createElement("span"),s=u.cloneNode(!0);d.push(s),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(),i(e),r.blur()})),t.appendChild(s),c.appendChild(t)}function g(e){a=e,p(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++)m(b);return p(a=Math.min(parseInt(a),l)),c.addEventListener("mousemove",(function(e){p(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"),p=document.createElement("div");function m(){var e=window.getComputedStyle(a,null),t=d*Math.round(p.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"),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%",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let e in o.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),p.setAttribute(e,p.getAttribute(e)+o.elementAttributes["+"+e])):p.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),p.style.width=c+"%",a.setAttribute("aria-valuemin",h),a.setAttribute("aria-valuemax",l),p.appendChild(u),u.addEventListener("mousedown",(function(e){n=e.screenX,r=p.offsetWidth})),u.addEventListener("mouseover",(function(){u.style.cursor="ew-resize"})),a.addEventListener("mousemove",(function(e){n&&(p.style.width=r+e.screenX-n+"px")})),a.addEventListener("mouseup",(function(e){n&&(e.stopPropagation(),e.stopImmediatePropagation(),n=!1,r=!1,m())})),a.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:e.preventDefault(),p.style.width=p.clientWidth+a.clientWidth/100+"px";break;case 37:e.preventDefault(),p.style.width=p.clientWidth-a.clientWidth/100+"px";break;case 9:case 13:m();break;case 27:s()}})),a.addEventListener("blur",(function(){s()})),p},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,d=Object.keys(o).includes("trueValue"),c=Object.keys(o).includes("falseValue");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 u(e){var t=r.checked;return d&&t?t=o.trueValue:c&&!t&&(t=o.falseValue),a?e?h?l:t:r.checked&&!h?(r.checked=!1,r.indeterminate=!0,h=!0,l):(h=!1,t):t}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=d?n===o.trueValue:!0===n||"true"===n||"True"===n||1===n,t((function(){r.focus()})),r.addEventListener("change",(function(e){i(u())})),r.addEventListener("blur",(function(e){i(u(!0))})),r.addEventListener("keydown",(function(e){13==e.keyCode&&i(u()),27==e.keyCode&&s()})),r}};class L extends s{constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.editors=L.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("cell-value-changed",this.updateCellClass.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("row-layout",this.rowEditableCheck.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 ")}updateCellClass(e){this.allowEdit(e)?e.getElement().classList.add("tabulator-editable"):e.getElement().classList.remove("tabulator-editable")}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.findPrevEditableCell(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,i){var s=!1;if(i0)for(var o=i-1;o>=0;o--){let i=e.cells[o];if(i.column.modules.edit&&t.elVisible(i.getElement())){if(this.allowEdit(i)){s=i;break}}}return s}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()}rowEditableCheck(e){e.getCells().forEach((e=>{e.column.modules.edit&&"function"==typeof e.column.modules.edit.check&&this.updateCellClass(e)}))}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(),this.dispatch("edit-editor-clear",i,e),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);i.row.getElement().classList.remove("tabulator-editing"),i.table.element.classList.remove("tabulator-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);this.updateCellClass(e),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.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();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)}}allowEdit(e){var t=!!e.column.modules.edit;if(e.column.modules.edit)switch(typeof e.column.modules.edit.check){case"function":e.row.initialized&&(t=e.column.modules.edit.check(e.getComponent()));break;case"string":t=!!e.row.data[e.column.modules.edit.check];break;case"boolean":t=e.column.modules.edit.check}return t}edit(e,t,i){var s,o,n,r=this,a=function(){},l=e.getElement();if(!this.currentCell){if(e.column.modules.edit.blocked)return this.mouseClick=!1,l.blur(),!1;if(t&&t.stopPropagation(),this.allowEdit(e)||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){a=e}),(function(t){if(r.currentCell===e){var i=r.chain("edit-success",[e,t],!0,!0);return!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):(r.invalidEdit=!0,r.focusCellNoEvent(e,!0),a(),!1)}}),(function(){r.currentCell===e&&r.cancelEdit()}),n)))return l.blur(),!1;if(!(s instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",s),l.blur(),!1;for(l.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-editing"),e.table.element.classList.add("tabulator-editing");l.firstChild;)l.removeChild(l.firstChild);l.appendChild(s),a();for(var h=l.children,d=0;d{e.push(t.getComponent())})),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,this.dispatch("edit-edited-clear",e)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)}}L.moduleName="edit",L.editors=k;class D{constructor(e,t,i,s){this.type=e,this.columns=t,this.component=i||!1,this.indent=s||0}}class S{constructor(e,t,i,s,o){this.value=e,this.component=t||!1,this.width=i,this.height=s,this.depth=o}}class P extends s{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)}generateTable(e,t,i,s){var o=this.generateExportList(e,t,i,s);return this.generateTableElement(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;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){var t=e.definition[this.colVisProp];return"function"==typeof t&&(t=t.call(this.table,e.getComponent())),!1!==t&&(e.visible||!e.visible&&t)}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 S(i,e.column.getComponent(),e.width,e.height,e.depth))}else t.push(null)})),s.push(new D("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 S(e.key,e.getComponent(),t.length,1));break;case"calc":case"row":t.forEach((e=>{n.push(new S(e._column.getFieldValue(o),e,1,1))})),this.table.options.dataTree&&!1!==this.config.dataTree&&(r=e.modules.dataTree.index)}i.push(new D(e.type,n,e.getComponent(),r))})),i}generateTableElement(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)=>{let n;switch(e.type){case"header":i.appendChild(this.generateHeaderElement(e,r,o));break;case"group":s.appendChild(this.generateGroupElement(e,r,o));break;case"calc":s.appendChild(this.generateCalcElement(e,r,o));break;case"row":n=this.generateRowElement(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}generateHeaderElement(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}generateGroupElement(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=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}generateCalcElement(e,t,i){var s=this.generateRowElement(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}generateRowElement(e,t,i){var s=document.createElement("tr");return s.classList.add("tabulator-print-table-row"),e.columns.forEach(((o,n)=>{if(o){var r,a=document.createElement("td"),l=o.component._column,h=this.table.columnManager.findColumnIndex(l),d=o.value,c={modules:{},getValue:function(){return d},getField:function(){return l.definition.field},getElement:function(){return a},getColumn:function(){return l.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getComponent:function(){return c},column:l};if((l.definition.cssClass?l.definition.cssClass.split(" "):[]).forEach((function(e){a.classList.add(e)})),this.table.modExists("format")&&!1!==this.config.formatCells)d=this.table.modules.format.formatExportValue(c,this.colVisProp);else switch(typeof d){case"object":d=null!==d?JSON.stringify(d):"";break;case"undefined":d=""}d instanceof Node?a.appendChild(d):a.innerHTML=d,(r=i.styleCells&&i.styleCells[h]?i.styleCells[h]:i.firstCell)&&(this.mapElementStyles(r,a,["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"]),l.definition.align&&(a.style.textAlign=l.definition.align)),this.table.options.dataTree&&!1!==this.config.dataTree&&(t.treeElementField&&t.treeElementField==l.field||!t.treeElementField&&0==n)&&(e.component._row.modules.dataTree.controlEl&&a.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),a.firstChild),e.component._row.modules.dataTree.branchEl&&a.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),a.firstChild)),s.appendChild(a),c.modules.format&&c.modules.format.renderedCallback&&c.modules.format.renderedCallback(),t.rowFormatter&&!1!==this.config.formatCells&&t.rowFormatter(e.component)}})),s}generateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.generateTableElement(e)),t.innerHTML}getHtml(e,t,i,s){var o=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,s||"htmlOutput");return this.generateHTMLTable(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)}))}}}}P.moduleName="export";var z={"=":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 s{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)if("partial"===n)o=function(i){var s=e.getFieldValue(i);return null!=s&&String(s).toLowerCase().indexOf(String(t).toLowerCase())>-1},r="like";else o=function(i){return e.getFieldValue(i)==t},r="=";i.headerFilters[s]={value:t,func:o,type:r}}e.modules.filter.value=t,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.value=t,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},(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()},getTable:()=>this.table,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);d.langBind("headerFilters|columns|"+e.definition.field,(function(e){n.setAttribute("placeholder",void 0!==e&&e?e:d.langText("headerFilters|default"))})),n.addEventListener("click",(function(e){e.stopPropagation(),n.focus()})),n.addEventListener("focus",(e=>{var t=this.table.columnManager.contentsElement.scrollLeft;t!==this.table.rowManager.element.scrollLeft&&(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.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(null,!1,!1):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(!0)),"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(!0),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=z;var H={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||"",p=!!t.symbolAfter,m=void 0!==t.precision?t.precision:2;if(isNaN(a))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));if(a<0&&(a=Math.abs(a),l=c),s=!1!==m?a.toFixed(m):a,o=(s=String(s).split("."))[0],n=s.length>1?h+s[1]:"",!1!==t.thousand)for(r=/(\d+)(\d{3})/;r.test(o);)o=o.replace(r,"$1"+d+"$2");return p?l+o+n+u:l+u+o+n},link:function(e,t,i){var s,o=e.getValue(),n=t.urlPrefix||"",r=t.download,a=o,l=document.createElement("a");if(t.labelField&&(s=e.getData(),a=function e(t,i){var s=i[t.shift()];return t.length&&"object"==typeof s?e(t,s):s}(t.labelField.split(this.table.options.nestedFieldSeparator),s)),t.label)switch(typeof t.label){case"string":a=t.label;break;case"function":a=t.label(e)}if(a){if(t.urlField&&(o=(s=e.getData())[t.urlField]),t.url)switch(typeof t.url){case"string":o=t.url;break;case"function":o=t.url(e)}return l.setAttribute("href",n+o),t.target&&l.setAttribute("target",t.target),t.download&&(r="function"==typeof r?r(e):!0===r?"":r,l.setAttribute("download",r)),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(a)),l}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=Object.keys(t).includes("trueValue"),l=void 0!==t.tickElement?t.tickElement:'',h=void 0!==t.crossElement?t.crossElement:'';return a&&s===t.trueValue||!a&&(r&&s||!0===s||"true"===s||"True"===s||1===s||"1"===s)?(o.setAttribute("aria-checked",!0),l||""):!n||"null"!==s&&""!==s&&null!=s?(o.setAttribute("aria-checked",!1),h||""):(o.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,i){var s,o=window.DateTime||luxon.DateTime,n=t.inputFormat||"yyyy-MM-dd HH:mm:ss",r=t.outputFormat||"dd/MM/yyyy HH:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",l=e.getValue();if(void 0!==o)return(s=o.isDateTime(l)?l:"iso"===n?o.fromISO(String(l)):o.fromFormat(String(l),n)).isValid?(t.timezone&&(s=s.setZone(t.timezone)),s.toFormat(r)):!0!==a&&l?"function"==typeof a?a(l):a:l;console.error("Format Error - 'datetime' formatter is dependant on luxon.js")},datetimediff:function(e,t,i){var s,o=window.DateTime||luxon.DateTime,n=t.inputFormat||"yyyy-MM-dd HH:mm:ss",r=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",a=void 0!==t.suffix&&t.suffix,l=void 0!==t.unit?t.unit:"days",h=void 0!==t.humanize&&t.humanize,d=void 0!==t.date?t.date:o.now(),c=e.getValue();if(void 0!==o)return(s=o.isDateTime(c)?c:"iso"===n?o.fromISO(String(c)):o.fromFormat(String(c),n)).isValid?h?s.diff(d,l).toHuman()+(a?" "+a:""):parseInt(s.diff(d,l)[l])+(a?" "+a:""):!0===r?c:"function"==typeof r?r(c):r;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.max?t.max:100,c=t.min?t.min:0,u=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)){let e=100/t.color.length,i=Math.floor(o/e);i=Math.min(i,t.color.length-1),i=Math.max(i,0),n=t.color[i];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)){let e=100/t.legendColor.length,i=Math.floor(o/e);i=Math.min(i,t.legendColor.length-1),i=Math.max(i,0),a=t.legendColor[i]}break;default:a="#000"}h.style.minWidth="30px",h.style.position="relative",h.setAttribute("aria-label",o);var m=document.createElement("div");m.style.display="inline-block",m.style.width=o+"%",m.style.backgroundColor=n,m.style.height="100%",m.setAttribute("data-max",d),m.setAttribute("data-min",c);var g=document.createElement("div");if(g.style.position="relative",g.style.width="100%",g.style.height="100%",r){var b=document.createElement("div");b.style.position="absolute",b.style.top=0,b.style.left=0,b.style.textAlign=u,b.style.width="100%",b.style.color=a,b.innerHTML=r}return i((function(){if(!(e instanceof p)){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(g),g.appendChild(m),r&&g.appendChild(b)})),""},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){var s=document.createElement("span");return e.getRow().watchPosition((e=>{s.innerText=e})),s},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='\n \n \n\n\n\n \n',e.getElement().classList.add("tabulator-row-handle"),s.addEventListener("click",(function(t){t.stopImmediatePropagation(),n(!o.open),e.getTable().rowManager.adjustTableSize()})),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 v?(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 O extends s{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":O.formatters[s]?i.formatter=O.formatters[s]:(console.warn("Formatter Error - No such formatter found: ",s),i.formatter=O.formatters.plaintext);break;case"function":i.formatter=s;break;default:i.formatter=O.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},getColumn:function(){return e.getComponent()},getTable:()=>this.table},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){function o(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}return i="function"==typeof s.params?s.params(e.getComponent()):s.params,s.formatter.call(this,e.getComponent(),i,o)}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":O.formatters[e]?e=O.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=O.formatters.plaintext);break;case"function":break;default:e=O.formatters.plaintext}return e}}O.moduleName="format",O.formatters=H;class A extends s{constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.initializationMode="left",this.active=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1}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("columns-loading",this.reset.bind(this)),this.subscribe("column-add",this.reinitializeColumns.bind(this)),this.subscribe("column-delete",this.reinitializeColumns.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)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}reinitializeColumns(){this.reset(),this.table.columnManager.columnsByIndex.forEach((e=>{this.initializeColumn(e)}))}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}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)}))}layoutColumnPosition(e){var t=[],i=0,s=0;this.leftColumns.forEach(((s,o)=>{if(s.modules.frozen.marginValue=i,s.modules.frozen.margin=s.modules.frozen.marginValue+"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.modules.frozen.marginValue=s,t.modules.frozen.margin=t.modules.frozen.marginValue+"px",t.visible&&(s+=t.getWidth()),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.layoutColumnPosition(),this.reinitializeRows(),this.layoutCalcRows())}reinitializeRows(){var e=this.table.rowManager.getVisibleRows(!0);this.table.rowManager.getRows().filter((t=>!e.includes(t))).forEach((e=>{e.deinitialize()})),e.forEach((e=>{"row"===e.type&&this.layoutRow(e)}))}layoutRow(e){"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){var i;t.modules.frozen&&(e.style.position="sticky",i=this.table.rtl?"left"===t.modules.frozen.position?"right":"left":t.modules.frozen.position,e.style[i]=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))}adjustForScrollbar(e){this.rightColumns.length&&(this.table.columnManager.getContentsElement().style.width="calc(100% - "+e+"px)")}_calcSpace(e,t){var i=0;for(let s=0;s{this.initializeRow(e)}))}initializeRow(e){var t=this.table.options.frozenRows,i=typeof t;"number"===i?e.getPosition()&&e.getPosition()+this.rows.length<=t&&this.freezeRow(e):"function"===i?t.call(this.table,e.getComponent())&&this.freezeRow(e):Array.isArray(t)&&t.includes(e.data[this.options("frozenRowsField")])&&this.freezeRow(e)}isRowFrozen(e){return this.rows.indexOf(e)>-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.rows.push(e),this.refreshData(!1,"display"),this.table.rowManager.adjustTableSize(),this.styleRows())}unfreezeRow(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)}))}}_.moduleName="frozenRows";class B{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 I{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 I(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(){var e=[];return e.push(this),this._visSet(),this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.visible?this.groupList.length?this.groupList.forEach((function(t){e=e.concat(t.getHeadersAndRows())})):("table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))),e}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,"basic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination||(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.updateGroupRows(!0),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,"basic"!=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.updateGroupRows(!0)}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))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])}else this.groupList=[],this.groups={}}rowSample(e,t){if(this.table.options.groupBy){var i=this.getGroups(!1)[0];t.push(i.getRows(!1)[0])}return t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();if(!this.table.options.groupBy)return t;t=t.filter((e=>"group"!==e.type)),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px"}rowAddingIndex(e,t,i){if(this.table.options.groupBy){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.initialize(),this.configureGroupSetup(),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){if(this.table.options.groupBy){!i&&t instanceof I&&(t=this.table.rowManager.prevDisplayRow(e)||t);var s=t instanceof I?t:t.modules.group,o=e instanceof I?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){this.table.options.groupBy&&e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.table.options.groupBy&&this.updateGroupRows(!0)}cellUpdated(e){this.table.options.groupBy&&this.reassignRowToGroup(e.row)}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.table.options.groupBy&&(this.groupList.forEach((function(e){e.wipe()})),this.groupList=[],this.groups={})}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.options("dataTree")&&(e=this.table.modules.dataTree.getTreeParentRoot(e)),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)})),Object.values(t).forEach((e=>{e.wipe()}))}createGroup(e,t,i){var s,o=t+"_"+e;i=i||[],s=new I(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){this.table.options.groupBy&&("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))}checkBasicModeGroupHeaderWidth(){var e=this.table.rowManager.tableElement,t=!0;this.table.rowManager.getDisplayRows().forEach(((i,s)=>{this.table.rowManager.styleRow(i,s),e.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(t=!1)})),e.style.minWidth=t?this.table.columnManager.getWidth()+"px":""}}V.moduleName="groupRows";class N extends s{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:e.getPosition(),posTo:t.getPosition(),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()._getSelf().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 w)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 W extends s{constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&"TABLE"===this.table.originalElement.tagName&&(this.table.originalElement.childNodes.length?this.parseTable():console.warn("Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element."))}parseTable(){var e=this.table.originalElement,t=this.table.options,i=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?G.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;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)}}G.moduleName="import",G.importers=j;class U extends s{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",rowMouseDown:"row-mousedown",rowMouseUp:"row-mouseup",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",cellMouseDown:"cell-mousedown",cellMouseUp:"cell-mouseup",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",headerMouseDown:"column-mousedown",headerMouseUp:"column-mouseup",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",groupMouseDown:"group-mousedown",groupMouseUp:"group-mouseup",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("headerMouseDown"),this.registerColumnOption("headerMouseUp"),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("cellMouseDown"),this.registerColumnOption("cellMouseUp"),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){var i;if(!this.table.modExists("edit")||this.table.modules.edit.currentCell!==t){e.preventDefault();try{document.selection?((i=document.body.createTextRange()).moveToElementText(t.getElement()),i.select()):window.getSelection&&((i=document.createRange()).selectNode(t.getElement()),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 f&&(s=i.definition[e]),s&&s(t,o)),this.dispatchExternal(e,t,o)}}U.moduleName="interaction";class X extends s{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,X.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)X.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:X.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)}}X.moduleName="keybindings",X.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"]},X.actions={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,i=t.scrollTop-t.element.clientHeight;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 q extends s{constructor(e){super(e),this.menuContainer=null,this.nestedMenuBlock=!1,this.currentComponent=null,this.rootPopup=null,this.columnSubscribers={},this.registerTableOption("menuContainer",void 0),this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("rowDblClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("groupDblClickMenu",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerDblClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("headerMenuIcon"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu"),this.registerColumnOption("dblClickMenu")}initialize(){this.deprecatedOptionsCheck(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("menuContainer","popupContainer")||(this.table.options.popupContainer=this.table.options.menuContainer)}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)),this.table.options.rowDblClickMenu&&this.subscribe("row-dblclick",this.loadMenuEvent.bind(this,this.table.options.rowDblClickMenu))}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)),this.table.options.groupDblClickMenu&&this.subscribe("group-dblclick",this.loadMenuEvent.bind(this,this.table.options.groupDblClickMenu))}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.headerDblClickMenu&&!this.columnSubscribers.headerDblClickMenu&&(this.columnSubscribers.headerDblClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerDblClickMenu"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickMenu)),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)),t.dblClickMenu&&!this.columnSubscribers.dblClickMenu&&(this.columnSubscribers.dblClickMenu=this.loadMenuTableCellEvent.bind(this,"dblClickMenu"),this.subscribe("cell-dblclick",this.columnSubscribers.dblClickMenu))}initializeColumnHeaderMenu(e){var t,i=e.definition.headerMenuIcon;(t=document.createElement("span")).classList.add("tabulator-header-popup-button"),i?("function"==typeof i&&(i=i(e.getComponent())),i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i):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,t,i.getComponent()):e,this.loadMenu(t,i,e)}loadMenu(e,t,i,s,o){var n,r=!(e instanceof MouseEvent),a=document.createElement("div");if(a.classList.add("tabulator-menu"),r||e.preventDefault(),i&&i.length){if(s)n=o.child(a);else{if(this.nestedMenuBlock){if(this.rootPopup)return}else this.nestedMenuBlock=setTimeout((()=>{this.nestedMenuBlock=!1}),100);this.rootPopup&&this.rootPopup.hide(),this.rootPopup=n=this.popup(a)}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.loadMenu(s,t,e.menu,i,n)})):e.action&&i.addEventListener("click",(i=>{e.action(i,t.getComponent())})),e.menu&&e.menu.length&&i.classList.add("tabulator-menu-item-submenu")),a.appendChild(i)})),a.addEventListener("click",(e=>{this.rootPopup&&this.rootPopup.hide()})),n.show(s||e),n===this.rootPopup&&(this.rootPopup.hideOnBlur((()=>{this.rootPopup=null,this.currentComponent&&(this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)})),this.currentComponent=t,this.dispatchExternal("menuOpened",t.getComponent()))}}}q.moduleName="menu";class K extends s{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 i,s=this,o={};e.modules.frozen||e.isGroup||(i=e.getElement(),o.mousemove=function(o){e.parent===s.moving.parent&&((s.touchMove?o.touches[0].pageX:o.pageX)-t.elOffset(i).left+s.table.columnManager.element.scrollLeft>e.getWidth()/2?s.toCol===e&&s.toColAfter||(i.parentNode.insertBefore(s.placeholderElement,i.nextSibling),s.moveColumn(e,!0)):(s.toCol!==e||s.toColAfter)&&(i.parentNode.insertBefore(s.placeholderElement,i),s.moveColumn(e,!1)))}.bind(s),i.addEventListener("mousedown",(function(t){s.touchMove=!1,1===t.which&&(s.checkTimeout=setTimeout((function(){s.startMove(t,e)}),s.checkPeriod))})),i.addEventListener("mouseup",(function(e){1===e.which&&s.checkTimeout&&clearTimeout(s.checkTimeout)})),s.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,i){var s=i.getElement(),o=this.table.columnManager.getContentsElement(),n=this.table.columnManager.getHeadersElement();this.moving=i,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-t.elOffset(s).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=i.getWidth()+"px",this.placeholderElement.style.height=i.getHeight()+"px",s.parentNode.insertBefore(this.placeholderElement,s),s.parentNode.removeChild(s),this.hoverElement=s.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),o.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 i,s=this.table.columnManager.getContentsElement(),o=s.scrollLeft,n=(this.touchMove?e.touches[0].pageX:e.pageX)-t.elOffset(s).left+o;this.hoverElement.style.left=n-this.startX+"px",n-o{i=Math.max(0,o-5),this.table.rowManager.getElement().scrollLeft=i,this.autoScrollTimeout=!1}),1))),o+s.clientWidth-n{i=Math.min(s.clientWidth,o+5),this.table.rowManager.getElement().scrollLeft=i,this.autoScrollTimeout=!1}),1)))}}K.moduleName="moveColumn";class J extends s{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 i=this,s={};s.mouseup=function(t){i.tableRowDrop(t,e)}.bind(i),s.mousemove=function(s){var o;s.pageY-t.elOffset(e.element).top+i.table.rowManager.element.scrollTop>e.getHeight()/2?i.toRow===e&&i.toRowAfter||((o=e.getElement()).parentNode.insertBefore(i.placeholderElement,o.nextSibling),i.moveRow(e,!0)):(i.toRow!==e||i.toRowAfter)&&(o=e.getElement()).previousSibling&&(o.parentNode.insertBefore(i.placeholderElement,o),i.moveRow(e,!1))}.bind(i),e.modules.moveRow=s}initializeRow(e){var i,s=this,o={};o.mouseup=function(t){s.tableRowDrop(t,e)}.bind(s),o.mousemove=function(i){var o=e.getElement();i.pageY-t.elOffset(o).top+s.table.rowManager.element.scrollTop>e.getHeight()/2?s.toRow===e&&s.toRowAfter||(o.parentNode.insertBefore(s.placeholderElement,o.nextSibling),s.moveRow(e,!0)):(s.toRow!==e||s.toRowAfter)&&(o.parentNode.insertBefore(s.placeholderElement,o),s.moveRow(e,!1))}.bind(s),this.hasHandle||((i=e.getElement()).addEventListener("mousedown",(function(t){1===t.which&&(s.checkTimeout=setTimeout((function(){s.startMove(t,e)}),s.checkPeriod))})),i.addEventListener("mouseup",(function(e){1===e.which&&s.checkTimeout&&clearTimeout(s.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=Math.min(s-this.startY,this.table.rowManager.element.scrollHeight-this.hoverElement.offsetHeight)+"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?this.moving.getComponent():void 0,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)}}}J.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)}},J.prototype.senders={delete:function(e,t,i){e.delete()}},J.moduleName="moveRow";class Y extends s{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"),this.registerColumnOption("mutateLink")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("cell-value-changed",this.mutateLink.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":Y.mutators[e]?t=Y.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}mutateLink(e){var t=e.column.definition.mutateLink;t&&(Array.isArray(t)||(t=[t]),t.forEach((t=>{var i=e.row.getCell(t);i&&i.setValue(i.getValue(),!0,!0)})))}enable(){this.enabled=!0}disable(){this.enabled=!1}}Y.moduleName="mutator",Y.mutators={};var $={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 Z extends s{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.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)),this.subscribe("footer-redraw",this.footerRedraw.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:Z.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||(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.footerAppend(this.pageCounterElement)),this.footerAppend(this.element)),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")}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,this.trackChanges())}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.displayRows(-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.dispatchExternal("pageSizeChanged",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":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"))}}Z.moduleName="page",Z.pageCounters=$;var Q={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)}},ee={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 te extends s{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:te.readers[this.table.options.persistenceReaderFunc]?this.readFunc=te.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):te.readers[this.mode]?this.readFunc=te.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:te.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=te.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):te.writers[this.mode]?this.writeFunc=te.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.retrieveData("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.retrieveData("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("column-width",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.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:e=>{s=e,this.defWatcherBlock||this.save("columns"),i.set&&i.set(e)},get:()=>(i.get&&i.get(),s)})})),this.defWatcherBlock=!1)}load(e,t){var i=this.retrieveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}retrieveData(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.push("visible")):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}}te.moduleName="persistence",te.moduleInitOrder=-10,te.readers=Q,te.writers=ee;class ie extends s{constructor(e){super(e),this.columnSubscribers={},this.registerTableOption("rowContextPopup",!1),this.registerTableOption("rowClickPopup",!1),this.registerTableOption("rowDblClickPopup",!1),this.registerTableOption("groupContextPopup",!1),this.registerTableOption("groupClickPopup",!1),this.registerTableOption("groupDblClickPopup",!1),this.registerColumnOption("headerContextPopup"),this.registerColumnOption("headerClickPopup"),this.registerColumnOption("headerDblClickPopup"),this.registerColumnOption("headerPopup"),this.registerColumnOption("headerPopupIcon"),this.registerColumnOption("contextPopup"),this.registerColumnOption("clickPopup"),this.registerColumnOption("dblClickPopup"),this.registerComponentFunction("cell","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("column","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("row","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("group","popup",this._componentPopupCall.bind(this))}initialize(){this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}_componentPopupCall(e,t,i){this.loadPopupEvent(t,null,e,i)}initializeRowWatchers(){this.table.options.rowContextPopup&&(this.subscribe("row-contextmenu",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup)),this.table.on("rowTapHold",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup))),this.table.options.rowClickPopup&&this.subscribe("row-click",this.loadPopupEvent.bind(this,this.table.options.rowClickPopup)),this.table.options.rowDblClickPopup&&this.subscribe("row-dblclick",this.loadPopupEvent.bind(this,this.table.options.rowDblClickPopup))}initializeGroupWatchers(){this.table.options.groupContextPopup&&(this.subscribe("group-contextmenu",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup)),this.table.on("groupTapHold",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup))),this.table.options.groupClickPopup&&this.subscribe("group-click",this.loadPopupEvent.bind(this,this.table.options.groupClickPopup)),this.table.options.groupDblClickPopup&&this.subscribe("group-dblclick",this.loadPopupEvent.bind(this,this.table.options.groupDblClickPopup))}initializeColumn(e){var t=e.definition;t.headerContextPopup&&!this.columnSubscribers.headerContextPopup&&(this.columnSubscribers.headerContextPopup=this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextPopup),this.table.on("headerTapHold",this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"))),t.headerClickPopup&&!this.columnSubscribers.headerClickPopup&&(this.columnSubscribers.headerClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerClickPopup"),this.subscribe("column-click",this.columnSubscribers.headerClickPopup)),t.headerDblClickPopup&&!this.columnSubscribers.headerDblClickPopup&&(this.columnSubscribers.headerDblClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerDblClickPopup"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickPopup)),t.headerPopup&&this.initializeColumnHeaderPopup(e),t.contextPopup&&!this.columnSubscribers.contextPopup&&(this.columnSubscribers.contextPopup=this.loadPopupTableCellEvent.bind(this,"contextPopup"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextPopup),this.table.on("cellTapHold",this.loadPopupTableCellEvent.bind(this,"contextPopup"))),t.clickPopup&&!this.columnSubscribers.clickPopup&&(this.columnSubscribers.clickPopup=this.loadPopupTableCellEvent.bind(this,"clickPopup"),this.subscribe("cell-click",this.columnSubscribers.clickPopup)),t.dblClickPopup&&!this.columnSubscribers.dblClickPopup&&(this.columnSubscribers.dblClickPopup=this.loadPopupTableCellEvent.bind(this,"dblClickPopup"),this.subscribe("cell-click",this.columnSubscribers.dblClickPopup))}initializeColumnHeaderPopup(e){var t,i=e.definition.headerPopupIcon;(t=document.createElement("span")).classList.add("tabulator-header-popup-button"),i?("function"==typeof i&&(i=i(e.getComponent())),i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i):t.innerHTML="⋮",t.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),this.loadPopupEvent(e.definition.headerPopup,t,e)})),e.titleElement.insertBefore(t,e.titleElement.firstChild)}loadPopupTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadPopupEvent(i.column.definition[e],t,i)}loadPopupTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadPopupEvent(i.definition[e],t,i)}loadPopupEvent(e,t,i,s){var o;i._group?i=i._group:i._row&&(i=i._row),e="function"==typeof e?e.call(this.table,t,i.getComponent(),(function(e){o=e})):e,this.loadPopup(t,i,e,o,s)}loadPopup(e,t,i,s,o){var n,r,a=!(e instanceof MouseEvent);i instanceof HTMLElement?n=i:(n=document.createElement("div")).innerHTML=i,n.classList.add("tabulator-popup"),n.addEventListener("click",(e=>{e.stopPropagation()})),a||e.preventDefault(),r=this.popup(n),"function"==typeof s&&r.renderCallback(s),e?r.show(e):r.show(t.getElement(),o||"center"),r.hideOnBlur((()=>{this.dispatchExternal("popupClosed",t.getComponent())})),this.dispatchExternal("popupOpened",t.getComponent())}}ie.moduleName="popup";class se extends s{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.generateTable(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.generateTable(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}}se.moduleName="print";class oe extends s{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,"cellsave")),this.subscribe("cell-value-save-after",this.unblock.bind(this,"cellsave")),this.subscribe("row-data-save-before",this.block.bind(this,"rowsave")),this.subscribe("row-data-save-after",this.unblock.bind(this,"rowsave")),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,o=Array.from(arguments);return i.blocked||t!==i.currentVersion||(i.block("data-push"),o.forEach((e=>{i.table.rowManager.addRowActual(e,!1)})),s=i.origFuncs.push.apply(e,arguments),i.unblock("data-push")),s}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var s,o=Array.from(arguments);return i.blocked||t!==i.currentVersion||(i.block("data-unshift"),o.forEach((e=>{i.table.rowManager.addRowActual(e,!0)})),s=i.origFuncs.unshift.apply(e,arguments),i.unblock("data-unshift")),s}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var s,o;return i.blocked||t!==i.currentVersion||(i.block("data-shift"),i.data.length&&(s=i.table.rowManager.getRowFromDataObject(i.data[0]))&&s.deleteActual(),o=i.origFuncs.shift.call(e),i.unblock("data-shift")),o}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var s,o;return i.blocked||t!==i.currentVersion||(i.block("data-pop"),i.data.length&&(s=i.table.rowManager.getRowFromDataObject(i.data[i.data.length-1]))&&s.deleteActual(),o=i.origFuncs.pop.call(e),i.unblock("data-pop")),o}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var s,o,n=Array.from(arguments),r=n[0]<0?e.length+n[0]:n[0],a=n[1],l=!!n[2]&&n.slice(2);if(!i.blocked&&t===i.currentVersion){if(i.block("data-splice"),l&&((s=!!e[r]&&i.table.rowManager.getRowFromDataObject(e[r]))?l.forEach((e=>{i.table.rowManager.addRowActual(e,!0,s,!0)})):(l=l.slice().reverse()).forEach((e=>{i.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==a){var h=e.slice(r,void 0===n[1]?n[1]:r+a);h.forEach(((e,t)=>{var s=i.table.rowManager.getRowFromDataObject(e);s&&s.deleteActual(t!==h.length-1)}))}(l||0!==a)&&i.table.rowManager.reRenderInPosition(),o=i.origFuncs.splice.apply(e,arguments),i.unblock("data-splice")}return o}})}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 t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e)}watchTreeChildren(e){var t=this,i=e.getData()[this.table.options.dataTreeChildField],s={};i&&(s.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-push");var o=s.push.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-push")}return o}}),s.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-unshift");var o=s.unshift.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-unshift")}return o}}),s.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-shift");var o=s.shift.call(i);this.rebuildTree(e),t.unblock("tree-shift")}return o}}),s.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-pop");var o=s.pop.call(i);this.rebuildTree(e),t.unblock("tree-pop")}return o}}),s.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-splice");var o=s.splice.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-splice")}return o}}))}rebuildTree(e){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}watchKey(e,t,i){var s=this,o=Object.getOwnPropertyDescriptor(t,i),n=t[i],r=this.currentVersion;Object.defineProperty(t,i,{set:t=>{if(n=t,!s.blocked&&r===s.currentVersion){s.block("key");var a={};a[i]=t,e.updateData(a),s.unblock("key")}o.set&&o.set(t)},get:()=>(o.get&&o.get(),n)})}unwatchRow(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}block(e){this.blocked||(this.blocked=e)}unblock(e){this.blocked===e&&(this.blocked=!1)}}oe.moduleName="reactiveData";class ne extends s{constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.latestX=!1,this.handle=null,this.initialNextColumn=null,this.nextColumn=null,this.initialized=!1,this.registerColumnOption("resizable",!0),this.registerTableOption("resizableColumnFit",!1)}initialize(){this.subscribe("column-rendered",this.layoutColumnHeader.bind(this))}initializeEventWatchers(){this.initialized||(this.subscribe("cell-rendered",this.layoutCellHandles.bind(this)),this.subscribe("cell-delete",this.deInitializeComponent.bind(this)),this.subscribe("cell-height",this.resizeHandle.bind(this)),this.subscribe("column-moved",this.columnLayoutUpdated.bind(this)),this.subscribe("column-hide",this.deInitializeColumn.bind(this)),this.subscribe("column-show",this.columnLayoutUpdated.bind(this)),this.subscribe("column-width",this.columnWidthUpdated.bind(this)),this.subscribe("column-delete",this.deInitializeComponent.bind(this)),this.subscribe("column-height",this.resizeHandle.bind(this)),this.initialized=!0)}layoutCellHandles(e){"row"===e.row.type&&(this.deInitializeComponent(e),this.initializeColumn("cell",e,e.column,e.element))}layoutColumnHeader(e){e.definition.resizable&&(this.initializeEventWatchers(),this.deInitializeComponent(e),this.initializeColumn("header",e,e,e.element))}columnLayoutUpdated(e){var t=e.prevColumn();this.reinitializeColumn(e),t&&this.reinitializeColumn(t)}columnWidthUpdated(e){e.modules.frozen&&(this.table.modules.frozenColumns.leftColumns.includes(e)?this.table.modules.frozenColumns.leftColumns.forEach((e=>{this.reinitializeColumn(e)})):this.table.modules.frozenColumns.rightColumns.includes(e)&&this.table.modules.frozenColumns.rightColumns.forEach((e=>{this.reinitializeColumn(e)})))}frozenColumnOffset(e){var t=!1;return e.modules.frozen&&(t=e.modules.frozen.marginValue,"left"===e.modules.frozen.position?t+=e.getWidth()-3:t&&(t-=3)),!1!==t&&t+"px"}reinitializeColumn(e){var t=this.frozenColumnOffset(e);e.cells.forEach((i=>{i.modules.resize&&i.modules.resize.handleEl&&(t&&(i.modules.resize.handleEl.style[e.modules.frozen.position]=t),i.element.after(i.modules.resize.handleEl))})),e.modules.resize&&e.modules.resize.handleEl&&(t&&(e.modules.resize.handleEl.style[e.modules.frozen.position]=t),e.element.after(e.modules.resize.handleEl))}initializeColumn(e,t,i,s){var o=this,n=i.definition.resizable,r={},a=i.getLastColumn();if("header"===e&&(r={variableHeight:"textarea"==i.definition.formatter||i.definition.variableHeight}),(!0===n||n==e)&&this._checkResizability(a)){var l=document.createElement("span");l.className="tabulator-col-resize-handle",l.addEventListener("click",(function(e){e.stopPropagation()}));var h=function(e){o.startColumn=i,o.initialNextColumn=o.nextColumn=a.nextColumn(),o._mouseDown(e,a,l)};l.addEventListener("mousedown",h),l.addEventListener("touchstart",h,{passive:!0}),l.addEventListener("dblclick",(e=>{var t=a.getWidth();e.stopPropagation(),a.reinitializeWidth(!0),t!==a.getWidth()&&(o.dispatch("column-resized",a),o.table.externalEvents.dispatch("columnResized",a.getComponent()))})),i.modules.frozen&&(l.style.position="sticky",l.style[i.modules.frozen.position]=this.frozenColumnOffset(i)),r.handleEl=l,s.parentNode&&i.visible&&s.after(l)}t.modules.resize=r}deInitializeColumn(e){this.deInitializeComponent(e),e.cells.forEach((e=>{this.deInitializeComponent(e)}))}deInitializeComponent(e){var t;e.modules.resize&&(t=e.modules.resize.handleEl)&&t.parentElement&&t.parentElement.removeChild(t)}resizeHandle(e,t){e.modules.resize&&e.modules.resize.handleEl&&(e.modules.resize.handleEl.style.height=t)}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,i){var s=this;function o(e){var i,o,n=void 0===e.screenX?e.touches[0].screenX:e.screenX,r=n-s.startX,a=n-s.latestX;if(s.latestX=n,s.table.rtl&&(r=-r,a=-a),i=t.width==t.minWidth||t.width==t.maxWidth,t.setWidth(s.startWidth+r),o=t.width==t.minWidth||t.width==t.maxWidth,a<0&&(s.nextColumn=s.initialNextColumn),s.table.options.resizableColumnFit&&s.nextColumn&&(!i||!o)){let e=s.nextColumn.getWidth();a>0&&e<=s.nextColumn.minWidth&&(s.nextColumn=s.nextColumn.nextColumn()),s.nextColumn&&s.nextColumn.setWidth(s.nextColumn.getWidth()-a)}s.table.columnManager.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.table.columnManager.verticalAlignHeaders(),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.latestX=s.startX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",n),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",n)}}ne.moduleName="resizeColumns";class re extends s{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)}}re.moduleName="resizeRows";class ae extends s{constructor(e){super(e),this.binding=!1,this.visibilityObserver=!1,this.resizeObserver=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.visible=!1,this.initialized=!1,this.initialRedraw=!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 IntersectionObserver&&"undefined"!=typeof ResizeObserver&&"virtual"===t.rowManager.getRenderMode()?(this.initializeVisibilityObserver(),this.autoResize=!0,this.resizeObserver=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.redrawTable())}})),this.resizeObserver.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),this.redrawTable()}})),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.rerenderColumns(!0),t.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}initializeVisibilityObserver(){this.visibilityObserver=new IntersectionObserver((e=>{this.visible=e[0].isIntersecting,this.initialized?this.visible&&(this.redrawTable(this.initialRedraw),this.initialRedraw=!1):(this.initialized=!0,this.initialRedraw=!this.visible)})),this.visibilityObserver.observe(this.table.element)}redrawTable(e){this.initialized&&this.visible&&(this.table.columnManager.rerenderColumns(!0),this.table.redraw(e))}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.resizeObserver&&this.resizeObserver.unobserve(this.table.element),this.visibilityObserver&&this.visibilityObserver.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}ae.moduleName="resizeTable";class le extends s{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-data-changed",this.generateCollapsedRowContent.bind(this)),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=!0;e;){let t="fitColumns"==this.table.modules.layout.getMode()?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),i=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-t;if(i<0){let t=this.columns[this.index];t?(this.hideColumn(t),this.index++):e=!1}else{let t=this.columns[this.index-1];t&&i>0&&i>=t.getWidth()?(this.showColumn(t),this.index--):e=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){this.table.rowManager.getDisplayRows().forEach((e=>{this.generateCollapsedRowContent(e)}))}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=e.getData(),s=[];return this.hiddenColumns.forEach((o=>{var n=o.getFieldValue(i);if(o.definition.title&&o.field)if(o.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){function r(e){e()}t={value:!1,data:{},getValue:function(){return n},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return o.getComponent()},getTable:()=>this.table},s.push({field:o.field,title:o.definition.title,value:o.modules.format.formatter.call(this.table.modules.format,t,o.modules.format.params,r)})}else s.push({field:o.field,title:o.definition.title,value:n})})),s}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:""}}le.moduleName="responsiveLayout";class he extends s{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._rowSelectionChanged()):((t=this.table.rowManager.getRows(e)).forEach((e=>{this._selectRow(e,!0,!0)})),t.length&&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 de(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(a.isDateTime(e)||(e="iso"===l?a.fromISO(String(e)):a.fromFormat(String(e),l)),a.isDateTime(t)||(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")}he.moduleName="selectRow";var ce={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"),de.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"),de.call(this,e,t,i,s,o,n,r)},datetime:de,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){var t;switch(a){case"length":t=e.length;break;case"sum":t=e.reduce((function(e,t){return e+t}));break;case"max":t=Math.max.apply(null,e);break;case"min":t=Math.min.apply(null,e);break;case"avg":t=e.reduce((function(e,t){return e+t}))/e.length}return t}if(Array.isArray(e)){if(Array.isArray(t))return d(t)-d(e);h=1}else h=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,p=/(\d+)|(\D+)/g,m=/\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(!m.test(a)||!m.test(l))return a>l?1:-1;for(a=a.match(p),l=l.match(p),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 ue extends s{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.registerTableOption("headerSortClickElement","header"),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":ue.sorters[e.definition.sorter]?s=ue.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":s=e.definition.sorter}if(e.modules.sort={sorter:s,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},!1!==e.definition.headerSort){if((t=e.getElement()).classList.add("tabulator-sortable"),(i=document.createElement("div")).classList.add("tabulator-col-sorter"),"icon"===this.table.options.headerSortClickElement)i.classList.add("tabulator-col-sorter-element");else t.classList.add("tabulator-col-sorter-element");switch(this.table.options.headerSortElement){case"function":break;case"object":i.appendChild(this.table.options.headerSortElement);break;default:i.innerHTML=this.table.options.headerSortElement}e.titleHolderElement.appendChild(i),e.modules.sort.element=i,this.setColumnHeaderSortIcon(e,"none"),("icon"===this.table.options.headerSortClickElement?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())),o>-1?(s[o].dir=i,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(null,!1,!1):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 ue.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&&((o=e.column.modules.sort)&&(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((e=>{e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"),this.setColumnHeaderSortIcon(e,"none"))}))}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort","asc"===t?"ascending":"descending"),this.setColumnHeaderSortIcon(e,t)}setColumnHeaderSortIcon(e,t){var i,s=e.modules.sort.element;if(e.definition.headerSort&&"function"==typeof this.table.options.headerSortElement){for(;s.firstChild;)s.removeChild(s.firstChild);"object"==typeof(i=this.table.options.headerSortElement.call(this.table,e.getComponent(),t))?s.appendChild(i):s.innerHTML=i}}_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)}}ue.moduleName="sort",ue.sorters=ce;class pe extends s{constructor(e){super(e),this.tooltipSubscriber=null,this.headerSubscriber=null,this.timeout=null,this.popupInstance=null,this.registerTableOption("tooltipGenerationMode",void 0),this.registerTableOption("tooltipDelay",300),this.registerColumnOption("tooltip"),this.registerColumnOption("headerTooltip")}initialize(){this.deprecatedOptionsCheck(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheckMsg("tooltipGenerationMode","This option is no longer needed as tooltips are always generated on hover now")}initializeColumn(e){e.definition.headerTooltip&&!this.headerSubscriber&&(this.headerSubscriber=!0,this.subscribe("column-mousemove",this.mousemoveCheck.bind(this,"headerTooltip")),this.subscribe("column-mouseout",this.mouseoutCheck.bind(this,"headerTooltip"))),e.definition.tooltip&&!this.tooltipSubscriber&&(this.tooltipSubscriber=!0,this.subscribe("cell-mousemove",this.mousemoveCheck.bind(this,"tooltip")),this.subscribe("cell-mouseout",this.mouseoutCheck.bind(this,"tooltip")))}mousemoveCheck(e,t,i){var s="tooltip"===e?i.column.definition.tooltip:i.definition.headerTooltip;s&&(this.clearPopup(),this.timeout=setTimeout(this.loadTooltip.bind(this,t,i,s),this.table.options.tooltipDelay))}mouseoutCheck(e,t,i){this.popupInstance||this.clearPopup()}clearPopup(e,t,i){clearTimeout(this.timeout),this.timeout=null,this.popupInstance&&this.popupInstance.hide()}loadTooltip(e,t,i){var s,o,n;"function"==typeof i&&(i=i(e,t.getComponent(),(function(e){o=e}))),i instanceof HTMLElement?s=i:(s=document.createElement("div"),!0===i&&(t instanceof m?i=t.value:t.definition.field?this.langBind("columns|"+t.definition.field,(e=>{s.innerHTML=i=e||t.definition.title})):i=t.definition.title),s.innerHTML=i),(i||0===i||!1===i)&&(s.classList.add("tabulator-tooltip"),s.addEventListener("mousemove",(e=>e.preventDefault())),this.popupInstance=this.popup(s),"function"==typeof o&&this.popupInstance.renderCallback(o),n=this.popupInstance.containerEventCoords(e),this.popupInstance.show(n.x+15,n.y+15).hideOnBlur((()=>{this.dispatchExternal("TooltipClosed",t.getComponent()),this.popupInstance=null})),this.dispatchExternal("TooltipOpened",t.getComponent()))}}pe.moduleName="tooltip";var me={integer:function(e,t,i){return""===t||null==t||(t=Number(t),!isNaN(t)&&isFinite(t)&&Math.floor(t)===t)},float:function(e,t,i){return""===t||null==t||(t=Number(t),!isNaN(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("|")),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 ge extends s{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)),this.subscribe("edit-success",this.editValidate.bind(this)),this.subscribe("edit-editor-clear",this.editorClear.bind(this)),this.subscribe("edit-edited-clear",this.editedClear.bind(this))}editValidate(e,t,i){var s="manual"===this.table.options.validationMode||this.validate(e.column.modules.validate,e,t);return!0!==s&&setTimeout((()=>{e.getElement().classList.add("tabulator-validation-fail"),this.dispatchExternal("validationFailed",e.getComponent(),t,s)})),s}editorClear(e,t){t&&e.column.modules.validate&&this.cellValidate(e),e.getElement().classList.remove("tabulator-validation-fail")}editedClear(e){e.modules.validate&&(e.modules.validate.invalid=!1)}cellIsValid(e){return e.modules.validate&&e.modules.validate.invalid||!0}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach((e=>{!0!==this.cellValidate(e)&&t.push(e.getComponent())})),!t.length||t}rowValidate(e){var t=[];return e.cells.forEach((e=>{!0!==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:ge.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})})),t.modules.validate||(t.modules.validate={}),o.length?(t.modules.validate.invalid=o,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==n&&this.invalidCells.push(t)):(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),n>-1&&this.invalidCells.splice(n,1)),!o.length||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))}}ge.moduleName="validate",ge.validators=me;var be=Object.freeze({__proto__:null,AccessorModule:o,AjaxModule:d,ClipboardModule:c,ColumnCalcsModule:E,DataTreeModule:y,DownloadModule:x,EditModule:L,ExportModule:P,FilterModule:F,FormatModule:O,FrozenColumnsModule:A,FrozenRowsModule:_,GroupRowsModule:V,HistoryModule:N,HtmlTableImportModule:W,ImportModule:G,InteractionModule:U,KeybindingsModule:X,MenuModule:q,MoveColumnsModule:K,MoveRowsModule:J,MutatorModule:Y,PageModule:Z,PersistenceModule:te,PopupModule:ie,PrintModule:se,ReactiveDataModule:oe,ResizeColumnsModule:ne,ResizeRowsModule:re,ResizeTableModule:ae,ResponsiveLayoutModule:le,SelectRowModule:he,SortModule:ue,TooltipModule:pe,ValidateModule:ge});class fe{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(let e in t)i.hasOwnProperty(e)||console.warn("Invalid "+this.msgType+" option:",e);for(let e in i)e in t?i[e]=t[e]:Array.isArray(i[e])?i[e]=Object.assign([],i[e]):"object"==typeof i[e]&&null!==i[e]?i[e]=Object.assign({},i[e]):void 0===i[e]&&delete i[e];return i}}class ve 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,i,s){var o=this.rows().indexOf(e),n=e.getElement(),r=0;return new Promise(((a,l)=>{if(o>-1){if(void 0===s&&(s=this.table.options.scrollToRowIfVisible),!s&&t.elVisible(n)&&(r=t.elOffset(n).top-t.elOffset(this.elementVertical).top)>0&&r{e.element.appendChild(t.getElement()),t.cellRendered()}))}reinitializeColumnWidths(e){e.forEach((function(e){e.reinitializeWidth()}))}}class Ce extends ve{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(){"fitDataTable"==this.options("layout")&&console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),this.options("responsiveLayout")&&console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),this.options("rtl")&&console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction")}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,i={};e.visible&&(e.modules.frozen||(t=e.getWidth(),i.leftPos=s,i.rightPos=s+t,i.width=t,this.isFitData&&(i.fitDataCheck=!e.modules.vdomHoz||e.modules.vdomHoz.fitDataCheck),s+t>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;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach((e=>{!e.definition.width&&e.visible&&(i=!0)})),i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,e=this.chain("rows-sample",[1],[],(()=>this.table.rowManager.getDisplayRows()))[0])){t=e.getElement(),e.generateCells(),this.tableElement.appendChild(t);for(let i=0;i{e!==this.columns[i]&&(t=!1)})),!t)}reinitializeRows(){var e=this.getVisibleRows(),t=this.table.rowManager.getRows().filter((t=>!e.includes(t)));e.forEach((e=>{this.reinitializeRow(e,!0)})),t.forEach((e=>{e.deinitialize()}))}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 t=e.getCell(i);e.getElement().insertBefore(t.getElement(),e.getCell(this.columns[this.rightCol]).getElement().nextSibling),t.cellRendered()}})),this.fitDataColActualWidthCheck(i),this.rightCol++,this.getVisibleRows().forEach((e=>{"group"!==e.type&&(e.modules.vdomHoz.rightCol=this.rightCol)})),this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth()):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol-1];if(i)if(i.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){e=!0,this.getVisibleRows().forEach((e=>{if("group"!==e.type){var t=e.getCell(i);e.getElement().insertBefore(t.getElement(),e.getCell(this.columns[this.leftCol]).getElement()),t.cellRendered()}})),this.leftCol--,this.getVisibleRows().forEach((e=>{"group"!==e.type&&(e.modules.vdomHoz.leftCol=this.leftCol)})),this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=i.getWidth();let t=this.fitDataColActualWidthCheck(i);t&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+t,this.vDomPadRight-=t)}else t=!1;else t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol];i&&i.modules.vdomHoz.leftPos>this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach((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)}}})),this.vDomPadRight+=i.getWidth(),this.rightCol--,this.getVisibleRows().forEach((e=>{"group"!==e.type&&(e.modules.vdomHoz.rightCol=this.rightCol)}))):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol];i&&i.modules.vdomHoz.rightPos{if("group"!==e.type){var t=e.getCell(i);try{e.getElement().removeChild(t.getElement())}catch(e){console.warn("Could not removeColLeft",e.message)}}})),this.vDomPadLeft+=i.getWidth(),this.leftCol++,this.getVisibleRows().forEach((e=>{"group"!==e.type&&(e.modules.vdomHoz.leftCol=this.leftCol)}))):t=!1}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},this.table.modules.frozenColumns&&this.table.modules.frozenColumns.leftColumns.forEach((t=>{this.appendCell(e,t)}));for(let t=this.leftCol;t<=this.rightCol;t++)this.appendCell(e,this.columns[t]);this.table.modules.frozenColumns&&this.table.modules.frozenColumns.rightColumns.forEach((t=>{this.appendCell(e,t)}))}}appendCell(e,t){if(t&&t.visible){let i=e.getCell(t);e.getElement().appendChild(i.getElement()),i.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 Ee extends e{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.contentsElement=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new fe(this.table,"column definition",b),this.redrawBlock=!1,this.redrawBlockUpdate=null,this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.contentsElement=this.createHeaderContentsElement(),this.element=this.createHeaderElement(),this.contentsElement.insertBefore(this.headersElement,this.contentsElement.firstChild),this.element.insertBefore(this.contentsElement,this.element.firstChild),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("scrollbar-vertical",this.padVerticalScrollbar.bind(this))}padVerticalScrollbar(e){this.table.rtl?this.headersElement.style.marginLeft=e+"px":this.headersElement.style.marginRight=e+"px"}initializeRenderer(){var e,t={virtual:Ce,basic:we};(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:",this.table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderContentsElement(){var e=document.createElement("div");return e.classList.add("tabulator-header-contents"),e.setAttribute("role","rowgroup"),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}getContentsElement(){return this.contentsElement}getHeadersElement(){return this.headersElement}scrollHorizontal(e){this.contentsElement.scrollLeft=e,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.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,i){var s=new f(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.redrawBlock||(this.headersElement.style.height="",this.columns.forEach((e=>{e.clearVerticalAlign()})),this.columns.forEach((t=>{var i=t.getHeight();i>e&&(e=i)})),this.headersElement.style.height=e+"px",this.columns.forEach((t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)})),this.table.rowManager.adjustTableSize())}findColumn(e){var t;if("object"!=typeof e)return this.columnsByField[e]||!1;if(e instanceof f)return e;if(e instanceof g)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return t=[],this.columns.forEach((e=>{t.push(e),t=t.concat(e.getColumns(!0))})),t.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(){var e=this.columnsByIndex.findIndex((e=>e.visible));return e>-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){t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.moveColumnActual(e,t,i),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.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.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()}rerenderColumns(e,t){this.redrawBlock?(!1===e||!0===e&&null===this.redrawBlockUpdate)&&(this.redrawBlockUpdate=e):this.renderer.rerenderColumns(e,t)}blockRedraw(){this.redrawBlock=!0,this.redrawBlockUpdate=null}restoreRedraw(){this.redrawBlock=!1,this.verticalAlignHeaders(),this.renderer.rerenderColumns(this.redrawBlockUpdate)}redraw(e){t.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(e),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class ye extends ve{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 i=t.elOffset(e.getElement()).top;return!(Math.abs(this.elementVertical.scrollTop-i)>Math.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-i))}scrollToRow(e){var i=e.getElement();this.elementVertical.scrollTop=t.elOffset(i).top-t.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class Re extends ve{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.rows().length?this._virtualRenderFill(!1===i?this.rows.length-1:i,!0,s||0):(this.clear(),this.table.rowManager._showPlaceholder()),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,i,s){var o=this.tableElement,n=this.elementVertical,r=0,a=0,l=0,h=0,d=0,c=this.rows(),u=c.length,p=this.elementVertical.clientHeight;if(s=s||0,e=e||0){for(;o.firstChild;)o.removeChild(o.firstChild);(l=(u-e+1)*this.vDomRowHeight)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*m),this.vDomBottom++,d++}e?(this.vDomTopPad=i?this.vDomRowHeight*this.vDomTop+s: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-p),o.style.paddingTop=this.vDomTopPad+"px",o.style.paddingBottom=this.vDomBottomPad+"px",i&&(this.scrollTop=this.vDomTopPad+h+s-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-p:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-p),this.elementVertical.scrollWidth>this.elementVertical.offsetWidth&&i&&(this.scrollTop+=this.elementVertical.offsetHeight-p),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,a=!0;a;)if(this.vDomTop){let l,h,d=e[n];d&&r=l?(this.styleRow(d,n),i.insertBefore(d.getElement(),i.firstChild),d.initialized&&d.heightInitialized||s.push(d),d.initialize(),h||(l=d.getElement().offsetHeight,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l)),t-=l,o+=l,this.vDomTop--,n--,r++):a=!1):a=!1}else a=!1;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,n=!0;n;){let r,a=e[this.vDomTop];a&&o=r?(this.vDomTop++,t-=r,s+=r,i.push(a),o++):n=!1):n=!1}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,a=!0;a;){let l,h,d=e[n];d&&r=l?(this.styleRow(d,n),i.appendChild(d.getElement()),d.initialized&&d.heightInitialized||s.push(d),d.initialize(),h||(l=d.getElement().offsetHeight,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l)),t-=l,o+=l,this.vDomBottom++,n++,r++):a=!1):a=!1}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,n=!0;n;){let r,a=e[this.vDomBottom];a&&o=r?(this.vDomBottom--,t-=r,s+=r,i.push(a),o++):n=!1):n=!1}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 xe 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.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.scrollbarWidth=0,this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),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}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(void 0===e)return!1;return this.rows.find((t=>t.data[this.table.options.index]==e))||!1}if(e instanceof w)return e;if(e instanceof v)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){return this.getDisplayRows().find((t=>t.getPosition()===e&&t.isDisplayed()))}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 w(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.regenerateRowPositions(),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]),(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.regenerateRowPositions(),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 w?e:new w(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.regenerateRowPositions(),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,i,s){var o=this.table,n="",r=0,a=["all","dataPipeline","display","displayPipeline","end"];if(!this.table.destroyed){if("function"==typeof e)if((r=this.dataPipeline.findIndex((t=>t.handler===e)))>-1)n="dataPipeline",i&&(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",i&&(r==this.displayPipeline.length-1?n="end":r++)}else n=e||"all",r=0;if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===n&&r{"row"===e.type&&(e.setPosition(t),t++)}))}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}setDisplayRows(e,t){this.displayRows[t]=e,t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length)}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=[];if(e&&!0!==e)switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0)}else t=this.chain("rows-retrieve",e,null,this.rows)||this.rows;return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:(this.dispatchExternal("renderStarted"),this.renderer.rerenderRows(e),this.fixedHeight||this.adjustTableSize(),this.scrollBarCheck(),this.dispatchExternal("renderComplete"))}scrollBarCheck(){var e=0;this.element.scrollHeight>this.element.clientHeight&&(e=this.element.offsetWidth-this.element.clientWidth),e!==this.scrollbarWidth&&(this.scrollbarWidth=e,this.dispatch("scrollbar-vertical",e))}initializeRenderer(){var e,t={virtual:Re,basic:ye};(e="string"==typeof this.table.options.renderVertical?t[this.table.options.renderVertical]:this.table.options.renderVertical)?(this.renderMode=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:",this.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(!0))):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.scrollBarCheck(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){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),this.tableElement.style.minWidth=""}_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,t=this.element.clientHeight;if("fill"===this.renderer.verticalFillMode){let i=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?(e=isNaN(this.table.options.minHeight)?this.table.options.minHeight:this.table.options.minHeight+"px",this.element.style.minHeight=e||"calc(100% - "+i+"px)",this.element.style.height="calc(100% - "+i+"px)",this.element.style.maxHeight="calc(100% - "+i+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-i+"px",this.element.scrollTop=this.scrollTop),this.renderer.resize(),this.fixedHeight||t==this.element.clientHeight||(this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw()),this.scrollBarCheck()}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 Te extends e{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1}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)if("string"==typeof this.table.options.footerElement)"<"===this.table.options.footerElement[0]?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement));else this.element=this.table.options.footerElement}getElement(){return this.element}append(e){this.activate(),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e){this.activate(),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(){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display=""))}redraw(){this.dispatch("footer-redraw")}}class Me 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","mouseup","mousedown","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,this.pseudoTrackers[e].target),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]]||(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={},n={};for(let e of i){let i,r=t[e],a=this.previousTargets[e];if(a&&a.target===r)i=a.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()===r)),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(r));break;case"cell":s.components.includes("cell")&&(o.row instanceof w?i=o.row.findCell(r):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&&(o[e]=i,n[e]={target:r,component:i})}return this.previousTargets=n,o}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 ke{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("_")||this.table.options.debugInvalidComponentFuncs&&console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class Le extends e{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,i,s,o,n){var r=++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.alertLoader(),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);r==this.requestOrder?(this.clearAlert(),!1!==t&&(this.dispatchExternal("dataLoaded",t),this.table.rowManager.setData(t,s,void 0===n?!s:n))):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.alertError(),setTimeout((()=>{this.clearAlert()}),this.table.options.dataLoaderErrorTimeout)})).finally((()=>{this.loading=!1}))):(this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,s,void 0===n?!s:n),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++}alertLoader(){("function"==typeof this.table.options.dataLoader?this.table.options.dataLoader():this.table.options.dataLoader)&&this.table.alertManager.alert(this.table.options.dataLoaderLoading||this.langText("data|loading"))}alertError(){this.table.alertManager.alert(this.table.options.dataLoaderError||this.langText("data|error"),"error")}clearAlert(){this.table.alertManager.clear()}}class De{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._notifySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifySubscriptionChange(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._notifySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}subscribed(e){return this.events[e]&&this.events[e].length}_notifySubscriptionChange(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 Se{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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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}_notifySubscriptionChange(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 Pe extends e{constructor(e){super(e)}_warnUser(){this.options("debugDeprecation")&&console.warn(...arguments)}check(e,t){var i="";return void 0===this.options(e)||(i="Deprecated Setup Option - Use of the %c"+e+"%c option is now deprecated",t?(i=i+", Please use the %c"+t+"%c option instead",this._warnUser(i,"font-weight: bold;","font-weight: normal;","font-weight: bold;","font-weight: normal;")):this._warnUser(i,"font-weight: bold;","font-weight: normal;"),!1)}checkMsg(e,t){return void 0===this.options(e)||(this._warnUser("%cDeprecated Setup Option - Use of the %c"+e+" %c option is now deprecated, "+t,"font-weight: normal;","font-weight: bold;","font-weight: normal;"),!1)}msg(e){this._warnUser(e)}}class ze{static register(e){ze.tables.push(e)}static deregister(e){var t=ze.tables.indexOf(e);t>-1&&ze.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)&&(n=e),e.visible&&(i+=e.getWidth())})),n?(o=s-i+n.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(n.setWidth(0),this.table.modules.responsiveLayout.update()),o>0?n.setWidth(o):n.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e,t){var i,s,o=this.table.rowManager.element.getBoundingClientRect().width,n=0,r=0,a=0,l=[],h=[],d=0,c=0;function u(e){return"string"==typeof e?e.indexOf("%")>-1?o/100*parseInt(e):parseInt(e):e}function p(e,t,i,s){var o=[],n=0,r=0,l=0,h=a,d=0,c=0,m=[];function g(e){return i*(e.column.definition.widthGrow||1)}function b(e){return u(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&&(o-=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=u(t),n+=s>i?s:i,e.definition.widthShrink&&(h.push({column:e,width:s>i?s:i}),d+=e.definition.widthShrink)):(l.push({column:e,width:0}),a+=e.definition.widthGrow||1))})),r=o-n,i=Math.floor(r/a),c=p(l,r,i,!1),l.length&&c>0&&(l[l.length-1].width+=c),l.forEach((function(e){r-=e.width})),(s=Math.abs(c)+r)>0&&d&&(c=p(h,s,Math.floor(s/d),!0)),c&&h.length&&(h[h.length-1].width-=c),l.forEach((function(e){e.column.setWidth(e.width)})),h.forEach((function(e){e.column.setWidth(e.width)}))}};class Oe extends s{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;Oe.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(e){this.dispatch("layout-refreshing"),Oe.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),this.dispatch("layout-refreshed")}}Oe.moduleName="layout",Oe.modes=He;class Ae extends s{constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=t.deepClone(Ae.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=t.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=(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)}))}}Ae.moduleName="localize",Ae.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 _e extends s{constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[];return ze.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)}}_e.moduleName="comms";var Be=Object.freeze({__proto__:null,LayoutModule:Oe,LocalizeModule:Ae,CommsModule:_e});class Ie{constructor(e,t){this.bindStaticFunctionality(e),this.bindModules(e,Be,!0),t&&this.bindModules(e,t)}bindStaticFunctionality(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=ze.lookupTable(e,!0);return!(Array.isArray(t)&&!t.length)&&t},e.prototype.bindModules=function(){var t=[],i=[],s=[];for(var o in this.modules={},e.moduleBindings){let n=e.moduleBindings[o],r=new n(this);this.modules[o]=r,n.prototype.moduleCore?this.modulesCore.push(r):n.moduleInitOrder?n.moduleInitOrder<0?t.push(r):i.push(r):s.push(r)}t.sort(((e,t)=>e.moduleInitOrder>t.moduleInitOrder?1:-1)),i.sort(((e,t)=>e.moduleInitOrder>t.moduleInitOrder?1:-1)),this.modulesRegular=t.concat(s.concat(i))}}bindModules(e,t,i){var s=Object.values(t);i&&s.forEach((e=>{e.prototype.moduleCore=!0})),e.registerModule(s)}}class Ve extends e{constructor(e){super(e),this.element=this._createAlertElement(),this.msgElement=this._createMsgElement(),this.type=null,this.element.appendChild(this.msgElement)}_createAlertElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert"),e}_createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert-msg"),e.setAttribute("role","alert"),e}_typeClass(){return"tabulator-alert-state-"+this.type}alert(e,t="msg"){if(e){for(this.clear(),this.type=t;this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.add(this._typeClass()),"function"==typeof e&&(e=e()),e instanceof HTMLElement?this.msgElement.appendChild(e):this.msgElement.innerHTML=e,this.table.element.appendChild(this.element)}}clear(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.msgElement.classList.remove(this._typeClass())}}class Ne{constructor(e,t){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.alertManager=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 ke(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new Pe(this),this.optionsList=new fe(this,"table constructor"),this.initialized=!1,this.destroyed=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout((()=>{this._create()}))),ze.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 Ee(this),this.rowManager=new xe(this),this.footerManager=new Te(this),this.dataLoader=new Le(this),this.alertManager=new Ve(this),this.bindModules(),this.options=this.optionsList.generate(Ne.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new De(this,this.options,this.options.debugEventsExternal),this.eventBus=new Se(this.options.debugEventsInternal),this.interactionMonitor=new Me(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(this.destroyed=!0,ze.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"),this.externalEvents.dispatch("tableDestroyed")}_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))}initGuard(e,t){var i,s;return this.options.debugInitialization&&!this.initialized&&(e||(e=" "==(s="Error"==(i=(new Error).stack.split("\n"))[0]?i[2]:i[1])[0]?s.trim().split(" ")[1].split(".")[1]:s.trim().split("@")[0]),console.warn("Table Not Initialized - Calling the "+e+" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function."+(t?" "+t:""))),this.initialized}blockRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-blocking"),this.rowManager.blockRedraw(),this.columnManager.blockRedraw(),this.eventBus.dispatch("redraw-blocked")}restoreRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-restoring"),this.rowManager.restoreRedraw(),this.columnManager.restoreRedraw(),this.eventBus.dispatch("redraw-restored")}setData(e,t,i){return this.initGuard(!1,"To set initial data please use the 'data' property in the table constructor."),this.dataLoader.load(e,t,i,!1)}clearData(){this.initGuard(),this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,i){return this.initGuard(),this.dataLoader.load(e,t,i,!0,!0)}updateData(e){var t=0;return this.initGuard(),new Promise(((i,s)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e&&e.length>0?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"))}))}addData(e,t,i){return this.initGuard(),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"))}))}updateOrAddData(e){var t=[],i=0;return this.initGuard(),new Promise(((s,o)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e&&e.length>0?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"))}))}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e){var t=this.rowManager.getRowFromPosition(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];this.initGuard(),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){return this.initGuard(),"string"==typeof e&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i).then((e=>e[0].getComponent()))}updateOrAddRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),"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 this.initGuard(),"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);this.initGuard(),s?s.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e){var t=this.rowManager.findRow(e);return t?t.getPosition():(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initGuard(!1,"To set initial columns please use the 'columns' property in the table constructor"),this.columnManager.setColumns(e)}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(this.initGuard(),!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show()}hideColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide()}toggleColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),!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.initGuard(),this.columnManager.addColumn(e,t,s).then((e=>e.getComponent()))}deleteColumn(e){var t=this.columnManager.findColumn(e);return this.initGuard(),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 this.initGuard(),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);this.initGuard(),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.initGuard(),this.columnManager.redraw(e),this.rowManager.redraw(e)}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)}alert(e,t){this.initGuard(),this.alertManager.alert(e,t)}clearAlert(){this.initGuard(),this.alertManager.clear()}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}}Ne.defaultOptions={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,debugInvalidComponentFuncs:!0,debugInitialization:!0,debugDeprecation:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",popupContainer:!1,columns:[],columnDefaults:{},data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",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,rowHeight:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{}},new Ie(Ne);class We extends Ne{}new Ie(We,be);class je{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,d as AjaxModule,u as CalcComponent,p as CellComponent,c as ClipboardModule,E as ColumnCalcsModule,g as ColumnComponent,y as DataTreeModule,x as DownloadModule,L as EditModule,P as ExportModule,F as FilterModule,O as FormatModule,A as FrozenColumnsModule,_ as FrozenRowsModule,B as GroupComponent,V as GroupRowsModule,N as HistoryModule,W as HtmlTableImportModule,G as ImportModule,U as InteractionModule,X as KeybindingsModule,q as MenuModule,s as Module,K as MoveColumnsModule,J as MoveRowsModule,Y as MutatorModule,Z as PageModule,te as PersistenceModule,ie as PopupModule,se as PrintModule,je as PseudoRow,oe as ReactiveDataModule,ve as Renderer,ne as ResizeColumnsModule,re as ResizeRowsModule,ae as ResizeTableModule,le as ResponsiveLayoutModule,v as RowComponent,he as SelectRowModule,ue as SortModule,Ne as Tabulator,We as TabulatorFull,pe as TooltipModule,ge 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 a5db67e0b..b305ebb12 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/tools/Helpers.js","../../src/js/core/tools/Popup.js","../../src/js/core/Module.js","../../src/js/modules/Accessor/Accessor.js","../../src/js/modules/Accessor/defaults/accessors.js","../../src/js/modules/Ajax/defaults/urlGenerator.js","../../src/js/modules/Ajax/defaults/contentTypeFormatters.js","../../src/js/modules/Ajax/Ajax.js","../../src/js/modules/Ajax/defaults/config.js","../../src/js/modules/Ajax/defaults/loaderPromise.js","../../src/js/modules/Clipboard/Clipboard.js","../../src/js/modules/Clipboard/defaults/pasteActions.js","../../src/js/modules/Clipboard/defaults/pasteParsers.js","../../src/js/modules/ColumnCalcs/CalcComponent.js","../../src/js/core/cell/CellComponent.js","../../src/js/core/cell/Cell.js","../../src/js/core/column/ColumnComponent.js","../../src/js/core/column/defaults/options.js","../../src/js/core/column/Column.js","../../src/js/core/row/RowComponent.js","../../src/js/core/row/Row.js","../../src/js/modules/ColumnCalcs/defaults/calculations.js","../../src/js/modules/ColumnCalcs/ColumnCalcs.js","../../src/js/modules/DataTree/DataTree.js","../../src/js/modules/Download/defaults/downloaders.js","../../src/js/modules/Download/defaults/downloaders/csv.js","../../src/js/modules/Download/defaults/downloaders/json.js","../../src/js/modules/Download/defaults/downloaders/jsonLines.js","../../src/js/modules/Download/defaults/downloaders/pdf.js","../../src/js/modules/Download/defaults/downloaders/xlsx.js","../../src/js/modules/Download/defaults/downloaders/html.js","../../src/js/modules/Download/Download.js","../../src/js/modules/Edit/inputMask.js","../../src/js/modules/Edit/List.js","../../src/js/modules/Edit/defaults/editors.js","../../src/js/modules/Edit/defaults/editors/input.js","../../src/js/modules/Edit/defaults/editors/textarea.js","../../src/js/modules/Edit/defaults/editors/number.js","../../src/js/modules/Edit/defaults/editors/range.js","../../src/js/modules/Edit/defaults/editors/date.js","../../src/js/modules/Edit/defaults/editors/time.js","../../src/js/modules/Edit/defaults/editors/datetime.js","../../src/js/modules/Edit/defaults/editors/select.js","../../src/js/modules/Edit/defaults/editors/list.js","../../src/js/modules/Edit/defaults/editors/autocomplete.js","../../src/js/modules/Edit/defaults/editors/star.js","../../src/js/modules/Edit/defaults/editors/progress.js","../../src/js/modules/Edit/defaults/editors/tickCross.js","../../src/js/modules/Edit/Edit.js","../../src/js/modules/Export/ExportRow.js","../../src/js/modules/Export/ExportColumn.js","../../src/js/modules/Export/Export.js","../../src/js/modules/Filter/defaults/filters.js","../../src/js/modules/Filter/Filter.js","../../src/js/modules/Format/defaults/formatters.js","../../src/js/modules/Format/defaults/formatters/plaintext.js","../../src/js/modules/Format/defaults/formatters/html.js","../../src/js/modules/Format/defaults/formatters/textarea.js","../../src/js/modules/Format/defaults/formatters/money.js","../../src/js/modules/Format/defaults/formatters/link.js","../../src/js/modules/Format/defaults/formatters/image.js","../../src/js/modules/Format/defaults/formatters/tickCross.js","../../src/js/modules/Format/defaults/formatters/datetime.js","../../src/js/modules/Format/defaults/formatters/datetimediff.js","../../src/js/modules/Format/defaults/formatters/lookup.js","../../src/js/modules/Format/defaults/formatters/star.js","../../src/js/modules/Format/defaults/formatters/traffic.js","../../src/js/modules/Format/defaults/formatters/progress.js","../../src/js/modules/Format/defaults/formatters/color.js","../../src/js/modules/Format/defaults/formatters/buttonTick.js","../../src/js/modules/Format/defaults/formatters/buttonCross.js","../../src/js/modules/Format/defaults/formatters/rownum.js","../../src/js/modules/Format/defaults/formatters/handle.js","../../src/js/modules/Format/defaults/formatters/responsiveCollapse.js","../../src/js/modules/Format/defaults/formatters/rowSelection.js","../../src/js/modules/Format/Format.js","../../src/js/modules/FrozenColumns/FrozenColumns.js","../../src/js/modules/FrozenRows/FrozenRows.js","../../src/js/modules/GroupRows/GroupComponent.js","../../src/js/modules/GroupRows/Group.js","../../src/js/modules/GroupRows/GroupRows.js","../../src/js/modules/History/History.js","../../src/js/modules/History/defaults/undoers.js","../../src/js/modules/History/defaults/redoers.js","../../src/js/modules/HtmlTableImport/HtmlTableImport.js","../../src/js/modules/Import/defaults/importers.js","../../src/js/modules/Import/defaults/importers/csv.js","../../src/js/modules/Import/defaults/importers/json.js","../../src/js/modules/Import/defaults/importers/array.js","../../src/js/modules/Import/Import.js","../../src/js/modules/Interaction/Interaction.js","../../src/js/modules/Keybindings/Keybindings.js","../../src/js/modules/Keybindings/defaults/bindings.js","../../src/js/modules/Keybindings/defaults/actions.js","../../src/js/modules/Menu/Menu.js","../../src/js/modules/MoveColumns/MoveColumns.js","../../src/js/modules/MoveRows/MoveRows.js","../../src/js/modules/Mutator/Mutator.js","../../src/js/modules/Mutator/defaults/mutators.js","../../src/js/modules/Page/defaults/pageCounters.js","../../src/js/modules/Page/defaults/pageCounters/rows.js","../../src/js/modules/Page/defaults/pageCounters/pages.js","../../src/js/modules/Page/Page.js","../../src/js/modules/Persistence/defaults/readers.js","../../src/js/modules/Persistence/defaults/writers.js","../../src/js/modules/Persistence/Persistence.js","../../src/js/modules/Popup/Popup.js","../../src/js/modules/Print/Print.js","../../src/js/modules/ReactiveData/ReactiveData.js","../../src/js/modules/ResizeColumns/ResizeColumns.js","../../src/js/modules/ResizeRows/ResizeRows.js","../../src/js/modules/ResizeTable/ResizeTable.js","../../src/js/modules/ResponsiveLayout/ResponsiveLayout.js","../../src/js/modules/SelectRow/SelectRow.js","../../src/js/modules/Sort/defaults/sorters/datetime.js","../../src/js/modules/Sort/defaults/sorters.js","../../src/js/modules/Sort/defaults/sorters/number.js","../../src/js/modules/Sort/defaults/sorters/string.js","../../src/js/modules/Sort/defaults/sorters/date.js","../../src/js/modules/Sort/defaults/sorters/time.js","../../src/js/modules/Sort/defaults/sorters/boolean.js","../../src/js/modules/Sort/defaults/sorters/array.js","../../src/js/modules/Sort/defaults/sorters/exists.js","../../src/js/modules/Sort/defaults/sorters/alphanum.js","../../src/js/modules/Sort/Sort.js","../../src/js/modules/Tooltip/Tooltip.js","../../src/js/modules/Validate/defaults/validators.js","../../src/js/modules/Validate/Validate.js","../../src/js/core/tools/OptionsList.js","../../src/js/core/rendering/Renderer.js","../../src/js/core/rendering/renderers/BasicHorizontal.js","../../src/js/core/rendering/renderers/VirtualDomHorizontal.js","../../src/js/core/ColumnManager.js","../../src/js/core/rendering/renderers/BasicVertical.js","../../src/js/core/rendering/renderers/VirtualDomVertical.js","../../src/js/core/RowManager.js","../../src/js/core/FooterManager.js","../../src/js/core/tools/InteractionMonitor.js","../../src/js/core/tools/ComponentFunctionBinder.js","../../src/js/core/tools/DataLoader.js","../../src/js/core/tools/ExternalEventBus.js","../../src/js/core/tools/InternalEventBus.js","../../src/js/core/tools/DeprecationAdvisor.js","../../src/js/core/tools/TableRegistry.js","../../src/js/modules/Layout/defaults/modes/fitDataGeneral.js","../../src/js/modules/Layout/defaults/modes.js","../../src/js/modules/Layout/defaults/modes/fitData.js","../../src/js/modules/Layout/defaults/modes/fitDataStretch.js","../../src/js/modules/Layout/defaults/modes/fitColumns.js","../../src/js/modules/Layout/Layout.js","../../src/js/modules/Localize/Localize.js","../../src/js/modules/Localize/defaults/langs.js","../../src/js/modules/Comms/Comms.js","../../src/js/core/tools/ModuleBinder.js","../../src/js/core/tools/Alert.js","../../src/js/core/Tabulator.js","../../src/js/core/defaults/options.js","../../src/js/core/TabulatorFull.js","../../src/js/core/row/PseudoRow.js"],"sourcesContent":["export default class CoreFeature{\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, columnsChanged){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent, columnsChanged);\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(force){\r\n\t\treturn this.table.modules.layout.layout(force);\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\t//////////////////////////////////////////\r\n\t/////////// Deprecation Checks ///////////\r\n\t//////////////////////////////////////////\r\n\r\n\tdeprecationCheck(oldOption, newOption){\r\n\t\treturn this.table.deprecationAdvisor.check(oldOption, newOption);\r\n\t}\r\n\r\n\tdeprecationCheckMsg(oldOption, msg){\r\n\t\treturn this.table.deprecationAdvisor.checkMsg(oldOption, msg);\r\n\t}\r\n\r\n\tdeprecationMsg(msg){\r\n\t\treturn this.table.deprecationAdvisor.msg(msg);\r\n\t}\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}","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 CoreFeature from '../CoreFeature.js';\r\nimport Helpers from './Helpers.js';\r\n\r\nexport default class Popup extends CoreFeature{\r\n\tconstructor(table, element, parent){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = element;\r\n\t\tthis.container = this._lookupContainer();\r\n\t\t\r\n\t\tthis.parent = parent;\r\n\t\t\r\n\t\tthis.reversedX = false;\r\n\t\tthis.childPopup = null;\r\n\t\tthis.blurable = false;\r\n\t\tthis.blurCallback = null;\r\n\t\tthis.blurEventsBound = false;\r\n\t\tthis.renderedCallback = null;\r\n\t\t\r\n\t\tthis.visible = false;\r\n\t\tthis.hideable = true;\r\n\t\t\r\n\t\tthis.element.classList.add(\"tabulator-popup-container\");\r\n\t\t\r\n\t\tthis.blurEvent = this.hide.bind(this, false);\r\n\t\tthis.escEvent = this._escapeCheck.bind(this);\r\n\t\t\r\n\t\tthis.destroyBinding = this.tableDestroyed;\r\n\t\tthis.destroyed = false;\r\n\t}\r\n\t\r\n\ttableDestroyed(){\r\n\t\tthis.destroyed = true;\r\n\t\tthis.hide(true);\r\n\t}\r\n\t\r\n\t_lookupContainer(){\r\n\t\tvar container = this.table.options.popupContainer;\r\n\t\t\r\n\t\tif(typeof container === \"string\"){\r\n\t\t\tcontainer = document.querySelector(container);\r\n\t\t\t\r\n\t\t\tif(!container){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.popupContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (container === true){\r\n\t\t\tcontainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(container && !this._checkContainerIsParent(container)){\r\n\t\t\tcontainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.popupContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!container){\r\n\t\t\tcontainer = document.body;\r\n\t\t}\r\n\t\t\r\n\t\treturn container;\r\n\t}\r\n\t\r\n\t_checkContainerIsParent(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._checkContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\trenderCallback(callback){\r\n\t\tthis.renderedCallback = callback;\r\n\t}\r\n\t\r\n\tcontainerEventCoords(e){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar x = touch ? e.touches[0].pageX : e.pageX;\r\n\t\tvar y = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\r\n\t\tif(this.container !== document.body){\r\n\t\t\tlet parentOffset = Helpers.elOffset(this.container);\r\n\t\t\t\r\n\t\t\tx -= parentOffset.left;\r\n\t\t\ty -= parentOffset.top;\r\n\t\t}\r\n\t\t\r\n\t\treturn {x, y};\r\n\t}\r\n\t\r\n\telementPositionCoords(element, position = \"right\"){\r\n\t\tvar offset = Helpers.elOffset(element),\r\n\t\tcontainerOffset, x, y;\r\n\t\t\r\n\t\tif(this.container !== document.body){\r\n\t\t\tcontainerOffset = Helpers.elOffset(this.container);\r\n\t\t\t\r\n\t\t\toffset.left -= containerOffset.left;\r\n\t\t\toffset.top -= containerOffset.top;\r\n\t\t}\r\n\t\t\r\n\t\tswitch(position){\r\n\t\t\tcase \"right\":\r\n\t\t\t\tx = offset.left + element.offsetWidth;\r\n\t\t\t\ty = offset.top - 1;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"bottom\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top + element.offsetHeight;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"left\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top - 1;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"top\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"center\":\r\n\t\t\t\tx = offset.left + (element.offsetWidth / 2);\r\n\t\t\t\ty = offset.top + (element.offsetHeight / 2);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn {x, y, offset};\r\n\t}\r\n\t\r\n\tshow(origin, position){\r\n\t\tvar x, y, parentEl, parentOffset, coords;\r\n\t\t\r\n\t\tif(this.destroyed || this.table.destroyed){\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\tif(origin instanceof HTMLElement){\r\n\t\t\tparentEl = origin;\r\n\t\t\tcoords = this.elementPositionCoords(origin, position);\r\n\t\t\t\r\n\t\t\tparentOffset = coords.offset;\r\n\t\t\tx = coords.x;\r\n\t\t\ty = coords.y;\r\n\t\t\t\r\n\t\t}else if(typeof origin === \"number\"){\r\n\t\t\tparentOffset = {top:0, left:0};\r\n\t\t\tx = origin;\r\n\t\t\ty = position;\r\n\t\t}else{\r\n\t\t\tcoords = this.containerEventCoords(origin);\r\n\t\t\t\r\n\t\t\tx = coords.x;\r\n\t\t\ty = coords.y;\r\n\t\t\t\r\n\t\t\tthis.reversedX = false;\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.style.top = y + \"px\";\r\n\t\tthis.element.style.left = x + \"px\";\r\n\t\t\r\n\t\tthis.container.appendChild(this.element);\r\n\t\t\r\n\t\tif(typeof this.renderedCallback === \"function\"){\r\n\t\t\tthis.renderedCallback();\r\n\t\t}\r\n\t\t\r\n\t\tthis._fitToScreen(x, y, parentEl, parentOffset, position);\r\n\t\t\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.destroyBinding);\r\n\t\t\r\n\t\tthis.element.addEventListener(\"mousedown\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\t_fitToScreen(x, y, parentEl, parentOffset, position){\r\n\t\tvar scrollTop = this.container === document.body ? document.documentElement.scrollTop : this.container.scrollTop;\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 + this.element.offsetWidth) >= this.container.offsetWidth || this.reversedX){\r\n\t\t\tthis.element.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.reversedX = 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 + this.element.offsetHeight) > Math.max(this.container.offsetHeight, scrollTop ? this.container.scrollHeight : 0)) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"bottom\":\r\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight - parentEl.offsetHeight - 1) + \"px\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisVisible(){\r\n\t\treturn this.visible;\r\n\t}\r\n\t\r\n\thideOnBlur(callback){\r\n\t\tthis.blurable = true;\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tif(this.visible){\r\n\t\t\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\t\t\tthis.subscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"mousedown\", this.blurEvent);\r\n\t\t\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\r\n\t\t\t\t\tthis.blurEventsBound = true;\r\n\t\t\t\t}\r\n\t\t\t}, 100);\r\n\t\t\t\r\n\t\t\tthis.blurCallback = callback;\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\t_escapeCheck(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockHide(){\r\n\t\tthis.hideable = false;\r\n\t}\r\n\t\r\n\trestoreHide(){\r\n\t\tthis.hideable = true;\r\n\t}\r\n\t\r\n\thide(silent = false){\r\n\t\tif(this.visible && this.hideable){\r\n\t\t\tif(this.blurable && this.blurEventsBound){\r\n\t\t\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"mousedown\", this.blurEvent);\r\n\t\t\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\t\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\t\t\tthis.unsubscribe(\"cell-editing\", this.blurEvent);\r\n\r\n\t\t\t\tthis.blurEventsBound = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.childPopup){\r\n\t\t\t\tthis.childPopup.hide();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.childPopup = null;\r\n\t\t\t}\r\n\t\t\t\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\t\r\n\t\t\tthis.visible = false;\r\n\t\t\t\r\n\t\t\tif(this.blurCallback && !silent){\r\n\t\t\t\tthis.blurCallback();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.unsubscribe(\"table-destroy\", this.destroyBinding);\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\tchild(element){\r\n\t\tif(this.childPopup){\r\n\t\t\tthis.childPopup.hide();\r\n\t\t}\r\n\t\t\r\n\t\tthis.childPopup = new Popup(this.table, element, this);\r\n\t\t\r\n\t\treturn this.childPopup;\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Popup from './tools/Popup.js';\r\n\r\nclass Module extends CoreFeature{\r\n\t\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis._handler = null;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overridden in module\r\n\t}\r\n\t\r\n\t\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\t\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\t\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t/// Public Function Registration ///\r\n\t///////////////////////////////////\r\n\t\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = (...args) => {\r\n\t\t\t\tthis.table.initGuard(name);\r\n\t\t\t\t\r\n\t\t\t\treturn func(...args);\r\n\t\t\t};\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\t\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\t\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\t\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\t\r\n\tdisplayRows(adjust){\r\n\t\tvar index = this.table.rowManager.displayRows.length - 1, \r\n\t\tlookupIndex;\r\n\t\t\r\n\t\tif(this._handler){\r\n\t\t\tlookupIndex = this.table.rowManager.displayPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === this._handler;\r\n\t\t\t});\r\n\r\n\t\t\tif(lookupIndex > -1){\r\n\t\t\t\tindex = lookupIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(adjust){\r\n\t\t\tindex = index + adjust;\r\n\t\t}\r\n\r\n\t\tif(this._handler){\r\n\t\t\tif(index > -1){\r\n\t\t\t\treturn this.table.rowManager.getDisplayRows(index);\r\n\t\t\t}else{\r\n\t\t\t\treturn this.activeRows();\r\n\t\t\t}\r\n\t\t}\t\r\n\t}\r\n\t\r\n\tactiveRows(){\r\n\t\treturn this.table.rowManager.activeRows;\r\n\t}\r\n\t\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\t\t\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\t\r\n\t///////////////////////////////////\r\n\t//////// Footer Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tfooterAppend(element){\r\n\t\treturn this.table.footerManager.append(element);\r\n\t}\r\n\t\r\n\tfooterPrepend(element){\r\n\t\treturn this.table.footerManager.prepend(element);\r\n\t}\r\n\t\r\n\tfooterRemove(element){\r\n\t\treturn this.table.footerManager.remove(element);\r\n\t} \r\n\t\r\n\t///////////////////////////////////\r\n\t//////// Popups Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tpopup(menuEl, menuContainer){\r\n\t\treturn new Popup(this.table, menuEl, menuContainer);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t//////// Alert Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\talert(content, type){\r\n\t\treturn this.table.alertManager.alert(content, type);\r\n\t}\r\n\t\r\n\tclearAlert(){\r\n\t\treturn this.table.alertManager.clear();\r\n\t}\r\n\t\r\n}\r\n\r\nexport default Module;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultAccessors 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\t\tif(Accessor.accessors[value]){\r\n\t\t\t\t\taccessor = Accessor.accessors[value];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\taccessor = value;\r\n\t\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, colComponent;\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\tcolComponent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colComponent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colComponent, 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 = defaultAccessors;\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\t.then((data)=>{\r\n\t\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\treturn data;\r\n\t\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\t.then((response)=>{\r\n\t\t\t\t\tif(response.ok) {\r\n\t\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\t\treject(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\t.catch((error)=>{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\t\treject(error);\r\n\t\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); //DEPRECATED - 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\tlist = 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.generateHTMLTable(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\t\tvalue = JSON.stringify(col.value);\r\n\t\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\t\tvalue = \"\";\r\n\t\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\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 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\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\t\tif(!this.pasteAction){\r\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tthis.pasteAction = action;\r\n\t\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\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\t\tif(!this.pasteParser){\r\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tthis.pasteParser = parser;\r\n\t\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\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\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}\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\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\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\t\tif(val != null){\r\n\t\t\t\t\t\tconsole.warn(\"Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", val);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\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//////////////////// 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, force){\r\n\t\tvar changed = this.setValueProcessData(value, mutate, force);\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, force){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value || force){\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\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\r\n\t\tthis.dispatch(\"cell-height\", this, \"\");\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\r\n\t\tthis.dispatch(\"cell-height\", this, 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}\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.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\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"headerWordWrap\": false,\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.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 pre-styled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum pre-styled 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 pre-styled 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\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\tswitch(this.table.options.columnHeaderVertAlign){\r\n\t\t\tcase \"middle\":\r\n\t\t\t\tel.style.justifyContent = \"center\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"bottom\":\r\n\t\t\t\tel.style.justifyContent = \"flex-end\";\r\n\t\t\t\tbreak;\r\n\t\t}\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//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._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.dispatch(\"column-init\", this);\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\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//assign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classNames = def.cssClass.split(\" \");\r\n\t\t\tclassNames.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 horizontal 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 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\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\t\t\r\n\t\tif(def.headerWordWrap){\r\n\t\t\ttitleHolderElement.classList.add(\"tabulator-col-title-wrap\");\r\n\t\t}\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\t\tif(contents instanceof Node){\r\n\t\t\t\t\tel.appendChild(contents);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.innerHTML = \"\";\r\n\t\t\t\t\tconsole.warn(\"Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", contents);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\t\tel.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\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 classNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclassNames.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\r\n\t\t\tcolumn.columnRendered();\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\tthis.dispatch(\"column-height\", this, this.element.style.height);\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\t// if(!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 alignment\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\r\n\t\tthis.dispatch(\"column-height\", this, \"\");\r\n\t}\r\n\r\n\t//// Retrieve 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 column 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(traverse){\r\n\t\tvar columns = [];\r\n\r\n\t\tif(traverse){\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumns.push(column);\r\n\t\t\t\t\t\r\n\t\t\t\tcolumns = columns.concat(column.getColumns(true));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumns = this.columns;\r\n\t\t}\r\n\t\t\r\n\t\treturn 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//retrieve 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.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.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\tif(this.maxWidth && minWidth > this.maxWidth){\r\n\t\t\tminWidth = this.maxWidth;\r\n\r\n\t\t\tconsole.warn(\"the minWidth (\"+ minWidth + \"px) for column '\" + this.field + \"' cannot be bigger that its maxWidth (\"+ this.maxWidthStyled + \")\");\r\n\t\t}\r\n\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\tif(this.minWidth && maxWidth < this.minWidth){\r\n\t\t\tmaxWidth = this.minWidth;\r\n\r\n\t\t\tconsole.warn(\"the maxWidth (\"+ maxWidth + \"px) for column '\" + this.field + \"' cannot be smaller that its minWidth (\"+ this.minWidthStyled + \")\");\r\n\t\t}\r\n\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\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.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\r\n\t\tthis.dispatch(\"column-rendered\", this);\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\t.then((column) => {\r\n\r\n\t\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\t\tthis.field = false; //clear field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\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;\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(){\r\n\t\treturn this._row.getPosition();\r\n\t}\r\n\r\n\twatchPosition(callback){\r\n\t\treturn this._row.watchPosition(callback);\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\t\t\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 pre-styled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //hold elements 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\t\tthis.position = 0; //store position of element in row list\r\n\t\tthis.positionWatchers = [];\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.created = false;\r\n\t\t\r\n\t\tthis.setData(data);\r\n\t}\r\n\t\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\t\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\t\t\r\n\t\tthis.element = el;\r\n\t}\r\n\t\r\n\tgetElement(){\r\n\t\tthis.create();\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\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\t\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\t\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\t\t\r\n\t\tif(!this.initialized || force){\r\n\t\t\t\r\n\t\t\tthis.deleteCells();\r\n\t\t\t\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\t\t\t\r\n\t\t\tthis.generateCells();\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t\t\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\t\t\t\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\t\t\t\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\t\t\t\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\t\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t\t\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\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\t\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\t\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\t\t\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\t\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight;\r\n\t\t\r\n\t\tif(this.table.options.rowHeight){\r\n\t\t\tthis.height = this.table.options.rowHeight;\r\n\t\t}else{\r\n\t\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\t\t\t\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tvar height = cell.getHeight();\r\n\t\t\t\tif(height > maxHeight){\r\n\t\t\t\t\tmaxHeight = height;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(force){\r\n\t\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t\t}else{\r\n\t\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\t\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\t\t\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\t\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\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force && !this.table.options.rowHeight){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\t\t\r\n\t\tthis.calcHeight(force);\r\n\t\t\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\t\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\t\t\t\r\n\t\t\tthis.manualHeight = true;\r\n\t\t\t\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\t\t\t\r\n\t\t\tthis.setCellHeight();\r\n\t\t\t\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\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\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\t\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\t\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\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\t\t\t\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\t\t\t\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\t\t\t\r\n\t\t\t//set data\r\n\t\t\tfor (let attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\t\t\t\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (let attrname in updatedData) {\r\n\t\t\t\t\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\t\t\t\t\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\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\t\t\t\t\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\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\t\t\t\r\n\t\t\t//this.reinitialize();\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\t\t\t\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\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\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\t\t\r\n\t\treturn this.data;\r\n\t}\r\n\t\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\t\t\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\t\t\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\t\t\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\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\t\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\t\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\t\t\r\n\t\treturn this.cells;\r\n\t}\r\n\t\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\t\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\t\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\t\t\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\t\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\t\t\r\n\t\tthis.deleteActual();\r\n\t\t\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\t\r\n\tdeleteActual(blockRedraw){\r\n\t\tthis.detachModules();\r\n\t\t\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\t\t\r\n\t\tthis.deleteCells();\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\t\t\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\t\r\n\tdetachModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\t\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\t\t\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\t\r\n\twipe(){\r\n\t\tthis.detachModules();\r\n\t\tthis.deleteCells();\r\n\t\t\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\t\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\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tisDisplayed(){\r\n\t\treturn this.table.rowManager.getDisplayRows().includes(this);\r\n\t}\r\n\r\n\tgetPosition(){\r\n\t\treturn this.isDisplayed() ? this.position : false;\r\n\t}\r\n\r\n\tsetPosition(position){\r\n\t\tif(position != this.position){\r\n\t\t\tthis.position = position;\r\n\r\n\t\t\tthis.positionWatchers.forEach((callback) => {\r\n\t\t\t\tcallback(this.position);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchPosition(callback){\r\n\t\tthis.positionWatchers.push(callback);\r\n\r\n\t\tcallback(this.position);\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\t\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\t\t\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\t\r\n\t\tthis.blocked = false;\r\n\t\tthis.recalcAfterBlock = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\t\t\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\t\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\t\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\t\t\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\t\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"redraw-blocked\", this.blockRedraw.bind(this));\r\n\t\tthis.subscribe(\"redraw-restored\", this.restoreRedraw.bind(this));\r\n\t\t\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\t\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t\t\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockRedraw(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.recalcAfterBlock = false;\r\n\t}\r\n\t\r\n\t\r\n\trestoreRedraw(){\r\n\t\tthis.blocked = false;\r\n\t\t\r\n\t\tif(this.recalcAfterBlock){\r\n\t\t\tthis.recalcAfterBlock = false;\r\n\t\t\tthis.recalcActiveRowsRefresh();\r\n\t\t}\r\n\t}\r\n\t\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\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tblockCheck(){\r\n\t\tif(this.blocked){\r\n\t\t\tthis.recalcAfterBlock = true;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.blocked;\r\n\t}\r\n\t\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\t\t\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(row);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\t\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\t\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\t\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\t\t\t\t\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\t\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\t\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\t\t\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\t\t\r\n\t\tif(def.topCalc){\r\n\t\t\t\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\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\tcase \"function\":\r\n\t\t\t\t\tconfig.topCalc = def.topCalc;\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(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\t\t\t\t\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\t\t\t\r\n\t\t}\r\n\t\t\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\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\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\tcase \"function\":\r\n\t\t\t\t\tconfig.botCalc = def.bottomCalc;\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(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\t\t\t\t\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\t\t\r\n\t}\r\n\t\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){}\r\n\t\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\t\t\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\t\t\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.footerRemove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getContentsElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.footerPrepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botElement.scrollLeft = left;\r\n\t\t}\r\n\t}\r\n\t\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\t\t\r\n\t\tif(!this.blockCheck()){\r\n\t\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\t\tdata = this.rowsToData(rows);\r\n\t\t\t\t\r\n\t\t\t\tif(this.topInitialized){\r\n\t\t\t\t\tif(this.topRow){\r\n\t\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trow = this.generateRow(\"top\", data);\r\n\t\t\t\t\tthis.topRow = row;\r\n\t\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\t\trow.initialize(true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(this.botInitialized){\r\n\t\t\t\t\tif(this.botRow){\r\n\t\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trow = this.generateRow(\"bottom\", data);\r\n\t\t\t\t\tthis.botRow = row;\r\n\t\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\t\trow.initialize(true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t\t\t\r\n\t\t\t\t//set resizable handles\r\n\t\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\t\t\t\t\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\t\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\t\t\r\n\t\tif(!this.blockCheck()){\r\n\t\t\tif(group){\r\n\t\t\t\tif(group.calcs){\r\n\t\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\t\tgroup.calcs.top.reinitialize();\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\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\t\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\t\t\t\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\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\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\t\t\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\t\t\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\t\t\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\t\t\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\t\t\r\n\t\trow.component = false;\r\n\t\t\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\t\t\t\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\t\t\r\n\t\trow.generateCells = () => {\r\n\t\t\t\r\n\t\t\tvar cells = [];\r\n\t\t\t\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\t\r\n\t\t\t\t//set field name of mock column\r\n\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\t\t\t\t\r\n\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//ensure css class definition is replicated to calculation cell\r\n\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\t\t\t\t\r\n\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\tcell.getElement();\r\n\t\t\t\tcell.column = column;\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t\t\r\n\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\tcells.push(cell);\r\n\t\t\t\t\r\n\t\t\t\tif(!column.visible){\r\n\t\t\t\t\tcell.hide();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\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\t\t\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\t\t\t\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\t\t\t\t\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\t\t\t\t\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\t\t\r\n\t\treturn rowData;\r\n\t}\r\n\t\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\t\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\t\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\t\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\t\t\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\t\t\t\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\t\t\r\n\t\treturn results;\r\n\t}\r\n\t\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\t\t\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\t\t\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\t\t\r\n\t\treturn results;\r\n\t}\r\n\t\r\n\tadjustForScrollbar(width){\r\n\t\tif(this.botRow){\r\n\t\t\tif(this.table.rtl){\r\n\t\t\t\tthis.botElement.style.paddingLeft = width + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.botElement.style.paddingRight = width + \"px\";\r\n\t\t\t}\r\n\t\t}\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\nimport RowComponent from '../../core/row/RowComponent.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.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);//selecting 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(this.options(\"movableRows\")){\r\n\t\t\t\tconsole.warn(\"The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior\");\r\n\t\t\t}\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\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t\t};\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t\t};\r\n\t\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\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedrawing.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\ttableRedrawing(force){\r\n\t\tvar rows;\r\n\r\n\t\tif(force){\r\n\t\t\trows = this.table.rowManager.getRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.reinitializeRowChildren(row);\r\n\t\t\t});\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\toldControl = config.controlEl;\r\n\r\n\t\tel = el || row.getCells()[0].getElement();\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\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\tgetTreeParentRoot(row){\r\n\t\treturn row.modules.dataTree && row.modules.dataTree.parent ? this.getTreeParentRoot(row.modules.dataTree.parent) : row;\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}else if(subject === null){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\"){\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.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\t\tconsole.warn(\"Download Warning - CSV 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 - CSV downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\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\r\n\t\t\t\t\tif(col){\r\n\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\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\r\n\t\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\t\tcol.value = \"\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(item.join(delimiter));\r\n\t\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}\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\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(item);\r\n\t\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.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\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\t\theader.push(parseRow(row));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\tbody.push(parseRow(row));\r\n\t\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\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\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.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.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n}\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\tcompression = 'compress' in options ? options.compress : true,\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\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary', compression });\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.generateHTMLTable(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(\"downloadEncoder\", function(data, mimeType){\r\n\t\t\treturn new Blob([data],{type:mimeType});\r\n\t\t}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadReady\", undefined); //warn of function deprecation\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.deprecatedOptionsCheck();\r\n\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\tdeprecatedOptionsCheck(){\r\n\t\tthis.deprecationCheck(\"downloadReady\", \"downloadEncoder\");\r\n\t}\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 = this.table.options.downloadEncoder(data, mime);\r\n\r\n\t\tif(blob){\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\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\t\t\t\t\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\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\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\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\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\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\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\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\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\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\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;\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\nimport urlBuilder from '../Ajax/defaults/urlGenerator.js';\r\n\r\nexport default class Edit{\r\n\tconstructor(editor, cell, onRendered, success, cancel, editorParams){\r\n\t\tthis.edit = editor;\r\n\t\tthis.table = editor.table;\r\n\t\tthis.cell = cell;\r\n\t\tthis.params = this._initializeParams(editorParams);\r\n\t\t\r\n\t\tthis.data = [];\r\n\t\tthis.displayItems = [];\r\n\t\tthis.currentItems = [];\r\n\t\tthis.focusedItem = null;\r\n\t\t\r\n\t\tthis.input = this._createInputElement();\r\n\t\tthis.listEl = this._createListElement();\r\n\t\t\r\n\t\tthis.initialValues = null; \r\n\t\t\r\n\t\tthis.isFilter = !cell._getSelf;\r\n\t\t\r\n\t\tthis.filterTimeout = null;\r\n\t\tthis.filtered = false;\r\n\t\tthis.typing = false;\r\n\t\t\r\n\t\tthis.values = []; \r\n\t\tthis.popup = null; \r\n\t\t\r\n\t\tthis.listIteration = 0;\r\n\t\t\r\n\t\tthis.lastAction=\"\";\r\n\t\t\r\n\t\tthis.blurable = true;\r\n\t\t\r\n\t\tthis.actions = {\r\n\t\t\tsuccess:success,\r\n\t\t\tcancel:cancel\r\n\t\t};\r\n\t\t\r\n\t\tthis._deprecatedOptionsCheck();\r\n\t\tthis._initializeValue();\r\n\t\t\r\n\t\tonRendered(this._onRendered.bind(this));\r\n\t}\r\n\t\r\n\t_deprecatedOptionsCheck(){\r\n\t\tif(this.params.listItemFormatter){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.sortValuesList){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.searchFunc){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.searchingPlaceholder){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t_initializeValue(){\r\n\t\tvar initialValue = this.cell.getValue();\r\n\t\t\r\n\t\tif(typeof initialValue === \"undefined\" && typeof this.params.defaultValue !== \"undefined\"){\r\n\t\t\tinitialValue = this.params.defaultValue;\r\n\t\t}\r\n\t\t\r\n\t\tthis.initialValues = this.params.multiselect ? initialValue : [initialValue];\r\n\t\t\r\n\t\tif(this.isFilter){\r\n\t\t\tthis.input.value = this.initialValues ? this.initialValues.join(\",\") : \"\";\r\n\t\t\tthis.headerFilterInitialListGen(); \r\n\t\t}\r\n\t}\r\n\t\r\n\t_onRendered(){\r\n\t\tvar cellEl = this.cell.getElement();\r\n\t\t\r\n\t\tfunction clickStop(e){\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\t\t\r\n\t\tthis.input.style.height = \"100%\";\r\n\t\tthis.input.focus({preventScroll: true});\r\n\t\t\r\n\t\t\r\n\t\tcellEl.addEventListener(\"click\", clickStop);\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tcellEl.removeEventListener(\"click\", clickStop);\r\n\t\t}, 1000);\r\n\t\t\r\n\t\tthis.input.addEventListener(\"mousedown\", this._preventPopupBlur.bind(this));\r\n\t}\r\n\t\r\n\t_createListElement(){\r\n\t\tvar listEl = document.createElement(\"div\");\r\n\t\tlistEl.classList.add(\"tabulator-edit-list\");\r\n\t\t\r\n\t\tlistEl.addEventListener(\"mousedown\", this._preventBlur.bind(this));\r\n\t\tlistEl.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\r\n\t\t\r\n\t\treturn listEl;\r\n\t}\r\n\t\r\n\t_setListWidth(){\r\n\t\tvar element = this.isFilter ? this.input : this.cell.getElement();\r\n\t\t\r\n\t\tthis.listEl.style.minWidth = element.offsetWidth + \"px\";\r\n\t\t\r\n\t\tif(this.params.maxWidth){\r\n\t\t\tif(this.params.maxWidth === true){\r\n\t\t\t\tthis.listEl.style.maxWidth = element.offsetWidth + \"px\";\r\n\t\t\t}else if(typeof this.params.maxWidth === \"number\"){\r\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\t_createInputElement(){\r\n\t\tvar attribs = this.params.elementAttributes;\r\n\t\tvar input = document.createElement(\"input\");\r\n\t\t\r\n\t\tinput.setAttribute(\"type\", this.params.clearable ? \"search\" : \"text\");\r\n\t\t\r\n\t\tinput.style.padding = \"4px\";\r\n\t\tinput.style.width = \"100%\";\r\n\t\tinput.style.boxSizing = \"border-box\";\r\n\t\t\r\n\t\tif(!this.params.autocomplete){\r\n\t\t\tinput.style.cursor = \"default\";\r\n\t\t\tinput.style.caretColor = \"transparent\";\r\n\t\t\t// input.readOnly = (this.edit.currentCell != false);\r\n\t\t}\r\n\t\t\r\n\t\tif(attribs && typeof attribs == \"object\"){\r\n\t\t\tfor (let key in attribs){\r\n\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + attribs[\"+\" + key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinput.setAttribute(key, attribs[key]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.mask){\r\n\t\t\tmaskInput(input, this.params);\r\n\t\t}\r\n\t\t\r\n\t\tthis._bindInputEvents(input);\r\n\t\t\r\n\t\treturn input;\r\n\t}\r\n\t\r\n\t_initializeParams(params){\r\n\t\tvar valueKeys = [\"values\", \"valuesURL\", \"valuesLookup\"],\r\n\t\tvalueCheck;\r\n\t\t\r\n\t\tparams = Object.assign({}, params);\r\n\t\t\r\n\t\tparams.verticalNavigation = params.verticalNavigation || \"editor\";\r\n\t\tparams.placeholderLoading = typeof params.placeholderLoading === \"undefined\" ? \"Searching ...\" : params.placeholderLoading;\r\n\t\tparams.placeholderEmpty = typeof params.placeholderEmpty === \"undefined\" ? \"No Results Found\" : params.placeholderEmpty;\r\n\t\tparams.filterDelay = typeof params.filterDelay === \"undefined\" ? 300 : params.filterDelay;\r\n\t\t\r\n\t\tparams.emptyValue = Object.keys(params).includes(\"emptyValue\") ? params.emptyValue : \"\";\r\n\t\t\r\n\t\tvalueCheck = Object.keys(params).filter(key => valueKeys.includes(key)).length;\r\n\t\t\r\n\t\tif(!valueCheck){\r\n\t\t\tconsole.warn(\"list editor config error - either the values, valuesURL, or valuesLookup option must be set\");\r\n\t\t}else if(valueCheck > 1){\r\n\t\t\tconsole.warn(\"list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor\");\r\n\t\t}\r\n\t\t\r\n\t\tif(params.autocomplete){\r\n\t\t\tif(params.multiselect){\r\n\t\t\t\tparams.multiselect = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - multiselect option is not available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(params.freetext){\r\n\t\t\t\tparams.freetext = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - freetext option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.filterFunc){\r\n\t\t\t\tparams.filterFunc = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - filterFunc option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.filterRemote){\r\n\t\t\t\tparams.filterRemote = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - filterRemote option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.mask){\r\n\t\t\t\tparams.mask = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - mask option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.allowEmpty){\r\n\t\t\t\tparams.allowEmpty = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - allowEmpty option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.listOnEmpty){\r\n\t\t\t\tparams.listOnEmpty = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - listOnEmpty option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(params.filterRemote && !(typeof params.valuesLookup === \"function\" || params.valuesURL)){\r\n\t\t\tparams.filterRemote = false;\r\n\t\t\tconsole.warn(\"list editor config error - filterRemote option should only be used when values list is populated from a remote source\");\r\n\t\t}\r\n\t\treturn params;\r\n\t}\r\n\t//////////////////////////////////////\r\n\t////////// Event Handling ////////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_bindInputEvents(input){\r\n\t\tinput.addEventListener(\"focus\", this._inputFocus.bind(this));\r\n\t\tinput.addEventListener(\"click\", this._inputClick.bind(this));\r\n\t\tinput.addEventListener(\"blur\", this._inputBlur.bind(this));\r\n\t\tinput.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\r\n\t\tinput.addEventListener(\"search\", this._inputSearch.bind(this));\r\n\t\t\r\n\t\tif(this.params.autocomplete){\r\n\t\t\tinput.addEventListener(\"keyup\", this._inputKeyUp.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t_inputFocus(e){\r\n\t\tthis.rebuildOptionsList();\r\n\t}\r\n\t\r\n\t_filter(){\r\n\t\tif(this.params.filterRemote){\r\n\t\t\tclearTimeout(this.filterTimeout);\r\n\t\t\t\r\n\t\t\tthis.filterTimeout = setTimeout(() => {\r\n\t\t\t\tthis.rebuildOptionsList();\r\n\t\t\t}, this.params.filterDelay);\r\n\t\t}else{\r\n\t\t\tthis._filterList();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputClick(e){\r\n\t\te.stopPropagation();\r\n\t}\r\n\t\r\n\t_inputBlur(e){\r\n\t\tif(this.blurable){\r\n\t\t\tif(this.popup){\r\n\t\t\t\tthis.popup.hide();\r\n\t\t\t}else{\r\n\t\t\t\tthis._resolveValue(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputSearch(){\r\n\t\tthis._clearChoices();\r\n\t}\r\n\t\r\n\t_inputKeyDown(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t\r\n\t\t\tcase 38: //up arrow\r\n\t\t\t\tthis._keyUp(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 40: //down arrow\r\n\t\t\t\tthis._keyDown(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\t\tthis._keySide(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tthis._keyEnter();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tthis._keyEsc();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t\tthis._keyHomeEnd(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 9: //tab\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis._keySelectLetter(e);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputKeyUp(e){\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\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis._keyAutoCompLetter(e);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_preventPopupBlur(){\r\n\t\tif(this.popup){\r\n\t\t\tthis.popup.blockHide();\r\n\t\t}\r\n\t\t\r\n\t\tsetTimeout(() =>{\r\n\t\t\tif(this.popup){\r\n\t\t\t\tthis.popup.restoreHide();\r\n\t\t\t}\r\n\t\t}, 10);\r\n\t}\r\n\t\r\n\t_preventBlur(){\r\n\t\tthis.blurable = false;\r\n\t\t\r\n\t\tsetTimeout(() =>{\r\n\t\t\tthis.blurable = true;\r\n\t\t}, 10);\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Keyboard Navigation /////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_keyUp(e){\r\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\r\n\t\t\r\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index)){\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tif(index > 0){\r\n\t\t\t\tthis._focusItem(this.displayItems[index - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyDown(e){\r\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\r\n\t\t\r\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index < this.displayItems.length - 1)){\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tif(index < this.displayItems.length - 1){\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tthis._focusItem(this.displayItems[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis._focusItem(this.displayItems[index + 1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keySide(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t}\r\n\t\r\n\t_keyEnter(e){\r\n\t\tif(this.params.autocomplete && this.lastAction === \"typing\"){\r\n\t\t\tthis._resolveValue(true);\r\n\t\t}else{\r\n\t\t\tif(this.focusedItem){\r\n\t\t\t\tthis._chooseItem(this.focusedItem);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyEsc(e){\r\n\t\tthis._cancel();\r\n\t}\r\n\t\r\n\t_keyHomeEnd(e){\r\n\t\tif(this.params.autocomplete){\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keySelectLetter(e){\r\n\t\tif(!this.params.autocomplete){\r\n\t\t\t// if(this.edit.currentCell === false){\r\n\t\t\te.preventDefault();\r\n\t\t\t// }\r\n\t\t\t\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tthis._scrollToValue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyAutoCompLetter(e){\r\n\t\tthis._filter();\r\n\t\tthis.lastAction = \"typing\";\r\n\t\tthis.typing = true;\r\n\t}\r\n\t\r\n\t\r\n\t_scrollToValue(char){\r\n\t\tclearTimeout(this.filterTimeout);\r\n\t\t\r\n\t\tvar character = String.fromCharCode(char).toLowerCase();\r\n\t\tthis.filterTerm += character.toLowerCase();\r\n\t\t\r\n\t\tvar match = this.displayItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(this.filterTerm);\r\n\t\t});\r\n\t\t\r\n\t\tif(match){\r\n\t\t\tthis._focusItem(match);\r\n\t\t}\r\n\t\t\r\n\t\tthis.filterTimeout = setTimeout(() => {\r\n\t\t\tthis.filterTerm = \"\";\r\n\t\t}, 800);\r\n\t}\r\n\t\r\n\t_focusItem(item){\r\n\t\tthis.lastAction = \"focus\";\r\n\t\t\r\n\t\tif(this.focusedItem && this.focusedItem.element){\r\n\t\t\tthis.focusedItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.focusedItem = item;\r\n\t\t\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t//////////////////////////////////////\r\n\t/////// Data List Generation /////////\r\n\t//////////////////////////////////////\r\n\theaderFilterInitialListGen(){\r\n\t\tthis._generateOptions(true);\r\n\t}\r\n\t\r\n\trebuildOptionsList(){\r\n\t\tthis._generateOptions()\r\n\t\t\t.then(this._sortOptions.bind(this))\r\n\t\t\t.then(this._buildList.bind(this))\r\n\t\t\t.then(this._showList.bind(this))\r\n\t\t\t.catch((e) => {\r\n\t\t\t\tif(!Number.isInteger(e)){\r\n\t\t\t\t\tconsole.error(\"List generation error\", e);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\t\r\n\t_filterList(){\r\n\t\tthis._buildList(this._filterOptions());\r\n\t\tthis._showList();\r\n\t}\r\n\t\r\n\t_generateOptions(silent){\r\n\t\tvar values = [];\r\n\t\tvar iteration = ++ this.listIteration;\r\n\t\t\r\n\t\tthis.filtered = false;\r\n\t\t\r\n\t\tif(this.params.values){\r\n\t\t\tvalues = this.params.values;\r\n\t\t}else if (this.params.valuesURL){\r\n\t\t\tvalues = this._ajaxRequest(this.params.valuesURL, this.input.value);\r\n\t\t}else{\r\n\t\t\tif(typeof this.params.valuesLookup === \"function\"){\r\n\t\t\t\tvalues = this.params.valuesLookup(this.cell, this.input.value);\r\n\t\t\t}else if(this.params.valuesLookup){\r\n\t\t\t\tvalues = this._uniqueColumnValues(this.params.valuesLookupField);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(values instanceof Promise){\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis._addPlaceholder(this.params.placeholderLoading);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn values.then()\r\n\t\t\t\t.then((responseValues) => {\r\n\t\t\t\t\tif(this.listIteration === iteration){\r\n\t\t\t\t\t\treturn this._parseList(responseValues);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\treturn Promise.reject(iteration);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.resolve(this._parseList(values));\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addPlaceholder(contents){\r\n\t\tvar placeholder = document.createElement(\"div\");\r\n\t\t\r\n\t\tif(typeof contents === \"function\"){\r\n\t\t\tcontents = contents(this.cell.getComponent(), this.listEl);\r\n\t\t}\r\n\t\t\r\n\t\tif(contents){\r\n\t\t\tthis._clearList();\r\n\t\t\t\r\n\t\t\tif(contents instanceof HTMLElement){\r\n\t\t\t\tplaceholder = contents;\r\n\t\t\t}else{\r\n\t\t\t\tplaceholder.classList.add(\"tabulator-edit-list-placeholder\");\r\n\t\t\t\tplaceholder.innerHTML = contents;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.listEl.appendChild(placeholder);\r\n\t\t\t\r\n\t\t\tthis._showList();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_ajaxRequest(url, term){\r\n\t\tvar params = this.params.filterRemote ? {term:term} : {};\r\n\t\turl = urlBuilder(url, {}, params);\r\n\t\t\r\n\t\treturn fetch(url)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\treturn response.json()\r\n\t\t\t\t\t\t.catch((error)=>{\r\n\t\t\t\t\t\t\tconsole.warn(\"List Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t\t\treturn Promise.reject(error);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"List Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treturn Promise.reject(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(\"List Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treturn Promise.reject(error);\r\n\t\t\t});\r\n\t}\r\n\t\r\n\t_uniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = this.table.getData(this.params.valuesLookup),\r\n\t\tcolumn;\r\n\t\t\r\n\t\tif(field){\r\n\t\t\tcolumn = this.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = this.cell.getColumn()._getSelf();\r\n\t\t}\r\n\t\t\r\n\t\tif(column){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\t\t\t\t\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\toutput = [];\r\n\t\t}\r\n\t\t\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\t\r\n\t\r\n\t_parseList(inputValues){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(!Array.isArray(inputValues)){\r\n\t\t\tinputValues = Object.entries(inputValues).map(([key, value]) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tlabel:value,\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tinputValues.forEach((value) => {\r\n\t\t\tif(typeof value !== \"object\"){\r\n\t\t\t\tvalue = {\r\n\t\t\t\t\tlabel:value,\r\n\t\t\t\t\tvalue:value,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._parseListItem(value, data, 0);\r\n\t\t});\r\n\t\t\r\n\t\tif(!this.currentItems.length && this.params.freetext){\r\n\t\t\tthis.input.value = this.initialValues;\r\n\t\t\tthis.typing = true;\r\n\t\t\tthis.lastAction = \"typing\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.data = data;\r\n\t\t\r\n\t\treturn data; \r\n\t}\r\n\t\r\n\t_parseListItem(option, data, level){\r\n\t\tvar item = {};\r\n\t\t\r\n\t\tif(option.options){\r\n\t\t\titem = this._parseListGroup(option, level + 1);\r\n\t\t}else{\r\n\t\t\titem = {\r\n\t\t\t\tlabel:option.label,\r\n\t\t\t\tvalue:option.value,\r\n\t\t\t\titemParams:option.itemParams,\r\n\t\t\t\telementAttributes: option.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t\tselected:false,\r\n\t\t\t\tvisible:true,\r\n\t\t\t\tlevel:level,\r\n\t\t\t\toriginal:option,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tif(this.initialValues && this.initialValues.indexOf(option.value) > -1){\r\n\t\t\t\tthis._chooseItem(item, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdata.push(item);\r\n\t}\r\n\t\r\n\t_parseListGroup(option, level){\r\n\t\tvar item = {\r\n\t\t\tlabel:option.label,\r\n\t\t\tgroup:true,\r\n\t\t\titemParams:option.itemParams,\r\n\t\t\telementAttributes:option.elementAttributes,\r\n\t\t\telement:false,\r\n\t\t\tvisible:true,\r\n\t\t\tlevel:level,\r\n\t\t\toptions:[],\r\n\t\t\toriginal:option,\r\n\t\t};\r\n\t\t\r\n\t\toption.options.forEach((child) => {\r\n\t\t\tthis._parseListItem(child, item.options, level);\r\n\t\t});\r\n\t\t\r\n\t\treturn item;\r\n\t}\r\n\t\r\n\t_sortOptions(options){\r\n\t\tvar sorter;\r\n\t\t\r\n\t\tif(this.params.sort){\r\n\t\t\tsorter = typeof this.params.sort === \"function\" ? this.params.sort : this._defaultSortFunction.bind(this);\r\n\t\t\t\r\n\t\t\tthis._sortGroup(sorter, options);\r\n\t\t}\r\n\t\t\r\n\t\treturn options;\r\n\t}\r\n\t\r\n\t_sortGroup(sorter, options){\r\n\t\toptions.sort((a,b) => {\r\n\t\t\treturn sorter(a.label, b.label, a.value, b.value, a.original, b.original);\r\n\t\t});\r\n\t\t\r\n\t\toptions.forEach((option) => {\r\n\t\t\tif(option.group){\r\n\t\t\t\tthis._sortGroup(sorter, option.options);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_defaultSortFunction(as, bs){\r\n\t\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\t\tvar emptyAlign = 0;\r\n\t\t\r\n\t\tif(this.params.sort === \"desc\"){\r\n\t\t\t[as, bs] = [bs, as];\r\n\t\t}\r\n\t\t\r\n\t\t//handle empty values\r\n\t\tif(!as && as!== 0){\r\n\t\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t\t}else if(!bs && bs!== 0){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\t\ta = String(as).toLowerCase();\r\n\t\t\tb = String(bs).toLowerCase();\r\n\t\t\tif(a === b) return 0;\r\n\t\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\t\ta = a.match(rx);\r\n\t\t\tb = b.match(rx);\r\n\t\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\t\twhile(i < L){\r\n\t\t\t\ta1= a[i];\r\n\t\t\t\tb1= b[i++];\r\n\t\t\t\tif(a1 !== b1){\r\n\t\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn a.length > b.length;\r\n\t\t}\r\n\t\t\r\n\t\treturn emptyAlign;\r\n\t}\r\n\t\r\n\t_filterOptions(){\r\n\t\tvar filterFunc = this.params.filterFunc || this._defaultFilterFunc,\r\n\t\tterm = this.input.value;\r\n\t\t\r\n\t\tif(term){\r\n\t\t\tthis.filtered = true;\r\n\t\t\t\r\n\t\t\tthis.data.forEach((item) => {\r\n\t\t\t\tthis._filterItem(filterFunc, term, item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.filtered = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.data;\r\n\t}\r\n\t\r\n\t_filterItem(func, term, item){\r\n\t\tvar matches = false;\r\n\t\t\r\n\t\tif(!item.group){\r\n\t\t\titem.visible = func(term, item.label, item.value, item.original);\r\n\t\t}else{\r\n\t\t\titem.options.forEach((option) => {\r\n\t\t\t\tif(this._filterItem(func, term, option)){\r\n\t\t\t\t\tmatches = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\titem.visible = matches;\r\n\t\t}\r\n\t\t\r\n\t\treturn item.visible;\r\n\t}\r\n\t\r\n\t_defaultFilterFunc(term, label, value, item){\r\n\t\tterm = String(term).toLowerCase();\r\n\t\t\r\n\t\tif(label !== null && typeof label !== \"undefined\"){\r\n\t\t\tif(String(label).toLowerCase().indexOf(term) > -1 || String(value).toLowerCase().indexOf(term) > -1){\r\n\t\t\t\treturn true;\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\t//////////////////////////////////////\r\n\t/////////// Display List /////////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_clearList(){\r\n\t\twhile(this.listEl.firstChild) this.listEl.removeChild(this.listEl.firstChild);\r\n\t\t\r\n\t\tthis.displayItems = [];\r\n\t}\r\n\t\r\n\t_buildList(data){\r\n\t\tthis._clearList();\r\n\t\t\r\n\t\tdata.forEach((option) => {\r\n\t\t\tthis._buildItem(option);\r\n\t\t});\r\n\t\t\r\n\t\tif(!this.displayItems.length){\r\n\t\t\tthis._addPlaceholder(this.params.placeholderEmpty);\r\n\t\t} \r\n\t}\r\n\t\r\n\t_buildItem(item){\r\n\t\tvar el = item.element,\r\n\t\tcontents;\r\n\t\t\r\n\t\tif(!this.filtered || item.visible){\r\n\t\t\t\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\r\n\t\t\t\tcontents = this.params.itemFormatter ? this.params.itemFormatter(item.label, item.value, item.original, el) : item.label;\r\n\t\t\t\t\r\n\t\t\t\tif(contents instanceof HTMLElement){\r\n\t\t\t\t\tel.appendChild(contents);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.innerHTML = contents;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-group\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-item\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tel.classList.add(\"tabulator-edit-list-group-level-\" + item.level);\r\n\t\t\t\t\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, this.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\t\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.addEventListener(\"click\", this._groupClick.bind(this, item));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.addEventListener(\"click\", this._itemClick.bind(this, item));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tel.addEventListener(\"mousedown\", this._preventBlur.bind(this));\r\n\t\t\t\t\r\n\t\t\t\titem.element = el;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t\tthis.listEl.appendChild(el);\r\n\t\t\t\r\n\t\t\tif(item.group){\r\n\t\t\t\titem.options.forEach((option) => {\r\n\t\t\t\t\tthis._buildItem(option);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayItems.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_showList(){\r\n\t\tvar startVis = this.popup && this.popup.isVisible();\r\n\t\t\r\n\t\tif(this.input.parentNode){\r\n\t\t\tif(this.params.autocomplete && this.input.value === \"\" && !this.params.listOnEmpty){\r\n\t\t\t\tif(this.popup){\r\n\t\t\t\t\tthis.popup.hide(true);\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setListWidth();\r\n\t\t\t\r\n\t\t\tif(!this.popup){\r\n\t\t\t\tthis.popup = this.edit.popup(this.listEl);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.popup.show(this.cell.getElement(), \"bottom\");\r\n\t\t\t\r\n\t\t\tif(!startVis){\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.popup.hideOnBlur(this._resolveValue.bind(this, true));\r\n\t\t\t\t}, 10);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_styleItem(item){\r\n\t\tif(item && item.element){\r\n\t\t\tif(item.selected){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}else{\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// User Interaction ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_itemClick(item, e){\r\n\t\te.stopPropagation();\r\n\t\t\r\n\t\tthis._chooseItem(item);\r\n\t}\r\n\t\r\n\t_groupClick(item, e){\r\n\t\te.stopPropagation();\r\n\t}\r\n\t\r\n\t\r\n\t//////////////////////////////////////\r\n\t////// Current Item Management ///////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_cancel(){\r\n\t\tthis.popup.hide(true);\r\n\t\tthis.actions.cancel();\r\n\t}\r\n\t\r\n\t_clearChoices(){\r\n\t\tthis.typing = true;\r\n\t\t\r\n\t\tthis.currentItems.forEach((item) => {\r\n\t\t\titem.selected = false;\r\n\t\t\tthis._styleItem(item);\r\n\t\t});\r\n\t\t\r\n\t\tthis.currentItems = [];\r\n\t\t\r\n\t\tthis.focusedItem = null;\r\n\t}\r\n\t\r\n\t_chooseItem(item, silent){\r\n\t\tvar index;\r\n\t\t\r\n\t\tthis.typing = false;\r\n\t\t\r\n\t\tif(this.params.multiselect){\r\n\t\t\tindex = this.currentItems.indexOf(item);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.currentItems.splice(index, 1);\r\n\t\t\t\titem.selected = false;\r\n\t\t\t}else{\r\n\t\t\t\tthis.currentItems.push(item);\r\n\t\t\t\titem.selected = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.input.value = this.currentItems.map(item => item.label).join(\",\");\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.currentItems = [item];\r\n\t\t\titem.selected = true;\r\n\t\t\t\r\n\t\t\tthis.input.value = item.label;\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis._resolveValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis._focusItem(item);\r\n\t}\r\n\t\r\n\t_resolveValue(blur){\r\n\t\tvar output, initialValue;\r\n\r\n\t\tif(this.popup){\r\n\t\t\tthis.popup.hide(true);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.multiselect){\r\n\t\t\toutput = this.currentItems.map(item => item.value);\r\n\t\t}else{\r\n\t\t\tif(blur && this.params.autocomplete && this.typing){\r\n\t\t\t\tif(this.params.freetext || (this.params.allowEmpty && this.input.value === \"\")){\r\n\t\t\t\t\toutput = this.input.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.actions.cancel();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.currentItems[0]){\r\n\t\t\t\t\toutput = this.currentItems[0].value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinitialValue = this.initialValues[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(initialValue === null || typeof initialValue === \"undefined\" || initialValue === \"\"){\r\n\t\t\t\t\t\toutput = initialValue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\toutput = this.params.emptyValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(output === \"\"){\r\n\t\t\toutput = this.params.emptyValue;\r\n\t\t}\r\n\t\t\r\n\t\tthis.actions.success(output);\r\n\t\t\r\n\t\tif(this.isFilter){\r\n\t\t\tthis.initialValues = output && !Array.isArray(output) ? [output] : output;\r\n\t\t\tthis.currentItems = [];\r\n\t\t}\r\n\t}\r\n\t\r\n}\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 date from './editors/date.js';\r\nimport time from './editors/time.js';\r\nimport datetime from './editors/datetime.js';\r\nimport select from './editors/select.js';\r\nimport list from './editors/list.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\tnumber:number,\r\n\trange:range,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tselect:select,\r\n\tlist:list,\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\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"hybrid\",\r\n\tvalue = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n\tinput = document.createElement(\"textarea\"),\r\n\tscrollHeight = 0;\r\n\r\n\t//create and style input\r\n\tinput.style.display = \"block\";\r\n\tinput.style.padding = \"2px\";\r\n\tinput.style.height = \"100%\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.whiteSpace = \"pre-wrap\";\r\n\tinput.style.resize = \"none\";\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\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\tinput.scrollHeight;\r\n\t\tinput.style.height = input.scrollHeight + \"px\";\r\n\t\tcell.getRow().normalizeHeight();\r\n\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\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\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tcell.getRow().normalizeHeight();\r\n\t\t\t},300);\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\tinput.addEventListener(\"keyup\", function(){\r\n\r\n\t\tinput.style.height = \"\";\r\n\r\n\t\tvar heightNow = input.scrollHeight;\r\n\r\n\t\tinput.style.height = heightNow + \"px\";\r\n\r\n\t\tif(heightNow != scrollHeight){\r\n\t\t\tscrollHeight = heightNow;\r\n\t\t\tcell.getRow().normalizeHeight();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\r\n\t\t\tcase 13:\r\n\t\t\t\tif(e.shiftKey && editorParams.shiftEnterSubmit){\r\n\t\t\t\t\tonChange(e);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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//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\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\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\t\tonChange();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\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\t\tif(vertNav == \"editor\"){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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\t\tonChange();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null;\r\n\t\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tfunction convertDate(value){\r\n\t\tvar newDatetime;\r\n\t\t\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\r\n\t\t\r\n\t\treturn newDatetime.toFormat(\"yyyy-MM-dd\");\r\n\t}\r\n\t\r\n\tinput.type = \"date\";\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.max){\r\n\t\tinput.setAttribute(\"max\", inputFormat ? convertDate(editorParams.max) : editorParams.max);\r\n\t}\r\n\r\n\tif(editorParams.min){\r\n\t\tinput.setAttribute(\"min\", inputFormat ? convertDate(editorParams.min) : editorParams.min);\r\n\t}\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\t\t\r\n\t\t\tcellValue = convertDate(cellValue);\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\t\t\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\t\t\t\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromFormat(String(value), \"yyyy-MM-dd\").toFormat(inputFormat);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \r\n\tnewDatetime;\r\n\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tinput.type = \"time\";\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\r\n\t\t\tif(DT.isDateTime(cellValue)){\r\n\t\t\t\tnewDatetime = cellValue;\r\n\t\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\r\n\t\t\t}else{\r\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tcellValue = newDatetime.toFormat(\"hh:mm\");\r\n\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromFormat(String(value), \"hh:mm\").toFormat(inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \r\n\tnewDatetime;\r\n\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tinput.type = \"datetime-local\";\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\r\n\t\t\tif(DT.isDateTime(cellValue)){\r\n\t\t\t\tnewDatetime = cellValue;\r\n\t\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\r\n\t\t\t}else{\r\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tcellValue = newDatetime.toFormat(\"yyyy-MM-dd\") + \"T\" + newDatetime.toFormat(\"hh:mm\");\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromISO(String(value)).toFormat(inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\r\n\tthis.deprecationMsg(\"The select editor has been deprecated, please use the new list editor\");\r\n\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\r\n\tthis.deprecationMsg(\"The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam\");\r\n\r\n\teditorParams.autocomplete = true;\r\n\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.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\t\tchangeValue(value + 1);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\t\tchangeValue(value - 1);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tsuccess(value);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tcancel();\r\n\t\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\t\te.preventDefault();\r\n\t\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tupdateValue();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tcancel();\r\n\t\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\ttrueValueSet = Object.keys(editorParams).includes(\"trueValue\"),\r\n\tfalseValueSet = Object.keys(editorParams).includes(\"falseValue\");\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 = trueValueSet ? value === editorParams.trueValue : (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\tvar checkedValue = input.checked;\r\n\r\n\t\tif(trueValueSet && checkedValue){\r\n\t\t\tcheckedValue = editorParams.trueValue;\r\n\t\t}else if(falseValueSet && !checkedValue){\r\n\t\t\tcheckedValue = editorParams.falseValue;\r\n\t\t}\r\n\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 checkedValue;\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 checkedValue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn checkedValue;\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overridden 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\t\t\r\n\t\tthis.editors = Edit.editors;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\t\t\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\t\t\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\t\t\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\t\t\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\t\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(\"cell-value-changed\", this.updateCellClass.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(\"row-layout\", this.rowEditableCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\t\t\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\t\r\n\t\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\t\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\t\t\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\t\t\t\t\t\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\t\t\t\t\t\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\t\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcellIsEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\t\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\t\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tupdateCellClass(cell){\r\n\t\tif(this.allowEdit(cell)) {\r\n\t\t\tcell.getElement().classList.add(\"tabulator-editable\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-editable\");\r\n\t\t}\r\n\t}\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\t\t\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\t\t\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\t\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnextCell = this.navigateLeft();\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findPrevEditableCell(prevRow, prevRow.cells.length);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnextCell = this.navigateRight();\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\t\t\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\t\t\t\t\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn nextCell;\r\n\t}\r\n\t\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\t\t\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\t\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn prevCell;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\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\t\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\t\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\trowEditableCheck(row){\r\n\t\trow.getCells().forEach((cell) => {\r\n\t\t\tif(cell.column.modules.edit && typeof cell.column.modules.edit.check === \"function\"){\r\n\t\t\t\tthis.updateCellClass(cell);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar config = {\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\t\t\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\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.definition.editor === true){\r\n\t\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\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(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\t\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\t\t\r\n\t\tthis.invalidEdit = false;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\t\t\t\r\n\t\t\tcellEl = cell.getElement();\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"edit-editor-clear\", cell, cancel);\r\n\t\t\t\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\t\t\t\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\t\t\t\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-editing\");\r\n\t\t\t\r\n\t\t\tcell.table.element.classList.remove(\"tabulator-editing\");\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\t\t\t\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\t\t\t\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\t\t\t\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\t\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\t\t\t\r\n\t\t\tthis.updateCellClass(cell);\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\t\t\t\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\t\t\t\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\t\t\t\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\t\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\t\t\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\t\t\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\t\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\t\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\t\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\t\t\t\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\t\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\t\t\t\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\t\t\t\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\t\t\t\t\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\t\r\n\tallowEdit(cell) {\r\n\t\tvar check = cell.column.modules.edit ? true : false;\r\n\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tif(cell.row.initialized){\r\n\t\t\t\t\t\tcheck = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\t\tcheck = !!cell.row.data[cell.column.modules.edit.check];\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tcheck = cell.column.modules.edit.check;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn check;\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\t//handle successful value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = self.chain(\"edit-success\", [cell, value], true, true);\r\n\t\t\t\t\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn valid === true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\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\t\t\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\t\t\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\t\t\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\t\t\t\r\n\t\t\tallowEdit = this.allowEdit(cell);\r\n\t\t\t\r\n\t\t\tif(allowEdit || forceEdit){\r\n\t\t\t\t\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t\t\r\n\t\t\t\tself.currentCell = cell;\r\n\t\t\t\t\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\t\t\t\t\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\t\t\t\t\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\t\t\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\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"cell-editing\", cell);\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\t\t\t\t\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\t\t\t\t\t\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-editing\");\r\n\t\t\t\t\t\tcell.table.element.classList.add(\"tabulator-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\t\t\t\t\t\t\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\t\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\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\t\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\t\t\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"edit-edited-clear\", cell);\r\n\t\t}\r\n\t\t\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\t\t\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 output 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\tgenerateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.generateTableElement(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\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\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\tvar visProp = column.definition[this.colVisProp];\r\n\r\n\t\tif(typeof visProp === \"function\"){\r\n\t\t\tvisProp = visProp.call(this.table, column.getComponent());\r\n\t\t}\r\n\r\n\t\treturn visProp !== false && (column.visible || (!column.visible && visProp));\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 depth\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\t\treturn this.config.rowGroups !== false;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\t\treturn this.config.columnCalcs !== false;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\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\t\tindent = row.level;\r\n\t\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\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\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t\t}\r\n\t\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\tgenerateTableElement(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\tlet rowEl;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\t\theaderEl.appendChild(this.generateHeaderElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\t\tbodyEl.appendChild(this.generateGroupElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\t\tbodyEl.appendChild(this.generateCalcElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\t\trowEl = this.generateRowElement(row, setup, styles);\r\n\r\n\t\t\t\t\tthis.mapElementStyles(((i % 2) && styles.evenRow) ? styles.evenRow : styles.oddRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\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\tgenerateHeaderElement(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\tgenerateGroupElement(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 = 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\tgenerateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.generateRowElement(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\tgenerateRowElement(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, i) => {\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\t\t\t\tcellStyle;\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\t\tvalue = value !== null ? JSON.stringify(value) : \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\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\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\tcellStyle = styles.styleCells && styles.styleCells[index] ? styles.styleCells[index] : styles.firstCell;\r\n\r\n\t\t\t\tif(cellStyle){\r\n\t\t\t\t\tthis.mapElementStyles(cellStyle, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\", \"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"text-align\"]);\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\tgenerateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.generateTableElement(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.generateHTMLTable(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\r\n\t\t//handle successfully 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\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\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\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t}else{\r\n\t\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\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\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 column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\ttype = filterFunc;\r\n\t\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\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\ttype = \"like\";\r\n\t\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\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t\t};\r\n\t\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};\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\tcolumn.modules.filter.value = value;\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\tcolumn.modules.filter.value = initialValue;\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;\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\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"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\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\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\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\t\treturn value !== true && value !== 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}else{\r\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\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}\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\tgetTable:() => {\r\n\t\t\t\t\t\treturn this.table;\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\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\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)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\t\tsuccess(editorElement.value);\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//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\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\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propagating 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//programmatically 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.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//programmatically 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(null, false, false);\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\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}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(true));\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(true), 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\tif (formatterParams.thousand !== false) {\r\n\t\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\t\twhile (rgx.test(integer)){\r\n\t\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t\t}\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\tfunction labelTraverse(path, data){\r\n\t\tvar item = path.shift(),\r\n\t\tvalue = data[item];\r\n\t\t\r\n\t\tif(path.length && typeof value === \"object\"){\r\n\t\t\treturn labelTraverse(path, value);\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = labelTraverse(formatterParams.labelField.split(this.table.options.nestedFieldSeparator), data);\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\t\tlabel = formatterParams.label;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tlabel = formatterParams.label(cell);\r\n\t\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\t\tvalue = formatterParams.url;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\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\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\t\tel.style.height = formatterParams.height;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\t\tel.style.width = formatterParams.width;\r\n\t\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\ttrueValueSet = Object.keys(formatterParams).includes(\"trueValue\"),\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((trueValueSet && value === formatterParams.trueValue) || (!trueValueSet && ((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;\r\n\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\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\tvar newDatetime;\r\n\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\treturn newDatetime.diff(date, unit).toHuman() + (suffix ? \" \" + 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\t\tcolor = colors;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tcolor = colors(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(colors)){\r\n\t\t\t\tvar unit = 100 / colors.length;\r\n\t\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tcolor = colors[index];\r\n\t\t\t\tbreak;\r\n\t\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.max ? formatterParams.max : 100,\r\n\tmin = formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor;\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\t\tcolor = formatterParams.color;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tcolor = formatterParams.color(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\t\tlet unit = 100 / formatterParams.color.length;\r\n\t\t\t\tlet index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tcolor = formatterParams.color[index];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tdefault:\r\n\t\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\t\tlegend = formatterParams.legend;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tlegend = formatterParams.legend(value);\r\n\t\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\t\tlegend = value;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\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\t\tlegendColor = formatterParams.legendColor;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\t\tlet unit = 100 / formatterParams.legendColor.length;\r\n\t\t\t\tlet index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\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.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\tvar content = document.createElement(\"span\");\r\n\tvar row = cell.getRow();\r\n\r\n\trow.watchPosition((position) => {\r\n\t\tcontent.innerText = position;\r\n\t});\r\n\t\r\n\treturn content;\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 el = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\t\r\n\tel.innerHTML = `\r\n \r\n \r\n\r\n\r\n\r\n \r\n`;\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\tcell.getTable().rowManager.adjustTableSize();\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\t\t\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\t\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\t\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\t\t\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\t\t\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\t\t\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\t\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\t\t\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\tconfig.formatter = formatter;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn config;\r\n\t}\r\n\t\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\t\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\t\t\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\t\t\t\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\t\t\t\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\tgetColumn:function(){\r\n\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t},\r\n\t\t\t\tgetTable:() => {\r\n\t\t\t\t\treturn this.table;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\t\t\t\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\t\t\t\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\t\r\n\t\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\t\t\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\t\t\t\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\t\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\t\t\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(cell.getComponent()) : formatter.params;\r\n\t\t\t\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\t\t\t\t\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\t\t\t\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\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\t\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\t\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\t\tformatter = Format.formatters[formatter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t//Custom formatter Function, do nothing\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\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.initializationMode = \"left\";\r\n\t\tthis.active = 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.active = false;\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(\"columns-loading\", this.reset.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"column-add\", this.reinitializeColumns.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.reinitializeColumns.bind(this));\r\n\t\t\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\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.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\treinitializeColumns(){\r\n\t\tthis.reset();\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t});\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\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}\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);\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.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.marginValue = leftMargin;\r\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\r\n\t\t\t\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\t\t\t\r\n\t\t\tcolumn.modules.frozen.marginValue = rightMargin;\r\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\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\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(){\t\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.reinitializeRows();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar visibleRows = this.table.rowManager.getVisibleRows(true);\r\n\t\tvar otherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\r\n\t\t\r\n\t\totherRows.forEach((row) =>{\r\n\t\t\trow.deinitialize();\r\n\t\t});\r\n\t\t\r\n\t\tvisibleRows.forEach((row) =>{\r\n\t\t\tif(row.type === \"row\"){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutRow(row){\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\tvar position;\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"sticky\";\r\n\r\n\t\t\tif(this.table.rtl){\r\n\t\t\t\tposition = column.modules.frozen.position === \"left\" ? \"right\" : \"left\";\r\n\t\t\t}else{\r\n\t\t\t\tposition = column.modules.frozen.position;\r\n\t\t\t}\r\n\t\t\r\n\t\t\telement.style[position] = column.modules.frozen.margin;\r\n\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\r\n\tadjustForScrollbar(width){\r\n\t\tif(this.rightColumns.length){\r\n\t\t\tthis.table.columnManager.getContentsElement().style.width = \"calc(100% - \" + width + \"px)\";\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\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"frozenRowsField\", \"id\"); //field to choose frozen rows by\r\n\t\tthis.registerTableOption(\"frozenRows\", false); //holder for frozen row identifiers\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.getContentsElement().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\r\n\t\tif(this.table.options.frozenRows){\r\n\t\t\tthis.subscribe(\"data-processed\", this.initializeRows.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRows(){\r\n\t\tthis.table.rowManager.getRows().forEach((row) => {\r\n\t\t\tthis.initializeRow(row);\r\n\t\t});\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar frozenRows = this.table.options.frozenRows,\r\n\t\trowType = typeof frozenRows;\r\n\r\n\t\tif(rowType === \"number\"){\r\n\t\t\tif(row.getPosition() && (row.getPosition() + this.rows.length) <= frozenRows){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}else if(rowType === \"function\"){\r\n\t\t\tif(frozenRows.call(this.table, row.getComponent())){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(frozenRows)){\r\n\t\t\tif(frozenRows.includes(row.data[this.options(\"frozenRowsField\")])){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}\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 output = 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\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.table.rowManager.adjustTableSize();\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\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 constraints\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(){\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\t\r\n\t\tif(this.calcs.top){\r\n\t\t\tthis.calcs.top.detachElement();\r\n\t\t\tthis.calcs.top.deleteCells();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.calcs.bottom){\r\n\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t}\r\n\t\t\r\n\t\t\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());\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\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(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\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\tif(this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\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(this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\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() == \"basic\" && !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.updateGroupRows(true);\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() == \"basic\" && !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.updateGroupRows(true);\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(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(component ? 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 Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\t\t\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\t\t\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\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\t\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\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\t\t\t\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\t\t\t\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\t\t\t\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\t\t\t\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\t\t\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\t\t\t\r\n\t\t\tthis.groupIDLookups = [];\r\n\t\t\t\r\n\t\t\tif(Array.isArray(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\t\t\t\t\t\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\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\t\t\t\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\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\t\t\t\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}else{\r\n\t\t\tthis.groupList = [];\r\n\t\t\tthis.groups = {};\r\n\t\t}\r\n\t}\r\n\t\r\n\trowSample(rows, prevValue){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar group = this.getGroups(false)[0];\r\n\t\t\t\r\n\t\t\tprevValue.push(group.getRows(false)[0]);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevValue;\r\n\t}\r\n\t\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\trows = rows.filter((row) => {\r\n\t\t\t\treturn row.type !== \"group\";\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\t\t}else{\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingIndex(row, index, top){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.assignRowToGroup(row);\r\n\t\t\t\r\n\t\t\tvar groupRows = row.modules.group.rows;\r\n\t\t\t\r\n\t\t\tif(groupRows.length > 1){\r\n\t\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\t\tif(top){\r\n\t\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\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\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn index;\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\t\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tthis.refreshData();\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\t\t\t\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\t\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\t\t\t\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\t\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\t\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ? this.getGroupedData() : this.getData();\r\n\t}\r\n\t\r\n\t\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\t\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\trowMoving(from, to, after){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tif(!after && to instanceof Group){\r\n\t\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\t\t\t\r\n\t\t\tif(toGroup === fromGroup){\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t\t}else{\r\n\t\t\t\tif(fromGroup){\r\n\t\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(this.table.options.groupBy && row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.updateGroupRows(true);\r\n\t\t}\t\r\n\t}\r\n\t\r\n\tcellUpdated(cell){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.reassignRowToGroup(cell.row);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\t\t\t\r\n\t\t\tthis.generateGroups(rows);\r\n\t\t\t\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\t\t\t\r\n\t\t\treturn this.updateGroupRows();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\t\t\r\n\t\treturn groupComponents;\r\n\t}\r\n\t\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\t\t\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\treturn groupComponents;\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.table.options.groupBy){\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}\r\n\t}\r\n\t\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\t\t\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\t\t\t\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\t\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\t\t\r\n\t\treturn groupListData;\r\n\t}\r\n\t\r\n\tgetGroupedData(){\r\n\t\t\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\t\r\n\t\tif(this.options(\"dataTree\")){\r\n\t\t\trow = this.table.modules.dataTree.getTreeParentRoot(row);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\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\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\t\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\t\t\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\t\t\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\t\t\t\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\t\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\t\t\r\n\t\toldGroups = oldGroups || [];\r\n\t\t\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\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\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\t\t\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\t\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\t\t\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\t\t\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\t\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;\r\n\t\t\t\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tsamePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\t\t\t\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\t\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\t\t\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\t\t\r\n\t\treturn groupPath;\r\n\t}\r\n\t\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\t\t\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tleft = left + \"px\";\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tgroup.scrollHeader(left);\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}\r\n\t}\r\n\t\r\n\tcheckBasicModeGroupHeaderWidth(){\r\n\t\tvar element = this.table.rowManager.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\t\t\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row, index) =>{\r\n\t\t\tthis.table.rowManager.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\t\t\t\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\t\t\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\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:from.getPosition(), posTo:to.getPosition(), 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()._getSelf().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\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\tif(this.table.originalElement.childNodes.length){\r\n\t\t\t\tthis.parseTable();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element.\");\r\n\t\t\t}\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\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [];\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 don't 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;\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\nimport array from './importers/array.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tarray:array,\r\n};","function csvImporter(input){\r\n\tvar data = [],\r\n\trow = 0, \r\n\tcol = 0,\r\n\tinQuote = false;\r\n \r\n\t//Iterate over each character\r\n\tfor (let index = 0; index < input.length; index++) {\r\n\t\tlet char = input[index], \r\n\t\tnextChar = input[index+1]; \r\n \r\n\t\t//Initialize empty row\r\n\t\tif(!data[row]){\r\n\t\t\tdata[row] = [];\r\n\t\t}\r\n\r\n\t\t//Initialize empty column\r\n\t\tif(!data[row][col]){\r\n\t\t\tdata[row][col] = \"\";\r\n\t\t}\r\n \r\n\t\t//Handle quotation mark inside string\r\n\t\tif (char == '\"' && inQuote && nextChar == '\"') { \r\n\t\t\tdata[row][col] += char; \r\n\t\t\tindex++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//Begin / End Quote\r\n\t\tif (char == '\"') { \r\n\t\t\tinQuote = !inQuote;\r\n\t\t\tcontinue;\r\n\t\t}\r\n \r\n\t\t//Next column (if not in quote)\r\n\t\tif (char == ',' && !inQuote) { \r\n\t\t\tcol++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//New row if new line and not in quote (CRLF) \r\n\t\tif (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n\t\t\tcol = 0; \r\n\t\t\trow++; \r\n\t\t\tindex++; \r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//New row if new line and not in quote (CR or LF) \r\n\t\tif ((char == '\\r' || char == '\\n') && !inQuote) { \r\n\t\t\tcol = 0;\r\n\t\t\trow++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n\r\n\t\t//Normal Character, append to column\r\n\t\tdata[row][col] += char;\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\nexport default csvImporter;","export default function(input){\r\n\ttry {\r\n\t\treturn JSON.parse(input);\r\n\t} catch(e) {\r\n\t\tconsole.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n\t\treturn Promise.reject();\r\n\t}\r\n}","function arrayImporter(input){\r\n\treturn input;\r\n}\r\n\r\nexport default arrayImporter;","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\tconstructor(table){\r\n\t\tsuper(table);\r\n \r\n\t\tthis.registerTableOption(\"importFormat\");\r\n\t\tthis.registerTableOption(\"importReader\", \"text\");\r\n\t}\r\n \r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n\t\tif(this.table.options.importFormat){\r\n\t\t\tthis.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n\t\t\tthis.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n\t\t}\r\n\t}\r\n\r\n\tloadDataCheck(data){\r\n\t\treturn this.table.options.importFormat && (typeof data === \"string\" || (Array.isArray(data) && data.length && Array.isArray(data)));\r\n\t}\r\n\r\n\tloadData(data, params, config, silent, previousData){\r\n\t\treturn this.importData(this.lookupImporter(), data)\r\n\t\t\t.then(this.structureData.bind(this))\r\n\t\t\t.catch((err) => {\r\n\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import data\");\r\n\t\t\t\treturn Promise.reject(err);\r\n\t\t\t});\r\n\t}\r\n\r\n\tlookupImporter(importFormat){\r\n\t\tvar importer;\r\n \r\n\t\tif(!importFormat){\r\n\t\t\timportFormat = this.table.options.importFormat;\r\n\t\t}\r\n \r\n\t\tif(typeof importFormat === \"string\"){\r\n\t\t\timporter = Import.importers[importFormat];\r\n\t\t}else{\r\n\t\t\timporter = importFormat;\r\n\t\t}\r\n\r\n\t\tif(!importer){\r\n\t\t\tconsole.error(\"Import Error - Importer not found:\", importFormat);\r\n\t\t}\r\n \r\n\t\treturn importer;\r\n\t}\r\n \r\n\timportFromFile(importFormat, extension){\r\n\t\tvar importer = this.lookupImporter(importFormat);\r\n \r\n\t\tif(importer){\r\n\t\t\treturn this.pickFile(extension)\r\n\t\t\t\t.then(this.importData.bind(this, importer))\r\n\t\t\t\t.then(this.structureData.bind(this))\r\n\t\t\t\t.then(this.setData.bind(this))\r\n\t\t\t\t.catch((err) => {\r\n\t\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import file\");\r\n\t\t\t\t\treturn Promise.reject(err);\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n \r\n\tpickFile(extensions){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar input = document.createElement(\"input\");\r\n\t\t\tinput.type = \"file\";\r\n\t\t\tinput.accept = extensions;\r\n \r\n\t\t\tinput.addEventListener(\"change\", (e) => {\r\n\t\t\t\tvar file = input.files[0],\r\n\t\t\t\treader = new FileReader();\r\n \r\n\t\t\t\tswitch(this.table.options.importReader){\r\n\t\t\t\t\tcase \"buffer\":\r\n\t\t\t\t\t\treader.readAsArrayBuffer(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"binary\":\r\n\t\t\t\t\t\treader.readAsBinaryString(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"url\":\r\n\t\t\t\t\t\treader.readAsDataURL(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"text\":\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treader.readAsText(file);\r\n\t\t\t\t}\r\n \r\n\t\t\t\treader.onload = (e) => {\r\n\t\t\t\t\tresolve(reader.result);\r\n\t\t\t\t};\r\n \r\n\t\t\t\treader.onerror = (e) => {\r\n\t\t\t\t\tconsole.warn(\"File Load Error - Unable to read file\");\r\n\t\t\t\t\treject();\r\n\t\t\t\t};\r\n\t\t\t});\r\n \r\n\t\t\tinput.click();\r\n\t\t});\r\n\t}\r\n \r\n\timportData(importer, fileContents){\r\n\t\tvar data = importer.call(this.table, fileContents);\r\n \r\n\t\tif(data instanceof Promise){\r\n\t\t\treturn data;\r\n\t\t}else{\r\n\t\t\treturn data ? Promise.resolve(data) : Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tstructureData(parsedData){\r\n\t\tvar data = [];\r\n \r\n\t\tif(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n\t\t\tif(this.table.options.autoColumns){\r\n\t\t\t\tdata = this.structureArrayToObject(parsedData);\r\n\t\t\t}else{\r\n\t\t\t\tdata = this.structureArrayToColumns(parsedData);\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\t\t}else{\r\n\t\t\treturn parsedData;\r\n\t\t}\r\n\t}\r\n\r\n\tstructureArrayToObject(parsedData){\r\n\t\tvar columns = parsedData.shift();\r\n\r\n\t\tvar data = parsedData.map((values) => {\r\n\t\t\tvar row = {};\r\n\r\n\t\t\tcolumns.forEach((key, i) => {\r\n\t\t\t\trow[key] = values[i];\r\n\t\t\t});\r\n\r\n\t\t\treturn row;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tstructureArrayToColumns(parsedData){\r\n\t\tvar data = [],\r\n\t\tcolumns = this.table.getColumns();\r\n\r\n\t\t//remove first row if it is the column names\r\n\t\tif(columns[0] && parsedData[0][0]){\r\n\t\t\tif(columns[0].getDefinition().title === parsedData[0][0]){\r\n\t\t\t\tparsedData.shift();\r\n\t\t\t}\r\n\t\t}\r\n \r\n\t\t//convert row arrays to objects\r\n\t\tparsedData.forEach((rowData) => {\r\n\t\t\tvar row = {};\r\n\r\n\t\t\trowData.forEach((value, index) => {\r\n\t\t\t\tvar column = columns[index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\trow[column.getField()] = value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tdata.push(row);\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n \r\n\tsetData(data){\r\n\t\treturn this.table.setData(data);\r\n\t}\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\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\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\trowMouseDown:\"row-mousedown\",\r\n\t\t\trowMouseUp:\"row-mouseup\",\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\tcellMouseDown:\"cell-mousedown\",\r\n\t\t\tcellMouseUp:\"cell-mouseup\",\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\theaderMouseDown:\"column-mousedown\",\r\n\t\t\theaderMouseUp:\"column-mouseup\",\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\tgroupMouseDown:\"group-mousedown\",\r\n\t\t\tgroupMouseUp:\"group-mouseup\",\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(\"headerMouseDown\");\r\n\t\tthis.registerColumnOption(\"headerMouseUp\");\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(\"cellMouseDown\");\r\n\t\tthis.registerColumnOption(\"cellMouseUp\");\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\tvar range;\r\n\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === cell){\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\trange = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(cell.getElement());\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNode(cell.getElement());\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\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\t\twatchers.tap = true;\r\n\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\t\twatchers.tap = null;\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t\t}, 1000);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\t\twatchers.tap = null;\r\n\t\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(watchers.tapDbl){\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t\t}else{\r\n\t\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\t\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;\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\t\tbinding.ctrl = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\t\tbinding.shift = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\t\tbinding.meta = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\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\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\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.nestedMenuBlock = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\tthis.rootPopup = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"menuContainer\", undefined); //deprecated\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"rowDblClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupDblClickMenu\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerDblClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenuIcon\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t\tthis.registerColumnOption(\"dblClickMenu\");\r\n\t\t\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.deprecatedOptionsCheck();\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\tdeprecatedOptionsCheck(){\r\n\t\tif(!this.deprecationCheck(\"menuContainer\", \"popupContainer\")){\r\n\t\t\tthis.table.options.popupContainer = this.table.options.menuContainer;\r\n\t\t}\r\n\t}\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\t\r\n\t\tif(this.table.options.rowDblClickMenu){\r\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadMenuEvent.bind(this, this.table.options.rowDblClickMenu));\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\t\r\n\t\tif(this.table.options.groupDblClickMenu){\r\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadMenuEvent.bind(this, this.table.options.groupDblClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar\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.headerDblClickMenu && !this.columnSubscribers.headerDblClickMenu){\r\n\t\t\tthis.columnSubscribers.headerDblClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerDblClickMenu\");\r\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickMenu);\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\t\r\n\t\tif(def.dblClickMenu && !this.columnSubscribers.dblClickMenu){\r\n\t\t\tthis.columnSubscribers.dblClickMenu = this.loadMenuTableCellEvent.bind(this, \"dblClickMenu\");\r\n\t\t\tthis.subscribe(\"cell-dblclick\", this.columnSubscribers.dblClickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar icon = column.definition.headerMenuIcon,\r\n\t\theaderMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-popup-button\");\r\n\t\t\r\n\t\tif(icon){\r\n\t\t\tif(typeof icon === \"function\"){\r\n\t\t\t\ticon = icon(column.getComponent());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(icon instanceof HTMLElement){\r\n\t\t\t\theaderMenuEl.appendChild(icon);\r\n\t\t\t}else{\r\n\t\t\t\theaderMenuEl.innerHTML = icon;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t}\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, e, component.getComponent()) : 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, parentPopup){\r\n\t\tvar touch = !(e instanceof MouseEvent),\t\t\r\n\t\tmenuEl = document.createElement(\"div\"),\r\n\t\tpopup;\r\n\t\t\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.rootPopup){\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\tif(this.rootPopup){\r\n\t\t\t\tthis.rootPopup.hide();\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rootPopup = popup = this.popup(menuEl);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpopup = parentPopup.child(menuEl);\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.loadMenu(e, component, item.menu, itemEl, popup);\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\tif(this.rootPopup){\r\n\t\t\t\tthis.rootPopup.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tpopup.show(parentEl || e);\r\n\t\t\r\n\t\tif(popup === this.rootPopup){\r\n\t\t\tthis.rootPopup.hideOnBlur(() => {\r\n\t\t\t\tthis.rootPopup = null;\r\n\t\t\t\t\r\n\t\t\t\tif(this.currentComponent){\r\n\t\t\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\t\t\tthis.currentComponent = null;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.currentComponent = component;\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent());\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 destination 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 && !column.isGroup){\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\tnextCol, 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\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 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\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.getContentsElement(),\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\theaderElement.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.getContentsElement(),\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 destination 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\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, group);\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;\r\n\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\trowEl = 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\trowEl = 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\tnextRow, 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\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 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\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\t\r\n\t\tthis.hoverElement.style.top = Math.min(yPos - this.startY, this.table.rowManager.element.scrollHeight - this.hoverElement.offsetHeight) + \"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 incoming 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\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\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 ? this.moving.getComponent() : undefined, 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\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\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\t\treturn this.connect(table, data.row);\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\t\treturn this.disconnect(table);\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\t\treturn this.dropComplete(table, data.row, data.success);\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 mutation 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\tthis.registerColumnOption(\"mutateLink\");\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(\"cell-value-changed\", this.mutateLink.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\t\tif(Mutator.mutators[value]){\r\n\t\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tmutator = value;\r\n\t\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\tmutateLink(cell){\r\n\t\tvar links = cell.column.definition.mutateLink;\r\n\r\n\t\tif(links){\r\n\t\t\tif(!Array.isArray(links)){\r\n\t\t\t\tlinks = [links];\r\n\t\t\t}\r\n\r\n\t\t\tlinks.forEach((link) => {\r\n\t\t\t\tvar linkCell = cell.row.getCell(link);\r\n\r\n\t\t\t\tif(linkCell){\r\n\t\t\t\t\tlinkCell.setValue(linkCell.getValue(), true, true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\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\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\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.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\t\t\tthis.subscribe(\"footer-redraw\", this.footerRedraw.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\tdisplayRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(displayRows.length){\r\n\t\t\t\tindex = displayRows[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(displayRows.length){\r\n\t\t\t\tindex = displayRows[displayRows.length - 1];\r\n\t\t\t\ttop = displayRows.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\r\n\t\tthis.dispatchExternal(\"pageSizeChanged\", this.size);\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\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){\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.footerAppend(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.footerAppend(this.element);\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\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\t\treturn this.setPage(1);\r\n\t\r\n\t\t\tcase \"prev\":\r\n\t\t\t\treturn this.previousPage();\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\t\treturn this.nextPage();\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\t\treturn this.setPage(this.max);\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.displayRows(-1);\r\n\t\tvar index = rows.indexOf(row);\r\n\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\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t\tthis.dispatchExternal(\"pageSizeChanged\", 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\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//clear previous cell contents\r\n\t\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\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif(content != null){\r\n\t\t\t\t\t\t\tconsole.warn(\"Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:\", content);\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\tcase \"undefined\":\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\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\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\t\tthis.refreshData();\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\t\treturn Promise.resolve();\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\t\tthis.dataChanging = true;\r\n\t\t\t\treturn this.reloadData(null)\r\n\t\t\t\t\t.finally(() => {\r\n\t\t\t\t\t\tthis.dataChanging = false;\r\n\t\t\t\t\t});\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\treturn this.reloadData(null, true);\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar 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\t\tif(this.page == 1){\r\n\t\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\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}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t\t}\r\n\t\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\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\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\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\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\t\tthis.nextPage();\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\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;\r\n","// read persistance 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\tretrievedData;\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\tretrievedData = this.retrieveData(\"page\");\r\n\r\n\t\t\t\tif(retrievedData){\r\n\t\t\t\t\tif(typeof retrievedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retrievedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retrievedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retrievedData.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\tretrievedData = this.retrieveData(\"group\");\r\n\r\n\t\t\t\tif(retrievedData){\r\n\t\t\t\t\tif(typeof retrievedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retrievedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retrievedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retrievedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retrievedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retrievedData.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(\"column-width\", 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 sorters, 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\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: (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:() => {\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.retrieveData(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//retrieve data from memory\r\n\tretrieveData(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\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\t\treturn col.field === subject.field;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\t\treturn col === subject;\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\t\tdata = this.parseColumns(this.table.columnManager.getColumns());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tdata = this.getGroupConfig();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\t\tdata = this.getPageConfig();\r\n\t\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\tkeys.push(\"visible\");\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\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\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}\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 = -10;\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 Popup extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextPopup\", false);\r\n\t\tthis.registerTableOption(\"rowClickPopup\", false);\r\n\t\tthis.registerTableOption(\"rowDblClickPopup\", false);\r\n\t\tthis.registerTableOption(\"groupContextPopup\", false);\r\n\t\tthis.registerTableOption(\"groupClickPopup\", false);\r\n\t\tthis.registerTableOption(\"groupDblClickPopup\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextPopup\");\r\n\t\tthis.registerColumnOption(\"headerClickPopup\");\r\n\t\tthis.registerColumnOption(\"headerDblClickPopup\");\r\n\t\tthis.registerColumnOption(\"headerPopup\");\r\n\t\tthis.registerColumnOption(\"headerPopupIcon\");\r\n\t\tthis.registerColumnOption(\"contextPopup\");\r\n\t\tthis.registerColumnOption(\"clickPopup\");\r\n\t\tthis.registerColumnOption(\"dblClickPopup\");\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"group\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\t\r\n\t}\r\n\t\r\n\tinitialize(){\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\r\n\t_componentPopupCall(component, contents, position){\r\n\t\tthis.loadPopupEvent(contents, null, component, position);\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextPopup){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickPopup){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadPopupEvent.bind(this, this.table.options.rowClickPopup));\r\n\t\t}\r\n\r\n\t\tif(this.table.options.rowDblClickPopup){\r\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadPopupEvent.bind(this, this.table.options.rowDblClickPopup));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextPopup){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickPopup){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadPopupEvent.bind(this, this.table.options.groupClickPopup));\r\n\t\t}\r\n\r\n\t\tif(this.table.options.groupDblClickPopup){\r\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadPopupEvent.bind(this, this.table.options.groupDblClickPopup));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextPopup && !this.columnSubscribers.headerContextPopup){\r\n\t\t\tthis.columnSubscribers.headerContextPopup = this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextPopup);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickPopup && !this.columnSubscribers.headerClickPopup){\r\n\t\t\tthis.columnSubscribers.headerClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerClickPopup\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickPopup);\r\n\t\t\r\n\t\t\r\n\t\t}if(def.headerDblClickPopup && !this.columnSubscribers.headerDblClickPopup){\r\n\t\t\tthis.columnSubscribers.headerDblClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerDblClickPopup\");\r\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickPopup);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerPopup){\r\n\t\t\tthis.initializeColumnHeaderPopup(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextPopup && !this.columnSubscribers.contextPopup){\r\n\t\t\tthis.columnSubscribers.contextPopup = this.loadPopupTableCellEvent.bind(this, \"contextPopup\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextPopup);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadPopupTableCellEvent.bind(this, \"contextPopup\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickPopup && !this.columnSubscribers.clickPopup){\r\n\t\t\tthis.columnSubscribers.clickPopup = this.loadPopupTableCellEvent.bind(this, \"clickPopup\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickPopup);\r\n\t\t}\r\n\r\n\t\tif(def.dblClickPopup && !this.columnSubscribers.dblClickPopup){\r\n\t\t\tthis.columnSubscribers.dblClickPopup = this.loadPopupTableCellEvent.bind(this, \"dblClickPopup\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.dblClickPopup);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderPopup(column){\r\n\t\tvar icon = column.definition.headerPopupIcon,\r\n\t\theaderPopupEl;\r\n\t\t\r\n\t\theaderPopupEl = document.createElement(\"span\");\r\n\t\theaderPopupEl.classList.add(\"tabulator-header-popup-button\");\r\n\r\n\t\tif(icon){\r\n\t\t\tif(typeof icon === \"function\"){\r\n\t\t\t\ticon = icon(column.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tif(icon instanceof HTMLElement){\r\n\t\t\t\theaderPopupEl.appendChild(icon);\r\n\t\t\t}else{\r\n\t\t\t\theaderPopupEl.innerHTML = icon;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\theaderPopupEl.innerHTML = \"⋮\";\r\n\t\t}\r\n\t\t\r\n\t\theaderPopupEl.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.loadPopupEvent(column.definition.headerPopup, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerPopupEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadPopupTableCellEvent(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.loadPopupEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadPopupTableColumnEvent(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.loadPopupEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadPopupEvent(contents, e, component, position){\r\n\t\tvar renderedCallback;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trenderedCallback = callback;\r\n\t\t}\r\n\t\t\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\tcontents = typeof contents == \"function\" ? contents.call(this.table, e, component.getComponent(), onRendered) : contents;\r\n\t\t\r\n\t\tthis.loadPopup(e, component, contents, renderedCallback, position);\r\n\t}\r\n\t\r\n\tloadPopup(e, component, contents, renderedCallback, position){\r\n\t\tvar touch = !(e instanceof MouseEvent),\r\n\t\tcontentsEl, popup;\r\n\t\t\r\n\t\tif(contents instanceof HTMLElement){\r\n\t\t\tcontentsEl = contents;\r\n\t\t}else{\r\n\t\t\tcontentsEl = document.createElement(\"div\");\r\n\t\t\tcontentsEl.innerHTML = contents;\r\n\t\t}\r\n\t\t\r\n\t\tcontentsEl.classList.add(\"tabulator-popup\");\r\n\r\n\t\tcontentsEl.addEventListener(\"click\", (e) =>{\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\tpopup = this.popup(contentsEl);\r\n\r\n\t\tif(typeof renderedCallback === \"function\"){\r\n\t\t\tpopup.renderCallback(renderedCallback);\r\n\t\t}\r\n\r\n\t\tif(e){\r\n\t\t\tpopup.show(e);\r\n\t\t}else{\r\n\t\t\tpopup.show(component.getElement(), position || \"center\");\r\n\t\t}\r\n\r\n\t\t\r\n\t\tpopup.hideOnBlur(() => {\r\n\t\t\tthis.dispatchExternal(\"popupClosed\", component.getComponent());\r\n\t\t});\r\n\r\n\r\n\r\n\t\tthis.dispatchExternal(\"popupOpened\", component.getComponent());\r\n\t}\r\n}\r\n\r\nPopup.moduleName = \"popup\";\r\n\r\nexport default Popup;\r\n","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.generateTable(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.generateTable(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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\t\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\t\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, \"cellsave\"));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this, \"cellsave\"));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this, \"rowsave\"));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this, \"rowsave\"));\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\t\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tversion;\r\n\t\t\r\n\t\tthis.currentVersion ++;\r\n\t\t\r\n\t\tversion = this.currentVersion;\r\n\t\t\r\n\t\tthis.unwatchData();\r\n\t\t\r\n\t\tthis.data = data;\r\n\t\t\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\t\t\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\t\t\t\tresult;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\t\r\n\t\t\t\t\tself.block(\"data-push\");\r\n\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\t\r\n\t\t\t\t\tresult = self.origFuncs.push.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-push\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\t\t\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\t\t\t\tresult;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-unshift\");\r\n\t\t\t\t\t\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\t\r\n\t\t\t\t\tresult = self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-unshift\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\t\t\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, result;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-shift\");\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.shift.call(data);\r\n\r\n\t\t\t\t\tself.unblock(\"data-shift\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\t\t\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, result;\r\n\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-pop\");\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.pop.call(data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-pop\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\t\t\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, result;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-splice\");\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-splice\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result ;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\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\t\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\t\t\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\twatchTreeChildren (row){\r\n\t\tvar self = this,\r\n\t\tchildField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\t\t\r\n\t\tif(childField){\r\n\t\t\t\r\n\t\t\torigFuncs.push = childField.push;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-push\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-push\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-unshift\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-unshift\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-shift\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-shift\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-pop\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-pop\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-splice\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-splice\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\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\t\r\n\trebuildTree(row){\r\n\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t}\r\n\t\r\n\twatchKey(row, data, key){\r\n\t\tvar self = this,\r\n\t\tprops = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\t\t\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(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"key\");\r\n\t\t\t\t\t\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\t\r\n\t\t\t\t\tself.unblock(\"key\");\r\n\t\t\t\t}\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\t\t\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\t\r\n\tblock(key){\r\n\t\tif(!this.blocked){\r\n\t\t\tthis.blocked = key;\r\n\t\t}\r\n\t}\r\n\t\r\n\tunblock(key){\r\n\t\tif(this.blocked === key){\r\n\t\t\tthis.blocked = false;\r\n\t\t}\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.latestX = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.initialNextColumn = null;\r\n\t\tthis.nextColumn = null;\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t\tthis.registerTableOption(\"resizableColumnFit\", false);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-rendered\", this.layoutColumnHeader.bind(this));\r\n\t}\r\n\t\r\n\tinitializeEventWatchers(){\r\n\t\tif(!this.initialized){\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-rendered\", this.layoutCellHandles.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.deInitializeComponent.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-height\", this.resizeHandle.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.columnLayoutUpdated.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-hide\", this.deInitializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.columnLayoutUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"column-width\", this.columnWidthUpdated.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-delete\", this.deInitializeComponent.bind(this));\r\n\t\t\tthis.subscribe(\"column-height\", this.resizeHandle.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.deInitializeComponent(cell);\r\n\t\t\tthis.initializeColumn(\"cell\", cell, cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tif(column.definition.resizable){\r\n\t\t\tthis.initializeEventWatchers();\r\n\t\t\tthis.deInitializeComponent(column);\r\n\t\t\tthis.initializeColumn(\"header\", column, column, column.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolumnLayoutUpdated(column){\r\n\t\tvar prev = column.prevColumn();\r\n\t\t\r\n\t\tthis.reinitializeColumn(column);\r\n\t\t\r\n\t\tif(prev){\r\n\t\t\tthis.reinitializeColumn(prev);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolumnWidthUpdated(column){\r\n\t\tif(column.modules.frozen){\r\n\t\t\tif(this.table.modules.frozenColumns.leftColumns.includes(column)){\r\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((col) => {\r\n\t\t\t\t\tthis.reinitializeColumn(col);\r\n\t\t\t\t});\r\n\t\t\t}else if(this.table.modules.frozenColumns.rightColumns.includes(column)){\r\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((col) => {\r\n\t\t\t\t\tthis.reinitializeColumn(col);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfrozenColumnOffset(column){\r\n\t\tvar offset = false;\r\n\r\n\t\tif(column.modules.frozen){\r\n\t\t\toffset = column.modules.frozen.marginValue; \r\n\r\n\t\t\tif(column.modules.frozen.position === \"left\"){\r\n\t\t\t\toffset += column.getWidth() - 3;\r\n\t\t\t}else{\r\n\t\t\t\tif(offset){\r\n\t\t\t\t\toffset -= 3;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn offset !== false ? offset + \"px\" : false;\r\n\t}\r\n\t\r\n\treinitializeColumn(column){\r\n\t\tvar frozenOffset = this.frozenColumnOffset(column);\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(cell.modules.resize && cell.modules.resize.handleEl){\r\n\t\t\t\tif(frozenOffset){\r\n\t\t\t\t\tcell.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcell.element.after(cell.modules.resize.handleEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(column.modules.resize && column.modules.resize.handleEl){\r\n\t\t\tif(frozenOffset){\r\n\t\t\t\tcolumn.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.element.after(column.modules.resize.handleEl);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(type, component, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable,\r\n\t\tconfig = {},\r\n\t\tnearestColumn = column.getLastColumn();\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\tconfig = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif((mode === true || mode == type) && this._checkResizability(nearestColumn)){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('span');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\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\tself.startColumn = column;\r\n\t\t\t\tself.initialNextColumn = self.nextColumn = nearestColumn.nextColumn();\r\n\t\t\t\tself._mouseDown(e, nearestColumn, handle);\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//resize column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", (e) => {\r\n\t\t\t\tvar oldWidth = nearestColumn.getWidth();\r\n\t\t\t\t\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tnearestColumn.reinitializeWidth(true);\r\n\t\t\t\t\r\n\t\t\t\tif(oldWidth !== nearestColumn.getWidth()){\r\n\t\t\t\t\tself.dispatch(\"column-resized\", nearestColumn);\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", nearestColumn.getComponent());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen){\r\n\t\t\t\thandle.style.position = \"sticky\";\r\n\t\t\t\thandle.style[column.modules.frozen.position] = this.frozenColumnOffset(column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconfig.handleEl = handle;\r\n\t\t\t\r\n\t\t\tif(element.parentNode && column.visible){\r\n\t\t\t\telement.after(handle);\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcomponent.modules.resize = config;\r\n\t}\r\n\t\r\n\tdeInitializeColumn(column){\r\n\t\tthis.deInitializeComponent(column);\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tthis.deInitializeComponent(cell);\r\n\t\t});\r\n\t}\r\n\t\r\n\tdeInitializeComponent(component){\r\n\t\tvar handleEl;\r\n\t\t\r\n\t\tif(component.modules.resize){\r\n\t\t\thandleEl = component.modules.resize.handleEl;\r\n\t\t\t\r\n\t\t\tif(handleEl && handleEl.parentElement){\r\n\t\t\t\thandleEl.parentElement.removeChild(handleEl);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tresizeHandle(component, height){\r\n\t\tif(component.modules.resize && component.modules.resize.handleEl){\r\n\t\t\tcomponent.modules.resize.handleEl.style.height = height;\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\t\t\r\n\t\tfunction mouseMove(e){\r\n\t\t\tvar x = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX,\r\n\t\t\tstartDiff = x - self.startX,\r\n\t\t\tmoveDiff = x - self.latestX,\r\n\t\t\tblockedBefore, blockedAfter;\r\n\t\t\t\r\n\t\t\tself.latestX = x;\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tstartDiff = -startDiff;\r\n\t\t\t\tmoveDiff = -moveDiff;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tblockedBefore = column.width == column.minWidth || column.width == column.maxWidth;\r\n\t\t\t\r\n\t\t\tcolumn.setWidth(self.startWidth + startDiff);\r\n\t\t\t\r\n\t\t\tblockedAfter = column.width == column.minWidth || column.width == column.maxWidth;\r\n\t\t\t\r\n\t\t\tif(moveDiff < 0){\r\n\t\t\t\tself.nextColumn = self.initialNextColumn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.options.resizableColumnFit && self.nextColumn && !(blockedBefore && blockedAfter)){\r\n\t\t\t\tlet colWidth = self.nextColumn.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(moveDiff > 0){\r\n\t\t\t\t\tif(colWidth <= self.nextColumn.minWidth){\r\n\t\t\t\t\t\tself.nextColumn = self.nextColumn.nextColumn();\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(self.nextColumn){\r\n\t\t\t\t\tself.nextColumn.setWidth(self.nextColumn.getWidth() - moveDiff);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.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\t\t\t\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.table.columnManager.verticalAlignHeaders();\r\n\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 interfering 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.latestX = self.startX;\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 interfering 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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.binding = false;\r\n\t\tthis.visibilityObserver = false;\r\n\t\tthis.resizeObserver = false;\r\n\t\tthis.containerObserver = false;\r\n\t\t\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\t\t\r\n\t\tthis.autoResize = false;\r\n\t\t\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.initialRedraw = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\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\t\t\t\r\n\t\t\tif(typeof IntersectionObserver !== \"undefined\" && typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeVisibilityObserver();\r\n\t\t\t\t\r\n\t\t\t\tthis.autoResize = true;\r\n\t\t\t\t\r\n\t\t\t\tthis.resizeObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\t\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tthis.redrawTable();\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\tthis.resizeObserver.observe(table.element);\r\n\t\t\t\t\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tthis.redrawTable();\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.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\t\t\t\t\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\t\t\t\t\t\ttable.columnManager.rerenderColumns(true);\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeVisibilityObserver(){\r\n\t\tthis.visibilityObserver = new IntersectionObserver((entries) => {\r\n\t\t\tthis.visible = entries[0].isIntersecting;\r\n\t\t\t\r\n\t\t\tif(!this.initialized){\r\n\t\t\t\tthis.initialized = true;\r\n\t\t\t\tthis.initialRedraw = !this.visible;\r\n\t\t\t}else{\r\n\t\t\t\tif(this.visible){\r\n\t\t\t\t\tthis.redrawTable(this.initialRedraw);\r\n\t\t\t\t\tthis.initialRedraw = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.visibilityObserver.observe(this.table.element);\r\n\t}\r\n\t\r\n\tredrawTable(force){\r\n\t\tif(this.initialized && this.visible){\r\n\t\t\tthis.table.columnManager.rerenderColumns(true);\r\n\t\t\tthis.table.redraw(force);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\t\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.resizeObserver){\r\n\t\t\tthis.resizeObserver.unobserve(this.table.element);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.visibilityObserver){\r\n\t\t\tthis.visibilityObserver.unobserve(this.table.element);\r\n\t\t}\r\n\t\t\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\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\t\t\t\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.generateCollapsedRowContent.bind(this));\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 working = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = this.table.modules.layout.getMode() == \"fitColumns\" ? this.table.columnManager.getFlexBaseWidth() : this.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (this.table.options.headerVisible ? this.table.columnManager.element.clientWidth : this.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 = this.columns[this.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.hideColumn(column);\r\n\t\t\t\t\tthis.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 = this.columns[this.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\tthis.showColumn(column);\r\n\t\t\t\t\t\t\tthis.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(!this.table.rowManager.activeRowsCount){\r\n\t\t\t\tthis.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.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 data = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach((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 && this.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\tgetTable:() => {\r\n\t\t\t\t\t\t\treturn this.table;\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(this.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;\r\n","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 whether 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\t\tthis.table.rowManager.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\tthis._rowSelectionChanged();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\t\tif(rowMatch){\r\n\t\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowMatch = this.table.rowManager.getRows(rows);\r\n\t\t\t\t\t\r\n\t\t\t\t\trowMatch.forEach((row) => {\r\n\t\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(rowMatch.length){\r\n\t\t\t\t\t\tthis._rowSelectionChanged();\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\t\t\tdefault:\r\n\t\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t\t}\r\n\t\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\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\tif(!DT.isDateTime(a)){\r\n\t\t\tif(format === \"iso\"){\r\n\t\t\t\ta = DT.fromISO(String(a));\r\n\t\t\t}else{\r\n\t\t\t\ta = DT.fromFormat(String(a), format);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(!DT.isDateTime(b)){\r\n\t\t\tif(format === \"iso\"){\r\n\t\t\t\tb = DT.fromISO(String(b));\r\n\t\t\t}else{\r\n\t\t\t\tb = DT.fromFormat(String(b), format);\r\n\t\t\t}\r\n\t\t}\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\t\tif(params.locale){\r\n\t\t\t\t\tlocale = this.langLocale();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\t\tlocale = params.locale;\r\n\t\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 type = params.type || \"length\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\t\tvar result;\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\t\tresult = value.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\t\tresult = value.reduce(function(c, d){\r\n\t\t\t\t\treturn c + d;\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\t\tresult = Math.max.apply(null, value) ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\t\tresult = Math.min.apply(null, value) ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\t\tresult = value.reduce(function(c, d){\r\n\t\t\t\t\treturn c + d;\r\n\t\t\t\t}) / value.length;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\temptyAlign = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\treturn calc(b) - calc(a);\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\t\tthis.registerTableOption(\"headerSortClickElement\", \"header\"); //element which triggers sort when clicked\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\tinitialize(){\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\ttableBuilt(){\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\tremoteSortParams(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\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tsorter = column.definition.sorter;\r\n\t\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\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tswitch(this.table.options.headerSortClickElement){\r\n\t\t\t\tcase \"icon\":\r\n\t\t\t\t\tarrowEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tswitch(this.table.options.headerSortElement){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault:\r\n\t\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\tthis.setColumnHeaderSortIcon(column, \"none\");\r\n\r\n\t\t\t//sort on click\r\n\t\t\t(this.table.options.headerSortClickElement === \"icon\" ? arrowEl : colEl).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\t\tdir = \"desc\";\r\n\t\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\t\tdir = \"asc\";\r\n\t\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\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\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\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push(match);\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(null, false, false);\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\t\tsorter = \"string\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t\t}else{\r\n\t\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\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\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\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;\r\n\r\n\t\t\t\tif(item.column){\r\n\t\t\t\t\tsortObj = item.column.modules.sort;\r\n\r\n\t\t\t\t\tif(sortObj){\r\n\r\n\t\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t\t}\r\n\r\n\t\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\t\tsortListActual.push(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t\t}\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((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\tthis.setColumnHeaderSortIcon(column, \"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 === \"asc\" ? \"ascending\" : \"descending\");\r\n\t\tthis.setColumnHeaderSortIcon(column, dir);\r\n\t}\r\n\r\n\tsetColumnHeaderSortIcon(column, dir){\r\n\t\tvar sortEl = column.modules.sort.element,\r\n\t\tarrowEl;\r\n\r\n\t\tif(column.definition.headerSort && typeof this.table.options.headerSortElement === \"function\"){\r\n\t\t\twhile(sortEl.firstChild) sortEl.removeChild(sortEl.firstChild);\r\n\r\n\t\t\tarrowEl = this.table.options.headerSortElement.call(this.table, column.getComponent(), dir);\r\n\t\t\t\r\n\t\t\tif(typeof arrowEl === \"object\"){\r\n\t\t\t\tsortEl.appendChild(arrowEl);\r\n\t\t\t}else{\r\n\t\t\t\tsortEl.innerHTML = arrowEl;\r\n\t\t\t}\r\n\t\t}\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;\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;","import Module from '../../core/Module.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nclass Tooltip extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.tooltipSubscriber = null,\r\n\t\tthis.headerSubscriber = null,\r\n\t\t\r\n\t\tthis.timeout = null;\r\n\t\tthis.popupInstance = null;\r\n\t\t\r\n\t\tthis.registerTableOption(\"tooltipGenerationMode\", undefined); //deprecated\r\n\t\tthis.registerTableOption(\"tooltipDelay\", 300); \r\n\t\t\r\n\t\tthis.registerColumnOption(\"tooltip\");\r\n\t\tthis.registerColumnOption(\"headerTooltip\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.deprecatedOptionsCheck();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tdeprecatedOptionsCheck(){\r\n\t\tthis.deprecationCheckMsg(\"tooltipGenerationMode\", \"This option is no longer needed as tooltips are always generated on hover now\");\r\n\t}\t\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.headerTooltip && !this.headerSubscriber){\r\n\t\t\tthis.headerSubscriber = true;\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-mousemove\", this.mousemoveCheck.bind(this, \"headerTooltip\"));\r\n\t\t\tthis.subscribe(\"column-mouseout\", this.mouseoutCheck.bind(this, \"headerTooltip\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition.tooltip && !this.tooltipSubscriber){\r\n\t\t\tthis.tooltipSubscriber = true;\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-mousemove\", this.mousemoveCheck.bind(this, \"tooltip\"));\r\n\t\t\tthis.subscribe(\"cell-mouseout\", this.mouseoutCheck.bind(this, \"tooltip\"));\r\n\t\t}\r\n\t}\r\n\t\r\n\tmousemoveCheck(action, e, component){\r\n\t\tvar tooltip = action === \"tooltip\" ? component.column.definition.tooltip : component.definition.headerTooltip;\r\n\t\t\r\n\t\tif(tooltip){\r\n\t\t\tthis.clearPopup();\r\n\t\t\tthis.timeout = setTimeout(this.loadTooltip.bind(this, e, component, tooltip), this.table.options.tooltipDelay);\r\n\t\t}\r\n\t}\r\n\r\n\tmouseoutCheck(action, e, component){\r\n\t\tif(!this.popupInstance){\r\n\t\t\tthis.clearPopup();\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearPopup(action, e, component){\r\n\t\tclearTimeout(this.timeout);\r\n\t\tthis.timeout = null;\r\n\t\t\r\n\t\tif(this.popupInstance){\r\n\t\t\tthis.popupInstance.hide();\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadTooltip(e, component, tooltip){\r\n\t\tvar contentsEl, renderedCallback, coords;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trenderedCallback = callback;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof tooltip === \"function\"){\r\n\t\t\ttooltip = tooltip(e, component.getComponent(), onRendered);\r\n\t\t}\r\n\t\t\r\n\t\tif(tooltip instanceof HTMLElement){\r\n\t\t\tcontentsEl = tooltip;\r\n\t\t}else{\r\n\t\t\tcontentsEl = document.createElement(\"div\");\r\n\t\t\t\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(component instanceof Cell){\r\n\t\t\t\t\ttooltip = component.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(component.definition.field){\r\n\t\t\t\t\t\tthis.langBind(\"columns|\" + component.definition.field, (value) => {\r\n\t\t\t\t\t\t\tcontentsEl.innerHTML = tooltip = value || component.definition.title;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\ttooltip = component.definition.title;\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\tcontentsEl.innerHTML = tooltip;\r\n\t\t}\r\n\t\t\r\n\t\tif(tooltip || tooltip === 0 || tooltip === false){\r\n\t\t\tcontentsEl.classList.add(\"tabulator-tooltip\");\r\n\r\n\t\t\tcontentsEl.addEventListener(\"mousemove\", e => e.preventDefault());\r\n\t\t\t\r\n\t\t\tthis.popupInstance = this.popup(contentsEl);\r\n\t\t\t\r\n\t\t\tif(typeof renderedCallback === \"function\"){\r\n\t\t\t\tthis.popupInstance.renderCallback(renderedCallback);\r\n\t\t\t}\r\n\r\n\t\t\tcoords = this.popupInstance.containerEventCoords(e);\r\n\t\t\t\r\n\t\t\tthis.popupInstance.show(coords.x + 15, coords.y + 15).hideOnBlur(() => {\r\n\t\t\t\tthis.dispatchExternal(\"TooltipClosed\", component.getComponent());\r\n\t\t\t\tthis.popupInstance = null;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"TooltipOpened\", component.getComponent());\r\n\t\t}\r\n\t}\r\n}\r\n\r\nTooltip.moduleName = \"tooltip\";\r\n\r\nexport default Tooltip;\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\r\n\t\tvalue = Number(value);\r\n\r\n\t\treturn !isNaN(value) && 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\t\r\n\t\tvalue = Number(value);\r\n\r\n\t\treturn !isNaN(value) && 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\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn 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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.invalidCells = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\t\t\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\t\t\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\t\t\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\t\t\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\t\r\n\t\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\t\r\n\t\tthis.subscribe(\"edit-success\", this.editValidate.bind(this));\r\n\t\tthis.subscribe(\"edit-editor-clear\", this.editorClear.bind(this));\r\n\t\tthis.subscribe(\"edit-edited-clear\", this.editedClear.bind(this));\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Event Handling //////////\r\n\t///////////////////////////////////\r\n\t\r\n\teditValidate(cell, value, previousValue){\r\n\t\tvar valid = this.table.options.validationMode !== \"manual\" ? this.validate(cell.column.modules.validate, cell, value) : true;\r\n\t\t\r\n\t\t// allow time for editor to make render changes then style cell\r\n\t\tif(valid !== true){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\tthis.dispatchExternal(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn valid;\r\n\t}\r\n\t\r\n\teditorClear(cell, cancelled){\r\n\t\tif(cancelled){\r\n\t\t\tif(cell.column.modules.validate){\r\n\t\t\t\tthis.cellValidate(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t}\r\n\t\r\n\teditedClear(cell){\r\n\t\tif(cell.modules.validate){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? (cell.modules.validate.invalid || true) : true;\r\n\t}\r\n\t\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(this.cellValidate(cell) !== true){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\t\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\t\t\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(this.cellValidate(cell) !== true){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\t\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\t\t\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\t\t\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\t\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\t\t\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\t\t\t\r\n\t\t\tvar valid = row.validate();\r\n\t\t\t\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\t\t\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\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\t\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\t\t\r\n\t\tif(column.definition.validator){\r\n\t\t\t\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\t\t\t\t\t\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\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\t\t\t\t\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\t\t\t\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\t\t\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tpos = value.indexOf(':');\r\n\t\t\t\r\n\t\t\t\tif(pos > -1){\r\n\t\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttype = value;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\treturn this._buildValidator(type, params);\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\treturn this._buildValidator(value);\r\n\t\t\t\r\n\t\t\tcase \"object\":\r\n\t\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_buildValidator(type, params){\r\n\t\t\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\t\t\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\t\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tfailedValidators = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\t\t\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\tfailedValidators.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\t\t\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\t\t\r\n\t\tif(!failedValidators.length){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t\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 = failedValidators;\r\n\t\t\t\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\t\t\t\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\t\t\r\n\t\treturn failedValidators.length ? failedValidators : true;\r\n\t}\r\n\t\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\t\t\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\t\t\t\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\t\t\t\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;\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 (let 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 (let 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 determine how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the container 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 scrolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has resized, 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, return 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\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"top\":\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = rowEl.offsetTop;\t\t\t\t\t\r\n\t\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\n\r\nexport default class BasicHorizontal 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\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\t\t\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(){\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}\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}\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}\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\t\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\t\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\t\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\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\twidth;\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tif(!column.modules.frozen){\t\t\t\r\n\t\t\t\t\twidth = column.getWidth();\r\n\r\n\t\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\t\r\n\t\t\t\t\tconfig.width = width;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// column is hidden\r\n\t\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\t\tthis.vDomPadRight += width;\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.columns.push(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcolPos += width;\r\n\t\t\t\t}\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\trow, 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 && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\r\n\t\t\t\trow = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t})[0];\r\n\t\t\t\t\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(let colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rerenderColumns(false, true);\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 visibleRows = this.getVisibleRows(),\r\n\t\totherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\r\n\r\n\t\tvisibleRows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\r\n\t\totherRows.forEach((row) =>{\r\n\t\t\trow.deinitialize();\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\t\t\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\t\t\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\r\n\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().insertBefore(cell.getElement(), row.getCell(this.columns[this.rightCol]).getElement().nextSibling);\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\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().insertBefore(cell.getElement(), row.getCell(this.columns[this.leftCol]).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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\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\r\n\t\t\tif(this.table.modules.frozenColumns){\r\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((column) => {\r\n\t\t\t\t\tthis.appendCell(row, column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tthis.appendCell(row, this.columns[i]);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.frozenColumns){\r\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((column) => {\r\n\t\t\t\t\tthis.appendCell(row, column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tappendCell(row, column){\r\n\t\tif(column && column.visible){\r\n\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\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\t\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\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\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.contentsElement = 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\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockUpdate = null; //store latest redraw update only status\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\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.contentsElement = this.createHeaderContentsElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\t\t\r\n\t\tthis.contentsElement.insertBefore(this.headersElement, this.contentsElement.firstChild);\r\n\t\tthis.element.insertBefore(this.contentsElement, this.element.firstChild);\r\n\t\t\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"scrollbar-vertical\", this.padVerticalScrollbar.bind(this));\r\n\t}\r\n\r\n\tpadVerticalScrollbar(width){\r\n\t\tif(this.table.rtl){\r\n\t\t\tthis.headersElement.style.marginLeft = width + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.headersElement.style.marginRight = width + \"px\";\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\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\t\t\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\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}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", this.table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderContentsElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-header-contents\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\t\t\r\n\t\treturn el;\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\r\n\t//return containing contents element\r\n\tgetContentsElement(){\r\n\t\treturn this.contentsElement;\r\n\t}\r\n\t\r\n\t\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\t\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tthis.contentsElement.scrollLeft = left;\r\n\r\n\t\tthis.scrollLeft = left;\r\n\t\t\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\t\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\t\t\r\n\t\tif(data && data.length){\r\n\t\t\t\r\n\t\t\trow = data[0];\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tlet value = row[key];\r\n\t\t\t\t\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\t\tsorter = \"array\";\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\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t\t}else{\r\n\t\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\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcol.sorter = sorter;\r\n\t\t\t\t\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(definitions){\r\n\t\t\t\t\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\t\tObject.assign(col, 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\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\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\t\r\n\t\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\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\t\t\t\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\t\t\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\t\t\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\t\t\r\n\t\tthis._reIndexColumns();\r\n\t\t\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\t\t\r\n\t\tthis.rerenderColumns(false, true);\r\n\t\t\r\n\t\tthis.redraw(true);\r\n\t}\r\n\t\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\t\t\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\t\t\t\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\t\t\r\n\t\tcolumn.columnRendered();\r\n\t\t\r\n\t\treturn column;\r\n\t}\r\n\t\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\t\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\t\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\t\t\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\t\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\t\t\r\n\t\tif(!this.redrawBlock){\r\n\r\n\t\t\tthis.headersElement.style.height=\"\";\r\n\t\t\t\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumn.clearVerticalAlign();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tvar height = column.getHeight();\r\n\t\t\t\t\r\n\t\t\t\tif(height > minHeight){\r\n\t\t\t\t\tminHeight = height;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.headersElement.style.height = minHeight + \"px\";\r\n\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tvar columns;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\t\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\r\n\t\t\t\tcolumns = [];\r\n\r\n\t\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\t\tcolumns.push(column);\r\n\t\t\t\t\tcolumns = columns.concat(column.getColumns(true));\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = columns.find((column) => {\r\n\t\t\t\t\treturn column.element === 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\t\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\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\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\t\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\t\t\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\t\t\r\n\t\treturn matches;\r\n\t}\r\n\t\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\t\r\n\tgetFirstVisibleColumn(){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\t\t\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\t\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\t\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\t\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\t\r\n\t//traverse 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\t\r\n\t//get definitions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\t\t\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\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\t\t\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\t\t\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\t\t\r\n\t\treturn width;\r\n\t}\r\n\t\r\n\tmoveColumn(from, to, after){\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\t\t\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\t\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\t\t\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\t\t\r\n\t\tthis.rerenderColumns(true);\r\n\t\t\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\t\t\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\t\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\t\t\r\n\t\tif (fromIndex > -1) {\r\n\t\t\t\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\t\t\t\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\t\t\t\r\n\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\t\t\t\r\n\t\t\tif(updateRows){\r\n\t\t\t\t\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\t\t\t\t\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\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\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\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\t\t\t\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\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\t\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\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\t\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\t\t\t\t\t\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\t\t\t\t\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\t\t\t\t\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\t\t\t\t\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\t\t\t\t\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\t\t\t\r\n\t\t});\r\n\t}\r\n\t\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\t\t\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\t\t\r\n\t\treturn cells;\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\t\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\t\t\t\t\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn fixedWidth;\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis._reIndexColumns();\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\t\t\t\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.redraw(true);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t\t\r\n\t\t\tthis.rerenderColumns();\r\n\t\t\t\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\t\t\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\t\t\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.verticalAlignHeaders();\r\n\t\t\r\n\t\tthis.redraw();\r\n\t}\r\n\t\r\n\trerenderColumns(update, silent){\r\n\t\tif(!this.redrawBlock){\r\n\t\t\tthis.renderer.rerenderColumns(update, silent);\r\n\t\t}else{\r\n\t\t\tif(update === false || (update === true && this.redrawBlockUpdate === null)){\r\n\t\t\t\tthis.redrawBlockUpdate = update;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockRedraw(){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockUpdate = null;\r\n\t}\r\n\t\r\n\trestoreRedraw(){\r\n\t\tthis.redrawBlock = false;\r\n\t\tthis.verticalAlignHeaders();\r\n\t\tthis.renderer.rerenderColumns(this.redrawBlockUpdate);\r\n\t\t\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh(force);\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\t\t\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 BasicVertical 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 position 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\tif(this.rows().length){\r\n\t\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\t\t}else{\r\n\t\t\tthis.clear();\r\n\t\t\tthis.table.rowManager._showPlaceholder();\r\n\t\t}\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 row height 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\t\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t\t}\r\n\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\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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.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\r\n\t\tthis.scrollbarWidth = 0;\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\t// el.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\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\t\t\t\t\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}else if(subject === null){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\"){\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){\r\n\t\treturn this.getDisplayRows().find((row) => {\r\n\t\t\treturn row.getPosition() === position && row.isDisplayed();\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.regenerateRowPositions();\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 rows = [];\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\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.regenerateRowPositions();\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.regenerateRowPositions();\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\t\r\n\t\tif(!this.table.destroyed){\r\n\t\t\tif(typeof handler === \"function\"){\r\n\t\t\t\tindex = this.dataPipeline.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 = \"dataPipeline\";\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.dataPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"display\";\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\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(index > -1){\r\n\t\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tindex++;\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.error(\"Unable to refresh data, invalid handler provided\", handler);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tstage = handler || \"all\";\r\n\t\t\t\tindex = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.redrawBlock){\r\n\t\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\t\thandler: handler,\r\n\t\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\t\tstage:stage,\r\n\t\t\t\t\t\tindex:index,\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t}else{\r\n\t\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\t\tthis.table.columnManager.redraw(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\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t\t}\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 all data needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\t\tindex = 0;\r\n\t\t\t\tthis.resetDisplayRows();\r\n\t\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\r\n\t\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t\t\tthis.regenerateRowPositions();\r\n\t\t}\r\n\r\n\t\tif(this.getDisplayRows().length){\r\n\t\t\tthis._clearPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row positions\r\n\tregenerateRowPositions(){\r\n\t\tvar rows = this.getDisplayRows();\r\n\t\tvar index = 1;\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tif (row.type === \"row\"){\r\n\t\t\t\trow.setPosition(index);\r\n\t\t\t\tindex++;\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\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\tthis.displayRows[index] = displayRows;\r\n\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}\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 across 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\r\n\t\tif(!type || type === true){\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}else{\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\t\trows = this.activeRows;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"display\":\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\t\t\tbreak;\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\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.dispatchExternal(\"renderStarted\");\r\n\t\t\t\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\r\n\t\t\tif(!this.fixedHeight){\r\n\t\t\t\tthis.adjustTableSize();\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollBarCheck();\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tscrollBarCheck(){\r\n\t\tvar scrollbarWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(this.element.scrollHeight > this.element.clientHeight){\r\n\t\t\tscrollbarWidth = this.element.offsetWidth - this.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tif(scrollbarWidth !== this.scrollbarWidth){\r\n\t\t\tthis.scrollbarWidth = scrollbarWidth;\r\n\t\t\tthis.dispatch(\"scrollbar-vertical\", scrollbarWidth);\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.renderMode = this.table.options.renderVertical;\r\n\t\t\t\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:\", this.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(true);\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\r\n\t\tthis.scrollBarCheck();\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(){\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\r\n\t\t// clear empty table placeholder min\r\n\t\tthis.tableElement.style.minWidth = \"\";\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, minHeight;\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\tminHeight = isNaN(this.table.options.minHeight) ? this.table.options.minHeight : this.table.options.minHeight + \"px\";\r\n\t\t\t\t\r\n\t\t\t\tthis.element.style.minHeight = 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\r\n\t\t\tthis.scrollBarCheck();\r\n\t\t}\r\n\t\t\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//reinitialize 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 left = 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}\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\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\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){\r\n\t\tthis.activate();\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){\r\n\t\tthis.activate();\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(){\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\t}\r\n\r\n\tredraw(){\r\n\t\tthis.dispatch(\"footer-redraw\");\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.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\"mouseup\",\r\n\t\t\t\"mousedown\",\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, this.pseudoTrackers[key].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\tif(!targets[this.componentMap[target]]){\r\n\t\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t\t}\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\tmatches = {},\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\ttarget = targets[key],\r\n\t\t\tpreviousTarget = 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\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\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\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\t\treturn row.getElement() === target;\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\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\t\ttargets[key] = 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\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t\t}\r\n\t\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\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\t\tif(matches[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\t\tcomponent = matches[\"row\"].findCell(target);\r\n\t\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\t\t\t\t\t\t\t\t\tconsole.warn(\"Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?\");\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\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\tmatches[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 matches;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\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\tif(this.table.options.debugInvalidComponentFuncs){\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\t}\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.requestOrder = 0; //prevent requests coming 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\r\n\tload(data, params, config, replace, silent, columnsChanged){\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.alertLoader();\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.clearAlert();\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, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\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.alertError();\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.clearAlert();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t\t.finally(() => {\r\n\t\t\t\t\tthis.loading = false;\r\n\t\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, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\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\talertLoader(){\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.table.alertManager.alert(this.table.options.dataLoaderLoading || this.langText(\"data|loading\"));\r\n\t\t}\r\n\t}\r\n\r\n\talertError(){\r\n\t\tthis.table.alertManager.alert(this.table.options.dataLoaderError || this.langText(\"data|error\"), \"error\");\r\n\t}\r\n\r\n\tclearAlert(){\r\n\t\tthis.table.alertManager.clear();\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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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_notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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_notifySubscriptionChange(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\tsubscriber.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 CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DeprecationAdvisor extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\t\r\n\t_warnUser(){\r\n\t\tif(this.options(\"debugDeprecation\")){\r\n\t\t\tconsole.warn(...arguments);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheck(oldOption, newOption){\r\n\t\tvar msg = \"\";\r\n\t\t\r\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\r\n\t\t\tmsg = \"Deprecated Setup Option - Use of the %c\" + oldOption + \"%c option is now deprecated\";\r\n\t\t\t\r\n\t\t\tif(newOption){\r\n\t\t\t\tmsg = msg + \", Please use the %c\" + newOption + \"%c option instead\";\r\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t}else{\r\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMsg(oldOption, msg){\r\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\r\n\t\t\tthis._warnUser(\"%cDeprecated Setup Option - Use of the %c\" + oldOption + \" %c option is now deprecated, \" + msg, 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tmsg(msg){\r\n\t\tthis._warnUser(msg);\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 and stretch row to fill table, also used for fitDataTable\r\nexport default function(columns, forced){\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, forced){\r\n\tif(forced){\r\n\t\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\t}\r\n\t\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, forced){\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, forced){\r\n\tvar totalWidth = this.table.rowManager.element.getBoundingClientRect().width; //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 across 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 across 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\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 = 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\tgapFill = 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//calculate 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(gapFill && 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(dataChanged){\r\n\t\tthis.dispatch(\"layout-refreshing\");\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex, dataChanged);\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 placeholder\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 language 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//determining 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 fillPath = value ? path + \"|\" + value : path,\r\n\t\tpathArray = fillPath.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//iterate 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\t\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFunctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\t\t\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\t\r\n\tbindStaticFunctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\t\t\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\t\t\t\t\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\t\t\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\t\t\t\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\t\t\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\t\t\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\t\t\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedStartMods = [],\r\n\t\t\torderedEndMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\t\t\t\r\n\t\t\tthis.modules = {};\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.modules[name] = module;\r\n\t\t\t\t\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\tif(mod.moduleInitOrder < 0){\r\n\t\t\t\t\t\t\torderedStartMods.push(module);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\torderedEndMods.push(module);\r\n\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\tunOrderedMods.push(module);\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\torderedStartMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\t\t\torderedEndMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\t\t\t\r\n\t\t\tthis.modulesRegular = orderedStartMods.concat(unOrderedMods.concat(orderedEndMods));\r\n\t\t};\r\n\t}\r\n\t\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\t\t\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\t\t\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class Alert extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n \r\n\t\tthis.element = this._createAlertElement();\r\n\t\tthis.msgElement = this._createMsgElement();\r\n\t\tthis.type = null;\r\n \r\n\t\tthis.element.appendChild(this.msgElement);\r\n\t}\r\n \r\n\t_createAlertElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-alert\");\r\n\t\treturn el;\r\n\t}\r\n \r\n\t_createMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-alert-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\t\treturn el;\r\n\t}\r\n \r\n\t_typeClass(){\r\n\t\treturn \"tabulator-alert-state-\" + this.type;\r\n\t}\r\n \r\n\talert(content, type = \"msg\"){\r\n\t\tif(content){\r\n\t\t\tthis.clear();\r\n \r\n\t\t\tthis.type = type;\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.add(this._typeClass());\r\n \r\n\t\t\tif(typeof content === \"function\"){\r\n\t\t\t\tcontent = content();\r\n\t\t\t}\r\n \r\n\t\t\tif(content instanceof HTMLElement){\r\n\t\t\t\tthis.msgElement.appendChild(content);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = content;\r\n\t\t\t}\r\n \r\n\t\t\tthis.table.element.appendChild(this.element);\r\n\t\t}\r\n\t}\r\n \r\n\tclear(){\r\n\t\tif(this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n \r\n\t\tthis.msgElement.classList.remove(this._typeClass());\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 DeprecationAdvisor from './tools/DeprecationAdvisor.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\nimport Alert from './tools/Alert.js';\r\n\r\nclass Tabulator {\r\n\t\r\n\tconstructor(element, options){\r\n\t\t\r\n\t\tthis.options = {};\r\n\t\t\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.alertManager = null; //hold Alert 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\t\t\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\t\t\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\t\t\r\n\t\tthis.deprecationAdvisor = new DeprecationAdvisor(this);\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.destroyed = false;\r\n\t\t\r\n\t\tif(this.initializeElement(element)){\r\n\t\t\t\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\t\t\t\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\t\t\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\t\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\t\t\t\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\t\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\t\tthis.alertManager = new Alert(this);\r\n\t\t\r\n\t\tthis.bindModules();\r\n\t\t\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options);\r\n\t\t\r\n\t\tthis._clearObjectPointers();\r\n\t\t\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\t\t\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\t\t\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\t\t\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\t\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\t\r\n\t_clearSelection(){\r\n\t\t\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\tif (window.getSelection) {\r\n\t\t\tif (window.getSelection().empty) { // Chrome\r\n\t\t\t\twindow.getSelection().empty();\r\n\t\t\t} else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t}\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\t\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\t\t\r\n\t\tthis._rtlCheck();\r\n\t\t\r\n\t\tthis._buildElement();\r\n\t\t\r\n\t\tthis._initializeTable();\r\n\t\t\r\n\t\tthis._loadInitialData();\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\t\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\t\t\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"rtl\":\r\n\t\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\t\tthis.rtl = true;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"ltr\":\r\n\t\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\t\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\t\t\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\t\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\t\t\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\t\t\t\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\t\t\t\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\t\t\t\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\t\t\t\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\t\t\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\t\t\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\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\t\t\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\t\t\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\t\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\t\t\r\n\t\tthis.interactionMonitor.initialize();\r\n\t\t\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\t\t\r\n\t\tthis._detectBrowser();\r\n\t\t\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\t\t\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\t\t\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\t\t\r\n\t\tif(options.autoColumns && options.data){\r\n\t\t\t\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\t\t\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\t\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\t\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\t\t\r\n\t\tthis.destroyed = true;\r\n\t\t\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\t\t\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\t\t\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\t\t\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\t\t\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\r\n\t\tthis.externalEvents.dispatch(\"tableDestroyed\");\r\n\t}\r\n\t\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\t\t\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\t\t\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\t\r\n\tinitGuard(func, msg){\r\n\t\tvar stack, line;\r\n\t\t\r\n\t\tif(this.options.debugInitialization && !this.initialized){\r\n\t\t\tif(!func){\r\n\t\t\t\tstack = new Error().stack.split(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tline = stack[0] == \"Error\" ? stack[2] : stack[1];\r\n\t\t\t\t\r\n\t\t\t\tif(line[0] == \" \"){\r\n\t\t\t\t\tfunc = line.trim().split(\" \")[1].split(\".\")[1];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfunc = line.trim().split(\"@\")[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconsole.warn(\"Table Not Initialized - Calling the \" + func + \" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function.\" + (msg ? \" \" + msg : \"\"));\r\n\t\t}\r\n\t\t\r\n\t\treturn this.initialized;\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-blocking\");\r\n\t\t\r\n\t\tthis.rowManager.blockRedraw();\r\n\t\tthis.columnManager.blockRedraw();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-blocked\");\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-restoring\");\r\n\r\n\t\tthis.rowManager.restoreRedraw();\r\n\t\tthis.columnManager.restoreRedraw();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-restored\");\r\n\t}\r\n\t\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tthis.initGuard(false, \"To set initial data please use the 'data' property in the table constructor.\");\r\n\t\t\r\n\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t}\r\n\t\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\t\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\t\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\t\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t}\r\n\t\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data && data.length > 0){\r\n\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\tresponses++;\r\n\t\t\t\t\t\t\r\n\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\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}\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\taddData(data, pos, index){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data){\r\n\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\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data && data.length > 0){\r\n\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tresponses++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\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\t\t\t\t\t\t\t\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}else{\r\n\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\t\t\t\t\t\t\t\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}\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\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\t\r\n\t//get row object\r\n\tgetRowFromPosition(position){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position);\r\n\t\t\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\t\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\t\t\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\t\t\t\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}\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\t\t\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\t\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\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}\r\n\t\r\n\t//update a row if it exists otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t\t.then(()=>{\r\n\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t\t.then((rows)=>{\r\n\t\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t\t.then(()=>{\r\n\t\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\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\t\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\t\t\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\t\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\t\r\n\t}\r\n\t\r\n\t//get position of row in table\r\n\tgetRowPosition(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.getPosition();\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\t\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tthis.initGuard(false, \"To set initial columns please use the 'columns' property in the table constructor\");\r\n\t\t\r\n\t\tthis.columnManager.setColumns(definition);\r\n\t}\r\n\t\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\t\r\n\tgetColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tif(column){\r\n\t\t\treturn column.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\t\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\t\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field); \r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t\t.then((column) => {\r\n\t\t\t\treturn column.getComponent();\r\n\t\t\t});\r\n\t}\r\n\t\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from),\r\n\t\ttoColumn = this.columnManager.findColumn(to);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\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\t\t\t\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\t\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.columnManager.redraw(force);\r\n\t\tthis.rowManager.redraw(force);\r\n\t}\r\n\t\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\t\r\n\t//////////////////// Event Bus ///////////////////\r\n\t\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\t\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\t\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments);\r\n\t\targs.shift();\r\n\t\t\r\n\t\tthis.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\t//////////////////// Alerts ///////////////////\r\n\r\n\talert(contents, type){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.alertManager.alert(contents, type);\r\n\t}\r\n\r\n\tclearAlert(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.alertManager.clear();\r\n\t}\r\n\t\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\t\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\t\t\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\t\t\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\tdebugInvalidComponentFuncs:true, //allow toggling of invalid component warnings\r\n\tdebugInitialization:true, //allow toggling of pre initialization function call warnings\r\n\tdebugDeprecation:true, //allow toggling of deprecation 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\tpopupContainer:false,\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\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\trowHeight: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","//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":["CoreFeature","constructor","table","this","reloadData","data","silent","columnsChanged","dataLoader","load","undefined","langText","modules","localize","getText","arguments","langBind","bind","langLocale","getLocale","commsConnections","comms","getConnections","commsSend","send","layoutMode","layout","getMode","layoutRefresh","force","subscribe","eventBus","unsubscribe","subscribed","key","subscriptionChange","dispatch","chain","confirm","dispatchExternal","externalEvents","subscribedExternal","subscriptionChangeExternal","options","setOption","value","deprecationCheck","oldOption","newOption","deprecationAdvisor","check","deprecationCheckMsg","msg","checkMsg","deprecationMsg","module","Helpers","static","el","offsetWidth","offsetHeight","box","getBoundingClientRect","top","window","pageYOffset","document","documentElement","clientTop","left","pageXOffset","clientLeft","obj","clone","list","objectProto","__proto__","arrayProto","i","Object","assign","Array","isArray","match","copy","subject","findIndex","item","unshift","deepClone","Popup","element","parent","super","container","_lookupContainer","reversedX","childPopup","blurable","blurCallback","blurEventsBound","renderedCallback","visible","hideable","classList","add","blurEvent","hide","escEvent","_escapeCheck","destroyBinding","tableDestroyed","destroyed","popupContainer","querySelector","console","warn","_checkContainerIsParent","body","parentNode","renderCallback","callback","containerEventCoords","e","touch","MouseEvent","x","touches","pageX","y","pageY","parentOffset","elOffset","elementPositionCoords","position","containerOffset","offset","show","origin","parentEl","coords","HTMLElement","style","appendChild","_fitToScreen","addEventListener","stopPropagation","scrollTop","right","Math","max","scrollHeight","parseInt","isVisible","hideOnBlur","setTimeout","rowManager","keyCode","blockHide","restoreHide","removeEventListener","removeChild","child","Module","name","_handler","initialize","registerTableOption","optionsList","register","registerColumnOption","columnManager","registerTableFunction","func","args","initGuard","registerComponentFunction","component","handler","componentFunctionBinder","registerDataHandler","priority","registerDataPipelineHandler","registerDisplayHandler","registerDisplayPipelineHandler","displayRows","adjust","lookupIndex","index","length","displayPipeline","getDisplayRows","activeRows","refreshData","renderInPosition","refreshActiveData","footerAppend","footerManager","append","footerPrepend","prepend","footerRemove","remove","popup","menuEl","menuContainer","alert","content","type","alertManager","clearAlert","clear","Accessor","allowedTypes","initializeColumn","transformRow","column","config","forEach","accessor","charAt","toUpperCase","slice","definition","lookupAccessor","params","accessors","row","rowComponent","getComponent","traverse","colComponent","getFieldValue","setFieldValue","moduleName","generateParamsList","prefix","output","concat","push","serializeParams","encoded","encodeURIComponent","join","url","keys","method","toLowerCase","includes","json","headers","JSON","stringify","form","FormData","Ajax","urlGenerator","loaderPromise","contentTypeFormatters","ajaxRequestFunc","defaultLoaderPromise","ajaxURLGenerator","defaultURLGenerator","ajaxURL","setUrl","setDefaultConfig","ajaxConfig","getUrl","requestDataCheck","requestParams","requestData","ajaxParams","call","previousData","generateConfig","sendRequest","defaultConfig","ajaxRequesting","then","ajaxResponse","Promise","reject","contentType","resolve","ajaxContentType","Accept","mode","location","credentials","fetch","response","ok","catch","error","status","statusText","defaultContentTypeFormatters","Clipboard","pasteParser","pasteAction","customSelection","rowRange","blocked","clipboard","clipboardCopyRowRange","plain","html","preventDefault","clipboardCopyFormatter","export","generateExportList","clipboardCopyConfig","clipboardCopyStyled","generateHTMLTable","generatePlainContent","clipboardData","setData","originalEvent","reset","paste","setPasteParser","clipboardPasteParser","setPasteAction","clipboardPasteAction","rowData","columns","col","getKey","range","internal","sel","textRange","getSelection","createRange","selectNodeContents","toString","removeAllRanges","addRange","selection","createTextRange","moveToElementText","select","execCommand","action","pasteActions","parser","pasteParsers","rows","checkPaseOrigin","getPasteData","modExists","mutateData","mutator","valid","target","tagName","edit","currentCell","getData","replace","update","updateOrAddData","insert","addData","headerFindSuccess","columnMap","split","find","title","trim","field","columnsByIndex","shift","CalcComponent","_row","Proxy","get","receiver","handle","transform","getElement","getTable","getCells","cells","cell","getCell","_getSelf","CellComponent","_cell","getValue","getOldValue","getInitialValue","initialValue","getRow","getField","getColumn","setValue","mutate","restoreOldValue","setValueActual","restoreInitialValue","checkHeight","Cell","oldValue","height","width","minWidth","loaded","build","generateElement","setWidth","_configureCell","createElement","className","setAttribute","textAlign","hozAlign","vertAlign","display","alignItems","bottom","middle","justifyContent","center","cssClass","_generateContents","val","innerHTML","Node","firstChild","cellRendered","containerOnly","layoutElement","setValueProcessData","cellEdited","changed","widthStyled","clearWidth","getWidth","setMinWidth","minWidthStyled","setMaxWidth","maxWidth","maxWidthStyled","reinitializeHeight","clearHeight","setHeight","heightStyled","getHeight","delete","redrawBlock","deleteCell","calcs","getIndex","getCellIndex","ColumnComponent","_column","getDefinition","getTitleDownload","isGroup","toggle","getSubColumns","getParentColumn","Column","scrollTo","scrollToColumn","move","to","after","toColumn","findColumn","moveColumn","getNextColumn","nextCol","nextColumn","getPrevColumn","prevCol","prevColumn","updateDefinition","updates","result","reinitializeWidth","rerenderColumns","maxInitialWidth","variableHeight","headerVertical","headerHozAlign","headerWordWrap","editableTitle","def","contentElement","titleHolderElement","titleElement","groupElement","createGroupElement","fieldStructure","titleDownload","titleFormatterRendered","mapDefinitions","setField","widthFixed","newCol","attachColumn","checkColumnVisibility","registerColumnField","_initialize","columnHeaderVertAlign","defaults","columnDefaults","generate","defaultOptionList","checkDefinition","indexOf","nestedFieldSeparator","_getNestedData","_getFlatData","_setNestedData","_setFlatData","registerColumnPosition","reRegisterPosition","_buildColumnHeaderContent","_buildGroupHeader","_buildColumnHeader","_buildColumnHeaderTitle","focus","text","_formatColumnHeaderTitle","contents","dataObj","structure","columnRendered","verticalAlign","alignment","parentHeight","getGroupElement","clientHeight","getHeadersElement","minHeight","clearVerticalAlign","paddingTop","getFirstColumn","getLastColumn","getColumns","getTopColumn","updateBranches","colDefs","responsiveToggle","verticalAlignHeaders","matchChildWidths","childWidth","splice","setWidthActual","isNaN","floor","clientWidth","min","checkCellHeights","heightInitialized","offsetParent","clearCellHeight","calcHeight","setCellHeight","ceil","cellCount","deregisterColumn","generateCell","findColumnIndex","_nextVisibleColumn","getColumnByIndex","_prevVisibleColumn","fitToData","setTo","addColumn","defaultOptions","RowComponent","getPosition","watchPosition","scrollToRow","moveToRow","updateData","normalizeHeight","reformat","reinitialize","getNextRow","nextRow","getPrevRow","prevRow","Row","manualHeight","outerHeight","initialized","positionWatchers","created","create","detachElement","generateCells","deleteCells","renderer","renderRowCells","rowFormatter","rerenderRowCells","deinitialize","deinitializeHeight","children","maxHeight","rowHeight","resizableRows","updatedData","newRowData","elVisible","tempData","parse","attrname","getColumnsByFieldRoot","findCell","nextDisplayRow","prevDisplayRow","before","toRow","findRow","moveRowActual","deleteActual","blockRedraw","detachModules","deleteRow","wipe","isDisplayed","setPosition","getGroup","group","avg","values","calcParams","precision","reduce","sum","Number","toFixed","parseFloat","String","count","ColumnCalcs","topCalcs","botCalcs","genColumn","topElement","botElement","topRow","botRow","topInitialized","botInitialized","recalcAfterBlock","cellValueChanged","initializeColumnCheck","rowsUpdated","scrollHorizontal","recalcActiveRows","recalcActiveRowsRefresh","tableRedraw","visibleRows","adjustForScrollbar","restoreRedraw","getResults","userRecalc","recalc","redraw","blockCheck","viewable","groupBy","recalcRowGroup","dataTreeStartExpanded","dataTree","recalcAll","topCalc","bottomCalc","columnCalcs","topCalcParams","botCalcParams","bottomCalcParams","calculations","initializeTopRow","botCalc","initializeBottomRow","removeCalcs","adjustTableSize","getContentsElement","insertBefore","headersElement","nextSibling","scrollLeft","rowsToData","generateRow","frozenColumns","recalcGroup","groupRows","getRowGroup","getChildGroups","generateRowData","generateTopRow","generateBottomRow","dataTreeChildColumnCalcs","open","getFilteredTreeChildren","pos","disable","enable","format","formatter","getFormatter","paramKey","hasTopCalcs","hasBottomCalcs","results","getGroups","getGroupResults","groupObj","subGroups","getSubGroups","subGroupResults","subgroup","groups","rtl","paddingLeft","paddingRight","defaultCalculations","DataTree","indent","collapseEl","expandEl","branchEl","elementField","startOpen","collapseRow","expandRow","toggleRow","getTreeParent","getRowChildren","addTreeChildRow","isRowExpanded","dummyEl","dataTreeChildField","dataTreeChildIndent","dataTreeBranchElement","dataTreeCollapseElement","tabIndex","dataTreeExpandElement","initializeRow","layoutRow","rowDelete","rowDataChanged","columnMoving","initializeElementField","tableRedrawing","getRows","reinitializeRowChildren","firstCol","getFirstVisibleColumn","dataTreeElementColumn","getTreeChildren","redrawNeeded","childArray","controlEl","generateControlElement","cloneNode","marginRight","marginLeft","getComputedStyle","getPropertyValue","oldControl","replaceChild","getChildren","allChildren","generateChildren","dataTreeFilter","filter","dataTreeSort","sort","sub","childData","childRow","getTreeParentRoot","childIndex","findChildIndex","recurse","getChildField","csv","setFileContents","delimiter","fileContents","depth","bom","jsonLines","pdf","header","autoTableParams","rowGroupStyles","fontStyle","fontSize","cellPadding","fillColor","rowCalcStyles","jsPDFParams","jsPDF","parseRow","styles","colSpan","rowSpan","orientation","unit","doc","jspdf","autoTable","didDrawPage","head","documentProcessing","xlsx","sheetName","workbook","XLSX","utils","book_new","tableFeatures","compression","compress","generateSheet","merges","worksheet","s","c","r","a","b","j","Date","sheet_add_aoa","encode_range","SheetNames","Sheets","sheetOnly","sheets","sheet","active","intercept","buf","ArrayBuffer","view","Uint8Array","charCodeAt","s2ab","write","bookType","bookSST","Download","mimeType","Blob","deprecatedOptionsCheck","download","downloadToTab","filename","interceptCallback","downloadFunc","downloaders","mime","triggerDownload","downloadConfig","downloadRowRange","groupHeader","groupHeaderDownload","_group","getRowCount","newTab","blob","downloadEncoder","URL","createObjectURL","navigator","msSaveOrOpenBlob","click","commsReceived","maskInput","mask","maskLetter","maskLetterChar","maskNumber","maskNumberChar","maskWildcard","maskWildcardChar","fillSymbols","symbol","char","maskAutoFill","placeholder","defaultDownloaders","Edit","editor","onRendered","success","cancel","editorParams","_initializeParams","displayItems","currentItems","focusedItem","input","_createInputElement","listEl","_createListElement","initialValues","isFilter","filterTimeout","filtered","typing","listIteration","lastAction","actions","_deprecatedOptionsCheck","_initializeValue","_onRendered","listItemFormatter","sortValuesList","searchFunc","searchingPlaceholder","defaultValue","multiselect","headerFilterInitialListGen","cellEl","clickStop","preventScroll","_preventPopupBlur","_preventBlur","_inputKeyDown","_setListWidth","attribs","elementAttributes","clearable","padding","boxSizing","autocomplete","cursor","caretColor","getAttribute","_bindInputEvents","valueCheck","valueKeys","verticalNavigation","placeholderLoading","placeholderEmpty","filterDelay","emptyValue","freetext","filterFunc","filterRemote","allowEmpty","listOnEmpty","valuesLookup","valuesURL","_inputFocus","_inputClick","_inputBlur","_inputSearch","_inputKeyUp","rebuildOptionsList","_filter","clearTimeout","_filterList","_resolveValue","_clearChoices","_keyUp","_keyDown","_keySide","_keyEnter","_keyEsc","_keyHomeEnd","_keySelectLetter","_keyAutoCompLetter","stopImmediatePropagation","_focusItem","_chooseItem","_cancel","_scrollToValue","character","fromCharCode","filterTerm","label","startsWith","scrollIntoView","behavior","block","inline","_generateOptions","_sortOptions","_buildList","_showList","isInteger","_filterOptions","iteration","_ajaxRequest","_uniqueColumnValues","valuesLookupField","_addPlaceholder","responseValues","_parseList","_clearList","term","urlBuilder","getColumnByField","inputValues","entries","map","_parseListItem","option","level","_parseListGroup","itemParams","selected","original","sorter","_defaultSortFunction","_sortGroup","as","bs","a1","b1","L","rx","rd","emptyAlign","isFinite","test","_defaultFilterFunc","_filterItem","matches","_buildItem","itemFormatter","_groupClick","_itemClick","_styleItem","startVis","blur","cellValue","search","onChange","selectContents","textarea","vertNav","whiteSpace","resize","heightNow","shiftKey","shiftEnterSubmit","selectionStart","number","step","blurFunc","date","inputFormat","DT","DateTime","luxon","convertDate","isDateTime","fromISO","fromFormat","toFormat","time","newDatetime","datetime","List","star","self","maxStars","getElementsByTagName","size","stars","starsHolder","createElementNS","starChange","browser","buildStar","starHolder","nextStar","changeValue","overflow","textOverflow","progress","mouseDrag","mouseDragWidth","percent","bar","updateValue","calcVal","round","backgroundColor","screenX","tickCross","tristate","indetermValue","indeterminateValue","indetermState","trueValueSet","falseValueSet","marginTop","checkedValue","checked","trueValue","falseValue","indeterminate","mouseClick","recursionBlock","invalidEdit","editedCells","editors","getEditedCells","clearCellEdited","navigatePrev","navigateNext","navigateLeft","navigateRight","navigateUp","navigateDown","cellIsEdited","clearEdited","editCell","cellCancelEdit","bindEditor","updateCellClass","columnDeleteCheck","rowDeleteCheck","rowEditableCheck","cancelEdit","keybindingNavigateNext","newRow","addRow","edited","allowEdit","nextCell","findPrevEditableCell","findNextEditableCell","prevCell","editable","getCurrentCell","clearEditor","cellEditCancelled","contains","button","focusCellNoEvent","forceEdit","focusScrollAdjust","getRenderMode","topEdge","bottomEdge","rowEl","offsetTop","leftEdge","rightEdge","leftMargin","rightMargin","renderHorizontal","vDomPadLeft","offsetLeft","cellEditor","rendered","cellClick","cellEditing","validationMode","editIndex","defaultEditors","ExportRow","ExportColumn","Export","cloneTableStyle","colVisProp","getHtml","columnHeaders","headersToExportRows","generateColumnGroupHeaders","bodyToExportRows","rowLookup","generateTable","generateTableElement","getVisibleRows","selectRow","selectedRows","pagination","columnGroups","colData","processColumnGroup","maxDepth","groupData","subGroup","subGroupData","columnVisCheck","visProp","headerDepth","exportRows","parseColumnGroup","rowGroups","exportCols","headerEl","bodyEl","lookupTableStyles","setup","treeElementField","mapElementStyles","generateHeaderElement","generateGroupElement","generateCalcElement","generateRowElement","evenRow","oddRow","calcRow","firstRow","firstGroup","getElementsByClassName","styleCells","firstCell","lastCell","classNames","generator","cellStyle","cellWrapper","formatCells","formatExportValue","align","holder","htmlOutputConfig","from","props","lookup","color","fromStyle","prop","filterVal","rowVal","filterParams","regex","RegExp","like","keywords","separator","keyword","matchAll","starts","ends","endsWith","in","Filter","filterList","headerFilters","headerFilterColumns","prevHeaderFilterChangeCheck","tableInitialized","searchRows","searchData","userSetFilter","userRefreshFilter","userAddFilter","getFilters","userSetHeaderFilterFocus","userGetHeaderFilterValue","userSetHeaderFilterValue","getHeaderFilters","userRemoveFilter","userClearFilter","userClearHeaderFilter","setHeaderFilterFocus","reloadHeaderFilter","getHeaderFilterValue","setHeaderFilterValue","initializeColumnHeaderFilter","hideHeaderFilterElements","showHeaderFilterElements","tableBuilt","filterMode","remoteFilterParams","initialFilter","setFilter","initialHeaderFilter","refreshFilter","addFilter","removeFilter","all","clearFilter","clearHeaderFilter","headerFilter","headerFilterPlaceholder","setHeaderFilterColumnPlaceholder","filterType","tagType","attrType","filterChangeCheck","prevSuccess","emptyFunc","headerFilterFunc","filters","headerFilterFuncParams","fieldVal","colVal","trackChanges","generateHeaderFilterElement","filterElement","editorElement","typingTimer","searchTrigger","headerElement","headerFilterEmptyCheck","headerFilterParams","headerFilterLiveFilterDelay","hasAttribute","headerFilterLiveFilter","hasChanged","findFilter","findSubFilters","ajax","filtersToArray","searchType","filterRecurse","rowList","activeRowComponents","filterRow","subFilter","defaultFilters","plaintext","formatterParams","emptyToSpace","sanitizeHTML","money","integer","decimal","rgx","floatVal","sign","decimalSym","thousandSym","thousand","negativeSign","symbolAfter","abs","link","urlPrefix","labelField","labelTraverse","path","urlField","image","src","urlSuffix","empty","truthy","allowTruthy","tick","tickElement","cross","crossElement","outputFormat","invalid","invalidPlaceholder","isValid","timezone","setZone","datetimediff","suffix","humanize","now","diff","toHuman","traffic","percentValue","colors","legend","legendColor","legendAlign","barEl","barContainer","legendEl","holderEl","buttonTick","buttonCross","rownum","innerText","responsiveCollapse","responsiveLayout","toggleList","isOpen","rowSelection","checkbox","selectableRangeMode","toggleSelect","handleComplexRowClick","isSelected","registerRowSelectCheckbox","deselectRow","registerHeaderSelectCheckbox","Format","formatValue","formatHeader","lookupFormatter","formatterPrint","print","formatterClipboard","formatterHtmlOutput","htmlOutput","formatters","mockCell","titleFormatter","titleFormatterParams","entityMap","defaultFormatters","FrozenColumns","leftColumns","rightColumns","initializationMode","layoutCell","reinitializeColumns","blockLayout","unblockLayout","margin","edge","frozenCheck","frozen","layoutCalcRows","layoutGroupCalcs","groupList","layoutColumnPosition","allCells","leftParents","marginValue","getColGroupParentElement","reinitializeRows","getTableElement","_calcSpace","FrozenRows","freezeRow","unfreezeRow","isRowFrozen","detachRow","frozenRows","initializeRows","rowType","isFrozen","styleRows","styleRow","GroupComponent","groupManager","getParentGroup","toggleVisibility","Group","oldGroup","hasSubGroups","groupIDLookups","_addRowToGroup","_addRow","old","elementContents","arrowElement","createElements","addBindings","createValueGroups","arrow","movableRows","moveRow","initializeGroupHeader","allowedValues","_createGroup","groupToggleElement","groupID","groupKey","headerGenerator","insertRow","conformRowData","toIndex","generateGroupHeaderContents","updateGroupRows","scrollHeader","getRowIndex","removeRow","groupValues","removeGroup","getHeadersAndRows","_visSet","groupClosedShowCalcs","prev","getPath","childNodes","GroupRows","displayHandler","setGroupBy","setGroupValues","setGroupStartOpen","setGroupHeader","userGetGroups","userGetGroupedData","rowGetGroup","groupUpdateOnCellEdit","cellUpdated","reassignRowToGroup","configureGroupSetup","rowDeleting","scrollHeaders","rowMoving","rowAddingIndex","rowSample","virtualRenderFill","groupStartOpen","langValue","lang","items","getRealColumns","lookupFunc","prevValue","tableElement","assignRowToGroup","moveRowInArray","getGroupedData","toGroup","fromGroup","generateGroups","groupComponents","pullGroupListData","groupListData","rowCount","headerContent","countGroups","oldGroups","createGroup","assignRowToExistingGroup","newGroupNeeded","oldRowGroup","oldGroupPath","newGroupPath","getExpectedPath","every","groupPath","groupId","checkBasicModeGroupHeaderWidth","onlyGroupHeaders","History","history","clearComponentHistory","rowDeleted","rowAdded","rowMoved","undo","redo","getHistoryUndoSize","getHistoryRedoSize","posFrom","posTo","newValue","undoers","redoers","_rebindRow","oldRow","cellEdit","rowAdd","addRowActual","rowMove","HtmlTableImport","fieldIndex","hasIndex","tableElementCheck","originalElement","parseTable","_extractOptions","_extractHeaders","_generateBlankHeaders","attributes","optionsArr","attrib","_attribValue","_findCol","exists","textContent","registeredDefaults","inQuote","nextChar","array","Import","importFromFile","importFormat","loadDataCheck","loadData","importData","lookupImporter","structureData","err","importer","importers","extension","pickFile","extensions","accept","file","files","reader","FileReader","importReader","readAsArrayBuffer","readAsBinaryString","readAsDataURL","readAsText","onload","onerror","parsedData","autoColumns","structureArrayToObject","structureArrayToColumns","defaultImporters","Interaction","eventMap","rowClick","rowDblClick","rowContext","rowMouseEnter","rowMouseLeave","rowMouseOver","rowMouseOut","rowMouseMove","rowMouseDown","rowMouseUp","rowTap","rowDblTap","rowTapHold","cellDblClick","cellContext","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellMouseDown","cellMouseUp","cellTap","cellDblTap","cellTapHold","headerClick","headerDblClick","headerContext","headerMouseEnter","headerMouseLeave","headerMouseOver","headerMouseOut","headerMouseMove","headerMouseDown","headerMouseUp","headerTap","headerDblTap","headerTapHold","groupClick","groupDblClick","groupContext","groupMouseEnter","groupMouseLeave","groupMouseOver","groupMouseOut","groupMouseMove","groupMouseDown","groupMouseUp","groupTap","groupDblTap","groupTapHold","subscribers","touchSubscribers","columnSubscribers","touchWatchers","tap","tapDbl","tapHold","initializeExternalEvents","cellContentsSelectionFixer","selectNode","subscriptionChanged","added","subscribeTouchEvents","unsubscribeTouchEvents","handleTouch","noTouch","dispatchEvent","watchers","componentObj","Keybindings","watchKeys","pressedKeys","keyupBinding","keydownBinding","bindings","keybindings","mergedBindings","mapBindings","bindEvents","clearBindings","binding","mapBinding","symbolsList","ctrl","meta","code","checkBinding","ctrlKey","metaKey","navPrev","navNext","navUp","navDown","scrollPageUp","scrollPageDown","scrollToStart","scrollToEnd","copyToClipboard","keyBlock","newPos","displayRowsCount","scrollMax","navLeft","navRight","Menu","nestedMenuBlock","currentComponent","rootPopup","initializeRowWatchers","initializeGroupWatchers","rowContextMenu","loadMenuEvent","on","rowClickMenu","rowDblClickMenu","groupContextMenu","groupClickMenu","groupDblClickMenu","headerContextMenu","loadMenuTableColumnEvent","headerClickMenu","headerDblClickMenu","headerMenu","initializeColumnHeaderMenu","contextMenu","loadMenuTableCellEvent","clickMenu","dblClickMenu","headerMenuEl","icon","headerMenuIcon","menu","loadMenu","parentPopup","itemEl","disabled","MoveColumns","placeholderElement","createPlaceholderElement","hoverElement","checkTimeout","checkPeriod","moving","toCol","toColAfter","startX","autoScrollMargin","autoScrollStep","autoScrollTimeout","touchMove","moveHover","endMove","movableColumns","colEl","mousemove","which","startMove","bindTouchEvents","nextColWidth","prevColWidth","nextColWidthLast","prevColWidthLast","startXMove","passive","moveToCol","_bindMouseMove","_unbindMouseMove","movingCells","moveColumnActual","scrollPos","columnHolder","xPos","MoveRows","toRowAfter","hasHandle","startY","tableRowDropEvent","connection","connectionSelectorsTables","connectionSelectorsElements","connectionElements","connections","connectedTable","connectedRow","movableRowsConnectedTables","movableRowsConnectedElements","initializeCell","mouseup","tableRowDrop","previousSibling","rowHandle","nextRowHeight","prevRowHeight","nextRowHeightLast","prevRowHeightLast","startYMove","setStartPosition","connectToTables","pointerEvents","disconnectFromTables","moveHoverConnections","moveHoverTable","rowHolder","yPos","elementRowDrop","connectionTables","query","prototype","querySelectorAll","dropEvent","tabulatorElementDropEvent","connect","disconnect","dropComplete","sender","movableRowsSender","senders","movableRowsReceiver","receivers","fromRow","fromTable","toTable","Mutator","enabled","transformCell","mutateLink","lookupMutator","mutators","mutatorEdit","links","linkCell","pageSize","currentRow","currentPage","totalRows","totalPages","showingEl","valueEl","ofEl","totalEl","rowsEl","pages","Page","progressiveLoad","pageCounterElement","pageCounter","page","remoteRowCountEstimate","initialLoad","dataChanging","pageSizes","setMaxPage","setPage","userSetPageToRow","userSetPageSize","getPageSize","previousPage","nextPage","getPage","getPageMax","setPageToRow","initialLoadComplete","calculatePageSizes","footerRedraw","paginationAddRow","rowAddingPosition","paginationMode","remotePageParams","_parseRemoteData","restOnRenderBefore","initializePageCounter","initializePaginator","initializeProgressive","scrollVertical","testElRow","testElCell","paginationSize","visibility","generatePageSizeSelectList","setPageSize","dir","loading","progressiveLoadScrollMargin","pagesElement","firstBut","prevBut","nextBut","lastBut","paginationSizeSelector","pageSizeSelect","counter","paginationCounter","pageCounters","hidden","pageSelectLabel","paginationCounterHolder","paginationElement","paginationCounterElement","paginationInitialPage","paginationButtonCount","setMaxRows","trigger","_setPageCounter","_setPageButtons","leftSize","rightSize","_generatePageButton","start","end","actualStartRow","actualRowPageSize","actualRows","finally","last_page","last_row","addRows","progressiveLoadDelay","footer","containerElement","scrollWidth","defaultPageCounters","local","id","localStorage","getItem","cookie","cookiePos","setItem","expireDate","setDate","getDate","toUTCString","Persistence","defWatcherBlock","readFunc","writeFunc","localStorageTest","testKey","removeItem","persistence","retrievedData","persistenceMode","persistenceID","persistenceReaderFunc","readers","persistenceWriterFunc","writers","retrieveData","save","eventSave","getColumnLayout","setColumnLayout","sorters","initialSort","parseColumns","setColumns","mergeDefinition","getOwnPropertyDescriptor","defineProperty","set","current","oldCols","newCols","_findColumn","validateSorters","getSort","getGroupConfig","getPageConfig","definitions","excludedKeys","defStore","colDef","moduleInitOrder","defaultReaders","defaultWriters","_componentPopupCall","loadPopupEvent","rowContextPopup","rowClickPopup","rowDblClickPopup","groupContextPopup","groupClickPopup","groupDblClickPopup","headerContextPopup","loadPopupTableColumnEvent","headerClickPopup","headerDblClickPopup","headerPopup","initializeColumnHeaderPopup","contextPopup","loadPopupTableCellEvent","clickPopup","dblClickPopup","headerPopupEl","headerPopupIcon","loadPopup","contentsEl","Print","manualBlock","printAsHtml","replaceTable","cleanup","printFullscreen","printConfig","printStyled","printRowRange","footerContent","scrollX","scrollY","footerEl","tableEl","printHeader","printFooter","printFormatter","ReactiveData","origFuncs","currentVersion","reactiveData","unblock","watchRow","watchData","unwatchData","version","enumerable","configurable","arg","apply","getRowFromDataObject","pop","startRow","newRows","reverse","oldRows","reRenderInPosition","writable","watchKey","watchTreeChildren","childField","rebuildTree","unwatchRow","ResizeColumns","startColumn","startWidth","latestX","initialNextColumn","layoutColumnHeader","initializeEventWatchers","layoutCellHandles","deInitializeComponent","resizeHandle","columnLayoutUpdated","deInitializeColumn","columnWidthUpdated","resizable","reinitializeColumn","frozenColumnOffset","frozenOffset","handleEl","nearestColumn","_checkResizability","handleDown","_mouseDown","oldWidth","parentElement","mouseMove","blockedBefore","blockedAfter","startDiff","moveDiff","resizableColumnFit","colWidth","browserSlow","mouseUp","ResizeRows","startHeight","prevHandle","prevHandleDown","screenY","ResizeTable","visibilityObserver","resizeObserver","containerObserver","tableHeight","tableWidth","containerHeight","containerWidth","autoResize","initialRedraw","tableStyle","IntersectionObserver","ResizeObserver","initializeVisibilityObserver","entry","browserMobile","nodeHeight","contentRect","nodeWidth","redrawTable","observe","fixedHeight","tableResized","isIntersecting","unobserve","ResponsiveLayout","hiddenColumns","collapseFormatter","collapseStartOpen","collapseHandleColumn","updateColumnVisibility","initializeResponsivity","generateCollapsedRowContent","responsiveLayoutCollapseFormatter","formatCollapsedData","responsiveLayoutCollapseStartOpen","responsive","order","generateCollapsedContent","hideColumn","colCount","showColumn","working","getFlexBaseWidth","headerVisible","activeRowsCount","renderEmptyScroll","generateCollapsedRowData","mockCellComponent","responsiveLayoutCollapseUseFormatters","node_content","titleData","valueData","titleHighlight","SelectRow","selecting","lastClickedRow","selectPrev","headerCheckboxElement","selectRows","deselectRows","getSelectedRows","getSelectedData","isRowSelected","selectable","clearSelectionData","rowRetrieve","selectablePersistence","_deselectRow","_rowSelectionChanged","endSelect","selectableCheck","_clearSelection","lastClickedRowIdx","getDisplayRowIndex","rowIdx","fromRowIdx","toRowIdx","toggledRows","toggledRow","_selectRow","rowMatch","rowInfo","selectableRollingSelection","checkboxEl","dataTreeSelectPropagate","childRowSelection","selectedRow","aRow","bRow","alignEmptyValues","decimalSeparator","thousandSeparator","string","locale","localeCompare","boolean","calc","d","alphanum","Sort","sortList","userSetSort","clearSort","sortMode","remoteSortParams","setSort","refreshSort","arrowEl","sorterParams","startingDir","headerSortStartingDir","headerSortTristate","headerSort","headerSortClickElement","headerSortElement","setColumnHeaderSortIcon","columnHeaderSortMulti","newSortList","findSorter","sortOrderReverse","sortListActual","rowComponents","clearColumnHeaders","sortObj","setColumnHeader","_sortItems","sortEl","sorterCount","sortItem","_sortRow","el1Comp","el2Comp","el1","el2","defaultSorters","Tooltip","tooltipSubscriber","headerSubscriber","timeout","popupInstance","headerTooltip","mousemoveCheck","mouseoutCheck","tooltip","clearPopup","loadTooltip","tooltipDelay","parameters","float","numeric","minLength","maxLength","unique","cellData","required","Validate","invalidCells","getInvalidCells","userClearCellValidation","userValidate","cellIsValid","clearValidation","cellValidate","columnValidate","rowValidate","editValidate","editorClear","editedClear","previousValue","validate","cancelled","validator","_extractValidator","substring","_buildValidator","validators","failedValidators","invalidIndex","defaultValidators","OptionsList","msgType","userOptions","debugInvalidOptions","hasOwnProperty","Renderer","elementVertical","elementHorizontal","verticalFillMode","clearRows","clearColumns","reinitializeColumnWidths","renderRows","renderColumns","rerenderRows","scrollColumns","scrollRows","scrollToRowNearestTop","includingBuffer","render","rerender","scrollToRowPosition","ifVisible","rowIndex","scrollToRowIfVisible","BasicHorizontal","VirtualDomHorizontal","leftCol","rightCol","vDomScrollPosLeft","vDomScrollPosRight","vDomPadRight","fitDataColAvg","windowBuffer","isFitData","compatibilityCheck","layoutCheck","vertScrollListen","clearVisRowCache","dataChange","scroll","calcWindowBuffer","buffer","cols","colPos","leftPos","rightPos","fitDataCheck","vdomHoz","reinitChanged","reinitializeRow","change","colEnd","otherRows","addColRight","removeColLeft","addColLeft","removeColRight","colPositionAdjust","changes","fitDataColActualWidthCheck","ex","message","newWidth","widthDiff","appendCell","ColumnManager","blockHozScrollEvent","contentsElement","columnsByField","defaultColumnOptions","redrawBlockUpdate","initializeRenderer","createHeadersElement","createHeaderContentsElement","createHeaderElement","padVerticalScrollbar","renderClass","renderers","virtual","RendererVirtualDomHorizontal","basic","RendererBasicHorizontal","generateColumnsFromRowData","autoColumnsDefinitions","_addColumn","_reIndexColumns","nextToColumn","topColumn","parentIndex","nextEl","root","getDefinitions","getDefinitionTree","getComponents","structured","_moveColumnInArray","updateRows","fromIndex","scrollToColumnPosition","scrollToColumnIfVisible","totalWidth","fixedWidth","resetScroll","BasicVertical","rowTop","VirtualDomVertical","vDomRowHeight","vDomTop","vDomBottom","vDomScrollPosTop","vDomScrollPosBottom","vDomTopPad","vDomBottomPad","vDomMaxRenderChain","vDomWindowBuffer","vDomWindowMinTotalRows","vDomWindowMinMarginRows","vDomTopNewRows","vDomBottomNewRows","paddingBottom","_virtualRenderFill","topOffset","_showPlaceholder","topDiff","bottomDiff","_addTopRow","vDomScrollHeight","_removeBottomRow","_addBottomRow","_removeTopRow","renderVerticalBuffer","topFound","bottomRow","forceMove","topPad","rowsHeight","heightOccupied","topPadHeight","rowsCount","fillableSpace","addedRows","paddingAdjust","_quickNormalizeRowHeight","removableRows","RowManager","createHolderElement","createTableElement","heightFixer","placeholderContents","firstRender","renderMode","activeRowsPipeline","redrawBlockRestoreConfig","redrawBlockRenderInPosition","dataPipeline","scrollbarWidth","initializePlaceholder","leftDir","topDir","_positionPlaceholder","getRowFromPosition","_setDataActual","_wipeElements","allIndex","activeIndex","setActiveRows","displayRowIterator","displayIndex","regenerateRowPositions","findAddRowPos","_clearPlaceholder","addRowPos","chainResult","clearData","findRowIndex","rowOnly","getDataCount","skipStage","stage","cascadeOrder","refreshPipelines","renderTable","layoutColumnsOnNewData","resetDisplayRows","setDisplayRows","scrollBarCheck","RendererVirtualDomVertical","RendererBasicVertical","renderVertical","_clearTable","initialHeight","otherHeight","external","event","createEvent","initEvent","Event","FooterManager","createContainerElement","initializeElement","footerElement","activate","deactivate","InteractionManager","abortClasses","previousTargets","listeners","componentMap","pseudoTrackers","subscriber","pseudoTracking","buildListenerMap","bindSubscriptionWatchers","listenerMap","listener","components","bindPseudoEvents","pseudoMouseEnter","pseudoMouseLeave","leaveList","linkedKeys","comp","clearWatchers","updateEventListeners","track","composedPath","targets","findTargets","bindComponents","triggerEvents","elTargets","targetMatches","previousTarget","closest","ComponentFunctionBinder","funcName","debugInvalidComponentFuncs","DataLoader","requestOrder","requestNo","alertLoader","mapParams","dataSendParams","objectInvert","dataReceiveParams","alertError","dataLoaderErrorTimeout","blockActiveLoad","dataLoaderLoading","dataLoaderError","ExternalEventBus","debug","events","subscriptionNotifiers","_debugDispatch","_dispatch","_notifySubscriptionChange","notifiers","callResult","log","InternalEventBus","_debugChain","_chain","_debugConfirm","_confirm","fallback","confirmed","DeprecationAdvisor","_warnUser","TableRegistry","tables","matchElement","Tabulator","lookupTable","forced","fitData","fitDataFill","fitDataGeneral","fitDataTable","fitDataStretch","colsWidth","gap","lastCol","fitColumns","flexColWidth","overflowWidth","flexWidth","flexGrowUnits","flexColumns","fixedShrinkColumns","flexShrinkUnits","gapFill","calcWidth","scaleColumns","freeSpace","shrinkCols","oversizeCols","oversizeSpace","remainingSpace","remainingFlexGrowUnits","changeUnits","undersizeCols","calcGrow","widthGrow","calcShrink","widthShrink","Layout","modes","dataChanged","defaultModes","Localize","langList","langs","setHeaderFilterPlaceholder","installLang","setLocale","getLang","default","_setLangProp","desiredLocale","language","traverseLang","trans","_executeBindings","pathArray","_getLangElement","rootPath","page_size","page_title","first","first_title","last","last_title","prev_title","next","next_title","showing","of","Comms","receive","selectors","con","tableComms","ModuleBinder","tabulator","bindStaticFunctionality","bindModules","coreModules","moduleBindings","extendModule","property","source","registerModule","mod","registerModuleBinding","findTable","orderedStartMods","orderedEndMods","unOrderedMods","moduleCore","modulesCore","modulesRegular","core","mods","Alert","_createAlertElement","msgElement","_createMsgElement","_typeClass","interactionMonitor","initializeCoreSystems","_create","_clearObjectPointers","_mapDeprecatedFunctionality","debugEventsExternal","debugEventsInternal","InteractionMonitor","_rtlCheck","_buildElement","_initializeTable","_loadInitialData","textDirection","direction","newElement","_detectBrowser","destroy","deregister","ua","userAgent","vendor","opera","stack","line","debugInitialization","Error","replaceData","responses","foundRows","updateOrAddRow","updateRow","getRowPosition","getColumnDefinitions","toggleColumn","deleteColumn","updateColumnDefinition","fromColumn","off","plugin","debugDeprecation","rowFormatterPrint","rowFormatterClipboard","rowFormatterHtmlOutput","TabulatorFull","PseudoRow","_createElement"],"mappings":";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AGb0I,eACC,OAAO,EAGRiI,UACC,MAAO,GAGR0F,YACC,OAAO7b,KAAKwF,QAAQkf,YAGrBva,cAEAga,gBAEAF,mBAEAe,iBAEAvJ,sBAEAoH,cAEAC,iBAEAF"} \ No newline at end of file +{"version":3,"file":"tabulator_esm.min.js","sources":["../../src/js/core/CoreFeature.js","../../src/js/core/tools/Helpers.js","../../src/js/core/tools/Popup.js","../../src/js/core/Module.js","../../src/js/modules/Accessor/Accessor.js","../../src/js/modules/Accessor/defaults/accessors.js","../../src/js/modules/Ajax/defaults/urlGenerator.js","../../src/js/modules/Ajax/defaults/contentTypeFormatters.js","../../src/js/modules/Ajax/Ajax.js","../../src/js/modules/Ajax/defaults/config.js","../../src/js/modules/Ajax/defaults/loaderPromise.js","../../src/js/modules/Clipboard/Clipboard.js","../../src/js/modules/Clipboard/defaults/pasteActions.js","../../src/js/modules/Clipboard/defaults/pasteParsers.js","../../src/js/modules/ColumnCalcs/CalcComponent.js","../../src/js/core/cell/CellComponent.js","../../src/js/core/cell/Cell.js","../../src/js/core/column/ColumnComponent.js","../../src/js/core/column/defaults/options.js","../../src/js/core/column/Column.js","../../src/js/core/row/RowComponent.js","../../src/js/core/row/Row.js","../../src/js/modules/ColumnCalcs/defaults/calculations.js","../../src/js/modules/ColumnCalcs/ColumnCalcs.js","../../src/js/modules/DataTree/DataTree.js","../../src/js/modules/Download/defaults/downloaders.js","../../src/js/modules/Download/defaults/downloaders/csv.js","../../src/js/modules/Download/defaults/downloaders/json.js","../../src/js/modules/Download/defaults/downloaders/jsonLines.js","../../src/js/modules/Download/defaults/downloaders/pdf.js","../../src/js/modules/Download/defaults/downloaders/xlsx.js","../../src/js/modules/Download/defaults/downloaders/html.js","../../src/js/modules/Download/Download.js","../../src/js/modules/Edit/inputMask.js","../../src/js/modules/Edit/List.js","../../src/js/modules/Edit/defaults/editors.js","../../src/js/modules/Edit/defaults/editors/input.js","../../src/js/modules/Edit/defaults/editors/textarea.js","../../src/js/modules/Edit/defaults/editors/number.js","../../src/js/modules/Edit/defaults/editors/range.js","../../src/js/modules/Edit/defaults/editors/date.js","../../src/js/modules/Edit/defaults/editors/time.js","../../src/js/modules/Edit/defaults/editors/datetime.js","../../src/js/modules/Edit/defaults/editors/select.js","../../src/js/modules/Edit/defaults/editors/list.js","../../src/js/modules/Edit/defaults/editors/autocomplete.js","../../src/js/modules/Edit/defaults/editors/star.js","../../src/js/modules/Edit/defaults/editors/progress.js","../../src/js/modules/Edit/defaults/editors/tickCross.js","../../src/js/modules/Edit/Edit.js","../../src/js/modules/Export/ExportRow.js","../../src/js/modules/Export/ExportColumn.js","../../src/js/modules/Export/Export.js","../../src/js/modules/Filter/defaults/filters.js","../../src/js/modules/Filter/Filter.js","../../src/js/modules/Format/defaults/formatters.js","../../src/js/modules/Format/defaults/formatters/plaintext.js","../../src/js/modules/Format/defaults/formatters/html.js","../../src/js/modules/Format/defaults/formatters/textarea.js","../../src/js/modules/Format/defaults/formatters/money.js","../../src/js/modules/Format/defaults/formatters/link.js","../../src/js/modules/Format/defaults/formatters/image.js","../../src/js/modules/Format/defaults/formatters/tickCross.js","../../src/js/modules/Format/defaults/formatters/datetime.js","../../src/js/modules/Format/defaults/formatters/datetimediff.js","../../src/js/modules/Format/defaults/formatters/lookup.js","../../src/js/modules/Format/defaults/formatters/star.js","../../src/js/modules/Format/defaults/formatters/traffic.js","../../src/js/modules/Format/defaults/formatters/progress.js","../../src/js/modules/Format/defaults/formatters/color.js","../../src/js/modules/Format/defaults/formatters/buttonTick.js","../../src/js/modules/Format/defaults/formatters/buttonCross.js","../../src/js/modules/Format/defaults/formatters/rownum.js","../../src/js/modules/Format/defaults/formatters/handle.js","../../src/js/modules/Format/defaults/formatters/responsiveCollapse.js","../../src/js/modules/Format/defaults/formatters/rowSelection.js","../../src/js/modules/Format/Format.js","../../src/js/modules/FrozenColumns/FrozenColumns.js","../../src/js/modules/FrozenRows/FrozenRows.js","../../src/js/modules/GroupRows/GroupComponent.js","../../src/js/modules/GroupRows/Group.js","../../src/js/modules/GroupRows/GroupRows.js","../../src/js/modules/History/History.js","../../src/js/modules/History/defaults/undoers.js","../../src/js/modules/History/defaults/redoers.js","../../src/js/modules/HtmlTableImport/HtmlTableImport.js","../../src/js/modules/Import/defaults/importers.js","../../src/js/modules/Import/defaults/importers/csv.js","../../src/js/modules/Import/defaults/importers/json.js","../../src/js/modules/Import/defaults/importers/array.js","../../src/js/modules/Import/Import.js","../../src/js/modules/Interaction/Interaction.js","../../src/js/modules/Keybindings/Keybindings.js","../../src/js/modules/Keybindings/defaults/bindings.js","../../src/js/modules/Keybindings/defaults/actions.js","../../src/js/modules/Menu/Menu.js","../../src/js/modules/MoveColumns/MoveColumns.js","../../src/js/modules/MoveRows/MoveRows.js","../../src/js/modules/Mutator/Mutator.js","../../src/js/modules/Mutator/defaults/mutators.js","../../src/js/modules/Page/defaults/pageCounters.js","../../src/js/modules/Page/defaults/pageCounters/rows.js","../../src/js/modules/Page/defaults/pageCounters/pages.js","../../src/js/modules/Page/Page.js","../../src/js/modules/Persistence/defaults/readers.js","../../src/js/modules/Persistence/defaults/writers.js","../../src/js/modules/Persistence/Persistence.js","../../src/js/modules/Popup/Popup.js","../../src/js/modules/Print/Print.js","../../src/js/modules/ReactiveData/ReactiveData.js","../../src/js/modules/ResizeColumns/ResizeColumns.js","../../src/js/modules/ResizeRows/ResizeRows.js","../../src/js/modules/ResizeTable/ResizeTable.js","../../src/js/modules/ResponsiveLayout/ResponsiveLayout.js","../../src/js/modules/SelectRow/SelectRow.js","../../src/js/modules/Sort/defaults/sorters/datetime.js","../../src/js/modules/Sort/defaults/sorters.js","../../src/js/modules/Sort/defaults/sorters/number.js","../../src/js/modules/Sort/defaults/sorters/string.js","../../src/js/modules/Sort/defaults/sorters/date.js","../../src/js/modules/Sort/defaults/sorters/time.js","../../src/js/modules/Sort/defaults/sorters/boolean.js","../../src/js/modules/Sort/defaults/sorters/array.js","../../src/js/modules/Sort/defaults/sorters/exists.js","../../src/js/modules/Sort/defaults/sorters/alphanum.js","../../src/js/modules/Sort/Sort.js","../../src/js/modules/Tooltip/Tooltip.js","../../src/js/modules/Validate/defaults/validators.js","../../src/js/modules/Validate/Validate.js","../../src/js/core/tools/OptionsList.js","../../src/js/core/rendering/Renderer.js","../../src/js/core/rendering/renderers/BasicHorizontal.js","../../src/js/core/rendering/renderers/VirtualDomHorizontal.js","../../src/js/core/ColumnManager.js","../../src/js/core/rendering/renderers/BasicVertical.js","../../src/js/core/rendering/renderers/VirtualDomVertical.js","../../src/js/core/RowManager.js","../../src/js/core/FooterManager.js","../../src/js/core/tools/InteractionMonitor.js","../../src/js/core/tools/ComponentFunctionBinder.js","../../src/js/core/tools/DataLoader.js","../../src/js/core/tools/ExternalEventBus.js","../../src/js/core/tools/InternalEventBus.js","../../src/js/core/tools/DeprecationAdvisor.js","../../src/js/core/tools/TableRegistry.js","../../src/js/modules/Layout/defaults/modes/fitDataGeneral.js","../../src/js/modules/Layout/defaults/modes.js","../../src/js/modules/Layout/defaults/modes/fitData.js","../../src/js/modules/Layout/defaults/modes/fitDataStretch.js","../../src/js/modules/Layout/defaults/modes/fitColumns.js","../../src/js/modules/Layout/Layout.js","../../src/js/modules/Localize/Localize.js","../../src/js/modules/Localize/defaults/langs.js","../../src/js/modules/Comms/Comms.js","../../src/js/core/tools/ModuleBinder.js","../../src/js/core/tools/Alert.js","../../src/js/core/Tabulator.js","../../src/js/core/defaults/options.js","../../src/js/core/TabulatorFull.js","../../src/js/core/row/PseudoRow.js"],"sourcesContent":["export default class CoreFeature{\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, columnsChanged){\r\n\t\treturn this.table.dataLoader.load(data, undefined, undefined, undefined, silent, columnsChanged);\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(force){\r\n\t\treturn this.table.modules.layout.layout(force);\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\t//////////////////////////////////////////\r\n\t/////////// Deprecation Checks ///////////\r\n\t//////////////////////////////////////////\r\n\r\n\tdeprecationCheck(oldOption, newOption){\r\n\t\treturn this.table.deprecationAdvisor.check(oldOption, newOption);\r\n\t}\r\n\r\n\tdeprecationCheckMsg(oldOption, msg){\r\n\t\treturn this.table.deprecationAdvisor.checkMsg(oldOption, msg);\r\n\t}\r\n\r\n\tdeprecationMsg(msg){\r\n\t\treturn this.table.deprecationAdvisor.msg(msg);\r\n\t}\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}","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 CoreFeature from '../CoreFeature.js';\r\nimport Helpers from './Helpers.js';\r\n\r\nexport default class Popup extends CoreFeature{\r\n\tconstructor(table, element, parent){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.element = element;\r\n\t\tthis.container = this._lookupContainer();\r\n\t\t\r\n\t\tthis.parent = parent;\r\n\t\t\r\n\t\tthis.reversedX = false;\r\n\t\tthis.childPopup = null;\r\n\t\tthis.blurable = false;\r\n\t\tthis.blurCallback = null;\r\n\t\tthis.blurEventsBound = false;\r\n\t\tthis.renderedCallback = null;\r\n\t\t\r\n\t\tthis.visible = false;\r\n\t\tthis.hideable = true;\r\n\t\t\r\n\t\tthis.element.classList.add(\"tabulator-popup-container\");\r\n\t\t\r\n\t\tthis.blurEvent = this.hide.bind(this, false);\r\n\t\tthis.escEvent = this._escapeCheck.bind(this);\r\n\t\t\r\n\t\tthis.destroyBinding = this.tableDestroyed;\r\n\t\tthis.destroyed = false;\r\n\t}\r\n\t\r\n\ttableDestroyed(){\r\n\t\tthis.destroyed = true;\r\n\t\tthis.hide(true);\r\n\t}\r\n\t\r\n\t_lookupContainer(){\r\n\t\tvar container = this.table.options.popupContainer;\r\n\t\t\r\n\t\tif(typeof container === \"string\"){\r\n\t\t\tcontainer = document.querySelector(container);\r\n\t\t\t\r\n\t\t\tif(!container){\r\n\t\t\t\tconsole.warn(\"Menu Error - no container element found matching selector:\", this.table.options.popupContainer , \"(defaulting to document body)\");\r\n\t\t\t}\r\n\t\t}else if (container === true){\r\n\t\t\tcontainer = this.table.element;\r\n\t\t}\r\n\t\t\r\n\t\tif(container && !this._checkContainerIsParent(container)){\r\n\t\t\tcontainer = false;\r\n\t\t\tconsole.warn(\"Menu Error - container element does not contain this table:\", this.table.options.popupContainer , \"(defaulting to document body)\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!container){\r\n\t\t\tcontainer = document.body;\r\n\t\t}\r\n\t\t\r\n\t\treturn container;\r\n\t}\r\n\t\r\n\t_checkContainerIsParent(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._checkContainerIsParent(container, element.parentNode) : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\trenderCallback(callback){\r\n\t\tthis.renderedCallback = callback;\r\n\t}\r\n\t\r\n\tcontainerEventCoords(e){\r\n\t\tvar touch = !(e instanceof MouseEvent);\r\n\t\t\r\n\t\tvar x = touch ? e.touches[0].pageX : e.pageX;\r\n\t\tvar y = touch ? e.touches[0].pageY : e.pageY;\r\n\t\t\r\n\t\tif(this.container !== document.body){\r\n\t\t\tlet parentOffset = Helpers.elOffset(this.container);\r\n\t\t\t\r\n\t\t\tx -= parentOffset.left;\r\n\t\t\ty -= parentOffset.top;\r\n\t\t}\r\n\t\t\r\n\t\treturn {x, y};\r\n\t}\r\n\t\r\n\telementPositionCoords(element, position = \"right\"){\r\n\t\tvar offset = Helpers.elOffset(element),\r\n\t\tcontainerOffset, x, y;\r\n\t\t\r\n\t\tif(this.container !== document.body){\r\n\t\t\tcontainerOffset = Helpers.elOffset(this.container);\r\n\t\t\t\r\n\t\t\toffset.left -= containerOffset.left;\r\n\t\t\toffset.top -= containerOffset.top;\r\n\t\t}\r\n\t\t\r\n\t\tswitch(position){\r\n\t\t\tcase \"right\":\r\n\t\t\t\tx = offset.left + element.offsetWidth;\r\n\t\t\t\ty = offset.top - 1;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"bottom\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top + element.offsetHeight;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"left\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top - 1;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"top\":\r\n\t\t\t\tx = offset.left;\r\n\t\t\t\ty = offset.top;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"center\":\r\n\t\t\t\tx = offset.left + (element.offsetWidth / 2);\r\n\t\t\t\ty = offset.top + (element.offsetHeight / 2);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn {x, y, offset};\r\n\t}\r\n\t\r\n\tshow(origin, position){\r\n\t\tvar x, y, parentEl, parentOffset, coords;\r\n\t\t\r\n\t\tif(this.destroyed || this.table.destroyed){\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\tif(origin instanceof HTMLElement){\r\n\t\t\tparentEl = origin;\r\n\t\t\tcoords = this.elementPositionCoords(origin, position);\r\n\t\t\t\r\n\t\t\tparentOffset = coords.offset;\r\n\t\t\tx = coords.x;\r\n\t\t\ty = coords.y;\r\n\t\t\t\r\n\t\t}else if(typeof origin === \"number\"){\r\n\t\t\tparentOffset = {top:0, left:0};\r\n\t\t\tx = origin;\r\n\t\t\ty = position;\r\n\t\t}else{\r\n\t\t\tcoords = this.containerEventCoords(origin);\r\n\t\t\t\r\n\t\t\tx = coords.x;\r\n\t\t\ty = coords.y;\r\n\t\t\t\r\n\t\t\tthis.reversedX = false;\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.style.top = y + \"px\";\r\n\t\tthis.element.style.left = x + \"px\";\r\n\t\t\r\n\t\tthis.container.appendChild(this.element);\r\n\t\t\r\n\t\tif(typeof this.renderedCallback === \"function\"){\r\n\t\t\tthis.renderedCallback();\r\n\t\t}\r\n\t\t\r\n\t\tthis._fitToScreen(x, y, parentEl, parentOffset, position);\r\n\t\t\r\n\t\tthis.visible = true;\r\n\t\t\r\n\t\tthis.subscribe(\"table-destroy\", this.destroyBinding);\r\n\t\t\r\n\t\tthis.element.addEventListener(\"mousedown\", (e) => {\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\t_fitToScreen(x, y, parentEl, parentOffset, position){\r\n\t\tvar scrollTop = this.container === document.body ? document.documentElement.scrollTop : this.container.scrollTop;\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 + this.element.offsetWidth) >= this.container.offsetWidth || this.reversedX){\r\n\t\t\tthis.element.style.left = \"\";\r\n\t\t\t\r\n\t\t\tif(parentEl){\r\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - parentOffset.left) + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.right = (this.container.offsetWidth - x) + \"px\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.reversedX = 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 + this.element.offsetHeight) > Math.max(this.container.offsetHeight, scrollTop ? this.container.scrollHeight : 0)) {\r\n\t\t\tif(parentEl){\r\n\t\t\t\tswitch(position){\r\n\t\t\t\t\tcase \"bottom\":\r\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight - parentEl.offsetHeight - 1) + \"px\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight + parentEl.offsetHeight + 1) + \"px\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tthis.element.style.top = (parseInt(this.element.style.top) - this.element.offsetHeight) + \"px\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tisVisible(){\r\n\t\treturn this.visible;\r\n\t}\r\n\t\r\n\thideOnBlur(callback){\r\n\t\tthis.blurable = true;\r\n\t\t\r\n\t\tif(this.visible){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tif(this.visible){\r\n\t\t\t\t\tthis.table.rowManager.element.addEventListener(\"scroll\", this.blurEvent);\r\n\t\t\t\t\tthis.subscribe(\"cell-editing\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"click\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"mousedown\", this.blurEvent);\r\n\t\t\t\t\twindow.addEventListener(\"resize\", this.blurEvent);\r\n\t\t\t\t\tdocument.body.addEventListener(\"keydown\", this.escEvent);\r\n\r\n\t\t\t\t\tthis.blurEventsBound = true;\r\n\t\t\t\t}\r\n\t\t\t}, 100);\r\n\t\t\t\r\n\t\t\tthis.blurCallback = callback;\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\t_escapeCheck(e){\r\n\t\tif(e.keyCode == 27){\r\n\t\t\tthis.hide();\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockHide(){\r\n\t\tthis.hideable = false;\r\n\t}\r\n\t\r\n\trestoreHide(){\r\n\t\tthis.hideable = true;\r\n\t}\r\n\t\r\n\thide(silent = false){\r\n\t\tif(this.visible && this.hideable){\r\n\t\t\tif(this.blurable && this.blurEventsBound){\r\n\t\t\t\tdocument.body.removeEventListener(\"keydown\", this.escEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"click\", this.blurEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"contextmenu\", this.blurEvent);\r\n\t\t\t\tdocument.body.removeEventListener(\"mousedown\", this.blurEvent);\r\n\t\t\t\twindow.removeEventListener(\"resize\", this.blurEvent);\r\n\t\t\t\tthis.table.rowManager.element.removeEventListener(\"scroll\", this.blurEvent);\r\n\t\t\t\tthis.unsubscribe(\"cell-editing\", this.blurEvent);\r\n\r\n\t\t\t\tthis.blurEventsBound = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.childPopup){\r\n\t\t\t\tthis.childPopup.hide();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.parent){\r\n\t\t\t\tthis.parent.childPopup = null;\r\n\t\t\t}\r\n\t\t\t\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\t\r\n\t\t\tthis.visible = false;\r\n\t\t\t\r\n\t\t\tif(this.blurCallback && !silent){\r\n\t\t\t\tthis.blurCallback();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.unsubscribe(\"table-destroy\", this.destroyBinding);\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}\r\n\t\r\n\tchild(element){\r\n\t\tif(this.childPopup){\r\n\t\t\tthis.childPopup.hide();\r\n\t\t}\r\n\t\t\r\n\t\tthis.childPopup = new Popup(this.table, element, this);\r\n\t\t\r\n\t\treturn this.childPopup;\r\n\t}\r\n}","import CoreFeature from './CoreFeature.js';\r\nimport Popup from './tools/Popup.js';\r\n\r\nclass Module extends CoreFeature{\r\n\t\r\n\tconstructor(table, name){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis._handler = null;\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\t// setup module when table is initialized, to be overridden in module\r\n\t}\r\n\t\r\n\t\r\n\t///////////////////////////////////\r\n\t////// Options Registration ///////\r\n\t///////////////////////////////////\r\n\t\r\n\tregisterTableOption(key, value){\r\n\t\tthis.table.optionsList.register(key, value);\r\n\t}\r\n\t\r\n\tregisterColumnOption(key, value){\r\n\t\tthis.table.columnManager.optionsList.register(key, value);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t/// Public Function Registration ///\r\n\t///////////////////////////////////\r\n\t\r\n\tregisterTableFunction(name, func){\r\n\t\tif(typeof this.table[name] === \"undefined\"){\r\n\t\t\tthis.table[name] = (...args) => {\r\n\t\t\t\tthis.table.initGuard(name);\r\n\t\t\t\t\r\n\t\t\t\treturn func(...args);\r\n\t\t\t};\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\t\r\n\tregisterComponentFunction(component, func, handler){\r\n\t\treturn this.table.componentFunctionBinder.bind(component, func, handler);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Data Pipeline //////////\r\n\t///////////////////////////////////\r\n\t\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\t\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\t\r\n\tdisplayRows(adjust){\r\n\t\tvar index = this.table.rowManager.displayRows.length - 1, \r\n\t\tlookupIndex;\r\n\t\t\r\n\t\tif(this._handler){\r\n\t\t\tlookupIndex = this.table.rowManager.displayPipeline.findIndex((item) => {\r\n\t\t\t\treturn item.handler === this._handler;\r\n\t\t\t});\r\n\r\n\t\t\tif(lookupIndex > -1){\r\n\t\t\t\tindex = lookupIndex;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(adjust){\r\n\t\t\tindex = index + adjust;\r\n\t\t}\r\n\r\n\t\tif(this._handler){\r\n\t\t\tif(index > -1){\r\n\t\t\t\treturn this.table.rowManager.getDisplayRows(index);\r\n\t\t\t}else{\r\n\t\t\t\treturn this.activeRows();\r\n\t\t\t}\r\n\t\t}\t\r\n\t}\r\n\t\r\n\tactiveRows(){\r\n\t\treturn this.table.rowManager.activeRows;\r\n\t}\r\n\t\r\n\trefreshData(renderInPosition, handler){\r\n\t\tif(!handler){\r\n\t\t\thandler = this._handler;\r\n\t\t}\r\n\t\t\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\t\r\n\t///////////////////////////////////\r\n\t//////// Footer Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tfooterAppend(element){\r\n\t\treturn this.table.footerManager.append(element);\r\n\t}\r\n\t\r\n\tfooterPrepend(element){\r\n\t\treturn this.table.footerManager.prepend(element);\r\n\t}\r\n\t\r\n\tfooterRemove(element){\r\n\t\treturn this.table.footerManager.remove(element);\r\n\t} \r\n\t\r\n\t///////////////////////////////////\r\n\t//////// Popups Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tpopup(menuEl, menuContainer){\r\n\t\treturn new Popup(this.table, menuEl, menuContainer);\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t//////// Alert Management ////////\r\n\t///////////////////////////////////\r\n\t\r\n\talert(content, type){\r\n\t\treturn this.table.alertManager.alert(content, type);\r\n\t}\r\n\t\r\n\tclearAlert(){\r\n\t\treturn this.table.alertManager.clear();\r\n\t}\r\n\t\r\n}\r\n\r\nexport default Module;","import Module from '../../core/Module.js';\r\nimport Helpers from '../../core/tools/Helpers.js';\r\n\r\nimport defaultAccessors 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\t\tif(Accessor.accessors[value]){\r\n\t\t\t\t\taccessor = Accessor.accessors[value];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Accessor Error - No such accessor found, ignoring: \", value);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\taccessor = value;\r\n\t\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, colComponent;\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\tcolComponent = column.getComponent();\r\n\t\t\t\t\t\tparams = typeof accessor.params === \"function\" ? accessor.params(value, data, type, colComponent, rowComponent) : accessor.params;\r\n\t\t\t\t\t\tcolumn.setFieldValue(data, accessor.accessor(value, data, type, params, colComponent, 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 = defaultAccessors;\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\t.then((data)=>{\r\n\t\t\t\t\tif(this.table.options.ajaxResponse){\r\n\t\t\t\t\t\tdata = this.table.options.ajaxResponse.call(this.table, url, params, data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\treturn data;\r\n\t\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\t.then((response)=>{\r\n\t\t\t\t\tif(response.ok) {\r\n\t\t\t\t\t\tresponse.json()\r\n\t\t\t\t\t\t\t.then((data)=>{\r\n\t\t\t\t\t\t\t\tresolve(data);\r\n\t\t\t\t\t\t\t}).catch((error)=>{\r\n\t\t\t\t\t\t\t\treject(error);\r\n\t\t\t\t\t\t\t\tconsole.warn(\"Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\t\treject(response);\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\t.catch((error)=>{\r\n\t\t\t\t\tconsole.error(\"Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\t\treject(error);\r\n\t\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); //DEPRECATED - 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\tlist = 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.generateHTMLTable(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\t\tvalue = JSON.stringify(col.value);\r\n\t\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\t\tvalue = \"\";\r\n\t\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\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 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\t\tthis.pasteAction = Clipboard.pasteActions[action];\r\n\r\n\t\t\t\tif(!this.pasteAction){\r\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste action found:\", action);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tthis.pasteAction = action;\r\n\t\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\t\tthis.pasteParser = Clipboard.pasteParsers[parser];\r\n\r\n\t\t\t\tif(!this.pasteParser){\r\n\t\t\t\t\tconsole.warn(\"Clipboard Error - No such paste parser found:\", parser);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tthis.pasteParser = parser;\r\n\t\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\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\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}\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\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\t\tif(val instanceof Node){\r\n\r\n\t\t\t\t\t//clear previous cell contents\r\n\t\t\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\r\n\t\t\t\t\tthis.element.appendChild(val);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.element.innerHTML = \"\";\r\n\r\n\t\t\t\t\tif(val != null){\r\n\t\t\t\t\t\tconsole.warn(\"Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", val);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\t\tthis.element.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\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//////////////////// 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, force){\r\n\t\tvar changed = this.setValueProcessData(value, mutate, force);\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, force){\r\n\t\tvar changed = false;\r\n\r\n\t\tif(this.value !== value || force){\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\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\r\n\t\tthis.dispatch(\"cell-height\", this, \"\");\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\r\n\t\tthis.dispatch(\"cell-height\", this, 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}\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.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\"cssClass\": undefined,\r\n\t\"variableHeight\": undefined,\r\n\t\"headerVertical\": undefined,\r\n\t\"headerHozAlign\": undefined,\r\n\t\"headerWordWrap\": false,\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.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 pre-styled to improve render efficiency\r\n\t\tthis.maxWidth = null; //column maximum width\r\n\t\tthis.maxWidthStyled = \"\"; //column maximum pre-styled 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 pre-styled 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\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\tswitch(this.table.options.columnHeaderVertAlign){\r\n\t\t\tcase \"middle\":\r\n\t\t\t\tel.style.justifyContent = \"center\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"bottom\":\r\n\t\t\t\tel.style.justifyContent = \"flex-end\";\r\n\t\t\t\tbreak;\r\n\t\t}\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//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._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.dispatch(\"column-init\", this);\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\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//assign additional css classes to column header\r\n\t\tif(def.cssClass){\r\n\t\t\tvar classNames = def.cssClass.split(\" \");\r\n\t\t\tclassNames.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 horizontal 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 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\r\n\t\tvar titleHolderElement = document.createElement(\"div\");\r\n\t\ttitleHolderElement.classList.add(\"tabulator-col-title\");\r\n\t\t\r\n\t\tif(def.headerWordWrap){\r\n\t\t\ttitleHolderElement.classList.add(\"tabulator-col-title-wrap\");\r\n\t\t}\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\t\tif(contents instanceof Node){\r\n\t\t\t\t\tel.appendChild(contents);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.innerHTML = \"\";\r\n\t\t\t\t\tconsole.warn(\"Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:\", contents);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"undefined\":\r\n\t\t\t\tel.innerHTML = \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\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 classNames = this.definition.cssClass.split(\" \");\r\n\t\t\tclassNames.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\r\n\t\t\tcolumn.columnRendered();\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\tthis.dispatch(\"column-height\", this, this.element.style.height);\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\t// if(!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 alignment\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\r\n\t\tthis.dispatch(\"column-height\", this, \"\");\r\n\t}\r\n\r\n\t//// Retrieve 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 column 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(traverse){\r\n\t\tvar columns = [];\r\n\r\n\t\tif(traverse){\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumns.push(column);\r\n\t\t\t\t\t\r\n\t\t\t\tcolumns = columns.concat(column.getColumns(true));\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tcolumns = this.columns;\r\n\t\t}\r\n\t\t\r\n\t\treturn 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//retrieve 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.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.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\tif(this.maxWidth && minWidth > this.maxWidth){\r\n\t\t\tminWidth = this.maxWidth;\r\n\r\n\t\t\tconsole.warn(\"the minWidth (\"+ minWidth + \"px) for column '\" + this.field + \"' cannot be bigger that its maxWidth (\"+ this.maxWidthStyled + \")\");\r\n\t\t}\r\n\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\tif(this.minWidth && maxWidth < this.minWidth){\r\n\t\t\tmaxWidth = this.minWidth;\r\n\r\n\t\t\tconsole.warn(\"the maxWidth (\"+ maxWidth + \"px) for column '\" + this.field + \"' cannot be smaller that its minWidth (\"+ this.minWidthStyled + \")\");\r\n\t\t}\r\n\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\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.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\r\n\t\tthis.dispatch(\"column-rendered\", this);\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\t.then((column) => {\r\n\r\n\t\t\t\t\t\tif(definition.field == this.field){\r\n\t\t\t\t\t\t\tthis.field = false; //clear field name to prevent deletion of duplicate column from arrays\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn this.delete()\r\n\t\t\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\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;\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(){\r\n\t\treturn this._row.getPosition();\r\n\t}\r\n\r\n\twatchPosition(callback){\r\n\t\treturn this._row.watchPosition(callback);\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\t\t\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 pre-styled to improve render efficiency\r\n\t\tthis.manualHeight = false; //user has manually set row height\r\n\t\tthis.outerHeight = 0; //hold elements 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\t\tthis.position = 0; //store position of element in row list\r\n\t\tthis.positionWatchers = [];\r\n\t\t\r\n\t\tthis.component = null;\r\n\t\t\r\n\t\tthis.created = false;\r\n\t\t\r\n\t\tthis.setData(data);\r\n\t}\r\n\t\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\t\r\n\tcreateElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-row\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\t\t\r\n\t\tthis.element = el;\r\n\t}\r\n\t\r\n\tgetElement(){\r\n\t\tthis.create();\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\tgenerateElement(){\r\n\t\tthis.createElement();\r\n\t\tthis.dispatch(\"row-init\", this);\r\n\t}\r\n\t\r\n\tgenerateCells(){\r\n\t\tthis.cells = this.table.columnManager.generateCells(this);\r\n\t}\r\n\t\r\n\t//functions to setup on first render\r\n\tinitialize(force){\r\n\t\tthis.create();\r\n\t\t\r\n\t\tif(!this.initialized || force){\r\n\t\t\t\r\n\t\t\tthis.deleteCells();\r\n\t\t\t\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-layout-before\", this);\r\n\t\t\t\r\n\t\t\tthis.generateCells();\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t\t\r\n\t\t\tthis.table.columnManager.renderer.renderRowCells(this);\r\n\t\t\t\r\n\t\t\tif(force){\r\n\t\t\t\tthis.normalizeHeight();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-layout\", this);\r\n\t\t\t\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\t\t\t\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\t\r\n\treinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t\t\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\tdeinitialize(){\r\n\t\tthis.initialized = false;\r\n\t}\r\n\t\r\n\tdeinitializeHeight(){\r\n\t\tthis.heightInitialized = false;\r\n\t}\r\n\t\r\n\treinitialize(children){\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\t\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\t\t\r\n\t\tif(this.element && this.element.offsetParent !== null){\r\n\t\t\tthis.initialize(true);\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"row-relayout\", this);\r\n\t}\r\n\t\r\n\t//get heights when doing bulk row style calcs in virtual DOM\r\n\tcalcHeight(force){\r\n\t\tvar maxHeight = 0,\r\n\t\tminHeight;\r\n\t\t\r\n\t\tif(this.table.options.rowHeight){\r\n\t\t\tthis.height = this.table.options.rowHeight;\r\n\t\t}else{\r\n\t\t\tminHeight = this.table.options.resizableRows ? this.element.clientHeight : 0;\r\n\t\t\t\r\n\t\t\tthis.cells.forEach(function(cell){\r\n\t\t\t\tvar height = cell.getHeight();\r\n\t\t\t\tif(height > maxHeight){\r\n\t\t\t\t\tmaxHeight = height;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(force){\r\n\t\t\t\tthis.height = Math.max(maxHeight, minHeight);\r\n\t\t\t}else{\r\n\t\t\t\tthis.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.heightStyled = this.height ? this.height + \"px\" : \"\";\r\n\t\tthis.outerHeight = this.element.offsetHeight;\r\n\t}\r\n\t\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\t\t\r\n\t\tthis.heightInitialized = true;\r\n\t}\r\n\t\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\t\r\n\t//normalize the height of elements in the row\r\n\tnormalizeHeight(force){\r\n\t\tif(force && !this.table.options.rowHeight){\r\n\t\t\tthis.clearCellHeight();\r\n\t\t}\r\n\t\t\r\n\t\tthis.calcHeight(force);\r\n\t\t\r\n\t\tthis.setCellHeight();\r\n\t}\r\n\t\r\n\t//set height of rows\r\n\tsetHeight(height, force){\r\n\t\tif(this.height != height || force){\r\n\t\t\t\r\n\t\t\tthis.manualHeight = true;\r\n\t\t\t\r\n\t\t\tthis.height = height;\r\n\t\t\tthis.heightStyled = height ? height + \"px\" : \"\";\r\n\t\t\t\r\n\t\t\tthis.setCellHeight();\r\n\t\t\t\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\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\t//return rows outer Width\r\n\tgetWidth(){\r\n\t\treturn this.element.offsetWidth;\r\n\t}\r\n\t\r\n\t//////////////// Cell Management /////////////////\r\n\tdeleteCell(cell){\r\n\t\tvar index = this.cells.indexOf(cell);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.cells.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\r\n\t\tthis.dispatch(\"row-data-init-after\", this);\r\n\t}\r\n\t\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\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\r\n\t\t\tif(typeof updatedData === \"string\"){\r\n\t\t\t\tupdatedData = JSON.parse(updatedData);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-save-before\", this);\r\n\t\t\t\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\t\t\t\r\n\t\t\tnewRowData = this.chain(\"row-data-changing\", [this, tempData, updatedData], null, updatedData);\r\n\t\t\t\r\n\t\t\t//set data\r\n\t\t\tfor (let attrname in newRowData) {\r\n\t\t\t\tthis.data[attrname] = newRowData[attrname];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-save-after\", this);\r\n\t\t\t\r\n\t\t\t//update affected cells only\r\n\t\t\tfor (let attrname in updatedData) {\r\n\t\t\t\t\r\n\t\t\t\tlet columns = this.table.columnManager.getColumnsByFieldRoot(attrname);\r\n\t\t\t\t\r\n\t\t\t\tcolumns.forEach((column) => {\r\n\t\t\t\t\tlet cell = this.getCell(column.getField());\r\n\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\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\t\t\t\t\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\t\t\t\r\n\t\t\tthis.dispatch(\"row-data-changed\", this, visible, updatedData);\r\n\t\t\t\r\n\t\t\t//this.reinitialize();\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"rowUpdated\", this.getComponent());\r\n\t\t\t\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\t\r\n\t\t\tresolve();\r\n\t\t});\r\n\t}\r\n\t\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\t\t\r\n\t\treturn this.data;\r\n\t}\r\n\t\r\n\tgetCell(column){\r\n\t\tvar match = false;\r\n\t\t\r\n\t\tcolumn = this.table.columnManager.findColumn(column);\r\n\t\t\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\t\t\r\n\t\tmatch = this.cells.find(function(cell){\r\n\t\t\treturn cell.column === column;\r\n\t\t});\r\n\t\t\r\n\t\treturn match;\r\n\t}\r\n\t\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\t\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\t\r\n\tgetCells(){\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.generateCells();\r\n\t\t}\r\n\t\t\r\n\t\treturn this.cells;\r\n\t}\r\n\t\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\t\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\t\r\n\tmoveToRow(to, before){\r\n\t\tvar toRow = this.table.rowManager.findRow(to);\r\n\t\t\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\t\r\n\t///////////////////// Actions /////////////////////\r\n\tdelete(){\r\n\t\tthis.dispatch(\"row-delete\", this);\r\n\t\t\r\n\t\tthis.deleteActual();\r\n\t\t\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\t\r\n\tdeleteActual(blockRedraw){\r\n\t\tthis.detachModules();\r\n\t\t\r\n\t\tthis.table.rowManager.deleteRow(this, blockRedraw);\r\n\t\t\r\n\t\tthis.deleteCells();\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.heightInitialized = false;\r\n\t\tthis.element = false;\r\n\t\t\r\n\t\tthis.dispatch(\"row-deleted\", this);\r\n\t}\r\n\t\r\n\tdetachModules(){\r\n\t\tthis.dispatch(\"row-deleting\", this);\r\n\t}\r\n\t\r\n\tdeleteCells(){\r\n\t\tvar cellCount = this.cells.length;\r\n\t\t\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\t\r\n\twipe(){\r\n\t\tthis.detachModules();\r\n\t\tthis.deleteCells();\r\n\t\t\r\n\t\tif(this.element){\r\n\t\t\twhile(this.element.firstChild) this.element.removeChild(this.element.firstChild);\r\n\t\t\t\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\t\t\r\n\t\tthis.element = false;\r\n\t\tthis.modules = {};\r\n\t}\r\n\r\n\tisDisplayed(){\r\n\t\treturn this.table.rowManager.getDisplayRows().includes(this);\r\n\t}\r\n\r\n\tgetPosition(){\r\n\t\treturn this.isDisplayed() ? this.position : false;\r\n\t}\r\n\r\n\tsetPosition(position){\r\n\t\tif(position != this.position){\r\n\t\t\tthis.position = position;\r\n\r\n\t\t\tthis.positionWatchers.forEach((callback) => {\r\n\t\t\t\tcallback(this.position);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\twatchPosition(callback){\r\n\t\tthis.positionWatchers.push(callback);\r\n\r\n\t\tcallback(this.position);\r\n\t}\r\n\t\r\n\tgetGroup(){\r\n\t\treturn this.modules.group || false;\r\n\t}\r\n\t\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\t\t\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\t\r\n\t\tthis.blocked = false;\r\n\t\tthis.recalcAfterBlock = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"columnCalcs\", true);\r\n\t\t\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\t\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\t\r\n\tinitialize(){\r\n\t\tthis.genColumn = new Column({field:\"value\"}, this);\r\n\t\t\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\t\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"redraw-blocked\", this.blockRedraw.bind(this));\r\n\t\tthis.subscribe(\"redraw-restored\", this.restoreRedraw.bind(this));\r\n\t\t\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\t\r\n\ttableRedraw(force){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t\t\r\n\t\tif(force){\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockRedraw(){\r\n\t\tthis.blocked = true;\r\n\t\tthis.recalcAfterBlock = false;\r\n\t}\r\n\t\r\n\t\r\n\trestoreRedraw(){\r\n\t\tthis.blocked = false;\r\n\t\t\r\n\t\tif(this.recalcAfterBlock){\r\n\t\t\tthis.recalcAfterBlock = false;\r\n\t\t\tthis.recalcActiveRowsRefresh();\r\n\t\t}\r\n\t}\r\n\t\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\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tblockCheck(){\r\n\t\tif(this.blocked){\r\n\t\t\tthis.recalcAfterBlock = true;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.blocked;\r\n\t}\r\n\t\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\t\t\r\n\t\tif(this.botRow){\r\n\t\t\trows.push(this.botRow);\r\n\t\t}\r\n\t\t\r\n\t\treturn rows;\r\n\t}\r\n\t\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.recalcRowGroup(row);\r\n\t\t}else{\r\n\t\t\tthis.recalcActiveRows();\r\n\t\t}\r\n\t}\r\n\t\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\t\r\n\trecalcActiveRows(){\r\n\t\tthis.recalc(this.table.rowManager.activeRows);\r\n\t}\r\n\t\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\t\t\t\t\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\t\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\t\r\n\t//initialize column calcs\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\t\t\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\t\t\r\n\t\tif(def.topCalc){\r\n\t\t\t\r\n\t\t\tswitch(typeof def.topCalc){\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\t\tif(ColumnCalcs.calculations[def.topCalc]){\r\n\t\t\t\t\t\tconfig.topCalc = ColumnCalcs.calculations[def.topCalc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.topCalc);\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\tcase \"function\":\r\n\t\t\t\t\tconfig.topCalc = def.topCalc;\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(config.topCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.topCalcs.push(column);\r\n\t\t\t\t\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\t\t\t\r\n\t\t}\r\n\t\t\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\t\tif(ColumnCalcs.calculations[def.bottomCalc]){\r\n\t\t\t\t\t\tconfig.botCalc = ColumnCalcs.calculations[def.bottomCalc];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tconsole.warn(\"Column Calc Error - No such calculation found, ignoring: \", def.bottomCalc);\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\tcase \"function\":\r\n\t\t\t\t\tconfig.botCalc = def.bottomCalc;\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(config.botCalc){\r\n\t\t\t\tcolumn.modules.columnCalcs = config;\r\n\t\t\t\tthis.botCalcs.push(column);\r\n\t\t\t\t\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\t\t\r\n\t}\r\n\t\r\n\t//dummy functions to handle being mock column manager\r\n\tregisterColumnField(){}\r\n\t\r\n\tremoveCalcs(){\r\n\t\tvar changed = false;\r\n\t\t\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\t\t\r\n\t\tif(this.botInitialized){\r\n\t\t\tthis.botInitialized = false;\r\n\t\t\tthis.footerRemove(this.botElement);\r\n\t\t\tchanged = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(changed){\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeTopRow(){\r\n\t\tif(!this.topInitialized){\r\n\t\t\tthis.table.columnManager.getContentsElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);\r\n\t\t\tthis.topInitialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeBottomRow(){\r\n\t\tif(!this.botInitialized){\r\n\t\t\tthis.footerPrepend(this.botElement);\r\n\t\t\tthis.botInitialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tscrollHorizontal(left){\r\n\t\tif(this.botInitialized && this.botRow){\r\n\t\t\tthis.botElement.scrollLeft = left;\r\n\t\t}\r\n\t}\r\n\t\r\n\trecalc(rows){\r\n\t\tvar data, row;\r\n\t\t\r\n\t\tif(!this.blockCheck()){\r\n\t\t\tif(this.topInitialized || this.botInitialized){\r\n\t\t\t\tdata = this.rowsToData(rows);\r\n\t\t\t\t\r\n\t\t\t\tif(this.topInitialized){\r\n\t\t\t\t\tif(this.topRow){\r\n\t\t\t\t\t\tthis.topRow.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trow = this.generateRow(\"top\", data);\r\n\t\t\t\t\tthis.topRow = row;\r\n\t\t\t\t\twhile(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);\r\n\t\t\t\t\tthis.topElement.appendChild(row.getElement());\r\n\t\t\t\t\trow.initialize(true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(this.botInitialized){\r\n\t\t\t\t\tif(this.botRow){\r\n\t\t\t\t\t\tthis.botRow.deleteCells();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trow = this.generateRow(\"bottom\", data);\r\n\t\t\t\t\tthis.botRow = row;\r\n\t\t\t\t\twhile(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);\r\n\t\t\t\t\tthis.botElement.appendChild(row.getElement());\r\n\t\t\t\t\trow.initialize(true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t\t\t\r\n\t\t\t\t//set resizable handles\r\n\t\t\t\tif(this.table.modExists(\"frozenColumns\")){\r\n\t\t\t\t\tthis.table.modules.frozenColumns.layout();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\trecalcRowGroup(row){\r\n\t\tthis.recalcGroup(this.table.modules.groupRows.getRowGroup(row));\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tif(this.table.options.groupBy && this.table.options.columnCalcs !== \"table\"){\r\n\t\t\t\t\r\n\t\t\t\tvar groups = this.table.modules.groupRows.getChildGroups();\r\n\t\t\t\t\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\t\r\n\trecalcGroup(group){\r\n\t\tvar data, rowData;\r\n\t\t\r\n\t\tif(!this.blockCheck()){\r\n\t\t\tif(group){\r\n\t\t\t\tif(group.calcs){\r\n\t\t\t\t\tif(group.calcs.bottom){\r\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\t\trowData = this.generateRowData(\"bottom\", data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgroup.calcs.bottom.updateData(rowData);\r\n\t\t\t\t\t\tgroup.calcs.bottom.reinitialize();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(group.calcs.top){\r\n\t\t\t\t\t\tdata = this.rowsToData(group.rows);\r\n\t\t\t\t\t\trowData = this.generateRowData(\"top\", data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgroup.calcs.top.updateData(rowData);\r\n\t\t\t\t\t\tgroup.calcs.top.reinitialize();\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\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\t\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\t\t\t\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\t\t\r\n\t\treturn data;\r\n\t}\r\n\t\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\t\t\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.disable();\r\n\t\t}\r\n\t\t\r\n\t\trow = new Row(rowData, this, \"calc\");\r\n\t\t\r\n\t\tif(this.table.modExists(\"mutator\")){\r\n\t\t\tthis.table.modules.mutator.enable();\r\n\t\t}\r\n\t\t\r\n\t\trow.getElement().classList.add(\"tabulator-calcs\", \"tabulator-calcs-\" + pos);\r\n\t\t\r\n\t\trow.component = false;\r\n\t\t\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\t\t\t\r\n\t\t\treturn row.component;\r\n\t\t};\r\n\t\t\r\n\t\trow.generateCells = () => {\r\n\t\t\t\r\n\t\t\tvar cells = [];\r\n\t\t\t\r\n\t\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\t\t\r\n\t\t\t\t//set field name of mock column\r\n\t\t\t\tthis.genColumn.setField(column.getField());\r\n\t\t\t\tthis.genColumn.hozAlign = column.hozAlign;\r\n\t\t\t\t\r\n\t\t\t\tif(column.definition[pos + \"CalcFormatter\"] && this.table.modExists(\"format\")){\r\n\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(column.definition[pos + \"CalcFormatter\"]),\r\n\t\t\t\t\t\tparams: column.definition[pos + \"CalcFormatterParams\"] || {},\r\n\t\t\t\t\t};\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.genColumn.modules.format = {\r\n\t\t\t\t\t\tformatter: this.table.modules.format.getFormatter(\"plaintext\"),\r\n\t\t\t\t\t\tparams:{}\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//ensure css class definition is replicated to calculation cell\r\n\t\t\t\tthis.genColumn.definition.cssClass = column.definition.cssClass;\r\n\t\t\t\t\r\n\t\t\t\t//generate cell and assign to correct column\r\n\t\t\t\tvar cell = new Cell(this.genColumn, row);\r\n\t\t\t\tcell.getElement();\r\n\t\t\t\tcell.column = column;\r\n\t\t\t\tcell.setWidth();\r\n\t\t\t\t\r\n\t\t\t\tcolumn.cells.push(cell);\r\n\t\t\t\tcells.push(cell);\r\n\t\t\t\t\r\n\t\t\t\tif(!column.visible){\r\n\t\t\t\t\tcell.hide();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\trow.cells = cells;\r\n\t\t};\r\n\t\t\r\n\t\treturn row;\r\n\t}\r\n\t\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\t\t\r\n\t\tcalcs.forEach(function(column){\r\n\t\t\tvar values = [];\r\n\t\t\t\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\t\t\t\t\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\t\t\t\t\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\t\t\r\n\t\treturn rowData;\r\n\t}\r\n\t\r\n\thasTopCalcs(){\r\n\t\treturn\t!!(this.topCalcs.length);\r\n\t}\r\n\t\r\n\thasBottomCalcs(){\r\n\t\treturn\t!!(this.botCalcs.length);\r\n\t}\r\n\t\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\t\r\n\t//return the calculated\r\n\tgetResults(){\r\n\t\tvar results = {},\r\n\t\tgroups;\r\n\t\t\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\t\t\t\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\t\t\r\n\t\treturn results;\r\n\t}\r\n\t\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\t\t\r\n\t\tsubGroups.forEach((subgroup) => {\r\n\t\t\tsubGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);\r\n\t\t});\r\n\t\t\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\t\t\r\n\t\treturn results;\r\n\t}\r\n\t\r\n\tadjustForScrollbar(width){\r\n\t\tif(this.botRow){\r\n\t\t\tif(this.table.rtl){\r\n\t\t\t\tthis.botElement.style.paddingLeft = width + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.botElement.style.paddingRight = width + \"px\";\r\n\t\t\t}\r\n\t\t}\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\nimport RowComponent from '../../core/row/RowComponent.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.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);//selecting 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(this.options(\"movableRows\")){\r\n\t\t\t\tconsole.warn(\"The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior\");\r\n\t\t\t}\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\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\t\treturn options.dataTreeStartExpanded;\r\n\t\t\t\t\t};\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tthis.startOpen = options.dataTreeStartExpanded;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthis.startOpen = function(row, index){\r\n\t\t\t\t\t\treturn options.dataTreeStartExpanded[index];\r\n\t\t\t\t\t};\r\n\t\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\t\t\tthis.subscribe(\"table-redrawing\", this.tableRedrawing.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\ttableRedrawing(force){\r\n\t\tvar rows;\r\n\r\n\t\tif(force){\r\n\t\t\trows = this.table.rowManager.getRows();\r\n\t\t\t\r\n\t\t\trows.forEach((row) => {\r\n\t\t\t\tthis.reinitializeRowChildren(row);\r\n\t\t\t});\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\toldControl = config.controlEl;\r\n\r\n\t\tel = el || row.getCells()[0].getElement();\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\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\tgetTreeParentRoot(row){\r\n\t\treturn row.modules.dataTree && row.modules.dataTree.parent ? this.getTreeParentRoot(row.modules.dataTree.parent) : row;\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}else if(subject === null){\r\n\t\t\t\tmatch = false;\r\n\t\t\t}\r\n\r\n\t\t}else if(typeof subject == \"undefined\"){\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.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\t\tconsole.warn(\"Download Warning - CSV 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 - CSV downloader cannot process column calculations\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"header\":\r\n\t\t\t\trow.columns.forEach((col, i) => {\r\n\t\t\t\t\tif(col && col.depth === 1){\r\n\t\t\t\t\t\theaders[i] = typeof col.value == \"undefined\" || col.value === null ? \"\" : ('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\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\r\n\t\t\t\t\tif(col){\r\n\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\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\r\n\t\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\t\tcol.value = \"\";\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\titem.push('\"' + String(col.value).split('\"').join('\"\"') + '\"');\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfileContents.push(item.join(delimiter));\r\n\t\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}\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\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(item);\r\n\t\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.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\tswitch(row.type){\r\n\t\t\tcase \"header\":\r\n\t\t\t\theader.push(parseRow(row));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tbody.push(parseRow(row, rowGroupStyles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"calc\":\r\n\t\t\t\tbody.push(parseRow(row, rowCalcStyles));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"row\":\r\n\t\t\t\tbody.push(parseRow(row));\r\n\t\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\t\tcol.value = col.value !== null ? JSON.stringify(col.value) : \"\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tcol.value = \"\";\r\n\t\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.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.documentProcessing){\r\n\t\toptions.documentProcessing(doc);\r\n\t}\r\n\r\n\tsetFileContents(doc.output(\"arraybuffer\"), \"application/pdf\");\r\n}\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\tcompression = 'compress' in options ? options.compress : true,\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\treturn buf;\r\n\t}\r\n\r\n\toutput = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary', compression });\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.generateHTMLTable(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(\"downloadEncoder\", function(data, mimeType){\r\n\t\t\treturn new Blob([data],{type:mimeType});\r\n\t\t}); //function to manipulate download data\r\n\t\tthis.registerTableOption(\"downloadReady\", undefined); //warn of function deprecation\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.deprecatedOptionsCheck();\r\n\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\tdeprecatedOptionsCheck(){\r\n\t\tthis.deprecationCheck(\"downloadReady\", \"downloadEncoder\");\r\n\t}\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 = this.table.options.downloadEncoder(data, mime);\r\n\r\n\t\tif(blob){\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\tfilename = filename || \"Tabulator.\" + (typeof type === \"function\" ? \"txt\" : type);\r\n\t\t\t\t\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\t\tthis.download(data.type, \"\", data.options, data.active, data.intercept);\r\n\t\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\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\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\t\tif(char.toUpperCase() == char.toLowerCase()){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\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\tbreak;\r\n\r\n\t\t\t\t\tcase maskNumber:\r\n\t\t\t\t\t\tif(isNaN(char)){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\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\tbreak;\r\n\r\n\t\t\t\t\tcase maskWildcard:\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(char !== mask[index]){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\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;\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\nimport urlBuilder from '../Ajax/defaults/urlGenerator.js';\r\n\r\nexport default class Edit{\r\n\tconstructor(editor, cell, onRendered, success, cancel, editorParams){\r\n\t\tthis.edit = editor;\r\n\t\tthis.table = editor.table;\r\n\t\tthis.cell = cell;\r\n\t\tthis.params = this._initializeParams(editorParams);\r\n\t\t\r\n\t\tthis.data = [];\r\n\t\tthis.displayItems = [];\r\n\t\tthis.currentItems = [];\r\n\t\tthis.focusedItem = null;\r\n\t\t\r\n\t\tthis.input = this._createInputElement();\r\n\t\tthis.listEl = this._createListElement();\r\n\t\t\r\n\t\tthis.initialValues = null; \r\n\t\t\r\n\t\tthis.isFilter = !cell._getSelf;\r\n\t\t\r\n\t\tthis.filterTimeout = null;\r\n\t\tthis.filtered = false;\r\n\t\tthis.typing = false;\r\n\t\t\r\n\t\tthis.values = []; \r\n\t\tthis.popup = null; \r\n\t\t\r\n\t\tthis.listIteration = 0;\r\n\t\t\r\n\t\tthis.lastAction=\"\";\r\n\t\tthis.filterTerm=\"\";\r\n\t\t\r\n\t\tthis.blurable = true;\r\n\t\t\r\n\t\tthis.actions = {\r\n\t\t\tsuccess:success,\r\n\t\t\tcancel:cancel\r\n\t\t};\r\n\t\t\r\n\t\tthis._deprecatedOptionsCheck();\r\n\t\tthis._initializeValue();\r\n\t\t\r\n\t\tonRendered(this._onRendered.bind(this));\r\n\t}\r\n\t\r\n\t_deprecatedOptionsCheck(){\r\n\t\tif(this.params.listItemFormatter){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.sortValuesList){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.searchFunc){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.searchingPlaceholder){\r\n\t\t\tthis.cell.getTable().deprecationAdvisor.msg(\"The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t_initializeValue(){\r\n\t\tvar initialValue = this.cell.getValue();\r\n\t\t\r\n\t\tif(typeof initialValue === \"undefined\" && typeof this.params.defaultValue !== \"undefined\"){\r\n\t\t\tinitialValue = this.params.defaultValue;\r\n\t\t}\r\n\t\t\r\n\t\tthis.initialValues = this.params.multiselect ? initialValue : [initialValue];\r\n\t\t\r\n\t\tif(this.isFilter){\r\n\t\t\tthis.input.value = this.initialValues ? this.initialValues.join(\",\") : \"\";\r\n\t\t\tthis.headerFilterInitialListGen(); \r\n\t\t}\r\n\t}\r\n\t\r\n\t_onRendered(){\r\n\t\tvar cellEl = this.cell.getElement();\r\n\t\t\r\n\t\tfunction clickStop(e){\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\t\t\r\n\t\tthis.input.style.height = \"100%\";\r\n\t\tthis.input.focus({preventScroll: true});\r\n\t\t\r\n\t\t\r\n\t\tcellEl.addEventListener(\"click\", clickStop);\r\n\t\t\r\n\t\tsetTimeout(() => {\r\n\t\t\tcellEl.removeEventListener(\"click\", clickStop);\r\n\t\t}, 1000);\r\n\t\t\r\n\t\tthis.input.addEventListener(\"mousedown\", this._preventPopupBlur.bind(this));\r\n\t}\r\n\t\r\n\t_createListElement(){\r\n\t\tvar listEl = document.createElement(\"div\");\r\n\t\tlistEl.classList.add(\"tabulator-edit-list\");\r\n\t\t\r\n\t\tlistEl.addEventListener(\"mousedown\", this._preventBlur.bind(this));\r\n\t\tlistEl.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\r\n\t\t\r\n\t\treturn listEl;\r\n\t}\r\n\t\r\n\t_setListWidth(){\r\n\t\tvar element = this.isFilter ? this.input : this.cell.getElement();\r\n\t\t\r\n\t\tthis.listEl.style.minWidth = element.offsetWidth + \"px\";\r\n\t\t\r\n\t\tif(this.params.maxWidth){\r\n\t\t\tif(this.params.maxWidth === true){\r\n\t\t\t\tthis.listEl.style.maxWidth = element.offsetWidth + \"px\";\r\n\t\t\t}else if(typeof this.params.maxWidth === \"number\"){\r\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth + \"px\";\r\n\t\t\t}else{\r\n\t\t\t\tthis.listEl.style.maxWidth = this.params.maxWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\t_createInputElement(){\r\n\t\tvar attribs = this.params.elementAttributes;\r\n\t\tvar input = document.createElement(\"input\");\r\n\t\t\r\n\t\tinput.setAttribute(\"type\", this.params.clearable ? \"search\" : \"text\");\r\n\t\t\r\n\t\tinput.style.padding = \"4px\";\r\n\t\tinput.style.width = \"100%\";\r\n\t\tinput.style.boxSizing = \"border-box\";\r\n\t\t\r\n\t\tif(!this.params.autocomplete){\r\n\t\t\tinput.style.cursor = \"default\";\r\n\t\t\tinput.style.caretColor = \"transparent\";\r\n\t\t\t// input.readOnly = (this.edit.currentCell != false);\r\n\t\t}\r\n\t\t\r\n\t\tif(attribs && typeof attribs == \"object\"){\r\n\t\t\tfor (let key in attribs){\r\n\t\t\t\tif(key.charAt(0) == \"+\"){\r\n\t\t\t\t\tkey = key.slice(1);\r\n\t\t\t\t\tinput.setAttribute(key, input.getAttribute(key) + attribs[\"+\" + key]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinput.setAttribute(key, attribs[key]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.mask){\r\n\t\t\tmaskInput(input, this.params);\r\n\t\t}\r\n\t\t\r\n\t\tthis._bindInputEvents(input);\r\n\t\t\r\n\t\treturn input;\r\n\t}\r\n\t\r\n\t_initializeParams(params){\r\n\t\tvar valueKeys = [\"values\", \"valuesURL\", \"valuesLookup\"],\r\n\t\tvalueCheck;\r\n\t\t\r\n\t\tparams = Object.assign({}, params);\r\n\t\t\r\n\t\tparams.verticalNavigation = params.verticalNavigation || \"editor\";\r\n\t\tparams.placeholderLoading = typeof params.placeholderLoading === \"undefined\" ? \"Searching ...\" : params.placeholderLoading;\r\n\t\tparams.placeholderEmpty = typeof params.placeholderEmpty === \"undefined\" ? \"No Results Found\" : params.placeholderEmpty;\r\n\t\tparams.filterDelay = typeof params.filterDelay === \"undefined\" ? 300 : params.filterDelay;\r\n\t\t\r\n\t\tparams.emptyValue = Object.keys(params).includes(\"emptyValue\") ? params.emptyValue : \"\";\r\n\t\t\r\n\t\tvalueCheck = Object.keys(params).filter(key => valueKeys.includes(key)).length;\r\n\t\t\r\n\t\tif(!valueCheck){\r\n\t\t\tconsole.warn(\"list editor config error - either the values, valuesURL, or valuesLookup option must be set\");\r\n\t\t}else if(valueCheck > 1){\r\n\t\t\tconsole.warn(\"list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor\");\r\n\t\t}\r\n\t\t\r\n\t\tif(params.autocomplete){\r\n\t\t\tif(params.multiselect){\r\n\t\t\t\tparams.multiselect = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - multiselect option is not available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(params.freetext){\r\n\t\t\t\tparams.freetext = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - freetext option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.filterFunc){\r\n\t\t\t\tparams.filterFunc = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - filterFunc option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.filterRemote){\r\n\t\t\t\tparams.filterRemote = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - filterRemote option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.mask){\r\n\t\t\t\tparams.mask = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - mask option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.allowEmpty){\r\n\t\t\t\tparams.allowEmpty = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - allowEmpty option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(params.listOnEmpty){\r\n\t\t\t\tparams.listOnEmpty = false;\r\n\t\t\t\tconsole.warn(\"list editor config error - listOnEmpty option is only available when autocomplete is enabled\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(params.filterRemote && !(typeof params.valuesLookup === \"function\" || params.valuesURL)){\r\n\t\t\tparams.filterRemote = false;\r\n\t\t\tconsole.warn(\"list editor config error - filterRemote option should only be used when values list is populated from a remote source\");\r\n\t\t}\r\n\t\treturn params;\r\n\t}\r\n\t//////////////////////////////////////\r\n\t////////// Event Handling ////////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_bindInputEvents(input){\r\n\t\tinput.addEventListener(\"focus\", this._inputFocus.bind(this));\r\n\t\tinput.addEventListener(\"click\", this._inputClick.bind(this));\r\n\t\tinput.addEventListener(\"blur\", this._inputBlur.bind(this));\r\n\t\tinput.addEventListener(\"keydown\", this._inputKeyDown.bind(this));\r\n\t\tinput.addEventListener(\"search\", this._inputSearch.bind(this));\r\n\t\t\r\n\t\tif(this.params.autocomplete){\r\n\t\t\tinput.addEventListener(\"keyup\", this._inputKeyUp.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t_inputFocus(e){\r\n\t\tthis.rebuildOptionsList();\r\n\t}\r\n\t\r\n\t_filter(){\r\n\t\tif(this.params.filterRemote){\r\n\t\t\tclearTimeout(this.filterTimeout);\r\n\t\t\t\r\n\t\t\tthis.filterTimeout = setTimeout(() => {\r\n\t\t\t\tthis.rebuildOptionsList();\r\n\t\t\t}, this.params.filterDelay);\r\n\t\t}else{\r\n\t\t\tthis._filterList();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputClick(e){\r\n\t\te.stopPropagation();\r\n\t}\r\n\t\r\n\t_inputBlur(e){\r\n\t\tif(this.blurable){\r\n\t\t\tif(this.popup){\r\n\t\t\t\tthis.popup.hide();\r\n\t\t\t}else{\r\n\t\t\t\tthis._resolveValue(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputSearch(){\r\n\t\tthis._clearChoices();\r\n\t}\r\n\t\r\n\t_inputKeyDown(e){\r\n\t\tswitch(e.keyCode){\r\n\t\t\t\r\n\t\t\tcase 38: //up arrow\r\n\t\t\t\tthis._keyUp(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 40: //down arrow\r\n\t\t\t\tthis._keyDown(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 37: //left arrow\r\n\t\t\tcase 39: //right arrow\r\n\t\t\t\tthis._keySide(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tthis._keyEnter();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tthis._keyEsc();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 36: //home\r\n\t\t\tcase 35: //end\r\n\t\t\t\tthis._keyHomeEnd(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 9: //tab\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis._keySelectLetter(e);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_inputKeyUp(e){\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\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis._keyAutoCompLetter(e);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_preventPopupBlur(){\r\n\t\tif(this.popup){\r\n\t\t\tthis.popup.blockHide();\r\n\t\t}\r\n\t\t\r\n\t\tsetTimeout(() =>{\r\n\t\t\tif(this.popup){\r\n\t\t\t\tthis.popup.restoreHide();\r\n\t\t\t}\r\n\t\t}, 10);\r\n\t}\r\n\t\r\n\t_preventBlur(){\r\n\t\tthis.blurable = false;\r\n\t\t\r\n\t\tsetTimeout(() =>{\r\n\t\t\tthis.blurable = true;\r\n\t\t}, 10);\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t//////// Keyboard Navigation /////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_keyUp(e){\r\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\r\n\t\t\r\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index)){\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tif(index > 0){\r\n\t\t\t\tthis._focusItem(this.displayItems[index - 1]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyDown(e){\r\n\t\tvar index = this.displayItems.indexOf(this.focusedItem);\r\n\t\t\r\n\t\tif(this.params.verticalNavigation == \"editor\" || (this.params.verticalNavigation == \"hybrid\" && index < this.displayItems.length - 1)){\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t\te.stopPropagation();\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tif(index < this.displayItems.length - 1){\r\n\t\t\t\tif(index == -1){\r\n\t\t\t\t\tthis._focusItem(this.displayItems[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis._focusItem(this.displayItems[index + 1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keySide(e){\r\n\t\te.stopImmediatePropagation();\r\n\t\te.stopPropagation();\r\n\t\te.preventDefault();\r\n\t}\r\n\t\r\n\t_keyEnter(e){\r\n\t\tif(this.params.autocomplete && this.lastAction === \"typing\"){\r\n\t\t\tthis._resolveValue(true);\r\n\t\t}else{\r\n\t\t\tif(this.focusedItem){\r\n\t\t\t\tthis._chooseItem(this.focusedItem);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyEsc(e){\r\n\t\tthis._cancel();\r\n\t}\r\n\t\r\n\t_keyHomeEnd(e){\r\n\t\tif(this.params.autocomplete){\r\n\t\t\t//prevent table navigation while using input element\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keySelectLetter(e){\r\n\t\tif(!this.params.autocomplete){\r\n\t\t\t// if(this.edit.currentCell === false){\r\n\t\t\te.preventDefault();\r\n\t\t\t// }\r\n\t\t\t\r\n\t\t\tif(e.keyCode >= 38 && e.keyCode <= 90){\r\n\t\t\t\tthis._scrollToValue(e.keyCode);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_keyAutoCompLetter(e){\r\n\t\tthis._filter();\r\n\t\tthis.lastAction = \"typing\";\r\n\t\tthis.typing = true;\r\n\t}\r\n\t\r\n\t\r\n\t_scrollToValue(char){\r\n\t\tclearTimeout(this.filterTimeout);\r\n\t\t\r\n\t\tvar character = String.fromCharCode(char).toLowerCase();\r\n\t\tthis.filterTerm += character.toLowerCase();\r\n\t\t\r\n\t\tvar match = this.displayItems.find((item) => {\r\n\t\t\treturn typeof item.label !== \"undefined\" && item.label.toLowerCase().startsWith(this.filterTerm);\r\n\t\t});\r\n\t\t\r\n\t\tif(match){\r\n\t\t\tthis._focusItem(match);\r\n\t\t}\r\n\t\t\r\n\t\tthis.filterTimeout = setTimeout(() => {\r\n\t\t\tthis.filterTerm = \"\";\r\n\t\t}, 800);\r\n\t}\r\n\t\r\n\t_focusItem(item){\r\n\t\tthis.lastAction = \"focus\";\r\n\t\t\r\n\t\tif(this.focusedItem && this.focusedItem.element){\r\n\t\t\tthis.focusedItem.element.classList.remove(\"focused\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.focusedItem = item;\r\n\t\t\r\n\t\tif(item && item.element){\r\n\t\t\titem.element.classList.add(\"focused\");\r\n\t\t\titem.element.scrollIntoView({behavior: 'smooth', block: 'nearest', inline: 'start'});\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t//////////////////////////////////////\r\n\t/////// Data List Generation /////////\r\n\t//////////////////////////////////////\r\n\theaderFilterInitialListGen(){\r\n\t\tthis._generateOptions(true);\r\n\t}\r\n\t\r\n\trebuildOptionsList(){\r\n\t\tthis._generateOptions()\r\n\t\t\t.then(this._sortOptions.bind(this))\r\n\t\t\t.then(this._buildList.bind(this))\r\n\t\t\t.then(this._showList.bind(this))\r\n\t\t\t.catch((e) => {\r\n\t\t\t\tif(!Number.isInteger(e)){\r\n\t\t\t\t\tconsole.error(\"List generation error\", e);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\t\r\n\t_filterList(){\r\n\t\tthis._buildList(this._filterOptions());\r\n\t\tthis._showList();\r\n\t}\r\n\t\r\n\t_generateOptions(silent){\r\n\t\tvar values = [];\r\n\t\tvar iteration = ++ this.listIteration;\r\n\t\t\r\n\t\tthis.filtered = false;\r\n\t\t\r\n\t\tif(this.params.values){\r\n\t\t\tvalues = this.params.values;\r\n\t\t}else if (this.params.valuesURL){\r\n\t\t\tvalues = this._ajaxRequest(this.params.valuesURL, this.input.value);\r\n\t\t}else{\r\n\t\t\tif(typeof this.params.valuesLookup === \"function\"){\r\n\t\t\t\tvalues = this.params.valuesLookup(this.cell, this.input.value);\r\n\t\t\t}else if(this.params.valuesLookup){\r\n\t\t\t\tvalues = this._uniqueColumnValues(this.params.valuesLookupField);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(values instanceof Promise){\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis._addPlaceholder(this.params.placeholderLoading);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn values.then()\r\n\t\t\t\t.then((responseValues) => {\r\n\t\t\t\t\tif(this.listIteration === iteration){\r\n\t\t\t\t\t\treturn this._parseList(responseValues);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\treturn Promise.reject(iteration);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn Promise.resolve(this._parseList(values));\r\n\t\t}\r\n\t}\r\n\t\r\n\t_addPlaceholder(contents){\r\n\t\tvar placeholder = document.createElement(\"div\");\r\n\t\t\r\n\t\tif(typeof contents === \"function\"){\r\n\t\t\tcontents = contents(this.cell.getComponent(), this.listEl);\r\n\t\t}\r\n\t\t\r\n\t\tif(contents){\r\n\t\t\tthis._clearList();\r\n\t\t\t\r\n\t\t\tif(contents instanceof HTMLElement){\r\n\t\t\t\tplaceholder = contents;\r\n\t\t\t}else{\r\n\t\t\t\tplaceholder.classList.add(\"tabulator-edit-list-placeholder\");\r\n\t\t\t\tplaceholder.innerHTML = contents;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.listEl.appendChild(placeholder);\r\n\t\t\t\r\n\t\t\tthis._showList();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_ajaxRequest(url, term){\r\n\t\tvar params = this.params.filterRemote ? {term:term} : {};\r\n\t\turl = urlBuilder(url, {}, params);\r\n\t\t\r\n\t\treturn fetch(url)\r\n\t\t\t.then((response)=>{\r\n\t\t\t\tif(response.ok) {\r\n\t\t\t\t\treturn response.json()\r\n\t\t\t\t\t\t.catch((error)=>{\r\n\t\t\t\t\t\t\tconsole.warn(\"List Ajax Load Error - Invalid JSON returned\", error);\r\n\t\t\t\t\t\t\treturn Promise.reject(error);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.error(\"List Ajax Load Error - Connection Error: \" + response.status, response.statusText);\r\n\t\t\t\t\treturn Promise.reject(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(\"List Ajax Load Error - Connection Error: \", error);\r\n\t\t\t\treturn Promise.reject(error);\r\n\t\t\t});\r\n\t}\r\n\t\r\n\t_uniqueColumnValues(field){\r\n\t\tvar output = {},\r\n\t\tdata = this.table.getData(this.params.valuesLookup),\r\n\t\tcolumn;\r\n\t\t\r\n\t\tif(field){\r\n\t\t\tcolumn = this.table.columnManager.getColumnByField(field);\r\n\t\t}else{\r\n\t\t\tcolumn = this.cell.getColumn()._getSelf();\r\n\t\t}\r\n\t\t\r\n\t\tif(column){\r\n\t\t\tdata.forEach((row) => {\r\n\t\t\t\tvar val = column.getFieldValue(row);\r\n\t\t\t\t\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\toutput = [];\r\n\t\t}\r\n\t\t\r\n\t\treturn Object.keys(output);\r\n\t}\r\n\t\r\n\t\r\n\t_parseList(inputValues){\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tif(!Array.isArray(inputValues)){\r\n\t\t\tinputValues = Object.entries(inputValues).map(([key, value]) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tlabel:value,\r\n\t\t\t\t\tvalue:key,\r\n\t\t\t\t};\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tinputValues.forEach((value) => {\r\n\t\t\tif(typeof value !== \"object\"){\r\n\t\t\t\tvalue = {\r\n\t\t\t\t\tlabel:value,\r\n\t\t\t\t\tvalue:value,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._parseListItem(value, data, 0);\r\n\t\t});\r\n\t\t\r\n\t\tif(!this.currentItems.length && this.params.freetext){\r\n\t\t\tthis.input.value = this.initialValues;\r\n\t\t\tthis.typing = true;\r\n\t\t\tthis.lastAction = \"typing\";\r\n\t\t}\r\n\t\t\r\n\t\tthis.data = data;\r\n\t\t\r\n\t\treturn data; \r\n\t}\r\n\t\r\n\t_parseListItem(option, data, level){\r\n\t\tvar item = {};\r\n\t\t\r\n\t\tif(option.options){\r\n\t\t\titem = this._parseListGroup(option, level + 1);\r\n\t\t}else{\r\n\t\t\titem = {\r\n\t\t\t\tlabel:option.label,\r\n\t\t\t\tvalue:option.value,\r\n\t\t\t\titemParams:option.itemParams,\r\n\t\t\t\telementAttributes: option.elementAttributes,\r\n\t\t\t\telement:false,\r\n\t\t\t\tselected:false,\r\n\t\t\t\tvisible:true,\r\n\t\t\t\tlevel:level,\r\n\t\t\t\toriginal:option,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tif(this.initialValues && this.initialValues.indexOf(option.value) > -1){\r\n\t\t\t\tthis._chooseItem(item, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdata.push(item);\r\n\t}\r\n\t\r\n\t_parseListGroup(option, level){\r\n\t\tvar item = {\r\n\t\t\tlabel:option.label,\r\n\t\t\tgroup:true,\r\n\t\t\titemParams:option.itemParams,\r\n\t\t\telementAttributes:option.elementAttributes,\r\n\t\t\telement:false,\r\n\t\t\tvisible:true,\r\n\t\t\tlevel:level,\r\n\t\t\toptions:[],\r\n\t\t\toriginal:option,\r\n\t\t};\r\n\t\t\r\n\t\toption.options.forEach((child) => {\r\n\t\t\tthis._parseListItem(child, item.options, level);\r\n\t\t});\r\n\t\t\r\n\t\treturn item;\r\n\t}\r\n\t\r\n\t_sortOptions(options){\r\n\t\tvar sorter;\r\n\t\t\r\n\t\tif(this.params.sort){\r\n\t\t\tsorter = typeof this.params.sort === \"function\" ? this.params.sort : this._defaultSortFunction.bind(this);\r\n\t\t\t\r\n\t\t\tthis._sortGroup(sorter, options);\r\n\t\t}\r\n\t\t\r\n\t\treturn options;\r\n\t}\r\n\t\r\n\t_sortGroup(sorter, options){\r\n\t\toptions.sort((a,b) => {\r\n\t\t\treturn sorter(a.label, b.label, a.value, b.value, a.original, b.original);\r\n\t\t});\r\n\t\t\r\n\t\toptions.forEach((option) => {\r\n\t\t\tif(option.group){\r\n\t\t\t\tthis._sortGroup(sorter, option.options);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t_defaultSortFunction(as, bs){\r\n\t\tvar a, b, a1, b1, i= 0, L, rx = /(\\d+)|(\\D+)/g, rd = /\\d/;\r\n\t\tvar emptyAlign = 0;\r\n\t\t\r\n\t\tif(this.params.sort === \"desc\"){\r\n\t\t\t[as, bs] = [bs, as];\r\n\t\t}\r\n\t\t\r\n\t\t//handle empty values\r\n\t\tif(!as && as!== 0){\r\n\t\t\temptyAlign = !bs && bs!== 0 ? 0 : -1;\r\n\t\t}else if(!bs && bs!== 0){\r\n\t\t\temptyAlign = 1;\r\n\t\t}else{\r\n\t\t\tif(isFinite(as) && isFinite(bs)) return as - bs;\r\n\t\t\ta = String(as).toLowerCase();\r\n\t\t\tb = String(bs).toLowerCase();\r\n\t\t\tif(a === b) return 0;\r\n\t\t\tif(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1;\r\n\t\t\ta = a.match(rx);\r\n\t\t\tb = b.match(rx);\r\n\t\t\tL = a.length > b.length ? b.length : a.length;\r\n\t\t\twhile(i < L){\r\n\t\t\t\ta1= a[i];\r\n\t\t\t\tb1= b[i++];\r\n\t\t\t\tif(a1 !== b1){\r\n\t\t\t\t\tif(isFinite(a1) && isFinite(b1)){\r\n\t\t\t\t\t\tif(a1.charAt(0) === \"0\") a1 = \".\" + a1;\r\n\t\t\t\t\t\tif(b1.charAt(0) === \"0\") b1 = \".\" + b1;\r\n\t\t\t\t\t\treturn a1 - b1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse return a1 > b1 ? 1 : -1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn a.length > b.length;\r\n\t\t}\r\n\t\t\r\n\t\treturn emptyAlign;\r\n\t}\r\n\t\r\n\t_filterOptions(){\r\n\t\tvar filterFunc = this.params.filterFunc || this._defaultFilterFunc,\r\n\t\tterm = this.input.value;\r\n\t\t\r\n\t\tif(term){\r\n\t\t\tthis.filtered = true;\r\n\t\t\t\r\n\t\t\tthis.data.forEach((item) => {\r\n\t\t\t\tthis._filterItem(filterFunc, term, item);\r\n\t\t\t});\r\n\t\t}else{\r\n\t\t\tthis.filtered = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.data;\r\n\t}\r\n\t\r\n\t_filterItem(func, term, item){\r\n\t\tvar matches = false;\r\n\t\t\r\n\t\tif(!item.group){\r\n\t\t\titem.visible = func(term, item.label, item.value, item.original);\r\n\t\t}else{\r\n\t\t\titem.options.forEach((option) => {\r\n\t\t\t\tif(this._filterItem(func, term, option)){\r\n\t\t\t\t\tmatches = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\titem.visible = matches;\r\n\t\t}\r\n\t\t\r\n\t\treturn item.visible;\r\n\t}\r\n\t\r\n\t_defaultFilterFunc(term, label, value, item){\r\n\t\tterm = String(term).toLowerCase();\r\n\t\t\r\n\t\tif(label !== null && typeof label !== \"undefined\"){\r\n\t\t\tif(String(label).toLowerCase().indexOf(term) > -1 || String(value).toLowerCase().indexOf(term) > -1){\r\n\t\t\t\treturn true;\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\t//////////////////////////////////////\r\n\t/////////// Display List /////////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_clearList(){\r\n\t\twhile(this.listEl.firstChild) this.listEl.removeChild(this.listEl.firstChild);\r\n\t\t\r\n\t\tthis.displayItems = [];\r\n\t}\r\n\t\r\n\t_buildList(data){\r\n\t\tthis._clearList();\r\n\t\t\r\n\t\tdata.forEach((option) => {\r\n\t\t\tthis._buildItem(option);\r\n\t\t});\r\n\t\t\r\n\t\tif(!this.displayItems.length){\r\n\t\t\tthis._addPlaceholder(this.params.placeholderEmpty);\r\n\t\t} \r\n\t}\r\n\t\r\n\t_buildItem(item){\r\n\t\tvar el = item.element,\r\n\t\tcontents;\r\n\t\t\r\n\t\tif(!this.filtered || item.visible){\r\n\t\t\t\r\n\t\t\tif(!el){\r\n\t\t\t\tel = document.createElement(\"div\");\r\n\t\t\t\tel.tabIndex = 0;\r\n\t\t\t\t\r\n\t\t\t\tcontents = this.params.itemFormatter ? this.params.itemFormatter(item.label, item.value, item.original, el) : item.label;\r\n\t\t\t\t\r\n\t\t\t\tif(contents instanceof HTMLElement){\r\n\t\t\t\t\tel.appendChild(contents);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.innerHTML = contents;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-group\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.classList.add(\"tabulator-edit-list-item\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tel.classList.add(\"tabulator-edit-list-group-level-\" + item.level);\r\n\t\t\t\t\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, this.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\t\r\n\t\t\t\tif(item.group){\r\n\t\t\t\t\tel.addEventListener(\"click\", this._groupClick.bind(this, item));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tel.addEventListener(\"click\", this._itemClick.bind(this, item));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tel.addEventListener(\"mousedown\", this._preventBlur.bind(this));\r\n\t\t\t\t\r\n\t\t\t\titem.element = el;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t\tthis.listEl.appendChild(el);\r\n\t\t\t\r\n\t\t\tif(item.group){\r\n\t\t\t\titem.options.forEach((option) => {\r\n\t\t\t\t\tthis._buildItem(option);\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tthis.displayItems.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_showList(){\r\n\t\tvar startVis = this.popup && this.popup.isVisible();\r\n\t\t\r\n\t\tif(this.input.parentNode){\r\n\t\t\tif(this.params.autocomplete && this.input.value === \"\" && !this.params.listOnEmpty){\r\n\t\t\t\tif(this.popup){\r\n\t\t\t\t\tthis.popup.hide(true);\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._setListWidth();\r\n\t\t\t\r\n\t\t\tif(!this.popup){\r\n\t\t\t\tthis.popup = this.edit.popup(this.listEl);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.popup.show(this.cell.getElement(), \"bottom\");\r\n\t\t\t\r\n\t\t\tif(!startVis){\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.popup.hideOnBlur(this._resolveValue.bind(this, true));\r\n\t\t\t\t}, 10);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_styleItem(item){\r\n\t\tif(item && item.element){\r\n\t\t\tif(item.selected){\r\n\t\t\t\titem.element.classList.add(\"active\");\r\n\t\t\t}else{\r\n\t\t\t\titem.element.classList.remove(\"active\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////////////////////////////\r\n\t///////// User Interaction ///////////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_itemClick(item, e){\r\n\t\te.stopPropagation();\r\n\t\t\r\n\t\tthis._chooseItem(item);\r\n\t}\r\n\t\r\n\t_groupClick(item, e){\r\n\t\te.stopPropagation();\r\n\t}\r\n\t\r\n\t\r\n\t//////////////////////////////////////\r\n\t////// Current Item Management ///////\r\n\t//////////////////////////////////////\r\n\t\r\n\t_cancel(){\r\n\t\tthis.popup.hide(true);\r\n\t\tthis.actions.cancel();\r\n\t}\r\n\t\r\n\t_clearChoices(){\r\n\t\tthis.typing = true;\r\n\t\t\r\n\t\tthis.currentItems.forEach((item) => {\r\n\t\t\titem.selected = false;\r\n\t\t\tthis._styleItem(item);\r\n\t\t});\r\n\t\t\r\n\t\tthis.currentItems = [];\r\n\t\t\r\n\t\tthis.focusedItem = null;\r\n\t}\r\n\t\r\n\t_chooseItem(item, silent){\r\n\t\tvar index;\r\n\t\t\r\n\t\tthis.typing = false;\r\n\t\t\r\n\t\tif(this.params.multiselect){\r\n\t\t\tindex = this.currentItems.indexOf(item);\r\n\t\t\t\r\n\t\t\tif(index > -1){\r\n\t\t\t\tthis.currentItems.splice(index, 1);\r\n\t\t\t\titem.selected = false;\r\n\t\t\t}else{\r\n\t\t\t\tthis.currentItems.push(item);\r\n\t\t\t\titem.selected = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.input.value = this.currentItems.map(item => item.label).join(\",\");\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tthis.currentItems = [item];\r\n\t\t\titem.selected = true;\r\n\t\t\t\r\n\t\t\tthis.input.value = item.label;\r\n\t\t\t\r\n\t\t\tthis._styleItem(item);\r\n\t\t\t\r\n\t\t\tif(!silent){\r\n\t\t\t\tthis._resolveValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis._focusItem(item);\r\n\t}\r\n\t\r\n\t_resolveValue(blur){\r\n\t\tvar output, initialValue;\r\n\r\n\t\tif(this.popup){\r\n\t\t\tthis.popup.hide(true);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.params.multiselect){\r\n\t\t\toutput = this.currentItems.map(item => item.value);\r\n\t\t}else{\r\n\t\t\tif(blur && this.params.autocomplete && this.typing){\r\n\t\t\t\tif(this.params.freetext || (this.params.allowEmpty && this.input.value === \"\")){\r\n\t\t\t\t\toutput = this.input.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.actions.cancel();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this.currentItems[0]){\r\n\t\t\t\t\toutput = this.currentItems[0].value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tinitialValue = this.initialValues[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(initialValue === null || typeof initialValue === \"undefined\" || initialValue === \"\"){\r\n\t\t\t\t\t\toutput = initialValue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\toutput = this.params.emptyValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(output === \"\"){\r\n\t\t\toutput = this.params.emptyValue;\r\n\t\t}\r\n\t\t\r\n\t\tthis.actions.success(output);\r\n\t\t\r\n\t\tif(this.isFilter){\r\n\t\t\tthis.initialValues = output && !Array.isArray(output) ? [output] : output;\r\n\t\t\tthis.currentItems = [];\r\n\t\t}\r\n\t}\r\n\t\r\n}\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 date from './editors/date.js';\r\nimport time from './editors/time.js';\r\nimport datetime from './editors/datetime.js';\r\nimport select from './editors/select.js';\r\nimport list from './editors/list.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\tnumber:number,\r\n\trange:range,\r\n\tdate:date,\r\n\ttime:time,\r\n\tdatetime:datetime,\r\n\tselect:select,\r\n\tlist:list,\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\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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\tvar cellValue = cell.getValue(),\r\n\tvertNav = editorParams.verticalNavigation || \"hybrid\",\r\n\tvalue = String(cellValue !== null && typeof cellValue !== \"undefined\" ? cellValue : \"\"),\r\n\tinput = document.createElement(\"textarea\"),\r\n\tscrollHeight = 0;\r\n\r\n\t//create and style input\r\n\tinput.style.display = \"block\";\r\n\tinput.style.padding = \"2px\";\r\n\tinput.style.height = \"100%\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\tinput.style.whiteSpace = \"pre-wrap\";\r\n\tinput.style.resize = \"none\";\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\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\r\n\t\tinput.scrollHeight;\r\n\t\tinput.style.height = input.scrollHeight + \"px\";\r\n\t\tcell.getRow().normalizeHeight();\r\n\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\r\n\tfunction onChange(e){\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && input.value !== \"\") || input.value !== cellValue){\r\n\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\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tcell.getRow().normalizeHeight();\r\n\t\t\t},300);\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\tinput.addEventListener(\"keyup\", function(){\r\n\r\n\t\tinput.style.height = \"\";\r\n\r\n\t\tvar heightNow = input.scrollHeight;\r\n\r\n\t\tinput.style.height = heightNow + \"px\";\r\n\r\n\t\tif(heightNow != scrollHeight){\r\n\t\t\tscrollHeight = heightNow;\r\n\t\t\tcell.getRow().normalizeHeight();\r\n\t\t}\r\n\t});\r\n\r\n\tinput.addEventListener(\"keydown\", function(e){\r\n\r\n\t\tswitch(e.keyCode){\r\n\r\n\t\t\tcase 13:\r\n\t\t\t\tif(e.shiftKey && editorParams.shiftEnterSubmit){\r\n\t\t\t\t\tonChange(e);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 38: //up arrow\r\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart)){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 40: //down arrow\r\n\t\t\t\tif(vertNav == \"editor\" || (vertNav == \"hybrid\" && input.selectionStart !== input.value.length)){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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//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\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\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\t\tonChange();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\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\t\tif(vertNav == \"editor\"){\r\n\t\t\t\t\te.stopImmediatePropagation();\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\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\t\tonChange();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null;\r\n\t\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tfunction convertDate(value){\r\n\t\tvar newDatetime;\r\n\t\t\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\r\n\t\t\r\n\t\treturn newDatetime.toFormat(\"yyyy-MM-dd\");\r\n\t}\r\n\t\r\n\tinput.type = \"date\";\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.max){\r\n\t\tinput.setAttribute(\"max\", inputFormat ? convertDate(editorParams.max) : editorParams.max);\r\n\t}\r\n\r\n\tif(editorParams.min){\r\n\t\tinput.setAttribute(\"min\", inputFormat ? convertDate(editorParams.min) : editorParams.min);\r\n\t}\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\t\t\r\n\t\t\tcellValue = convertDate(cellValue);\t\t\t\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\t\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\t\t\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\t\t\t\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromFormat(String(value), \"yyyy-MM-dd\").toFormat(inputFormat);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \r\n\tnewDatetime;\r\n\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tinput.type = \"time\";\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\r\n\t\t\tif(DT.isDateTime(cellValue)){\r\n\t\t\t\tnewDatetime = cellValue;\r\n\t\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\r\n\t\t\t}else{\r\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tcellValue = newDatetime.toFormat(\"hh:mm\");\r\n\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromFormat(String(value), \"hh:mm\").toFormat(inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","//input element\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar inputFormat = editorParams.format,\r\n\tDT = inputFormat ? (window.DateTime || luxon.DateTime) : null, \r\n\tnewDatetime;\r\n\r\n\t//create and style input\r\n\tvar cellValue = cell.getValue(),\r\n\tinput = document.createElement(\"input\");\r\n\t\r\n\tinput.type = \"datetime-local\";\r\n\tinput.style.padding = \"4px\";\r\n\tinput.style.width = \"100%\";\r\n\tinput.style.boxSizing = \"border-box\";\r\n\t\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\t\r\n\tcellValue = typeof cellValue !== \"undefined\" ? cellValue : \"\";\r\n\t\r\n\tif(inputFormat){\r\n\t\tif(DT){\r\n\t\t\tif(DT.isDateTime(cellValue)){\r\n\t\t\t\tnewDatetime = cellValue;\r\n\t\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\t\tnewDatetime = DT.fromISO(String(cellValue));\r\n\t\t\t}else{\r\n\t\t\t\tnewDatetime = DT.fromFormat(String(cellValue), inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tcellValue = newDatetime.toFormat(\"yyyy-MM-dd\") + \"T\" + newDatetime.toFormat(\"hh:mm\");\r\n\t\t}else{\r\n\t\t\tconsole.error(\"Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js\");\r\n\t\t}\r\n\t}\r\n\r\n\tinput.value = cellValue;\r\n\t\r\n\tonRendered(function(){\r\n\t\tinput.focus({preventScroll: true});\r\n\t\tinput.style.height = \"100%\";\r\n\t\t\r\n\t\tif(editorParams.selectContents){\r\n\t\t\tinput.select();\r\n\t\t}\r\n\t});\r\n\t\r\n\tfunction onChange(e){\r\n\t\tvar value = input.value;\r\n\r\n\t\tif(((cellValue === null || typeof cellValue === \"undefined\") && value !== \"\") || value !== cellValue){\r\n\r\n\t\t\tif(value && inputFormat){\r\n\t\t\t\tvalue = DT.fromISO(String(value)).toFormat(inputFormat);\r\n\t\t\t}\r\n\r\n\t\t\tif(success(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\t\r\n\t//submit new value on blur or change\r\n\tinput.addEventListener(\"change\", onChange);\r\n\tinput.addEventListener(\"blur\", onChange);\r\n\t\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\t\tonChange(e);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 27:\r\n\t\t\t\tcancel();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 35:\r\n\t\t\tcase 36:\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\r\n\tthis.deprecationMsg(\"The select editor has been deprecated, please use the new list editor\");\r\n\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.input;\r\n}","import List from '../../List.js';\r\n\r\nexport default function(cell, onRendered, success, cancel, editorParams){\r\n\r\n\tthis.deprecationMsg(\"The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam\");\r\n\r\n\teditorParams.autocomplete = true;\r\n\r\n\tvar list = new List(this, cell, onRendered, success, cancel, editorParams);\r\n\r\n\treturn list.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\t\tchangeValue(value + 1);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\t\tchangeValue(value - 1);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tsuccess(value);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tcancel();\r\n\t\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\t\te.preventDefault();\r\n\t\t\t\tbar.style.width = (bar.clientWidth + element.clientWidth/100) + \"px\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 37: //left arrow\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tbar.style.width = (bar.clientWidth - element.clientWidth/100) + \"px\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 9: //tab\r\n\t\t\tcase 13: //enter\r\n\t\t\t\tupdateValue();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27: //escape\r\n\t\t\t\tcancel();\r\n\t\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\ttrueValueSet = Object.keys(editorParams).includes(\"trueValue\"),\r\n\tfalseValueSet = Object.keys(editorParams).includes(\"falseValue\");\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 = trueValueSet ? value === editorParams.trueValue : (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\tvar checkedValue = input.checked;\r\n\r\n\t\tif(trueValueSet && checkedValue){\r\n\t\t\tcheckedValue = editorParams.trueValue;\r\n\t\t}else if(falseValueSet && !checkedValue){\r\n\t\t\tcheckedValue = editorParams.falseValue;\r\n\t\t}\r\n\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 checkedValue;\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 checkedValue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn checkedValue;\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.currentCell = false; //hold currently editing cell\r\n\t\tthis.mouseClick = false; //hold mousedown state to prevent click binding being overridden 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\t\t\r\n\t\tthis.editors = Edit.editors;\r\n\t\t\r\n\t\tthis.registerColumnOption(\"editable\");\r\n\t\tthis.registerColumnOption(\"editor\");\r\n\t\tthis.registerColumnOption(\"editorParams\");\r\n\t\t\r\n\t\tthis.registerColumnOption(\"cellEditing\");\r\n\t\tthis.registerColumnOption(\"cellEdited\");\r\n\t\tthis.registerColumnOption(\"cellEditCancelled\");\r\n\t\t\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\t\t\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\t\t\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\t\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(\"cell-value-changed\", this.updateCellClass.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(\"row-layout\", this.rowEditableCheck.bind(this));\r\n\t\tthis.subscribe(\"data-refreshing\", this.cancelEdit.bind(this));\r\n\t\t\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\t\r\n\t\r\n\t///////////////////////////////////\r\n\t////// Keybinding Functions ///////\r\n\t///////////////////////////////////\r\n\t\r\n\tkeybindingNavigateNext(e){\r\n\t\tvar cell = this.currentCell,\r\n\t\tnewRow = this.options(\"tabEndNewRow\");\r\n\t\t\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\t\t\t\t\t\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\t\t\t\t\t\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\t\r\n\t///////////////////////////////////\r\n\t///////// Cell Functions //////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcellIsEdited(cell){\r\n\t\treturn !! cell.modules.edit && cell.modules.edit.edited;\r\n\t}\r\n\t\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\t\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\tupdateCellClass(cell){\r\n\t\tif(this.allowEdit(cell)) {\r\n\t\t\tcell.getElement().classList.add(\"tabulator-editable\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-editable\");\r\n\t\t}\r\n\t}\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\t\t\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\t\t\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\t\r\n\tnavigatePrev(cell = this.currentCell, e){\r\n\t\tvar nextCell, prevRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnextCell = this.navigateLeft();\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(prevRow){\r\n\t\t\t\t\tnextCell = this.findPrevEditableCell(prevRow, prevRow.cells.length);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateNext(cell = this.currentCell, e){\r\n\t\tvar nextCell, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnextCell = this.navigateRight();\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(nextRow){\r\n\t\t\t\t\tnextCell = this.findNextEditableCell(nextRow, -1);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateLeft(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findPrevEditableCell(cell.row, index);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateRight(cell = this.currentCell, e){\r\n\t\tvar index, nextCell;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextCell = this.findNextEditableCell(cell.row, index);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateUp(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.prevDisplayRow(cell.row, true);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tnavigateDown(cell = this.currentCell, e){\r\n\t\tvar index, nextRow;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\t\r\n\t\t\tif(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex = cell.getIndex();\r\n\t\t\tnextRow = this.table.rowManager.nextDisplayRow(cell.row, true);\r\n\t\t\t\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\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tfindNextEditableCell(row, index){\r\n\t\tvar nextCell = false;\r\n\t\t\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\t\t\t\t\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn nextCell;\r\n\t}\r\n\t\r\n\tfindPrevEditableCell(row, index){\r\n\t\tvar prevCell = false;\r\n\t\t\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\t\r\n\t\t\t\tif(cell.column.modules.edit && Helpers.elVisible(cell.getElement())){\r\n\t\t\t\t\tlet allowEdit = this.allowEdit(cell);\r\n\t\t\t\t\t\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\t\t\r\n\t\treturn prevCell;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\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\t\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\t\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\trowEditableCheck(row){\r\n\t\trow.getCells().forEach((cell) => {\r\n\t\t\tif(cell.column.modules.edit && typeof cell.column.modules.edit.check === \"function\"){\r\n\t\t\t\tthis.updateCellClass(cell);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//initialize column editor\r\n\tinitializeColumn(column){\r\n\t\tvar config = {\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\t\t\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\t\tif(this.editors[column.definition.editor]){\r\n\t\t\t\t\tconfig.editor = this.editors[column.definition.editor];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Editor Error - No such editor found: \", column.definition.editor);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\tconfig.editor = column.definition.editor;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"boolean\":\r\n\t\t\t\tif(column.definition.editor === true){\r\n\t\t\t\t\tif(typeof column.definition.formatter !== \"function\"){\r\n\t\t\t\t\t\tif(this.editors[column.definition.formatter]){\r\n\t\t\t\t\t\t\tconfig.editor = this.editors[column.definition.formatter];\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tconfig.editor = this.editors[\"input\"];\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(\"Editor Error - Cannot auto lookup editor for a custom formatter: \", column.definition.formatter);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif(config.editor){\r\n\t\t\tcolumn.modules.edit = config;\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetCurrentCell(){\r\n\t\treturn this.currentCell ? this.currentCell.getComponent() : false;\r\n\t}\r\n\t\r\n\tclearEditor(cancel){\r\n\t\tvar cell = this.currentCell,\r\n\t\tcellEl;\r\n\t\t\r\n\t\tthis.invalidEdit = false;\r\n\t\t\r\n\t\tif(cell){\r\n\t\t\tthis.currentCell = false;\r\n\t\t\t\r\n\t\t\tcellEl = cell.getElement();\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"edit-editor-clear\", cell, cancel);\r\n\t\t\t\r\n\t\t\tcellEl.classList.remove(\"tabulator-editing\");\r\n\t\t\t\r\n\t\t\twhile(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild);\r\n\t\t\t\r\n\t\t\tcell.row.getElement().classList.remove(\"tabulator-editing\");\r\n\t\t\t\r\n\t\t\tcell.table.element.classList.remove(\"tabulator-editing\");\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.clearEditor(true);\r\n\t\t\tcell.setValueActual(cell.getValue());\r\n\t\t\tcell.cellRendered();\r\n\t\t\t\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\t\t\t\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\t\t\t\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\t\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\t\t\t\r\n\t\t\tthis.updateCellClass(cell);\r\n\t\t\telement.setAttribute(\"tabindex\", 0);\r\n\t\t\t\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\t\t\t\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\t\t\t\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\t\r\n\tfocusCellNoEvent(cell, block){\r\n\t\tthis.recursionBlock = true;\r\n\t\t\r\n\t\tif(!(block && this.table.browser === \"ie\")){\r\n\t\t\tcell.getElement().focus({preventScroll: true});\r\n\t\t}\r\n\t\t\r\n\t\tthis.recursionBlock = false;\r\n\t}\r\n\t\r\n\teditCell(cell, forceEdit){\r\n\t\tthis.focusCellNoEvent(cell);\r\n\t\tthis.edit(cell, false, forceEdit);\r\n\t}\r\n\t\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\t\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\t\t\t\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\t\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\t\t\t\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\t\t\t\r\n\t\t\tif(cellEl.offsetLeft < leftEdge){\r\n\t\t\t\t\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\t\r\n\tallowEdit(cell) {\r\n\t\tvar check = cell.column.modules.edit ? true : false;\r\n\r\n\t\tif(cell.column.modules.edit){\r\n\t\t\tswitch(typeof cell.column.modules.edit.check){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tif(cell.row.initialized){\r\n\t\t\t\t\t\tcheck = cell.column.modules.edit.check(cell.getComponent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"string\":\r\n\t\t\t\t\tcheck = !!cell.row.data[cell.column.modules.edit.check];\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tcheck = cell.column.modules.edit.check;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn check;\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\t//handle successful value change\r\n\t\tfunction success(value){\r\n\t\t\tif(self.currentCell === cell){\r\n\t\t\t\tvar valid = self.chain(\"edit-success\", [cell, value], true, true);\r\n\t\t\t\t\r\n\t\t\t\tif(valid === true || self.table.options.validationMode === \"highlight\"){\r\n\t\t\t\t\tself.clearEditor();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\tcell.modules.edit.edited = true;\r\n\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\tcell.setValue(value, true);\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn valid === true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tself.invalidEdit = true;\r\n\t\t\t\t\tself.focusCellNoEvent(cell, true);\r\n\t\t\t\t\trendered();\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\t\t\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\t\t\r\n\t\tfunction onRendered(callback){\r\n\t\t\trendered = callback;\r\n\t\t}\r\n\t\t\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\t\t\t\r\n\t\t\tallowEdit = this.allowEdit(cell);\r\n\t\t\t\r\n\t\t\tif(allowEdit || forceEdit){\r\n\t\t\t\t\r\n\t\t\t\tself.cancelEdit();\r\n\t\t\t\t\r\n\t\t\t\tself.currentCell = cell;\r\n\t\t\t\t\r\n\t\t\t\tthis.focusScrollAdjust(cell);\r\n\t\t\t\t\r\n\t\t\t\tcomponent = cell.getComponent();\r\n\t\t\t\t\r\n\t\t\t\tif(this.mouseClick){\r\n\t\t\t\t\tthis.mouseClick = false;\r\n\t\t\t\t\t\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\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"cell-editing\", cell);\r\n\t\t\t\tthis.dispatchExternal(\"cellEditing\", component);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tcellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params);\r\n\t\t\t\t\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\t\t\t\t\t\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-editing\");\r\n\t\t\t\t\t\tcell.table.element.classList.add(\"tabulator-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\t\t\t\t\t\t\r\n\t\t\t\t\t\t//trigger onRendered Callback\r\n\t\t\t\t\t\trendered();\r\n\t\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\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\t\r\n\tgetEditedCells(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.editedCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tclearEdited(cell){\r\n\t\tvar editIndex;\r\n\t\t\r\n\t\tif(cell.modules.edit && cell.modules.edit.edited){\r\n\t\t\tcell.modules.edit.edited = false;\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"edit-edited-clear\", cell);\r\n\t\t}\r\n\t\t\r\n\t\teditIndex = this.editedCells.indexOf(cell);\r\n\t\t\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 output 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\tgenerateTable(config, style, range, colVisProp){\r\n\t\tvar list = this.generateExportList(config, style, range, colVisProp);\r\n\r\n\t\treturn this.generateTableElement(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\t\trows = this.table.rowManager.getVisibleRows(false, true);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"all\":\r\n\t\t\t\t\trows = this.table.rowManager.rows;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"selected\":\r\n\t\t\t\t\trows = this.table.modules.selectRow.selectedRows;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tif(this.table.options.pagination){\r\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\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\tvar visProp = column.definition[this.colVisProp];\r\n\r\n\t\tif(typeof visProp === \"function\"){\r\n\t\t\tvisProp = visProp.call(this.table, column.getComponent());\r\n\t\t}\r\n\r\n\t\treturn visProp !== false && (column.visible || (!column.visible && visProp));\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 depth\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\t\treturn this.config.rowGroups !== false;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\t\treturn this.config.columnCalcs !== false;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\t\treturn !(this.table.options.dataTree && this.config.dataTree === false && row.modules.dataTree.parent);\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\t\tindent = row.level;\r\n\t\t\t\t\texportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1));\r\n\t\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\t\tcolumns.forEach((col) => {\r\n\t\t\t\t\t\texportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1));\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(this.table.options.dataTree && this.config.dataTree !== false){\r\n\t\t\t\t\t\tindent = row.modules.dataTree.index;\r\n\t\t\t\t\t}\r\n\t\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\tgenerateTableElement(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\tlet rowEl;\r\n\r\n\t\t\tswitch(row.type){\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\t\theaderEl.appendChild(this.generateHeaderElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"group\":\r\n\t\t\t\t\tbodyEl.appendChild(this.generateGroupElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"calc\":\r\n\t\t\t\t\tbodyEl.appendChild(this.generateCalcElement(row, setup, styles));\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"row\":\r\n\t\t\t\t\trowEl = this.generateRowElement(row, setup, styles);\r\n\r\n\t\t\t\t\tthis.mapElementStyles(((i % 2) && styles.evenRow) ? styles.evenRow : styles.oddRow, rowEl, [\"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"background-color\"]);\r\n\t\t\t\t\tbodyEl.appendChild(rowEl);\r\n\t\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\tgenerateHeaderElement(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\tgenerateGroupElement(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 = 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\tgenerateCalcElement(row, setup, styles){\r\n\t\tvar rowEl = this.generateRowElement(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\tgenerateRowElement(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, i) => {\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\t\t\t\tcellStyle;\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\t\tvalue = value !== null ? JSON.stringify(value) : \"\";\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\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\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\tcellStyle = styles.styleCells && styles.styleCells[index] ? styles.styleCells[index] : styles.firstCell;\r\n\r\n\t\t\t\tif(cellStyle){\r\n\t\t\t\t\tthis.mapElementStyles(cellStyle, cellEl, [\"padding-top\", \"padding-left\", \"padding-right\", \"padding-bottom\", \"border-top\", \"border-left\", \"border-right\", \"border-bottom\", \"color\", \"font-weight\", \"font-family\", \"font-size\", \"text-align\"]);\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\tgenerateHTMLTable(list){\r\n\t\tvar holder = document.createElement(\"div\");\r\n\r\n\t\tholder.appendChild(this.generateTableElement(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.generateHTMLTable(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\r\n\t\t//handle successfully 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\t\tif(Filter.filters[column.definition.headerFilterFunc]){\r\n\t\t\t\t\t\t\t\ttype = column.definition.headerFilterFunc;\r\n\t\t\t\t\t\t\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\tvar params = column.definition.headerFilterFuncParams || {};\r\n\t\t\t\t\t\t\t\t\tvar fieldVal = column.getFieldValue(data);\r\n\r\n\t\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\t\treturn Filter.filters[column.definition.headerFilterFunc](value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t}else{\r\n\t\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\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase \"function\":\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 column.definition.headerFilterFunc(value, fieldVal, data, params);\r\n\t\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\ttype = filterFunc;\r\n\t\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\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\tvar colVal = column.getFieldValue(data);\r\n\r\n\t\t\t\t\t\t\t\t\tif(typeof colVal !== 'undefined' && colVal !== null){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\ttype = \"like\";\r\n\t\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\t\tfilterFunc = function(data){\r\n\t\t\t\t\t\t\t\t\treturn column.getFieldValue(data) == value;\r\n\t\t\t\t\t\t\t\t};\r\n\t\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};\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\tcolumn.modules.filter.value = value;\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\tcolumn.modules.filter.value = initialValue;\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;\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\t\tif(self.table.modules.edit.editors[column.definition.headerFilter]){\r\n\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.headerFilter];\r\n\r\n\t\t\t\t\t\tif((column.definition.headerFilter === \"tick\" || column.definition.headerFilter === \"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\tconsole.warn(\"Filter Error - Cannot build header filter, No such editor found: \", column.definition.editor);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\teditor = column.definition.headerFilter;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\tif(column.modules.edit && column.modules.edit.editor){\r\n\t\t\t\t\t\teditor = column.modules.edit.editor;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){\r\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[column.definition.formatter];\r\n\r\n\t\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\t\tcolumn.modules.filter.emptyFunc = function(value){\r\n\t\t\t\t\t\t\t\t\treturn value !== true && value !== 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}else{\r\n\t\t\t\t\t\t\teditor = self.table.modules.edit.editors[\"input\"];\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}\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\tgetTable:() => {\r\n\t\t\t\t\t\treturn this.table;\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\tself.langBind(\"headerFilters|columns|\" + column.definition.field, function(value){\r\n\t\t\t\t\teditorElement.setAttribute(\"placeholder\", typeof value !== \"undefined\" && value ? value : self.langText(\"headerFilters|default\"));\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.contentsElement.scrollLeft;\r\n\r\n\t\t\t\t\tvar headerPos = this.table.rowManager.element.scrollLeft;\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)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\teditorElement.addEventListener(\"keyup\", searchTrigger);\r\n\t\t\t\t\t\teditorElement.addEventListener(\"search\", searchTrigger);\r\n\r\n\r\n\t\t\t\t\t\t//update number filtered columns on change\r\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"number\"){\r\n\t\t\t\t\t\t\teditorElement.addEventListener(\"change\", function(e){\r\n\t\t\t\t\t\t\t\tsuccess(editorElement.value);\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//change text inputs to search inputs to allow for clearing of field\r\n\t\t\t\t\t\tif(column.modules.filter.attrType == \"text\" && this.table.browser !== \"ie\"){\r\n\t\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\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//prevent input and select elements from propagating 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//programmatically 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.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//programmatically 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(null, false, false);\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\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}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(true));\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(true), 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\tif (formatterParams.thousand !== false) {\r\n\t\trgx = /(\\d+)(\\d{3})/;\r\n\r\n\t\twhile (rgx.test(integer)){\r\n\t\t\tinteger = integer.replace(rgx, \"$1\" + thousandSym + \"$2\");\r\n\t\t}\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\tfunction labelTraverse(path, data){\r\n\t\tvar item = path.shift(),\r\n\t\tvalue = data[item];\r\n\t\t\r\n\t\tif(path.length && typeof value === \"object\"){\r\n\t\t\treturn labelTraverse(path, value);\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\tif(formatterParams.labelField){\r\n\t\tdata = cell.getData();\r\n\t\tlabel = labelTraverse(formatterParams.labelField.split(this.table.options.nestedFieldSeparator), data);\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\t\tlabel = formatterParams.label;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tlabel = formatterParams.label(cell);\r\n\t\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\t\tvalue = formatterParams.url;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tvalue = formatterParams.url(cell);\r\n\t\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\t\tel.style.height = formatterParams.height + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\t\tel.style.height = formatterParams.height;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tswitch(typeof formatterParams.width){\r\n\t\tcase \"number\":\r\n\t\t\tel.style.width = formatterParams.width + \"px\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"string\":\r\n\t\t\tel.style.width = formatterParams.width;\r\n\t\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\ttrueValueSet = Object.keys(formatterParams).includes(\"trueValue\"),\r\n\ttick = typeof formatterParams.tickElement !== \"undefined\" ? formatterParams.tickElement : '',\r\n\tcross = typeof formatterParams.crossElement !== \"undefined\" ? formatterParams.crossElement : '';\r\n\r\n\tif((trueValueSet && value === formatterParams.trueValue) || (!trueValueSet && ((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;\r\n\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\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\tvar newDatetime;\r\n\r\n\t\tif(DT.isDateTime(value)){\r\n\t\t\tnewDatetime = value;\r\n\t\t}else if(inputFormat === \"iso\"){\r\n\t\t\tnewDatetime = DT.fromISO(String(value));\r\n\t\t}else{\r\n\t\t\tnewDatetime = DT.fromFormat(String(value), inputFormat);\r\n\t\t}\r\n\r\n\t\tif (newDatetime.isValid){\r\n\t\t\tif(humanize){\r\n\t\t\t\treturn newDatetime.diff(date, unit).toHuman() + (suffix ? \" \" + 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\t\tcolor = colors;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tcolor = colors(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(colors)){\r\n\t\t\t\tvar unit = 100 / colors.length;\r\n\t\t\t\tvar index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, colors.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tcolor = colors[index];\r\n\t\t\t\tbreak;\r\n\t\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.max ? formatterParams.max : 100,\r\n\tmin = formatterParams.min ? formatterParams.min : 0,\r\n\tlegendAlign = formatterParams.legendAlign ? formatterParams.legendAlign : \"center\",\r\n\tpercent, percentValue, color, legend, legendColor;\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\t\tcolor = formatterParams.color;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tcolor = formatterParams.color(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(formatterParams.color)){\r\n\t\t\t\tlet unit = 100 / formatterParams.color.length;\r\n\t\t\t\tlet index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, formatterParams.color.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tcolor = formatterParams.color[index];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tdefault:\r\n\t\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\t\tlegend = formatterParams.legend;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tlegend = formatterParams.legend(value);\r\n\t\t\tbreak;\r\n\t\tcase \"boolean\":\r\n\t\t\tlegend = value;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\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\t\tlegendColor = formatterParams.legendColor;\r\n\t\t\tbreak;\r\n\t\tcase \"function\":\r\n\t\t\tlegendColor = formatterParams.legendColor(value);\r\n\t\t\tbreak;\r\n\t\tcase \"object\":\r\n\t\t\tif(Array.isArray(formatterParams.legendColor)){\r\n\t\t\t\tlet unit = 100 / formatterParams.legendColor.length;\r\n\t\t\t\tlet index = Math.floor(percentValue / unit);\r\n\r\n\t\t\t\tindex = Math.min(index, formatterParams.legendColor.length - 1);\r\n\t\t\t\tindex = Math.max(index, 0);\r\n\t\t\t\tlegendColor = formatterParams.legendColor[index];\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\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.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\tvar content = document.createElement(\"span\");\r\n\tvar row = cell.getRow();\r\n\r\n\trow.watchPosition((position) => {\r\n\t\tcontent.innerText = position;\r\n\t});\r\n\t\r\n\treturn content;\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 el = document.createElement(\"div\"),\r\n\tconfig = cell.getRow()._row.modules.responsiveLayout;\r\n\r\n\tel.classList.add(\"tabulator-responsive-collapse-toggle\");\r\n\t\r\n\tel.innerHTML = `\r\n \r\n \r\n\r\n\r\n\r\n \r\n`;\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\tcell.getTable().rowManager.adjustTableSize();\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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"formatter\");\r\n\t\tthis.registerColumnOption(\"formatterParams\");\r\n\t\t\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\t\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\t\r\n\t//initialize column formatter\r\n\tinitializeColumn(column){\r\n\t\tcolumn.modules.format = this.lookupFormatter(column, \"\");\r\n\t\t\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\t\t\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\t\t\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\t\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\t\t\r\n\t\t//set column formatter\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\t\tconfig.formatter = Format.formatters[formatter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\tconfig.formatter = formatter;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tconfig.formatter = Format.formatters.plaintext;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn config;\r\n\t}\r\n\t\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\t\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\t\t\r\n\t\tif(column.definition.titleFormatter){\r\n\t\t\tformatter = this.getFormatter(column.definition.titleFormatter);\r\n\t\t\t\r\n\t\t\tonRendered = (callback) => {\r\n\t\t\t\tcolumn.titleFormatterRendered = callback;\r\n\t\t\t};\r\n\t\t\t\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\tgetColumn:function(){\r\n\t\t\t\t\treturn column.getComponent();\r\n\t\t\t\t},\r\n\t\t\t\tgetTable:() => {\r\n\t\t\t\t\treturn this.table;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tparams = column.definition.titleFormatterParams || {};\r\n\t\t\t\r\n\t\t\tparams = typeof params === \"function\" ? params() : params;\r\n\t\t\t\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\t\r\n\t\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\t\t\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\t\t\t\r\n\t\t\tcell.modules.format.renderedCallback = callback;\r\n\t\t\tcell.modules.format.rendered = false;\r\n\t\t}\r\n\t\t\r\n\t\treturn cell.column.modules.format.formatter.call(this, component, params, onRendered);\r\n\t}\r\n\t\r\n\tformatExportValue(cell, type){\r\n\t\tvar formatter = cell.column.modules.format[type],\r\n\t\tparams;\r\n\t\t\r\n\t\tif(formatter){\r\n\t\t\tparams = typeof formatter.params === \"function\" ? formatter.params(cell.getComponent()) : formatter.params;\r\n\t\t\t\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\t\t\t\t\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\t\t\t\r\n\t\t\treturn formatter.formatter.call(this, cell.getComponent(), params, onRendered);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\treturn this.formatValue(cell);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\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\t\r\n\temptyToSpace(value){\r\n\t\treturn value === null || typeof value === \"undefined\" || value === \"\" ? \" \" : value;\r\n\t}\r\n\t\r\n\t//get formatter for cell\r\n\tgetFormatter(formatter){\r\n\t\tswitch(typeof formatter){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tif(Format.formatters[formatter]){\r\n\t\t\t\t\tformatter = Format.formatters[formatter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Formatter Error - No such formatter found: \", formatter);\r\n\t\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t//Custom formatter Function, do nothing\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tformatter = Format.formatters.plaintext;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\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.initializationMode = \"left\";\r\n\t\tthis.active = 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.active = false;\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(\"columns-loading\", this.reset.bind(this));\r\n\t\t\r\n\t\tthis.subscribe(\"column-add\", this.reinitializeColumns.bind(this));\r\n\t\tthis.subscribe(\"column-delete\", this.reinitializeColumns.bind(this));\r\n\t\t\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\tthis.subscribe(\"scrollbar-vertical\", this.adjustForScrollbar.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\treinitializeColumns(){\r\n\t\tthis.reset();\r\n\t\t\r\n\t\tthis.table.columnManager.columnsByIndex.forEach((column) => {\r\n\t\t\tthis.initializeColumn(column);\r\n\t\t});\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\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}\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);\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.leftColumns.forEach((column, i) => {\t\r\n\t\t\tcolumn.modules.frozen.marginValue = leftMargin;\r\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\r\n\t\t\t\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\t\t\t\r\n\t\t\tcolumn.modules.frozen.marginValue = rightMargin;\r\n\t\t\tcolumn.modules.frozen.margin = column.modules.frozen.marginValue + \"px\";\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\trightMargin += column.getWidth();\r\n\t\t\t}\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\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(){\t\r\n\t\tif(this.active && !this.blocked){\r\n\t\t\r\n\t\t\t//calculate left columns\r\n\t\t\tthis.layoutColumnPosition();\r\n\t\t\t\r\n\t\t\tthis.reinitializeRows();\r\n\t\t\t\r\n\t\t\tthis.layoutCalcRows();\r\n\t\t}\r\n\t}\r\n\t\r\n\treinitializeRows(){\r\n\t\tvar visibleRows = this.table.rowManager.getVisibleRows(true);\r\n\t\tvar otherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\r\n\t\t\r\n\t\totherRows.forEach((row) =>{\r\n\t\t\trow.deinitialize();\r\n\t\t});\r\n\t\t\r\n\t\tvisibleRows.forEach((row) =>{\r\n\t\t\tif(row.type === \"row\"){\r\n\t\t\t\tthis.layoutRow(row);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tlayoutRow(row){\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\tvar position;\r\n\t\t\r\n\t\tif(column.modules.frozen){\r\n\t\t\telement.style.position = \"sticky\";\r\n\r\n\t\t\tif(this.table.rtl){\r\n\t\t\t\tposition = column.modules.frozen.position === \"left\" ? \"right\" : \"left\";\r\n\t\t\t}else{\r\n\t\t\t\tposition = column.modules.frozen.position;\r\n\t\t\t}\r\n\t\t\r\n\t\t\telement.style[position] = column.modules.frozen.margin;\r\n\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\r\n\tadjustForScrollbar(width){\r\n\t\tif(this.rightColumns.length){\r\n\t\t\tthis.table.columnManager.getContentsElement().style.width = \"calc(100% - \" + width + \"px)\";\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\r\n\t\t//register table options\r\n\t\tthis.registerTableOption(\"frozenRowsField\", \"id\"); //field to choose frozen rows by\r\n\t\tthis.registerTableOption(\"frozenRows\", false); //holder for frozen row identifiers\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.getContentsElement().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\r\n\t\tif(this.table.options.frozenRows){\r\n\t\t\tthis.subscribe(\"data-processed\", this.initializeRows.bind(this));\r\n\t\t\tthis.subscribe(\"row-added\", this.initializeRow.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tinitializeRows(){\r\n\t\tthis.table.rowManager.getRows().forEach((row) => {\r\n\t\t\tthis.initializeRow(row);\r\n\t\t});\r\n\t}\r\n\r\n\tinitializeRow(row){\r\n\t\tvar frozenRows = this.table.options.frozenRows,\r\n\t\trowType = typeof frozenRows;\r\n\r\n\t\tif(rowType === \"number\"){\r\n\t\t\tif(row.getPosition() && (row.getPosition() + this.rows.length) <= frozenRows){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}else if(rowType === \"function\"){\r\n\t\t\tif(frozenRows.call(this.table, row.getComponent())){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}else if(Array.isArray(frozenRows)){\r\n\t\t\tif(frozenRows.includes(row.data[this.options(\"frozenRowsField\")])){\r\n\t\t\t\tthis.freezeRow(row);\r\n\t\t\t}\r\n\t\t}\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 output = 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\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.table.rowManager.adjustTableSize();\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\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 constraints\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(){\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\t\r\n\t\tif(this.calcs.top){\r\n\t\t\tthis.calcs.top.detachElement();\r\n\t\t\tthis.calcs.top.deleteCells();\r\n\t\t}\r\n\t\t\r\n\t\tif(this.calcs.bottom){\r\n\t\t\tthis.calcs.bottom.detachElement();\r\n\t\t\tthis.calcs.bottom.deleteCells();\r\n\t\t}\r\n\t\t\r\n\t\t\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());\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tif(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\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(this.groupManager.table.options.columnCalcs != \"table\" && this.groupManager.table.modExists(\"columnCalcs\") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\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\tif(this.groupManager.table.modules.columnCalcs.hasTopCalcs()){\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(this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){\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() == \"basic\" && !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.updateGroupRows(true);\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() == \"basic\" && !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.updateGroupRows(true);\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(component){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.rows.forEach(function(row){\r\n\t\t\toutput.push(component ? 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 Group from './Group.js';\r\n\r\nclass GroupRows extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\r\n\t\tthis.displayHandler = this.getRows.bind(this);\r\n\t\t\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\t\t\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\t\t\r\n\t\t//register component functions\r\n\t\tthis.registerComponentFunction(\"row\", \"getGroup\", this.rowGetGroup.bind(this));\r\n\t}\r\n\t\r\n\t//initialize group configuration\r\n\tinitialize(){\r\n\t\tif(this.table.options.groupBy){\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\t\t\t\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\t\t\t\r\n\t\t\tthis.subscribe(\"rows-sample\", this.rowSample.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"render-virtual-fill\", this.virtualRenderFill.bind(this));\r\n\t\t\t\r\n\t\t\tthis.registerDisplayHandler(this.displayHandler, 20);\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.allowedValues = this.table.options.groupValues;\r\n\t\t\t\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\t\t\t\r\n\t\t\tthis.headerGenerator = [function(){return \"\";}];\r\n\t\t\tthis.startOpen = [function(){return false;}]; //starting state of group\r\n\t\t\t\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\t\t\t\r\n\t\t\tthis.groupIDLookups = [];\r\n\t\t\t\r\n\t\t\tif(Array.isArray(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\t\t\t\t\t\r\n\t\t\t\t\tvar cols = this.table.columnManager.getRealColumns();\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\r\n\t\t\tif(!Array.isArray(groupBy)){\r\n\t\t\t\tgroupBy = [groupBy];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgroupBy.forEach((group, i) => {\r\n\t\t\t\tvar lookupFunc, column;\r\n\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\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\t\t\t\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\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.startOpen = startOpen;\r\n\t\t\t}\r\n\t\t\t\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}else{\r\n\t\t\tthis.groupList = [];\r\n\t\t\tthis.groups = {};\r\n\t\t}\r\n\t}\r\n\t\r\n\trowSample(rows, prevValue){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tvar group = this.getGroups(false)[0];\r\n\t\t\t\r\n\t\t\tprevValue.push(group.getRows(false)[0]);\r\n\t\t}\r\n\t\t\r\n\t\treturn prevValue;\r\n\t}\r\n\t\r\n\tvirtualRenderFill(){\r\n\t\tvar el = this.table.rowManager.tableElement;\r\n\t\tvar rows = this.table.rowManager.getVisibleRows();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\trows = rows.filter((row) => {\r\n\t\t\t\treturn row.type !== \"group\";\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tel.style.minWidth = !rows.length ? this.table.columnManager.getWidth() + \"px\" : \"\";\r\n\t\t}else{\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t}\r\n\t\r\n\trowAddingIndex(row, index, top){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.assignRowToGroup(row);\r\n\t\t\t\r\n\t\t\tvar groupRows = row.modules.group.rows;\r\n\t\t\t\r\n\t\t\tif(groupRows.length > 1){\r\n\t\t\t\tif(!index || (index && groupRows.indexOf(index) == -1)){\r\n\t\t\t\t\tif(top){\r\n\t\t\t\t\t\tif(groupRows[0] !== row){\r\n\t\t\t\t\t\t\tindex = groupRows[0];\r\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(groupRows[groupRows.length -1] !== row){\r\n\t\t\t\t\t\t\tindex = groupRows[groupRows.length -1];\r\n\t\t\t\t\t\t\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\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\tthis.table.rowManager.moveRowInArray(row.modules.group.rows, row, index, !top);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn index;\r\n\t\t}\r\n\t}\r\n\t\r\n\ttrackChanges(){\r\n\t\tthis.dispatch(\"group-changed\");\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tsetGroupBy(groups){\r\n\t\tthis.table.options.groupBy = groups;\r\n\t\t\r\n\t\tif(!this.initialized){\r\n\t\t\tthis.initialize();\r\n\t\t}\r\n\t\t\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tthis.refreshData();\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\tsetGroupValues(groupValues){\r\n\t\tthis.table.options.groupValues = groupValues;\r\n\t\tthis.configureGroupSetup();\r\n\t\tthis.refreshData();\r\n\t\t\r\n\t\tthis.trackChanges();\r\n\t}\r\n\t\r\n\tsetGroupStartOpen(values){\r\n\t\tthis.table.options.groupStartOpen = values;\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\t\t\t\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\t\r\n\tsetGroupHeader(values){\r\n\t\tthis.table.options.groupHeader = values;\r\n\t\tthis.configureGroupSetup();\r\n\t\t\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.refreshData();\r\n\t\t\t\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\t\r\n\tuserGetGroups(values){\r\n\t\treturn this.getGroups(true);\r\n\t}\r\n\t\r\n\t// get grouped table data in the same format as getData()\r\n\tuserGetGroupedData(){\r\n\t\treturn this.table.options.groupBy ? this.getGroupedData() : this.getData();\r\n\t}\r\n\t\r\n\t\r\n\t///////////////////////////////////////\r\n\t///////// Component Functions /////////\r\n\t///////////////////////////////////////\r\n\t\r\n\trowGetGroup(row){\r\n\t\treturn row.modules.group ? row.modules.group.getComponent() : false;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\r\n\trowMoving(from, to, after){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tif(!after && to instanceof Group){\r\n\t\t\t\tto = this.table.rowManager.prevDisplayRow(from) || to;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tvar toGroup = to instanceof Group ? to : to.modules.group;\r\n\t\t\tvar fromGroup = from instanceof Group ? from : from.modules.group;\r\n\t\t\t\r\n\t\t\tif(toGroup === fromGroup){\r\n\t\t\t\tthis.table.rowManager.moveRowInArray(toGroup.rows, from, to, after);\r\n\t\t\t}else{\r\n\t\t\t\tif(fromGroup){\r\n\t\t\t\t\tfromGroup.removeRow(from);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\ttoGroup.insertRow(from, to, after);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\trowDeleting(row){\r\n\t\t//remove from group\r\n\t\tif(this.table.options.groupBy && row.modules.group){\r\n\t\t\trow.modules.group.removeRow(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\trowsUpdated(row){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.updateGroupRows(true);\r\n\t\t}\t\r\n\t}\r\n\t\r\n\tcellUpdated(cell){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tthis.reassignRowToGroup(cell.row);\r\n\t\t}\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.dispatchExternal(\"dataGrouping\");\r\n\t\t\t\r\n\t\t\tthis.generateGroups(rows);\r\n\t\t\t\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\t\t\t\r\n\t\t\treturn this.updateGroupRows();\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\treturn rows.slice(0);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetGroups(component){\r\n\t\tvar groupComponents = [];\r\n\t\t\r\n\t\tthis.groupList.forEach(function(group){\r\n\t\t\tgroupComponents.push(component ? group.getComponent() : group);\r\n\t\t});\r\n\t\t\r\n\t\treturn groupComponents;\r\n\t}\r\n\t\r\n\tgetChildGroups(group){\r\n\t\tvar groupComponents = [];\r\n\t\t\r\n\t\tif(!group){\r\n\t\t\tgroup = this;\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\treturn groupComponents;\r\n\t}\r\n\t\r\n\twipe(){\r\n\t\tif(this.table.options.groupBy){\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\t\r\n\t\t\tthis.groupList = [];\r\n\t\t\tthis.groups = {};\r\n\t\t}\r\n\t}\r\n\t\r\n\tpullGroupListData(groupList) {\r\n\t\tvar groupListData = [];\r\n\t\t\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\t\t\t\r\n\t\t\tif (group.hasSubGroups) {\r\n\t\t\t\tchildData = this.pullGroupListData(group.groupList);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\tgroupListData = groupListData.concat(childData);\r\n\t\t\t}\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tgroupListData.push(groupHeader);\r\n\t\t\t\t\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\t\t\r\n\t\treturn groupListData;\r\n\t}\r\n\t\r\n\tgetGroupedData(){\r\n\t\t\r\n\t\treturn this.pullGroupListData(this.groupList);\r\n\t}\r\n\t\r\n\tgetRowGroup(row){\r\n\t\tvar match = false;\r\n\t\t\r\n\t\tif(this.options(\"dataTree\")){\r\n\t\t\trow = this.table.modules.dataTree.getTreeParentRoot(row);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\tvar result = group.getRowGroup(row);\r\n\t\t\t\r\n\t\t\tif(result){\r\n\t\t\t\tmatch = result;\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\tcountGroups(){\r\n\t\treturn this.groupList.length;\r\n\t}\r\n\t\r\n\tgenerateGroups(rows){\r\n\t\tvar oldGroups = this.groups;\r\n\t\t\r\n\t\tthis.groups = {};\r\n\t\tthis.groupList = [];\r\n\t\t\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\t\t\t\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\t\r\n\t\tObject.values(oldGroups).forEach((group) => {\r\n\t\t\tgroup.wipe();\r\n\t\t});\t\r\n\t}\r\n\t\r\n\t\r\n\tcreateGroup(groupID, level, oldGroups){\r\n\t\tvar groupKey = level + \"_\" + groupID,\r\n\t\tgroup;\r\n\t\t\r\n\t\toldGroups = oldGroups || [];\r\n\t\t\r\n\t\tgroup = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]);\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\tassignRowToExistingGroup(row, oldGroups){\r\n\t\tvar groupID = this.groupIDLookups[0].func(row.getData()),\r\n\t\tgroupKey = \"0_\" + groupID;\r\n\t\t\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\t\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\t\t\r\n\t\tif(newGroupNeeded){\r\n\t\t\tthis.createGroup(groupID, 0, oldGroups);\r\n\t\t}\r\n\t\t\r\n\t\tthis.groups[\"0_\" + groupID].addRow(row);\r\n\t\t\r\n\t\treturn !newGroupNeeded;\r\n\t}\r\n\t\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;\r\n\t\t\t\r\n\t\t\t// figure out if new group path is the same as old group path\r\n\t\t\tsamePath = (oldGroupPath.length == newGroupPath.length) && oldGroupPath.every((element, index) => {\r\n\t\t\t\treturn element === newGroupPath[index];\r\n\t\t\t});\r\n\t\t\t\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\t\r\n\tgetExpectedPath(row) {\r\n\t\tvar groupPath = [], rowData = row.getData();\r\n\t\t\r\n\t\tthis.groupIDLookups.forEach((groupId) => {\r\n\t\t\tgroupPath.push(groupId.func(rowData));\r\n\t\t});\r\n\t\t\r\n\t\treturn groupPath;\r\n\t}\r\n\t\r\n\tupdateGroupRows(force){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.groupList.forEach((group) => {\r\n\t\t\toutput = output.concat(group.getHeadersAndRows());\r\n\t\t});\r\n\t\t\r\n\t\tif(force){\r\n\t\t\tthis.refreshData(true, this.displayHandler);\r\n\t\t}\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tscrollHeaders(left){\r\n\t\tif(this.table.options.groupBy){\r\n\t\t\tif(this.table.options.renderHorizontal === \"virtual\"){\r\n\t\t\t\tleft -= this.table.columnManager.renderer.vDomPadLeft;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tleft = left + \"px\";\r\n\t\t\t\r\n\t\t\tthis.groupList.forEach((group) => {\r\n\t\t\t\tgroup.scrollHeader(left);\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}\r\n\t}\r\n\t\r\n\tcheckBasicModeGroupHeaderWidth(){\r\n\t\tvar element = this.table.rowManager.tableElement,\r\n\t\tonlyGroupHeaders = true;\r\n\t\t\r\n\t\tthis.table.rowManager.getDisplayRows().forEach((row, index) =>{\r\n\t\t\tthis.table.rowManager.styleRow(row, index);\r\n\t\t\telement.appendChild(row.getElement());\r\n\t\t\trow.initialize(true);\r\n\t\t\t\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\t\t\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\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:from.getPosition(), posTo:to.getPosition(), 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()._getSelf().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\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\tif(this.table.originalElement.childNodes.length){\r\n\t\t\t\tthis.parseTable();\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element.\");\r\n\t\t\t}\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\theaders = element.getElementsByTagName(\"th\"),\r\n\t\trows = element.getElementsByTagName(\"tbody\")[0],\r\n\t\tdata = [];\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 don't 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;\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\nimport array from './importers/array.js';\r\n\r\nexport default {\r\n\tcsv:csv,\r\n\tjson:json,\r\n\tarray:array,\r\n};","function csvImporter(input){\r\n\tvar data = [],\r\n\trow = 0, \r\n\tcol = 0,\r\n\tinQuote = false;\r\n \r\n\t//Iterate over each character\r\n\tfor (let index = 0; index < input.length; index++) {\r\n\t\tlet char = input[index], \r\n\t\tnextChar = input[index+1]; \r\n \r\n\t\t//Initialize empty row\r\n\t\tif(!data[row]){\r\n\t\t\tdata[row] = [];\r\n\t\t}\r\n\r\n\t\t//Initialize empty column\r\n\t\tif(!data[row][col]){\r\n\t\t\tdata[row][col] = \"\";\r\n\t\t}\r\n \r\n\t\t//Handle quotation mark inside string\r\n\t\tif (char == '\"' && inQuote && nextChar == '\"') { \r\n\t\t\tdata[row][col] += char; \r\n\t\t\tindex++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//Begin / End Quote\r\n\t\tif (char == '\"') { \r\n\t\t\tinQuote = !inQuote;\r\n\t\t\tcontinue;\r\n\t\t}\r\n \r\n\t\t//Next column (if not in quote)\r\n\t\tif (char == ',' && !inQuote) { \r\n\t\t\tcol++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//New row if new line and not in quote (CRLF) \r\n\t\tif (char == '\\r' && nextChar == '\\n' && !inQuote) { \r\n\t\t\tcol = 0; \r\n\t\t\trow++; \r\n\t\t\tindex++; \r\n\t\t\tcontinue; \r\n\t\t}\r\n \r\n\t\t//New row if new line and not in quote (CR or LF) \r\n\t\tif ((char == '\\r' || char == '\\n') && !inQuote) { \r\n\t\t\tcol = 0;\r\n\t\t\trow++;\r\n\t\t\tcontinue; \r\n\t\t}\r\n\r\n\t\t//Normal Character, append to column\r\n\t\tdata[row][col] += char;\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\nexport default csvImporter;","export default function(input){\r\n\ttry {\r\n\t\treturn JSON.parse(input);\r\n\t} catch(e) {\r\n\t\tconsole.warn(\"JSON Import Error - File contents is invalid JSON\", e);\r\n\t\treturn Promise.reject();\r\n\t}\r\n}","function arrayImporter(input){\r\n\treturn input;\r\n}\r\n\r\nexport default arrayImporter;","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\tconstructor(table){\r\n\t\tsuper(table);\r\n \r\n\t\tthis.registerTableOption(\"importFormat\");\r\n\t\tthis.registerTableOption(\"importReader\", \"text\");\r\n\t}\r\n \r\n\tinitialize(){\r\n\t\tthis.registerTableFunction(\"import\", this.importFromFile.bind(this));\r\n\r\n\t\tif(this.table.options.importFormat){\r\n\t\t\tthis.subscribe(\"data-loading\", this.loadDataCheck.bind(this), 10);\r\n\t\t\tthis.subscribe(\"data-load\", this.loadData.bind(this), 10);\r\n\t\t}\r\n\t}\r\n\r\n\tloadDataCheck(data){\r\n\t\treturn this.table.options.importFormat && (typeof data === \"string\" || (Array.isArray(data) && data.length && Array.isArray(data)));\r\n\t}\r\n\r\n\tloadData(data, params, config, silent, previousData){\r\n\t\treturn this.importData(this.lookupImporter(), data)\r\n\t\t\t.then(this.structureData.bind(this))\r\n\t\t\t.catch((err) => {\r\n\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import data\");\r\n\t\t\t\treturn Promise.reject(err);\r\n\t\t\t});\r\n\t}\r\n\r\n\tlookupImporter(importFormat){\r\n\t\tvar importer;\r\n \r\n\t\tif(!importFormat){\r\n\t\t\timportFormat = this.table.options.importFormat;\r\n\t\t}\r\n \r\n\t\tif(typeof importFormat === \"string\"){\r\n\t\t\timporter = Import.importers[importFormat];\r\n\t\t}else{\r\n\t\t\timporter = importFormat;\r\n\t\t}\r\n\r\n\t\tif(!importer){\r\n\t\t\tconsole.error(\"Import Error - Importer not found:\", importFormat);\r\n\t\t}\r\n \r\n\t\treturn importer;\r\n\t}\r\n \r\n\timportFromFile(importFormat, extension){\r\n\t\tvar importer = this.lookupImporter(importFormat);\r\n \r\n\t\tif(importer){\r\n\t\t\treturn this.pickFile(extension)\r\n\t\t\t\t.then(this.importData.bind(this, importer))\r\n\t\t\t\t.then(this.structureData.bind(this))\r\n\t\t\t\t.then(this.setData.bind(this))\r\n\t\t\t\t.catch((err) => {\r\n\t\t\t\t\tconsole.error(\"Import Error:\", err || \"Unable to import file\");\r\n\t\t\t\t\treturn Promise.reject(err);\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n \r\n\tpickFile(extensions){\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tvar input = document.createElement(\"input\");\r\n\t\t\tinput.type = \"file\";\r\n\t\t\tinput.accept = extensions;\r\n \r\n\t\t\tinput.addEventListener(\"change\", (e) => {\r\n\t\t\t\tvar file = input.files[0],\r\n\t\t\t\treader = new FileReader();\r\n \r\n\t\t\t\tswitch(this.table.options.importReader){\r\n\t\t\t\t\tcase \"buffer\":\r\n\t\t\t\t\t\treader.readAsArrayBuffer(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"binary\":\r\n\t\t\t\t\t\treader.readAsBinaryString(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"url\":\r\n\t\t\t\t\t\treader.readAsDataURL(file);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"text\":\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treader.readAsText(file);\r\n\t\t\t\t}\r\n \r\n\t\t\t\treader.onload = (e) => {\r\n\t\t\t\t\tresolve(reader.result);\r\n\t\t\t\t};\r\n \r\n\t\t\t\treader.onerror = (e) => {\r\n\t\t\t\t\tconsole.warn(\"File Load Error - Unable to read file\");\r\n\t\t\t\t\treject();\r\n\t\t\t\t};\r\n\t\t\t});\r\n \r\n\t\t\tinput.click();\r\n\t\t});\r\n\t}\r\n \r\n\timportData(importer, fileContents){\r\n\t\tvar data = importer.call(this.table, fileContents);\r\n \r\n\t\tif(data instanceof Promise){\r\n\t\t\treturn data;\r\n\t\t}else{\r\n\t\t\treturn data ? Promise.resolve(data) : Promise.reject();\r\n\t\t}\r\n\t}\r\n\r\n\tstructureData(parsedData){\r\n\t\tvar data = [];\r\n \r\n\t\tif(Array.isArray(parsedData) && parsedData.length && Array.isArray(parsedData[0])){\r\n\t\t\tif(this.table.options.autoColumns){\r\n\t\t\t\tdata = this.structureArrayToObject(parsedData);\r\n\t\t\t}else{\r\n\t\t\t\tdata = this.structureArrayToColumns(parsedData);\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\t\t}else{\r\n\t\t\treturn parsedData;\r\n\t\t}\r\n\t}\r\n\r\n\tstructureArrayToObject(parsedData){\r\n\t\tvar columns = parsedData.shift();\r\n\r\n\t\tvar data = parsedData.map((values) => {\r\n\t\t\tvar row = {};\r\n\r\n\t\t\tcolumns.forEach((key, i) => {\r\n\t\t\t\trow[key] = values[i];\r\n\t\t\t});\r\n\r\n\t\t\treturn row;\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n\r\n\tstructureArrayToColumns(parsedData){\r\n\t\tvar data = [],\r\n\t\tcolumns = this.table.getColumns();\r\n\r\n\t\t//remove first row if it is the column names\r\n\t\tif(columns[0] && parsedData[0][0]){\r\n\t\t\tif(columns[0].getDefinition().title === parsedData[0][0]){\r\n\t\t\t\tparsedData.shift();\r\n\t\t\t}\r\n\t\t}\r\n \r\n\t\t//convert row arrays to objects\r\n\t\tparsedData.forEach((rowData) => {\r\n\t\t\tvar row = {};\r\n\r\n\t\t\trowData.forEach((value, index) => {\r\n\t\t\t\tvar column = columns[index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\trow[column.getField()] = value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tdata.push(row);\r\n\t\t});\r\n\r\n\t\treturn data;\r\n\t}\r\n \r\n\tsetData(data){\r\n\t\treturn this.table.setData(data);\r\n\t}\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\n\r\nimport Cell from '../../core/cell/Cell.js';\r\nimport Column from '../../core/column/Column.js';\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\trowMouseDown:\"row-mousedown\",\r\n\t\t\trowMouseUp:\"row-mouseup\",\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\tcellMouseDown:\"cell-mousedown\",\r\n\t\t\tcellMouseUp:\"cell-mouseup\",\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\theaderMouseDown:\"column-mousedown\",\r\n\t\t\theaderMouseUp:\"column-mouseup\",\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\tgroupMouseDown:\"group-mousedown\",\r\n\t\t\tgroupMouseUp:\"group-mouseup\",\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(\"headerMouseDown\");\r\n\t\tthis.registerColumnOption(\"headerMouseUp\");\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(\"cellMouseDown\");\r\n\t\tthis.registerColumnOption(\"cellMouseUp\");\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\tvar range;\r\n\r\n\t\tif(this.table.modExists(\"edit\")){\r\n\t\t\tif (this.table.modules.edit.currentCell === cell){\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\trange = document.body.createTextRange();\r\n\t\t\t\trange.moveToElementText(cell.getElement());\r\n\t\t\t\trange.select();\r\n\t\t\t} else if (window.getSelection) {\r\n\t\t\t\trange = document.createRange();\r\n\t\t\t\trange.selectNode(cell.getElement());\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\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\t\twatchers.tap = true;\r\n\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\r\n\t\t\t\twatchers.tapHold = setTimeout(() => {\r\n\t\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\t\twatchers.tapHold = null;\r\n\r\n\t\t\t\t\twatchers.tap = null;\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\t\tthis.dispatchEvent(type + \"TapHold\", e, component);\r\n\t\t\t\t}, 1000);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"end\":\r\n\t\t\t\tif(watchers.tap){\r\n\r\n\t\t\t\t\twatchers.tap = null;\r\n\t\t\t\t\tthis.dispatchEvent(type + \"Tap\", e, component);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(watchers.tapDbl){\r\n\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\twatchers.tapDbl = null;\r\n\r\n\t\t\t\t\tthis.dispatchEvent(type + \"DblTap\", e, component);\r\n\t\t\t\t}else{\r\n\t\t\t\t\twatchers.tapDbl = setTimeout(() => {\r\n\t\t\t\t\t\tclearTimeout(watchers.tapDbl);\r\n\t\t\t\t\t\twatchers.tapDbl = null;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclearTimeout(watchers.tapHold);\r\n\t\t\t\twatchers.tapHold = null;\r\n\t\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;\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\t\tbinding.ctrl = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"shift\":\r\n\t\t\t\t\tbinding.shift = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"meta\":\r\n\t\t\t\t\tbinding.meta = true;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tsymbol = isNaN(symbol) ? symbol.toUpperCase().charCodeAt(0) : parseInt(symbol);\r\n\t\t\t\t\tbinding.keys.push(symbol);\r\n\r\n\t\t\t\t\tif(!this.watchKeys[symbol]){\r\n\t\t\t\t\t\tthis.watchKeys[symbol] = [];\r\n\t\t\t\t\t}\r\n\r\n\t\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\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\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.nestedMenuBlock = false;\r\n\t\t\r\n\t\tthis.currentComponent = null;\r\n\t\tthis.rootPopup = null;\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"menuContainer\", undefined); //deprecated\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextMenu\", false);\r\n\t\tthis.registerTableOption(\"rowClickMenu\", false);\r\n\t\tthis.registerTableOption(\"rowDblClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupContextMenu\", false);\r\n\t\tthis.registerTableOption(\"groupClickMenu\", false);\r\n\t\tthis.registerTableOption(\"groupDblClickMenu\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextMenu\");\r\n\t\tthis.registerColumnOption(\"headerClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerDblClickMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenu\");\r\n\t\tthis.registerColumnOption(\"headerMenuIcon\");\r\n\t\tthis.registerColumnOption(\"contextMenu\");\r\n\t\tthis.registerColumnOption(\"clickMenu\");\r\n\t\tthis.registerColumnOption(\"dblClickMenu\");\r\n\t\t\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.deprecatedOptionsCheck();\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\tdeprecatedOptionsCheck(){\r\n\t\tif(!this.deprecationCheck(\"menuContainer\", \"popupContainer\")){\r\n\t\t\tthis.table.options.popupContainer = this.table.options.menuContainer;\r\n\t\t}\r\n\t}\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\t\r\n\t\tif(this.table.options.rowDblClickMenu){\r\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadMenuEvent.bind(this, this.table.options.rowDblClickMenu));\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\t\r\n\t\tif(this.table.options.groupDblClickMenu){\r\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadMenuEvent.bind(this, this.table.options.groupDblClickMenu));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar\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.headerDblClickMenu && !this.columnSubscribers.headerDblClickMenu){\r\n\t\t\tthis.columnSubscribers.headerDblClickMenu = this.loadMenuTableColumnEvent.bind(this, \"headerDblClickMenu\");\r\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickMenu);\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\t\r\n\t\tif(def.dblClickMenu && !this.columnSubscribers.dblClickMenu){\r\n\t\t\tthis.columnSubscribers.dblClickMenu = this.loadMenuTableCellEvent.bind(this, \"dblClickMenu\");\r\n\t\t\tthis.subscribe(\"cell-dblclick\", this.columnSubscribers.dblClickMenu);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderMenu(column){\r\n\t\tvar icon = column.definition.headerMenuIcon,\r\n\t\theaderMenuEl;\r\n\t\t\r\n\t\theaderMenuEl = document.createElement(\"span\");\r\n\t\theaderMenuEl.classList.add(\"tabulator-header-popup-button\");\r\n\t\t\r\n\t\tif(icon){\r\n\t\t\tif(typeof icon === \"function\"){\r\n\t\t\t\ticon = icon(column.getComponent());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(icon instanceof HTMLElement){\r\n\t\t\t\theaderMenuEl.appendChild(icon);\r\n\t\t\t}else{\r\n\t\t\t\theaderMenuEl.innerHTML = icon;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\theaderMenuEl.innerHTML = \"⋮\";\r\n\t\t}\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, e, component.getComponent()) : 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, parentPopup){\r\n\t\tvar touch = !(e instanceof MouseEvent),\t\t\r\n\t\tmenuEl = document.createElement(\"div\"),\r\n\t\tpopup;\r\n\t\t\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.rootPopup){\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\tif(this.rootPopup){\r\n\t\t\t\tthis.rootPopup.hide();\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.rootPopup = popup = this.popup(menuEl);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpopup = parentPopup.child(menuEl);\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.loadMenu(e, component, item.menu, itemEl, popup);\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\tif(this.rootPopup){\r\n\t\t\t\tthis.rootPopup.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tpopup.show(parentEl || e);\r\n\t\t\r\n\t\tif(popup === this.rootPopup){\r\n\t\t\tthis.rootPopup.hideOnBlur(() => {\r\n\t\t\t\tthis.rootPopup = null;\r\n\t\t\t\t\r\n\t\t\t\tif(this.currentComponent){\r\n\t\t\t\t\tthis.dispatchExternal(\"menuClosed\", this.currentComponent.getComponent());\r\n\t\t\t\t\tthis.currentComponent = null;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.currentComponent = component;\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"menuOpened\", component.getComponent());\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 destination 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 && !column.isGroup){\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\tnextCol, 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\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 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\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.getContentsElement(),\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\theaderElement.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.getContentsElement(),\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 destination 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\r\n\t\t//inter table drag drop\r\n\t\tconfig.mouseup = function(e){\r\n\t\t\tself.tableRowDrop(e, group);\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;\r\n\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\trowEl = 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\trowEl = 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\tnextRow, 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\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 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\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\t\r\n\t\tthis.hoverElement.style.top = Math.min(yPos - this.startY, this.table.rowManager.element.scrollHeight - this.hoverElement.offsetHeight) + \"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 incoming 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\t\tsender = this.senders[this.table.options.movableRowsSender];\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\tsender = this.table.options.movableRowsSender;\r\n\t\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 ? this.moving.getComponent() : undefined, 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\t\treceiver = this.receivers[this.table.options.movableRowsReceiver];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\treceiver = this.table.options.movableRowsReceiver;\r\n\t\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\t\treturn this.connect(table, data.row);\r\n\r\n\t\t\tcase \"disconnect\":\r\n\t\t\t\treturn this.disconnect(table);\r\n\r\n\t\t\tcase \"dropcomplete\":\r\n\t\t\t\treturn this.dropComplete(table, data.row, data.success);\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 mutation 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\tthis.registerColumnOption(\"mutateLink\");\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(\"cell-value-changed\", this.mutateLink.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\t\tif(Mutator.mutators[value]){\r\n\t\t\t\t\tmutator = Mutator.mutators[value];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Mutator Error - No such mutator found, ignoring: \", value);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tmutator = value;\r\n\t\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\tmutateLink(cell){\r\n\t\tvar links = cell.column.definition.mutateLink;\r\n\r\n\t\tif(links){\r\n\t\t\tif(!Array.isArray(links)){\r\n\t\t\t\tlinks = [links];\r\n\t\t\t}\r\n\r\n\t\t\tlinks.forEach((link) => {\r\n\t\t\t\tvar linkCell = cell.row.getCell(link);\r\n\r\n\t\t\t\tif(linkCell){\r\n\t\t\t\t\tlinkCell.setValue(linkCell.getValue(), true, true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\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\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\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.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\t\t\tthis.subscribe(\"footer-redraw\", this.footerRedraw.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\tdisplayRows = rowManager.getDisplayRows(),\r\n\t\tindex;\r\n\t\t\r\n\t\tif(top){\r\n\t\t\tif(displayRows.length){\r\n\t\t\t\tindex = displayRows[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(displayRows.length){\r\n\t\t\t\tindex = displayRows[displayRows.length - 1];\r\n\t\t\t\ttop = displayRows.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\r\n\t\tthis.dispatchExternal(\"pageSizeChanged\", this.size);\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\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){\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.footerAppend(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.footerAppend(this.element);\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\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\tthis.trackChanges();\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\t\treturn this.setPage(1);\r\n\t\r\n\t\t\tcase \"prev\":\r\n\t\t\t\treturn this.previousPage();\r\n\t\t\t\r\n\t\t\tcase \"next\":\r\n\t\t\t\treturn this.nextPage();\r\n\t\t\t\r\n\t\t\tcase \"last\":\r\n\t\t\t\treturn this.setPage(this.max);\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.displayRows(-1);\r\n\t\tvar index = rows.indexOf(row);\r\n\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\r\n\t\tif(size > 0){\r\n\t\t\tthis.size = size;\r\n\t\t\tthis.dispatchExternal(\"pageSizeChanged\", 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\t\tif(content instanceof Node){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//clear previous cell contents\r\n\t\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\t\tthis.pageCounterElement.appendChild(content);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif(content != null){\r\n\t\t\t\t\t\t\tconsole.warn(\"Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:\", content);\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\tcase \"undefined\":\r\n\t\t\t\t\tthis.pageCounterElement.innerHTML = \"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\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\t\tleft = this.table.rowManager.scrollLeft;\r\n\t\t\t\r\n\t\t\t\tthis.refreshData();\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\r\n\t\t\t\tthis.dispatchExternal(\"pageLoaded\", this.getPage());\r\n\t\t\t\r\n\t\t\t\treturn Promise.resolve();\r\n\t\t\t\r\n\t\t\tcase \"remote\":\r\n\t\t\t\tthis.dataChanging = true;\r\n\t\t\t\treturn this.reloadData(null)\r\n\t\t\t\t\t.finally(() => {\r\n\t\t\t\t\t\tthis.dataChanging = false;\r\n\t\t\t\t\t});\r\n\t\t\t\r\n\t\t\tcase \"progressive_load\":\r\n\t\t\tcase \"progressive_scroll\":\r\n\t\t\t\treturn this.reloadData(null, true);\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tconsole.warn(\"Pagination Error - no such pagination mode:\", this.mode);\r\n\t\t\t\treturn Promise.reject();\r\n\t\t}\r\n\t}\r\n\t\r\n\t_parseRemoteData(data){\r\n\t\tvar 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\t\tif(this.page == 1){\r\n\t\t\t\t\t\t\tthis.table.rowManager.setData(data.data, false, this.page == 1);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.table.rowManager.addRows(data.data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\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}, this.table.options.progressiveLoadDelay);\r\n\t\t\t\t\t\t}\r\n\t\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\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\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\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\t\tif(this.table.rowManager.element.scrollHeight <= (this.table.rowManager.element.clientHeight + margin)){\r\n\t\t\t\t\t\t\tif(this.page < this.max){\r\n\t\t\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\t\t\tthis.nextPage();\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\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;\r\n","// read persistance 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\tretrievedData;\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\tretrievedData = this.retrieveData(\"page\");\r\n\r\n\t\t\t\tif(retrievedData){\r\n\t\t\t\t\tif(typeof retrievedData.paginationSize !== \"undefined\" && (this.config.page === true || this.config.page.size)){\r\n\t\t\t\t\t\tthis.table.options.paginationSize = retrievedData.paginationSize;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(typeof retrievedData.paginationInitialPage !== \"undefined\" && (this.config.page === true || this.config.page.page)){\r\n\t\t\t\t\t\tthis.table.options.paginationInitialPage = retrievedData.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\tretrievedData = this.retrieveData(\"group\");\r\n\r\n\t\t\t\tif(retrievedData){\r\n\t\t\t\t\tif(typeof retrievedData.groupBy !== \"undefined\" && (this.config.group === true || this.config.group.groupBy)){\r\n\t\t\t\t\t\tthis.table.options.groupBy = retrievedData.groupBy;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retrievedData.groupStartOpen !== \"undefined\" && (this.config.group === true || this.config.group.groupStartOpen)){\r\n\t\t\t\t\t\tthis.table.options.groupStartOpen = retrievedData.groupStartOpen;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(typeof retrievedData.groupHeader !== \"undefined\" && (this.config.group === true || this.config.group.groupHeader)){\r\n\t\t\t\t\t\tthis.table.options.groupHeader = retrievedData.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(\"column-width\", 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 sorters, 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\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: (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:() => {\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.retrieveData(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//retrieve data from memory\r\n\tretrieveData(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\t\treturn col.title === subject.title && col.columns.length === subject.columns.length;\r\n\r\n\t\t\t\tcase \"field\":\r\n\t\t\t\t\treturn col.field === subject.field;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\t\treturn col === subject;\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\t\tdata = this.parseColumns(this.table.columnManager.getColumns());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"filter\":\r\n\t\t\t\tdata = this.table.modules.filter.getFilters();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"sort\":\r\n\t\t\t\tdata = this.validateSorters(this.table.modules.sort.getSort());\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"group\":\r\n\t\t\t\tdata = this.getGroupConfig();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"page\":\r\n\t\t\t\tdata = this.getPageConfig();\r\n\t\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\tkeys.push(\"visible\");\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\t\tdefStore.width = column.getWidth();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"visible\":\r\n\t\t\t\t\t\t\tdefStore.visible = column.visible;\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\r\n\t\t\t\t\t\t\t\tdefStore[key] = colDef[key];\r\n\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}\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 = -10;\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 Popup extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.columnSubscribers = {};\r\n\t\t\r\n\t\tthis.registerTableOption(\"rowContextPopup\", false);\r\n\t\tthis.registerTableOption(\"rowClickPopup\", false);\r\n\t\tthis.registerTableOption(\"rowDblClickPopup\", false);\r\n\t\tthis.registerTableOption(\"groupContextPopup\", false);\r\n\t\tthis.registerTableOption(\"groupClickPopup\", false);\r\n\t\tthis.registerTableOption(\"groupDblClickPopup\", false);\r\n\t\t\r\n\t\tthis.registerColumnOption(\"headerContextPopup\");\r\n\t\tthis.registerColumnOption(\"headerClickPopup\");\r\n\t\tthis.registerColumnOption(\"headerDblClickPopup\");\r\n\t\tthis.registerColumnOption(\"headerPopup\");\r\n\t\tthis.registerColumnOption(\"headerPopupIcon\");\r\n\t\tthis.registerColumnOption(\"contextPopup\");\r\n\t\tthis.registerColumnOption(\"clickPopup\");\r\n\t\tthis.registerColumnOption(\"dblClickPopup\");\r\n\r\n\t\tthis.registerComponentFunction(\"cell\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"column\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"row\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\tthis.registerComponentFunction(\"group\", \"popup\", this._componentPopupCall.bind(this));\r\n\t\t\r\n\t}\r\n\t\r\n\tinitialize(){\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\r\n\t_componentPopupCall(component, contents, position){\r\n\t\tthis.loadPopupEvent(contents, null, component, position);\r\n\t}\r\n\t\r\n\tinitializeRowWatchers(){\r\n\t\tif(this.table.options.rowContextPopup){\r\n\t\t\tthis.subscribe(\"row-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\r\n\t\t\tthis.table.on(\"rowTapHold\", this.loadPopupEvent.bind(this, this.table.options.rowContextPopup));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.rowClickPopup){\r\n\t\t\tthis.subscribe(\"row-click\", this.loadPopupEvent.bind(this, this.table.options.rowClickPopup));\r\n\t\t}\r\n\r\n\t\tif(this.table.options.rowDblClickPopup){\r\n\t\t\tthis.subscribe(\"row-dblclick\", this.loadPopupEvent.bind(this, this.table.options.rowDblClickPopup));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeGroupWatchers(){\r\n\t\tif(this.table.options.groupContextPopup){\r\n\t\t\tthis.subscribe(\"group-contextmenu\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\r\n\t\t\tthis.table.on(\"groupTapHold\", this.loadPopupEvent.bind(this, this.table.options.groupContextPopup));\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.groupClickPopup){\r\n\t\t\tthis.subscribe(\"group-click\", this.loadPopupEvent.bind(this, this.table.options.groupClickPopup));\r\n\t\t}\r\n\r\n\t\tif(this.table.options.groupDblClickPopup){\r\n\t\t\tthis.subscribe(\"group-dblclick\", this.loadPopupEvent.bind(this, this.table.options.groupDblClickPopup));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tvar def = column.definition;\r\n\t\t\r\n\t\t//handle column events\r\n\t\tif(def.headerContextPopup && !this.columnSubscribers.headerContextPopup){\r\n\t\t\tthis.columnSubscribers.headerContextPopup = this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\");\r\n\t\t\tthis.subscribe(\"column-contextmenu\", this.columnSubscribers.headerContextPopup);\r\n\t\t\tthis.table.on(\"headerTapHold\", this.loadPopupTableColumnEvent.bind(this, \"headerContextPopup\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerClickPopup && !this.columnSubscribers.headerClickPopup){\r\n\t\t\tthis.columnSubscribers.headerClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerClickPopup\");\r\n\t\t\tthis.subscribe(\"column-click\", this.columnSubscribers.headerClickPopup);\r\n\t\t\r\n\t\t\r\n\t\t}if(def.headerDblClickPopup && !this.columnSubscribers.headerDblClickPopup){\r\n\t\t\tthis.columnSubscribers.headerDblClickPopup = this.loadPopupTableColumnEvent.bind(this, \"headerDblClickPopup\");\r\n\t\t\tthis.subscribe(\"column-dblclick\", this.columnSubscribers.headerDblClickPopup);\r\n\t\t}\r\n\t\t\r\n\t\tif(def.headerPopup){\r\n\t\t\tthis.initializeColumnHeaderPopup(column);\r\n\t\t}\r\n\t\t\r\n\t\t//handle cell events\r\n\t\tif(def.contextPopup && !this.columnSubscribers.contextPopup){\r\n\t\t\tthis.columnSubscribers.contextPopup = this.loadPopupTableCellEvent.bind(this, \"contextPopup\");\r\n\t\t\tthis.subscribe(\"cell-contextmenu\", this.columnSubscribers.contextPopup);\r\n\t\t\tthis.table.on(\"cellTapHold\", this.loadPopupTableCellEvent.bind(this, \"contextPopup\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(def.clickPopup && !this.columnSubscribers.clickPopup){\r\n\t\t\tthis.columnSubscribers.clickPopup = this.loadPopupTableCellEvent.bind(this, \"clickPopup\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.clickPopup);\r\n\t\t}\r\n\r\n\t\tif(def.dblClickPopup && !this.columnSubscribers.dblClickPopup){\r\n\t\t\tthis.columnSubscribers.dblClickPopup = this.loadPopupTableCellEvent.bind(this, \"dblClickPopup\");\r\n\t\t\tthis.subscribe(\"cell-click\", this.columnSubscribers.dblClickPopup);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumnHeaderPopup(column){\r\n\t\tvar icon = column.definition.headerPopupIcon,\r\n\t\theaderPopupEl;\r\n\t\t\r\n\t\theaderPopupEl = document.createElement(\"span\");\r\n\t\theaderPopupEl.classList.add(\"tabulator-header-popup-button\");\r\n\r\n\t\tif(icon){\r\n\t\t\tif(typeof icon === \"function\"){\r\n\t\t\t\ticon = icon(column.getComponent());\r\n\t\t\t}\r\n\r\n\t\t\tif(icon instanceof HTMLElement){\r\n\t\t\t\theaderPopupEl.appendChild(icon);\r\n\t\t\t}else{\r\n\t\t\t\theaderPopupEl.innerHTML = icon;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\theaderPopupEl.innerHTML = \"⋮\";\r\n\t\t}\r\n\t\t\r\n\t\theaderPopupEl.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.loadPopupEvent(column.definition.headerPopup, e, column);\r\n\t\t});\r\n\t\t\r\n\t\tcolumn.titleElement.insertBefore(headerPopupEl, column.titleElement.firstChild);\r\n\t}\r\n\t\r\n\tloadPopupTableCellEvent(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.loadPopupEvent(cell.column.definition[option], e, cell);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadPopupTableColumnEvent(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.loadPopupEvent(column.definition[option], e, column);\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadPopupEvent(contents, e, component, position){\r\n\t\tvar renderedCallback;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trenderedCallback = callback;\r\n\t\t}\r\n\t\t\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\tcontents = typeof contents == \"function\" ? contents.call(this.table, e, component.getComponent(), onRendered) : contents;\r\n\t\t\r\n\t\tthis.loadPopup(e, component, contents, renderedCallback, position);\r\n\t}\r\n\t\r\n\tloadPopup(e, component, contents, renderedCallback, position){\r\n\t\tvar touch = !(e instanceof MouseEvent),\r\n\t\tcontentsEl, popup;\r\n\t\t\r\n\t\tif(contents instanceof HTMLElement){\r\n\t\t\tcontentsEl = contents;\r\n\t\t}else{\r\n\t\t\tcontentsEl = document.createElement(\"div\");\r\n\t\t\tcontentsEl.innerHTML = contents;\r\n\t\t}\r\n\t\t\r\n\t\tcontentsEl.classList.add(\"tabulator-popup\");\r\n\r\n\t\tcontentsEl.addEventListener(\"click\", (e) =>{\r\n\t\t\te.stopPropagation();\r\n\t\t});\r\n\r\n\t\tif(!touch){\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t\t\r\n\t\tpopup = this.popup(contentsEl);\r\n\r\n\t\tif(typeof renderedCallback === \"function\"){\r\n\t\t\tpopup.renderCallback(renderedCallback);\r\n\t\t}\r\n\r\n\t\tif(e){\r\n\t\t\tpopup.show(e);\r\n\t\t}else{\r\n\t\t\tpopup.show(component.getElement(), position || \"center\");\r\n\t\t}\r\n\r\n\t\t\r\n\t\tpopup.hideOnBlur(() => {\r\n\t\t\tthis.dispatchExternal(\"popupClosed\", component.getComponent());\r\n\t\t});\r\n\r\n\r\n\r\n\t\tthis.dispatchExternal(\"popupOpened\", component.getComponent());\r\n\t}\r\n}\r\n\r\nPopup.moduleName = \"popup\";\r\n\r\nexport default Popup;\r\n","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.generateTable(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.generateTable(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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\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\t\t\r\n\t\tthis.registerTableOption(\"reactiveData\", false); //enable data reactivity\r\n\t}\r\n\t\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, \"cellsave\"));\r\n\t\t\tthis.subscribe(\"cell-value-save-after\", this.unblock.bind(this, \"cellsave\"));\r\n\t\t\tthis.subscribe(\"row-data-save-before\", this.block.bind(this, \"rowsave\"));\r\n\t\t\tthis.subscribe(\"row-data-save-after\", this.unblock.bind(this, \"rowsave\"));\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\t\r\n\twatchData(data){\r\n\t\tvar self = this,\r\n\t\tversion;\r\n\t\t\r\n\t\tthis.currentVersion ++;\r\n\t\t\r\n\t\tversion = this.currentVersion;\r\n\t\t\r\n\t\tthis.unwatchData();\r\n\t\t\r\n\t\tthis.data = data;\r\n\t\t\r\n\t\t//override array push function\r\n\t\tthis.origFuncs.push = data.push;\r\n\t\t\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\t\t\t\tresult;\r\n\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\t\r\n\t\t\t\t\tself.block(\"data-push\");\r\n\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\t\r\n\t\t\t\t\tresult = self.origFuncs.push.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-push\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//override array unshift function\r\n\t\tthis.origFuncs.unshift = data.unshift;\r\n\t\t\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\t\t\t\tresult;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-unshift\");\r\n\t\t\t\t\t\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\t\r\n\t\t\t\t\tresult = self.origFuncs.unshift.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-unshift\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//override array shift function\r\n\t\tthis.origFuncs.shift = data.shift;\r\n\t\t\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, result;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-shift\");\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.shift.call(data);\r\n\r\n\t\t\t\t\tself.unblock(\"data-shift\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//override array pop function\r\n\t\tthis.origFuncs.pop = data.pop;\r\n\t\t\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, result;\r\n\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-pop\");\r\n\t\t\t\t\t\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\t\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.pop.call(data);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-pop\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//override array splice function\r\n\t\tthis.origFuncs.splice = data.splice;\r\n\t\t\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, result;\r\n\t\t\t\t\r\n\t\t\t\tif(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"data-splice\");\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\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\r\n\t\t\t\t\tresult = self.origFuncs.splice.apply(data, arguments);\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.unblock(\"data-splice\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn result ;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\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\t\r\n\twatchRow(row){\r\n\t\tvar data = row.getData();\r\n\t\t\r\n\t\tfor(var key in data){\r\n\t\t\tthis.watchKey(row, data, key);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.table.options.dataTree){\r\n\t\t\tthis.watchTreeChildren(row);\r\n\t\t}\r\n\t}\r\n\t\r\n\twatchTreeChildren (row){\r\n\t\tvar self = this,\r\n\t\tchildField = row.getData()[this.table.options.dataTreeChildField],\r\n\t\torigFuncs = {};\r\n\t\t\r\n\t\tif(childField){\r\n\t\t\t\r\n\t\t\torigFuncs.push = childField.push;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-push\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.push.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-push\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.unshift = childField.unshift;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-unshift\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.unshift.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-unshift\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.shift = childField.shift;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-shift\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.shift.call(childField);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-shift\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.pop = childField.pop;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-pop\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.pop.call(childField);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-pop\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\torigFuncs.splice = childField.splice;\r\n\t\t\t\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\tif(!self.blocked){\r\n\t\t\t\t\t\tself.block(\"tree-splice\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar result = origFuncs.splice.apply(childField, arguments);\r\n\t\t\t\t\t\tthis.rebuildTree(row);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tself.unblock(\"tree-splice\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\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\t\r\n\trebuildTree(row){\r\n\t\tthis.table.modules.dataTree.initializeRow(row);\r\n\t\tthis.table.modules.dataTree.layoutRow(row);\r\n\t\tthis.table.rowManager.refreshActiveData(\"tree\", false, true);\r\n\t}\r\n\t\r\n\twatchKey(row, data, key){\r\n\t\tvar self = this,\r\n\t\tprops = Object.getOwnPropertyDescriptor(data, key),\r\n\t\tvalue = data[key],\r\n\t\tversion = this.currentVersion;\r\n\t\t\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(!self.blocked && version === self.currentVersion){\r\n\t\t\t\t\tself.block(\"key\");\r\n\t\t\t\t\t\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\t\r\n\t\t\t\t\tself.unblock(\"key\");\r\n\t\t\t\t}\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tif(props.get){\r\n\t\t\t\t\tprops.get();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\tunwatchRow(row){\r\n\t\tvar data = row.getData();\r\n\t\t\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\t\r\n\tblock(key){\r\n\t\tif(!this.blocked){\r\n\t\t\tthis.blocked = key;\r\n\t\t}\r\n\t}\r\n\t\r\n\tunblock(key){\r\n\t\tif(this.blocked === key){\r\n\t\t\tthis.blocked = false;\r\n\t\t}\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.latestX = false;\r\n\t\tthis.handle = null;\r\n\t\tthis.initialNextColumn = null;\r\n\t\tthis.nextColumn = null;\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.registerColumnOption(\"resizable\", true);\r\n\t\tthis.registerTableOption(\"resizableColumnFit\", false);\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.subscribe(\"column-rendered\", this.layoutColumnHeader.bind(this));\r\n\t}\r\n\t\r\n\tinitializeEventWatchers(){\r\n\t\tif(!this.initialized){\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-rendered\", this.layoutCellHandles.bind(this));\r\n\t\t\tthis.subscribe(\"cell-delete\", this.deInitializeComponent.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-height\", this.resizeHandle.bind(this));\r\n\t\t\tthis.subscribe(\"column-moved\", this.columnLayoutUpdated.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-hide\", this.deInitializeColumn.bind(this));\r\n\t\t\tthis.subscribe(\"column-show\", this.columnLayoutUpdated.bind(this));\r\n\t\t\tthis.subscribe(\"column-width\", this.columnWidthUpdated.bind(this));\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-delete\", this.deInitializeComponent.bind(this));\r\n\t\t\tthis.subscribe(\"column-height\", this.resizeHandle.bind(this));\r\n\t\t\t\r\n\t\t\tthis.initialized = true;\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tlayoutCellHandles(cell){\r\n\t\tif(cell.row.type === \"row\"){\r\n\t\t\tthis.deInitializeComponent(cell);\r\n\t\t\tthis.initializeColumn(\"cell\", cell, cell.column, cell.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tlayoutColumnHeader(column){\r\n\t\tif(column.definition.resizable){\r\n\t\t\tthis.initializeEventWatchers();\r\n\t\t\tthis.deInitializeComponent(column);\r\n\t\t\tthis.initializeColumn(\"header\", column, column, column.element);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolumnLayoutUpdated(column){\r\n\t\tvar prev = column.prevColumn();\r\n\t\t\r\n\t\tthis.reinitializeColumn(column);\r\n\t\t\r\n\t\tif(prev){\r\n\t\t\tthis.reinitializeColumn(prev);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcolumnWidthUpdated(column){\r\n\t\tif(column.modules.frozen){\r\n\t\t\tif(this.table.modules.frozenColumns.leftColumns.includes(column)){\r\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((col) => {\r\n\t\t\t\t\tthis.reinitializeColumn(col);\r\n\t\t\t\t});\r\n\t\t\t}else if(this.table.modules.frozenColumns.rightColumns.includes(column)){\r\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((col) => {\r\n\t\t\t\t\tthis.reinitializeColumn(col);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfrozenColumnOffset(column){\r\n\t\tvar offset = false;\r\n\r\n\t\tif(column.modules.frozen){\r\n\t\t\toffset = column.modules.frozen.marginValue; \r\n\r\n\t\t\tif(column.modules.frozen.position === \"left\"){\r\n\t\t\t\toffset += column.getWidth() - 3;\r\n\t\t\t}else{\r\n\t\t\t\tif(offset){\r\n\t\t\t\t\toffset -= 3;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn offset !== false ? offset + \"px\" : false;\r\n\t}\r\n\t\r\n\treinitializeColumn(column){\r\n\t\tvar frozenOffset = this.frozenColumnOffset(column);\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(cell.modules.resize && cell.modules.resize.handleEl){\r\n\t\t\t\tif(frozenOffset){\r\n\t\t\t\t\tcell.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcell.element.after(cell.modules.resize.handleEl);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tif(column.modules.resize && column.modules.resize.handleEl){\r\n\t\t\tif(frozenOffset){\r\n\t\t\t\tcolumn.modules.resize.handleEl.style[column.modules.frozen.position] = frozenOffset;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumn.element.after(column.modules.resize.handleEl);\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeColumn(type, component, column, element){\r\n\t\tvar self = this,\r\n\t\tvariableHeight = false,\r\n\t\tmode = column.definition.resizable,\r\n\t\tconfig = {},\r\n\t\tnearestColumn = column.getLastColumn();\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\tconfig = {variableHeight:variableHeight};\r\n\t\t}\r\n\t\t\r\n\t\tif((mode === true || mode == type) && this._checkResizability(nearestColumn)){\r\n\t\t\t\r\n\t\t\tvar handle = document.createElement('span');\r\n\t\t\thandle.className = \"tabulator-col-resize-handle\";\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\tself.startColumn = column;\r\n\t\t\t\tself.initialNextColumn = self.nextColumn = nearestColumn.nextColumn();\r\n\t\t\t\tself._mouseDown(e, nearestColumn, handle);\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//resize column on double click\r\n\t\t\thandle.addEventListener(\"dblclick\", (e) => {\r\n\t\t\t\tvar oldWidth = nearestColumn.getWidth();\r\n\t\t\t\t\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tnearestColumn.reinitializeWidth(true);\r\n\t\t\t\t\r\n\t\t\t\tif(oldWidth !== nearestColumn.getWidth()){\r\n\t\t\t\t\tself.dispatch(\"column-resized\", nearestColumn);\r\n\t\t\t\t\tself.table.externalEvents.dispatch(\"columnResized\", nearestColumn.getComponent());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tif(column.modules.frozen){\r\n\t\t\t\thandle.style.position = \"sticky\";\r\n\t\t\t\thandle.style[column.modules.frozen.position] = this.frozenColumnOffset(column);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconfig.handleEl = handle;\r\n\t\t\t\r\n\t\t\tif(element.parentNode && column.visible){\r\n\t\t\t\telement.after(handle);\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcomponent.modules.resize = config;\r\n\t}\r\n\t\r\n\tdeInitializeColumn(column){\r\n\t\tthis.deInitializeComponent(column);\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tthis.deInitializeComponent(cell);\r\n\t\t});\r\n\t}\r\n\t\r\n\tdeInitializeComponent(component){\r\n\t\tvar handleEl;\r\n\t\t\r\n\t\tif(component.modules.resize){\r\n\t\t\thandleEl = component.modules.resize.handleEl;\r\n\t\t\t\r\n\t\t\tif(handleEl && handleEl.parentElement){\r\n\t\t\t\thandleEl.parentElement.removeChild(handleEl);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tresizeHandle(component, height){\r\n\t\tif(component.modules.resize && component.modules.resize.handleEl){\r\n\t\t\tcomponent.modules.resize.handleEl.style.height = height;\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\t\t\r\n\t\tfunction mouseMove(e){\r\n\t\t\tvar x = typeof e.screenX === \"undefined\" ? e.touches[0].screenX : e.screenX,\r\n\t\t\tstartDiff = x - self.startX,\r\n\t\t\tmoveDiff = x - self.latestX,\r\n\t\t\tblockedBefore, blockedAfter;\r\n\t\t\t\r\n\t\t\tself.latestX = x;\r\n\t\t\t\r\n\t\t\tif(self.table.rtl){\r\n\t\t\t\tstartDiff = -startDiff;\r\n\t\t\t\tmoveDiff = -moveDiff;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tblockedBefore = column.width == column.minWidth || column.width == column.maxWidth;\r\n\t\t\t\r\n\t\t\tcolumn.setWidth(self.startWidth + startDiff);\r\n\t\t\t\r\n\t\t\tblockedAfter = column.width == column.minWidth || column.width == column.maxWidth;\r\n\t\t\t\r\n\t\t\tif(moveDiff < 0){\r\n\t\t\t\tself.nextColumn = self.initialNextColumn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(self.table.options.resizableColumnFit && self.nextColumn && !(blockedBefore && blockedAfter)){\r\n\t\t\t\tlet colWidth = self.nextColumn.getWidth();\r\n\t\t\t\t\r\n\t\t\t\tif(moveDiff > 0){\r\n\t\t\t\t\tif(colWidth <= self.nextColumn.minWidth){\r\n\t\t\t\t\t\tself.nextColumn = self.nextColumn.nextColumn();\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(self.nextColumn){\r\n\t\t\t\t\tself.nextColumn.setWidth(self.nextColumn.getWidth() - moveDiff);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.table.columnManager.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\t\t\t\r\n\t\t\tif(self.startWidth !== column.getWidth()){\r\n\t\t\t\tself.table.columnManager.verticalAlignHeaders();\r\n\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 interfering 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.latestX = self.startX;\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 interfering 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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.binding = false;\r\n\t\tthis.visibilityObserver = false;\r\n\t\tthis.resizeObserver = false;\r\n\t\tthis.containerObserver = false;\r\n\t\t\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\t\t\r\n\t\tthis.autoResize = false;\r\n\t\t\r\n\t\tthis.visible = false;\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.initialRedraw = false;\r\n\t\t\r\n\t\tthis.registerTableOption(\"autoResize\", true); //auto resize table\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis.tableHeight = table.element.clientHeight;\r\n\t\t\tthis.tableWidth = table.element.clientWidth;\r\n\t\t\t\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\t\t\t\r\n\t\t\tif(typeof IntersectionObserver !== \"undefined\" && typeof ResizeObserver !== \"undefined\" && table.rowManager.getRenderMode() === \"virtual\"){\r\n\t\t\t\t\r\n\t\t\t\tthis.initializeVisibilityObserver();\r\n\t\t\t\t\r\n\t\t\t\tthis.autoResize = true;\r\n\t\t\t\t\r\n\t\t\t\tthis.resizeObserver = new ResizeObserver((entry) => {\r\n\t\t\t\t\tif(!table.browserMobile || (table.browserMobile &&!table.modules.edit.currentCell)){\r\n\t\t\t\t\t\t\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\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tthis.redrawTable();\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\tthis.resizeObserver.observe(table.element);\r\n\t\t\t\t\r\n\t\t\t\ttableStyle = window.getComputedStyle(table.element);\r\n\t\t\t\t\r\n\t\t\t\tif(this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue(\"max-height\") || tableStyle.getPropertyValue(\"min-height\"))){\r\n\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\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\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tthis.redrawTable();\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.containerObserver.observe(this.table.element.parentNode);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.subscribe(\"table-resize\", this.tableResized.bind(this));\r\n\t\t\t\t\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\t\t\t\t\t\ttable.columnManager.rerenderColumns(true);\r\n\t\t\t\t\t\ttable.redraw();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\twindow.addEventListener(\"resize\", this.binding);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"table-destroy\", this.clearBindings.bind(this));\r\n\t\t}\r\n\t}\r\n\t\r\n\tinitializeVisibilityObserver(){\r\n\t\tthis.visibilityObserver = new IntersectionObserver((entries) => {\r\n\t\t\tthis.visible = entries[0].isIntersecting;\r\n\t\t\t\r\n\t\t\tif(!this.initialized){\r\n\t\t\t\tthis.initialized = true;\r\n\t\t\t\tthis.initialRedraw = !this.visible;\r\n\t\t\t}else{\r\n\t\t\t\tif(this.visible){\r\n\t\t\t\t\tthis.redrawTable(this.initialRedraw);\r\n\t\t\t\t\tthis.initialRedraw = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.visibilityObserver.observe(this.table.element);\r\n\t}\r\n\t\r\n\tredrawTable(force){\r\n\t\tif(this.initialized && this.visible){\r\n\t\t\tthis.table.columnManager.rerenderColumns(true);\r\n\t\t\tthis.table.redraw(force);\r\n\t\t}\r\n\t}\r\n\t\r\n\ttableResized(){\r\n\t\tthis.table.rowManager.redraw();\r\n\t}\r\n\t\r\n\tclearBindings(){\r\n\t\tif(this.binding){\r\n\t\t\twindow.removeEventListener(\"resize\", this.binding);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.resizeObserver){\r\n\t\t\tthis.resizeObserver.unobserve(this.table.element);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.visibilityObserver){\r\n\t\t\tthis.visibilityObserver.unobserve(this.table.element);\r\n\t\t}\r\n\t\t\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\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\t\t\t\r\n\t\t\tif(this.table.options.responsiveLayout === \"collapse\"){\r\n\t\t\t\tthis.subscribe(\"row-data-changed\", this.generateCollapsedRowContent.bind(this));\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 working = true;\r\n\r\n\t\twhile(working){\r\n\r\n\t\t\tlet width = this.table.modules.layout.getMode() == \"fitColumns\" ? this.table.columnManager.getFlexBaseWidth() : this.table.columnManager.getWidth();\r\n\r\n\t\t\tlet diff = (this.table.options.headerVisible ? this.table.columnManager.element.clientWidth : this.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 = this.columns[this.index];\r\n\r\n\t\t\t\tif(column){\r\n\t\t\t\t\tthis.hideColumn(column);\r\n\t\t\t\t\tthis.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 = this.columns[this.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\tthis.showColumn(column);\r\n\t\t\t\t\t\t\tthis.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(!this.table.rowManager.activeRowsCount){\r\n\t\t\t\tthis.table.rowManager.renderEmptyScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgenerateCollapsedContent(){\r\n\t\tvar rows = this.table.rowManager.getDisplayRows();\r\n\r\n\t\trows.forEach((row) => {\r\n\t\t\tthis.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 data = row.getData(),\r\n\t\toutput = [],\r\n\t\tmockCellComponent;\r\n\r\n\t\tthis.hiddenColumns.forEach((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 && this.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\tgetTable:() => {\r\n\t\t\t\t\t\t\treturn this.table;\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(this.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;\r\n","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 whether 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\t\tthis.table.rowManager.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\tthis._rowSelectionChanged();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"string\":\r\n\t\t\t\trowMatch = this.table.rowManager.findRow(rows);\r\n\t\t\t\r\n\t\t\t\tif(rowMatch){\r\n\t\t\t\t\tthis._selectRow(rowMatch, true, true);\r\n\t\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowMatch = this.table.rowManager.getRows(rows);\r\n\t\t\t\t\t\r\n\t\t\t\t\trowMatch.forEach((row) => {\r\n\t\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif(rowMatch.length){\r\n\t\t\t\t\t\tthis._rowSelectionChanged();\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\t\t\tdefault:\r\n\t\t\t\tif(Array.isArray(rows)){\r\n\t\t\t\t\trows.forEach((row) => {\r\n\t\t\t\t\t\tthis._selectRow(row, true, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t\tthis._rowSelectionChanged();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis._selectRow(rows, false, true);\r\n\t\t\t\t}\r\n\t\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\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\tif(!DT.isDateTime(a)){\r\n\t\t\tif(format === \"iso\"){\r\n\t\t\t\ta = DT.fromISO(String(a));\r\n\t\t\t}else{\r\n\t\t\t\ta = DT.fromFormat(String(a), format);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(!DT.isDateTime(b)){\r\n\t\t\tif(format === \"iso\"){\r\n\t\t\t\tb = DT.fromISO(String(b));\r\n\t\t\t}else{\r\n\t\t\t\tb = DT.fromFormat(String(b), format);\r\n\t\t\t}\r\n\t\t}\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\t\tif(params.locale){\r\n\t\t\t\t\tlocale = this.langLocale();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"string\":\r\n\t\t\t\tlocale = params.locale;\r\n\t\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 type = params.type || \"length\",\r\n\talignEmptyValues = params.alignEmptyValues,\r\n\temptyAlign = 0;\r\n\r\n\tfunction calc(value){\r\n\t\tvar result;\r\n\r\n\t\tswitch(type){\r\n\t\t\tcase \"length\":\r\n\t\t\t\tresult = value.length;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"sum\":\r\n\t\t\t\tresult = value.reduce(function(c, d){\r\n\t\t\t\t\treturn c + d;\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"max\":\r\n\t\t\t\tresult = Math.max.apply(null, value) ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"min\":\r\n\t\t\t\tresult = Math.min.apply(null, value) ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"avg\":\r\n\t\t\t\tresult = value.reduce(function(c, d){\r\n\t\t\t\t\treturn c + d;\r\n\t\t\t\t}) / value.length;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t//handle non array values\r\n\tif(!Array.isArray(a)){\r\n\t\temptyAlign = !Array.isArray(b) ? 0 : -1;\r\n\t}else if(!Array.isArray(b)){\r\n\t\temptyAlign = 1;\r\n\t}else{\r\n\t\treturn calc(b) - calc(a);\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\t\tthis.registerTableOption(\"headerSortClickElement\", \"header\"); //element which triggers sort when clicked\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\tinitialize(){\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\ttableBuilt(){\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\tremoteSortParams(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\t\tif(Sort.sorters[column.definition.sorter]){\r\n\t\t\t\t\tsorter = Sort.sorters[column.definition.sorter];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconsole.warn(\"Sort Error - No such sorter found: \", column.definition.sorter);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"function\":\r\n\t\t\t\tsorter = column.definition.sorter;\r\n\t\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\t\t\tarrowEl = document.createElement(\"div\");\r\n\t\t\tarrowEl.classList.add(\"tabulator-col-sorter\");\r\n\r\n\t\t\tswitch(this.table.options.headerSortClickElement){\r\n\t\t\t\tcase \"icon\":\r\n\t\t\t\t\tarrowEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"header\":\r\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tcolEl.classList.add(\"tabulator-col-sorter-element\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tswitch(this.table.options.headerSortElement){\r\n\t\t\t\tcase \"function\":\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"object\":\r\n\t\t\t\t\tarrowEl.appendChild(this.table.options.headerSortElement);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault:\r\n\t\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\tthis.setColumnHeaderSortIcon(column, \"none\");\r\n\r\n\t\t\t//sort on click\r\n\t\t\t(this.table.options.headerSortClickElement === \"icon\" ? arrowEl : colEl).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\t\tdir = \"desc\";\r\n\t\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\t\tdir = \"asc\";\r\n\t\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\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\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\tmatch = sorters.splice(match, 1)[0];\r\n\t\t\t\t\t\t\tif(dir != \"none\"){\r\n\t\t\t\t\t\t\t\tsorters.push(match);\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(null, false, false);\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\t\tsorter = \"string\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t\t}else{\r\n\t\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\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\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\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;\r\n\r\n\t\t\t\tif(item.column){\r\n\t\t\t\t\tsortObj = item.column.modules.sort;\r\n\r\n\t\t\t\t\tif(sortObj){\r\n\r\n\t\t\t\t\t\t//if no sorter has been defined, take a guess\r\n\t\t\t\t\t\tif(!sortObj.sorter){\r\n\t\t\t\t\t\t\tsortObj.sorter = self.findSorter(item.column);\r\n\t\t\t\t\t\t}\r\n\r\n\t\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\t\tsortListActual.push(item);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tself.setColumnHeader(item.column, item.dir);\r\n\t\t\t\t}\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((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\tthis.setColumnHeaderSortIcon(column, \"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 === \"asc\" ? \"ascending\" : \"descending\");\r\n\t\tthis.setColumnHeaderSortIcon(column, dir);\r\n\t}\r\n\r\n\tsetColumnHeaderSortIcon(column, dir){\r\n\t\tvar sortEl = column.modules.sort.element,\r\n\t\tarrowEl;\r\n\r\n\t\tif(column.definition.headerSort && typeof this.table.options.headerSortElement === \"function\"){\r\n\t\t\twhile(sortEl.firstChild) sortEl.removeChild(sortEl.firstChild);\r\n\r\n\t\t\tarrowEl = this.table.options.headerSortElement.call(this.table, column.getComponent(), dir);\r\n\t\t\t\r\n\t\t\tif(typeof arrowEl === \"object\"){\r\n\t\t\t\tsortEl.appendChild(arrowEl);\r\n\t\t\t}else{\r\n\t\t\t\tsortEl.innerHTML = arrowEl;\r\n\t\t\t}\r\n\t\t}\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;\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;","import Module from '../../core/Module.js';\r\nimport Cell from '../../core/cell/Cell.js';\r\n\r\nclass Tooltip extends Module{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.tooltipSubscriber = null,\r\n\t\tthis.headerSubscriber = null,\r\n\t\t\r\n\t\tthis.timeout = null;\r\n\t\tthis.popupInstance = null;\r\n\t\t\r\n\t\tthis.registerTableOption(\"tooltipGenerationMode\", undefined); //deprecated\r\n\t\tthis.registerTableOption(\"tooltipDelay\", 300); \r\n\t\t\r\n\t\tthis.registerColumnOption(\"tooltip\");\r\n\t\tthis.registerColumnOption(\"headerTooltip\");\r\n\t}\r\n\t\r\n\tinitialize(){\r\n\t\tthis.deprecatedOptionsCheck();\r\n\t\t\r\n\t\tthis.subscribe(\"column-init\", this.initializeColumn.bind(this));\r\n\t}\r\n\t\r\n\tdeprecatedOptionsCheck(){\r\n\t\tthis.deprecationCheckMsg(\"tooltipGenerationMode\", \"This option is no longer needed as tooltips are always generated on hover now\");\r\n\t}\t\r\n\t\r\n\tinitializeColumn(column){\r\n\t\tif(column.definition.headerTooltip && !this.headerSubscriber){\r\n\t\t\tthis.headerSubscriber = true;\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"column-mousemove\", this.mousemoveCheck.bind(this, \"headerTooltip\"));\r\n\t\t\tthis.subscribe(\"column-mouseout\", this.mouseoutCheck.bind(this, \"headerTooltip\"));\r\n\t\t}\r\n\t\t\r\n\t\tif(column.definition.tooltip && !this.tooltipSubscriber){\r\n\t\t\tthis.tooltipSubscriber = true;\r\n\t\t\t\r\n\t\t\tthis.subscribe(\"cell-mousemove\", this.mousemoveCheck.bind(this, \"tooltip\"));\r\n\t\t\tthis.subscribe(\"cell-mouseout\", this.mouseoutCheck.bind(this, \"tooltip\"));\r\n\t\t}\r\n\t}\r\n\t\r\n\tmousemoveCheck(action, e, component){\r\n\t\tvar tooltip = action === \"tooltip\" ? component.column.definition.tooltip : component.definition.headerTooltip;\r\n\t\t\r\n\t\tif(tooltip){\r\n\t\t\tthis.clearPopup();\r\n\t\t\tthis.timeout = setTimeout(this.loadTooltip.bind(this, e, component, tooltip), this.table.options.tooltipDelay);\r\n\t\t}\r\n\t}\r\n\r\n\tmouseoutCheck(action, e, component){\r\n\t\tif(!this.popupInstance){\r\n\t\t\tthis.clearPopup();\r\n\t\t}\r\n\t}\r\n\t\r\n\tclearPopup(action, e, component){\r\n\t\tclearTimeout(this.timeout);\r\n\t\tthis.timeout = null;\r\n\t\t\r\n\t\tif(this.popupInstance){\r\n\t\t\tthis.popupInstance.hide();\r\n\t\t}\r\n\t}\r\n\t\r\n\tloadTooltip(e, component, tooltip){\r\n\t\tvar contentsEl, renderedCallback, coords;\r\n\r\n\t\tfunction onRendered(callback){\r\n\t\t\trenderedCallback = callback;\r\n\t\t}\r\n\t\t\r\n\t\tif(typeof tooltip === \"function\"){\r\n\t\t\ttooltip = tooltip(e, component.getComponent(), onRendered);\r\n\t\t}\r\n\t\t\r\n\t\tif(tooltip instanceof HTMLElement){\r\n\t\t\tcontentsEl = tooltip;\r\n\t\t}else{\r\n\t\t\tcontentsEl = document.createElement(\"div\");\r\n\t\t\t\r\n\t\t\tif(tooltip === true){\r\n\t\t\t\tif(component instanceof Cell){\r\n\t\t\t\t\ttooltip = component.value;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(component.definition.field){\r\n\t\t\t\t\t\tthis.langBind(\"columns|\" + component.definition.field, (value) => {\r\n\t\t\t\t\t\t\tcontentsEl.innerHTML = tooltip = value || component.definition.title;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\ttooltip = component.definition.title;\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\tcontentsEl.innerHTML = tooltip;\r\n\t\t}\r\n\t\t\r\n\t\tif(tooltip || tooltip === 0 || tooltip === false){\r\n\t\t\tcontentsEl.classList.add(\"tabulator-tooltip\");\r\n\r\n\t\t\tcontentsEl.addEventListener(\"mousemove\", e => e.preventDefault());\r\n\t\t\t\r\n\t\t\tthis.popupInstance = this.popup(contentsEl);\r\n\t\t\t\r\n\t\t\tif(typeof renderedCallback === \"function\"){\r\n\t\t\t\tthis.popupInstance.renderCallback(renderedCallback);\r\n\t\t\t}\r\n\r\n\t\t\tcoords = this.popupInstance.containerEventCoords(e);\r\n\t\t\t\r\n\t\t\tthis.popupInstance.show(coords.x + 15, coords.y + 15).hideOnBlur(() => {\r\n\t\t\t\tthis.dispatchExternal(\"TooltipClosed\", component.getComponent());\r\n\t\t\t\tthis.popupInstance = null;\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"TooltipOpened\", component.getComponent());\r\n\t\t}\r\n\t}\r\n}\r\n\r\nTooltip.moduleName = \"tooltip\";\r\n\r\nexport default Tooltip;\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\r\n\t\tvalue = Number(value);\r\n\r\n\t\treturn !isNaN(value) && 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\t\r\n\t\tvalue = Number(value);\r\n\r\n\t\treturn !isNaN(value) && 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\r\n\t\tif(typeof parameters == \"string\"){\r\n\t\t\tparameters = parameters.split(\"|\");\r\n\t\t}\r\n\r\n\t\treturn 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\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.invalidCells = [];\r\n\t\t\r\n\t\tthis.registerTableOption(\"validationMode\", \"blocking\");\r\n\t\t\r\n\t\tthis.registerColumnOption(\"validator\");\r\n\t\t\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\t\t\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\t\t\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\t\r\n\t\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\t\r\n\t\tthis.subscribe(\"edit-success\", this.editValidate.bind(this));\r\n\t\tthis.subscribe(\"edit-editor-clear\", this.editorClear.bind(this));\r\n\t\tthis.subscribe(\"edit-edited-clear\", this.editedClear.bind(this));\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Event Handling //////////\r\n\t///////////////////////////////////\r\n\t\r\n\teditValidate(cell, value, previousValue){\r\n\t\tvar valid = this.table.options.validationMode !== \"manual\" ? this.validate(cell.column.modules.validate, cell, value) : true;\r\n\t\t\r\n\t\t// allow time for editor to make render changes then style cell\r\n\t\tif(valid !== true){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tcell.getElement().classList.add(\"tabulator-validation-fail\");\r\n\t\t\t\tthis.dispatchExternal(\"validationFailed\", cell.getComponent(), value, valid);\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\treturn valid;\r\n\t}\r\n\t\r\n\teditorClear(cell, cancelled){\r\n\t\tif(cancelled){\r\n\t\t\tif(cell.column.modules.validate){\r\n\t\t\t\tthis.cellValidate(cell);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t}\r\n\t\r\n\teditedClear(cell){\r\n\t\tif(cell.modules.validate){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Cell Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcellIsValid(cell){\r\n\t\treturn cell.modules.validate ? (cell.modules.validate.invalid || true) : true;\r\n\t}\r\n\t\r\n\tcellValidate(cell){\r\n\t\treturn this.validate(cell.column.modules.validate, cell, cell.getValue());\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Column Functions ////////\r\n\t///////////////////////////////////\r\n\t\r\n\tcolumnValidate(column){\r\n\t\tvar invalid = [];\r\n\t\t\r\n\t\tcolumn.cells.forEach((cell) => {\r\n\t\t\tif(this.cellValidate(cell) !== true){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t////////// Row Functions //////////\r\n\t///////////////////////////////////\r\n\t\r\n\trowValidate(row){\r\n\t\tvar invalid = [];\r\n\t\t\r\n\t\trow.cells.forEach((cell) => {\r\n\t\t\tif(this.cellValidate(cell) !== true){\r\n\t\t\t\tinvalid.push(cell.getComponent());\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn invalid.length ? invalid : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Table Functions /////////\r\n\t///////////////////////////////////\r\n\t\r\n\t\r\n\tuserClearCellValidation(cells){\r\n\t\tif(!cells){\r\n\t\t\tcells = this.getInvalidCells();\r\n\t\t}\r\n\t\t\r\n\t\tif(!Array.isArray(cells)){\r\n\t\t\tcells = [cells];\r\n\t\t}\r\n\t\t\r\n\t\tcells.forEach((cell) => {\r\n\t\t\tthis.clearValidation(cell._getSelf());\r\n\t\t});\r\n\t}\r\n\t\r\n\tuserValidate(cells){\r\n\t\tvar output = [];\r\n\t\t\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\t\t\t\r\n\t\t\tvar valid = row.validate();\r\n\t\t\t\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\t\t\r\n\t\treturn output.length ? output : true;\r\n\t}\r\n\t\r\n\t///////////////////////////////////\r\n\t///////// Internal Logic //////////\r\n\t///////////////////////////////////\r\n\t\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\t\r\n\t//validate\r\n\tinitializeColumn(column){\r\n\t\tvar self = this,\r\n\t\tconfig = [],\r\n\t\tvalidator;\r\n\t\t\r\n\t\tif(column.definition.validator){\r\n\t\t\t\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\t\t\t\t\t\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\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tvalidator = this._extractValidator(column.definition.validator);\r\n\t\t\t\t\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\t\t\t\r\n\t\t\tcolumn.modules.validate = config.length ? config : false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t_extractValidator(value){\r\n\t\tvar type, params, pos;\r\n\t\t\r\n\t\tswitch(typeof value){\r\n\t\t\tcase \"string\":\r\n\t\t\t\tpos = value.indexOf(':');\r\n\t\t\t\r\n\t\t\t\tif(pos > -1){\r\n\t\t\t\t\ttype = value.substring(0,pos);\r\n\t\t\t\t\tparams = value.substring(pos+1);\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttype = value;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\treturn this._buildValidator(type, params);\r\n\t\t\t\r\n\t\t\tcase \"function\":\r\n\t\t\t\treturn this._buildValidator(value);\r\n\t\t\t\r\n\t\t\tcase \"object\":\r\n\t\t\t\treturn this._buildValidator(value.type, value.parameters);\r\n\t\t}\r\n\t}\r\n\t\r\n\t_buildValidator(type, params){\r\n\t\t\r\n\t\tvar func = typeof type == \"function\" ? type : Validate.validators[type];\r\n\t\t\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\t\r\n\tvalidate(validators, cell, value){\r\n\t\tvar self = this,\r\n\t\tfailedValidators = [],\r\n\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\t\t\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\tfailedValidators.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\t\t\r\n\t\tif(!cell.modules.validate){\r\n\t\t\tcell.modules.validate = {};\r\n\t\t}\r\n\t\t\r\n\t\tif(!failedValidators.length){\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\t\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 = failedValidators;\r\n\t\t\t\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\t\t\t\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\t\t\r\n\t\treturn failedValidators.length ? failedValidators : true;\r\n\t}\r\n\t\r\n\tgetInvalidCells(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.invalidCells.forEach((cell) => {\r\n\t\t\toutput.push(cell.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tclearValidation(cell){\r\n\t\tvar invalidIndex;\r\n\t\t\r\n\t\tif(cell.modules.validate && cell.modules.validate.invalid){\r\n\t\t\t\r\n\t\t\tcell.getElement().classList.remove(\"tabulator-validation-fail\");\r\n\t\t\tcell.modules.validate.invalid = false;\r\n\t\t\t\r\n\t\t\tinvalidIndex = this.invalidCells.indexOf(cell);\r\n\t\t\t\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;\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 (let 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 (let 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 determine how to size the render area (\"fit\" - fits container to the contents, \"fill\" - fills the container 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 scrolling\r\n\t}\r\n\r\n\tresize(){\r\n\t\t//container has resized, 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, return 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\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.clientHeight / 2);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"bottom\":\r\n\r\n\t\t\t\t\t\tif(this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight){\r\n\t\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\t}else{\r\n\t\t\t\t\t\t\tthis.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + rowEl.offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"top\":\r\n\t\t\t\t\t\tthis.elementVertical.scrollTop = rowEl.offsetTop;\t\t\t\t\t\r\n\t\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\n\r\nexport default class BasicHorizontal 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\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\t\t\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(){\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}\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}\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}\r\n\t}\r\n\t\r\n\tlayoutCheck(){\r\n\t\tthis.isFitData = this.options(\"layout\").startsWith('fitData');\r\n\t}\r\n\t\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\t\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\t\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\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\twidth;\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\tif(!column.modules.frozen){\t\t\t\r\n\t\t\t\t\twidth = column.getWidth();\r\n\r\n\t\t\t\t\tconfig.leftPos = colPos;\r\n\t\t\t\t\tconfig.rightPos = colPos + width;\r\n\t\t\t\t\t\r\n\t\t\t\t\tconfig.width = width;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.isFitData) {\r\n\t\t\t\t\t\tconfig.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif((colPos + width > this.vDomScrollPosLeft) && (colPos < this.vDomScrollPosRight)){\r\n\t\t\t\t\t\t//column is visible\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.leftCol == -1){\r\n\t\t\t\t\t\t\tthis.leftCol = this.columns.length;\r\n\t\t\t\t\t\t\tthis.vDomPadLeft = colPos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.rightCol = this.columns.length;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// column is hidden\r\n\t\t\t\t\t\tif(this.leftCol !== -1){\r\n\t\t\t\t\t\t\tthis.vDomPadRight += width;\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.columns.push(column);\r\n\t\t\t\t\t\r\n\t\t\t\t\tcolumn.modules.vdomHoz = config;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcolPos += width;\r\n\t\t\t\t}\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\trow, 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 && this.table.rowManager.getDisplayRows().length){\r\n\t\t\t\tthis.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;\r\n\t\t\t\t\r\n\t\t\t\trow = this.chain(\"rows-sample\", [1], [], () => {\r\n\t\t\t\t\treturn this.table.rowManager.getDisplayRows();\r\n\t\t\t\t})[0];\r\n\t\t\t\t\r\n\t\t\t\tif(row){\r\n\t\t\t\t\trowEl = row.getElement();\r\n\t\t\t\t\t\r\n\t\t\t\t\trow.generateCells();\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.tableElement.appendChild(rowEl);\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(let colEnd = 0; colEnd < row.cells.length; colEnd++){\r\n\t\t\t\t\t\tlet cell = row.cells[colEnd];\r\n\t\t\t\t\t\trowEl.appendChild(cell.getElement());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcell.column.reinitializeWidth();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\trowEl.parentNode.removeChild(rowEl);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.rerenderColumns(false, true);\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 visibleRows = this.getVisibleRows(),\r\n\t\totherRows = this.table.rowManager.getRows().filter(row => !visibleRows.includes(row));\r\n\r\n\t\tvisibleRows.forEach((row) => {\r\n\t\t\tthis.reinitializeRow(row, true);\r\n\t\t});\r\n\r\n\t\totherRows.forEach((row) =>{\r\n\t\t\trow.deinitialize();\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\t\t\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\t\t\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\r\n\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().insertBefore(cell.getElement(), row.getCell(this.columns[this.rightCol]).getElement().nextSibling);\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\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\trow.modules.vdomHoz.rightCol = this.rightCol;\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(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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\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().insertBefore(cell.getElement(), row.getCell(this.columns[this.leftCol]).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\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\trow.modules.vdomHoz.leftCol = this.leftCol;\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(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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\t\t\r\n\t\twhile(working){\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\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\trow.modules.vdomHoz.rightCol = this.rightCol;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\tworking = true;\r\n\r\n\t\twhile(working){\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\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\trow.modules.vdomHoz.leftCol = this.leftCol;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\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\r\n\t\t\tif(this.table.modules.frozenColumns){\r\n\t\t\t\tthis.table.modules.frozenColumns.leftColumns.forEach((column) => {\r\n\t\t\t\t\tthis.appendCell(row, column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfor(let i = this.leftCol; i <= this.rightCol; i++){\r\n\t\t\t\tthis.appendCell(row, this.columns[i]);\r\n\t\t\t}\r\n\r\n\t\t\tif(this.table.modules.frozenColumns){\r\n\t\t\t\tthis.table.modules.frozenColumns.rightColumns.forEach((column) => {\r\n\t\t\t\t\tthis.appendCell(row, column);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tappendCell(row, column){\r\n\t\tif(column && column.visible){\r\n\t\t\tlet cell = row.getCell(column);\r\n\t\t\t\r\n\t\t\trow.getElement().appendChild(cell.getElement());\r\n\t\t\tcell.cellRendered();\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\t\r\n\t\t\t\tvar rowEl = row.getElement();\r\n\t\t\t\twhile(rowEl.firstChild) rowEl.removeChild(rowEl.firstChild);\r\n\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\t\r\n\tconstructor (table){\r\n\t\tsuper(table);\r\n\t\t\r\n\t\tthis.blockHozScrollEvent = false;\r\n\t\tthis.headersElement = null;\r\n\t\tthis.contentsElement = 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\t\t\r\n\t\tthis.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing\r\n\t\tthis.redrawBlockUpdate = null; //store latest redraw update only status\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\tinitialize(){\r\n\t\tthis.initializeRenderer();\r\n\t\t\r\n\t\tthis.headersElement = this.createHeadersElement();\r\n\t\tthis.contentsElement = this.createHeaderContentsElement();\r\n\t\tthis.element = this.createHeaderElement();\r\n\t\t\r\n\t\tthis.contentsElement.insertBefore(this.headersElement, this.contentsElement.firstChild);\r\n\t\tthis.element.insertBefore(this.contentsElement, this.element.firstChild);\r\n\t\t\r\n\t\tthis.subscribe(\"scroll-horizontal\", this.scrollHorizontal.bind(this));\r\n\t\tthis.subscribe(\"scrollbar-vertical\", this.padVerticalScrollbar.bind(this));\r\n\t}\r\n\r\n\tpadVerticalScrollbar(width){\r\n\t\tif(this.table.rtl){\r\n\t\t\tthis.headersElement.style.marginLeft = width + \"px\";\r\n\t\t}else{\r\n\t\t\tthis.headersElement.style.marginRight = width + \"px\";\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\": RendererVirtualDomHorizontal,\r\n\t\t\t\"basic\": RendererBasicHorizontal,\r\n\t\t};\r\n\t\t\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\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}else{\r\n\t\t\tconsole.error(\"Unable to find matching renderer:\", this.table.options.renderHorizontal);\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tcreateHeadersElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-headers\");\r\n\t\tel.setAttribute(\"role\", \"row\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\r\n\tcreateHeaderContentsElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-header-contents\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\treturn el;\r\n\t}\r\n\t\r\n\tcreateHeaderElement (){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\t\r\n\t\tel.classList.add(\"tabulator-header\");\r\n\t\tel.setAttribute(\"role\", \"rowgroup\");\r\n\t\t\r\n\t\tif(!this.table.options.headerVisible){\r\n\t\t\tel.classList.add(\"tabulator-header-hidden\");\r\n\t\t}\r\n\t\t\r\n\t\treturn el;\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\r\n\t//return containing contents element\r\n\tgetContentsElement(){\r\n\t\treturn this.contentsElement;\r\n\t}\r\n\t\r\n\t\r\n\t//return header containing element\r\n\tgetHeadersElement(){\r\n\t\treturn this.headersElement;\r\n\t}\r\n\t\r\n\t//scroll horizontally to match table body\r\n\tscrollHorizontal(left){\r\n\t\tthis.contentsElement.scrollLeft = left;\r\n\r\n\t\tthis.scrollLeft = left;\r\n\t\t\r\n\t\tthis.renderer.scrollColumns(left);\r\n\t}\r\n\t\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\t\t\r\n\t\tif(data && data.length){\r\n\t\t\t\r\n\t\t\trow = data[0];\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tlet value = row[key];\r\n\t\t\t\t\r\n\t\t\t\tswitch(typeof value){\r\n\t\t\t\t\tcase \"undefined\":\r\n\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\tsorter = \"boolean\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tif(Array.isArray(value)){\r\n\t\t\t\t\t\t\tsorter = \"array\";\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\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!isNaN(value) && value !== \"\"){\r\n\t\t\t\t\t\t\tsorter = \"number\";\r\n\t\t\t\t\t\t}else{\r\n\t\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\t\tsorter = \"alphanum\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tsorter = \"string\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcol.sorter = sorter;\r\n\t\t\t\t\r\n\t\t\t\tcols.push(col);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(definitions){\r\n\t\t\t\t\r\n\t\t\t\tswitch(typeof definitions){\r\n\t\t\t\t\tcase \"function\":\r\n\t\t\t\t\t\tthis.table.options.columns = definitions.call(this.table, cols);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"object\":\r\n\t\t\t\t\t\tif(Array.isArray(definitions)){\r\n\t\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\t\tvar match = definitions.find((def) => {\r\n\t\t\t\t\t\t\t\t\treturn def.field === col.field;\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(match){\r\n\t\t\t\t\t\t\t\t\tObject.assign(col, 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\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tcols.forEach((col) => {\r\n\t\t\t\t\t\t\t\tif(definitions[col.field]){\r\n\t\t\t\t\t\t\t\t\tObject.assign(col, definitions[col.field]);\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\t\r\n\t\t\t\t\t\tthis.table.options.columns = cols;\r\n\t\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\t\t\t\r\n\t\t\tthis.setColumns(this.table.options.columns);\r\n\t\t}\r\n\t}\r\n\t\r\n\tsetColumns(cols, row){\r\n\t\twhile(this.headersElement.firstChild) this.headersElement.removeChild(this.headersElement.firstChild);\r\n\t\t\r\n\t\tthis.columns = [];\r\n\t\tthis.columnsByIndex = [];\r\n\t\tthis.columnsByField = {};\r\n\t\t\r\n\t\tthis.dispatch(\"columns-loading\");\r\n\t\t\r\n\t\tcols.forEach((def, i) => {\r\n\t\t\tthis._addColumn(def);\r\n\t\t});\r\n\t\t\r\n\t\tthis._reIndexColumns();\r\n\t\t\r\n\t\tthis.dispatch(\"columns-loaded\");\r\n\t\t\r\n\t\tthis.rerenderColumns(false, true);\r\n\t\t\r\n\t\tthis.redraw(true);\r\n\t}\r\n\t\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\t\t\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\t\t\t\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\t\t\r\n\t\tcolumn.columnRendered();\r\n\t\t\r\n\t\treturn column;\r\n\t}\r\n\t\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\t\r\n\tregisterColumnPosition(col){\r\n\t\tthis.columnsByIndex.push(col);\r\n\t}\r\n\t\r\n\t_reIndexColumns(){\r\n\t\tthis.columnsByIndex = [];\r\n\t\t\r\n\t\tthis.columns.forEach(function(column){\r\n\t\t\tcolumn.reRegisterPosition();\r\n\t\t});\r\n\t}\r\n\t\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\t\t\r\n\t\tif(!this.redrawBlock){\r\n\r\n\t\t\tthis.headersElement.style.height=\"\";\r\n\t\t\t\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumn.clearVerticalAlign();\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tvar height = column.getHeight();\r\n\t\t\t\t\r\n\t\t\t\tif(height > minHeight){\r\n\t\t\t\t\tminHeight = height;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.headersElement.style.height = minHeight + \"px\";\r\n\r\n\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\tcolumn.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.adjustTableSize();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//////////////// Column Details /////////////////\r\n\tfindColumn(subject){\r\n\t\tvar columns;\r\n\r\n\t\tif(typeof subject == \"object\"){\r\n\t\t\t\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\r\n\t\t\t\tcolumns = [];\r\n\r\n\t\t\t\tthis.columns.forEach((column) => {\r\n\t\t\t\t\tcolumns.push(column);\r\n\t\t\t\t\tcolumns = columns.concat(column.getColumns(true));\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//subject is a HTML element of the column header\r\n\t\t\t\tlet match = columns.find((column) => {\r\n\t\t\t\t\treturn column.element === 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\t\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\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\tgetColumnByField(field){\r\n\t\treturn this.columnsByField[field];\r\n\t}\r\n\t\r\n\tgetColumnsByFieldRoot(root){\r\n\t\tvar matches = [];\r\n\t\t\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\t\t\r\n\t\treturn matches;\r\n\t}\r\n\t\r\n\tgetColumnByIndex(index){\r\n\t\treturn this.columnsByIndex[index];\r\n\t}\r\n\t\r\n\tgetFirstVisibleColumn(){\r\n\t\tvar index = this.columnsByIndex.findIndex((col) => {\r\n\t\t\treturn col.visible;\r\n\t\t});\r\n\t\t\r\n\t\treturn index > -1 ? this.columnsByIndex[index] : false;\r\n\t}\r\n\t\r\n\tgetColumns(){\r\n\t\treturn this.columns;\r\n\t}\r\n\t\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\t\r\n\t//return all columns that are not groups\r\n\tgetRealColumns(){\r\n\t\treturn this.columnsByIndex;\r\n\t}\r\n\t\r\n\t//traverse 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\t\r\n\t//get definitions of actual columns\r\n\tgetDefinitions(active){\r\n\t\tvar output = [];\r\n\t\t\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\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\t//get full nested definition tree\r\n\tgetDefinitionTree(){\r\n\t\tvar output = [];\r\n\t\t\r\n\t\tthis.columns.forEach((column) => {\r\n\t\t\toutput.push(column.getDefinition(true));\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetComponents(structured){\r\n\t\tvar output = [],\r\n\t\tcolumns = structured ? this.columns : this.columnsByIndex;\r\n\t\t\r\n\t\tcolumns.forEach((column) => {\r\n\t\t\toutput.push(column.getComponent());\r\n\t\t});\r\n\t\t\r\n\t\treturn output;\r\n\t}\r\n\t\r\n\tgetWidth(){\r\n\t\tvar width = 0;\r\n\t\t\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\t\t\r\n\t\treturn width;\r\n\t}\r\n\t\r\n\tmoveColumn(from, to, after){\r\n\t\tto.element.parentNode.insertBefore(from.element, to.element);\r\n\t\t\r\n\t\tif(after){\r\n\t\t\tto.element.parentNode.insertBefore(to.element, from.element);\r\n\t\t}\r\n\t\t\r\n\t\tthis.moveColumnActual(from, to, after);\r\n\r\n\t\tthis.verticalAlignHeaders();\r\n\t\t\r\n\t\tthis.table.rowManager.reinitialize();\r\n\t}\r\n\t\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\t\t\r\n\t\tthis._moveColumnInArray(this.columnsByIndex, from, to, after, true);\r\n\t\t\r\n\t\tthis.rerenderColumns(true);\r\n\t\t\r\n\t\tthis.dispatch(\"column-moved\", from, to, after);\r\n\t\t\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\t\r\n\t_moveColumnInArray(columns, from, to, after, updateRows){\r\n\t\tvar\tfromIndex = columns.indexOf(from),\r\n\t\ttoIndex, rows = [];\r\n\t\t\r\n\t\tif (fromIndex > -1) {\r\n\t\t\t\r\n\t\t\tcolumns.splice(fromIndex, 1);\r\n\t\t\t\r\n\t\t\ttoIndex = columns.indexOf(to);\r\n\t\t\t\r\n\t\t\tif (toIndex > -1) {\r\n\t\t\t\t\r\n\t\t\t\tif(after){\r\n\t\t\t\t\ttoIndex = toIndex+1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\ttoIndex = fromIndex;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcolumns.splice(toIndex, 0, from);\r\n\t\t\t\r\n\t\t\tif(updateRows){\r\n\t\t\t\t\r\n\t\t\t\trows = this.chain(\"column-moving-rows\", [from, to, after], null, []) || [];\r\n\t\t\t\t\r\n\t\t\t\trows = rows.concat(this.table.rowManager.rows);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\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\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\t\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\t\t\t\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\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\t\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\t\tadjust = -this.element.clientWidth / 2;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"right\":\r\n\t\t\t\t\t\tadjust = colEl.clientWidth - this.headersElement.clientWidth;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//check column visibility\r\n\t\t\t\tif(!ifVisible){\r\n\t\t\t\t\t\r\n\t\t\t\t\toffset = colEl.offsetLeft;\r\n\t\t\t\t\t\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\t\t\t\t\r\n\t\t\t\t//calculate scroll position\r\n\t\t\t\tleft = colEl.offsetLeft + adjust;\r\n\t\t\t\t\r\n\t\t\t\tleft = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);\r\n\t\t\t\t\r\n\t\t\t\tthis.table.rowManager.scrollHorizontal(left);\r\n\t\t\t\tthis.scrollHorizontal(left);\r\n\t\t\t\t\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\t\t\t\r\n\t\t});\r\n\t}\r\n\t\r\n\t//////////////// Cell Management /////////////////\r\n\tgenerateCells(row){\r\n\t\tvar cells = [];\r\n\t\t\r\n\t\tthis.columnsByIndex.forEach((column) => {\r\n\t\t\tcells.push(column.generateCell(row));\r\n\t\t});\r\n\t\t\r\n\t\treturn cells;\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\tthis.columnsByIndex.forEach(function(column){\r\n\t\t\tvar width, minWidth, colWidth;\r\n\t\t\t\r\n\t\t\tif(column.visible){\r\n\t\t\t\t\r\n\t\t\t\twidth = column.definition.width || 0;\r\n\t\t\t\t\r\n\t\t\t\tminWidth = parseInt(column.minWidth);\r\n\t\t\t\t\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\t\t\t\t\r\n\t\t\t\tfixedWidth += colWidth > minWidth ? colWidth : minWidth;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn fixedWidth;\r\n\t}\r\n\t\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\t\t\t\r\n\t\t\tthis._reIndexColumns();\r\n\t\t\t\r\n\t\t\tthis.dispatch(\"column-add\", definition, before, nextToColumn);\r\n\t\t\t\r\n\t\t\tif(this.layoutMode() != \"fitColumns\"){\r\n\t\t\t\tcolumn.reinitializeWidth();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.redraw(true);\r\n\t\t\t\r\n\t\t\tthis.table.rowManager.reinitialize();\r\n\t\t\t\r\n\t\t\tthis.rerenderColumns();\r\n\t\t\t\r\n\t\t\tresolve(column);\r\n\t\t});\r\n\t}\r\n\t\r\n\t//remove column from system\r\n\tderegisterColumn(column){\r\n\t\tvar field = column.getField(),\r\n\t\tindex;\r\n\t\t\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\t\t\r\n\t\t//remove from index list\r\n\t\tindex = this.columnsByIndex.indexOf(column);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.columnsByIndex.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\t//remove from column list\r\n\t\tindex = this.columns.indexOf(column);\r\n\t\t\r\n\t\tif(index > -1){\r\n\t\t\tthis.columns.splice(index, 1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.verticalAlignHeaders();\r\n\t\t\r\n\t\tthis.redraw();\r\n\t}\r\n\t\r\n\trerenderColumns(update, silent){\r\n\t\tif(!this.redrawBlock){\r\n\t\t\tthis.renderer.rerenderColumns(update, silent);\r\n\t\t}else{\r\n\t\t\tif(update === false || (update === true && this.redrawBlockUpdate === null)){\r\n\t\t\t\tthis.redrawBlockUpdate = update;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tblockRedraw(){\r\n\t\tthis.redrawBlock = true;\r\n\t\tthis.redrawBlockUpdate = null;\r\n\t}\r\n\t\r\n\trestoreRedraw(){\r\n\t\tthis.redrawBlock = false;\r\n\t\tthis.verticalAlignHeaders();\r\n\t\tthis.renderer.rerenderColumns(this.redrawBlockUpdate);\r\n\t\t\r\n\t}\r\n\t\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\t\t\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\t\t\r\n\t\tif(!this.confirm(\"table-redrawing\", force)){\r\n\t\t\tthis.layoutRefresh(force);\r\n\t\t}\r\n\t\t\r\n\t\tthis.dispatch(\"table-redraw\", force);\r\n\t\t\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 BasicVertical 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 position 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\tif(this.rows().length){\r\n\t\t\tthis._virtualRenderFill((topRow === false ? this.rows.length - 1 : topRow), true, topOffset || 0);\r\n\t\t}else{\r\n\t\t\tthis.clear();\r\n\t\t\tthis.table.rowManager._showPlaceholder();\r\n\t\t}\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 row height 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\t\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t\t}\r\n\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\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\t\t\tlet row = rows[this.vDomTop],\r\n\t\t\trowHeight;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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\t\tworking = true;\r\n\r\n\t\twhile(working){\r\n\t\t\tlet row = rows[this.vDomBottom],\r\n\t\t\trowHeight;\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\tworking = false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tworking = false;\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.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\r\n\t\tthis.scrollbarWidth = 0;\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\t// el.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\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\t\t\t\t\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}else if(subject === null){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else if(typeof subject == \"undefined\"){\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){\r\n\t\treturn this.getDisplayRows().find((row) => {\r\n\t\t\treturn row.getPosition() === position && row.isDisplayed();\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.regenerateRowPositions();\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 rows = [];\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\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.regenerateRowPositions();\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.regenerateRowPositions();\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\t\r\n\t\tif(!this.table.destroyed){\r\n\t\t\tif(typeof handler === \"function\"){\r\n\t\t\t\tindex = this.dataPipeline.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 = \"dataPipeline\";\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.dataPipeline.length - 1){\r\n\t\t\t\t\t\t\tstage = \"display\";\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\tindex = this.displayPipeline.findIndex((item) => {\r\n\t\t\t\t\t\treturn item.handler === handler;\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(index > -1){\r\n\t\t\t\t\t\tstage = \"displayPipeline\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(skipStage){\r\n\t\t\t\t\t\t\tif(index == this.displayPipeline.length - 1){\r\n\t\t\t\t\t\t\t\tstage = \"end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tindex++;\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.error(\"Unable to refresh data, invalid handler provided\", handler);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tstage = handler || \"all\";\r\n\t\t\t\tindex = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.redrawBlock){\r\n\t\t\t\tif(!this.redrawBlockRestoreConfig || (this.redrawBlockRestoreConfig && ((this.redrawBlockRestoreConfig.stage === stage && index < this.redrawBlockRestoreConfig.index) || (cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage))))){\r\n\t\t\t\t\tthis.redrawBlockRestoreConfig = {\r\n\t\t\t\t\t\thandler: handler,\r\n\t\t\t\t\t\tskipStage: skipStage,\r\n\t\t\t\t\t\trenderInPosition: renderInPosition,\r\n\t\t\t\t\t\tstage:stage,\r\n\t\t\t\t\t\tindex:index,\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t}else{\r\n\t\t\t\tif(Helpers.elVisible(this.element)){\r\n\t\t\t\t\tif(renderInPosition){\r\n\t\t\t\t\t\tthis.reRenderInPosition(this.refreshPipelines.bind(this, handler, stage, index, renderInPosition));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!handler){\r\n\t\t\t\t\t\t\tthis.table.columnManager.renderer.renderColumns();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.renderTable();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(table.options.layoutColumnsOnNewData){\r\n\t\t\t\t\t\t\tthis.table.columnManager.redraw(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\tthis.refreshPipelines(handler, stage, index, renderInPosition);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.dispatch(\"data-refreshed\");\r\n\t\t\t}\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 all data needs refreshing\r\n\t\t\t\r\n\t\t\tcase \"dataPipeline\":\r\n\t\t\t\r\n\t\t\t\tfor(let i = index; i < this.dataPipeline.length; i++){\r\n\t\t\t\t\tlet result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.activeRowsPipeline[i + 1] = result || this.activeRowsPipeline[i].slice(0);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);\r\n\t\t\t\t\r\n\t\t\tcase \"display\":\r\n\t\t\t\tindex = 0;\r\n\t\t\t\tthis.resetDisplayRows();\r\n\t\t\t\t\r\n\t\t\tcase \"displayPipeline\":\r\n\t\t\t\tfor(let i = index; i < this.displayPipeline.length; i++){\r\n\t\t\t\t\tlet result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);\r\n\r\n\t\t\t\t\tthis.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"end\":\r\n\t\t\t\t//case to handle scenario when trying to skip past end stage\r\n\t\t\t\tthis.regenerateRowPositions();\r\n\t\t}\r\n\r\n\t\tif(this.getDisplayRows().length){\r\n\t\t\tthis._clearPlaceholder();\r\n\t\t}\r\n\t}\r\n\t\r\n\t//regenerate row positions\r\n\tregenerateRowPositions(){\r\n\t\tvar rows = this.getDisplayRows();\r\n\t\tvar index = 1;\r\n\t\t\r\n\t\trows.forEach((row) => {\r\n\t\t\tif (row.type === \"row\"){\r\n\t\t\t\trow.setPosition(index);\r\n\t\t\t\tindex++;\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\t//set display row pipeline data\r\n\tsetDisplayRows(displayRows, index){\r\n\t\tthis.displayRows[index] = displayRows;\r\n\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}\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 across 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\r\n\t\tif(!type || type === true){\r\n\t\t\trows = this.chain(\"rows-retrieve\", type, null, this.rows) || this.rows;\r\n\t\t}else{\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase \"active\":\r\n\t\t\t\t\trows = this.activeRows;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"display\":\r\n\t\t\t\t\trows = this.table.rowManager.getDisplayRows();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"visible\":\r\n\t\t\t\t\trows = this.getVisibleRows(false, true);\r\n\t\t\t\t\tbreak;\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\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.dispatchExternal(\"renderStarted\");\r\n\t\t\t\r\n\t\t\tthis.renderer.rerenderRows(callback);\r\n\r\n\t\t\tif(!this.fixedHeight){\r\n\t\t\t\tthis.adjustTableSize();\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollBarCheck();\r\n\t\t\t\r\n\t\t\tthis.dispatchExternal(\"renderComplete\");\r\n\t\t}\r\n\t}\r\n\r\n\tscrollBarCheck(){\r\n\t\tvar scrollbarWidth = 0;\r\n\r\n\t\t//adjust for vertical scrollbar moving table when present\r\n\t\tif(this.element.scrollHeight > this.element.clientHeight){\r\n\t\t\tscrollbarWidth = this.element.offsetWidth - this.element.clientWidth;\r\n\t\t}\r\n\r\n\t\tif(scrollbarWidth !== this.scrollbarWidth){\r\n\t\t\tthis.scrollbarWidth = scrollbarWidth;\r\n\t\t\tthis.dispatch(\"scrollbar-vertical\", scrollbarWidth);\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.renderMode = this.table.options.renderVertical;\r\n\t\t\t\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:\", this.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(true);\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\r\n\t\tthis.scrollBarCheck();\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(){\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\r\n\t\t// clear empty table placeholder min\r\n\t\tthis.tableElement.style.minWidth = \"\";\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, minHeight;\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\tminHeight = isNaN(this.table.options.minHeight) ? this.table.options.minHeight : this.table.options.minHeight + \"px\";\r\n\t\t\t\t\r\n\t\t\t\tthis.element.style.minHeight = 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\r\n\t\t\tthis.scrollBarCheck();\r\n\t\t}\r\n\t\t\r\n\t\tthis._positionPlaceholder();\r\n\t}\r\n\t\r\n\t//reinitialize 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 left = 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}\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\t\tif(this.table.options.footerElement[0] === \"<\"){\r\n\t\t\t\t\t\tthis.containerElement.innerHTML = this.table.options.footerElement;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.external = true;\r\n\t\t\t\t\t\tthis.containerElement = document.querySelector(this.table.options.footerElement);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthis.element = this.table.options.footerElement;\r\n\t\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){\r\n\t\tthis.activate();\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){\r\n\t\tthis.activate();\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(){\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\t}\r\n\r\n\tredraw(){\r\n\t\tthis.dispatch(\"footer-redraw\");\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.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\"mouseup\",\r\n\t\t\t\"mousedown\",\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, this.pseudoTrackers[key].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\tif(!targets[this.componentMap[target]]){\r\n\t\t\t\t\ttargets[this.componentMap[target]] = el;\r\n\t\t\t\t}\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\tmatches = {},\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\ttarget = targets[key],\r\n\t\t\tpreviousTarget = 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\t\tif(listener.components.includes(\"row\") || listener.components.includes(\"cell\") || listener.components.includes(\"group\")){\r\n\t\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\t\tcomponent = rows.find((row) => {\r\n\t\t\t\t\t\t\t\treturn row.getElement() === target;\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\tif(targets[\"row\"] && targets[\"row\"].parentNode && targets[\"row\"].parentNode.closest(\".tabulator-row\")){\r\n\t\t\t\t\t\t\t\ttargets[key] = 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\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"column\":\r\n\t\t\t\t\t\tif(listener.components.includes(\"column\")){\r\n\t\t\t\t\t\t\tcomponent = this.table.columnManager.findColumn(target);\r\n\t\t\t\t\t\t}\r\n\t\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\t\tif(listener.components.includes(\"cell\")){\r\n\t\t\t\t\t\t\tif(matches[\"row\"] instanceof Row){\r\n\t\t\t\t\t\t\t\tcomponent = matches[\"row\"].findCell(target);\r\n\t\t\t\t\t\t\t}else{\t\r\n\t\t\t\t\t\t\t\tif(targets[\"row\"]){\r\n\t\t\t\t\t\t\t\t\tconsole.warn(\"Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?\");\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\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\tmatches[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 matches;\r\n\t}\r\n\t\r\n\ttriggerEvents(type, e, targets){\r\n\t\tvar listener = this.listeners[type];\r\n\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\tif(this.table.options.debugInvalidComponentFuncs){\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\t}\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.requestOrder = 0; //prevent requests coming 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\r\n\tload(data, params, config, replace, silent, columnsChanged){\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.alertLoader();\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.clearAlert();\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, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\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.alertError();\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.clearAlert();\r\n\t\t\t\t}, this.table.options.dataLoaderErrorTimeout);\r\n\t\t\t})\r\n\t\t\t\t.finally(() => {\r\n\t\t\t\t\tthis.loading = false;\r\n\t\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, typeof columnsChanged === \"undefined\" ? !replace : columnsChanged);\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\talertLoader(){\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.table.alertManager.alert(this.table.options.dataLoaderLoading || this.langText(\"data|loading\"));\r\n\t\t}\r\n\t}\r\n\r\n\talertError(){\r\n\t\tthis.table.alertManager.alert(this.table.options.dataLoaderError || this.langText(\"data|error\"), \"error\");\r\n\t}\r\n\r\n\tclearAlert(){\r\n\t\tthis.table.alertManager.clear();\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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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_notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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._notifySubscriptionChange(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_notifySubscriptionChange(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\tsubscriber.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 CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class DeprecationAdvisor extends CoreFeature{\r\n\t\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n\t}\r\n\t\r\n\t_warnUser(){\r\n\t\tif(this.options(\"debugDeprecation\")){\r\n\t\t\tconsole.warn(...arguments);\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheck(oldOption, newOption){\r\n\t\tvar msg = \"\";\r\n\t\t\r\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\r\n\t\t\tmsg = \"Deprecated Setup Option - Use of the %c\" + oldOption + \"%c option is now deprecated\";\r\n\t\t\t\r\n\t\t\tif(newOption){\r\n\t\t\t\tmsg = msg + \", Please use the %c\" + newOption + \"%c option instead\";\r\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t}else{\r\n\t\t\t\tthis._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcheckMsg(oldOption, msg){\r\n\t\tif(typeof this.options(oldOption) !== \"undefined\"){\r\n\t\t\tthis._warnUser(\"%cDeprecated Setup Option - Use of the %c\" + oldOption + \" %c option is now deprecated, \" + msg, 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n\tmsg(msg){\r\n\t\tthis._warnUser(msg);\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 and stretch row to fill table, also used for fitDataTable\r\nexport default function(columns, forced){\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, forced){\r\n\tif(forced){\r\n\t\tthis.table.columnManager.renderer.reinitializeColumnWidths(columns);\r\n\t}\r\n\t\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, forced){\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, forced){\r\n\tvar totalWidth = this.table.rowManager.element.getBoundingClientRect().width; //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 across 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 across 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\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 = 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\tgapFill = 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//calculate 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(gapFill && 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(dataChanged){\r\n\t\tthis.dispatch(\"layout-refreshing\");\r\n\t\tLayout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex, dataChanged);\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 placeholder\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 language 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//determining 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 fillPath = value ? path + \"|\" + value : path,\r\n\t\tpathArray = fillPath.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//iterate 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\t\r\n\tconstructor(tabulator, modules){\r\n\t\tthis.bindStaticFunctionality(tabulator);\r\n\t\tthis.bindModules(tabulator, coreModules, true);\r\n\t\t\r\n\t\tif(modules){\r\n\t\t\tthis.bindModules(tabulator, modules);\r\n\t\t}\r\n\t}\r\n\t\r\n\tbindStaticFunctionality(tabulator){\r\n\t\ttabulator.moduleBindings = {};\r\n\t\t\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\t\t\t\t\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\t\t\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\t\t\t\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\t\t\r\n\t\ttabulator.registerModuleBinding = function(mod){\r\n\t\t\ttabulator.moduleBindings[mod.moduleName] = mod;\r\n\t\t};\r\n\t\t\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\t\t\r\n\t\t//ensure that module are bound to instantiated function\r\n\t\ttabulator.prototype.bindModules = function(){\r\n\t\t\tvar orderedStartMods = [],\r\n\t\t\torderedEndMods = [],\r\n\t\t\tunOrderedMods = [];\r\n\t\t\t\r\n\t\t\tthis.modules = {};\r\n\t\t\t\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\t\t\t\t\r\n\t\t\t\tthis.modules[name] = module;\r\n\t\t\t\t\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\tif(mod.moduleInitOrder < 0){\r\n\t\t\t\t\t\t\torderedStartMods.push(module);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\torderedEndMods.push(module);\r\n\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\tunOrderedMods.push(module);\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\torderedStartMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\t\t\torderedEndMods.sort((a, b) => a.moduleInitOrder > b.moduleInitOrder ? 1 : -1);\r\n\t\t\t\r\n\t\t\tthis.modulesRegular = orderedStartMods.concat(unOrderedMods.concat(orderedEndMods));\r\n\t\t};\r\n\t}\r\n\t\r\n\tbindModules(tabulator, modules, core){\r\n\t\tvar mods = Object.values(modules);\r\n\t\t\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\t\t\r\n\t\ttabulator.registerModule(mods);\r\n\t}\r\n}","import CoreFeature from '../CoreFeature.js';\r\n\r\nexport default class Alert extends CoreFeature{\r\n\tconstructor(table){\r\n\t\tsuper(table);\r\n \r\n\t\tthis.element = this._createAlertElement();\r\n\t\tthis.msgElement = this._createMsgElement();\r\n\t\tthis.type = null;\r\n \r\n\t\tthis.element.appendChild(this.msgElement);\r\n\t}\r\n \r\n\t_createAlertElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-alert\");\r\n\t\treturn el;\r\n\t}\r\n \r\n\t_createMsgElement(){\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.classList.add(\"tabulator-alert-msg\");\r\n\t\tel.setAttribute(\"role\", \"alert\");\r\n\t\treturn el;\r\n\t}\r\n \r\n\t_typeClass(){\r\n\t\treturn \"tabulator-alert-state-\" + this.type;\r\n\t}\r\n \r\n\talert(content, type = \"msg\"){\r\n\t\tif(content){\r\n\t\t\tthis.clear();\r\n \r\n\t\t\tthis.type = type;\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.add(this._typeClass());\r\n \r\n\t\t\tif(typeof content === \"function\"){\r\n\t\t\t\tcontent = content();\r\n\t\t\t}\r\n \r\n\t\t\tif(content instanceof HTMLElement){\r\n\t\t\t\tthis.msgElement.appendChild(content);\r\n\t\t\t}else{\r\n\t\t\t\tthis.msgElement.innerHTML = content;\r\n\t\t\t}\r\n \r\n\t\t\tthis.table.element.appendChild(this.element);\r\n\t\t}\r\n\t}\r\n \r\n\tclear(){\r\n\t\tif(this.element.parentNode){\r\n\t\t\tthis.element.parentNode.removeChild(this.element);\r\n\t\t}\r\n \r\n\t\tthis.msgElement.classList.remove(this._typeClass());\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 DeprecationAdvisor from './tools/DeprecationAdvisor.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\nimport Alert from './tools/Alert.js';\r\n\r\nclass Tabulator {\r\n\t\r\n\tconstructor(element, options){\r\n\t\t\r\n\t\tthis.options = {};\r\n\t\t\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.alertManager = null; //hold Alert 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\t\t\r\n\t\tthis.componentFunctionBinder = new ComponentFunctionBinder(this); //bind component functions\r\n\t\tthis.dataLoader = false; //bind component functions\r\n\t\t\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\t\t\r\n\t\tthis.deprecationAdvisor = new DeprecationAdvisor(this);\r\n\t\tthis.optionsList = new OptionsList(this, \"table constructor\");\r\n\t\t\r\n\t\tthis.initialized = false;\r\n\t\tthis.destroyed = false;\r\n\t\t\r\n\t\tif(this.initializeElement(element)){\r\n\t\t\t\r\n\t\t\tthis.initializeCoreSystems(options);\r\n\t\t\t\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\t\t\r\n\t\tTableRegistry.register(this); //register table for inter-device communication\r\n\t}\r\n\t\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\t\t\t\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\t\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\t\tthis.alertManager = new Alert(this);\r\n\t\t\r\n\t\tthis.bindModules();\r\n\t\t\r\n\t\tthis.options = this.optionsList.generate(Tabulator.defaultOptions, options);\r\n\t\t\r\n\t\tthis._clearObjectPointers();\r\n\t\t\r\n\t\tthis._mapDeprecatedFunctionality();\r\n\t\t\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\t\t\r\n\t\tthis.interactionMonitor = new InteractionMonitor(this);\r\n\t\t\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\t\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\t\r\n\t_clearSelection(){\r\n\t\t\r\n\t\tthis.element.classList.add(\"tabulator-block-select\");\r\n\t\t\r\n\t\tif (window.getSelection) {\r\n\t\t\tif (window.getSelection().empty) { // Chrome\r\n\t\t\t\twindow.getSelection().empty();\r\n\t\t\t} else if (window.getSelection().removeAllRanges) { // Firefox\r\n\t\t\t\twindow.getSelection().removeAllRanges();\r\n\t\t\t}\r\n\t\t} else if (document.selection) { // IE?\r\n\t\t\tdocument.selection.empty();\r\n\t\t}\r\n\t\t\r\n\t\tthis.element.classList.remove(\"tabulator-block-select\");\r\n\t}\r\n\t\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\t\t\r\n\t\tthis._rtlCheck();\r\n\t\t\r\n\t\tthis._buildElement();\r\n\t\t\r\n\t\tthis._initializeTable();\r\n\t\t\r\n\t\tthis._loadInitialData();\r\n\t\t\r\n\t\tthis.initialized = true;\r\n\t\t\r\n\t\tthis.externalEvents.dispatch(\"tableBuilt\");\r\n\t}\r\n\t\r\n\t_rtlCheck(){\r\n\t\tvar style = window.getComputedStyle(this.element);\r\n\t\t\r\n\t\tswitch(this.options.textDirection){\r\n\t\t\tcase\"auto\":\r\n\t\t\t\tif(style.direction !== \"rtl\"){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\tcase \"rtl\":\r\n\t\t\t\tthis.element.classList.add(\"tabulator-rtl\");\r\n\t\t\t\tthis.rtl = true;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"ltr\":\r\n\t\t\t\tthis.element.classList.add(\"tabulator-ltr\");\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tthis.rtl = false;\r\n\t\t}\r\n\t}\r\n\t\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\t\t\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\t\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\t\t\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\t\t\t\r\n\t\t\t//transfer attributes to new element\r\n\t\t\tvar attributes = element.attributes;\r\n\t\t\t\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\t\t\t\r\n\t\t\t// replace table with div element\r\n\t\t\telement.parentNode.replaceChild(newElement, element);\r\n\t\t\t\r\n\t\t\tthis.element = element = newElement;\r\n\t\t}\r\n\t\t\r\n\t\telement.classList.add(\"tabulator\");\r\n\t\telement.setAttribute(\"role\", \"grid\");\r\n\t\t\r\n\t\t//empty element\r\n\t\twhile(element.firstChild) element.removeChild(element.firstChild);\r\n\t\t\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\t\t\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\t\t\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\t\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\t\t\r\n\t\tthis.interactionMonitor.initialize();\r\n\t\t\r\n\t\tthis.columnManager.initialize();\r\n\t\tthis.rowManager.initialize();\r\n\t\t\r\n\t\tthis._detectBrowser();\r\n\t\t\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\t\t\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\t\t\r\n\t\tif(options.footerElement){\r\n\t\t\tthis.footerManager.activate();\r\n\t\t}\r\n\t\t\r\n\t\tif(options.autoColumns && options.data){\r\n\t\t\t\r\n\t\t\tthis.columnManager.generateColumnsFromRowData(this.options.data);\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\tthis.columnManager.setColumns(options.columns);\r\n\t\t\r\n\t\tthis.eventBus.dispatch(\"table-built\");\r\n\t}\r\n\t\r\n\t_loadInitialData(){\r\n\t\tthis.dataLoader.load(this.options.data);\r\n\t}\r\n\t\r\n\t//deconstructor\r\n\tdestroy(){\r\n\t\tvar element = this.element;\r\n\t\t\r\n\t\tthis.destroyed = true;\r\n\t\t\r\n\t\tTableRegistry.deregister(this); //deregister table from inter-device communication\r\n\t\t\r\n\t\tthis.eventBus.dispatch(\"table-destroy\");\r\n\t\t\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\t\t\r\n\t\tthis.rowManager.rows = [];\r\n\t\tthis.rowManager.activeRows = [];\r\n\t\tthis.rowManager.displayRows = [];\r\n\t\t\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\r\n\t\tthis.externalEvents.dispatch(\"tableDestroyed\");\r\n\t}\r\n\t\r\n\t_detectBrowser(){\r\n\t\tvar ua = navigator.userAgent||navigator.vendor||window.opera;\r\n\t\t\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\t\t\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\t\r\n\tinitGuard(func, msg){\r\n\t\tvar stack, line;\r\n\t\t\r\n\t\tif(this.options.debugInitialization && !this.initialized){\r\n\t\t\tif(!func){\r\n\t\t\t\tstack = new Error().stack.split(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tline = stack[0] == \"Error\" ? stack[2] : stack[1];\r\n\t\t\t\t\r\n\t\t\t\tif(line[0] == \" \"){\r\n\t\t\t\t\tfunc = line.trim().split(\" \")[1].split(\".\")[1];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfunc = line.trim().split(\"@\")[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconsole.warn(\"Table Not Initialized - Calling the \" + func + \" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function.\" + (msg ? \" \" + msg : \"\"));\r\n\t\t}\r\n\t\t\r\n\t\treturn this.initialized;\r\n\t}\r\n\t\r\n\t////////////////// Data Handling //////////////////\r\n\t//block table redrawing\r\n\tblockRedraw(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-blocking\");\r\n\t\t\r\n\t\tthis.rowManager.blockRedraw();\r\n\t\tthis.columnManager.blockRedraw();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-blocked\");\r\n\t}\r\n\t\r\n\t//restore table redrawing\r\n\trestoreRedraw(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-restoring\");\r\n\r\n\t\tthis.rowManager.restoreRedraw();\r\n\t\tthis.columnManager.restoreRedraw();\r\n\r\n\t\tthis.eventBus.dispatch(\"redraw-restored\");\r\n\t}\r\n\t\r\n\t//load data\r\n\tsetData(data, params, config){\r\n\t\tthis.initGuard(false, \"To set initial data please use the 'data' property in the table constructor.\");\r\n\t\t\r\n\t\treturn this.dataLoader.load(data, params, config, false);\r\n\t}\r\n\t\r\n\t//clear data\r\n\tclearData(){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tthis.dataLoader.blockActiveLoad();\r\n\t\tthis.rowManager.clearData();\r\n\t}\r\n\t\r\n\t//get table data array\r\n\tgetData(active){\r\n\t\treturn this.rowManager.getData(active);\r\n\t}\r\n\t\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\t\r\n\t//replace data, keeping table in position with same sort\r\n\treplaceData(data, params, config){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn this.dataLoader.load(data, params, config, true, true);\r\n\t}\r\n\t\r\n\t//update table data\r\n\tupdateData(data){\r\n\t\tvar responses = 0;\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data && data.length > 0){\r\n\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\t\t\t\t\t\tresponses++;\r\n\t\t\t\t\t\t\r\n\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\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}\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\taddData(data, pos, index){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data){\r\n\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\t\t\t\t\t\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\t\t\t\t\t\r\n\t\t\t\t\t\tresolve(output);\r\n\t\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//update table data\r\n\tupdateOrAddData(data){\r\n\t\tvar rows = [],\r\n\t\tresponses = 0;\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.dataLoader.blockActiveLoad();\r\n\t\t\t\r\n\t\t\tif(typeof data === \"string\"){\r\n\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(data && data.length > 0){\r\n\t\t\t\tdata.forEach((item) => {\r\n\t\t\t\t\tvar row = this.rowManager.findRow(item[this.options.index]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tresponses++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(row){\r\n\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\t\t\t\t\t\t\t\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}else{\r\n\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\t\t\t\t\t\t\t\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}\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tconsole.warn(\"Update Error - No data provided\");\r\n\t\t\t\treject(\"Update Error - No data provided\");\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\t\r\n\t//get row object\r\n\tgetRow(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\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\t\r\n\t//get row object\r\n\tgetRowFromPosition(position){\r\n\t\tvar row = this.rowManager.getRowFromPosition(position);\r\n\t\t\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\t\r\n\t//delete row from table\r\n\tdeleteRow(index){\r\n\t\tvar foundRows = [];\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(!Array.isArray(index)){\r\n\t\t\tindex = [index];\r\n\t\t}\r\n\t\t\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\t\t\t\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}\r\n\t\t}\r\n\t\t\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\t\t\r\n\t\t//delete rows\r\n\t\tfoundRows.forEach((row) =>{\r\n\t\t\trow.delete();\r\n\t\t});\r\n\t\t\r\n\t\tthis.rowManager.reRenderInPosition();\r\n\t\t\r\n\t\treturn Promise.resolve();\r\n\t}\r\n\t\r\n\t//add row to table\r\n\taddRow(data, pos, index){\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\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}\r\n\t\r\n\t//update a row if it exists otherwise create it\r\n\tupdateOrAddRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t\t.then(()=>{\r\n\t\t\t\t\treturn row.getComponent();\r\n\t\t\t\t});\r\n\t\t}else{\r\n\t\t\treturn this.rowManager.addRows(data)\r\n\t\t\t\t.then((rows)=>{\r\n\t\t\t\t\treturn rows[0].getComponent();\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n\t\r\n\t//update row data\r\n\tupdateRow(index, data){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.updateData(data)\r\n\t\t\t\t.then(()=>{\r\n\t\t\t\t\treturn Promise.resolve(row.getComponent());\r\n\t\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\t\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\t\t\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\t\r\n\tmoveRow(from, to, after){\r\n\t\tvar fromRow = this.rowManager.findRow(from);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tgetRows(active){\r\n\t\treturn this.rowManager.getComponents(active);\t\r\n\t}\r\n\t\r\n\t//get position of row in table\r\n\tgetRowPosition(index){\r\n\t\tvar row = this.rowManager.findRow(index);\r\n\t\t\r\n\t\tif(row){\r\n\t\t\treturn row.getPosition();\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\t\r\n\t/////////////// Column Functions ///////////////\r\n\tsetColumns(definition){\r\n\t\tthis.initGuard(false, \"To set initial columns please use the 'columns' property in the table constructor\");\r\n\t\t\r\n\t\tthis.columnManager.setColumns(definition);\r\n\t}\r\n\t\r\n\tgetColumns(structured){\r\n\t\treturn this.columnManager.getComponents(structured);\r\n\t}\r\n\t\r\n\tgetColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tif(column){\r\n\t\t\treturn column.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\t\r\n\tgetColumnDefinitions(){\r\n\t\treturn this.columnManager.getDefinitionTree();\r\n\t}\r\n\t\r\n\tshowColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\thideColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field); \r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\ttoggleColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\taddColumn(definition, before, field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\r\n\t\treturn this.columnManager.addColumn(definition, before, column)\r\n\t\t\t.then((column) => {\r\n\t\t\t\treturn column.getComponent();\r\n\t\t\t});\r\n\t}\r\n\t\r\n\tdeleteColumn(field){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tupdateColumnDefinition(field, definition){\r\n\t\tvar column = this.columnManager.findColumn(field);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\r\n\tmoveColumn(from, to, after){\r\n\t\tvar fromColumn = this.columnManager.findColumn(from),\r\n\t\ttoColumn = this.columnManager.findColumn(to);\r\n\t\t\r\n\t\tthis.initGuard();\r\n\t\t\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\t\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\t\t\t\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\t\r\n\t//////////// General Public Functions ////////////\r\n\t//redraw list without updating data\r\n\tredraw(force){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.columnManager.redraw(force);\r\n\t\tthis.rowManager.redraw(force);\r\n\t}\r\n\t\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\t\r\n\t//////////////////// Event Bus ///////////////////\r\n\t\r\n\ton(key, callback){\r\n\t\tthis.externalEvents.subscribe(key, callback);\r\n\t}\r\n\t\r\n\toff(key, callback){\r\n\t\tthis.externalEvents.unsubscribe(key, callback);\r\n\t}\r\n\t\r\n\tdispatchEvent(){\r\n\t\tvar args = Array.from(arguments);\r\n\t\targs.shift();\r\n\t\t\r\n\t\tthis.externalEvents.dispatch(...arguments);\r\n\t}\r\n\r\n\t//////////////////// Alerts ///////////////////\r\n\r\n\talert(contents, type){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.alertManager.alert(contents, type);\r\n\t}\r\n\r\n\tclearAlert(){\r\n\t\tthis.initGuard();\r\n\r\n\t\tthis.alertManager.clear();\r\n\t}\r\n\t\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\t\r\n\tmodule(key){\r\n\t\tvar mod = this.modules[key];\r\n\t\t\r\n\t\tif(!mod){\r\n\t\t\tconsole.error(\"Tabulator module not installed: \" + key);\r\n\t\t}\r\n\t\t\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\tdebugInvalidComponentFuncs:true, //allow toggling of invalid component warnings\r\n\tdebugInitialization:true, //allow toggling of pre initialization function call warnings\r\n\tdebugDeprecation:true, //allow toggling of deprecation 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\tpopupContainer:false,\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\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\trowHeight: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","//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":["CoreFeature","constructor","table","this","reloadData","data","silent","columnsChanged","dataLoader","load","undefined","langText","modules","localize","getText","arguments","langBind","bind","langLocale","getLocale","commsConnections","comms","getConnections","commsSend","send","layoutMode","layout","getMode","layoutRefresh","force","subscribe","eventBus","unsubscribe","subscribed","key","subscriptionChange","dispatch","chain","confirm","dispatchExternal","externalEvents","subscribedExternal","subscriptionChangeExternal","options","setOption","value","deprecationCheck","oldOption","newOption","deprecationAdvisor","check","deprecationCheckMsg","msg","checkMsg","deprecationMsg","module","Helpers","static","el","offsetWidth","offsetHeight","box","getBoundingClientRect","top","window","pageYOffset","document","documentElement","clientTop","left","pageXOffset","clientLeft","obj","clone","list","objectProto","__proto__","arrayProto","i","Object","assign","Array","isArray","match","copy","subject","findIndex","item","unshift","deepClone","Popup","element","parent","super","container","_lookupContainer","reversedX","childPopup","blurable","blurCallback","blurEventsBound","renderedCallback","visible","hideable","classList","add","blurEvent","hide","escEvent","_escapeCheck","destroyBinding","tableDestroyed","destroyed","popupContainer","querySelector","console","warn","_checkContainerIsParent","body","parentNode","renderCallback","callback","containerEventCoords","e","touch","MouseEvent","x","touches","pageX","y","pageY","parentOffset","elOffset","elementPositionCoords","position","containerOffset","offset","show","origin","parentEl","coords","HTMLElement","style","appendChild","_fitToScreen","addEventListener","stopPropagation","scrollTop","right","Math","max","scrollHeight","parseInt","isVisible","hideOnBlur","setTimeout","rowManager","keyCode","blockHide","restoreHide","removeEventListener","removeChild","child","Module","name","_handler","initialize","registerTableOption","optionsList","register","registerColumnOption","columnManager","registerTableFunction","func","args","initGuard","registerComponentFunction","component","handler","componentFunctionBinder","registerDataHandler","priority","registerDataPipelineHandler","registerDisplayHandler","registerDisplayPipelineHandler","displayRows","adjust","lookupIndex","index","length","displayPipeline","getDisplayRows","activeRows","refreshData","renderInPosition","refreshActiveData","footerAppend","footerManager","append","footerPrepend","prepend","footerRemove","remove","popup","menuEl","menuContainer","alert","content","type","alertManager","clearAlert","clear","Accessor","allowedTypes","initializeColumn","transformRow","column","config","forEach","accessor","charAt","toUpperCase","slice","definition","lookupAccessor","params","accessors","row","rowComponent","getComponent","traverse","colComponent","getFieldValue","setFieldValue","moduleName","generateParamsList","prefix","output","concat","push","serializeParams","encoded","encodeURIComponent","join","url","keys","method","toLowerCase","includes","json","headers","JSON","stringify","form","FormData","Ajax","urlGenerator","loaderPromise","contentTypeFormatters","ajaxRequestFunc","defaultLoaderPromise","ajaxURLGenerator","defaultURLGenerator","ajaxURL","setUrl","setDefaultConfig","ajaxConfig","getUrl","requestDataCheck","requestParams","requestData","ajaxParams","call","previousData","generateConfig","sendRequest","defaultConfig","ajaxRequesting","then","ajaxResponse","Promise","reject","contentType","resolve","ajaxContentType","Accept","mode","location","credentials","fetch","response","ok","catch","error","status","statusText","defaultContentTypeFormatters","Clipboard","pasteParser","pasteAction","customSelection","rowRange","blocked","clipboard","clipboardCopyRowRange","plain","html","preventDefault","clipboardCopyFormatter","export","generateExportList","clipboardCopyConfig","clipboardCopyStyled","generateHTMLTable","generatePlainContent","clipboardData","setData","originalEvent","reset","paste","setPasteParser","clipboardPasteParser","setPasteAction","clipboardPasteAction","rowData","columns","col","getKey","range","internal","sel","textRange","getSelection","createRange","selectNodeContents","toString","removeAllRanges","addRange","selection","createTextRange","moveToElementText","select","execCommand","action","pasteActions","parser","pasteParsers","rows","checkPaseOrigin","getPasteData","modExists","mutateData","mutator","valid","target","tagName","edit","currentCell","getData","replace","update","updateOrAddData","insert","addData","headerFindSuccess","columnMap","split","find","title","trim","field","columnsByIndex","shift","CalcComponent","_row","Proxy","get","receiver","handle","transform","getElement","getTable","getCells","cells","cell","getCell","_getSelf","CellComponent","_cell","getValue","getOldValue","getInitialValue","initialValue","getRow","getField","getColumn","setValue","mutate","restoreOldValue","setValueActual","restoreInitialValue","checkHeight","Cell","oldValue","height","width","minWidth","loaded","build","generateElement","setWidth","_configureCell","createElement","className","setAttribute","textAlign","hozAlign","vertAlign","display","alignItems","bottom","middle","justifyContent","center","cssClass","_generateContents","val","innerHTML","Node","firstChild","cellRendered","containerOnly","layoutElement","setValueProcessData","cellEdited","changed","widthStyled","clearWidth","getWidth","setMinWidth","minWidthStyled","setMaxWidth","maxWidth","maxWidthStyled","reinitializeHeight","clearHeight","setHeight","heightStyled","getHeight","delete","redrawBlock","deleteCell","calcs","getIndex","getCellIndex","ColumnComponent","_column","getDefinition","getTitleDownload","isGroup","toggle","getSubColumns","getParentColumn","Column","scrollTo","scrollToColumn","move","to","after","toColumn","findColumn","moveColumn","getNextColumn","nextCol","nextColumn","getPrevColumn","prevCol","prevColumn","updateDefinition","updates","result","reinitializeWidth","rerenderColumns","maxInitialWidth","variableHeight","headerVertical","headerHozAlign","headerWordWrap","editableTitle","def","contentElement","titleHolderElement","titleElement","groupElement","createGroupElement","fieldStructure","titleDownload","titleFormatterRendered","mapDefinitions","setField","widthFixed","newCol","attachColumn","checkColumnVisibility","registerColumnField","_initialize","columnHeaderVertAlign","defaults","columnDefaults","generate","defaultOptionList","checkDefinition","indexOf","nestedFieldSeparator","_getNestedData","_getFlatData","_setNestedData","_setFlatData","registerColumnPosition","reRegisterPosition","_buildColumnHeaderContent","_buildGroupHeader","_buildColumnHeader","_buildColumnHeaderTitle","focus","text","_formatColumnHeaderTitle","contents","dataObj","structure","columnRendered","verticalAlign","alignment","parentHeight","getGroupElement","clientHeight","getHeadersElement","minHeight","clearVerticalAlign","paddingTop","getFirstColumn","getLastColumn","getColumns","getTopColumn","updateBranches","colDefs","responsiveToggle","verticalAlignHeaders","matchChildWidths","childWidth","splice","setWidthActual","isNaN","floor","clientWidth","min","checkCellHeights","heightInitialized","offsetParent","clearCellHeight","calcHeight","setCellHeight","ceil","cellCount","deregisterColumn","generateCell","findColumnIndex","_nextVisibleColumn","getColumnByIndex","_prevVisibleColumn","fitToData","setTo","addColumn","defaultOptions","RowComponent","getPosition","watchPosition","scrollToRow","moveToRow","updateData","normalizeHeight","reformat","reinitialize","getNextRow","nextRow","getPrevRow","prevRow","Row","manualHeight","outerHeight","initialized","positionWatchers","created","create","detachElement","generateCells","deleteCells","renderer","renderRowCells","rowFormatter","rerenderRowCells","deinitialize","deinitializeHeight","children","maxHeight","rowHeight","resizableRows","updatedData","newRowData","elVisible","tempData","parse","attrname","getColumnsByFieldRoot","findCell","nextDisplayRow","prevDisplayRow","before","toRow","findRow","moveRowActual","deleteActual","blockRedraw","detachModules","deleteRow","wipe","isDisplayed","setPosition","getGroup","group","avg","values","calcParams","precision","reduce","sum","Number","toFixed","parseFloat","String","count","ColumnCalcs","topCalcs","botCalcs","genColumn","topElement","botElement","topRow","botRow","topInitialized","botInitialized","recalcAfterBlock","cellValueChanged","initializeColumnCheck","rowsUpdated","scrollHorizontal","recalcActiveRows","recalcActiveRowsRefresh","tableRedraw","visibleRows","adjustForScrollbar","restoreRedraw","getResults","userRecalc","recalc","redraw","blockCheck","viewable","groupBy","recalcRowGroup","dataTreeStartExpanded","dataTree","recalcAll","topCalc","bottomCalc","columnCalcs","topCalcParams","botCalcParams","bottomCalcParams","calculations","initializeTopRow","botCalc","initializeBottomRow","removeCalcs","adjustTableSize","getContentsElement","insertBefore","headersElement","nextSibling","scrollLeft","rowsToData","generateRow","frozenColumns","recalcGroup","groupRows","getRowGroup","getChildGroups","generateRowData","generateTopRow","generateBottomRow","dataTreeChildColumnCalcs","open","getFilteredTreeChildren","pos","disable","enable","format","formatter","getFormatter","paramKey","hasTopCalcs","hasBottomCalcs","results","getGroups","getGroupResults","groupObj","subGroups","getSubGroups","subGroupResults","subgroup","groups","rtl","paddingLeft","paddingRight","defaultCalculations","DataTree","indent","collapseEl","expandEl","branchEl","elementField","startOpen","collapseRow","expandRow","toggleRow","getTreeParent","getRowChildren","addTreeChildRow","isRowExpanded","dummyEl","dataTreeChildField","dataTreeChildIndent","dataTreeBranchElement","dataTreeCollapseElement","tabIndex","dataTreeExpandElement","initializeRow","layoutRow","rowDelete","rowDataChanged","columnMoving","initializeElementField","tableRedrawing","getRows","reinitializeRowChildren","firstCol","getFirstVisibleColumn","dataTreeElementColumn","getTreeChildren","redrawNeeded","childArray","controlEl","generateControlElement","cloneNode","marginRight","marginLeft","getComputedStyle","getPropertyValue","oldControl","replaceChild","getChildren","allChildren","generateChildren","dataTreeFilter","filter","dataTreeSort","sort","sub","childData","childRow","getTreeParentRoot","childIndex","findChildIndex","recurse","getChildField","csv","setFileContents","delimiter","fileContents","depth","bom","jsonLines","pdf","header","autoTableParams","rowGroupStyles","fontStyle","fontSize","cellPadding","fillColor","rowCalcStyles","jsPDFParams","jsPDF","parseRow","styles","colSpan","rowSpan","orientation","unit","doc","jspdf","autoTable","didDrawPage","head","documentProcessing","xlsx","sheetName","workbook","XLSX","utils","book_new","tableFeatures","compression","compress","generateSheet","merges","worksheet","s","c","r","a","b","j","Date","sheet_add_aoa","encode_range","SheetNames","Sheets","sheetOnly","sheets","sheet","active","intercept","buf","ArrayBuffer","view","Uint8Array","charCodeAt","s2ab","write","bookType","bookSST","Download","mimeType","Blob","deprecatedOptionsCheck","download","downloadToTab","filename","interceptCallback","downloadFunc","downloaders","mime","triggerDownload","downloadConfig","downloadRowRange","groupHeader","groupHeaderDownload","_group","getRowCount","newTab","blob","downloadEncoder","URL","createObjectURL","navigator","msSaveOrOpenBlob","click","commsReceived","maskInput","mask","maskLetter","maskLetterChar","maskNumber","maskNumberChar","maskWildcard","maskWildcardChar","fillSymbols","symbol","char","maskAutoFill","placeholder","defaultDownloaders","Edit","editor","onRendered","success","cancel","editorParams","_initializeParams","displayItems","currentItems","focusedItem","input","_createInputElement","listEl","_createListElement","initialValues","isFilter","filterTimeout","filtered","typing","listIteration","lastAction","filterTerm","actions","_deprecatedOptionsCheck","_initializeValue","_onRendered","listItemFormatter","sortValuesList","searchFunc","searchingPlaceholder","defaultValue","multiselect","headerFilterInitialListGen","cellEl","clickStop","preventScroll","_preventPopupBlur","_preventBlur","_inputKeyDown","_setListWidth","attribs","elementAttributes","clearable","padding","boxSizing","autocomplete","cursor","caretColor","getAttribute","_bindInputEvents","valueCheck","valueKeys","verticalNavigation","placeholderLoading","placeholderEmpty","filterDelay","emptyValue","freetext","filterFunc","filterRemote","allowEmpty","listOnEmpty","valuesLookup","valuesURL","_inputFocus","_inputClick","_inputBlur","_inputSearch","_inputKeyUp","rebuildOptionsList","_filter","clearTimeout","_filterList","_resolveValue","_clearChoices","_keyUp","_keyDown","_keySide","_keyEnter","_keyEsc","_keyHomeEnd","_keySelectLetter","_keyAutoCompLetter","stopImmediatePropagation","_focusItem","_chooseItem","_cancel","_scrollToValue","character","fromCharCode","label","startsWith","scrollIntoView","behavior","block","inline","_generateOptions","_sortOptions","_buildList","_showList","isInteger","_filterOptions","iteration","_ajaxRequest","_uniqueColumnValues","valuesLookupField","_addPlaceholder","responseValues","_parseList","_clearList","term","urlBuilder","getColumnByField","inputValues","entries","map","_parseListItem","option","level","_parseListGroup","itemParams","selected","original","sorter","_defaultSortFunction","_sortGroup","as","bs","a1","b1","L","rx","rd","emptyAlign","isFinite","test","_defaultFilterFunc","_filterItem","matches","_buildItem","itemFormatter","_groupClick","_itemClick","_styleItem","startVis","blur","cellValue","search","onChange","selectContents","textarea","vertNav","whiteSpace","resize","heightNow","shiftKey","shiftEnterSubmit","selectionStart","number","step","blurFunc","date","inputFormat","DT","DateTime","luxon","convertDate","isDateTime","fromISO","fromFormat","toFormat","time","newDatetime","datetime","List","star","self","maxStars","getElementsByTagName","size","stars","starsHolder","createElementNS","starChange","browser","buildStar","starHolder","nextStar","changeValue","overflow","textOverflow","progress","mouseDrag","mouseDragWidth","percent","bar","updateValue","calcVal","round","backgroundColor","screenX","tickCross","tristate","indetermValue","indeterminateValue","indetermState","trueValueSet","falseValueSet","marginTop","checkedValue","checked","trueValue","falseValue","indeterminate","mouseClick","recursionBlock","invalidEdit","editedCells","editors","getEditedCells","clearCellEdited","navigatePrev","navigateNext","navigateLeft","navigateRight","navigateUp","navigateDown","cellIsEdited","clearEdited","editCell","cellCancelEdit","bindEditor","updateCellClass","columnDeleteCheck","rowDeleteCheck","rowEditableCheck","cancelEdit","keybindingNavigateNext","newRow","addRow","edited","allowEdit","nextCell","findPrevEditableCell","findNextEditableCell","prevCell","editable","getCurrentCell","clearEditor","cellEditCancelled","contains","button","focusCellNoEvent","forceEdit","focusScrollAdjust","getRenderMode","topEdge","bottomEdge","rowEl","offsetTop","leftEdge","rightEdge","leftMargin","rightMargin","renderHorizontal","vDomPadLeft","offsetLeft","cellEditor","rendered","cellClick","cellEditing","validationMode","editIndex","defaultEditors","ExportRow","ExportColumn","Export","cloneTableStyle","colVisProp","getHtml","columnHeaders","headersToExportRows","generateColumnGroupHeaders","bodyToExportRows","rowLookup","generateTable","generateTableElement","getVisibleRows","selectRow","selectedRows","pagination","columnGroups","colData","processColumnGroup","maxDepth","groupData","subGroup","subGroupData","columnVisCheck","visProp","headerDepth","exportRows","parseColumnGroup","rowGroups","exportCols","headerEl","bodyEl","lookupTableStyles","setup","treeElementField","mapElementStyles","generateHeaderElement","generateGroupElement","generateCalcElement","generateRowElement","evenRow","oddRow","calcRow","firstRow","firstGroup","getElementsByClassName","styleCells","firstCell","lastCell","classNames","generator","cellStyle","cellWrapper","formatCells","formatExportValue","align","holder","htmlOutputConfig","from","props","lookup","color","fromStyle","prop","filterVal","rowVal","filterParams","regex","RegExp","like","keywords","separator","keyword","matchAll","starts","ends","endsWith","in","Filter","filterList","headerFilters","headerFilterColumns","prevHeaderFilterChangeCheck","tableInitialized","searchRows","searchData","userSetFilter","userRefreshFilter","userAddFilter","getFilters","userSetHeaderFilterFocus","userGetHeaderFilterValue","userSetHeaderFilterValue","getHeaderFilters","userRemoveFilter","userClearFilter","userClearHeaderFilter","setHeaderFilterFocus","reloadHeaderFilter","getHeaderFilterValue","setHeaderFilterValue","initializeColumnHeaderFilter","hideHeaderFilterElements","showHeaderFilterElements","tableBuilt","filterMode","remoteFilterParams","initialFilter","setFilter","initialHeaderFilter","refreshFilter","addFilter","removeFilter","all","clearFilter","clearHeaderFilter","headerFilter","headerFilterPlaceholder","setHeaderFilterColumnPlaceholder","filterType","tagType","attrType","filterChangeCheck","prevSuccess","emptyFunc","headerFilterFunc","filters","headerFilterFuncParams","fieldVal","colVal","trackChanges","generateHeaderFilterElement","filterElement","editorElement","typingTimer","searchTrigger","headerElement","headerFilterEmptyCheck","headerFilterParams","contentsElement","headerFilterLiveFilterDelay","hasAttribute","headerFilterLiveFilter","hasChanged","findFilter","findSubFilters","ajax","filtersToArray","searchType","filterRecurse","rowList","activeRowComponents","filterRow","subFilter","defaultFilters","plaintext","formatterParams","emptyToSpace","sanitizeHTML","money","integer","decimal","rgx","floatVal","sign","decimalSym","thousandSym","thousand","negativeSign","symbolAfter","abs","link","urlPrefix","labelField","labelTraverse","path","urlField","image","src","urlSuffix","empty","truthy","allowTruthy","tick","tickElement","cross","crossElement","outputFormat","invalid","invalidPlaceholder","isValid","timezone","setZone","datetimediff","suffix","humanize","now","diff","toHuman","traffic","percentValue","colors","legend","legendColor","legendAlign","barEl","barContainer","legendEl","holderEl","buttonTick","buttonCross","rownum","innerText","responsiveCollapse","responsiveLayout","toggleList","isOpen","rowSelection","checkbox","selectableRangeMode","toggleSelect","handleComplexRowClick","isSelected","registerRowSelectCheckbox","deselectRow","registerHeaderSelectCheckbox","Format","formatValue","formatHeader","lookupFormatter","formatterPrint","print","formatterClipboard","formatterHtmlOutput","htmlOutput","formatters","mockCell","titleFormatter","titleFormatterParams","entityMap","defaultFormatters","FrozenColumns","leftColumns","rightColumns","initializationMode","layoutCell","reinitializeColumns","blockLayout","unblockLayout","margin","edge","frozenCheck","frozen","layoutCalcRows","layoutGroupCalcs","groupList","layoutColumnPosition","allCells","leftParents","marginValue","getColGroupParentElement","reinitializeRows","getTableElement","_calcSpace","FrozenRows","freezeRow","unfreezeRow","isRowFrozen","detachRow","frozenRows","initializeRows","rowType","isFrozen","styleRows","styleRow","GroupComponent","groupManager","getParentGroup","toggleVisibility","Group","oldGroup","hasSubGroups","groupIDLookups","_addRowToGroup","_addRow","old","elementContents","arrowElement","createElements","addBindings","createValueGroups","arrow","movableRows","moveRow","initializeGroupHeader","allowedValues","_createGroup","groupToggleElement","groupID","groupKey","headerGenerator","insertRow","conformRowData","toIndex","generateGroupHeaderContents","updateGroupRows","scrollHeader","getRowIndex","removeRow","groupValues","removeGroup","getHeadersAndRows","_visSet","groupClosedShowCalcs","prev","getPath","childNodes","GroupRows","displayHandler","setGroupBy","setGroupValues","setGroupStartOpen","setGroupHeader","userGetGroups","userGetGroupedData","rowGetGroup","groupUpdateOnCellEdit","cellUpdated","reassignRowToGroup","configureGroupSetup","rowDeleting","scrollHeaders","rowMoving","rowAddingIndex","rowSample","virtualRenderFill","groupStartOpen","langValue","lang","items","getRealColumns","lookupFunc","prevValue","tableElement","assignRowToGroup","moveRowInArray","getGroupedData","toGroup","fromGroup","generateGroups","groupComponents","pullGroupListData","groupListData","rowCount","headerContent","countGroups","oldGroups","createGroup","assignRowToExistingGroup","newGroupNeeded","oldRowGroup","oldGroupPath","newGroupPath","getExpectedPath","every","groupPath","groupId","checkBasicModeGroupHeaderWidth","onlyGroupHeaders","History","history","clearComponentHistory","rowDeleted","rowAdded","rowMoved","undo","redo","getHistoryUndoSize","getHistoryRedoSize","posFrom","posTo","newValue","undoers","redoers","_rebindRow","oldRow","cellEdit","rowAdd","addRowActual","rowMove","HtmlTableImport","fieldIndex","hasIndex","tableElementCheck","originalElement","parseTable","_extractOptions","_extractHeaders","_generateBlankHeaders","attributes","optionsArr","attrib","_attribValue","_findCol","exists","textContent","registeredDefaults","inQuote","nextChar","array","Import","importFromFile","importFormat","loadDataCheck","loadData","importData","lookupImporter","structureData","err","importer","importers","extension","pickFile","extensions","accept","file","files","reader","FileReader","importReader","readAsArrayBuffer","readAsBinaryString","readAsDataURL","readAsText","onload","onerror","parsedData","autoColumns","structureArrayToObject","structureArrayToColumns","defaultImporters","Interaction","eventMap","rowClick","rowDblClick","rowContext","rowMouseEnter","rowMouseLeave","rowMouseOver","rowMouseOut","rowMouseMove","rowMouseDown","rowMouseUp","rowTap","rowDblTap","rowTapHold","cellDblClick","cellContext","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellMouseDown","cellMouseUp","cellTap","cellDblTap","cellTapHold","headerClick","headerDblClick","headerContext","headerMouseEnter","headerMouseLeave","headerMouseOver","headerMouseOut","headerMouseMove","headerMouseDown","headerMouseUp","headerTap","headerDblTap","headerTapHold","groupClick","groupDblClick","groupContext","groupMouseEnter","groupMouseLeave","groupMouseOver","groupMouseOut","groupMouseMove","groupMouseDown","groupMouseUp","groupTap","groupDblTap","groupTapHold","subscribers","touchSubscribers","columnSubscribers","touchWatchers","tap","tapDbl","tapHold","initializeExternalEvents","cellContentsSelectionFixer","selectNode","subscriptionChanged","added","subscribeTouchEvents","unsubscribeTouchEvents","handleTouch","noTouch","dispatchEvent","watchers","componentObj","Keybindings","watchKeys","pressedKeys","keyupBinding","keydownBinding","bindings","keybindings","mergedBindings","mapBindings","bindEvents","clearBindings","binding","mapBinding","symbolsList","ctrl","meta","code","checkBinding","ctrlKey","metaKey","navPrev","navNext","navUp","navDown","scrollPageUp","scrollPageDown","scrollToStart","scrollToEnd","copyToClipboard","keyBlock","newPos","displayRowsCount","scrollMax","navLeft","navRight","Menu","nestedMenuBlock","currentComponent","rootPopup","initializeRowWatchers","initializeGroupWatchers","rowContextMenu","loadMenuEvent","on","rowClickMenu","rowDblClickMenu","groupContextMenu","groupClickMenu","groupDblClickMenu","headerContextMenu","loadMenuTableColumnEvent","headerClickMenu","headerDblClickMenu","headerMenu","initializeColumnHeaderMenu","contextMenu","loadMenuTableCellEvent","clickMenu","dblClickMenu","headerMenuEl","icon","headerMenuIcon","menu","loadMenu","parentPopup","itemEl","disabled","MoveColumns","placeholderElement","createPlaceholderElement","hoverElement","checkTimeout","checkPeriod","moving","toCol","toColAfter","startX","autoScrollMargin","autoScrollStep","autoScrollTimeout","touchMove","moveHover","endMove","movableColumns","colEl","mousemove","which","startMove","bindTouchEvents","nextColWidth","prevColWidth","nextColWidthLast","prevColWidthLast","startXMove","passive","moveToCol","_bindMouseMove","_unbindMouseMove","movingCells","moveColumnActual","scrollPos","columnHolder","xPos","MoveRows","toRowAfter","hasHandle","startY","tableRowDropEvent","connection","connectionSelectorsTables","connectionSelectorsElements","connectionElements","connections","connectedTable","connectedRow","movableRowsConnectedTables","movableRowsConnectedElements","initializeCell","mouseup","tableRowDrop","previousSibling","rowHandle","nextRowHeight","prevRowHeight","nextRowHeightLast","prevRowHeightLast","startYMove","setStartPosition","connectToTables","pointerEvents","disconnectFromTables","moveHoverConnections","moveHoverTable","rowHolder","yPos","elementRowDrop","connectionTables","query","prototype","querySelectorAll","dropEvent","tabulatorElementDropEvent","connect","disconnect","dropComplete","sender","movableRowsSender","senders","movableRowsReceiver","receivers","fromRow","fromTable","toTable","Mutator","enabled","transformCell","mutateLink","lookupMutator","mutators","mutatorEdit","links","linkCell","pageSize","currentRow","currentPage","totalRows","totalPages","showingEl","valueEl","ofEl","totalEl","rowsEl","pages","Page","progressiveLoad","pageCounterElement","pageCounter","page","remoteRowCountEstimate","initialLoad","dataChanging","pageSizes","setMaxPage","setPage","userSetPageToRow","userSetPageSize","getPageSize","previousPage","nextPage","getPage","getPageMax","setPageToRow","initialLoadComplete","calculatePageSizes","footerRedraw","paginationAddRow","rowAddingPosition","paginationMode","remotePageParams","_parseRemoteData","restOnRenderBefore","initializePageCounter","initializePaginator","initializeProgressive","scrollVertical","testElRow","testElCell","paginationSize","visibility","generatePageSizeSelectList","setPageSize","dir","loading","progressiveLoadScrollMargin","pagesElement","firstBut","prevBut","nextBut","lastBut","paginationSizeSelector","pageSizeSelect","counter","paginationCounter","pageCounters","hidden","pageSelectLabel","paginationCounterHolder","paginationElement","paginationCounterElement","paginationInitialPage","paginationButtonCount","setMaxRows","trigger","_setPageCounter","_setPageButtons","leftSize","rightSize","_generatePageButton","start","end","actualStartRow","actualRowPageSize","actualRows","finally","last_page","last_row","addRows","progressiveLoadDelay","footer","containerElement","scrollWidth","defaultPageCounters","local","id","localStorage","getItem","cookie","cookiePos","setItem","expireDate","setDate","getDate","toUTCString","Persistence","defWatcherBlock","readFunc","writeFunc","localStorageTest","testKey","removeItem","persistence","retrievedData","persistenceMode","persistenceID","persistenceReaderFunc","readers","persistenceWriterFunc","writers","retrieveData","save","eventSave","getColumnLayout","setColumnLayout","sorters","initialSort","parseColumns","setColumns","mergeDefinition","getOwnPropertyDescriptor","defineProperty","set","current","oldCols","newCols","_findColumn","validateSorters","getSort","getGroupConfig","getPageConfig","definitions","excludedKeys","defStore","colDef","moduleInitOrder","defaultReaders","defaultWriters","_componentPopupCall","loadPopupEvent","rowContextPopup","rowClickPopup","rowDblClickPopup","groupContextPopup","groupClickPopup","groupDblClickPopup","headerContextPopup","loadPopupTableColumnEvent","headerClickPopup","headerDblClickPopup","headerPopup","initializeColumnHeaderPopup","contextPopup","loadPopupTableCellEvent","clickPopup","dblClickPopup","headerPopupEl","headerPopupIcon","loadPopup","contentsEl","Print","manualBlock","printAsHtml","replaceTable","cleanup","printFullscreen","printConfig","printStyled","printRowRange","footerContent","scrollX","scrollY","footerEl","tableEl","printHeader","printFooter","printFormatter","ReactiveData","origFuncs","currentVersion","reactiveData","unblock","watchRow","watchData","unwatchData","version","enumerable","configurable","arg","apply","getRowFromDataObject","pop","startRow","newRows","reverse","oldRows","reRenderInPosition","writable","watchKey","watchTreeChildren","childField","rebuildTree","unwatchRow","ResizeColumns","startColumn","startWidth","latestX","initialNextColumn","layoutColumnHeader","initializeEventWatchers","layoutCellHandles","deInitializeComponent","resizeHandle","columnLayoutUpdated","deInitializeColumn","columnWidthUpdated","resizable","reinitializeColumn","frozenColumnOffset","frozenOffset","handleEl","nearestColumn","_checkResizability","handleDown","_mouseDown","oldWidth","parentElement","mouseMove","blockedBefore","blockedAfter","startDiff","moveDiff","resizableColumnFit","colWidth","browserSlow","mouseUp","ResizeRows","startHeight","prevHandle","prevHandleDown","screenY","ResizeTable","visibilityObserver","resizeObserver","containerObserver","tableHeight","tableWidth","containerHeight","containerWidth","autoResize","initialRedraw","tableStyle","IntersectionObserver","ResizeObserver","initializeVisibilityObserver","entry","browserMobile","nodeHeight","contentRect","nodeWidth","redrawTable","observe","fixedHeight","tableResized","isIntersecting","unobserve","ResponsiveLayout","hiddenColumns","collapseFormatter","collapseStartOpen","collapseHandleColumn","updateColumnVisibility","initializeResponsivity","generateCollapsedRowContent","responsiveLayoutCollapseFormatter","formatCollapsedData","responsiveLayoutCollapseStartOpen","responsive","order","generateCollapsedContent","hideColumn","colCount","showColumn","working","getFlexBaseWidth","headerVisible","activeRowsCount","renderEmptyScroll","generateCollapsedRowData","mockCellComponent","responsiveLayoutCollapseUseFormatters","node_content","titleData","valueData","titleHighlight","SelectRow","selecting","lastClickedRow","selectPrev","headerCheckboxElement","selectRows","deselectRows","getSelectedRows","getSelectedData","isRowSelected","selectable","clearSelectionData","rowRetrieve","selectablePersistence","_deselectRow","_rowSelectionChanged","endSelect","selectableCheck","_clearSelection","lastClickedRowIdx","getDisplayRowIndex","rowIdx","fromRowIdx","toRowIdx","toggledRows","toggledRow","_selectRow","rowMatch","rowInfo","selectableRollingSelection","checkboxEl","dataTreeSelectPropagate","childRowSelection","selectedRow","aRow","bRow","alignEmptyValues","decimalSeparator","thousandSeparator","string","locale","localeCompare","boolean","calc","d","alphanum","Sort","sortList","userSetSort","clearSort","sortMode","remoteSortParams","setSort","refreshSort","arrowEl","sorterParams","startingDir","headerSortStartingDir","headerSortTristate","headerSort","headerSortClickElement","headerSortElement","setColumnHeaderSortIcon","columnHeaderSortMulti","newSortList","findSorter","sortOrderReverse","sortListActual","rowComponents","clearColumnHeaders","sortObj","setColumnHeader","_sortItems","sortEl","sorterCount","sortItem","_sortRow","el1Comp","el2Comp","el1","el2","defaultSorters","Tooltip","tooltipSubscriber","headerSubscriber","timeout","popupInstance","headerTooltip","mousemoveCheck","mouseoutCheck","tooltip","clearPopup","loadTooltip","tooltipDelay","parameters","float","numeric","minLength","maxLength","unique","cellData","required","Validate","invalidCells","getInvalidCells","userClearCellValidation","userValidate","cellIsValid","clearValidation","cellValidate","columnValidate","rowValidate","editValidate","editorClear","editedClear","previousValue","validate","cancelled","validator","_extractValidator","substring","_buildValidator","validators","failedValidators","invalidIndex","defaultValidators","OptionsList","msgType","userOptions","debugInvalidOptions","hasOwnProperty","Renderer","elementVertical","elementHorizontal","verticalFillMode","clearRows","clearColumns","reinitializeColumnWidths","renderRows","renderColumns","rerenderRows","scrollColumns","scrollRows","scrollToRowNearestTop","includingBuffer","render","rerender","scrollToRowPosition","ifVisible","rowIndex","scrollToRowIfVisible","BasicHorizontal","VirtualDomHorizontal","leftCol","rightCol","vDomScrollPosLeft","vDomScrollPosRight","vDomPadRight","fitDataColAvg","windowBuffer","isFitData","compatibilityCheck","layoutCheck","vertScrollListen","clearVisRowCache","dataChange","scroll","calcWindowBuffer","buffer","cols","colPos","leftPos","rightPos","fitDataCheck","vdomHoz","reinitChanged","reinitializeRow","change","colEnd","otherRows","addColRight","removeColLeft","addColLeft","removeColRight","colPositionAdjust","changes","fitDataColActualWidthCheck","ex","message","newWidth","widthDiff","appendCell","ColumnManager","blockHozScrollEvent","columnsByField","defaultColumnOptions","redrawBlockUpdate","initializeRenderer","createHeadersElement","createHeaderContentsElement","createHeaderElement","padVerticalScrollbar","renderClass","renderers","virtual","RendererVirtualDomHorizontal","basic","RendererBasicHorizontal","generateColumnsFromRowData","autoColumnsDefinitions","_addColumn","_reIndexColumns","nextToColumn","topColumn","parentIndex","nextEl","root","getDefinitions","getDefinitionTree","getComponents","structured","_moveColumnInArray","updateRows","fromIndex","scrollToColumnPosition","scrollToColumnIfVisible","totalWidth","fixedWidth","resetScroll","BasicVertical","rowTop","VirtualDomVertical","vDomRowHeight","vDomTop","vDomBottom","vDomScrollPosTop","vDomScrollPosBottom","vDomTopPad","vDomBottomPad","vDomMaxRenderChain","vDomWindowBuffer","vDomWindowMinTotalRows","vDomWindowMinMarginRows","vDomTopNewRows","vDomBottomNewRows","paddingBottom","_virtualRenderFill","topOffset","_showPlaceholder","topDiff","bottomDiff","_addTopRow","vDomScrollHeight","_removeBottomRow","_addBottomRow","_removeTopRow","renderVerticalBuffer","topFound","bottomRow","forceMove","topPad","rowsHeight","heightOccupied","topPadHeight","rowsCount","fillableSpace","addedRows","paddingAdjust","_quickNormalizeRowHeight","removableRows","RowManager","createHolderElement","createTableElement","heightFixer","placeholderContents","firstRender","renderMode","activeRowsPipeline","redrawBlockRestoreConfig","redrawBlockRenderInPosition","dataPipeline","scrollbarWidth","initializePlaceholder","leftDir","topDir","_positionPlaceholder","getRowFromPosition","_setDataActual","_wipeElements","allIndex","activeIndex","setActiveRows","displayRowIterator","displayIndex","regenerateRowPositions","findAddRowPos","_clearPlaceholder","addRowPos","chainResult","clearData","findRowIndex","rowOnly","getDataCount","skipStage","stage","cascadeOrder","refreshPipelines","renderTable","layoutColumnsOnNewData","resetDisplayRows","setDisplayRows","scrollBarCheck","RendererVirtualDomVertical","RendererBasicVertical","renderVertical","_clearTable","initialHeight","otherHeight","external","event","createEvent","initEvent","Event","FooterManager","createContainerElement","initializeElement","footerElement","activate","deactivate","InteractionManager","abortClasses","previousTargets","listeners","componentMap","pseudoTrackers","subscriber","pseudoTracking","buildListenerMap","bindSubscriptionWatchers","listenerMap","listener","components","bindPseudoEvents","pseudoMouseEnter","pseudoMouseLeave","leaveList","linkedKeys","comp","clearWatchers","updateEventListeners","track","composedPath","targets","findTargets","bindComponents","triggerEvents","elTargets","targetMatches","previousTarget","closest","ComponentFunctionBinder","funcName","debugInvalidComponentFuncs","DataLoader","requestOrder","requestNo","alertLoader","mapParams","dataSendParams","objectInvert","dataReceiveParams","alertError","dataLoaderErrorTimeout","blockActiveLoad","dataLoaderLoading","dataLoaderError","ExternalEventBus","debug","events","subscriptionNotifiers","_debugDispatch","_dispatch","_notifySubscriptionChange","notifiers","callResult","log","InternalEventBus","_debugChain","_chain","_debugConfirm","_confirm","fallback","confirmed","DeprecationAdvisor","_warnUser","TableRegistry","tables","matchElement","Tabulator","lookupTable","forced","fitData","fitDataFill","fitDataGeneral","fitDataTable","fitDataStretch","colsWidth","gap","lastCol","fitColumns","flexColWidth","overflowWidth","flexWidth","flexGrowUnits","flexColumns","fixedShrinkColumns","flexShrinkUnits","gapFill","calcWidth","scaleColumns","freeSpace","shrinkCols","oversizeCols","oversizeSpace","remainingSpace","remainingFlexGrowUnits","changeUnits","undersizeCols","calcGrow","widthGrow","calcShrink","widthShrink","Layout","modes","dataChanged","defaultModes","Localize","langList","langs","setHeaderFilterPlaceholder","installLang","setLocale","getLang","default","_setLangProp","desiredLocale","language","traverseLang","trans","_executeBindings","pathArray","_getLangElement","rootPath","page_size","page_title","first","first_title","last","last_title","prev_title","next","next_title","showing","of","Comms","receive","selectors","con","tableComms","ModuleBinder","tabulator","bindStaticFunctionality","bindModules","coreModules","moduleBindings","extendModule","property","source","registerModule","mod","registerModuleBinding","findTable","orderedStartMods","orderedEndMods","unOrderedMods","moduleCore","modulesCore","modulesRegular","core","mods","Alert","_createAlertElement","msgElement","_createMsgElement","_typeClass","interactionMonitor","initializeCoreSystems","_create","_clearObjectPointers","_mapDeprecatedFunctionality","debugEventsExternal","debugEventsInternal","InteractionMonitor","_rtlCheck","_buildElement","_initializeTable","_loadInitialData","textDirection","direction","newElement","_detectBrowser","destroy","deregister","ua","userAgent","vendor","opera","stack","line","debugInitialization","Error","replaceData","responses","foundRows","updateOrAddRow","updateRow","getRowPosition","getColumnDefinitions","toggleColumn","deleteColumn","updateColumnDefinition","fromColumn","off","plugin","debugDeprecation","rowFormatterPrint","rowFormatterClipboard","rowFormatterHtmlOutput","TabulatorFull","PseudoRow","_createElement"],"mappings":";AAAe,MAAMA,EAEpBC,YAAYC,GACXC,KAAKD,MAAQA,EAOdE,WAAWC,EAAMC,EAAQC,GACxB,OAAOJ,KAAKD,MAAMM,WAAWC,KAAKJ,OAAMK,OAAWA,OAAWA,EAAWJ,EAAQC,GAOlFI,WACC,OAAOR,KAAKD,MAAMU,QAAQC,SAASC,WAAWC,WAG/CC,WACC,OAAOb,KAAKD,MAAMU,QAAQC,SAASI,QAAQF,WAG5CG,aACC,OAAOf,KAAKD,MAAMU,QAAQC,SAASM,aAAaJ,WAQjDK,mBACC,OAAOjB,KAAKD,MAAMU,QAAQS,MAAMC,kBAAkBP,WAGnDQ,YACC,OAAOpB,KAAKD,MAAMU,QAAQS,MAAMG,QAAQT,WAOzCU,aACC,OAAOtB,KAAKD,MAAMU,QAAQc,OAAOC,UAGlCC,cAAcC,GACb,OAAO1B,KAAKD,MAAMU,QAAQc,OAAOA,OAAOG,GAQzCC,YACC,OAAO3B,KAAKD,MAAM6B,SAASD,aAAaf,WAGzCiB,cACC,OAAO7B,KAAKD,MAAM6B,SAAS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c,OAEhC,OADAlW,EAAG8C,UAAUC,IAAI,iBACV/C,EAGRkU,aACC,OAAOzX,KAAKwF,QAGb0I,eACC,OAAO,EAGRiI,UACC,MAAO,GAGR0F,YACC,OAAO7b,KAAKwF,QAAQkf,YAGrBva,cAEAga,gBAEAF,mBAEAe,iBAEAvJ,sBAEAoH,cAEAC,iBAEAF"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index be55d65c2..0a4996d45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "tabulator-tables", - "version": "5.4.0", + "version": "5.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 06e704c2a..c0f30cdef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tabulator-tables", - "version": "5.4.0", + "version": "5.4.1", "description": "Interactive table generation JavaScript library", "style": "dist/css/tabulator.css", "main": "dist/js/tabulator.js",