tabulator-tables 5.2.5 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/.eslintignore +3 -0
  2. package/.eslintrc.js +28 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.md +1 -0
  4. package/.github/workflows/bad-files-check.yml +39 -0
  5. package/.github/workflows/lint-and-test.yml +31 -0
  6. package/README.md +18 -6
  7. package/bower.json +1 -1
  8. package/build/Bundler.js +77 -77
  9. package/dist/css/tabulator.css +16 -11
  10. package/dist/css/tabulator.css.map +1 -1
  11. package/dist/css/tabulator.min.css +1 -1
  12. package/dist/css/tabulator.min.css.map +1 -1
  13. package/dist/css/tabulator_bootstrap3.css +16 -11
  14. package/dist/css/tabulator_bootstrap3.css.map +1 -1
  15. package/dist/css/tabulator_bootstrap3.min.css +1 -1
  16. package/dist/css/tabulator_bootstrap3.min.css.map +1 -1
  17. package/dist/css/tabulator_bootstrap4.css +16 -11
  18. package/dist/css/tabulator_bootstrap4.css.map +1 -1
  19. package/dist/css/tabulator_bootstrap4.min.css +1 -1
  20. package/dist/css/tabulator_bootstrap4.min.css.map +1 -1
  21. package/dist/css/tabulator_bootstrap5.css +55 -50
  22. package/dist/css/tabulator_bootstrap5.css.map +1 -1
  23. package/dist/css/tabulator_bootstrap5.min.css +1 -1
  24. package/dist/css/tabulator_bootstrap5.min.css.map +1 -1
  25. package/dist/css/tabulator_bulma.css +16 -11
  26. package/dist/css/tabulator_bulma.css.map +1 -1
  27. package/dist/css/tabulator_bulma.min.css +1 -1
  28. package/dist/css/tabulator_bulma.min.css.map +1 -1
  29. package/dist/css/tabulator_materialize.css +16 -11
  30. package/dist/css/tabulator_materialize.css.map +1 -1
  31. package/dist/css/tabulator_materialize.min.css +1 -1
  32. package/dist/css/tabulator_materialize.min.css.map +1 -1
  33. package/dist/css/tabulator_midnight.css +16 -11
  34. package/dist/css/tabulator_midnight.css.map +1 -1
  35. package/dist/css/tabulator_midnight.min.css +1 -1
  36. package/dist/css/tabulator_midnight.min.css.map +1 -1
  37. package/dist/css/tabulator_modern.css +16 -11
  38. package/dist/css/tabulator_modern.css.map +1 -1
  39. package/dist/css/tabulator_modern.min.css +1 -1
  40. package/dist/css/tabulator_modern.min.css.map +1 -1
  41. package/dist/css/tabulator_semanticui.css +16 -11
  42. package/dist/css/tabulator_semanticui.css.map +1 -1
  43. package/dist/css/tabulator_semanticui.min.css +1 -1
  44. package/dist/css/tabulator_semanticui.min.css.map +1 -1
  45. package/dist/css/tabulator_simple.css +16 -11
  46. package/dist/css/tabulator_simple.css.map +1 -1
  47. package/dist/css/tabulator_simple.min.css +1 -1
  48. package/dist/css/tabulator_simple.min.css.map +1 -1
  49. package/dist/css/tabulator_site.css +16 -11
  50. package/dist/css/tabulator_site.css.map +1 -1
  51. package/dist/css/tabulator_site.min.css +1 -1
  52. package/dist/css/tabulator_site.min.css.map +1 -1
  53. package/dist/js/jquery_wrapper.js +37 -37
  54. package/dist/js/tabulator.js +1423 -686
  55. package/dist/js/tabulator.js.map +1 -1
  56. package/dist/js/tabulator.min.js +2 -2
  57. package/dist/js/tabulator.min.js.map +1 -1
  58. package/dist/js/tabulator_esm.js +4140 -3440
  59. package/dist/js/tabulator_esm.js.map +1 -1
  60. package/dist/js/tabulator_esm.min.js +2 -2
  61. package/dist/js/tabulator_esm.min.js.map +1 -1
  62. package/package.json +4 -1
  63. package/src/js/builds/jquery_wrapper.js +37 -37
  64. package/src/js/core/ColumnManager.js +259 -231
  65. package/src/js/core/CoreFeature.js +16 -2
  66. package/src/js/core/FooterManager.js +10 -10
  67. package/src/js/core/Module.js +8 -8
  68. package/src/js/core/RowManager.js +79 -88
  69. package/src/js/core/Tabulator.js +89 -72
  70. package/src/js/core/TabulatorFull.js +1 -1
  71. package/src/js/core/cell/Cell.js +15 -16
  72. package/src/js/core/cell/CellComponent.js +2 -2
  73. package/src/js/core/column/Column.js +55 -66
  74. package/src/js/core/column/ColumnComponent.js +4 -4
  75. package/src/js/core/column/defaults/options.js +1 -1
  76. package/src/js/core/defaults/options.js +4 -2
  77. package/src/js/core/rendering/Renderer.js +19 -19
  78. package/src/js/core/rendering/renderers/BasicHorizontal.js +1 -2
  79. package/src/js/core/rendering/renderers/BasicVertical.js +1 -1
  80. package/src/js/core/rendering/renderers/VirtualDomHorizontal.js +42 -58
  81. package/src/js/core/rendering/renderers/VirtualDomVertical.js +31 -22
  82. package/src/js/core/row/Row.js +32 -8
  83. package/src/js/core/row/RowComponent.js +8 -4
  84. package/src/js/core/tools/Alert.js +44 -45
  85. package/src/js/core/tools/ComponentFunctionBinder.js +4 -2
  86. package/src/js/core/tools/DataLoader.js +3 -3
  87. package/src/js/core/tools/DeprecationAdvisor.js +47 -0
  88. package/src/js/core/tools/ExternalEventBus.js +5 -5
  89. package/src/js/core/tools/InteractionMonitor.js +31 -32
  90. package/src/js/core/tools/InternalEventBus.js +5 -5
  91. package/src/js/core/tools/ModuleBinder.js +6 -6
  92. package/src/js/core/tools/OptionsList.js +4 -4
  93. package/src/js/core/tools/Popup.js +215 -189
  94. package/src/js/modules/Accessor/Accessor.js +16 -16
  95. package/src/js/modules/Accessor/defaults/accessors.js +1 -1
  96. package/src/js/modules/Ajax/Ajax.js +7 -7
  97. package/src/js/modules/Ajax/defaults/loaderPromise.js +19 -19
  98. package/src/js/modules/Ajax/defaults/urlGenerator.js +1 -1
  99. package/src/js/modules/Clipboard/Clipboard.js +23 -23
  100. package/src/js/modules/Clipboard/defaults/pasteParsers.js +0 -2
  101. package/src/js/modules/ColumnCalcs/CalcComponent.js +2 -2
  102. package/src/js/modules/ColumnCalcs/ColumnCalcs.js +54 -50
  103. package/src/js/modules/ColumnCalcs/defaults/calculations.js +1 -1
  104. package/src/js/modules/DataTree/DataTree.js +19 -14
  105. package/src/js/modules/Download/Download.js +15 -8
  106. package/src/js/modules/Download/defaults/downloaders/csv.js +28 -28
  107. package/src/js/modules/Download/defaults/downloaders/html.js +2 -2
  108. package/src/js/modules/Download/defaults/downloaders/json.js +14 -14
  109. package/src/js/modules/Download/defaults/downloaders/jsonLines.js +1 -1
  110. package/src/js/modules/Download/defaults/downloaders/pdf.js +17 -19
  111. package/src/js/modules/Download/defaults/downloaders/xlsx.js +2 -2
  112. package/src/js/modules/Edit/Edit.js +219 -201
  113. package/src/js/modules/Edit/List.js +1026 -991
  114. package/src/js/modules/Edit/defaults/editors/autocomplete.js +3 -3
  115. package/src/js/modules/Edit/defaults/editors/date.js +110 -0
  116. package/src/js/modules/Edit/defaults/editors/datetime.js +97 -0
  117. package/src/js/modules/Edit/defaults/editors/input.js +7 -7
  118. package/src/js/modules/Edit/defaults/editors/list.js +2 -2
  119. package/src/js/modules/Edit/defaults/editors/number.js +12 -12
  120. package/src/js/modules/Edit/defaults/editors/progress.js +11 -11
  121. package/src/js/modules/Edit/defaults/editors/range.js +5 -5
  122. package/src/js/modules/Edit/defaults/editors/select.js +3 -3
  123. package/src/js/modules/Edit/defaults/editors/star.js +9 -9
  124. package/src/js/modules/Edit/defaults/editors/textarea.js +97 -92
  125. package/src/js/modules/Edit/defaults/editors/tickCross.js +1 -3
  126. package/src/js/modules/Edit/defaults/editors/time.js +98 -0
  127. package/src/js/modules/Edit/defaults/editors.js +8 -2
  128. package/src/js/modules/Edit/inputMask.js +19 -26
  129. package/src/js/modules/Export/Export.js +69 -65
  130. package/src/js/modules/Filter/Filter.js +85 -95
  131. package/src/js/modules/Format/Format.js +24 -26
  132. package/src/js/modules/Format/defaults/formatters/buttonCross.js +1 -1
  133. package/src/js/modules/Format/defaults/formatters/buttonTick.js +1 -1
  134. package/src/js/modules/Format/defaults/formatters/color.js +1 -1
  135. package/src/js/modules/Format/defaults/formatters/datetime.js +7 -7
  136. package/src/js/modules/Format/defaults/formatters/datetimediff.js +7 -7
  137. package/src/js/modules/Format/defaults/formatters/handle.js +1 -1
  138. package/src/js/modules/Format/defaults/formatters/html.js +1 -1
  139. package/src/js/modules/Format/defaults/formatters/image.js +9 -9
  140. package/src/js/modules/Format/defaults/formatters/link.js +10 -10
  141. package/src/js/modules/Format/defaults/formatters/lookup.js +1 -1
  142. package/src/js/modules/Format/defaults/formatters/money.js +1 -1
  143. package/src/js/modules/Format/defaults/formatters/plaintext.js +1 -1
  144. package/src/js/modules/Format/defaults/formatters/progress.js +41 -42
  145. package/src/js/modules/Format/defaults/formatters/responsiveCollapse.js +3 -3
  146. package/src/js/modules/Format/defaults/formatters/rowSelection.js +1 -1
  147. package/src/js/modules/Format/defaults/formatters/rownum.js +9 -2
  148. package/src/js/modules/Format/defaults/formatters/star.js +1 -1
  149. package/src/js/modules/Format/defaults/formatters/textarea.js +1 -1
  150. package/src/js/modules/Format/defaults/formatters/tickCross.js +1 -1
  151. package/src/js/modules/Format/defaults/formatters/traffic.js +14 -14
  152. package/src/js/modules/FrozenColumns/FrozenColumns.js +6 -8
  153. package/src/js/modules/FrozenRows/FrozenRows.js +37 -7
  154. package/src/js/modules/GroupRows/Group.js +3 -3
  155. package/src/js/modules/GroupRows/GroupComponent.js +2 -2
  156. package/src/js/modules/GroupRows/GroupRows.js +12 -11
  157. package/src/js/modules/History/History.js +2 -2
  158. package/src/js/modules/HtmlTableImport/HtmlTableImport.js +3 -6
  159. package/src/js/modules/Import/Import.js +158 -159
  160. package/src/js/modules/Import/defaults/importers/array.js +5 -0
  161. package/src/js/modules/Import/defaults/importers/csv.js +49 -49
  162. package/src/js/modules/Import/defaults/importers/json.js +6 -6
  163. package/src/js/modules/Import/defaults/importers.js +2 -0
  164. package/src/js/modules/Interaction/Interaction.js +39 -40
  165. package/src/js/modules/Keybindings/Keybindings.js +14 -14
  166. package/src/js/modules/Keybindings/defaults/actions.js +1 -2
  167. package/src/js/modules/Layout/Layout.js +4 -5
  168. package/src/js/modules/Layout/defaults/modes/fitColumns.js +9 -10
  169. package/src/js/modules/Layout/defaults/modes/fitData.js +6 -4
  170. package/src/js/modules/Layout/defaults/modes/fitDataGeneral.js +2 -2
  171. package/src/js/modules/Layout/defaults/modes/fitDataStretch.js +2 -2
  172. package/src/js/modules/Localize/Localize.js +7 -7
  173. package/src/js/modules/Menu/Menu.js +8 -11
  174. package/src/js/modules/MoveColumns/MoveColumns.js +3 -6
  175. package/src/js/modules/MoveRows/MoveRows.js +30 -36
  176. package/src/js/modules/Mutator/Mutator.js +9 -9
  177. package/src/js/modules/Page/Page.js +73 -80
  178. package/src/js/modules/Page/defaults/pageCounters/pages.js +2 -2
  179. package/src/js/modules/Page/defaults/pageCounters/rows.js +1 -1
  180. package/src/js/modules/Persistence/Persistence.js +40 -44
  181. package/src/js/modules/Persistence/defaults/readers.js +1 -1
  182. package/src/js/modules/Popup/Popup.js +4 -5
  183. package/src/js/modules/Print/Print.js +2 -2
  184. package/src/js/modules/ReactiveData/ReactiveData.js +178 -115
  185. package/src/js/modules/ResizeColumns/ResizeColumns.js +3 -3
  186. package/src/js/modules/ResizeRows/ResizeRows.js +1 -1
  187. package/src/js/modules/ResizeTable/ResizeTable.js +77 -46
  188. package/src/js/modules/ResponsiveLayout/ResponsiveLayout.js +0 -3
  189. package/src/js/modules/SelectRow/SelectRow.js +26 -28
  190. package/src/js/modules/Sort/Sort.js +110 -79
  191. package/src/js/modules/Sort/defaults/sorters/alphanum.js +1 -1
  192. package/src/js/modules/Sort/defaults/sorters/array.js +24 -28
  193. package/src/js/modules/Sort/defaults/sorters/boolean.js +1 -1
  194. package/src/js/modules/Sort/defaults/sorters/date.js +1 -1
  195. package/src/js/modules/Sort/defaults/sorters/datetime.js +13 -13
  196. package/src/js/modules/Sort/defaults/sorters/exists.js +1 -1
  197. package/src/js/modules/Sort/defaults/sorters/number.js +1 -1
  198. package/src/js/modules/Sort/defaults/sorters/string.js +7 -7
  199. package/src/js/modules/Sort/defaults/sorters/time.js +1 -1
  200. package/src/js/modules/Tooltip/Tooltip.js +5 -7
  201. package/src/js/modules/Validate/Validate.js +10 -13
  202. package/src/js/modules/Validate/defaults/validators.js +8 -3
  203. package/src/scss/tabulator.scss +30 -19
  204. package/src/scss/themes/bootstrap/functions4.scss +1 -1
  205. package/src/scss/themes/bootstrap/tabulator_bootstrap3.scss +8 -8
  206. package/src/scss/themes/bootstrap/tabulator_bootstrap4.scss +8 -8
  207. package/src/scss/themes/bootstrap/tabulator_bootstrap5.scss +25 -25
  208. package/src/scss/themes/bootstrap/variables5.scss +4 -4
  209. package/src/scss/themes/bulma/tabulator_bulma.scss +7 -7
  210. package/src/scss/themes/materialize/tabulator_materialize.scss +6 -6
  211. package/src/scss/themes/materialize/variables.scss +1 -1
  212. package/src/scss/themes/semanticui/tabulator_semanticui.scss +7 -7
  213. package/src/scss/themes/tabulator_midnight.scss +7 -7
  214. package/src/scss/themes/tabulator_modern.scss +14 -14
  215. package/src/scss/themes/tabulator_simple.scss +8 -8
  216. package/src/scss/themes/tabulator_site.scss +15 -15
@@ -1,4 +1,4 @@
1
- /* Tabulator v5.2.5 (c) Oliver Folkerd 2022 */
1
+ /* Tabulator v5.3.0 (c) Oliver Folkerd 2022 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -258,8 +258,12 @@
258
258
  //flag to console log events
259
259
  debugInvalidOptions: true,
260
260
  //allow toggling of invalid option warnings
261
+ debugInvalidComponentFuncs: true,
262
+ //allow toggling of invalid component warnings
261
263
  debugInitialization: true,
262
- //allow toggling of invalid option warnings
264
+ //allow toggling of pre initialization function call warnings
265
+ debugDeprecation: true,
266
+ //allow toggling of deprecation warnings
263
267
  height: false,
264
268
  //height of tabulator
265
269
  minHeight: false,
@@ -377,8 +381,8 @@
377
381
  }
378
382
  }, {
379
383
  key: "layoutRefresh",
380
- value: function layoutRefresh() {
381
- return this.table.modules.layout.layout();
384
+ value: function layoutRefresh(force) {
385
+ return this.table.modules.layout.layout(force);
382
386
  } //////////////////////////////////////////
383
387
  /////////////// Event Bus ////////////////
384
388
  //////////////////////////////////////////
@@ -466,6 +470,24 @@
466
470
 
467
471
  return this.table.options[key];
468
472
  } //////////////////////////////////////////
473
+ /////////// Deprecation Checks ///////////
474
+ //////////////////////////////////////////
475
+
476
+ }, {
477
+ key: "deprecationCheck",
478
+ value: function deprecationCheck(oldOption, newOption) {
479
+ return this.table.deprecationAdvisor.check(oldOption, newOption);
480
+ }
481
+ }, {
482
+ key: "deprecationCheckMsg",
483
+ value: function deprecationCheckMsg(oldOption, msg) {
484
+ return this.table.deprecationAdvisor.checkMsg(oldOption, msg);
485
+ }
486
+ }, {
487
+ key: "deprecationMsg",
488
+ value: function deprecationMsg(msg) {
489
+ return this.table.deprecationAdvisor.msg(msg);
490
+ } //////////////////////////////////////////
469
491
  //////////////// Modules /////////////////
470
492
  //////////////////////////////////////////
471
493
 
@@ -647,7 +669,7 @@
647
669
  result = this._column.setWidth(width);
648
670
  }
649
671
 
650
- this._column.table.columnManager.renderer.rerenderColumns(true);
672
+ this._column.table.columnManager.rerenderColumns(true);
651
673
 
652
674
  return result;
653
675
  }
@@ -819,7 +841,6 @@
819
841
  this.element = document.createElement('div');
820
842
  this.element.className = "tabulator-cell";
821
843
  this.element.setAttribute("role", "gridcell");
822
- this.element = this.element;
823
844
  }
824
845
  }, {
825
846
  key: "_configureCell",
@@ -1142,16 +1163,16 @@
1142
1163
 
1143
1164
  _this.width = null; //column width
1144
1165
 
1145
- _this.widthStyled = ""; //column width prestyled to improve render efficiency
1166
+ _this.widthStyled = ""; //column width pre-styled to improve render efficiency
1146
1167
 
1147
1168
  _this.maxWidth = null; //column maximum width
1148
1169
 
1149
- _this.maxWidthStyled = ""; //column maximum prestyled to improve render efficiency
1170
+ _this.maxWidthStyled = ""; //column maximum pre-styled to improve render efficiency
1150
1171
 
1151
1172
  _this.maxInitialWidth = null;
1152
1173
  _this.minWidth = null; //column minimum width
1153
1174
 
1154
- _this.minWidthStyled = ""; //column minimum prestyled to improve render efficiency
1175
+ _this.minWidthStyled = ""; //column minimum pre-styled to improve render efficiency
1155
1176
 
1156
1177
  _this.widthFixed = false; //user has specified a width for this column
1157
1178
 
@@ -1175,8 +1196,6 @@
1175
1196
 
1176
1197
  _this._initialize();
1177
1198
 
1178
- _this.bindModuleColumns();
1179
-
1180
1199
  return _this;
1181
1200
  }
1182
1201
 
@@ -1187,6 +1206,17 @@
1187
1206
  el.classList.add("tabulator-col");
1188
1207
  el.setAttribute("role", "columnheader");
1189
1208
  el.setAttribute("aria-sort", "none");
1209
+
1210
+ switch (this.table.options.columnHeaderVertAlign) {
1211
+ case "middle":
1212
+ el.style.justifyContent = "center";
1213
+ break;
1214
+
1215
+ case "bottom":
1216
+ el.style.justifyContent = "flex-end";
1217
+ break;
1218
+ }
1219
+
1190
1220
  return el;
1191
1221
  }
1192
1222
  }, {
@@ -1253,10 +1283,6 @@
1253
1283
  } else {
1254
1284
  this.registerColumnPosition(this);
1255
1285
  }
1256
- }
1257
- }, {
1258
- key: "_mapDepricatedFunctionality",
1259
- value: function _mapDepricatedFunctionality() {//all previously deprecated functionality removed in the 5.0 release
1260
1286
  } //build header element
1261
1287
 
1262
1288
  }, {
@@ -1293,8 +1319,7 @@
1293
1319
  value: function _buildColumnHeader() {
1294
1320
  var _this3 = this;
1295
1321
 
1296
- var def = this.definition,
1297
- table = this.table;
1322
+ var def = this.definition;
1298
1323
  this.dispatch("column-layout", this); //set column visibility
1299
1324
 
1300
1325
  if (typeof def.visible != "undefined") {
@@ -1303,12 +1328,12 @@
1303
1328
  } else {
1304
1329
  this.hide(true);
1305
1330
  }
1306
- } //asign additional css classes to column header
1331
+ } //assign additional css classes to column header
1307
1332
 
1308
1333
 
1309
1334
  if (def.cssClass) {
1310
- var classeNames = def.cssClass.split(" ");
1311
- classeNames.forEach(function (className) {
1335
+ var classNames = def.cssClass.split(" ");
1336
+ classNames.forEach(function (className) {
1312
1337
  _this3.element.classList.add(className);
1313
1338
  });
1314
1339
  }
@@ -1328,7 +1353,7 @@
1328
1353
  this.setMaxWidth(parseInt(def.maxWidth));
1329
1354
  }
1330
1355
 
1331
- this.reinitializeWidth(); //set orizontal text alignment
1356
+ this.reinitializeWidth(); //set horizontal text alignment
1332
1357
 
1333
1358
  this.hozAlign = this.definition.hozAlign;
1334
1359
  this.vertAlign = this.definition.vertAlign;
@@ -1337,8 +1362,6 @@
1337
1362
  }, {
1338
1363
  key: "_buildColumnHeaderContent",
1339
1364
  value: function _buildColumnHeaderContent() {
1340
- var def = this.definition,
1341
- table = this.table;
1342
1365
  var contentElement = document.createElement("div");
1343
1366
  contentElement.classList.add("tabulator-col-content");
1344
1367
  this.titleHolderElement = document.createElement("div");
@@ -1428,8 +1451,8 @@
1428
1451
  this.element.setAttribute("aria-title", this.definition.title); //asign additional css classes to column header
1429
1452
 
1430
1453
  if (this.definition.cssClass) {
1431
- var classeNames = this.definition.cssClass.split(" ");
1432
- classeNames.forEach(function (className) {
1454
+ var classNames = this.definition.cssClass.split(" ");
1455
+ classNames.forEach(function (className) {
1433
1456
  _this5.element.classList.add(className);
1434
1457
  });
1435
1458
  }
@@ -1520,20 +1543,19 @@
1520
1543
  if (this.isGroup) {
1521
1544
  this.groupElement.style.minHeight = parentHeight - this.contentElement.offsetHeight + "px";
1522
1545
  } //vertically align cell contents
1546
+ // if(!this.isGroup && alignment !== "top"){
1547
+ // if(alignment === "bottom"){
1548
+ // this.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) + "px";
1549
+ // }else{
1550
+ // this.element.style.paddingTop = ((this.element.clientHeight - this.contentElement.offsetHeight) / 2) + "px";
1551
+ // }
1552
+ // }
1523
1553
 
1524
1554
 
1525
- if (!this.isGroup && alignment !== "top") {
1526
- if (alignment === "bottom") {
1527
- this.element.style.paddingTop = this.element.clientHeight - this.contentElement.offsetHeight + "px";
1528
- } else {
1529
- this.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) / 2 + "px";
1530
- }
1531
- }
1532
-
1533
1555
  this.columns.forEach(function (column) {
1534
1556
  column.verticalAlign(alignment);
1535
1557
  });
1536
- } //clear vertical alignmenet
1558
+ } //clear vertical alignment
1537
1559
 
1538
1560
  }, {
1539
1561
  key: "clearVerticalAlign",
@@ -1546,22 +1568,14 @@
1546
1568
  column.clearVerticalAlign();
1547
1569
  });
1548
1570
  this.dispatch("column-height", this, "");
1549
- }
1550
- }, {
1551
- key: "bindModuleColumns",
1552
- value: function bindModuleColumns() {
1553
- //check if rownum formatter is being used on a column
1554
- if (this.definition.formatter == "rownum") {
1555
- this.table.rowManager.rowNumColumn = this;
1556
- }
1557
- } //// Retreive Column Information ////
1571
+ } //// Retrieve Column Information ////
1558
1572
  //return column header element
1559
1573
 
1560
1574
  }, {
1561
1575
  key: "getElement",
1562
1576
  value: function getElement() {
1563
1577
  return this.element;
1564
- } //return colunm group element
1578
+ } //return column group element
1565
1579
 
1566
1580
  }, {
1567
1581
  key: "getGroupElement",
@@ -1618,7 +1632,7 @@
1618
1632
  key: "getCells",
1619
1633
  value: function getCells() {
1620
1634
  return this.cells;
1621
- } //retreive the top column in a group of columns
1635
+ } //retrieve the top column in a group of columns
1622
1636
 
1623
1637
  }, {
1624
1638
  key: "getTopColumn",
@@ -1694,7 +1708,7 @@
1694
1708
  }
1695
1709
 
1696
1710
  if (!this.silent) {
1697
- this.table.columnManager.renderer.rerenderColumns();
1711
+ this.table.columnManager.rerenderColumns();
1698
1712
  }
1699
1713
  }
1700
1714
  } //hide column
@@ -1725,7 +1739,7 @@
1725
1739
  }
1726
1740
 
1727
1741
  if (!this.silent) {
1728
- this.table.columnManager.renderer.rerenderColumns();
1742
+ this.table.columnManager.rerenderColumns();
1729
1743
  }
1730
1744
  }
1731
1745
  }
@@ -1864,7 +1878,6 @@
1864
1878
  var _this6 = this;
1865
1879
 
1866
1880
  return new Promise(function (resolve, reject) {
1867
-
1868
1881
  if (_this6.isGroup) {
1869
1882
  _this6.columns.forEach(function (column) {
1870
1883
  column["delete"]();
@@ -1894,7 +1907,7 @@
1894
1907
 
1895
1908
  _this6.table.columnManager.deregisterColumn(_this6);
1896
1909
 
1897
- _this6.table.columnManager.renderer.rerenderColumns(true);
1910
+ _this6.table.columnManager.rerenderColumns(true);
1898
1911
 
1899
1912
  resolve();
1900
1913
  });
@@ -2005,7 +2018,7 @@
2005
2018
  definition = Object.assign(definition, updates);
2006
2019
  return this.table.columnManager.addColumn(definition, false, this).then(function (column) {
2007
2020
  if (definition.field == _this7.field) {
2008
- _this7.field = false; //cleair field name to prevent deletion of duplicate column from arrays
2021
+ _this7.field = false; //clear field name to prevent deletion of duplicate column from arrays
2009
2022
  }
2010
2023
 
2011
2024
  return _this7["delete"]().then(function () {
@@ -2144,16 +2157,16 @@
2144
2157
  }
2145
2158
  }
2146
2159
 
2147
- for (var key in output) {
2148
- if (key in userOptions) {
2149
- output[key] = userOptions[key];
2160
+ for (var _key in output) {
2161
+ if (_key in userOptions) {
2162
+ output[_key] = userOptions[_key];
2150
2163
  } else {
2151
- if (Array.isArray(output[key])) {
2152
- output[key] = Object.assign([], output[key]);
2153
- } else if (_typeof(output[key]) === "object" && output[key] !== null) {
2154
- output[key] = Object.assign({}, output[key]);
2155
- } else if (typeof output[key] === "undefined") {
2156
- delete output[key];
2164
+ if (Array.isArray(output[_key])) {
2165
+ output[_key] = Object.assign([], output[_key]);
2166
+ } else if (_typeof(output[_key]) === "object" && output[_key] !== null) {
2167
+ output[_key] = Object.assign({}, output[_key]);
2168
+ } else if (typeof output[_key] === "undefined") {
2169
+ delete output[_key];
2157
2170
  }
2158
2171
  }
2159
2172
  }
@@ -2179,7 +2192,7 @@
2179
2192
  _this.elementVertical = table.rowManager.element;
2180
2193
  _this.elementHorizontal = table.columnManager.element;
2181
2194
  _this.tableElement = table.rowManager.tableElement;
2182
- _this.verticalFillMode = "fit"; // used by row manager to determin how to size the render area ("fit" - fits container to the contents, "fill" - fills the contianer without resizing it)
2195
+ _this.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)
2183
2196
 
2184
2197
  return _this;
2185
2198
  } ///////////////////////////////////
@@ -2237,11 +2250,11 @@
2237
2250
  }
2238
2251
  }, {
2239
2252
  key: "scrollRows",
2240
- value: function scrollRows(top, dir) {//handle vertical scolling
2253
+ value: function scrollRows(top, dir) {//handle vertical scrolling
2241
2254
  }
2242
2255
  }, {
2243
2256
  key: "resize",
2244
- value: function resize() {//container has rezied, carry out any needed recalculations (DO NOT RERENDER IN THIS FUNCTION)
2257
+ value: function resize() {//container has resized, carry out any needed recalculations (DO NOT RERENDER IN THIS FUNCTION)
2245
2258
  }
2246
2259
  }, {
2247
2260
  key: "scrollToRow",
@@ -2249,7 +2262,7 @@
2249
2262
  }
2250
2263
  }, {
2251
2264
  key: "scrollToRowNearestTop",
2252
- value: function scrollToRowNearestTop(row) {//determine weather the row is nearest the top or bottom of the table, retur true for top or false for bottom
2265
+ value: function scrollToRowNearestTop(row) {//determine weather the row is nearest the top or bottom of the table, return true for top or false for bottom
2253
2266
  }
2254
2267
  }, {
2255
2268
  key: "visibleRows",
@@ -2378,18 +2391,18 @@
2378
2391
  return Renderer;
2379
2392
  }(CoreFeature);
2380
2393
 
2381
- var BaiscHorizontal = /*#__PURE__*/function (_Renderer) {
2382
- _inherits(BaiscHorizontal, _Renderer);
2394
+ var BasicHorizontal = /*#__PURE__*/function (_Renderer) {
2395
+ _inherits(BasicHorizontal, _Renderer);
2383
2396
 
2384
- var _super = _createSuper(BaiscHorizontal);
2397
+ var _super = _createSuper(BasicHorizontal);
2385
2398
 
2386
- function BaiscHorizontal(table) {
2387
- _classCallCheck(this, BaiscHorizontal);
2399
+ function BasicHorizontal(table) {
2400
+ _classCallCheck(this, BasicHorizontal);
2388
2401
 
2389
2402
  return _super.call(this, table);
2390
2403
  }
2391
2404
 
2392
- _createClass(BaiscHorizontal, [{
2405
+ _createClass(BasicHorizontal, [{
2393
2406
  key: "renderRowCells",
2394
2407
  value: function renderRowCells(row) {
2395
2408
  row.cells.forEach(function (cell) {
@@ -2406,7 +2419,7 @@
2406
2419
  }
2407
2420
  }]);
2408
2421
 
2409
- return BaiscHorizontal;
2422
+ return BasicHorizontal;
2410
2423
  }(Renderer);
2411
2424
 
2412
2425
  var VirtualDomHorizontal = /*#__PURE__*/function (_Renderer) {
@@ -2645,8 +2658,6 @@
2645
2658
  var _this3 = this;
2646
2659
 
2647
2660
  var change = false,
2648
- collsWidth = 0,
2649
- colEnd = 0,
2650
2661
  row,
2651
2662
  rowEl;
2652
2663
 
@@ -2657,34 +2668,25 @@
2657
2668
  }
2658
2669
  });
2659
2670
 
2660
- if (change) {
2661
- if (change && this.table.rowManager.getDisplayRows().length) {
2662
- this.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;
2663
- var row = this.chain("rows-sample", [1], [], function () {
2664
- return _this3.table.rowManager.getDisplayRows();
2665
- })[0];
2666
-
2667
- if (row) {
2668
- rowEl = row.getElement();
2669
- row.generateCells();
2670
- this.tableElement.appendChild(rowEl);
2671
-
2672
- for (var colEnd = 0; colEnd < row.cells.length; colEnd++) {
2673
- var cell = row.cells[colEnd];
2674
- rowEl.appendChild(cell.getElement());
2675
- cell.column.reinitializeWidth();
2676
- collsWidth += cell.column.getWidth(); // if(collsWidth > this.vDomScrollPosRight){
2677
- // break;
2678
- // }
2679
- }
2680
-
2681
- rowEl.parentNode.removeChild(rowEl); // this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1));
2682
- // for(colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++){
2683
- // this.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg);
2684
- // }
2671
+ if (change && this.table.rowManager.getDisplayRows().length) {
2672
+ this.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;
2673
+ row = this.chain("rows-sample", [1], [], function () {
2674
+ return _this3.table.rowManager.getDisplayRows();
2675
+ })[0];
2685
2676
 
2686
- this.rerenderColumns(false, true);
2677
+ if (row) {
2678
+ rowEl = row.getElement();
2679
+ row.generateCells();
2680
+ this.tableElement.appendChild(rowEl);
2681
+
2682
+ for (var colEnd = 0; colEnd < row.cells.length; colEnd++) {
2683
+ var cell = row.cells[colEnd];
2684
+ rowEl.appendChild(cell.getElement());
2685
+ cell.column.reinitializeWidth();
2687
2686
  }
2687
+
2688
+ rowEl.parentNode.removeChild(rowEl);
2689
+ this.rerenderColumns(false, true);
2688
2690
  }
2689
2691
  }
2690
2692
  } else {
@@ -2765,7 +2767,8 @@
2765
2767
  value: function addColRight() {
2766
2768
  var _this6 = this;
2767
2769
 
2768
- var changes = false;
2770
+ var changes = false,
2771
+ working = true;
2769
2772
 
2770
2773
  var _loop = function _loop() {
2771
2774
  var column = _this6.columns[_this6.rightCol + 1];
@@ -2792,17 +2795,15 @@
2792
2795
  _this6.vDomPadRight -= column.getWidth();
2793
2796
  }
2794
2797
  } else {
2795
- return "break";
2798
+ working = false;
2796
2799
  }
2797
2800
  } else {
2798
- return "break";
2801
+ working = false;
2799
2802
  }
2800
2803
  };
2801
2804
 
2802
- while (true) {
2803
- var _ret = _loop();
2804
-
2805
- if (_ret === "break") break;
2805
+ while (working) {
2806
+ _loop();
2806
2807
  }
2807
2808
 
2808
2809
  if (changes) {
@@ -2814,7 +2815,8 @@
2814
2815
  value: function addColLeft() {
2815
2816
  var _this7 = this;
2816
2817
 
2817
- var changes = false;
2818
+ var changes = false,
2819
+ working = true;
2818
2820
 
2819
2821
  var _loop2 = function _loop2() {
2820
2822
  var column = _this7.columns[_this7.leftCol - 1];
@@ -2847,17 +2849,15 @@
2847
2849
  _this7.vDomPadRight -= diff;
2848
2850
  }
2849
2851
  } else {
2850
- return "break";
2852
+ working = false;
2851
2853
  }
2852
2854
  } else {
2853
- return "break";
2855
+ working = false;
2854
2856
  }
2855
2857
  };
2856
2858
 
2857
- while (true) {
2858
- var _ret2 = _loop2();
2859
-
2860
- if (_ret2 === "break") break;
2859
+ while (working) {
2860
+ _loop2();
2861
2861
  }
2862
2862
 
2863
2863
  if (changes) {
@@ -2869,7 +2869,8 @@
2869
2869
  value: function removeColRight() {
2870
2870
  var _this8 = this;
2871
2871
 
2872
- var changes = false;
2872
+ var changes = false,
2873
+ working = true;
2873
2874
 
2874
2875
  var _loop3 = function _loop3() {
2875
2876
  var column = _this8.columns[_this8.rightCol];
@@ -2893,17 +2894,15 @@
2893
2894
  _this8.vDomPadRight += column.getWidth();
2894
2895
  _this8.rightCol--;
2895
2896
  } else {
2896
- return "break";
2897
+ working = false;
2897
2898
  }
2898
2899
  } else {
2899
- return "break";
2900
+ working = false;
2900
2901
  }
2901
2902
  };
2902
2903
 
2903
- while (true) {
2904
- var _ret3 = _loop3();
2905
-
2906
- if (_ret3 === "break") break;
2904
+ while (working) {
2905
+ _loop3();
2907
2906
  }
2908
2907
 
2909
2908
  if (changes) {
@@ -2915,7 +2914,8 @@
2915
2914
  value: function removeColLeft() {
2916
2915
  var _this9 = this;
2917
2916
 
2918
- var changes = false;
2917
+ var changes = false,
2918
+ working = true;
2919
2919
 
2920
2920
  var _loop4 = function _loop4() {
2921
2921
  var column = _this9.columns[_this9.leftCol];
@@ -2939,17 +2939,15 @@
2939
2939
  _this9.vDomPadLeft += column.getWidth();
2940
2940
  _this9.leftCol++;
2941
2941
  } else {
2942
- return "break";
2942
+ working = false;
2943
2943
  }
2944
2944
  } else {
2945
- return "break";
2945
+ working = false;
2946
2946
  }
2947
2947
  };
2948
2948
 
2949
- while (true) {
2950
- var _ret4 = _loop4();
2951
-
2952
- if (_ret4 === "break") break;
2949
+ while (working) {
2950
+ _loop4();
2953
2951
  }
2954
2952
 
2955
2953
  if (changes) {
@@ -3040,6 +3038,10 @@
3040
3038
 
3041
3039
  _this.scrollLeft = 0;
3042
3040
  _this.optionsList = new OptionsList(_this.table, "column definition", defaultColumnOptions);
3041
+ _this.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing
3042
+
3043
+ _this.redrawBlockUpdate = null; //store latest redraw update only status
3044
+
3043
3045
  _this.renderer = null;
3044
3046
  return _this;
3045
3047
  } ////////////// Setup Functions /////////////////
@@ -3060,7 +3062,7 @@
3060
3062
  var renderClass;
3061
3063
  var renderers = {
3062
3064
  "virtual": VirtualDomHorizontal,
3063
- "basic": BaiscHorizontal
3065
+ "basic": BasicHorizontal
3064
3066
  };
3065
3067
 
3066
3068
  if (typeof this.table.options.renderHorizontal === "string") {
@@ -3073,7 +3075,7 @@
3073
3075
  this.renderer = new renderClass(this.table, this.element, this.tableElement);
3074
3076
  this.renderer.initialize();
3075
3077
  } else {
3076
- console.error("Unable to find matching renderer:", table.options.renderHorizontal);
3078
+ console.error("Unable to find matching renderer:", this.table.options.renderHorizontal);
3077
3079
  }
3078
3080
  }
3079
3081
  }, {
@@ -3238,7 +3240,7 @@
3238
3240
  this._reIndexColumns();
3239
3241
 
3240
3242
  this.dispatch("columns-loaded");
3241
- this.renderer.rerenderColumns(false, true);
3243
+ this.rerenderColumns(false, true);
3242
3244
  this.redraw(true);
3243
3245
  }
3244
3246
  }, {
@@ -3300,19 +3302,23 @@
3300
3302
  var _this3 = this;
3301
3303
 
3302
3304
  var minHeight = 0;
3303
- this.columns.forEach(function (column) {
3304
- var height;
3305
- column.clearVerticalAlign();
3306
- height = column.getHeight();
3307
3305
 
3308
- if (height > minHeight) {
3309
- minHeight = height;
3310
- }
3311
- });
3312
- this.columns.forEach(function (column) {
3313
- column.verticalAlign(_this3.table.options.columnHeaderVertAlign, minHeight);
3314
- });
3315
- this.table.rowManager.adjustTableSize();
3306
+ if (!this.redrawBlock) {
3307
+ this.columns.forEach(function (column) {
3308
+ column.clearVerticalAlign();
3309
+ });
3310
+ this.columns.forEach(function (column) {
3311
+ var height = column.getHeight();
3312
+
3313
+ if (height > minHeight) {
3314
+ minHeight = height;
3315
+ }
3316
+ });
3317
+ this.columns.forEach(function (column) {
3318
+ column.verticalAlign(_this3.table.options.columnHeaderVertAlign, minHeight);
3319
+ });
3320
+ this.table.rowManager.adjustTableSize();
3321
+ }
3316
3322
  } //////////////// Column Details /////////////////
3317
3323
 
3318
3324
  }, {
@@ -3367,7 +3373,7 @@
3367
3373
  }
3368
3374
  }, {
3369
3375
  key: "getFirstVisibleColumn",
3370
- value: function getFirstVisibleColumn(index) {
3376
+ value: function getFirstVisibleColumn() {
3371
3377
  var index = this.columnsByIndex.findIndex(function (col) {
3372
3378
  return col.visible;
3373
3379
  });
@@ -3390,7 +3396,7 @@
3390
3396
  key: "getRealColumns",
3391
3397
  value: function getRealColumns() {
3392
3398
  return this.columnsByIndex;
3393
- } //travers across columns and call action
3399
+ } //traverse across columns and call action
3394
3400
 
3395
3401
  }, {
3396
3402
  key: "traverse",
@@ -3398,7 +3404,7 @@
3398
3404
  this.columnsByIndex.forEach(function (column, i) {
3399
3405
  callback(column, i);
3400
3406
  });
3401
- } //get defintions of actual columns
3407
+ } //get definitions of actual columns
3402
3408
 
3403
3409
  }, {
3404
3410
  key: "getDefinitions",
@@ -3466,7 +3472,7 @@
3466
3472
 
3467
3473
  this._moveColumnInArray(this.columnsByIndex, from, to, after, true);
3468
3474
 
3469
- this.renderer.rerenderColumns(true);
3475
+ this.rerenderColumns(true);
3470
3476
  this.dispatch("column-moved", from, to, after);
3471
3477
 
3472
3478
  if (this.subscribedExternal("columnMoved")) {
@@ -3625,7 +3631,7 @@
3625
3631
 
3626
3632
  _this6.table.rowManager.reinitialize();
3627
3633
 
3628
- _this6.renderer.rerenderColumns();
3634
+ _this6.rerenderColumns();
3629
3635
 
3630
3636
  resolve(column);
3631
3637
  });
@@ -3657,6 +3663,30 @@
3657
3663
 
3658
3664
  this.verticalAlignHeaders();
3659
3665
  this.redraw();
3666
+ }
3667
+ }, {
3668
+ key: "rerenderColumns",
3669
+ value: function rerenderColumns(update, silent) {
3670
+ if (!this.redrawBlock) {
3671
+ this.renderer.rerenderColumns(update, silent);
3672
+ } else {
3673
+ if (update === false || update === true && this.redrawBlockUpdate === null) {
3674
+ this.redrawBlockUpdate = update;
3675
+ }
3676
+ }
3677
+ }
3678
+ }, {
3679
+ key: "blockRedraw",
3680
+ value: function blockRedraw() {
3681
+ this.redrawBlock = true;
3682
+ this.redrawBlockUpdate = null;
3683
+ }
3684
+ }, {
3685
+ key: "restoreRedraw",
3686
+ value: function restoreRedraw() {
3687
+ this.redrawBlock = false;
3688
+ this.verticalAlignHeaders();
3689
+ this.renderer.rerenderColumns(this.redrawBlockUpdate);
3660
3690
  } //redraw columns
3661
3691
 
3662
3692
  }, {
@@ -3672,7 +3702,7 @@
3672
3702
  }
3673
3703
 
3674
3704
  if (!this.confirm("table-redrawing", force)) {
3675
- this.layoutRefresh();
3705
+ this.layoutRefresh(force);
3676
3706
  }
3677
3707
 
3678
3708
  this.dispatch("table-redraw", force);
@@ -3684,7 +3714,7 @@
3684
3714
  }(CoreFeature);
3685
3715
 
3686
3716
  //public row object
3687
- var RowComponent$1 = /*#__PURE__*/function () {
3717
+ var RowComponent = /*#__PURE__*/function () {
3688
3718
  function RowComponent(row) {
3689
3719
  _classCallCheck(this, RowComponent);
3690
3720
 
@@ -3735,8 +3765,13 @@
3735
3765
  }
3736
3766
  }, {
3737
3767
  key: "getPosition",
3738
- value: function getPosition(active) {
3739
- return this._row.table.rowManager.getRowPosition(this._row, active);
3768
+ value: function getPosition() {
3769
+ return this._row.getPosition();
3770
+ }
3771
+ }, {
3772
+ key: "watchPosition",
3773
+ value: function watchPosition(callback) {
3774
+ return this._row.watchPosition(callback);
3740
3775
  }
3741
3776
  }, {
3742
3777
  key: "delete",
@@ -3820,7 +3855,7 @@
3820
3855
  _this.cells = [];
3821
3856
  _this.height = 0; //hold element height
3822
3857
 
3823
- _this.heightStyled = ""; //hold element height prestyled to improve render efficiency
3858
+ _this.heightStyled = ""; //hold element height pre-styled to improve render efficiency
3824
3859
 
3825
3860
  _this.manualHeight = false; //user has manually set row height
3826
3861
 
@@ -3830,6 +3865,9 @@
3830
3865
 
3831
3866
  _this.heightInitialized = false; //element has resized cells to fit
3832
3867
 
3868
+ _this.position = 0; //store position of element in row list
3869
+
3870
+ _this.positionWatchers = [];
3833
3871
  _this.component = null;
3834
3872
  _this.created = false;
3835
3873
 
@@ -4075,8 +4113,8 @@
4075
4113
  _this2.dispatch("row-data-save-after", _this2); //update affected cells only
4076
4114
 
4077
4115
 
4078
- for (var attrname in updatedData) {
4079
- var columns = _this2.table.columnManager.getColumnsByFieldRoot(attrname);
4116
+ for (var _attrname in updatedData) {
4117
+ var columns = _this2.table.columnManager.getColumnsByFieldRoot(_attrname);
4080
4118
 
4081
4119
  columns.forEach(function (column) {
4082
4120
  var cell = _this2.getCell(column.getField());
@@ -4202,8 +4240,7 @@
4202
4240
  }, {
4203
4241
  key: "deleteActual",
4204
4242
  value: function deleteActual(blockRedraw) {
4205
- var index = this.table.rowManager.getRowIndex(this);
4206
- this.detatchModules();
4243
+ this.detachModules();
4207
4244
  this.table.rowManager.deleteRow(this, blockRedraw);
4208
4245
  this.deleteCells();
4209
4246
  this.initialized = false;
@@ -4212,8 +4249,8 @@
4212
4249
  this.dispatch("row-deleted", this);
4213
4250
  }
4214
4251
  }, {
4215
- key: "detatchModules",
4216
- value: function detatchModules() {
4252
+ key: "detachModules",
4253
+ value: function detachModules() {
4217
4254
  this.dispatch("row-deleting", this);
4218
4255
  }
4219
4256
  }, {
@@ -4228,7 +4265,7 @@
4228
4265
  }, {
4229
4266
  key: "wipe",
4230
4267
  value: function wipe() {
4231
- this.detatchModules();
4268
+ this.detachModules();
4232
4269
  this.deleteCells();
4233
4270
 
4234
4271
  if (this.element) {
@@ -4244,6 +4281,34 @@
4244
4281
  this.element = false;
4245
4282
  this.modules = {};
4246
4283
  }
4284
+ }, {
4285
+ key: "isDisplayed",
4286
+ value: function isDisplayed() {
4287
+ return this.table.rowManager.getDisplayRows().includes(this);
4288
+ }
4289
+ }, {
4290
+ key: "getPosition",
4291
+ value: function getPosition() {
4292
+ return this.isDisplayed() ? this.position : false;
4293
+ }
4294
+ }, {
4295
+ key: "setPosition",
4296
+ value: function setPosition(position) {
4297
+ var _this3 = this;
4298
+
4299
+ if (position != this.position) {
4300
+ this.position = position;
4301
+ this.positionWatchers.forEach(function (callback) {
4302
+ callback(_this3.position);
4303
+ });
4304
+ }
4305
+ }
4306
+ }, {
4307
+ key: "watchPosition",
4308
+ value: function watchPosition(callback) {
4309
+ this.positionWatchers.push(callback);
4310
+ callback(this.position);
4311
+ }
4247
4312
  }, {
4248
4313
  key: "getGroup",
4249
4314
  value: function getGroup() {
@@ -4254,7 +4319,7 @@
4254
4319
  key: "getComponent",
4255
4320
  value: function getComponent() {
4256
4321
  if (!this.component) {
4257
- this.component = new RowComponent$1(this);
4322
+ this.component = new RowComponent(this);
4258
4323
  }
4259
4324
 
4260
4325
  return this.component;
@@ -4264,15 +4329,15 @@
4264
4329
  return Row;
4265
4330
  }(CoreFeature);
4266
4331
 
4267
- var BaiscVertical = /*#__PURE__*/function (_Renderer) {
4268
- _inherits(BaiscVertical, _Renderer);
4332
+ var BasicVertical = /*#__PURE__*/function (_Renderer) {
4333
+ _inherits(BasicVertical, _Renderer);
4269
4334
 
4270
- var _super = _createSuper(BaiscVertical);
4335
+ var _super = _createSuper(BasicVertical);
4271
4336
 
4272
- function BaiscVertical(table) {
4337
+ function BasicVertical(table) {
4273
4338
  var _this;
4274
4339
 
4275
- _classCallCheck(this, BaiscVertical);
4340
+ _classCallCheck(this, BasicVertical);
4276
4341
 
4277
4342
  _this = _super.call(this, table);
4278
4343
  _this.verticalFillMode = "fill";
@@ -4283,7 +4348,7 @@
4283
4348
  return _this;
4284
4349
  }
4285
4350
 
4286
- _createClass(BaiscVertical, [{
4351
+ _createClass(BasicVertical, [{
4287
4352
  key: "clearRows",
4288
4353
  value: function clearRows() {
4289
4354
  var element = this.tableElement; // element.children.detach();
@@ -4352,7 +4417,7 @@
4352
4417
  }
4353
4418
  }]);
4354
4419
 
4355
- return BaiscVertical;
4420
+ return BasicVertical;
4356
4421
  }(Renderer);
4357
4422
 
4358
4423
  var VirtualDomVertical = /*#__PURE__*/function (_Renderer) {
@@ -4373,7 +4438,7 @@
4373
4438
 
4374
4439
  _this.vDomTop = 0; //hold position for first rendered row in the virtual DOM
4375
4440
 
4376
- _this.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM
4441
+ _this.vDomBottom = 0; //hold position for last rendered row in the virtual DOM
4377
4442
 
4378
4443
  _this.vDomScrollPosTop = 0; //last scroll position of the vDom top;
4379
4444
 
@@ -4462,7 +4527,13 @@
4462
4527
  callback();
4463
4528
  }
4464
4529
 
4465
- this._virtualRenderFill(topRow === false ? this.rows.length - 1 : topRow, true, topOffset || 0);
4530
+ if (this.rows().length) {
4531
+ this._virtualRenderFill(topRow === false ? this.rows.length - 1 : topRow, true, topOffset || 0);
4532
+ } else {
4533
+ this.clear();
4534
+
4535
+ this.table.rowManager._showPlaceholder();
4536
+ }
4466
4537
 
4467
4538
  this.scrollColumns(left);
4468
4539
  }
@@ -4656,7 +4727,7 @@
4656
4727
  }
4657
4728
 
4658
4729
  if (!position) {
4659
- this.vDomTopPad = 0; //adjust rowheight to match average of rendered elements
4730
+ this.vDomTopPad = 0; //adjust row height to match average of rendered elements
4660
4731
 
4661
4732
  this.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i);
4662
4733
  this.vDomBottomPad = this.vDomRowHeight * (rowsCount - this.vDomBottom - 1);
@@ -4692,9 +4763,10 @@
4692
4763
  addedRows = [],
4693
4764
  paddingAdjust = 0,
4694
4765
  index = this.vDomTop - 1,
4695
- i = 0;
4766
+ i = 0,
4767
+ working = true;
4696
4768
 
4697
- while (true) {
4769
+ while (working) {
4698
4770
  if (this.vDomTop) {
4699
4771
  var row = rows[index],
4700
4772
  rowHeight = void 0,
@@ -4728,13 +4800,13 @@
4728
4800
  index--;
4729
4801
  i++;
4730
4802
  } else {
4731
- break;
4803
+ working = false;
4732
4804
  }
4733
4805
  } else {
4734
- break;
4806
+ working = false;
4735
4807
  }
4736
4808
  } else {
4737
- break;
4809
+ working = false;
4738
4810
  }
4739
4811
  }
4740
4812
 
@@ -4766,9 +4838,10 @@
4766
4838
  value: function _removeTopRow(rows, fillableSpace) {
4767
4839
  var removableRows = [],
4768
4840
  paddingAdjust = 0,
4769
- i = 0;
4841
+ i = 0,
4842
+ working = true;
4770
4843
 
4771
- while (true) {
4844
+ while (working) {
4772
4845
  var row = rows[this.vDomTop],
4773
4846
  rowHeight = void 0;
4774
4847
 
@@ -4782,10 +4855,10 @@
4782
4855
  removableRows.push(row);
4783
4856
  i++;
4784
4857
  } else {
4785
- break;
4858
+ working = false;
4786
4859
  }
4787
4860
  } else {
4788
- break;
4861
+ working = false;
4789
4862
  }
4790
4863
  }
4791
4864
 
@@ -4812,9 +4885,10 @@
4812
4885
  addedRows = [],
4813
4886
  paddingAdjust = 0,
4814
4887
  index = this.vDomBottom + 1,
4815
- i = 0;
4888
+ i = 0,
4889
+ working = true;
4816
4890
 
4817
- while (true) {
4891
+ while (working) {
4818
4892
  var row = rows[index],
4819
4893
  rowHeight = void 0,
4820
4894
  initialized = void 0;
@@ -4847,10 +4921,10 @@
4847
4921
  index++;
4848
4922
  i++;
4849
4923
  } else {
4850
- break;
4924
+ working = false;
4851
4925
  }
4852
4926
  } else {
4853
- break;
4927
+ working = false;
4854
4928
  }
4855
4929
  }
4856
4930
 
@@ -4878,9 +4952,10 @@
4878
4952
  value: function _removeBottomRow(rows, fillableSpace) {
4879
4953
  var removableRows = [],
4880
4954
  paddingAdjust = 0,
4881
- i = 0;
4955
+ i = 0,
4956
+ working = true;
4882
4957
 
4883
- while (true) {
4958
+ while (working) {
4884
4959
  var row = rows[this.vDomBottom],
4885
4960
  rowHeight = void 0;
4886
4961
 
@@ -4894,10 +4969,10 @@
4894
4969
  removableRows.push(row);
4895
4970
  i++;
4896
4971
  } else {
4897
- break;
4972
+ working = false;
4898
4973
  }
4899
4974
  } else {
4900
- break;
4975
+ working = false;
4901
4976
  }
4902
4977
  }
4903
4978
 
@@ -5000,8 +5075,6 @@
5000
5075
 
5001
5076
  _this.scrollTop = 0;
5002
5077
  _this.scrollLeft = 0;
5003
- _this.rowNumColumn = false; //hold column component for row number column
5004
-
5005
5078
  _this.redrawBlock = false; //prevent redraws to allow multiple data manipulations before continuing
5006
5079
 
5007
5080
  _this.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed
@@ -5060,16 +5133,6 @@
5060
5133
  key: "getTableElement",
5061
5134
  value: function getTableElement() {
5062
5135
  return this.tableElement;
5063
- } //return position of row in table
5064
-
5065
- }, {
5066
- key: "getRowPosition",
5067
- value: function getRowPosition(row, active) {
5068
- if (active) {
5069
- return this.activeRows.indexOf(row);
5070
- } else {
5071
- return this.rows.indexOf(row);
5072
- }
5073
5136
  }
5074
5137
  }, {
5075
5138
  key: "initialize",
@@ -5120,7 +5183,7 @@
5120
5183
  if (subject instanceof Row) {
5121
5184
  //subject is row element
5122
5185
  return subject;
5123
- } else if (subject instanceof RowComponent$1) {
5186
+ } else if (subject instanceof RowComponent) {
5124
5187
  //subject is public row component
5125
5188
  return subject._getSelf() || false;
5126
5189
  } else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) {
@@ -5129,8 +5192,10 @@
5129
5192
  return row.getElement() === subject;
5130
5193
  });
5131
5194
  return match || false;
5195
+ } else if (subject === null) {
5196
+ return false;
5132
5197
  }
5133
- } else if (typeof subject == "undefined" || subject === null) {
5198
+ } else if (typeof subject == "undefined") {
5134
5199
  return false;
5135
5200
  } else {
5136
5201
  //subject should be treated as the index of the row
@@ -5154,12 +5219,10 @@
5154
5219
  }
5155
5220
  }, {
5156
5221
  key: "getRowFromPosition",
5157
- value: function getRowFromPosition(position, active) {
5158
- if (active) {
5159
- return this.activeRows[position];
5160
- } else {
5161
- return this.rows[position];
5162
- }
5222
+ value: function getRowFromPosition(position) {
5223
+ return this.getDisplayRows().find(function (row) {
5224
+ return row.getPosition() === position && row.isDisplayed();
5225
+ });
5163
5226
  }
5164
5227
  }, {
5165
5228
  key: "scrollToRow",
@@ -5263,7 +5326,7 @@
5263
5326
  this.reRenderInPosition();
5264
5327
  }
5265
5328
 
5266
- this.regenerateRowNumbers();
5329
+ this.regenerateRowPositions();
5267
5330
  this.dispatchExternal("rowDeleted", row.getComponent());
5268
5331
 
5269
5332
  if (!this.displayRowsCount) {
@@ -5294,8 +5357,6 @@
5294
5357
  data = [data];
5295
5358
  }
5296
5359
 
5297
- data.length - 1;
5298
-
5299
5360
  if (typeof index == "undefined" && pos || typeof index !== "undefined" && !pos) {
5300
5361
  data.reverse();
5301
5362
  }
@@ -5310,7 +5371,7 @@
5310
5371
 
5311
5372
  _this6.refreshActiveData(false, false, true);
5312
5373
 
5313
- _this6.regenerateRowNumbers();
5374
+ _this6.regenerateRowPositions();
5314
5375
 
5315
5376
  if (rows.length) {
5316
5377
  _this6._clearPlaceholder();
@@ -5413,7 +5474,7 @@
5413
5474
  value: function moveRow(from, to, after) {
5414
5475
  this.dispatch("row-move", from, to, after);
5415
5476
  this.moveRowActual(from, to, after);
5416
- this.regenerateRowNumbers();
5477
+ this.regenerateRowPositions();
5417
5478
  this.dispatch("row-moved", from, to, after);
5418
5479
  this.dispatchExternal("rowMoved", from.getComponent());
5419
5480
  }
@@ -5690,7 +5751,7 @@
5690
5751
 
5691
5752
 
5692
5753
  switch (stage) {
5693
- case "all": //handle case where alldata needs refreshing
5754
+ case "all": //handle case where all data needs refreshing
5694
5755
 
5695
5756
  case "dataPipeline":
5696
5757
  for (var i = index; i < this.dataPipeline.length; i++) {
@@ -5699,7 +5760,6 @@
5699
5760
  }
5700
5761
 
5701
5762
  this.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);
5702
- this.regenerateRowNumbers();
5703
5763
 
5704
5764
  case "display":
5705
5765
  index = 0;
@@ -5712,23 +5772,23 @@
5712
5772
  this.setDisplayRows(_result || this.getDisplayRows(_i - 1).slice(0), _i);
5713
5773
  }
5714
5774
 
5775
+ case "end":
5776
+ //case to handle scenario when trying to skip past end stage
5777
+ this.regenerateRowPositions();
5715
5778
  }
5716
- } //regenerate row numbers for row number formatter if in use
5779
+ } //regenerate row positions
5717
5780
 
5718
5781
  }, {
5719
- key: "regenerateRowNumbers",
5720
- value: function regenerateRowNumbers() {
5721
- var _this8 = this;
5722
-
5723
- if (this.rowNumColumn) {
5724
- this.activeRows.forEach(function (row) {
5725
- var cell = row.getCell(_this8.rowNumColumn);
5726
-
5727
- if (cell) {
5728
- cell._generateContents();
5729
- }
5730
- });
5731
- }
5782
+ key: "regenerateRowPositions",
5783
+ value: function regenerateRowPositions() {
5784
+ var rows = this.getDisplayRows();
5785
+ var index = 1;
5786
+ rows.forEach(function (row) {
5787
+ if (row.type === "row") {
5788
+ row.setPosition(index);
5789
+ index++;
5790
+ }
5791
+ });
5732
5792
  }
5733
5793
  }, {
5734
5794
  key: "setActiveRows",
@@ -5788,7 +5848,7 @@
5788
5848
  }
5789
5849
 
5790
5850
  return rows;
5791
- } //repeat action accross display rows
5851
+ } //repeat action across display rows
5792
5852
 
5793
5853
  }, {
5794
5854
  key: "displayRowIterator",
@@ -5836,6 +5896,11 @@
5836
5896
  } else {
5837
5897
  this.dispatchExternal("renderStarted");
5838
5898
  this.renderer.rerenderRows(callback);
5899
+
5900
+ if (!this.fixedHeight) {
5901
+ this.adjustTableSize();
5902
+ }
5903
+
5839
5904
  this.dispatchExternal("renderComplete");
5840
5905
  }
5841
5906
  }
@@ -5845,7 +5910,7 @@
5845
5910
  var renderClass;
5846
5911
  var renderers = {
5847
5912
  "virtual": VirtualDomVertical,
5848
- "basic": BaiscVertical
5913
+ "basic": BasicVertical
5849
5914
  };
5850
5915
 
5851
5916
  if (typeof this.table.options.renderVertical === "string") {
@@ -5864,7 +5929,7 @@
5864
5929
  this.fixedHeight = false;
5865
5930
  }
5866
5931
  } else {
5867
- console.error("Unable to find matching renderer:", table.options.renderVertical);
5932
+ console.error("Unable to find matching renderer:", this.table.options.renderVertical);
5868
5933
  }
5869
5934
  }
5870
5935
  }, {
@@ -5885,7 +5950,7 @@
5885
5950
 
5886
5951
  if (this.firstRender) {
5887
5952
  this.firstRender = false;
5888
- this.layoutRefresh();
5953
+ this.layoutRefresh(true);
5889
5954
  }
5890
5955
  } else {
5891
5956
  this.renderEmptyScroll();
@@ -5917,12 +5982,12 @@
5917
5982
  }, {
5918
5983
  key: "_clearTable",
5919
5984
  value: function _clearTable() {
5920
- var element = this.tableElement;
5921
-
5922
5985
  this._clearPlaceholder();
5923
5986
 
5924
5987
  this.scrollTop = 0;
5925
- this.scrollLeft = 0;
5988
+ this.scrollLeft = 0; // clear empty table placeholder min
5989
+
5990
+ this.tableElement.style.minWidth = "";
5926
5991
  this.renderer.clearRows();
5927
5992
  }
5928
5993
  }, {
@@ -5976,13 +6041,15 @@
5976
6041
  }, {
5977
6042
  key: "adjustTableSize",
5978
6043
  value: function adjustTableSize() {
5979
- var initialHeight = this.element.clientHeight;
6044
+ var initialHeight = this.element.clientHeight,
6045
+ minHeight;
5980
6046
 
5981
6047
  if (this.renderer.verticalFillMode === "fill") {
5982
6048
  var 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));
5983
6049
 
5984
6050
  if (this.fixedHeight) {
5985
- this.element.style.minHeight = "calc(100% - " + otherHeight + "px)";
6051
+ minHeight = isNaN(this.table.options.minHeight) ? this.table.options.minHeight : this.table.options.minHeight + "px";
6052
+ this.element.style.minHeight = minHeight || "calc(100% - " + otherHeight + "px)";
5986
6053
  this.element.style.height = "calc(100% - " + otherHeight + "px)";
5987
6054
  this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)";
5988
6055
  } else {
@@ -6003,7 +6070,7 @@
6003
6070
  }
6004
6071
 
6005
6072
  this._positionPlaceholder();
6006
- } //renitialize all rows
6073
+ } //reinitialize all rows
6007
6074
 
6008
6075
  }, {
6009
6076
  key: "reinitialize",
@@ -6579,7 +6646,9 @@
6579
6646
  return this.bindings[type][name].bind(null, component);
6580
6647
  } else {
6581
6648
  if (name !== "then" && typeof name === "string" && !name.startsWith("_")) {
6582
- console.error("The " + type + " component does not have a " + name + " function, have you checked that you have the correct Tabulator module installed?");
6649
+ if (this.table.options.debugInvalidComponentFuncs) {
6650
+ console.error("The " + type + " component does not have a " + name + " function, have you checked that you have the correct Tabulator module installed?");
6651
+ }
6583
6652
  }
6584
6653
  }
6585
6654
  }
@@ -6748,7 +6817,7 @@
6748
6817
  this.subscriptionNotifiers[key].push(callback);
6749
6818
 
6750
6819
  if (this.subscribed(key)) {
6751
- this._notifiySubscriptionChange(key, true);
6820
+ this._notifySubscriptionChange(key, true);
6752
6821
  }
6753
6822
  }
6754
6823
  }, {
@@ -6760,7 +6829,7 @@
6760
6829
 
6761
6830
  this.events[key].push(callback);
6762
6831
 
6763
- this._notifiySubscriptionChange(key, true);
6832
+ this._notifySubscriptionChange(key, true);
6764
6833
  }
6765
6834
  }, {
6766
6835
  key: "unsubscribe",
@@ -6787,7 +6856,7 @@
6787
6856
  return;
6788
6857
  }
6789
6858
 
6790
- this._notifiySubscriptionChange(key, false);
6859
+ this._notifySubscriptionChange(key, false);
6791
6860
  }
6792
6861
  }, {
6793
6862
  key: "subscribed",
@@ -6795,8 +6864,8 @@
6795
6864
  return this.events[key] && this.events[key].length;
6796
6865
  }
6797
6866
  }, {
6798
- key: "_notifiySubscriptionChange",
6799
- value: function _notifiySubscriptionChange(key, subscribed) {
6867
+ key: "_notifySubscriptionChange",
6868
+ value: function _notifySubscriptionChange(key, subscribed) {
6800
6869
  var notifiers = this.subscriptionNotifiers[key];
6801
6870
 
6802
6871
  if (notifiers) {
@@ -6868,7 +6937,7 @@
6868
6937
  this.subscriptionNotifiers[key].push(callback);
6869
6938
 
6870
6939
  if (this.subscribed(key)) {
6871
- this._notifiySubscriptionChange(key, true);
6940
+ this._notifySubscriptionChange(key, true);
6872
6941
  }
6873
6942
  }
6874
6943
  }, {
@@ -6888,7 +6957,7 @@
6888
6957
  return a.priority - b.priority;
6889
6958
  });
6890
6959
 
6891
- this._notifiySubscriptionChange(key, true);
6960
+ this._notifySubscriptionChange(key, true);
6892
6961
  }
6893
6962
  }, {
6894
6963
  key: "unsubscribe",
@@ -6913,7 +6982,7 @@
6913
6982
  return;
6914
6983
  }
6915
6984
 
6916
- this._notifiySubscriptionChange(key, false);
6985
+ this._notifySubscriptionChange(key, false);
6917
6986
  }
6918
6987
  }, {
6919
6988
  key: "subscribed",
@@ -6962,8 +7031,8 @@
6962
7031
  return confirmed;
6963
7032
  }
6964
7033
  }, {
6965
- key: "_notifiySubscriptionChange",
6966
- value: function _notifiySubscriptionChange(key, subscribed) {
7034
+ key: "_notifySubscriptionChange",
7035
+ value: function _notifySubscriptionChange(key, subscribed) {
6967
7036
  var notifiers = this.subscriptionNotifiers[key];
6968
7037
 
6969
7038
  if (notifiers) {
@@ -6982,7 +7051,7 @@
6982
7051
 
6983
7052
  if (this.events[key]) {
6984
7053
  this.events[key].forEach(function (subscriber) {
6985
- var callResult = subscriber.callback.apply(_this3, args);
7054
+ subscriber.callback.apply(_this3, args);
6986
7055
  });
6987
7056
  }
6988
7057
  }
@@ -7036,6 +7105,68 @@
7036
7105
  return InternalEventBus;
7037
7106
  }();
7038
7107
 
7108
+ var DeprecationAdvisor = /*#__PURE__*/function (_CoreFeature) {
7109
+ _inherits(DeprecationAdvisor, _CoreFeature);
7110
+
7111
+ var _super = _createSuper(DeprecationAdvisor);
7112
+
7113
+ function DeprecationAdvisor(table) {
7114
+ _classCallCheck(this, DeprecationAdvisor);
7115
+
7116
+ return _super.call(this, table);
7117
+ }
7118
+
7119
+ _createClass(DeprecationAdvisor, [{
7120
+ key: "_warnUser",
7121
+ value: function _warnUser() {
7122
+ if (this.options("debugDeprecation")) {
7123
+ var _console;
7124
+
7125
+ (_console = console).warn.apply(_console, arguments);
7126
+ }
7127
+ }
7128
+ }, {
7129
+ key: "check",
7130
+ value: function check(oldOption, newOption) {
7131
+ var msg = "";
7132
+
7133
+ if (typeof this.options(oldOption) !== "undefined") {
7134
+ msg = "Deprecated Setup Option - Use of the %c" + oldOption + "%c option is now deprecated";
7135
+
7136
+ if (newOption) {
7137
+ msg = msg + ", Please use the %c" + newOption + "%c option instead";
7138
+
7139
+ this._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');
7140
+ } else {
7141
+ this._warnUser(msg, 'font-weight: bold;', 'font-weight: normal;');
7142
+ }
7143
+
7144
+ return false;
7145
+ } else {
7146
+ return true;
7147
+ }
7148
+ }
7149
+ }, {
7150
+ key: "checkMsg",
7151
+ value: function checkMsg(oldOption, msg) {
7152
+ if (typeof this.options(oldOption) !== "undefined") {
7153
+ this._warnUser("%cDeprecated Setup Option - Use of the %c" + oldOption + " %c option is now deprecated, " + msg, 'font-weight: normal;', 'font-weight: bold;', 'font-weight: normal;');
7154
+
7155
+ return false;
7156
+ } else {
7157
+ return true;
7158
+ }
7159
+ }
7160
+ }, {
7161
+ key: "msg",
7162
+ value: function msg(_msg) {
7163
+ this._warnUser(_msg);
7164
+ }
7165
+ }]);
7166
+
7167
+ return DeprecationAdvisor;
7168
+ }(CoreFeature);
7169
+
7039
7170
  var TableRegistry = /*#__PURE__*/function () {
7040
7171
  function TableRegistry() {
7041
7172
  _classCallCheck(this, TableRegistry);
@@ -7126,16 +7257,24 @@
7126
7257
  _this.blurCallback = null;
7127
7258
  _this.renderedCallback = null;
7128
7259
  _this.visible = false;
7260
+ _this.hideable = true;
7129
7261
 
7130
7262
  _this.element.classList.add("tabulator-popup-container");
7131
7263
 
7132
7264
  _this.blurEvent = _this.hide.bind(_assertThisInitialized(_this), false);
7133
7265
  _this.escEvent = _this._escapeCheck.bind(_assertThisInitialized(_this));
7134
- _this.destroyBinding = _this.hide.bind(_assertThisInitialized(_this), true);
7266
+ _this.destroyBinding = _this.tableDestroyed;
7267
+ _this.destroyed = false;
7135
7268
  return _this;
7136
7269
  }
7137
7270
 
7138
7271
  _createClass(Popup, [{
7272
+ key: "tableDestroyed",
7273
+ value: function tableDestroyed() {
7274
+ this.destroyed = true;
7275
+ this.hide(true);
7276
+ }
7277
+ }, {
7139
7278
  key: "_lookupContainer",
7140
7279
  value: function _lookupContainer() {
7141
7280
  var container = this.table.options.popupContainer;
@@ -7233,6 +7372,10 @@
7233
7372
  value: function show(origin, position) {
7234
7373
  var x, y, parentEl, parentOffset, coords;
7235
7374
 
7375
+ if (this.destroyed || this.table.destroyed) {
7376
+ return this;
7377
+ }
7378
+
7236
7379
  if (origin instanceof HTMLElement) {
7237
7380
  parentEl = origin;
7238
7381
  coords = this.elementPositionCoords(origin, position);
@@ -7265,6 +7408,9 @@
7265
7408
 
7266
7409
  this.visible = true;
7267
7410
  this.subscribe("table-destroy", this.destroyBinding);
7411
+ this.element.addEventListener("mousedown", function (e) {
7412
+ e.stopPropagation();
7413
+ });
7268
7414
  return this;
7269
7415
  }
7270
7416
  }, {
@@ -7320,6 +7466,7 @@
7320
7466
 
7321
7467
  document.body.addEventListener("click", _this2.blurEvent);
7322
7468
  document.body.addEventListener("contextmenu", _this2.blurEvent);
7469
+ document.body.addEventListener("mousedown", _this2.blurEvent);
7323
7470
  window.addEventListener("resize", _this2.blurEvent);
7324
7471
  document.body.addEventListener("keydown", _this2.escEvent);
7325
7472
  }, 100);
@@ -7335,16 +7482,27 @@
7335
7482
  this.hide();
7336
7483
  }
7337
7484
  }
7485
+ }, {
7486
+ key: "blockHide",
7487
+ value: function blockHide() {
7488
+ this.hideable = false;
7489
+ }
7490
+ }, {
7491
+ key: "restoreHide",
7492
+ value: function restoreHide() {
7493
+ this.hideable = true;
7494
+ }
7338
7495
  }, {
7339
7496
  key: "hide",
7340
7497
  value: function hide() {
7341
7498
  var silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
7342
7499
 
7343
- if (this.visible) {
7500
+ if (this.visible && this.hideable) {
7344
7501
  if (this.blurable) {
7345
7502
  document.body.removeEventListener("keydown", this.escEvent);
7346
7503
  document.body.removeEventListener("click", this.blurEvent);
7347
7504
  document.body.removeEventListener("contextmenu", this.blurEvent);
7505
+ document.body.removeEventListener("mousedown", this.blurEvent);
7348
7506
  window.removeEventListener("resize", this.blurEvent);
7349
7507
  this.table.rowManager.element.removeEventListener("scroll", this.blurEvent);
7350
7508
  this.unsubscribe("cell-editing", this.blurEvent);
@@ -7405,7 +7563,7 @@
7405
7563
 
7406
7564
  _createClass(Module, [{
7407
7565
  key: "initialize",
7408
- value: function initialize() {// setup module when table is initialized, to be overriden in module
7566
+ value: function initialize() {// setup module when table is initialized, to be overridden in module
7409
7567
  } ///////////////////////////////////
7410
7568
  ////// Options Registration ///////
7411
7569
  ///////////////////////////////////
@@ -7514,8 +7672,10 @@
7514
7672
  }(CoreFeature);
7515
7673
 
7516
7674
  //resize columns to fit data they contain
7517
- function fitData (columns) {
7518
- this.table.columnManager.renderer.reinitializeColumnWidths(columns);
7675
+ function fitData (columns, forced) {
7676
+ if (forced) {
7677
+ this.table.columnManager.renderer.reinitializeColumnWidths(columns);
7678
+ }
7519
7679
 
7520
7680
  if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) {
7521
7681
  this.table.modules.responsiveLayout.update();
@@ -7523,7 +7683,7 @@
7523
7683
  }
7524
7684
 
7525
7685
  //resize columns to fit data they contain and stretch row to fill table, also used for fitDataTable
7526
- function fitDataGeneral (columns) {
7686
+ function fitDataGeneral (columns, forced) {
7527
7687
  columns.forEach(function (column) {
7528
7688
  column.reinitializeWidth();
7529
7689
  });
@@ -7534,7 +7694,7 @@
7534
7694
  }
7535
7695
 
7536
7696
  //resize columns to fit data the contain and stretch last column to fill table
7537
- function fitDataStretch (columns) {
7697
+ function fitDataStretch (columns, forced) {
7538
7698
  var _this = this;
7539
7699
 
7540
7700
  var colsWidth = 0,
@@ -7576,14 +7736,14 @@
7576
7736
  }
7577
7737
 
7578
7738
  //resize columns to fit
7579
- function fitColumns (columns) {
7739
+ function fitColumns (columns, forced) {
7580
7740
  var totalWidth = this.table.element.clientWidth; //table element width
7581
7741
 
7582
7742
  var fixedWidth = 0; //total width of columns with a defined width
7583
7743
 
7584
7744
  var flexWidth = 0; //total width available to flexible columns
7585
7745
 
7586
- var flexGrowUnits = 0; //total number of widthGrow blocks accross all columns
7746
+ var flexGrowUnits = 0; //total number of widthGrow blocks across all columns
7587
7747
 
7588
7748
  var flexColWidth = 0; //desired width of flexible columns
7589
7749
 
@@ -7591,7 +7751,7 @@
7591
7751
 
7592
7752
  var fixedShrinkColumns = []; //array of fixed width columns that can shrink
7593
7753
 
7594
- var flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns
7754
+ var flexShrinkUnits = 0; //total number of widthShrink blocks across all columns
7595
7755
 
7596
7756
  var overflowWidth = 0; //horizontal overflow width
7597
7757
 
@@ -7713,11 +7873,11 @@
7713
7873
 
7714
7874
  flexColWidth = Math.floor(flexWidth / flexGrowUnits); //generate column widths
7715
7875
 
7716
- var gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false); //increase width of last column to account for rounding errors
7876
+ gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false); //increase width of last column to account for rounding errors
7717
7877
 
7718
7878
  if (flexColumns.length && gapFill > 0) {
7719
7879
  flexColumns[flexColumns.length - 1].width += +gapFill;
7720
- } //caculate space for columns to be shrunk into
7880
+ } //calculate space for columns to be shrunk into
7721
7881
 
7722
7882
 
7723
7883
  flexColumns.forEach(function (col) {
@@ -7799,9 +7959,9 @@
7799
7959
 
7800
7960
  }, {
7801
7961
  key: "layout",
7802
- value: function layout() {
7962
+ value: function layout(dataChanged) {
7803
7963
  this.dispatch("layout-refreshing");
7804
- Layout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex);
7964
+ Layout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex, dataChanged);
7805
7965
  this.dispatch("layout-refreshed");
7806
7966
  }
7807
7967
  }]);
@@ -7895,7 +8055,7 @@
7895
8055
  this.registerTableFunction("setLocale", this.setLocale.bind(this));
7896
8056
  this.registerTableFunction("getLocale", this.getLocale.bind(this));
7897
8057
  this.registerTableFunction("getLang", this.getLang.bind(this));
7898
- } //set header placehoder
8058
+ } //set header placeholder
7899
8059
 
7900
8060
  }, {
7901
8061
  key: "setHeaderFilterPlaceholder",
@@ -7937,7 +8097,7 @@
7937
8097
  }, {
7938
8098
  key: "setLocale",
7939
8099
  value: function setLocale(desiredLocale) {
7940
- desiredLocale = desiredLocale || "default"; //fill in any matching languge values
8100
+ desiredLocale = desiredLocale || "default"; //fill in any matching language values
7941
8101
 
7942
8102
  function traverseLang(trans, path) {
7943
8103
  for (var prop in trans) {
@@ -7951,7 +8111,7 @@
7951
8111
  path[prop] = trans[prop];
7952
8112
  }
7953
8113
  }
7954
- } //determing correct locale to load
8114
+ } //determining correct locale to load
7955
8115
 
7956
8116
 
7957
8117
  if (desiredLocale === true && navigator.language) {
@@ -8002,8 +8162,8 @@
8002
8162
  }, {
8003
8163
  key: "getText",
8004
8164
  value: function getText(path, value) {
8005
- var path = value ? path + "|" + value : path,
8006
- pathArray = path.split("|"),
8165
+ var fillPath = value ? path + "|" + value : path,
8166
+ pathArray = fillPath.split("|"),
8007
8167
  text = this._getLangElement(pathArray, this.locale); // if(text === false){
8008
8168
  // console.warn("Localization Error - Matching localized text not found for given path: ", path);
8009
8169
  // }
@@ -8041,7 +8201,7 @@
8041
8201
 
8042
8202
  this.bindings[path].push(callback);
8043
8203
  callback(this.getText(path), this.lang);
8044
- } //itterate through bindings and trigger updates
8204
+ } //iterate through bindings and trigger updates
8045
8205
 
8046
8206
  }, {
8047
8207
  key: "_executeBindings",
@@ -8139,7 +8299,7 @@
8139
8299
  function ModuleBinder(tabulator, modules) {
8140
8300
  _classCallCheck(this, ModuleBinder);
8141
8301
 
8142
- this.bindStaticFuctionality(tabulator);
8302
+ this.bindStaticFunctionality(tabulator);
8143
8303
  this.bindModules(tabulator, coreModules, true);
8144
8304
 
8145
8305
  if (modules) {
@@ -8148,8 +8308,8 @@
8148
8308
  }
8149
8309
 
8150
8310
  _createClass(ModuleBinder, [{
8151
- key: "bindStaticFuctionality",
8152
- value: function bindStaticFuctionality(tabulator) {
8311
+ key: "bindStaticFunctionality",
8312
+ value: function bindStaticFunctionality(tabulator) {
8153
8313
  tabulator.moduleBindings = {};
8154
8314
 
8155
8315
  tabulator.extendModule = function (name, property, values) {
@@ -8370,8 +8530,10 @@
8370
8530
 
8371
8531
  this.modulesRegular = []; //hold regular modules bound to this table (for initialization purposes)
8372
8532
 
8533
+ this.deprecationAdvisor = new DeprecationAdvisor(this);
8373
8534
  this.optionsList = new OptionsList(this, "table constructor");
8374
8535
  this.initialized = false;
8536
+ this.destroyed = false;
8375
8537
 
8376
8538
  if (this.initializeElement(element)) {
8377
8539
  this.initializeCoreSystems(options); //delay table creation to allow event bindings immediately after the constructor
@@ -8598,6 +8760,7 @@
8598
8760
  key: "destroy",
8599
8761
  value: function destroy() {
8600
8762
  var element = this.element;
8763
+ this.destroyed = true;
8601
8764
  TableRegistry.deregister(this); //deregister table from inter-device communication
8602
8765
 
8603
8766
  this.eventBus.dispatch("table-destroy"); //clear row data
@@ -8614,6 +8777,7 @@
8614
8777
  }
8615
8778
 
8616
8779
  element.classList.remove("tabulator");
8780
+ this.externalEvents.dispatch("tableDestroyed");
8617
8781
  }
8618
8782
  }, {
8619
8783
  key: "_detectBrowser",
@@ -8634,7 +8798,7 @@
8634
8798
  this.browserSlow = false;
8635
8799
  }
8636
8800
 
8637
- 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(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));
8801
+ 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(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));
8638
8802
  }
8639
8803
  }, {
8640
8804
  key: "initGuard",
@@ -8664,14 +8828,20 @@
8664
8828
  key: "blockRedraw",
8665
8829
  value: function blockRedraw() {
8666
8830
  this.initGuard();
8667
- return this.rowManager.blockRedraw();
8831
+ this.eventBus.dispatch("redraw-blocking");
8832
+ this.rowManager.blockRedraw();
8833
+ this.columnManager.blockRedraw();
8834
+ this.eventBus.dispatch("redraw-blocked");
8668
8835
  } //restore table redrawing
8669
8836
 
8670
8837
  }, {
8671
8838
  key: "restoreRedraw",
8672
8839
  value: function restoreRedraw() {
8673
8840
  this.initGuard();
8674
- return this.rowManager.restoreRedraw();
8841
+ this.eventBus.dispatch("redraw-restoring");
8842
+ this.rowManager.restoreRedraw();
8843
+ this.columnManager.restoreRedraw();
8844
+ this.eventBus.dispatch("redraw-restored");
8675
8845
  } //load data
8676
8846
 
8677
8847
  }, {
@@ -8834,8 +9004,8 @@
8834
9004
 
8835
9005
  }, {
8836
9006
  key: "getRowFromPosition",
8837
- value: function getRowFromPosition(position, active) {
8838
- var row = this.rowManager.getRowFromPosition(position, active);
9007
+ value: function getRowFromPosition(position) {
9008
+ var row = this.rowManager.getRowFromPosition(position);
8839
9009
 
8840
9010
  if (row) {
8841
9011
  return row.getComponent();
@@ -8871,7 +9041,6 @@
8871
9041
  } else {
8872
9042
  console.error("Delete Error - No matching row found:", item);
8873
9043
  return Promise.reject("Delete Error - No matching row found");
8874
- break;
8875
9044
  }
8876
9045
  } //sort rows into correct order to ensure smooth delete from table
8877
9046
 
@@ -8904,7 +9073,7 @@
8904
9073
  return this.rowManager.addRows(data, pos, index).then(function (rows) {
8905
9074
  return rows[0].getComponent();
8906
9075
  });
8907
- } //update a row if it exitsts otherwise create it
9076
+ } //update a row if it exists otherwise create it
8908
9077
 
8909
9078
  }, {
8910
9079
  key: "updateOrAddRow",
@@ -8979,11 +9148,11 @@
8979
9148
 
8980
9149
  }, {
8981
9150
  key: "getRowPosition",
8982
- value: function getRowPosition(index, active) {
9151
+ value: function getRowPosition(index) {
8983
9152
  var row = this.rowManager.findRow(index);
8984
9153
 
8985
9154
  if (row) {
8986
- return this.rowManager.getRowPosition(row, active);
9155
+ return row.getPosition();
8987
9156
  } else {
8988
9157
  console.warn("Position Error - No matching row found:", index);
8989
9158
  return false;
@@ -9163,8 +9332,8 @@
9163
9332
  value: function dispatchEvent() {
9164
9333
  var _this$externalEvents;
9165
9334
 
9166
- var args = Array.from(arguments),
9167
- key = args.shift();
9335
+ var args = Array.from(arguments);
9336
+ args.shift();
9168
9337
 
9169
9338
  (_this$externalEvents = this.externalEvents).dispatch.apply(_this$externalEvents, arguments);
9170
9339
  } //////////////////// Alerts ///////////////////
@@ -9216,7 +9385,7 @@
9216
9385
 
9217
9386
  new ModuleBinder(Tabulator);
9218
9387
 
9219
- var defautlAccessors = {};
9388
+ var defaultAccessors = {};
9220
9389
 
9221
9390
  var Accessor = /*#__PURE__*/function (_Module) {
9222
9391
  _inherits(Accessor, _Module);
@@ -9324,7 +9493,7 @@
9324
9493
 
9325
9494
  var data = Helpers.deepClone(row.data || {});
9326
9495
  this.table.columnManager.traverse(function (column) {
9327
- var value, accessor, params, colCompnent;
9496
+ var value, accessor, params, colComponent;
9328
9497
 
9329
9498
  if (column.modules.accessor) {
9330
9499
  accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false;
@@ -9333,9 +9502,9 @@
9333
9502
  value = column.getFieldValue(data);
9334
9503
 
9335
9504
  if (value != "undefined") {
9336
- colCompnent = column.getComponent();
9337
- params = typeof accessor.params === "function" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params;
9338
- column.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent));
9505
+ colComponent = column.getComponent();
9506
+ params = typeof accessor.params === "function" ? accessor.params(value, data, type, colComponent, rowComponent) : accessor.params;
9507
+ column.setFieldValue(data, accessor.accessor(value, data, type, params, colComponent, rowComponent));
9339
9508
  }
9340
9509
  }
9341
9510
  }
@@ -9349,7 +9518,7 @@
9349
9518
 
9350
9519
 
9351
9520
  Accessor.moduleName = "accessor";
9352
- Accessor.accessors = defautlAccessors;
9521
+ Accessor.accessors = defaultAccessors;
9353
9522
 
9354
9523
  var defaultConfig = {
9355
9524
  method: "GET"
@@ -9720,7 +9889,7 @@
9720
9889
  });
9721
9890
 
9722
9891
  if (data.length && !(data.length === 1 && data[0].length < 2)) {
9723
-
9892
+ //check if headers are present by title
9724
9893
  data[0].forEach(function (value) {
9725
9894
  var column = columns.find(function (column) {
9726
9895
  return value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim();
@@ -9804,7 +9973,7 @@
9804
9973
  _this.registerTableOption("clipboardCopyConfig", false); //clipboard config
9805
9974
 
9806
9975
 
9807
- _this.registerTableOption("clipboardCopyFormatter", false); //DEPRICATED - REMOVE in 5.0
9976
+ _this.registerTableOption("clipboardCopyFormatter", false); //DEPRECATED - REMOVE in 5.0
9808
9977
 
9809
9978
 
9810
9979
  _this.registerTableOption("clipboardCopyRowRange", "active"); //restrict clipboard to visible rows only
@@ -9845,9 +10014,8 @@
9845
10014
  plain = _this2.table.options.clipboardCopyFormatter("plain", plain);
9846
10015
  }
9847
10016
  } else {
9848
- var list = _this2.table.modules["export"].generateExportList(_this2.table.options.clipboardCopyConfig, _this2.table.options.clipboardCopyStyled, _this2.rowRange, "clipboard");
9849
-
9850
- html = _this2.table.modules["export"].genereateHTMLTable(list);
10017
+ list = _this2.table.modules["export"].generateExportList(_this2.table.options.clipboardCopyConfig, _this2.table.options.clipboardCopyStyled, _this2.rowRange, "clipboard");
10018
+ html = _this2.table.modules["export"].generateHTMLTable(list);
9851
10019
  plain = html ? _this2.generatePlainContent(list) : "";
9852
10020
 
9853
10021
  if (_this2.table.options.clipboardCopyFormatter) {
@@ -9936,7 +10104,7 @@
9936
10104
  }, {
9937
10105
  key: "copy",
9938
10106
  value: function copy(range, internal) {
9939
- var range, sel, textRange;
10107
+ var sel, textRange;
9940
10108
  this.blocked = false;
9941
10109
  this.customSelection = false;
9942
10110
 
@@ -10472,23 +10640,27 @@
10472
10640
  key: "scrollHorizontal",
10473
10641
  value: function scrollHorizontal(left) {
10474
10642
  if (this.botInitialized && this.botRow) {
10475
- this.botRow.getElement().style.marginLeft = -left + "px";
10643
+ if (this.table.rtl) {
10644
+ this.botRow.getElement().style.marginRight = left + "px";
10645
+ } else {
10646
+ this.botRow.getElement().style.marginLeft = -left + "px";
10647
+ }
10476
10648
  }
10477
10649
  }
10478
10650
  }, {
10479
10651
  key: "recalc",
10480
10652
  value: function recalc(rows) {
10481
- var row;
10653
+ var data, row;
10482
10654
 
10483
10655
  if (this.topInitialized || this.botInitialized) {
10484
- this.rowsToData(rows);
10656
+ data = this.rowsToData(rows);
10485
10657
 
10486
10658
  if (this.topInitialized) {
10487
10659
  if (this.topRow) {
10488
10660
  this.topRow.deleteCells();
10489
10661
  }
10490
10662
 
10491
- row = this.generateRow("top", this.rowsToData(rows));
10663
+ row = this.generateRow("top", data);
10492
10664
  this.topRow = row;
10493
10665
 
10494
10666
  while (this.topElement.firstChild) {
@@ -10504,7 +10676,7 @@
10504
10676
  this.botRow.deleteCells();
10505
10677
  }
10506
10678
 
10507
- row = this.generateRow("bottom", this.rowsToData(rows));
10679
+ row = this.generateRow("bottom", data);
10508
10680
  this.botRow = row;
10509
10681
 
10510
10682
  while (this.botElement.firstChild) {
@@ -10648,7 +10820,7 @@
10648
10820
  formatter: _this4.table.modules.format.getFormatter("plaintext"),
10649
10821
  params: {}
10650
10822
  };
10651
- } //ensure css class defintion is replicated to calculation cell
10823
+ } //ensure css class definition is replicated to calculation cell
10652
10824
 
10653
10825
 
10654
10826
  _this4.genColumn.definition.cssClass = column.definition.cssClass; //generate cell and assign to correct column
@@ -10821,7 +10993,7 @@
10821
10993
  _this.registerTableOption("dataTreeChildColumnCalcs", false); //include visible data tree rows in column calculations
10822
10994
 
10823
10995
 
10824
- _this.registerTableOption("dataTreeSelectPropagate", false); //seleccting a parent row selects its children
10996
+ _this.registerTableOption("dataTreeSelectPropagate", false); //selecting a parent row selects its children
10825
10997
  //register component functions
10826
10998
 
10827
10999
 
@@ -11068,8 +11240,8 @@
11068
11240
  var _this4 = this;
11069
11241
 
11070
11242
  var config = row.modules.dataTree,
11071
- el = el || row.getCells()[0].getElement(),
11072
11243
  oldControl = config.controlEl;
11244
+ el = el || row.getCells()[0].getElement();
11073
11245
 
11074
11246
  if (config.children !== false) {
11075
11247
  if (config.open) {
@@ -11357,8 +11529,10 @@
11357
11529
  match = match.data;
11358
11530
  }
11359
11531
  }
11532
+ } else if (subject === null) {
11533
+ match = false;
11360
11534
  }
11361
- } else if (typeof subject == "undefined" || subject === null) {
11535
+ } else if (typeof subject == "undefined") {
11362
11536
  match = false;
11363
11537
  } else {
11364
11538
  //subject should be treated as the index of the row
@@ -11423,8 +11597,10 @@
11423
11597
 
11424
11598
  DataTree.moduleName = "dataTree";
11425
11599
 
11426
- function csv (list, options, setFileContents) {
11427
- var delimiter = options && options.delimiter ? options.delimiter : ",",
11600
+ function csv (list) {
11601
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
11602
+ var setFileContents = arguments.length > 2 ? arguments[2] : undefined;
11603
+ var delimiter = options.delimiter ? options.delimiter : ",",
11428
11604
  fileContents = [],
11429
11605
  headers = [];
11430
11606
  list.forEach(function (row) {
@@ -11512,7 +11688,9 @@
11512
11688
  setFileContents(fileContents, "application/json");
11513
11689
  }
11514
11690
 
11515
- function pdf (list, options, setFileContents) {
11691
+ function pdf (list) {
11692
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
11693
+ var setFileContents = arguments.length > 2 ? arguments[2] : undefined;
11516
11694
  var header = [],
11517
11695
  body = [],
11518
11696
  autoTableParams = {},
@@ -11529,7 +11707,7 @@
11529
11707
  fillColor: 232
11530
11708
  },
11531
11709
  jsPDFParams = options.jsPDF || {},
11532
- title = options && options.title ? options.title : "";
11710
+ title = options.title ? options.title : "";
11533
11711
 
11534
11712
  if (!jsPDFParams.orientation) {
11535
11713
  jsPDFParams.orientation = options.orientation || "landscape";
@@ -11541,7 +11719,6 @@
11541
11719
 
11542
11720
 
11543
11721
  list.forEach(function (row) {
11544
-
11545
11722
  switch (row.type) {
11546
11723
  case "header":
11547
11724
  header.push(parseRow(row));
@@ -11596,7 +11773,7 @@
11596
11773
 
11597
11774
  var doc = new jspdf.jsPDF(jsPDFParams); //set document to landscape, better for most tables
11598
11775
 
11599
- if (options && options.autoTable) {
11776
+ if (options.autoTable) {
11600
11777
  if (typeof options.autoTable === "function") {
11601
11778
  autoTableParams = options.autoTable(doc) || {};
11602
11779
  } else {
@@ -11614,7 +11791,7 @@
11614
11791
  autoTableParams.body = body;
11615
11792
  doc.autoTable(autoTableParams);
11616
11793
 
11617
- if (options && options.documentProcessing) {
11794
+ if (options.documentProcessing) {
11618
11795
  options.documentProcessing(doc);
11619
11796
  }
11620
11797
 
@@ -11739,7 +11916,7 @@
11739
11916
 
11740
11917
  function html (list, options, setFileContents) {
11741
11918
  if (this.modExists("export", true)) {
11742
- setFileContents(this.modules["export"].genereateHTMLTable(list), "text/html");
11919
+ setFileContents(this.modules["export"].generateHTMLTable(list), "text/html");
11743
11920
  }
11744
11921
  }
11745
11922
 
@@ -11794,11 +11971,16 @@
11794
11971
 
11795
11972
  _this = _super.call(this, table);
11796
11973
 
11797
- _this.registerTableOption("downloadReady", function (data, blob) {
11798
- return blob;
11974
+ _this.registerTableOption("downloadEncoder", function (data, mimeType) {
11975
+ return new Blob([data], {
11976
+ type: mimeType
11977
+ });
11799
11978
  }); //function to manipulate download data
11800
11979
 
11801
11980
 
11981
+ _this.registerTableOption("downloadReady", undefined); //warn of function deprecation
11982
+
11983
+
11802
11984
  _this.registerTableOption("downloadConfig", {}); //download config
11803
11985
 
11804
11986
 
@@ -11815,8 +11997,14 @@
11815
11997
  _createClass(Download, [{
11816
11998
  key: "initialize",
11817
11999
  value: function initialize() {
12000
+ this.deprecatedOptionsCheck();
11818
12001
  this.registerTableFunction("download", this.download.bind(this));
11819
12002
  this.registerTableFunction("downloadToTab", this.downloadToTab.bind(this));
12003
+ }
12004
+ }, {
12005
+ key: "deprecatedOptionsCheck",
12006
+ value: function deprecatedOptionsCheck() {
12007
+ this.deprecationCheck("downloadReady", "downloadEncoder");
11820
12008
  } ///////////////////////////////////
11821
12009
  ///////// Table Functions /////////
11822
12010
  ///////////////////////////////////
@@ -11890,16 +12078,14 @@
11890
12078
  key: "triggerDownload",
11891
12079
  value: function triggerDownload(data, mime, type, filename, newTab) {
11892
12080
  var element = document.createElement('a'),
11893
- blob = new Blob([data], {
11894
- type: mime
11895
- }),
11896
- filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type);
11897
- blob = this.table.options.downloadReady(data, blob);
12081
+ blob = this.table.options.downloadEncoder(data, mime);
11898
12082
 
11899
12083
  if (blob) {
11900
12084
  if (newTab) {
11901
12085
  window.open(window.URL.createObjectURL(blob));
11902
12086
  } else {
12087
+ filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type);
12088
+
11903
12089
  if (navigator.msSaveOrOpenBlob) {
11904
12090
  navigator.msSaveOrOpenBlob(blob, filename);
11905
12091
  } else {
@@ -12088,7 +12274,6 @@
12088
12274
  var cellValue = cell.getValue(),
12089
12275
  vertNav = editorParams.verticalNavigation || "hybrid",
12090
12276
  value = String(cellValue !== null && typeof cellValue !== "undefined" ? cellValue : ""),
12091
- count = (value.match(/(?:\r\n|\r|\n)/g) || []).length + 1,
12092
12277
  input = document.createElement("textarea"),
12093
12278
  scrollHeight = 0; //create and style input
12094
12279
 
@@ -12155,6 +12340,13 @@
12155
12340
  });
12156
12341
  input.addEventListener("keydown", function (e) {
12157
12342
  switch (e.keyCode) {
12343
+ case 13:
12344
+ if (e.shiftKey && editorParams.shiftEnterSubmit) {
12345
+ onChange();
12346
+ }
12347
+
12348
+ break;
12349
+
12158
12350
  case 27:
12159
12351
  cancel();
12160
12352
  break;
@@ -12377,6 +12569,302 @@
12377
12569
  return input;
12378
12570
  }
12379
12571
 
12572
+ //input element
12573
+ function date (cell, onRendered, success, cancel, editorParams) {
12574
+ var inputFormat = editorParams.format,
12575
+ DT = inputFormat ? window.DateTime || luxon.DateTime : null; //create and style input
12576
+
12577
+ var cellValue = cell.getValue(),
12578
+ input = document.createElement("input");
12579
+
12580
+ function convertDate(value) {
12581
+ var newDatetime;
12582
+
12583
+ if (DT.isDateTime(value)) {
12584
+ newDatetime = value;
12585
+ } else if (inputFormat === "iso") {
12586
+ newDatetime = DT.fromISO(String(value));
12587
+ } else {
12588
+ newDatetime = DT.fromFormat(String(value), inputFormat);
12589
+ }
12590
+
12591
+ return newDatetime.toFormat("yyyy-MM-dd");
12592
+ }
12593
+
12594
+ input.type = "date";
12595
+ input.style.padding = "4px";
12596
+ input.style.width = "100%";
12597
+ input.style.boxSizing = "border-box";
12598
+
12599
+ if (editorParams.max) {
12600
+ input.setAttribute("max", inputFormat ? convertDate(editorParams.max) : editorParams.max);
12601
+ }
12602
+
12603
+ if (editorParams.min) {
12604
+ input.setAttribute("min", inputFormat ? convertDate(editorParams.min) : editorParams.min);
12605
+ }
12606
+
12607
+ if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") {
12608
+ for (var key in editorParams.elementAttributes) {
12609
+ if (key.charAt(0) == "+") {
12610
+ key = key.slice(1);
12611
+ input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]);
12612
+ } else {
12613
+ input.setAttribute(key, editorParams.elementAttributes[key]);
12614
+ }
12615
+ }
12616
+ }
12617
+
12618
+ cellValue = typeof cellValue !== "undefined" ? cellValue : "";
12619
+
12620
+ if (inputFormat) {
12621
+ if (DT) {
12622
+ cellValue = convertDate(cellValue);
12623
+ } else {
12624
+ console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js");
12625
+ }
12626
+ }
12627
+
12628
+ input.value = cellValue;
12629
+ onRendered(function () {
12630
+ input.focus({
12631
+ preventScroll: true
12632
+ });
12633
+ input.style.height = "100%";
12634
+
12635
+ if (editorParams.selectContents) {
12636
+ input.select();
12637
+ }
12638
+ });
12639
+
12640
+ function onChange(e) {
12641
+ var value = input.value;
12642
+
12643
+ if ((cellValue === null || typeof cellValue === "undefined") && value !== "" || value !== cellValue) {
12644
+ if (value && inputFormat) {
12645
+ value = DT.fromFormat(String(value), "yyyy-MM-dd").toFormat(inputFormat);
12646
+ }
12647
+
12648
+ if (success(value)) {
12649
+ cellValue = input.value; //persist value if successfully validated incase editor is used as header filter
12650
+ }
12651
+ } else {
12652
+ cancel();
12653
+ }
12654
+ } //submit new value on blur or change
12655
+
12656
+
12657
+ input.addEventListener("change", onChange);
12658
+ input.addEventListener("blur", onChange); //submit new value on enter
12659
+
12660
+ input.addEventListener("keydown", function (e) {
12661
+ switch (e.keyCode) {
12662
+ // case 9:
12663
+ case 13:
12664
+ onChange();
12665
+ break;
12666
+
12667
+ case 27:
12668
+ cancel();
12669
+ break;
12670
+
12671
+ case 35:
12672
+ case 36:
12673
+ e.stopPropagation();
12674
+ break;
12675
+ }
12676
+ });
12677
+ return input;
12678
+ }
12679
+
12680
+ //input element
12681
+ function time (cell, onRendered, success, cancel, editorParams) {
12682
+ var inputFormat = editorParams.format,
12683
+ DT = inputFormat ? window.DateTime || luxon.DateTime : null,
12684
+ newDatetime; //create and style input
12685
+
12686
+ var cellValue = cell.getValue(),
12687
+ input = document.createElement("input");
12688
+ input.type = "time";
12689
+ input.style.padding = "4px";
12690
+ input.style.width = "100%";
12691
+ input.style.boxSizing = "border-box";
12692
+
12693
+ if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") {
12694
+ for (var key in editorParams.elementAttributes) {
12695
+ if (key.charAt(0) == "+") {
12696
+ key = key.slice(1);
12697
+ input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]);
12698
+ } else {
12699
+ input.setAttribute(key, editorParams.elementAttributes[key]);
12700
+ }
12701
+ }
12702
+ }
12703
+
12704
+ cellValue = typeof cellValue !== "undefined" ? cellValue : "";
12705
+
12706
+ if (inputFormat) {
12707
+ if (DT) {
12708
+ if (DT.isDateTime(cellValue)) {
12709
+ newDatetime = cellValue;
12710
+ } else if (inputFormat === "iso") {
12711
+ newDatetime = DT.fromISO(String(cellValue));
12712
+ } else {
12713
+ newDatetime = DT.fromFormat(String(cellValue), inputFormat);
12714
+ }
12715
+
12716
+ cellValue = newDatetime.toFormat("hh:mm");
12717
+ } else {
12718
+ console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js");
12719
+ }
12720
+ }
12721
+
12722
+ input.value = cellValue;
12723
+ onRendered(function () {
12724
+ input.focus({
12725
+ preventScroll: true
12726
+ });
12727
+ input.style.height = "100%";
12728
+
12729
+ if (editorParams.selectContents) {
12730
+ input.select();
12731
+ }
12732
+ });
12733
+
12734
+ function onChange(e) {
12735
+ var value = input.value;
12736
+
12737
+ if ((cellValue === null || typeof cellValue === "undefined") && value !== "" || value !== cellValue) {
12738
+ if (value && inputFormat) {
12739
+ value = DT.fromFormat(String(value), "hh:mm").toFormat(inputFormat);
12740
+ }
12741
+
12742
+ if (success(value)) {
12743
+ cellValue = input.value; //persist value if successfully validated incase editor is used as header filter
12744
+ }
12745
+ } else {
12746
+ cancel();
12747
+ }
12748
+ } //submit new value on blur or change
12749
+
12750
+
12751
+ input.addEventListener("change", onChange);
12752
+ input.addEventListener("blur", onChange); //submit new value on enter
12753
+
12754
+ input.addEventListener("keydown", function (e) {
12755
+ switch (e.keyCode) {
12756
+ // case 9:
12757
+ case 13:
12758
+ onChange();
12759
+ break;
12760
+
12761
+ case 27:
12762
+ cancel();
12763
+ break;
12764
+
12765
+ case 35:
12766
+ case 36:
12767
+ e.stopPropagation();
12768
+ break;
12769
+ }
12770
+ });
12771
+ return input;
12772
+ }
12773
+
12774
+ //input element
12775
+ function datetime (cell, onRendered, success, cancel, editorParams) {
12776
+ var inputFormat = editorParams.format,
12777
+ DT = inputFormat ? window.DateTime || luxon.DateTime : null,
12778
+ newDatetime; //create and style input
12779
+
12780
+ var cellValue = cell.getValue(),
12781
+ input = document.createElement("input");
12782
+ input.type = "datetime-local";
12783
+ input.style.padding = "4px";
12784
+ input.style.width = "100%";
12785
+ input.style.boxSizing = "border-box";
12786
+
12787
+ if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") {
12788
+ for (var key in editorParams.elementAttributes) {
12789
+ if (key.charAt(0) == "+") {
12790
+ key = key.slice(1);
12791
+ input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]);
12792
+ } else {
12793
+ input.setAttribute(key, editorParams.elementAttributes[key]);
12794
+ }
12795
+ }
12796
+ }
12797
+
12798
+ cellValue = typeof cellValue !== "undefined" ? cellValue : "";
12799
+
12800
+ if (inputFormat) {
12801
+ if (DT) {
12802
+ if (DT.isDateTime(cellValue)) {
12803
+ newDatetime = cellValue;
12804
+ } else if (inputFormat === "iso") {
12805
+ newDatetime = DT.fromISO(String(cellValue));
12806
+ } else {
12807
+ newDatetime = DT.fromFormat(String(cellValue), inputFormat);
12808
+ }
12809
+
12810
+ cellValue = newDatetime.toFormat("yyyy-MM-dd") + "T" + newDatetime.toFormat("hh:mm");
12811
+ } else {
12812
+ console.error("Editor Error - 'date' editor 'inputFormat' param is dependant on luxon.js");
12813
+ }
12814
+ }
12815
+
12816
+ input.value = cellValue;
12817
+ onRendered(function () {
12818
+ input.focus({
12819
+ preventScroll: true
12820
+ });
12821
+ input.style.height = "100%";
12822
+
12823
+ if (editorParams.selectContents) {
12824
+ input.select();
12825
+ }
12826
+ });
12827
+
12828
+ function onChange(e) {
12829
+ var value = input.value;
12830
+
12831
+ if ((cellValue === null || typeof cellValue === "undefined") && value !== "" || value !== cellValue) {
12832
+ if (value && inputFormat) {
12833
+ value = DT.fromISO(String(value)).toFormat(inputFormat);
12834
+ }
12835
+
12836
+ if (success(value)) {
12837
+ cellValue = input.value; //persist value if successfully validated incase editor is used as header filter
12838
+ }
12839
+ } else {
12840
+ cancel();
12841
+ }
12842
+ } //submit new value on blur or change
12843
+
12844
+
12845
+ input.addEventListener("change", onChange);
12846
+ input.addEventListener("blur", onChange); //submit new value on enter
12847
+
12848
+ input.addEventListener("keydown", function (e) {
12849
+ switch (e.keyCode) {
12850
+ // case 9:
12851
+ case 13:
12852
+ onChange();
12853
+ break;
12854
+
12855
+ case 27:
12856
+ cancel();
12857
+ break;
12858
+
12859
+ case 35:
12860
+ case 36:
12861
+ e.stopPropagation();
12862
+ break;
12863
+ }
12864
+ });
12865
+ return input;
12866
+ }
12867
+
12380
12868
  var Edit = /*#__PURE__*/function () {
12381
12869
  function Edit(editor, cell, onRendered, success, cancel, editorParams) {
12382
12870
  _classCallCheck(this, Edit);
@@ -12399,13 +12887,14 @@
12399
12887
  this.values = [];
12400
12888
  this.popup = null;
12401
12889
  this.listIteration = 0;
12890
+ this.lastAction = "";
12402
12891
  this.blurable = true;
12403
12892
  this.actions = {
12404
12893
  success: success,
12405
12894
  cancel: cancel
12406
12895
  };
12407
12896
 
12408
- this._deprecationCheck();
12897
+ this._deprecatedOptionsCheck();
12409
12898
 
12410
12899
  this._initializeValue();
12411
12900
 
@@ -12413,22 +12902,22 @@
12413
12902
  }
12414
12903
 
12415
12904
  _createClass(Edit, [{
12416
- key: "_deprecationCheck",
12417
- value: function _deprecationCheck() {
12905
+ key: "_deprecatedOptionsCheck",
12906
+ value: function _deprecatedOptionsCheck() {
12418
12907
  if (this.params.listItemFormatter) {
12419
- console.warn("The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options");
12908
+ this.cell.getTable().deprecationAdvisor.msg("The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options");
12420
12909
  }
12421
12910
 
12422
12911
  if (this.params.sortValuesList) {
12423
- console.warn("The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options");
12912
+ this.cell.getTable().deprecationAdvisor.msg("The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options");
12424
12913
  }
12425
12914
 
12426
12915
  if (this.params.searchFunc) {
12427
- console.warn("The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options");
12916
+ this.cell.getTable().deprecationAdvisor.msg("The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options");
12428
12917
  }
12429
12918
 
12430
12919
  if (this.params.searchingPlaceholder) {
12431
- console.warn("The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options");
12920
+ this.cell.getTable().deprecationAdvisor.msg("The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options");
12432
12921
  }
12433
12922
  }
12434
12923
  }, {
@@ -12464,6 +12953,7 @@
12464
12953
  setTimeout(function () {
12465
12954
  cellEl.removeEventListener("click", clickStop);
12466
12955
  }, 1000);
12956
+ this.input.addEventListener("mousedown", this._preventPopupBlur.bind(this));
12467
12957
  }
12468
12958
  }, {
12469
12959
  key: "_createListElement",
@@ -12582,7 +13072,7 @@
12582
13072
  }
12583
13073
  }
12584
13074
 
12585
- if (params.filterRemote && !(typeof params.valuesLookup === "function" || _typeof(params.valuesURL))) {
13075
+ if (params.filterRemote && !(typeof params.valuesLookup === "function" || params.valuesURL)) {
12586
13076
  params.filterRemote = false;
12587
13077
  console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source");
12588
13078
  }
@@ -12632,8 +13122,12 @@
12632
13122
  }, {
12633
13123
  key: "_inputBlur",
12634
13124
  value: function _inputBlur(e) {
12635
- if (this.blurable && this.popup) {
12636
- this.popup.hide();
13125
+ if (this.blurable) {
13126
+ if (this.popup) {
13127
+ this.popup.hide();
13128
+ } else {
13129
+ this._resolveValue(true);
13130
+ }
12637
13131
  }
12638
13132
  }
12639
13133
  }, {
@@ -12717,12 +13211,29 @@
12717
13211
 
12718
13212
  }
12719
13213
  }
13214
+ }, {
13215
+ key: "_preventPopupBlur",
13216
+ value: function _preventPopupBlur() {
13217
+ var _this2 = this;
13218
+
13219
+ if (this.popup) {
13220
+ this.popup.blockHide();
13221
+ }
13222
+
13223
+ setTimeout(function () {
13224
+ if (_this2.popup) {
13225
+ _this2.popup.restoreHide();
13226
+ }
13227
+ }, 10);
13228
+ }
12720
13229
  }, {
12721
13230
  key: "_preventBlur",
12722
13231
  value: function _preventBlur() {
13232
+ var _this3 = this;
13233
+
12723
13234
  this.blurable = false;
12724
13235
  setTimeout(function () {
12725
- this.blurable = true;
13236
+ _this3.blurable = true;
12726
13237
  }, 10);
12727
13238
  } //////////////////////////////////////
12728
13239
  //////// Keyboard Navigation /////////
@@ -12772,10 +13283,12 @@
12772
13283
  }, {
12773
13284
  key: "_keyEnter",
12774
13285
  value: function _keyEnter(e) {
12775
- if (this.focusedItem) {
12776
- this._chooseItem(this.focusedItem);
13286
+ if (this.params.autocomplete && this.lastAction === "typing") {
13287
+ this._resolveValue(true);
12777
13288
  } else {
12778
- this._cancel();
13289
+ if (this.focusedItem) {
13290
+ this._chooseItem(this.focusedItem);
13291
+ }
12779
13292
  }
12780
13293
  }
12781
13294
  }, {
@@ -12808,18 +13321,19 @@
12808
13321
  value: function _keyAutoCompLetter(e) {
12809
13322
  this._filter();
12810
13323
 
13324
+ this.lastAction = "typing";
12811
13325
  this.typing = true;
12812
13326
  }
12813
13327
  }, {
12814
13328
  key: "_scrollToValue",
12815
13329
  value: function _scrollToValue(_char) {
12816
- var _this2 = this;
13330
+ var _this4 = this;
12817
13331
 
12818
13332
  clearTimeout(this.filterTimeout);
12819
13333
  var character = String.fromCharCode(_char).toLowerCase();
12820
13334
  this.filterTerm += character.toLowerCase();
12821
13335
  var match = this.displayItems.find(function (item) {
12822
- return typeof item.label !== "undefined" && item.label.toLowerCase().startsWith(_this2.filterTerm);
13336
+ return typeof item.label !== "undefined" && item.label.toLowerCase().startsWith(_this4.filterTerm);
12823
13337
  });
12824
13338
 
12825
13339
  if (match) {
@@ -12827,12 +13341,14 @@
12827
13341
  }
12828
13342
 
12829
13343
  this.filterTimeout = setTimeout(function () {
12830
- _this2.filterTerm = "";
13344
+ _this4.filterTerm = "";
12831
13345
  }, 800);
12832
13346
  }
12833
13347
  }, {
12834
13348
  key: "_focusItem",
12835
13349
  value: function _focusItem(item) {
13350
+ this.lastAction = "focus";
13351
+
12836
13352
  if (this.focusedItem && this.focusedItem.element) {
12837
13353
  this.focusedItem.element.classList.remove("focused");
12838
13354
  }
@@ -12875,10 +13391,10 @@
12875
13391
  }, {
12876
13392
  key: "_generateOptions",
12877
13393
  value: function _generateOptions(silent) {
12878
- var _this3 = this;
13394
+ var _this5 = this;
12879
13395
 
12880
13396
  var values = [];
12881
- var itteration = ++this.listIteration;
13397
+ var iteration = ++this.listIteration;
12882
13398
  this.filtered = false;
12883
13399
 
12884
13400
  if (this.params.values) {
@@ -12899,10 +13415,10 @@
12899
13415
  }
12900
13416
 
12901
13417
  return values.then().then(function (responseValues) {
12902
- if (_this3.listIteration === itteration) {
12903
- return _this3._parseList(responseValues);
13418
+ if (_this5.listIteration === iteration) {
13419
+ return _this5._parseList(responseValues);
12904
13420
  } else {
12905
- return Promise.reject(itteration);
13421
+ return Promise.reject(iteration);
12906
13422
  }
12907
13423
  });
12908
13424
  } else {
@@ -12915,7 +13431,7 @@
12915
13431
  var placeholder = document.createElement("div");
12916
13432
 
12917
13433
  if (typeof contents === "function") {
12918
- contents = contents(cell.getComponent(), this.listEl);
13434
+ contents = contents(this.cell.getComponent(), this.listEl);
12919
13435
  }
12920
13436
 
12921
13437
  if (contents) {
@@ -12986,7 +13502,7 @@
12986
13502
  }, {
12987
13503
  key: "_parseList",
12988
13504
  value: function _parseList(inputValues) {
12989
- var _this4 = this;
13505
+ var _this6 = this;
12990
13506
 
12991
13507
  var data = [];
12992
13508
 
@@ -13011,8 +13527,15 @@
13011
13527
  };
13012
13528
  }
13013
13529
 
13014
- _this4._parseListItem(value, data, 0);
13530
+ _this6._parseListItem(value, data, 0);
13015
13531
  });
13532
+
13533
+ if (!this.currentItems.length && this.params.freetext) {
13534
+ this.input.value = this.initialValues;
13535
+ this.typing = true;
13536
+ this.lastAction = "typing";
13537
+ }
13538
+
13016
13539
  this.data = data;
13017
13540
  return data;
13018
13541
  }
@@ -13046,7 +13569,7 @@
13046
13569
  }, {
13047
13570
  key: "_parseListGroup",
13048
13571
  value: function _parseListGroup(option, level) {
13049
- var _this5 = this;
13572
+ var _this7 = this;
13050
13573
 
13051
13574
  var item = {
13052
13575
  label: option.label,
@@ -13060,7 +13583,7 @@
13060
13583
  original: option
13061
13584
  };
13062
13585
  option.options.forEach(function (child) {
13063
- _this5._parseListItem(child, item.options, level);
13586
+ _this7._parseListItem(child, item.options, level);
13064
13587
  });
13065
13588
  return item;
13066
13589
  }
@@ -13080,14 +13603,14 @@
13080
13603
  }, {
13081
13604
  key: "_sortGroup",
13082
13605
  value: function _sortGroup(sorter, options) {
13083
- var _this6 = this;
13606
+ var _this8 = this;
13084
13607
 
13085
13608
  options.sort(function (a, b) {
13086
13609
  return sorter(a.label, b.label, a.value, b.value, a.original, b.original);
13087
13610
  });
13088
13611
  options.forEach(function (option) {
13089
13612
  if (option.group) {
13090
- _this6._sortGroup(sorter, option.options);
13613
+ _this8._sortGroup(sorter, option.options);
13091
13614
  }
13092
13615
  });
13093
13616
  }
@@ -13146,15 +13669,15 @@
13146
13669
  }, {
13147
13670
  key: "_filterOptions",
13148
13671
  value: function _filterOptions() {
13149
- var _this7 = this;
13672
+ var _this9 = this;
13150
13673
 
13151
- var filterFunc = this.params.filterFunc || this._defaultFilterFunc;
13152
- var term = this.input.value;
13674
+ var filterFunc = this.params.filterFunc || this._defaultFilterFunc,
13675
+ term = this.input.value;
13153
13676
 
13154
13677
  if (term) {
13155
13678
  this.filtered = true;
13156
13679
  this.data.forEach(function (item) {
13157
- _this7._filterItem(filterFunc, term, item);
13680
+ _this9._filterItem(filterFunc, term, item);
13158
13681
  });
13159
13682
  } else {
13160
13683
  this.filtered = false;
@@ -13165,7 +13688,7 @@
13165
13688
  }, {
13166
13689
  key: "_filterItem",
13167
13690
  value: function _filterItem(func, term, item) {
13168
- var _this8 = this;
13691
+ var _this10 = this;
13169
13692
 
13170
13693
  var matches = false;
13171
13694
 
@@ -13173,7 +13696,7 @@
13173
13696
  item.visible = func(term, item.label, item.value, item.original);
13174
13697
  } else {
13175
13698
  item.options.forEach(function (option) {
13176
- if (_this8._filterItem(func, term, option)) {
13699
+ if (_this10._filterItem(func, term, option)) {
13177
13700
  matches = true;
13178
13701
  }
13179
13702
  });
@@ -13185,10 +13708,10 @@
13185
13708
  }, {
13186
13709
  key: "_defaultFilterFunc",
13187
13710
  value: function _defaultFilterFunc(term, label, value, item) {
13188
- var term = String(term).toLowerCase();
13711
+ term = String(term).toLowerCase();
13189
13712
 
13190
- if (label !== null || typeof label !== "undefined") {
13191
- if (String(label).toLowerCase().indexOf(term) > -1 || String(value).toLowerCase(term).indexOf() > -1) {
13713
+ if (label !== null && typeof label !== "undefined") {
13714
+ if (String(label).toLowerCase().indexOf(term) > -1 || String(value).toLowerCase().indexOf(term) > -1) {
13192
13715
  return true;
13193
13716
  }
13194
13717
  }
@@ -13210,12 +13733,12 @@
13210
13733
  }, {
13211
13734
  key: "_buildList",
13212
13735
  value: function _buildList(data) {
13213
- var _this9 = this;
13736
+ var _this11 = this;
13214
13737
 
13215
13738
  this._clearList();
13216
13739
 
13217
13740
  data.forEach(function (option) {
13218
- _this9._buildItem(option);
13741
+ _this11._buildItem(option);
13219
13742
  });
13220
13743
 
13221
13744
  if (!this.displayItems.length) {
@@ -13225,7 +13748,7 @@
13225
13748
  }, {
13226
13749
  key: "_buildItem",
13227
13750
  value: function _buildItem(item) {
13228
- var _this10 = this;
13751
+ var _this12 = this;
13229
13752
 
13230
13753
  var el = item.element,
13231
13754
  contents;
@@ -13277,7 +13800,7 @@
13277
13800
 
13278
13801
  if (item.group) {
13279
13802
  item.options.forEach(function (option) {
13280
- _this10._buildItem(option);
13803
+ _this12._buildItem(option);
13281
13804
  });
13282
13805
  } else {
13283
13806
  this.displayItems.push(item);
@@ -13287,14 +13810,17 @@
13287
13810
  }, {
13288
13811
  key: "_showList",
13289
13812
  value: function _showList() {
13813
+ var _this13 = this;
13814
+
13290
13815
  var startVis = this.popup && this.popup.isVisible();
13291
13816
 
13292
13817
  if (this.input.parentNode) {
13293
13818
  if (this.params.autocomplete && this.input.value === "" && !this.params.listOnEmpty) {
13294
13819
  if (this.popup) {
13295
13820
  this.popup.hide(true);
13296
- return;
13297
13821
  }
13822
+
13823
+ return;
13298
13824
  }
13299
13825
 
13300
13826
  this._setListWidth();
@@ -13306,7 +13832,9 @@
13306
13832
  this.popup.show(this.cell.getElement(), "bottom");
13307
13833
 
13308
13834
  if (!startVis) {
13309
- this.popup.hideOnBlur(this._resolveValue.bind(this, true));
13835
+ setTimeout(function () {
13836
+ _this13.popup.hideOnBlur(_this13._resolveValue.bind(_this13, true));
13837
+ });
13310
13838
  }
13311
13839
  }
13312
13840
  }
@@ -13348,13 +13876,13 @@
13348
13876
  }, {
13349
13877
  key: "_clearChoices",
13350
13878
  value: function _clearChoices() {
13351
- var _this11 = this;
13879
+ var _this14 = this;
13352
13880
 
13353
13881
  this.typing = true;
13354
13882
  this.currentItems.forEach(function (item) {
13355
13883
  item.selected = false;
13356
13884
 
13357
- _this11._styleItem(item);
13885
+ _this14._styleItem(item);
13358
13886
  });
13359
13887
  this.currentItems = [];
13360
13888
  this.focusedItem = null;
@@ -13399,7 +13927,10 @@
13399
13927
  key: "_resolveValue",
13400
13928
  value: function _resolveValue(blur) {
13401
13929
  var output, initialValue;
13402
- this.popup.hide(true);
13930
+
13931
+ if (this.popup) {
13932
+ this.popup.hide(true);
13933
+ }
13403
13934
 
13404
13935
  if (this.params.multiselect) {
13405
13936
  output = this.currentItems.map(function (item) {
@@ -13435,7 +13966,8 @@
13435
13966
  this.actions.success(output);
13436
13967
 
13437
13968
  if (this.isFilter) {
13438
- this.initialValues = output && !Array.isArray[output] ? [output] : output;
13969
+ this.initialValues = output && !Array.isArray(output) ? [output] : output;
13970
+ this.currentItems = [];
13439
13971
  }
13440
13972
  }
13441
13973
  }]);
@@ -13444,7 +13976,7 @@
13444
13976
  }();
13445
13977
 
13446
13978
  function select (cell, onRendered, success, cancel, editorParams) {
13447
- console.warn("The select editor has been deprecated, please use the new list editor");
13979
+ this.deprecationMsg("The select editor has been deprecated, please use the new list editor");
13448
13980
  var list = new Edit(this, cell, onRendered, success, cancel, editorParams);
13449
13981
  return list.input;
13450
13982
  }
@@ -13455,7 +13987,7 @@
13455
13987
  }
13456
13988
 
13457
13989
  function autocomplete (cell, onRendered, success, cancel, editorParams) {
13458
- console.warn("The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam");
13990
+ this.deprecationMsg("The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam");
13459
13991
  editorParams.autocomplete = true;
13460
13992
  var list = new Edit(this, cell, onRendered, success, cancel, editorParams);
13461
13993
  return list.input;
@@ -13764,8 +14296,6 @@
13764
14296
  checkedValue = editorParams.trueValue;
13765
14297
  } else if (falseValueSet && !checkedValue) {
13766
14298
  checkedValue = editorParams.falseValue;
13767
- } else {
13768
- checkedValue = checkedValue;
13769
14299
  }
13770
14300
 
13771
14301
  if (tristate) {
@@ -13816,6 +14346,9 @@
13816
14346
  textarea: textarea,
13817
14347
  number: number,
13818
14348
  range: range,
14349
+ date: date,
14350
+ time: time,
14351
+ datetime: datetime,
13819
14352
  select: select,
13820
14353
  list: list,
13821
14354
  autocomplete: autocomplete,
@@ -13837,7 +14370,7 @@
13837
14370
  _this = _super.call(this, table);
13838
14371
  _this.currentCell = false; //hold currently editing cell
13839
14372
 
13840
- _this.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening
14373
+ _this.mouseClick = false; //hold mousedown state to prevent click binding being overridden by editor opening
13841
14374
 
13842
14375
  _this.recursionBlock = false; //prevent focus recursion
13843
14376
 
@@ -13873,7 +14406,7 @@
13873
14406
 
13874
14407
  _this.registerTableFunction("navigateDown", _this.navigateDown.bind(_assertThisInitialized(_this)));
13875
14408
 
13876
- _this.registerComponentFunction("cell", "isEdited", _this.cellisEdited.bind(_assertThisInitialized(_this)));
14409
+ _this.registerComponentFunction("cell", "isEdited", _this.cellIsEdited.bind(_assertThisInitialized(_this)));
13877
14410
 
13878
14411
  _this.registerComponentFunction("cell", "clearEdited", _this.clearEdited.bind(_assertThisInitialized(_this)));
13879
14412
 
@@ -13901,6 +14434,7 @@
13901
14434
  value: function initialize() {
13902
14435
  this.subscribe("cell-init", this.bindEditor.bind(this));
13903
14436
  this.subscribe("cell-delete", this.clearEdited.bind(this));
14437
+ this.subscribe("cell-value-changed", this.updateCellClass.bind(this));
13904
14438
  this.subscribe("column-layout", this.initializeColumnCheck.bind(this));
13905
14439
  this.subscribe("column-delete", this.columnDeleteCheck.bind(this));
13906
14440
  this.subscribe("row-deleting", this.rowDeleteCheck.bind(this));
@@ -13949,8 +14483,8 @@
13949
14483
  ///////////////////////////////////
13950
14484
 
13951
14485
  }, {
13952
- key: "cellisEdited",
13953
- value: function cellisEdited(cell) {
14486
+ key: "cellIsEdited",
14487
+ value: function cellIsEdited(cell) {
13954
14488
  return !!cell.modules.edit && cell.modules.edit.edited;
13955
14489
  }
13956
14490
  }, {
@@ -13965,6 +14499,15 @@
13965
14499
  ///////// Table Functions /////////
13966
14500
  ///////////////////////////////////
13967
14501
 
14502
+ }, {
14503
+ key: "updateCellClass",
14504
+ value: function updateCellClass(cell) {
14505
+ if (this.allowEdit(cell)) {
14506
+ cell.getElement().classList.add("tabulator-editable");
14507
+ } else {
14508
+ cell.getElement().classList.remove("tabulator-editable");
14509
+ }
14510
+ }
13968
14511
  }, {
13969
14512
  key: "clearCellEdited",
13970
14513
  value: function clearCellEdited(cells) {
@@ -14148,11 +14691,7 @@
14148
14691
  var cell = row.cells[i];
14149
14692
 
14150
14693
  if (cell.column.modules.edit && Helpers.elVisible(cell.getElement())) {
14151
- var allowEdit = true;
14152
-
14153
- if (typeof cell.column.modules.edit.check == "function") {
14154
- allowEdit = cell.column.modules.edit.check(cell.getComponent());
14155
- }
14694
+ var allowEdit = this.allowEdit(cell);
14156
14695
 
14157
14696
  if (allowEdit) {
14158
14697
  nextCell = cell;
@@ -14171,13 +14710,10 @@
14171
14710
 
14172
14711
  if (index > 0) {
14173
14712
  for (var i = index - 1; i >= 0; i--) {
14174
- var cell = row.cells[i],
14175
- allowEdit = true;
14713
+ var cell = row.cells[i];
14176
14714
 
14177
14715
  if (cell.column.modules.edit && Helpers.elVisible(cell.getElement())) {
14178
- if (typeof cell.column.modules.edit.check == "function") {
14179
- allowEdit = cell.column.modules.edit.check(cell.getComponent());
14180
- }
14716
+ var allowEdit = this.allowEdit(cell);
14181
14717
 
14182
14718
  if (allowEdit) {
14183
14719
  prevCell = cell;
@@ -14280,7 +14816,8 @@
14280
14816
  cellEl.removeChild(cellEl.firstChild);
14281
14817
  }
14282
14818
 
14283
- cell.row.getElement().classList.remove("tabulator-row-editing");
14819
+ cell.row.getElement().classList.remove("tabulator-editing");
14820
+ cell.table.element.classList.remove("tabulator-editing");
14284
14821
  }
14285
14822
  }
14286
14823
  }, {
@@ -14312,6 +14849,7 @@
14312
14849
  if (cell.column.modules.edit) {
14313
14850
  var self = this,
14314
14851
  element = cell.getElement(true);
14852
+ this.updateCellClass(cell);
14315
14853
  element.setAttribute("tabindex", 0);
14316
14854
  element.addEventListener("click", function (e) {
14317
14855
  if (!element.classList.contains("tabulator-editing")) {
@@ -14359,8 +14897,7 @@
14359
14897
  if (this.table.rowManager.getRenderMode() == "virtual") {
14360
14898
  var topEdge = this.table.rowManager.element.scrollTop,
14361
14899
  bottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop,
14362
- rowEl = cell.row.getElement(),
14363
- offset = rowEl.offsetTop;
14900
+ rowEl = cell.row.getElement();
14364
14901
 
14365
14902
  if (rowEl.offsetTop < topEdge) {
14366
14903
  this.table.rowManager.element.scrollTop -= topEdge - rowEl.offsetTop;
@@ -14372,8 +14909,7 @@
14372
14909
 
14373
14910
  var leftEdge = this.table.rowManager.element.scrollLeft,
14374
14911
  rightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft,
14375
- cellEl = cell.getElement(),
14376
- offset = cellEl.offsetLeft;
14912
+ cellEl = cell.getElement();
14377
14913
 
14378
14914
  if (this.table.modExists("frozenColumns")) {
14379
14915
  leftEdge += parseInt(this.table.modules.frozenColumns.leftMargin);
@@ -14394,6 +14930,29 @@
14394
14930
  }
14395
14931
  }
14396
14932
  }
14933
+ }, {
14934
+ key: "allowEdit",
14935
+ value: function allowEdit(cell) {
14936
+ var check = cell.column.modules.edit ? true : false;
14937
+
14938
+ if (cell.column.modules.edit) {
14939
+ switch (_typeof(cell.column.modules.edit.check)) {
14940
+ case "function":
14941
+ check = cell.column.modules.edit.check(cell.getComponent());
14942
+ break;
14943
+
14944
+ case "string":
14945
+ check = !!cell.row.data[cell.column.modules.edit.check];
14946
+ break;
14947
+
14948
+ case "boolean":
14949
+ check = cell.column.modules.edit.check;
14950
+ break;
14951
+ }
14952
+ }
14953
+
14954
+ return check;
14955
+ }
14397
14956
  }, {
14398
14957
  key: "edit",
14399
14958
  value: function edit(cell, e, forceEdit) {
@@ -14459,15 +15018,7 @@
14459
15018
  e.stopPropagation();
14460
15019
  }
14461
15020
 
14462
- switch (_typeof(cell.column.modules.edit.check)) {
14463
- case "function":
14464
- allowEdit = cell.column.modules.edit.check(cell.getComponent());
14465
- break;
14466
-
14467
- case "boolean":
14468
- allowEdit = cell.column.modules.edit.check;
14469
- break;
14470
- }
15021
+ allowEdit = this.allowEdit(cell);
14471
15022
 
14472
15023
  if (allowEdit || forceEdit) {
14473
15024
  self.cancelEdit();
@@ -14495,7 +15046,8 @@
14495
15046
  if (cellEditor !== false) {
14496
15047
  if (cellEditor instanceof Node) {
14497
15048
  element.classList.add("tabulator-editing");
14498
- cell.row.getElement().classList.add("tabulator-row-editing");
15049
+ cell.row.getElement().classList.add("tabulator-editing");
15050
+ cell.table.element.classList.add("tabulator-editing");
14499
15051
 
14500
15052
  while (element.firstChild) {
14501
15053
  element.removeChild(element.firstChild);
@@ -14602,7 +15154,7 @@
14602
15154
  _this.cloneTableStyle = true;
14603
15155
  _this.colVisProp = "";
14604
15156
 
14605
- _this.registerTableOption("htmlOutputConfig", false); //html outypu config
15157
+ _this.registerTableOption("htmlOutputConfig", false); //html output config
14606
15158
 
14607
15159
 
14608
15160
  _this.registerColumnOption("htmlOutput");
@@ -14634,10 +15186,10 @@
14634
15186
  return headers.concat(body);
14635
15187
  }
14636
15188
  }, {
14637
- key: "genereateTable",
14638
- value: function genereateTable(config, style, range, colVisProp) {
15189
+ key: "generateTable",
15190
+ value: function generateTable(config, style, range, colVisProp) {
14639
15191
  var list = this.generateExportList(config, style, range, colVisProp);
14640
- return this.genereateTableElement(list);
15192
+ return this.generateTableElement(list);
14641
15193
  }
14642
15194
  }, {
14643
15195
  key: "rowLookup",
@@ -14745,7 +15297,13 @@
14745
15297
  }, {
14746
15298
  key: "columnVisCheck",
14747
15299
  value: function columnVisCheck(column) {
14748
- return column.definition[this.colVisProp] !== false && (column.visible || !column.visible && column.definition[this.colVisProp]);
15300
+ var visProp = column.definition[this.colVisProp];
15301
+
15302
+ if (typeof visProp === "function") {
15303
+ visProp = visProp.call(this.table, column.getComponent());
15304
+ }
15305
+
15306
+ return visProp !== false && (column.visible || !column.visible && visProp);
14749
15307
  }
14750
15308
  }, {
14751
15309
  key: "headersToExportRows",
@@ -14765,17 +15323,17 @@
14765
15323
  headers[level].push(column);
14766
15324
 
14767
15325
  if (column.height > 1) {
14768
- for (var _i = 1; _i < column.height; _i++) {
14769
- if (typeof headers[level + _i] === "undefined") {
14770
- headers[level + _i] = [];
15326
+ for (var i = 1; i < column.height; i++) {
15327
+ if (typeof headers[level + i] === "undefined") {
15328
+ headers[level + i] = [];
14771
15329
  }
14772
15330
 
14773
- headers[level + _i].push(false);
15331
+ headers[level + i].push(false);
14774
15332
  }
14775
15333
  }
14776
15334
 
14777
15335
  if (column.width > 1) {
14778
- for (var _i2 = 1; _i2 < column.width; _i2++) {
15336
+ for (var _i = 1; _i < column.width; _i++) {
14779
15337
  headers[level].push(false);
14780
15338
  }
14781
15339
  }
@@ -14785,7 +15343,7 @@
14785
15343
  parseColumnGroup(subGroup, level + 1);
14786
15344
  });
14787
15345
  }
14788
- } //calculate maximum header debth
15346
+ } //calculate maximum header depth
14789
15347
 
14790
15348
 
14791
15349
  columns.forEach(function (column) {
@@ -14876,8 +15434,8 @@
14876
15434
  return exportRows;
14877
15435
  }
14878
15436
  }, {
14879
- key: "genereateTableElement",
14880
- value: function genereateTableElement(list) {
15437
+ key: "generateTableElement",
15438
+ value: function generateTableElement(list) {
14881
15439
  var _this6 = this;
14882
15440
 
14883
15441
  var table = document.createElement("table"),
@@ -14907,21 +15465,23 @@
14907
15465
  }
14908
15466
 
14909
15467
  list.forEach(function (row, i) {
15468
+ var rowEl;
15469
+
14910
15470
  switch (row.type) {
14911
15471
  case "header":
14912
- headerEl.appendChild(_this6.genereateHeaderElement(row, setup, styles));
15472
+ headerEl.appendChild(_this6.generateHeaderElement(row, setup, styles));
14913
15473
  break;
14914
15474
 
14915
15475
  case "group":
14916
- bodyEl.appendChild(_this6.genereateGroupElement(row, setup, styles));
15476
+ bodyEl.appendChild(_this6.generateGroupElement(row, setup, styles));
14917
15477
  break;
14918
15478
 
14919
15479
  case "calc":
14920
- bodyEl.appendChild(_this6.genereateCalcElement(row, setup, styles));
15480
+ bodyEl.appendChild(_this6.generateCalcElement(row, setup, styles));
14921
15481
  break;
14922
15482
 
14923
15483
  case "row":
14924
- var rowEl = _this6.genereateRowElement(row, setup, styles);
15484
+ rowEl = _this6.generateRowElement(row, setup, styles);
14925
15485
 
14926
15486
  _this6.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"]);
14927
15487
 
@@ -14960,8 +15520,8 @@
14960
15520
  return styles;
14961
15521
  }
14962
15522
  }, {
14963
- key: "genereateHeaderElement",
14964
- value: function genereateHeaderElement(row, setup, styles) {
15523
+ key: "generateHeaderElement",
15524
+ value: function generateHeaderElement(row, setup, styles) {
14965
15525
  var _this7 = this;
14966
15526
 
14967
15527
  var rowEl = document.createElement("tr");
@@ -15003,8 +15563,8 @@
15003
15563
  return rowEl;
15004
15564
  }
15005
15565
  }, {
15006
- key: "genereateGroupElement",
15007
- value: function genereateGroupElement(row, setup, styles) {
15566
+ key: "generateGroupElement",
15567
+ value: function generateGroupElement(row, setup, styles) {
15008
15568
  var rowEl = document.createElement("tr"),
15009
15569
  cellEl = document.createElement("td"),
15010
15570
  group = row.columns[0];
@@ -15013,9 +15573,7 @@
15013
15573
  if (setup.groupHeader && setup.groupHeader[row.indent]) {
15014
15574
  group.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);
15015
15575
  } else {
15016
- if (setup.groupHeader === false) {
15017
- group.value = group.value;
15018
- } else {
15576
+ if (setup.groupHeader !== false) {
15019
15577
  group.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);
15020
15578
  }
15021
15579
  }
@@ -15035,26 +15593,27 @@
15035
15593
  return rowEl;
15036
15594
  }
15037
15595
  }, {
15038
- key: "genereateCalcElement",
15039
- value: function genereateCalcElement(row, setup, styles) {
15040
- var rowEl = this.genereateRowElement(row, setup, styles);
15596
+ key: "generateCalcElement",
15597
+ value: function generateCalcElement(row, setup, styles) {
15598
+ var rowEl = this.generateRowElement(row, setup, styles);
15041
15599
  rowEl.classList.add("tabulator-print-table-calcs");
15042
15600
  this.mapElementStyles(styles.calcRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]);
15043
15601
  return rowEl;
15044
15602
  }
15045
15603
  }, {
15046
- key: "genereateRowElement",
15047
- value: function genereateRowElement(row, setup, styles) {
15604
+ key: "generateRowElement",
15605
+ value: function generateRowElement(row, setup, styles) {
15048
15606
  var _this8 = this;
15049
15607
 
15050
15608
  var rowEl = document.createElement("tr");
15051
15609
  rowEl.classList.add("tabulator-print-table-row");
15052
- row.columns.forEach(function (col) {
15610
+ row.columns.forEach(function (col, i) {
15053
15611
  if (col) {
15054
15612
  var cellEl = document.createElement("td"),
15055
15613
  column = col.component._column,
15056
15614
  index = _this8.table.columnManager.findColumnIndex(column),
15057
- value = col.value;
15615
+ value = col.value,
15616
+ cellStyle;
15058
15617
 
15059
15618
  var cellWrapper = {
15060
15619
  modules: {},
@@ -15097,9 +15656,6 @@
15097
15656
  case "undefined":
15098
15657
  value = "";
15099
15658
  break;
15100
-
15101
- default:
15102
- value = value;
15103
15659
  }
15104
15660
  }
15105
15661
 
@@ -15109,8 +15665,10 @@
15109
15665
  cellEl.innerHTML = value;
15110
15666
  }
15111
15667
 
15112
- if (styles.styleCells[index] || styles.firstCell) {
15113
- _this8.mapElementStyles(styles.styleCells[index] || styles.firstCell, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom", "border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "text-align"]);
15668
+ cellStyle = styles.styleCells && styles.styleCells[index] ? styles.styleCells[index] : styles.firstCell;
15669
+
15670
+ if (cellStyle) {
15671
+ _this8.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"]);
15114
15672
 
15115
15673
  if (column.definition.align) {
15116
15674
  cellEl.style.textAlign = column.definition.align;
@@ -15143,17 +15701,17 @@
15143
15701
  return rowEl;
15144
15702
  }
15145
15703
  }, {
15146
- key: "genereateHTMLTable",
15147
- value: function genereateHTMLTable(list) {
15704
+ key: "generateHTMLTable",
15705
+ value: function generateHTMLTable(list) {
15148
15706
  var holder = document.createElement("div");
15149
- holder.appendChild(this.genereateTableElement(list));
15707
+ holder.appendChild(this.generateTableElement(list));
15150
15708
  return holder.innerHTML;
15151
15709
  }
15152
15710
  }, {
15153
15711
  key: "getHtml",
15154
15712
  value: function getHtml(visible, style, config, colVisProp) {
15155
15713
  var list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || "htmlOutput");
15156
- return this.genereateHTMLTable(list);
15714
+ return this.generateHTMLTable(list);
15157
15715
  }
15158
15716
  }, {
15159
15717
  key: "mapElementStyles",
@@ -15525,8 +16083,7 @@
15525
16083
  key: "initializeColumn",
15526
16084
  value: function initializeColumn(column, value) {
15527
16085
  var self = this,
15528
- field = column.getField();
15529
- //handle successfull value change
16086
+ field = column.getField(); //handle successfully value change
15530
16087
 
15531
16088
  function success(value) {
15532
16089
  var filterType = column.modules.filter.tagType == "input" && column.modules.filter.attrType == "text" || column.modules.filter.tagType == "textarea" ? "partial" : "match",
@@ -15597,8 +16154,7 @@
15597
16154
  self.headerFilters[field] = {
15598
16155
  value: value,
15599
16156
  func: filterFunc,
15600
- type: type,
15601
- params: {}
16157
+ type: type
15602
16158
  };
15603
16159
  } else {
15604
16160
  delete self.headerFilters[field];
@@ -15651,7 +16207,7 @@
15651
16207
  if (field) {
15652
16208
  //set empty value function
15653
16209
  column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function (value) {
15654
- return !value && value !== "0" && value !== 0;
16210
+ return !value && value !== 0;
15655
16211
  };
15656
16212
 
15657
16213
  filterElement = document.createElement("div");
@@ -15732,16 +16288,9 @@
15732
16288
  } //set Placeholder Text
15733
16289
 
15734
16290
 
15735
- if (field) {
15736
- self.langBind("headerFilters|columns|" + column.definition.field, function (value) {
15737
- editorElement.setAttribute("placeholder", typeof value !== "undefined" && value ? value : self.langText("headerFilters|default"));
15738
- });
15739
- } else {
15740
- self.langBind("headerFilters|default", function (value) {
15741
- editorElement.setAttribute("placeholder", value);
15742
- });
15743
- } //focus on element on click
15744
-
16291
+ self.langBind("headerFilters|columns|" + column.definition.field, function (value) {
16292
+ editorElement.setAttribute("placeholder", typeof value !== "undefined" && value ? value : self.langText("headerFilters|default"));
16293
+ }); //focus on element on click
15745
16294
 
15746
16295
  editorElement.addEventListener("click", function (e) {
15747
16296
  e.stopPropagation();
@@ -15789,7 +16338,7 @@
15789
16338
  if (column.modules.filter.attrType == "text" && this.table.browser !== "ie") {
15790
16339
  editorElement.setAttribute("type", "search"); // editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click
15791
16340
  }
15792
- } //prevent input and select elements from propegating click to column sorters etc
16341
+ } //prevent input and select elements from propagating click to column sorters etc
15793
16342
 
15794
16343
 
15795
16344
  if (column.modules.filter.tagType == "input" || column.modules.filter.tagType == "select" || column.modules.filter.tagType == "textarea") {
@@ -15829,7 +16378,7 @@
15829
16378
  column.modules.filter.headerElement.style.display = '';
15830
16379
  }
15831
16380
  });
15832
- } //programatically set focus of header filter
16381
+ } //programmatically set focus of header filter
15833
16382
 
15834
16383
  }, {
15835
16384
  key: "setHeaderFilterFocus",
@@ -15849,7 +16398,7 @@
15849
16398
  } else {
15850
16399
  console.warn("Column Filter Error - No header filter set on column:", column.getField());
15851
16400
  }
15852
- } //programatically set value of header filter
16401
+ } //programmatically set value of header filter
15853
16402
 
15854
16403
  }, {
15855
16404
  key: "setHeaderFilterValue",
@@ -16447,7 +16996,7 @@
16447
16996
  }
16448
16997
  }
16449
16998
 
16450
- function datetime (cell, formatterParams, onRendered) {
16999
+ function datetime$1 (cell, formatterParams, onRendered) {
16451
17000
  var DT = window.DateTime || luxon.DateTime;
16452
17001
  var inputFormat = formatterParams.inputFormat || "yyyy-MM-dd HH:mm:ss";
16453
17002
  var outputFormat = formatterParams.outputFormat || "dd/MM/yyyy HH:mm:ss";
@@ -16616,19 +17165,20 @@
16616
17165
  return el;
16617
17166
  }
16618
17167
 
16619
- function progress$1 (cell, formatterParams, onRendered) {
17168
+ function progress$1 (cell) {
17169
+ var formatterParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17170
+ var onRendered = arguments.length > 2 ? arguments[2] : undefined;
16620
17171
  //progress bar
16621
17172
  var value = this.sanitizeHTML(cell.getValue()) || 0,
16622
17173
  element = cell.getElement(),
16623
- max = formatterParams && formatterParams.max ? formatterParams.max : 100,
16624
- min = formatterParams && formatterParams.min ? formatterParams.min : 0,
16625
- legendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : "center",
17174
+ max = formatterParams.max ? formatterParams.max : 100,
17175
+ min = formatterParams.min ? formatterParams.min : 0,
17176
+ legendAlign = formatterParams.legendAlign ? formatterParams.legendAlign : "center",
16626
17177
  percent,
16627
17178
  percentValue,
16628
17179
  color,
16629
17180
  legend,
16630
- legendColor;
16631
- //make sure value is in range
17181
+ legendColor; //make sure value is in range
16632
17182
 
16633
17183
  percentValue = parseFloat(value) <= max ? parseFloat(value) : max;
16634
17184
  percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; //workout percentage
@@ -16689,11 +17239,13 @@
16689
17239
 
16690
17240
  case "object":
16691
17241
  if (Array.isArray(formatterParams.legendColor)) {
16692
- var unit = 100 / formatterParams.legendColor.length;
16693
- var index = Math.floor(percentValue / unit);
16694
- index = Math.min(index, formatterParams.legendColor.length - 1);
16695
- index = Math.max(index, 0);
16696
- legendColor = formatterParams.legendColor[index];
17242
+ var _unit = 100 / formatterParams.legendColor.length;
17243
+
17244
+ var _index = Math.floor(percentValue / _unit);
17245
+
17246
+ _index = Math.min(_index, formatterParams.legendColor.length - 1);
17247
+ _index = Math.max(_index, 0);
17248
+ legendColor = formatterParams.legendColor[_index];
16697
17249
  }
16698
17250
 
16699
17251
  break;
@@ -16707,7 +17259,6 @@
16707
17259
  element.setAttribute("aria-label", percentValue);
16708
17260
  var barEl = document.createElement("div");
16709
17261
  barEl.style.display = "inline-block";
16710
- barEl.style.position = "absolute";
16711
17262
  barEl.style.width = percentValue + "%";
16712
17263
  barEl.style.backgroundColor = color;
16713
17264
  barEl.style.height = "100%";
@@ -16766,7 +17317,12 @@
16766
17317
  }
16767
17318
 
16768
17319
  function rownum (cell, formatterParams, onRendered) {
16769
- return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1 || "";
17320
+ var content = document.createElement("span");
17321
+ var row = cell.getRow();
17322
+ row.watchPosition(function (position) {
17323
+ content.innerText = position;
17324
+ });
17325
+ return content;
16770
17326
  }
16771
17327
 
16772
17328
  function handle (cell, formatterParams, onRendered) {
@@ -16800,6 +17356,7 @@
16800
17356
  el.addEventListener("click", function (e) {
16801
17357
  e.stopImmediatePropagation();
16802
17358
  toggleList(!config.open);
17359
+ cell.getTable().rowManager.adjustTableSize();
16803
17360
  });
16804
17361
  toggleList(config.open);
16805
17362
  return el;
@@ -16821,7 +17378,7 @@
16821
17378
  if (typeof cell.getRow == 'function') {
16822
17379
  var row = cell.getRow();
16823
17380
 
16824
- if (row instanceof RowComponent$1) {
17381
+ if (row instanceof RowComponent) {
16825
17382
  checkbox.addEventListener("change", function (e) {
16826
17383
  if (_this.table.options.selectableRangeMode === "click") {
16827
17384
  if (!blocked) {
@@ -16870,7 +17427,7 @@
16870
17427
  link: link,
16871
17428
  image: image,
16872
17429
  tickCross: tickCross$1,
16873
- datetime: datetime,
17430
+ datetime: datetime$1,
16874
17431
  datetimediff: datetimediff,
16875
17432
  lookup: lookup,
16876
17433
  star: star$1,
@@ -17046,7 +17603,7 @@
17046
17603
  cell.modules.format.rendered = false;
17047
17604
  };
17048
17605
 
17049
- params = typeof formatter.params === "function" ? formatter.params(component) : formatter.params;
17606
+ params = typeof formatter.params === "function" ? formatter.params(cell.getComponent()) : formatter.params;
17050
17607
  return formatter.formatter.call(this, cell.getComponent(), params, onRendered);
17051
17608
  } else {
17052
17609
  return this.formatValue(cell);
@@ -17066,7 +17623,7 @@
17066
17623
  '`': '&#x60;',
17067
17624
  '=': '&#x3D;'
17068
17625
  };
17069
- return String(value).replace(/[&<>"'`=\/]/g, function (s) {
17626
+ return String(value).replace(/[&<>"'`=/]/g, function (s) {
17070
17627
  return entityMap[s];
17071
17628
  });
17072
17629
  } else {
@@ -17082,8 +17639,6 @@
17082
17639
  }, {
17083
17640
  key: "getFormatter",
17084
17641
  value: function getFormatter(formatter) {
17085
- var formatter;
17086
-
17087
17642
  switch (_typeof(formatter)) {
17088
17643
  case "string":
17089
17644
  if (Format.formatters[formatter]) {
@@ -17096,7 +17651,7 @@
17096
17651
  break;
17097
17652
 
17098
17653
  case "function":
17099
- formatter = formatter;
17654
+ //Custom formatter Function, do nothing
17100
17655
  break;
17101
17656
 
17102
17657
  default:
@@ -17239,7 +17794,6 @@
17239
17794
  }, {
17240
17795
  key: "scrollHorizontal",
17241
17796
  value: function scrollHorizontal() {
17242
-
17243
17797
  if (this.active) {
17244
17798
  this.calcMargins(true);
17245
17799
  this.layoutColumnPosition();
@@ -17293,7 +17847,7 @@
17293
17847
  }
17294
17848
 
17295
17849
  if (group.groupList && group.groupList.length) {
17296
- _this3.layoutGroupCalcs(group.groupList && group.groupList);
17850
+ _this3.layoutGroupCalcs(group.groupList);
17297
17851
  }
17298
17852
  });
17299
17853
  } //calculate column positions and layout headers
@@ -17394,7 +17948,7 @@
17394
17948
  value: function reinitializeRows() {
17395
17949
  var _this5 = this;
17396
17950
 
17397
- var visibleRows = this.table.rowManager.getVisibleRows();
17951
+ var visibleRows = this.table.rowManager.getVisibleRows(true);
17398
17952
  var otherRows = this.table.rowManager.getRows().filter(function (row) {
17399
17953
  return !visibleRows.includes(row);
17400
17954
  });
@@ -17486,7 +18040,14 @@
17486
18040
 
17487
18041
  _this.registerComponentFunction("row", "unfreeze", _this.unfreezeRow.bind(_assertThisInitialized(_this)));
17488
18042
 
17489
- _this.registerComponentFunction("row", "isFrozen", _this.isRowFrozen.bind(_assertThisInitialized(_this)));
18043
+ _this.registerComponentFunction("row", "isFrozen", _this.isRowFrozen.bind(_assertThisInitialized(_this))); //register table options
18044
+
18045
+
18046
+ _this.registerTableOption("frozenRowsField", "id"); //field to choose frozen rows by
18047
+
18048
+
18049
+ _this.registerTableOption("frozenRows", false); //holder for frozen row identifiers
18050
+
17490
18051
 
17491
18052
  return _this;
17492
18053
  }
@@ -17501,6 +18062,40 @@
17501
18062
  this.subscribe("row-deleting", this.detachRow.bind(this));
17502
18063
  this.subscribe("rows-visible", this.visibleRows.bind(this));
17503
18064
  this.registerDisplayHandler(this.getRows.bind(this), 10);
18065
+
18066
+ if (this.table.options.frozenRows) {
18067
+ this.subscribe("data-processed", this.initializeRows.bind(this));
18068
+ this.subscribe("row-added", this.initializeRow.bind(this));
18069
+ }
18070
+ }
18071
+ }, {
18072
+ key: "initializeRows",
18073
+ value: function initializeRows() {
18074
+ var _this2 = this;
18075
+
18076
+ this.table.rowManager.getRows().forEach(function (row) {
18077
+ _this2.initializeRow(row);
18078
+ });
18079
+ }
18080
+ }, {
18081
+ key: "initializeRow",
18082
+ value: function initializeRow(row) {
18083
+ var frozenRows = this.table.options.frozenRows,
18084
+ rowType = _typeof(frozenRows);
18085
+
18086
+ if (rowType === "number") {
18087
+ if (row.getPosition() && row.getPosition() + this.rows.length <= frozenRows) {
18088
+ this.freezeRow(row);
18089
+ }
18090
+ } else if (rowType === "function") {
18091
+ if (frozenRows.call(this.table, row.getComponent())) {
18092
+ this.freezeRow(row);
18093
+ }
18094
+ } else if (Array.isArray(frozenRows)) {
18095
+ if (frozenRows.includes(row.data[this.options("frozenRowsField")])) {
18096
+ this.freezeRow(row);
18097
+ }
18098
+ }
17504
18099
  }
17505
18100
  }, {
17506
18101
  key: "isRowFrozen",
@@ -17554,8 +18149,6 @@
17554
18149
  }, {
17555
18150
  key: "unfreezeRow",
17556
18151
  value: function unfreezeRow(row) {
17557
- var index = this.rows.indexOf(row);
17558
-
17559
18152
  if (row.modules.frozen) {
17560
18153
  row.modules.frozen = false;
17561
18154
  this.detachRow(row);
@@ -17587,10 +18180,10 @@
17587
18180
  }, {
17588
18181
  key: "styleRows",
17589
18182
  value: function styleRows(row) {
17590
- var _this2 = this;
18183
+ var _this3 = this;
17591
18184
 
17592
18185
  this.rows.forEach(function (row, i) {
17593
- _this2.table.rowManager.styleRow(row, i);
18186
+ _this3.table.rowManager.styleRow(row, i);
17594
18187
  });
17595
18188
  }
17596
18189
  }]);
@@ -17862,7 +18455,7 @@
17862
18455
  }
17863
18456
  }, {
17864
18457
  key: "getRowIndex",
17865
- value: function getRowIndex(row) {} //update row data to match grouping contraints
18458
+ value: function getRowIndex(row) {} //update row data to match grouping constraints
17866
18459
 
17867
18460
  }, {
17868
18461
  key: "conformRowData",
@@ -18151,10 +18744,10 @@
18151
18744
  }
18152
18745
  }, {
18153
18746
  key: "getRows",
18154
- value: function getRows(compoment) {
18747
+ value: function getRows(component) {
18155
18748
  var output = [];
18156
18749
  this.rows.forEach(function (row) {
18157
- output.push(compoment ? row.getComponent() : row);
18750
+ output.push(component ? row.getComponent() : row);
18158
18751
  });
18159
18752
  return output;
18160
18753
  }
@@ -18425,7 +19018,7 @@
18425
19018
  });
18426
19019
  this.groupIDLookups = [];
18427
19020
 
18428
- if (Array.isArray(groupBy) || groupBy) {
19021
+ if (Array.isArray(groupBy)) {
18429
19022
  if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "table" && this.table.options.columnCalcs != "both") {
18430
19023
  this.table.modules.columnCalcs.removeCalcs();
18431
19024
  }
@@ -18487,6 +19080,9 @@
18487
19080
  if (groupHeader) {
18488
19081
  this.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader];
18489
19082
  }
19083
+ } else {
19084
+ this.groupList = [];
19085
+ this.groups = {};
18490
19086
  }
18491
19087
  }
18492
19088
  }, {
@@ -18551,10 +19147,9 @@
18551
19147
 
18552
19148
  if (!this.initialized) {
18553
19149
  this.initialize();
18554
- } else {
18555
- this.configureGroupSetup();
18556
19150
  }
18557
19151
 
19152
+ this.configureGroupSetup();
18558
19153
  this.refreshData();
18559
19154
  this.trackChanges();
18560
19155
  }
@@ -18838,9 +19433,9 @@
18838
19433
  var oldRowGroup = row.modules.group,
18839
19434
  oldGroupPath = oldRowGroup.getPath(),
18840
19435
  newGroupPath = this.getExpectedPath(row),
18841
- samePath = true; // figure out if new group path is the same as old group path
19436
+ samePath; // figure out if new group path is the same as old group path
18842
19437
 
18843
- var samePath = oldGroupPath.length == newGroupPath.length && oldGroupPath.every(function (element, index) {
19438
+ samePath = oldGroupPath.length == newGroupPath.length && oldGroupPath.every(function (element, index) {
18844
19439
  return element === newGroupPath[index];
18845
19440
  }); // refresh if they new path and old path aren't the same (aka the row's groupings have changed)
18846
19441
 
@@ -18997,8 +19592,8 @@
18997
19592
  key: "rowMoved",
18998
19593
  value: function rowMoved(from, to, after) {
18999
19594
  this.action("rowMove", from, {
19000
- posFrom: this.table.rowManager.getRowPosition(from),
19001
- posTo: this.table.rowManager.getRowPosition(to),
19595
+ posFrom: from.getPosition(),
19596
+ posTo: to.getPosition(),
19002
19597
  to: to,
19003
19598
  after: after
19004
19599
  });
@@ -19185,7 +19780,6 @@
19185
19780
  value: function parseTable() {
19186
19781
  var element = this.table.originalElement,
19187
19782
  options = this.table.options,
19188
- columns = options.columns,
19189
19783
  headers = element.getElementsByTagName("th"),
19190
19784
  rows = element.getElementsByTagName("tbody")[0],
19191
19785
  data = [];
@@ -19205,7 +19799,7 @@
19205
19799
  for (var index = 0; index < rows.length; index++) {
19206
19800
  var row = rows[index],
19207
19801
  cells = row.getElementsByTagName("td"),
19208
- item = {}; //create index if the dont exist in table
19802
+ item = {}; //create index if the don't exist in table
19209
19803
 
19210
19804
  if (!this.hasIndex) {
19211
19805
  item[options.index] = index;
@@ -19411,9 +20005,14 @@
19411
20005
  }
19412
20006
  }
19413
20007
 
20008
+ function arrayImporter(input) {
20009
+ return input;
20010
+ }
20011
+
19414
20012
  var defaultImporters = {
19415
20013
  csv: csvImporter,
19416
- json: json$1
20014
+ json: json$1,
20015
+ array: arrayImporter
19417
20016
  };
19418
20017
 
19419
20018
  var Import = /*#__PURE__*/function (_Module) {
@@ -19448,7 +20047,7 @@
19448
20047
  }, {
19449
20048
  key: "loadDataCheck",
19450
20049
  value: function loadDataCheck(data) {
19451
- return typeof data === "string";
20050
+ return this.table.options.importFormat && (typeof data === "string" || Array.isArray(data) && data.length && Array.isArray(data));
19452
20051
  }
19453
20052
  }, {
19454
20053
  key: "loadData",
@@ -19759,6 +20358,8 @@
19759
20358
  }, {
19760
20359
  key: "cellContentsSelectionFixer",
19761
20360
  value: function cellContentsSelectionFixer(e, cell) {
20361
+ var range;
20362
+
19762
20363
  if (this.table.modExists("edit")) {
19763
20364
  if (this.table.modules.edit.currentCell === this) {
19764
20365
  return; //prevent instant selection of editor content
@@ -19770,11 +20371,11 @@
19770
20371
  try {
19771
20372
  if (document.selection) {
19772
20373
  // IE
19773
- var range = document.body.createTextRange();
20374
+ range = document.body.createTextRange();
19774
20375
  range.moveToElementText(this.element);
19775
20376
  range.select();
19776
20377
  } else if (window.getSelection) {
19777
- var range = document.createRange();
20378
+ range = document.createRange();
19778
20379
  range.selectNode(this.element);
19779
20380
  window.getSelection().removeAllRanges();
19780
20381
  window.getSelection().addRange(range);
@@ -19791,7 +20392,6 @@
19791
20392
  }, {
19792
20393
  key: "subscriptionChanged",
19793
20394
  value: function subscriptionChanged(key, added) {
19794
-
19795
20395
  if (added) {
19796
20396
  if (!this.subscribers[key]) {
19797
20397
  if (this.eventMap[key].includes("-")) {
@@ -19829,7 +20429,7 @@
19829
20429
  }, {
19830
20430
  key: "unsubscribeTouchEvents",
19831
20431
  value: function unsubscribeTouchEvents(key) {
19832
- var notouch = true,
20432
+ var noTouch = true,
19833
20433
  type = this.eventMap[key];
19834
20434
 
19835
20435
  if (this.subscribers[key] && !this.subscribedExternal(key)) {
@@ -19838,12 +20438,12 @@
19838
20438
  for (var i in this.eventMap) {
19839
20439
  if (this.eventMap[i] === type) {
19840
20440
  if (this.subscribers[i]) {
19841
- notouch = false;
20441
+ noTouch = false;
19842
20442
  }
19843
20443
  }
19844
20444
  }
19845
20445
 
19846
- if (notouch) {
20446
+ if (noTouch) {
19847
20447
  this.unsubscribe(type + "-touchstart", this.touchSubscribers[type + "-touchstart"]);
19848
20448
  this.unsubscribe(type + "-touchend", this.touchSubscribers[type + "-touchend"]);
19849
20449
  delete this.touchSubscribers[type + "-touchstart"];
@@ -19969,8 +20569,7 @@
19969
20569
  },
19970
20570
  scrollPageUp: function scrollPageUp(e) {
19971
20571
  var rowManager = this.table.rowManager,
19972
- newPos = rowManager.scrollTop - rowManager.element.clientHeight,
19973
- scrollMax = rowManager.element.scrollHeight;
20572
+ newPos = rowManager.scrollTop - rowManager.element.clientHeight;
19974
20573
  e.preventDefault();
19975
20574
 
19976
20575
  if (rowManager.displayRowsCount) {
@@ -20305,16 +20904,15 @@
20305
20904
  _createClass(Menu, [{
20306
20905
  key: "initialize",
20307
20906
  value: function initialize() {
20308
- this.deprecationCheck();
20907
+ this.deprecatedOptionsCheck();
20309
20908
  this.initializeRowWatchers();
20310
20909
  this.initializeGroupWatchers();
20311
20910
  this.subscribe("column-init", this.initializeColumn.bind(this));
20312
20911
  }
20313
20912
  }, {
20314
- key: "deprecationCheck",
20315
- value: function deprecationCheck() {
20316
- if (typeof this.table.options.menuContainer !== "undefined") {
20317
- console.warn("Use of the menuContainer option is now deprecated. Please use the popupContainer option instead");
20913
+ key: "deprecatedOptionsCheck",
20914
+ value: function deprecatedOptionsCheck() {
20915
+ if (!this.deprecationCheck("menuContainer", "popupContainer")) {
20318
20916
  this.table.options.popupContainer = this.table.options.menuContainer;
20319
20917
  }
20320
20918
  }
@@ -20580,7 +21178,7 @@
20580
21178
 
20581
21179
  _this.toCol = false; //destination column
20582
21180
 
20583
- _this.toColAfter = false; //position of moving column relative to the desitnation column
21181
+ _this.toColAfter = false; //position of moving column relative to the destination column
20584
21182
 
20585
21183
  _this.startX = 0; //starting position within header element
20586
21184
 
@@ -20669,7 +21267,8 @@
20669
21267
 
20670
21268
  var colEl = column.getElement(),
20671
21269
  startXMove = false,
20672
- nextCol,
21270
+ //shifting center position of the cell
21271
+ nextCol,
20673
21272
  prevCol,
20674
21273
  nextColWidth,
20675
21274
  prevColWidth,
@@ -20907,7 +21506,7 @@
20907
21506
 
20908
21507
  _this.toRow = false; //destination row
20909
21508
 
20910
- _this.toRowAfter = false; //position of moving row relative to the desitnation row
21509
+ _this.toRowAfter = false; //position of moving row relative to the destination row
20911
21510
 
20912
21511
  _this.hasHandle = false; //row has handle instead of fully movable row
20913
21512
 
@@ -20969,24 +21568,25 @@
20969
21568
  key: "initializeGroupHeader",
20970
21569
  value: function initializeGroupHeader(group) {
20971
21570
  var self = this,
20972
- config = {};
20973
- //inter table drag drop
21571
+ config = {}; //inter table drag drop
20974
21572
 
20975
21573
  config.mouseup = function (e) {
20976
- self.tableRowDrop(e, row);
21574
+ self.tableRowDrop(e, group);
20977
21575
  }.bind(self); //same table drag drop
20978
21576
 
20979
21577
 
20980
21578
  config.mousemove = function (e) {
21579
+ var rowEl;
21580
+
20981
21581
  if (e.pageY - Helpers.elOffset(group.element).top + self.table.rowManager.element.scrollTop > group.getHeight() / 2) {
20982
21582
  if (self.toRow !== group || !self.toRowAfter) {
20983
- var rowEl = group.getElement();
21583
+ rowEl = group.getElement();
20984
21584
  rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);
20985
21585
  self.moveRow(group, true);
20986
21586
  }
20987
21587
  } else {
20988
21588
  if (self.toRow !== group || self.toRowAfter) {
20989
- var rowEl = group.getElement();
21589
+ rowEl = group.getElement();
20990
21590
 
20991
21591
  if (rowEl.previousSibling) {
20992
21592
  rowEl.parentNode.insertBefore(self.placeholderElement, rowEl);
@@ -21083,7 +21683,8 @@
21083
21683
  var _this2 = this;
21084
21684
 
21085
21685
  var startYMove = false,
21086
- nextRow,
21686
+ //shifting center position of the cell
21687
+ nextRow,
21087
21688
  prevRow,
21088
21689
  nextRowHeight,
21089
21690
  prevRowHeight,
@@ -21298,7 +21899,7 @@
21298
21899
  var rowHolder = this.table.rowManager.getElement(),
21299
21900
  scrollTop = rowHolder.scrollTop,
21300
21901
  yPos = (this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top + scrollTop;
21301
- this.hoverElement.style.top = yPos - this.startY + "px";
21902
+ this.hoverElement.style.top = Math.min(yPos - this.startY, this.table.rowManager.element.scrollHeight - this.hoverElement.offsetHeight) + "px";
21302
21903
  }
21303
21904
  }, {
21304
21905
  key: "moveHoverConnections",
@@ -21391,7 +21992,7 @@
21391
21992
  console.warn("Move Row Error - Table cannot accept connection, already connected to table:", this.connectedTable);
21392
21993
  return false;
21393
21994
  }
21394
- } //close incomming connection
21995
+ } //close incoming connection
21395
21996
 
21396
21997
  }, {
21397
21998
  key: "disconnect",
@@ -21428,7 +22029,7 @@
21428
22029
  }
21429
22030
 
21430
22031
  if (sender) {
21431
- sender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table);
22032
+ sender.call(this, this.moving ? this.moving.getComponent() : undefined, row ? row.getComponent() : undefined, table);
21432
22033
  } else {
21433
22034
  if (this.table.options.movableRowsSender) {
21434
22035
  console.warn("Mover Row Error - no matching sender found:", this.table.options.movableRowsSender);
@@ -21542,7 +22143,7 @@
21542
22143
  _classCallCheck(this, Mutator);
21543
22144
 
21544
22145
  _this = _super.call(this, table);
21545
- _this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of muatation types
22146
+ _this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of mutation types
21546
22147
 
21547
22148
  _this.enabled = true;
21548
22149
 
@@ -21919,12 +22520,12 @@
21919
22520
  key: "rowAddingPosition",
21920
22521
  value: function rowAddingPosition(row, top) {
21921
22522
  var rowManager = this.table.rowManager,
21922
- dispRows = rowManager.getDisplayRows(),
22523
+ displayRows = rowManager.getDisplayRows(),
21923
22524
  index;
21924
22525
 
21925
22526
  if (top) {
21926
- if (dispRows.length) {
21927
- index = dispRows[0];
22527
+ if (displayRows.length) {
22528
+ index = displayRows[0];
21928
22529
  } else {
21929
22530
  if (rowManager.activeRows.length) {
21930
22531
  index = rowManager.activeRows[rowManager.activeRows.length - 1];
@@ -21932,9 +22533,9 @@
21932
22533
  }
21933
22534
  }
21934
22535
  } else {
21935
- if (dispRows.length) {
21936
- index = dispRows[dispRows.length - 1];
21937
- top = dispRows.length < this.size ? false : true;
22536
+ if (displayRows.length) {
22537
+ index = displayRows[displayRows.length - 1];
22538
+ top = displayRows.length < this.size ? false : true;
21938
22539
  }
21939
22540
  }
21940
22541
 
@@ -22235,7 +22836,7 @@
22235
22836
  this.element.appendChild(this.nextBut);
22236
22837
  this.element.appendChild(this.lastBut);
22237
22838
 
22238
- if (!this.table.options.paginationElement && !hidden) {
22839
+ if (!this.table.options.paginationElement) {
22239
22840
  if (this.table.options.paginationCounter) {
22240
22841
 
22241
22842
  if (this.table.options.paginationCounterElement) {
@@ -22629,7 +23230,7 @@
22629
23230
  value: function _parseRemoteData(data) {
22630
23231
  var _this6 = this;
22631
23232
 
22632
- var data, margin;
23233
+ var margin;
22633
23234
 
22634
23235
  if (typeof data.last_page === "undefined") {
22635
23236
  console.warn("Remote Pagination Error - Server response missing '" + (this.options("dataReceiveParams").last_page || "last_page") + "' property");
@@ -22709,7 +23310,7 @@
22709
23310
 
22710
23311
  Page.pageCounters = defaultPageCounters;
22711
23312
 
22712
- // read peristence information from storage
23313
+ // read persistance information from storage
22713
23314
  var defaultReaders = {
22714
23315
  local: function local(id, type) {
22715
23316
  var data = localStorage.getItem(id + "-" + type);
@@ -22807,7 +23408,7 @@
22807
23408
  //determine persistent layout storage type
22808
23409
  var mode = this.table.options.persistenceMode,
22809
23410
  id = this.table.options.persistenceID,
22810
- retreivedData;
23411
+ retrievedData;
22811
23412
  this.mode = mode !== true ? mode : this.localStorageTest() ? "local" : "cookie";
22812
23413
 
22813
23414
  if (this.table.options.persistenceReaderFunc) {
@@ -22857,34 +23458,34 @@
22857
23458
  }; //load pagination data if needed
22858
23459
 
22859
23460
  if (this.config.page) {
22860
- retreivedData = this.retreiveData("page");
23461
+ retrievedData = this.retrieveData("page");
22861
23462
 
22862
- if (retreivedData) {
22863
- if (typeof retreivedData.paginationSize !== "undefined" && (this.config.page === true || this.config.page.size)) {
22864
- this.table.options.paginationSize = retreivedData.paginationSize;
23463
+ if (retrievedData) {
23464
+ if (typeof retrievedData.paginationSize !== "undefined" && (this.config.page === true || this.config.page.size)) {
23465
+ this.table.options.paginationSize = retrievedData.paginationSize;
22865
23466
  }
22866
23467
 
22867
- if (typeof retreivedData.paginationInitialPage !== "undefined" && (this.config.page === true || this.config.page.page)) {
22868
- this.table.options.paginationInitialPage = retreivedData.paginationInitialPage;
23468
+ if (typeof retrievedData.paginationInitialPage !== "undefined" && (this.config.page === true || this.config.page.page)) {
23469
+ this.table.options.paginationInitialPage = retrievedData.paginationInitialPage;
22869
23470
  }
22870
23471
  }
22871
23472
  } //load group data if needed
22872
23473
 
22873
23474
 
22874
23475
  if (this.config.group) {
22875
- retreivedData = this.retreiveData("group");
23476
+ retrievedData = this.retrieveData("group");
22876
23477
 
22877
- if (retreivedData) {
22878
- if (typeof retreivedData.groupBy !== "undefined" && (this.config.group === true || this.config.group.groupBy)) {
22879
- this.table.options.groupBy = retreivedData.groupBy;
23478
+ if (retrievedData) {
23479
+ if (typeof retrievedData.groupBy !== "undefined" && (this.config.group === true || this.config.group.groupBy)) {
23480
+ this.table.options.groupBy = retrievedData.groupBy;
22880
23481
  }
22881
23482
 
22882
- if (typeof retreivedData.groupStartOpen !== "undefined" && (this.config.group === true || this.config.group.groupStartOpen)) {
22883
- this.table.options.groupStartOpen = retreivedData.groupStartOpen;
23483
+ if (typeof retrievedData.groupStartOpen !== "undefined" && (this.config.group === true || this.config.group.groupStartOpen)) {
23484
+ this.table.options.groupStartOpen = retrievedData.groupStartOpen;
22884
23485
  }
22885
23486
 
22886
- if (typeof retreivedData.groupHeader !== "undefined" && (this.config.group === true || this.config.group.groupHeader)) {
22887
- this.table.options.groupHeader = retreivedData.groupHeader;
23487
+ if (typeof retrievedData.groupHeader !== "undefined" && (this.config.group === true || this.config.group.groupHeader)) {
23488
+ this.table.options.groupHeader = retrievedData.groupHeader;
22888
23489
  }
22889
23490
  }
22890
23491
  }
@@ -22920,9 +23521,7 @@
22920
23521
  }, {
22921
23522
  key: "tableBuilt",
22922
23523
  value: function tableBuilt() {
22923
- var options = this.table.options,
22924
- sorters,
22925
- filters;
23524
+ var sorters, filters;
22926
23525
 
22927
23526
  if (this.config.sort) {
22928
23527
  sorters = this.load("sort");
@@ -23007,18 +23606,18 @@
23007
23606
  }, {
23008
23607
  key: "load",
23009
23608
  value: function load(type, current) {
23010
- var data = this.retreiveData(type);
23609
+ var data = this.retrieveData(type);
23011
23610
 
23012
23611
  if (current) {
23013
23612
  data = data ? this.mergeDefinition(current, data) : current;
23014
23613
  }
23015
23614
 
23016
23615
  return data;
23017
- } //retreive data from memory
23616
+ } //retrieve data from memory
23018
23617
 
23019
23618
  }, {
23020
- key: "retreiveData",
23021
- value: function retreiveData(type) {
23619
+ key: "retrieveData",
23620
+ value: function retrieveData(type) {
23022
23621
  return this.readFunc ? this.readFunc(this.id, type) : false;
23023
23622
  } //merge old and new column definitions
23024
23623
 
@@ -23504,7 +24103,7 @@
23504
24103
  if (!this.manualBlock) {
23505
24104
  this.element = document.createElement("div");
23506
24105
  this.element.classList.add("tabulator-print-table");
23507
- this.element.appendChild(this.table.modules["export"].genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, "print"));
24106
+ this.element.appendChild(this.table.modules["export"].generateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, "print"));
23508
24107
  this.table.element.style.display = "none";
23509
24108
  this.table.element.parentNode.insertBefore(this.element, this.table.element);
23510
24109
  }
@@ -23526,7 +24125,7 @@
23526
24125
  scrollY = window.scrollY,
23527
24126
  headerEl = document.createElement("div"),
23528
24127
  footerEl = document.createElement("div"),
23529
- tableEl = this.table.modules["export"].genereateTable(typeof config != "undefined" ? config : this.table.options.printConfig, typeof style != "undefined" ? style : this.table.options.printStyled, visible || this.table.options.printRowRange, "print"),
24128
+ tableEl = 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"),
23530
24129
  headerContent,
23531
24130
  footerContent;
23532
24131
  this.manualBlock = true;
@@ -23608,10 +24207,10 @@
23608
24207
  key: "initialize",
23609
24208
  value: function initialize() {
23610
24209
  if (this.table.options.reactiveData) {
23611
- this.subscribe("cell-value-save-before", this.block.bind(this));
23612
- this.subscribe("cell-value-save-after", this.unblock.bind(this));
23613
- this.subscribe("row-data-save-before", this.block.bind(this));
23614
- this.subscribe("row-data-save-after", this.unblock.bind(this));
24210
+ this.subscribe("cell-value-save-before", this.block.bind(this, "cellsave"));
24211
+ this.subscribe("cell-value-save-after", this.unblock.bind(this, "cellsave"));
24212
+ this.subscribe("row-data-save-before", this.block.bind(this, "rowsave"));
24213
+ this.subscribe("row-data-save-after", this.unblock.bind(this, "rowsave"));
23615
24214
  this.subscribe("row-data-init-after", this.watchRow.bind(this));
23616
24215
  this.subscribe("data-processing", this.watchData.bind(this));
23617
24216
  this.subscribe("table-destroy", this.unwatchData.bind(this));
@@ -23632,15 +24231,19 @@
23632
24231
  enumerable: false,
23633
24232
  configurable: true,
23634
24233
  value: function value() {
23635
- var args = Array.from(arguments);
24234
+ var args = Array.from(arguments),
24235
+ result;
23636
24236
 
23637
24237
  if (!self.blocked && version === self.currentVersion) {
24238
+ self.block("data-push");
23638
24239
  args.forEach(function (arg) {
23639
24240
  self.table.rowManager.addRowActual(arg, false);
23640
24241
  });
24242
+ result = self.origFuncs.push.apply(data, arguments);
24243
+ self.unblock("data-push");
23641
24244
  }
23642
24245
 
23643
- return self.origFuncs.push.apply(data, arguments);
24246
+ return result;
23644
24247
  }
23645
24248
  }); //override array unshift function
23646
24249
 
@@ -23649,15 +24252,19 @@
23649
24252
  enumerable: false,
23650
24253
  configurable: true,
23651
24254
  value: function value() {
23652
- var args = Array.from(arguments);
24255
+ var args = Array.from(arguments),
24256
+ result;
23653
24257
 
23654
24258
  if (!self.blocked && version === self.currentVersion) {
24259
+ self.block("data-unshift");
23655
24260
  args.forEach(function (arg) {
23656
24261
  self.table.rowManager.addRowActual(arg, true);
23657
24262
  });
24263
+ result = self.origFuncs.unshift.apply(data, arguments);
24264
+ self.unblock("data-unshift");
23658
24265
  }
23659
24266
 
23660
- return self.origFuncs.unshift.apply(data, arguments);
24267
+ return result;
23661
24268
  }
23662
24269
  }); //override array shift function
23663
24270
 
@@ -23666,9 +24273,11 @@
23666
24273
  enumerable: false,
23667
24274
  configurable: true,
23668
24275
  value: function value() {
23669
- var row;
24276
+ var row, result;
23670
24277
 
23671
24278
  if (!self.blocked && version === self.currentVersion) {
24279
+ self.block("data-shift");
24280
+
23672
24281
  if (self.data.length) {
23673
24282
  row = self.table.rowManager.getRowFromDataObject(self.data[0]);
23674
24283
 
@@ -23676,9 +24285,12 @@
23676
24285
  row.deleteActual();
23677
24286
  }
23678
24287
  }
24288
+
24289
+ result = self.origFuncs.shift.call(data);
24290
+ self.unblock("data-shift");
23679
24291
  }
23680
24292
 
23681
- return self.origFuncs.shift.call(data);
24293
+ return result;
23682
24294
  }
23683
24295
  }); //override array pop function
23684
24296
 
@@ -23687,9 +24299,11 @@
23687
24299
  enumerable: false,
23688
24300
  configurable: true,
23689
24301
  value: function value() {
23690
- var row;
24302
+ var row, result;
23691
24303
 
23692
24304
  if (!self.blocked && version === self.currentVersion) {
24305
+ self.block("data-pop");
24306
+
23693
24307
  if (self.data.length) {
23694
24308
  row = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]);
23695
24309
 
@@ -23697,9 +24311,12 @@
23697
24311
  row.deleteActual();
23698
24312
  }
23699
24313
  }
24314
+
24315
+ result = self.origFuncs.pop.call(data);
24316
+ self.unblock("data-pop");
23700
24317
  }
23701
24318
 
23702
- return self.origFuncs.pop.call(data);
24319
+ return result;
23703
24320
  }
23704
24321
  }); //override array splice function
23705
24322
 
@@ -23712,10 +24329,12 @@
23712
24329
  start = args[0] < 0 ? data.length + args[0] : args[0],
23713
24330
  end = args[1],
23714
24331
  newRows = args[2] ? args.slice(2) : false,
23715
- startRow;
24332
+ startRow,
24333
+ result;
23716
24334
 
23717
24335
  if (!self.blocked && version === self.currentVersion) {
23718
- //add new rows
24336
+ self.block("data-splice"); //add new rows
24337
+
23719
24338
  if (newRows) {
23720
24339
  startRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false;
23721
24340
 
@@ -23746,9 +24365,12 @@
23746
24365
  if (newRows || end !== 0) {
23747
24366
  self.table.rowManager.reRenderInPosition();
23748
24367
  }
24368
+
24369
+ result = self.origFuncs.splice.apply(data, arguments);
24370
+ self.unblock("data-splice");
23749
24371
  }
23750
24372
 
23751
- return self.origFuncs.splice.apply(data, arguments);
24373
+ return result;
23752
24374
  }
23753
24375
  });
23754
24376
  }
@@ -23770,7 +24392,6 @@
23770
24392
  key: "watchRow",
23771
24393
  value: function watchRow(row) {
23772
24394
  var data = row.getData();
23773
- this.blocked = true;
23774
24395
 
23775
24396
  for (var key in data) {
23776
24397
  this.watchKey(row, data, key);
@@ -23779,21 +24400,16 @@
23779
24400
  if (this.table.options.dataTree) {
23780
24401
  this.watchTreeChildren(row);
23781
24402
  }
23782
-
23783
- this.blocked = false;
23784
24403
  }
23785
24404
  }, {
23786
24405
  key: "watchTreeChildren",
23787
24406
  value: function watchTreeChildren(row) {
23788
- var _arguments = arguments;
23789
- var childField = row.getData()[this.table.options.dataTreeChildField],
23790
- origFuncs = {};
24407
+ var _arguments = arguments,
24408
+ _this2 = this;
23791
24409
 
23792
- function rebuildTree() {
23793
- this.table.modules.dataTree.initializeRow(row);
23794
- this.table.modules.dataTree.layoutRow(row);
23795
- this.table.rowManager.refreshActiveData("tree", false, true);
23796
- }
24410
+ var self = this,
24411
+ childField = row.getData()[this.table.options.dataTreeChildField],
24412
+ origFuncs = {};
23797
24413
 
23798
24414
  if (childField) {
23799
24415
  origFuncs.push = childField.push;
@@ -23801,8 +24417,15 @@
23801
24417
  enumerable: false,
23802
24418
  configurable: true,
23803
24419
  value: function value() {
23804
- var result = origFuncs.push.apply(childField, _arguments);
23805
- rebuildTree();
24420
+ if (!self.blocked) {
24421
+ self.block("tree-push");
24422
+ var result = origFuncs.push.apply(childField, _arguments);
24423
+
24424
+ _this2.rebuildTree(row);
24425
+
24426
+ self.unblock("tree-push");
24427
+ }
24428
+
23806
24429
  return result;
23807
24430
  }
23808
24431
  });
@@ -23811,8 +24434,15 @@
23811
24434
  enumerable: false,
23812
24435
  configurable: true,
23813
24436
  value: function value() {
23814
- var result = origFuncs.unshift.apply(childField, _arguments);
23815
- rebuildTree();
24437
+ if (!self.blocked) {
24438
+ self.block("tree-unshift");
24439
+ var result = origFuncs.unshift.apply(childField, _arguments);
24440
+
24441
+ _this2.rebuildTree(row);
24442
+
24443
+ self.unblock("tree-unshift");
24444
+ }
24445
+
23816
24446
  return result;
23817
24447
  }
23818
24448
  });
@@ -23821,8 +24451,15 @@
23821
24451
  enumerable: false,
23822
24452
  configurable: true,
23823
24453
  value: function value() {
23824
- var result = origFuncs.shift.call(childField);
23825
- rebuildTree();
24454
+ if (!self.blocked) {
24455
+ self.block("tree-shift");
24456
+ var result = origFuncs.shift.call(childField);
24457
+
24458
+ _this2.rebuildTree(row);
24459
+
24460
+ self.unblock("tree-shift");
24461
+ }
24462
+
23826
24463
  return result;
23827
24464
  }
23828
24465
  });
@@ -23831,8 +24468,15 @@
23831
24468
  enumerable: false,
23832
24469
  configurable: true,
23833
24470
  value: function value() {
23834
- var result = origFuncs.pop.call(childField);
23835
- rebuildTree();
24471
+ if (!self.blocked) {
24472
+ self.block("tree-pop");
24473
+ var result = origFuncs.pop.call(childField);
24474
+
24475
+ _this2.rebuildTree(row);
24476
+
24477
+ self.unblock("tree-pop");
24478
+ }
24479
+
23836
24480
  return result;
23837
24481
  }
23838
24482
  });
@@ -23841,29 +24485,44 @@
23841
24485
  enumerable: false,
23842
24486
  configurable: true,
23843
24487
  value: function value() {
23844
- var result = origFuncs.splice.apply(childField, _arguments);
23845
- rebuildTree();
24488
+ if (!self.blocked) {
24489
+ self.block("tree-splice");
24490
+ var result = origFuncs.splice.apply(childField, _arguments);
24491
+
24492
+ _this2.rebuildTree(row);
24493
+
24494
+ self.unblock("tree-splice");
24495
+ }
24496
+
23846
24497
  return result;
23847
24498
  }
23848
24499
  });
23849
24500
  }
23850
24501
  }
24502
+ }, {
24503
+ key: "rebuildTree",
24504
+ value: function rebuildTree(row) {
24505
+ this.table.modules.dataTree.initializeRow(row);
24506
+ this.table.modules.dataTree.layoutRow(row);
24507
+ this.table.rowManager.refreshActiveData("tree", false, true);
24508
+ }
23851
24509
  }, {
23852
24510
  key: "watchKey",
23853
24511
  value: function watchKey(row, data, key) {
23854
- var _this2 = this;
23855
-
23856
- var props = Object.getOwnPropertyDescriptor(data, key),
24512
+ var self = this,
24513
+ props = Object.getOwnPropertyDescriptor(data, key),
23857
24514
  value = data[key],
23858
24515
  version = this.currentVersion;
23859
24516
  Object.defineProperty(data, key, {
23860
24517
  set: function set(newValue) {
23861
24518
  value = newValue;
23862
24519
 
23863
- if (!_this2.blocked && version === _this2.currentVersion) {
24520
+ if (!self.blocked && version === self.currentVersion) {
24521
+ self.block("key");
23864
24522
  var update = {};
23865
24523
  update[key] = newValue;
23866
24524
  row.updateData(update);
24525
+ self.unblock("key");
23867
24526
  }
23868
24527
 
23869
24528
  if (props.set) {
@@ -23892,13 +24551,17 @@
23892
24551
  }
23893
24552
  }, {
23894
24553
  key: "block",
23895
- value: function block() {
23896
- this.blocked = true;
24554
+ value: function block(key) {
24555
+ if (!this.blocked) {
24556
+ this.blocked = key;
24557
+ }
23897
24558
  }
23898
24559
  }, {
23899
24560
  key: "unblock",
23900
- value: function unblock() {
23901
- this.blocked = false;
24561
+ value: function unblock(key) {
24562
+ if (this.blocked === key) {
24563
+ this.blocked = false;
24564
+ }
23902
24565
  }
23903
24566
  }]);
23904
24567
 
@@ -24157,7 +24820,7 @@
24157
24820
  }
24158
24821
  }
24159
24822
 
24160
- self.table.columnManager.renderer.rerenderColumns(true);
24823
+ self.table.columnManager.rerenderColumns(true);
24161
24824
 
24162
24825
  if (!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) {
24163
24826
  column.checkCellHeights();
@@ -24186,7 +24849,7 @@
24186
24849
  }
24187
24850
  }
24188
24851
 
24189
- e.stopPropagation(); //prevent resize from interfereing with movable columns
24852
+ e.stopPropagation(); //prevent resize from interfering with movable columns
24190
24853
  //block editor from taking action while resizing is taking place
24191
24854
 
24192
24855
  if (self.startColumn.modules.edit) {
@@ -24307,7 +24970,7 @@
24307
24970
  self.dispatchExternal("rowResized", row.getComponent());
24308
24971
  }
24309
24972
 
24310
- e.stopPropagation(); //prevent resize from interfereing with movable columns
24973
+ e.stopPropagation(); //prevent resize from interfering with movable columns
24311
24974
  //block editor from taking action while resizing is taking place
24312
24975
  // if(self.startColumn.modules.edit){
24313
24976
  // self.startColumn.modules.edit.blocked = true;
@@ -24341,13 +25004,17 @@
24341
25004
 
24342
25005
  _this = _super.call(this, table);
24343
25006
  _this.binding = false;
24344
- _this.observer = false;
25007
+ _this.visibilityObserver = false;
25008
+ _this.resizeObserver = false;
24345
25009
  _this.containerObserver = false;
24346
25010
  _this.tableHeight = 0;
24347
25011
  _this.tableWidth = 0;
24348
25012
  _this.containerHeight = 0;
24349
25013
  _this.containerWidth = 0;
24350
25014
  _this.autoResize = false;
25015
+ _this.visible = false;
25016
+ _this.initialized = false;
25017
+ _this.initialRedraw = false;
24351
25018
 
24352
25019
  _this.registerTableOption("autoResize", true); //auto resize table
24353
25020
 
@@ -24371,9 +25038,10 @@
24371
25038
  this.containerWidth = table.element.parentNode.clientWidth;
24372
25039
  }
24373
25040
 
24374
- if (typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") {
25041
+ if (typeof IntersectionObserver !== "undefined" && typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") {
25042
+ this.initializeVisibilityObserver();
24375
25043
  this.autoResize = true;
24376
- this.observer = new ResizeObserver(function (entry) {
25044
+ this.resizeObserver = new ResizeObserver(function (entry) {
24377
25045
  if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) {
24378
25046
  var nodeHeight = Math.floor(entry[0].contentRect.height);
24379
25047
  var nodeWidth = Math.floor(entry[0].contentRect.width);
@@ -24387,13 +25055,11 @@
24387
25055
  _this2.containerWidth = table.element.parentNode.clientWidth;
24388
25056
  }
24389
25057
 
24390
- _this2.table.columnManager.renderer.rerenderColumns(true);
24391
-
24392
- table.redraw();
25058
+ _this2.redrawTable();
24393
25059
  }
24394
25060
  }
24395
25061
  });
24396
- this.observer.observe(table.element);
25062
+ this.resizeObserver.observe(table.element);
24397
25063
  tableStyle = window.getComputedStyle(table.element);
24398
25064
 
24399
25065
  if (this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue("max-height") || tableStyle.getPropertyValue("min-height"))) {
@@ -24409,8 +25075,7 @@
24409
25075
  _this2.tableWidth = table.element.clientWidth;
24410
25076
  }
24411
25077
 
24412
- table.columnManager.renderer.rerenderColumns(true);
24413
- table.redraw();
25078
+ _this2.redrawTable();
24414
25079
  }
24415
25080
  });
24416
25081
  this.containerObserver.observe(this.table.element.parentNode);
@@ -24420,7 +25085,7 @@
24420
25085
  } else {
24421
25086
  this.binding = function () {
24422
25087
  if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) {
24423
- table.columnManager.renderer.rerenderColumns(true);
25088
+ table.columnManager.rerenderColumns(true);
24424
25089
  table.redraw();
24425
25090
  }
24426
25091
  };
@@ -24431,6 +25096,35 @@
24431
25096
  this.subscribe("table-destroy", this.clearBindings.bind(this));
24432
25097
  }
24433
25098
  }
25099
+ }, {
25100
+ key: "initializeVisibilityObserver",
25101
+ value: function initializeVisibilityObserver() {
25102
+ var _this3 = this;
25103
+
25104
+ this.visibilityObserver = new IntersectionObserver(function (entries) {
25105
+ _this3.visible = entries[0].isIntersecting;
25106
+
25107
+ if (!_this3.initialized) {
25108
+ _this3.initialized = true;
25109
+ _this3.initialRedraw = !_this3.visible;
25110
+ }
25111
+
25112
+ if (_this3.visible) {
25113
+ _this3.redrawTable(_this3.initialRedraw);
25114
+
25115
+ _this3.initialRedraw = false;
25116
+ }
25117
+ });
25118
+ this.visibilityObserver.observe(this.table.element);
25119
+ }
25120
+ }, {
25121
+ key: "redrawTable",
25122
+ value: function redrawTable(force) {
25123
+ if (this.initialized && this.visible) {
25124
+ this.table.columnManager.rerenderColumns(true);
25125
+ this.table.redraw(force);
25126
+ }
25127
+ }
24434
25128
  }, {
24435
25129
  key: "tableResized",
24436
25130
  value: function tableResized() {
@@ -24443,8 +25137,12 @@
24443
25137
  window.removeEventListener("resize", this.binding);
24444
25138
  }
24445
25139
 
24446
- if (this.observer) {
24447
- this.observer.unobserve(this.table.element);
25140
+ if (this.resizeObserver) {
25141
+ this.resizeObserver.unobserve(this.table.element);
25142
+ }
25143
+
25144
+ if (this.visibilityObserver) {
25145
+ this.visibilityObserver.unobserve(this.table.element);
24448
25146
  }
24449
25147
 
24450
25148
  if (this.containerObserver) {
@@ -24498,7 +25196,6 @@
24498
25196
  _createClass(ResponsiveLayout, [{
24499
25197
  key: "initialize",
24500
25198
  value: function initialize() {
24501
-
24502
25199
  if (this.table.options.responsiveLayout) {
24503
25200
  this.subscribe("column-layout", this.initializeColumn.bind(this));
24504
25201
  this.subscribe("column-show", this.updateColumnVisibility.bind(this));
@@ -24866,7 +25563,7 @@
24866
25563
 
24867
25564
  _this.registerTableOption("selectableCheck", function (data, row) {
24868
25565
  return true;
24869
- }); //check wheather row is selectable
25566
+ }); //check whether row is selectable
24870
25567
 
24871
25568
 
24872
25569
  _this.registerTableFunction("selectRow", _this.selectRows.bind(_assertThisInitialized(_this)));
@@ -25112,7 +25809,7 @@
25112
25809
  }, {
25113
25810
  key: "_selectRow",
25114
25811
  value: function _selectRow(rowInfo, silent, force) {
25115
-
25812
+ //handle max row count
25116
25813
  if (!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force) {
25117
25814
  if (this.selectedRows.length >= this.table.options.selectable) {
25118
25815
  if (this.table.options.selectableRollingSelection) {
@@ -25403,27 +26100,27 @@
25403
26100
  }
25404
26101
 
25405
26102
  //sort datetime
25406
- function datetime$1 (a, b, aRow, bRow, column, dir, params) {
26103
+ function datetime$2 (a, b, aRow, bRow, column, dir, params) {
25407
26104
  var DT = window.DateTime || luxon.DateTime;
25408
26105
  var format = params.format || "dd/MM/yyyy HH:mm:ss",
25409
26106
  alignEmptyValues = params.alignEmptyValues,
25410
26107
  emptyAlign = 0;
25411
26108
 
25412
26109
  if (typeof DT != "undefined") {
25413
- if (DT.isDateTime(a)) {
25414
- a = a;
25415
- } else if (format === "iso") {
25416
- a = DT.fromISO(String(a));
25417
- } else {
25418
- a = DT.fromFormat(String(a), format);
26110
+ if (!DT.isDateTime(a)) {
26111
+ if (format === "iso") {
26112
+ a = DT.fromISO(String(a));
26113
+ } else {
26114
+ a = DT.fromFormat(String(a), format);
26115
+ }
25419
26116
  }
25420
26117
 
25421
- if (DT.isDateTime(b)) {
25422
- b = b;
25423
- } else if (format === "iso") {
25424
- b = DT.fromISO(String(b));
25425
- } else {
25426
- b = DT.fromFormat(String(b), format);
26118
+ if (!DT.isDateTime(b)) {
26119
+ if (format === "iso") {
26120
+ b = DT.fromISO(String(b));
26121
+ } else {
26122
+ b = DT.fromFormat(String(b), format);
26123
+ }
25427
26124
  }
25428
26125
 
25429
26126
  if (!a.isValid) {
@@ -25446,20 +26143,20 @@
25446
26143
  }
25447
26144
  }
25448
26145
 
25449
- function date (a, b, aRow, bRow, column, dir, params) {
26146
+ function date$1 (a, b, aRow, bRow, column, dir, params) {
25450
26147
  if (!params.format) {
25451
26148
  params.format = "dd/MM/yyyy";
25452
26149
  }
25453
26150
 
25454
- return datetime$1.call(this, a, b, aRow, bRow, column, dir, params);
26151
+ return datetime$2.call(this, a, b, aRow, bRow, column, dir, params);
25455
26152
  }
25456
26153
 
25457
- function time (a, b, aRow, bRow, column, dir, params) {
26154
+ function time$1 (a, b, aRow, bRow, column, dir, params) {
25458
26155
  if (!params.format) {
25459
26156
  params.format = "HH:mm";
25460
26157
  }
25461
26158
 
25462
- return datetime$1.call(this, a, b, aRow, bRow, column, dir, params);
26159
+ return datetime$2.call(this, a, b, aRow, bRow, column, dir, params);
25463
26160
  }
25464
26161
 
25465
26162
  //sort booleans
@@ -25471,45 +26168,49 @@
25471
26168
 
25472
26169
  //sort if element contains any data
25473
26170
  function array (a, b, aRow, bRow, column, dir, params) {
25474
- var el1 = 0;
25475
- var el2 = 0;
25476
- var type = params.type || "length";
25477
- var alignEmptyValues = params.alignEmptyValues;
25478
- var emptyAlign = 0;
26171
+ var type = params.type || "length",
26172
+ alignEmptyValues = params.alignEmptyValues,
26173
+ emptyAlign = 0;
25479
26174
 
25480
26175
  function calc(value) {
26176
+ var result;
26177
+
25481
26178
  switch (type) {
25482
26179
  case "length":
25483
- return value.length;
26180
+ result = value.length;
26181
+ break;
25484
26182
 
25485
26183
  case "sum":
25486
- return value.reduce(function (c, d) {
26184
+ result = value.reduce(function (c, d) {
25487
26185
  return c + d;
25488
26186
  });
26187
+ break;
25489
26188
 
25490
26189
  case "max":
25491
- return Math.max.apply(null, value);
26190
+ result = Math.max.apply(null, value);
26191
+ break;
25492
26192
 
25493
26193
  case "min":
25494
- return Math.min.apply(null, value);
26194
+ result = Math.min.apply(null, value);
26195
+ break;
25495
26196
 
25496
26197
  case "avg":
25497
- return value.reduce(function (c, d) {
26198
+ result = value.reduce(function (c, d) {
25498
26199
  return c + d;
25499
26200
  }) / value.length;
26201
+ break;
25500
26202
  }
26203
+
26204
+ return result;
25501
26205
  } //handle non array values
25502
26206
 
25503
26207
 
25504
26208
  if (!Array.isArray(a)) {
25505
- alignEmptyValues = !Array.isArray(b) ? 0 : -1;
26209
+ emptyAlign = !Array.isArray(b) ? 0 : -1;
25506
26210
  } else if (!Array.isArray(b)) {
25507
- alignEmptyValues = 1;
26211
+ emptyAlign = 1;
25508
26212
  } else {
25509
- //compare valid values
25510
- el1 = a ? calc(a) : 0;
25511
- el2 = b ? calc(b) : 0;
25512
- return el1 - el2;
26213
+ return calc(b) - calc(a);
25513
26214
  } //fix empty values in position
25514
26215
 
25515
26216
 
@@ -25581,9 +26282,9 @@
25581
26282
  var defaultSorters = {
25582
26283
  number: number$1,
25583
26284
  string: string,
25584
- date: date,
25585
- time: time,
25586
- datetime: datetime$1,
26285
+ date: date$1,
26286
+ time: time$1,
26287
+ datetime: datetime$2,
25587
26288
  "boolean": _boolean,
25588
26289
  array: array,
25589
26290
  exists: exists,
@@ -25723,15 +26424,23 @@
25723
26424
  arrowEl = document.createElement("div");
25724
26425
  arrowEl.classList.add("tabulator-col-sorter");
25725
26426
 
25726
- if (_typeof(this.table.options.headerSortElement) == "object") {
25727
- arrowEl.appendChild(this.table.options.headerSortElement);
25728
- } else {
25729
- arrowEl.innerHTML = this.table.options.headerSortElement;
26427
+ switch (this.table.options.headerSortElement) {
26428
+ case "function":
26429
+ //do nothing
26430
+ break;
26431
+
26432
+ case "object":
26433
+ arrowEl.appendChild(this.table.options.headerSortElement);
26434
+ break;
26435
+
26436
+ default:
26437
+ arrowEl.innerHTML = this.table.options.headerSortElement;
25730
26438
  } //create sorter arrow
25731
26439
 
25732
26440
 
25733
26441
  column.titleHolderElement.appendChild(arrowEl);
25734
- column.modules.sort.element = arrowEl; //sort on click
26442
+ column.modules.sort.element = arrowEl;
26443
+ this.setColumnHeaderSortIcon(column, "none"); //sort on click
25735
26444
 
25736
26445
  colEl.addEventListener("click", function (e) {
25737
26446
  var dir = "",
@@ -25937,19 +26646,23 @@
25937
26646
  if (this.table.options.sortMode !== "remote") {
25938
26647
  //build list of valid sorters and trigger column specific callbacks before sort begins
25939
26648
  sortList.forEach(function (item, i) {
25940
- var sortObj = item.column.modules.sort;
26649
+ var sortObj;
26650
+
26651
+ if (item.column) {
26652
+ sortObj = item.column.modules.sort;
26653
+
26654
+ if (sortObj) {
26655
+ //if no sorter has been defined, take a guess
26656
+ if (!sortObj.sorter) {
26657
+ sortObj.sorter = self.findSorter(item.column);
26658
+ }
25941
26659
 
25942
- if (item.column && sortObj) {
25943
- //if no sorter has been defined, take a guess
25944
- if (!sortObj.sorter) {
25945
- sortObj.sorter = self.findSorter(item.column);
26660
+ item.params = typeof sortObj.params === "function" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params;
26661
+ sortListActual.push(item);
25946
26662
  }
25947
26663
 
25948
- item.params = typeof sortObj.params === "function" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params;
25949
- sortListActual.push(item);
26664
+ self.setColumnHeader(item.column, item.dir);
25950
26665
  }
25951
-
25952
- self.setColumnHeader(item.column, item.dir);
25953
26666
  }); //sort data
25954
26667
 
25955
26668
  if (sortListActual.length) {
@@ -25974,10 +26687,14 @@
25974
26687
  }, {
25975
26688
  key: "clearColumnHeaders",
25976
26689
  value: function clearColumnHeaders() {
26690
+ var _this3 = this;
26691
+
25977
26692
  this.table.columnManager.getRealColumns().forEach(function (column) {
25978
26693
  if (column.modules.sort) {
25979
26694
  column.modules.sort.dir = "none";
25980
26695
  column.getElement().setAttribute("aria-sort", "none");
26696
+
26697
+ _this3.setColumnHeaderSortIcon(column, "none");
25981
26698
  }
25982
26699
  });
25983
26700
  } //set the column header sort direction
@@ -25987,12 +26704,33 @@
25987
26704
  value: function setColumnHeader(column, dir) {
25988
26705
  column.modules.sort.dir = dir;
25989
26706
  column.getElement().setAttribute("aria-sort", dir === "asc" ? "ascending" : "descending");
26707
+ this.setColumnHeaderSortIcon(column, dir);
26708
+ }
26709
+ }, {
26710
+ key: "setColumnHeaderSortIcon",
26711
+ value: function setColumnHeaderSortIcon(column, dir) {
26712
+ var sortEl = column.modules.sort.element,
26713
+ arrowEl;
26714
+
26715
+ if (typeof this.table.options.headerSortElement === "function") {
26716
+ while (sortEl.firstChild) {
26717
+ sortEl.removeChild(sortEl.firstChild);
26718
+ }
26719
+
26720
+ arrowEl = this.table.options.headerSortElement.call(this.table, column.getComponent(), dir);
26721
+
26722
+ if (_typeof(arrowEl) === "object") {
26723
+ sortEl.appendChild(arrowEl);
26724
+ } else {
26725
+ sortEl.innerHTML = arrowEl;
26726
+ }
26727
+ }
25990
26728
  } //sort each item in sort list
25991
26729
 
25992
26730
  }, {
25993
26731
  key: "_sortItems",
25994
26732
  value: function _sortItems(data, sortList) {
25995
- var _this3 = this;
26733
+ var _this4 = this;
25996
26734
 
25997
26735
  var sorterCount = sortList.length - 1;
25998
26736
  data.sort(function (a, b) {
@@ -26000,7 +26738,7 @@
26000
26738
 
26001
26739
  for (var i = sorterCount; i >= 0; i--) {
26002
26740
  var sortItem = sortList[i];
26003
- result = _this3._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);
26741
+ result = _this4._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);
26004
26742
 
26005
26743
  if (result !== 0) {
26006
26744
  break;
@@ -26064,15 +26802,13 @@
26064
26802
  _createClass(Tooltip, [{
26065
26803
  key: "initialize",
26066
26804
  value: function initialize() {
26067
- this.deprecationCheck();
26805
+ this.deprecatedOptionsCheck();
26068
26806
  this.subscribe("column-init", this.initializeColumn.bind(this));
26069
26807
  }
26070
26808
  }, {
26071
- key: "deprecationCheck",
26072
- value: function deprecationCheck() {
26073
- if (typeof this.table.options.tooltipGenerationMode !== "undefined") {
26074
- console.warn("Use of the tooltipGenerationMode option is now deprecated. This option is no longer needed as tooltips are always generated on hover now");
26075
- }
26809
+ key: "deprecatedOptionsCheck",
26810
+ value: function deprecatedOptionsCheck() {
26811
+ this.deprecationCheckMsg("tooltipGenerationMode", "This option is no longer needed as tooltips are always generated on hover now");
26076
26812
  }
26077
26813
  }, {
26078
26814
  key: "initializeColumn",
@@ -26153,7 +26889,7 @@
26153
26889
  contentsEl.innerHTML = tooltip;
26154
26890
  }
26155
26891
 
26156
- if (tooltip || tooltip === 0 || tooltip === "0" || tooltip === false) {
26892
+ if (tooltip || tooltip === 0 || tooltip === false) {
26157
26893
  contentsEl.classList.add("tabulator-tooltip");
26158
26894
  contentsEl.addEventListener("mousemove", function (e) {
26159
26895
  return e.preventDefault();
@@ -26188,7 +26924,7 @@
26188
26924
  }
26189
26925
 
26190
26926
  value = Number(value);
26191
- return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;
26927
+ return !isNaN(value) && isFinite(value) && Math.floor(value) === value;
26192
26928
  },
26193
26929
  //is float
26194
26930
  "float": function float(cell, value, parameters) {
@@ -26197,7 +26933,7 @@
26197
26933
  }
26198
26934
 
26199
26935
  value = Number(value);
26200
- return typeof value === 'number' && isFinite(value) && value % 1 !== 0;
26936
+ return !isNaN(value) && isFinite(value) && value % 1 !== 0;
26201
26937
  },
26202
26938
  //must be a number
26203
26939
  numeric: function numeric(cell, value, parameters) {
@@ -26273,7 +27009,7 @@
26273
27009
  parameters = parameters.split("|");
26274
27010
  }
26275
27011
 
26276
- return value === "" || parameters.indexOf(value) > -1;
27012
+ return parameters.indexOf(value) > -1;
26277
27013
  },
26278
27014
  //must match provided regex
26279
27015
  regex: function regex(cell, value, parameters) {
@@ -26681,7 +27417,8 @@
26681
27417
  }
26682
27418
 
26683
27419
  return TabulatorFull;
26684
- }(Tabulator);
27420
+ }(Tabulator); //bind modules and static functionality
27421
+
26685
27422
 
26686
27423
  new ModuleBinder(TabulatorFull, modules);
26687
27424