tabulator-tables 5.2.7 → 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 (214) hide show
  1. package/.eslintignore +3 -0
  2. package/.eslintrc.js +28 -0
  3. package/.github/workflows/bad-files-check.yml +39 -0
  4. package/.github/workflows/lint-and-test.yml +31 -0
  5. package/README.md +3 -3
  6. package/bower.json +1 -1
  7. package/build/Bundler.js +77 -77
  8. package/dist/css/tabulator.css +12 -7
  9. package/dist/css/tabulator.css.map +1 -1
  10. package/dist/css/tabulator.min.css +1 -1
  11. package/dist/css/tabulator.min.css.map +1 -1
  12. package/dist/css/tabulator_bootstrap3.css +12 -7
  13. package/dist/css/tabulator_bootstrap3.css.map +1 -1
  14. package/dist/css/tabulator_bootstrap3.min.css +1 -1
  15. package/dist/css/tabulator_bootstrap3.min.css.map +1 -1
  16. package/dist/css/tabulator_bootstrap4.css +12 -7
  17. package/dist/css/tabulator_bootstrap4.css.map +1 -1
  18. package/dist/css/tabulator_bootstrap4.min.css +1 -1
  19. package/dist/css/tabulator_bootstrap4.min.css.map +1 -1
  20. package/dist/css/tabulator_bootstrap5.css +12 -7
  21. package/dist/css/tabulator_bootstrap5.css.map +1 -1
  22. package/dist/css/tabulator_bootstrap5.min.css +1 -1
  23. package/dist/css/tabulator_bootstrap5.min.css.map +1 -1
  24. package/dist/css/tabulator_bulma.css +12 -7
  25. package/dist/css/tabulator_bulma.css.map +1 -1
  26. package/dist/css/tabulator_bulma.min.css +1 -1
  27. package/dist/css/tabulator_bulma.min.css.map +1 -1
  28. package/dist/css/tabulator_materialize.css +12 -7
  29. package/dist/css/tabulator_materialize.css.map +1 -1
  30. package/dist/css/tabulator_materialize.min.css +1 -1
  31. package/dist/css/tabulator_materialize.min.css.map +1 -1
  32. package/dist/css/tabulator_midnight.css +12 -7
  33. package/dist/css/tabulator_midnight.css.map +1 -1
  34. package/dist/css/tabulator_midnight.min.css +1 -1
  35. package/dist/css/tabulator_midnight.min.css.map +1 -1
  36. package/dist/css/tabulator_modern.css +12 -7
  37. package/dist/css/tabulator_modern.css.map +1 -1
  38. package/dist/css/tabulator_modern.min.css +1 -1
  39. package/dist/css/tabulator_modern.min.css.map +1 -1
  40. package/dist/css/tabulator_semanticui.css +12 -7
  41. package/dist/css/tabulator_semanticui.css.map +1 -1
  42. package/dist/css/tabulator_semanticui.min.css +1 -1
  43. package/dist/css/tabulator_semanticui.min.css.map +1 -1
  44. package/dist/css/tabulator_simple.css +12 -7
  45. package/dist/css/tabulator_simple.css.map +1 -1
  46. package/dist/css/tabulator_simple.min.css +1 -1
  47. package/dist/css/tabulator_simple.min.css.map +1 -1
  48. package/dist/css/tabulator_site.css +12 -7
  49. package/dist/css/tabulator_site.css.map +1 -1
  50. package/dist/css/tabulator_site.min.css +1 -1
  51. package/dist/css/tabulator_site.min.css.map +1 -1
  52. package/dist/js/jquery_wrapper.js +37 -37
  53. package/dist/js/tabulator.js +1388 -683
  54. package/dist/js/tabulator.js.map +1 -1
  55. package/dist/js/tabulator.min.js +2 -2
  56. package/dist/js/tabulator.min.js.map +1 -1
  57. package/dist/js/tabulator_esm.js +4135 -3470
  58. package/dist/js/tabulator_esm.js.map +1 -1
  59. package/dist/js/tabulator_esm.min.js +2 -2
  60. package/dist/js/tabulator_esm.min.js.map +1 -1
  61. package/package.json +4 -1
  62. package/src/js/builds/jquery_wrapper.js +37 -37
  63. package/src/js/core/ColumnManager.js +259 -231
  64. package/src/js/core/CoreFeature.js +16 -2
  65. package/src/js/core/FooterManager.js +10 -10
  66. package/src/js/core/Module.js +8 -8
  67. package/src/js/core/RowManager.js +79 -88
  68. package/src/js/core/Tabulator.js +86 -72
  69. package/src/js/core/TabulatorFull.js +1 -1
  70. package/src/js/core/cell/Cell.js +15 -16
  71. package/src/js/core/cell/CellComponent.js +2 -2
  72. package/src/js/core/column/Column.js +55 -66
  73. package/src/js/core/column/ColumnComponent.js +4 -4
  74. package/src/js/core/column/defaults/options.js +1 -1
  75. package/src/js/core/defaults/options.js +4 -2
  76. package/src/js/core/rendering/Renderer.js +19 -19
  77. package/src/js/core/rendering/renderers/BasicHorizontal.js +1 -2
  78. package/src/js/core/rendering/renderers/BasicVertical.js +1 -1
  79. package/src/js/core/rendering/renderers/VirtualDomHorizontal.js +42 -58
  80. package/src/js/core/rendering/renderers/VirtualDomVertical.js +31 -22
  81. package/src/js/core/row/Row.js +32 -8
  82. package/src/js/core/row/RowComponent.js +8 -4
  83. package/src/js/core/tools/Alert.js +44 -45
  84. package/src/js/core/tools/ComponentFunctionBinder.js +4 -2
  85. package/src/js/core/tools/DataLoader.js +3 -3
  86. package/src/js/core/tools/DeprecationAdvisor.js +47 -0
  87. package/src/js/core/tools/ExternalEventBus.js +5 -5
  88. package/src/js/core/tools/InteractionMonitor.js +31 -32
  89. package/src/js/core/tools/InternalEventBus.js +5 -5
  90. package/src/js/core/tools/ModuleBinder.js +6 -6
  91. package/src/js/core/tools/OptionsList.js +4 -4
  92. package/src/js/core/tools/Popup.js +211 -202
  93. package/src/js/modules/Accessor/Accessor.js +16 -16
  94. package/src/js/modules/Accessor/defaults/accessors.js +1 -1
  95. package/src/js/modules/Ajax/Ajax.js +7 -7
  96. package/src/js/modules/Ajax/defaults/loaderPromise.js +19 -19
  97. package/src/js/modules/Ajax/defaults/urlGenerator.js +1 -1
  98. package/src/js/modules/Clipboard/Clipboard.js +23 -23
  99. package/src/js/modules/Clipboard/defaults/pasteParsers.js +0 -2
  100. package/src/js/modules/ColumnCalcs/CalcComponent.js +2 -2
  101. package/src/js/modules/ColumnCalcs/ColumnCalcs.js +54 -50
  102. package/src/js/modules/ColumnCalcs/defaults/calculations.js +1 -1
  103. package/src/js/modules/DataTree/DataTree.js +19 -14
  104. package/src/js/modules/Download/Download.js +15 -8
  105. package/src/js/modules/Download/defaults/downloaders/csv.js +28 -28
  106. package/src/js/modules/Download/defaults/downloaders/html.js +2 -2
  107. package/src/js/modules/Download/defaults/downloaders/json.js +14 -14
  108. package/src/js/modules/Download/defaults/downloaders/jsonLines.js +1 -1
  109. package/src/js/modules/Download/defaults/downloaders/pdf.js +17 -19
  110. package/src/js/modules/Download/defaults/downloaders/xlsx.js +2 -2
  111. package/src/js/modules/Edit/Edit.js +219 -201
  112. package/src/js/modules/Edit/List.js +1026 -1006
  113. package/src/js/modules/Edit/defaults/editors/autocomplete.js +3 -3
  114. package/src/js/modules/Edit/defaults/editors/date.js +110 -0
  115. package/src/js/modules/Edit/defaults/editors/datetime.js +97 -0
  116. package/src/js/modules/Edit/defaults/editors/input.js +7 -7
  117. package/src/js/modules/Edit/defaults/editors/list.js +2 -2
  118. package/src/js/modules/Edit/defaults/editors/number.js +12 -12
  119. package/src/js/modules/Edit/defaults/editors/progress.js +11 -11
  120. package/src/js/modules/Edit/defaults/editors/range.js +5 -5
  121. package/src/js/modules/Edit/defaults/editors/select.js +3 -3
  122. package/src/js/modules/Edit/defaults/editors/star.js +9 -9
  123. package/src/js/modules/Edit/defaults/editors/textarea.js +97 -92
  124. package/src/js/modules/Edit/defaults/editors/tickCross.js +1 -3
  125. package/src/js/modules/Edit/defaults/editors/time.js +98 -0
  126. package/src/js/modules/Edit/defaults/editors.js +8 -2
  127. package/src/js/modules/Edit/inputMask.js +19 -26
  128. package/src/js/modules/Export/Export.js +69 -65
  129. package/src/js/modules/Filter/Filter.js +85 -95
  130. package/src/js/modules/Format/Format.js +24 -26
  131. package/src/js/modules/Format/defaults/formatters/buttonCross.js +1 -1
  132. package/src/js/modules/Format/defaults/formatters/buttonTick.js +1 -1
  133. package/src/js/modules/Format/defaults/formatters/color.js +1 -1
  134. package/src/js/modules/Format/defaults/formatters/datetime.js +7 -7
  135. package/src/js/modules/Format/defaults/formatters/datetimediff.js +7 -7
  136. package/src/js/modules/Format/defaults/formatters/handle.js +1 -1
  137. package/src/js/modules/Format/defaults/formatters/html.js +1 -1
  138. package/src/js/modules/Format/defaults/formatters/image.js +9 -9
  139. package/src/js/modules/Format/defaults/formatters/link.js +10 -10
  140. package/src/js/modules/Format/defaults/formatters/lookup.js +1 -1
  141. package/src/js/modules/Format/defaults/formatters/money.js +1 -1
  142. package/src/js/modules/Format/defaults/formatters/plaintext.js +1 -1
  143. package/src/js/modules/Format/defaults/formatters/progress.js +41 -42
  144. package/src/js/modules/Format/defaults/formatters/responsiveCollapse.js +3 -3
  145. package/src/js/modules/Format/defaults/formatters/rowSelection.js +1 -1
  146. package/src/js/modules/Format/defaults/formatters/rownum.js +9 -2
  147. package/src/js/modules/Format/defaults/formatters/star.js +1 -1
  148. package/src/js/modules/Format/defaults/formatters/textarea.js +1 -1
  149. package/src/js/modules/Format/defaults/formatters/tickCross.js +1 -1
  150. package/src/js/modules/Format/defaults/formatters/traffic.js +14 -14
  151. package/src/js/modules/FrozenColumns/FrozenColumns.js +6 -8
  152. package/src/js/modules/FrozenRows/FrozenRows.js +37 -7
  153. package/src/js/modules/GroupRows/Group.js +3 -3
  154. package/src/js/modules/GroupRows/GroupComponent.js +2 -2
  155. package/src/js/modules/GroupRows/GroupRows.js +12 -11
  156. package/src/js/modules/History/History.js +2 -2
  157. package/src/js/modules/HtmlTableImport/HtmlTableImport.js +3 -6
  158. package/src/js/modules/Import/Import.js +158 -159
  159. package/src/js/modules/Import/defaults/importers/array.js +5 -0
  160. package/src/js/modules/Import/defaults/importers/csv.js +49 -49
  161. package/src/js/modules/Import/defaults/importers/json.js +6 -6
  162. package/src/js/modules/Import/defaults/importers.js +2 -0
  163. package/src/js/modules/Interaction/Interaction.js +39 -40
  164. package/src/js/modules/Keybindings/Keybindings.js +14 -14
  165. package/src/js/modules/Keybindings/defaults/actions.js +1 -2
  166. package/src/js/modules/Layout/Layout.js +4 -5
  167. package/src/js/modules/Layout/defaults/modes/fitColumns.js +9 -10
  168. package/src/js/modules/Layout/defaults/modes/fitData.js +6 -4
  169. package/src/js/modules/Layout/defaults/modes/fitDataGeneral.js +2 -2
  170. package/src/js/modules/Layout/defaults/modes/fitDataStretch.js +2 -2
  171. package/src/js/modules/Localize/Localize.js +7 -7
  172. package/src/js/modules/Menu/Menu.js +8 -11
  173. package/src/js/modules/MoveColumns/MoveColumns.js +3 -6
  174. package/src/js/modules/MoveRows/MoveRows.js +30 -36
  175. package/src/js/modules/Mutator/Mutator.js +9 -9
  176. package/src/js/modules/Page/Page.js +73 -80
  177. package/src/js/modules/Page/defaults/pageCounters/pages.js +2 -2
  178. package/src/js/modules/Page/defaults/pageCounters/rows.js +1 -1
  179. package/src/js/modules/Persistence/Persistence.js +40 -44
  180. package/src/js/modules/Persistence/defaults/readers.js +1 -1
  181. package/src/js/modules/Popup/Popup.js +4 -5
  182. package/src/js/modules/Print/Print.js +2 -2
  183. package/src/js/modules/ReactiveData/ReactiveData.js +178 -115
  184. package/src/js/modules/ResizeColumns/ResizeColumns.js +3 -3
  185. package/src/js/modules/ResizeRows/ResizeRows.js +1 -1
  186. package/src/js/modules/ResizeTable/ResizeTable.js +77 -46
  187. package/src/js/modules/ResponsiveLayout/ResponsiveLayout.js +0 -3
  188. package/src/js/modules/SelectRow/SelectRow.js +26 -28
  189. package/src/js/modules/Sort/Sort.js +110 -79
  190. package/src/js/modules/Sort/defaults/sorters/alphanum.js +1 -1
  191. package/src/js/modules/Sort/defaults/sorters/array.js +24 -28
  192. package/src/js/modules/Sort/defaults/sorters/boolean.js +1 -1
  193. package/src/js/modules/Sort/defaults/sorters/date.js +1 -1
  194. package/src/js/modules/Sort/defaults/sorters/datetime.js +13 -13
  195. package/src/js/modules/Sort/defaults/sorters/exists.js +1 -1
  196. package/src/js/modules/Sort/defaults/sorters/number.js +1 -1
  197. package/src/js/modules/Sort/defaults/sorters/string.js +7 -7
  198. package/src/js/modules/Sort/defaults/sorters/time.js +1 -1
  199. package/src/js/modules/Tooltip/Tooltip.js +5 -7
  200. package/src/js/modules/Validate/Validate.js +10 -13
  201. package/src/js/modules/Validate/defaults/validators.js +8 -3
  202. package/src/scss/tabulator.scss +28 -17
  203. package/src/scss/themes/bootstrap/functions4.scss +1 -1
  204. package/src/scss/themes/bootstrap/tabulator_bootstrap3.scss +8 -8
  205. package/src/scss/themes/bootstrap/tabulator_bootstrap4.scss +8 -8
  206. package/src/scss/themes/bootstrap/tabulator_bootstrap5.scss +8 -8
  207. package/src/scss/themes/bulma/tabulator_bulma.scss +7 -7
  208. package/src/scss/themes/materialize/tabulator_materialize.scss +6 -6
  209. package/src/scss/themes/materialize/variables.scss +1 -1
  210. package/src/scss/themes/semanticui/tabulator_semanticui.scss +7 -7
  211. package/src/scss/themes/tabulator_midnight.scss +7 -7
  212. package/src/scss/themes/tabulator_modern.scss +14 -14
  213. package/src/scss/themes/tabulator_simple.scss +8 -8
  214. package/src/scss/themes/tabulator_site.scss +15 -15
@@ -1,4 +1,4 @@
1
- /* Tabulator v5.2.7 (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
- }
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];
2680
2676
 
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
- // }
2685
-
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,6 +7257,7 @@
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
 
@@ -7350,12 +7482,22 @@
7350
7482
  this.hide();
7351
7483
  }
7352
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
+ }
7353
7495
  }, {
7354
7496
  key: "hide",
7355
7497
  value: function hide() {
7356
7498
  var silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
7357
7499
 
7358
- if (this.visible) {
7500
+ if (this.visible && this.hideable) {
7359
7501
  if (this.blurable) {
7360
7502
  document.body.removeEventListener("keydown", this.escEvent);
7361
7503
  document.body.removeEventListener("click", this.blurEvent);
@@ -7421,7 +7563,7 @@
7421
7563
 
7422
7564
  _createClass(Module, [{
7423
7565
  key: "initialize",
7424
- 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
7425
7567
  } ///////////////////////////////////
7426
7568
  ////// Options Registration ///////
7427
7569
  ///////////////////////////////////
@@ -7530,8 +7672,10 @@
7530
7672
  }(CoreFeature);
7531
7673
 
7532
7674
  //resize columns to fit data they contain
7533
- function fitData (columns) {
7534
- this.table.columnManager.renderer.reinitializeColumnWidths(columns);
7675
+ function fitData (columns, forced) {
7676
+ if (forced) {
7677
+ this.table.columnManager.renderer.reinitializeColumnWidths(columns);
7678
+ }
7535
7679
 
7536
7680
  if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) {
7537
7681
  this.table.modules.responsiveLayout.update();
@@ -7539,7 +7683,7 @@
7539
7683
  }
7540
7684
 
7541
7685
  //resize columns to fit data they contain and stretch row to fill table, also used for fitDataTable
7542
- function fitDataGeneral (columns) {
7686
+ function fitDataGeneral (columns, forced) {
7543
7687
  columns.forEach(function (column) {
7544
7688
  column.reinitializeWidth();
7545
7689
  });
@@ -7550,7 +7694,7 @@
7550
7694
  }
7551
7695
 
7552
7696
  //resize columns to fit data the contain and stretch last column to fill table
7553
- function fitDataStretch (columns) {
7697
+ function fitDataStretch (columns, forced) {
7554
7698
  var _this = this;
7555
7699
 
7556
7700
  var colsWidth = 0,
@@ -7592,14 +7736,14 @@
7592
7736
  }
7593
7737
 
7594
7738
  //resize columns to fit
7595
- function fitColumns (columns) {
7739
+ function fitColumns (columns, forced) {
7596
7740
  var totalWidth = this.table.element.clientWidth; //table element width
7597
7741
 
7598
7742
  var fixedWidth = 0; //total width of columns with a defined width
7599
7743
 
7600
7744
  var flexWidth = 0; //total width available to flexible columns
7601
7745
 
7602
- var flexGrowUnits = 0; //total number of widthGrow blocks accross all columns
7746
+ var flexGrowUnits = 0; //total number of widthGrow blocks across all columns
7603
7747
 
7604
7748
  var flexColWidth = 0; //desired width of flexible columns
7605
7749
 
@@ -7607,7 +7751,7 @@
7607
7751
 
7608
7752
  var fixedShrinkColumns = []; //array of fixed width columns that can shrink
7609
7753
 
7610
- var flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns
7754
+ var flexShrinkUnits = 0; //total number of widthShrink blocks across all columns
7611
7755
 
7612
7756
  var overflowWidth = 0; //horizontal overflow width
7613
7757
 
@@ -7729,11 +7873,11 @@
7729
7873
 
7730
7874
  flexColWidth = Math.floor(flexWidth / flexGrowUnits); //generate column widths
7731
7875
 
7732
- 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
7733
7877
 
7734
7878
  if (flexColumns.length && gapFill > 0) {
7735
7879
  flexColumns[flexColumns.length - 1].width += +gapFill;
7736
- } //caculate space for columns to be shrunk into
7880
+ } //calculate space for columns to be shrunk into
7737
7881
 
7738
7882
 
7739
7883
  flexColumns.forEach(function (col) {
@@ -7815,9 +7959,9 @@
7815
7959
 
7816
7960
  }, {
7817
7961
  key: "layout",
7818
- value: function layout() {
7962
+ value: function layout(dataChanged) {
7819
7963
  this.dispatch("layout-refreshing");
7820
- Layout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex);
7964
+ Layout.modes[this.mode].call(this, this.table.columnManager.columnsByIndex, dataChanged);
7821
7965
  this.dispatch("layout-refreshed");
7822
7966
  }
7823
7967
  }]);
@@ -7911,7 +8055,7 @@
7911
8055
  this.registerTableFunction("setLocale", this.setLocale.bind(this));
7912
8056
  this.registerTableFunction("getLocale", this.getLocale.bind(this));
7913
8057
  this.registerTableFunction("getLang", this.getLang.bind(this));
7914
- } //set header placehoder
8058
+ } //set header placeholder
7915
8059
 
7916
8060
  }, {
7917
8061
  key: "setHeaderFilterPlaceholder",
@@ -7953,7 +8097,7 @@
7953
8097
  }, {
7954
8098
  key: "setLocale",
7955
8099
  value: function setLocale(desiredLocale) {
7956
- desiredLocale = desiredLocale || "default"; //fill in any matching languge values
8100
+ desiredLocale = desiredLocale || "default"; //fill in any matching language values
7957
8101
 
7958
8102
  function traverseLang(trans, path) {
7959
8103
  for (var prop in trans) {
@@ -7967,7 +8111,7 @@
7967
8111
  path[prop] = trans[prop];
7968
8112
  }
7969
8113
  }
7970
- } //determing correct locale to load
8114
+ } //determining correct locale to load
7971
8115
 
7972
8116
 
7973
8117
  if (desiredLocale === true && navigator.language) {
@@ -8018,8 +8162,8 @@
8018
8162
  }, {
8019
8163
  key: "getText",
8020
8164
  value: function getText(path, value) {
8021
- var path = value ? path + "|" + value : path,
8022
- pathArray = path.split("|"),
8165
+ var fillPath = value ? path + "|" + value : path,
8166
+ pathArray = fillPath.split("|"),
8023
8167
  text = this._getLangElement(pathArray, this.locale); // if(text === false){
8024
8168
  // console.warn("Localization Error - Matching localized text not found for given path: ", path);
8025
8169
  // }
@@ -8057,7 +8201,7 @@
8057
8201
 
8058
8202
  this.bindings[path].push(callback);
8059
8203
  callback(this.getText(path), this.lang);
8060
- } //itterate through bindings and trigger updates
8204
+ } //iterate through bindings and trigger updates
8061
8205
 
8062
8206
  }, {
8063
8207
  key: "_executeBindings",
@@ -8155,7 +8299,7 @@
8155
8299
  function ModuleBinder(tabulator, modules) {
8156
8300
  _classCallCheck(this, ModuleBinder);
8157
8301
 
8158
- this.bindStaticFuctionality(tabulator);
8302
+ this.bindStaticFunctionality(tabulator);
8159
8303
  this.bindModules(tabulator, coreModules, true);
8160
8304
 
8161
8305
  if (modules) {
@@ -8164,8 +8308,8 @@
8164
8308
  }
8165
8309
 
8166
8310
  _createClass(ModuleBinder, [{
8167
- key: "bindStaticFuctionality",
8168
- value: function bindStaticFuctionality(tabulator) {
8311
+ key: "bindStaticFunctionality",
8312
+ value: function bindStaticFunctionality(tabulator) {
8169
8313
  tabulator.moduleBindings = {};
8170
8314
 
8171
8315
  tabulator.extendModule = function (name, property, values) {
@@ -8386,6 +8530,7 @@
8386
8530
 
8387
8531
  this.modulesRegular = []; //hold regular modules bound to this table (for initialization purposes)
8388
8532
 
8533
+ this.deprecationAdvisor = new DeprecationAdvisor(this);
8389
8534
  this.optionsList = new OptionsList(this, "table constructor");
8390
8535
  this.initialized = false;
8391
8536
  this.destroyed = false;
@@ -8632,6 +8777,7 @@
8632
8777
  }
8633
8778
 
8634
8779
  element.classList.remove("tabulator");
8780
+ this.externalEvents.dispatch("tableDestroyed");
8635
8781
  }
8636
8782
  }, {
8637
8783
  key: "_detectBrowser",
@@ -8652,7 +8798,7 @@
8652
8798
  this.browserSlow = false;
8653
8799
  }
8654
8800
 
8655
- 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));
8656
8802
  }
8657
8803
  }, {
8658
8804
  key: "initGuard",
@@ -8682,14 +8828,20 @@
8682
8828
  key: "blockRedraw",
8683
8829
  value: function blockRedraw() {
8684
8830
  this.initGuard();
8685
- return this.rowManager.blockRedraw();
8831
+ this.eventBus.dispatch("redraw-blocking");
8832
+ this.rowManager.blockRedraw();
8833
+ this.columnManager.blockRedraw();
8834
+ this.eventBus.dispatch("redraw-blocked");
8686
8835
  } //restore table redrawing
8687
8836
 
8688
8837
  }, {
8689
8838
  key: "restoreRedraw",
8690
8839
  value: function restoreRedraw() {
8691
8840
  this.initGuard();
8692
- return this.rowManager.restoreRedraw();
8841
+ this.eventBus.dispatch("redraw-restoring");
8842
+ this.rowManager.restoreRedraw();
8843
+ this.columnManager.restoreRedraw();
8844
+ this.eventBus.dispatch("redraw-restored");
8693
8845
  } //load data
8694
8846
 
8695
8847
  }, {
@@ -8852,8 +9004,8 @@
8852
9004
 
8853
9005
  }, {
8854
9006
  key: "getRowFromPosition",
8855
- value: function getRowFromPosition(position, active) {
8856
- var row = this.rowManager.getRowFromPosition(position, active);
9007
+ value: function getRowFromPosition(position) {
9008
+ var row = this.rowManager.getRowFromPosition(position);
8857
9009
 
8858
9010
  if (row) {
8859
9011
  return row.getComponent();
@@ -8889,7 +9041,6 @@
8889
9041
  } else {
8890
9042
  console.error("Delete Error - No matching row found:", item);
8891
9043
  return Promise.reject("Delete Error - No matching row found");
8892
- break;
8893
9044
  }
8894
9045
  } //sort rows into correct order to ensure smooth delete from table
8895
9046
 
@@ -8922,7 +9073,7 @@
8922
9073
  return this.rowManager.addRows(data, pos, index).then(function (rows) {
8923
9074
  return rows[0].getComponent();
8924
9075
  });
8925
- } //update a row if it exitsts otherwise create it
9076
+ } //update a row if it exists otherwise create it
8926
9077
 
8927
9078
  }, {
8928
9079
  key: "updateOrAddRow",
@@ -8997,11 +9148,11 @@
8997
9148
 
8998
9149
  }, {
8999
9150
  key: "getRowPosition",
9000
- value: function getRowPosition(index, active) {
9151
+ value: function getRowPosition(index) {
9001
9152
  var row = this.rowManager.findRow(index);
9002
9153
 
9003
9154
  if (row) {
9004
- return this.rowManager.getRowPosition(row, active);
9155
+ return row.getPosition();
9005
9156
  } else {
9006
9157
  console.warn("Position Error - No matching row found:", index);
9007
9158
  return false;
@@ -9181,8 +9332,8 @@
9181
9332
  value: function dispatchEvent() {
9182
9333
  var _this$externalEvents;
9183
9334
 
9184
- var args = Array.from(arguments),
9185
- key = args.shift();
9335
+ var args = Array.from(arguments);
9336
+ args.shift();
9186
9337
 
9187
9338
  (_this$externalEvents = this.externalEvents).dispatch.apply(_this$externalEvents, arguments);
9188
9339
  } //////////////////// Alerts ///////////////////
@@ -9234,7 +9385,7 @@
9234
9385
 
9235
9386
  new ModuleBinder(Tabulator);
9236
9387
 
9237
- var defautlAccessors = {};
9388
+ var defaultAccessors = {};
9238
9389
 
9239
9390
  var Accessor = /*#__PURE__*/function (_Module) {
9240
9391
  _inherits(Accessor, _Module);
@@ -9342,7 +9493,7 @@
9342
9493
 
9343
9494
  var data = Helpers.deepClone(row.data || {});
9344
9495
  this.table.columnManager.traverse(function (column) {
9345
- var value, accessor, params, colCompnent;
9496
+ var value, accessor, params, colComponent;
9346
9497
 
9347
9498
  if (column.modules.accessor) {
9348
9499
  accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false;
@@ -9351,9 +9502,9 @@
9351
9502
  value = column.getFieldValue(data);
9352
9503
 
9353
9504
  if (value != "undefined") {
9354
- colCompnent = column.getComponent();
9355
- params = typeof accessor.params === "function" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params;
9356
- 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));
9357
9508
  }
9358
9509
  }
9359
9510
  }
@@ -9367,7 +9518,7 @@
9367
9518
 
9368
9519
 
9369
9520
  Accessor.moduleName = "accessor";
9370
- Accessor.accessors = defautlAccessors;
9521
+ Accessor.accessors = defaultAccessors;
9371
9522
 
9372
9523
  var defaultConfig = {
9373
9524
  method: "GET"
@@ -9738,7 +9889,7 @@
9738
9889
  });
9739
9890
 
9740
9891
  if (data.length && !(data.length === 1 && data[0].length < 2)) {
9741
-
9892
+ //check if headers are present by title
9742
9893
  data[0].forEach(function (value) {
9743
9894
  var column = columns.find(function (column) {
9744
9895
  return value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim();
@@ -9822,7 +9973,7 @@
9822
9973
  _this.registerTableOption("clipboardCopyConfig", false); //clipboard config
9823
9974
 
9824
9975
 
9825
- _this.registerTableOption("clipboardCopyFormatter", false); //DEPRICATED - REMOVE in 5.0
9976
+ _this.registerTableOption("clipboardCopyFormatter", false); //DEPRECATED - REMOVE in 5.0
9826
9977
 
9827
9978
 
9828
9979
  _this.registerTableOption("clipboardCopyRowRange", "active"); //restrict clipboard to visible rows only
@@ -9863,9 +10014,8 @@
9863
10014
  plain = _this2.table.options.clipboardCopyFormatter("plain", plain);
9864
10015
  }
9865
10016
  } else {
9866
- var list = _this2.table.modules["export"].generateExportList(_this2.table.options.clipboardCopyConfig, _this2.table.options.clipboardCopyStyled, _this2.rowRange, "clipboard");
9867
-
9868
- 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);
9869
10019
  plain = html ? _this2.generatePlainContent(list) : "";
9870
10020
 
9871
10021
  if (_this2.table.options.clipboardCopyFormatter) {
@@ -9954,7 +10104,7 @@
9954
10104
  }, {
9955
10105
  key: "copy",
9956
10106
  value: function copy(range, internal) {
9957
- var range, sel, textRange;
10107
+ var sel, textRange;
9958
10108
  this.blocked = false;
9959
10109
  this.customSelection = false;
9960
10110
 
@@ -10490,23 +10640,27 @@
10490
10640
  key: "scrollHorizontal",
10491
10641
  value: function scrollHorizontal(left) {
10492
10642
  if (this.botInitialized && this.botRow) {
10493
- 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
+ }
10494
10648
  }
10495
10649
  }
10496
10650
  }, {
10497
10651
  key: "recalc",
10498
10652
  value: function recalc(rows) {
10499
- var row;
10653
+ var data, row;
10500
10654
 
10501
10655
  if (this.topInitialized || this.botInitialized) {
10502
- this.rowsToData(rows);
10656
+ data = this.rowsToData(rows);
10503
10657
 
10504
10658
  if (this.topInitialized) {
10505
10659
  if (this.topRow) {
10506
10660
  this.topRow.deleteCells();
10507
10661
  }
10508
10662
 
10509
- row = this.generateRow("top", this.rowsToData(rows));
10663
+ row = this.generateRow("top", data);
10510
10664
  this.topRow = row;
10511
10665
 
10512
10666
  while (this.topElement.firstChild) {
@@ -10522,7 +10676,7 @@
10522
10676
  this.botRow.deleteCells();
10523
10677
  }
10524
10678
 
10525
- row = this.generateRow("bottom", this.rowsToData(rows));
10679
+ row = this.generateRow("bottom", data);
10526
10680
  this.botRow = row;
10527
10681
 
10528
10682
  while (this.botElement.firstChild) {
@@ -10666,7 +10820,7 @@
10666
10820
  formatter: _this4.table.modules.format.getFormatter("plaintext"),
10667
10821
  params: {}
10668
10822
  };
10669
- } //ensure css class defintion is replicated to calculation cell
10823
+ } //ensure css class definition is replicated to calculation cell
10670
10824
 
10671
10825
 
10672
10826
  _this4.genColumn.definition.cssClass = column.definition.cssClass; //generate cell and assign to correct column
@@ -10839,7 +10993,7 @@
10839
10993
  _this.registerTableOption("dataTreeChildColumnCalcs", false); //include visible data tree rows in column calculations
10840
10994
 
10841
10995
 
10842
- _this.registerTableOption("dataTreeSelectPropagate", false); //seleccting a parent row selects its children
10996
+ _this.registerTableOption("dataTreeSelectPropagate", false); //selecting a parent row selects its children
10843
10997
  //register component functions
10844
10998
 
10845
10999
 
@@ -11086,8 +11240,8 @@
11086
11240
  var _this4 = this;
11087
11241
 
11088
11242
  var config = row.modules.dataTree,
11089
- el = el || row.getCells()[0].getElement(),
11090
11243
  oldControl = config.controlEl;
11244
+ el = el || row.getCells()[0].getElement();
11091
11245
 
11092
11246
  if (config.children !== false) {
11093
11247
  if (config.open) {
@@ -11375,8 +11529,10 @@
11375
11529
  match = match.data;
11376
11530
  }
11377
11531
  }
11532
+ } else if (subject === null) {
11533
+ match = false;
11378
11534
  }
11379
- } else if (typeof subject == "undefined" || subject === null) {
11535
+ } else if (typeof subject == "undefined") {
11380
11536
  match = false;
11381
11537
  } else {
11382
11538
  //subject should be treated as the index of the row
@@ -11441,8 +11597,10 @@
11441
11597
 
11442
11598
  DataTree.moduleName = "dataTree";
11443
11599
 
11444
- function csv (list, options, setFileContents) {
11445
- 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 : ",",
11446
11604
  fileContents = [],
11447
11605
  headers = [];
11448
11606
  list.forEach(function (row) {
@@ -11530,7 +11688,9 @@
11530
11688
  setFileContents(fileContents, "application/json");
11531
11689
  }
11532
11690
 
11533
- 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;
11534
11694
  var header = [],
11535
11695
  body = [],
11536
11696
  autoTableParams = {},
@@ -11547,7 +11707,7 @@
11547
11707
  fillColor: 232
11548
11708
  },
11549
11709
  jsPDFParams = options.jsPDF || {},
11550
- title = options && options.title ? options.title : "";
11710
+ title = options.title ? options.title : "";
11551
11711
 
11552
11712
  if (!jsPDFParams.orientation) {
11553
11713
  jsPDFParams.orientation = options.orientation || "landscape";
@@ -11559,7 +11719,6 @@
11559
11719
 
11560
11720
 
11561
11721
  list.forEach(function (row) {
11562
-
11563
11722
  switch (row.type) {
11564
11723
  case "header":
11565
11724
  header.push(parseRow(row));
@@ -11614,7 +11773,7 @@
11614
11773
 
11615
11774
  var doc = new jspdf.jsPDF(jsPDFParams); //set document to landscape, better for most tables
11616
11775
 
11617
- if (options && options.autoTable) {
11776
+ if (options.autoTable) {
11618
11777
  if (typeof options.autoTable === "function") {
11619
11778
  autoTableParams = options.autoTable(doc) || {};
11620
11779
  } else {
@@ -11632,7 +11791,7 @@
11632
11791
  autoTableParams.body = body;
11633
11792
  doc.autoTable(autoTableParams);
11634
11793
 
11635
- if (options && options.documentProcessing) {
11794
+ if (options.documentProcessing) {
11636
11795
  options.documentProcessing(doc);
11637
11796
  }
11638
11797
 
@@ -11757,7 +11916,7 @@
11757
11916
 
11758
11917
  function html (list, options, setFileContents) {
11759
11918
  if (this.modExists("export", true)) {
11760
- setFileContents(this.modules["export"].genereateHTMLTable(list), "text/html");
11919
+ setFileContents(this.modules["export"].generateHTMLTable(list), "text/html");
11761
11920
  }
11762
11921
  }
11763
11922
 
@@ -11812,11 +11971,16 @@
11812
11971
 
11813
11972
  _this = _super.call(this, table);
11814
11973
 
11815
- _this.registerTableOption("downloadReady", function (data, blob) {
11816
- return blob;
11974
+ _this.registerTableOption("downloadEncoder", function (data, mimeType) {
11975
+ return new Blob([data], {
11976
+ type: mimeType
11977
+ });
11817
11978
  }); //function to manipulate download data
11818
11979
 
11819
11980
 
11981
+ _this.registerTableOption("downloadReady", undefined); //warn of function deprecation
11982
+
11983
+
11820
11984
  _this.registerTableOption("downloadConfig", {}); //download config
11821
11985
 
11822
11986
 
@@ -11833,8 +11997,14 @@
11833
11997
  _createClass(Download, [{
11834
11998
  key: "initialize",
11835
11999
  value: function initialize() {
12000
+ this.deprecatedOptionsCheck();
11836
12001
  this.registerTableFunction("download", this.download.bind(this));
11837
12002
  this.registerTableFunction("downloadToTab", this.downloadToTab.bind(this));
12003
+ }
12004
+ }, {
12005
+ key: "deprecatedOptionsCheck",
12006
+ value: function deprecatedOptionsCheck() {
12007
+ this.deprecationCheck("downloadReady", "downloadEncoder");
11838
12008
  } ///////////////////////////////////
11839
12009
  ///////// Table Functions /////////
11840
12010
  ///////////////////////////////////
@@ -11908,16 +12078,14 @@
11908
12078
  key: "triggerDownload",
11909
12079
  value: function triggerDownload(data, mime, type, filename, newTab) {
11910
12080
  var element = document.createElement('a'),
11911
- blob = new Blob([data], {
11912
- type: mime
11913
- }),
11914
- filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type);
11915
- blob = this.table.options.downloadReady(data, blob);
12081
+ blob = this.table.options.downloadEncoder(data, mime);
11916
12082
 
11917
12083
  if (blob) {
11918
12084
  if (newTab) {
11919
12085
  window.open(window.URL.createObjectURL(blob));
11920
12086
  } else {
12087
+ filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type);
12088
+
11921
12089
  if (navigator.msSaveOrOpenBlob) {
11922
12090
  navigator.msSaveOrOpenBlob(blob, filename);
11923
12091
  } else {
@@ -12106,7 +12274,6 @@
12106
12274
  var cellValue = cell.getValue(),
12107
12275
  vertNav = editorParams.verticalNavigation || "hybrid",
12108
12276
  value = String(cellValue !== null && typeof cellValue !== "undefined" ? cellValue : ""),
12109
- count = (value.match(/(?:\r\n|\r|\n)/g) || []).length + 1,
12110
12277
  input = document.createElement("textarea"),
12111
12278
  scrollHeight = 0; //create and style input
12112
12279
 
@@ -12173,6 +12340,13 @@
12173
12340
  });
12174
12341
  input.addEventListener("keydown", function (e) {
12175
12342
  switch (e.keyCode) {
12343
+ case 13:
12344
+ if (e.shiftKey && editorParams.shiftEnterSubmit) {
12345
+ onChange();
12346
+ }
12347
+
12348
+ break;
12349
+
12176
12350
  case 27:
12177
12351
  cancel();
12178
12352
  break;
@@ -12395,6 +12569,302 @@
12395
12569
  return input;
12396
12570
  }
12397
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
+
12398
12868
  var Edit = /*#__PURE__*/function () {
12399
12869
  function Edit(editor, cell, onRendered, success, cancel, editorParams) {
12400
12870
  _classCallCheck(this, Edit);
@@ -12424,7 +12894,7 @@
12424
12894
  cancel: cancel
12425
12895
  };
12426
12896
 
12427
- this._deprecationCheck();
12897
+ this._deprecatedOptionsCheck();
12428
12898
 
12429
12899
  this._initializeValue();
12430
12900
 
@@ -12432,22 +12902,22 @@
12432
12902
  }
12433
12903
 
12434
12904
  _createClass(Edit, [{
12435
- key: "_deprecationCheck",
12436
- value: function _deprecationCheck() {
12905
+ key: "_deprecatedOptionsCheck",
12906
+ value: function _deprecatedOptionsCheck() {
12437
12907
  if (this.params.listItemFormatter) {
12438
- 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");
12439
12909
  }
12440
12910
 
12441
12911
  if (this.params.sortValuesList) {
12442
- 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");
12443
12913
  }
12444
12914
 
12445
12915
  if (this.params.searchFunc) {
12446
- 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");
12447
12917
  }
12448
12918
 
12449
12919
  if (this.params.searchingPlaceholder) {
12450
- 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");
12451
12921
  }
12452
12922
  }
12453
12923
  }, {
@@ -12483,6 +12953,7 @@
12483
12953
  setTimeout(function () {
12484
12954
  cellEl.removeEventListener("click", clickStop);
12485
12955
  }, 1000);
12956
+ this.input.addEventListener("mousedown", this._preventPopupBlur.bind(this));
12486
12957
  }
12487
12958
  }, {
12488
12959
  key: "_createListElement",
@@ -12601,7 +13072,7 @@
12601
13072
  }
12602
13073
  }
12603
13074
 
12604
- if (params.filterRemote && !(typeof params.valuesLookup === "function" || _typeof(params.valuesURL))) {
13075
+ if (params.filterRemote && !(typeof params.valuesLookup === "function" || params.valuesURL)) {
12605
13076
  params.filterRemote = false;
12606
13077
  console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source");
12607
13078
  }
@@ -12651,8 +13122,12 @@
12651
13122
  }, {
12652
13123
  key: "_inputBlur",
12653
13124
  value: function _inputBlur(e) {
12654
- if (this.blurable && this.popup) {
12655
- this.popup.hide();
13125
+ if (this.blurable) {
13126
+ if (this.popup) {
13127
+ this.popup.hide();
13128
+ } else {
13129
+ this._resolveValue(true);
13130
+ }
12656
13131
  }
12657
13132
  }
12658
13133
  }, {
@@ -12736,12 +13211,29 @@
12736
13211
 
12737
13212
  }
12738
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
+ }
12739
13229
  }, {
12740
13230
  key: "_preventBlur",
12741
13231
  value: function _preventBlur() {
13232
+ var _this3 = this;
13233
+
12742
13234
  this.blurable = false;
12743
13235
  setTimeout(function () {
12744
- this.blurable = true;
13236
+ _this3.blurable = true;
12745
13237
  }, 10);
12746
13238
  } //////////////////////////////////////
12747
13239
  //////// Keyboard Navigation /////////
@@ -12835,13 +13327,13 @@
12835
13327
  }, {
12836
13328
  key: "_scrollToValue",
12837
13329
  value: function _scrollToValue(_char) {
12838
- var _this2 = this;
13330
+ var _this4 = this;
12839
13331
 
12840
13332
  clearTimeout(this.filterTimeout);
12841
13333
  var character = String.fromCharCode(_char).toLowerCase();
12842
13334
  this.filterTerm += character.toLowerCase();
12843
13335
  var match = this.displayItems.find(function (item) {
12844
- return typeof item.label !== "undefined" && item.label.toLowerCase().startsWith(_this2.filterTerm);
13336
+ return typeof item.label !== "undefined" && item.label.toLowerCase().startsWith(_this4.filterTerm);
12845
13337
  });
12846
13338
 
12847
13339
  if (match) {
@@ -12849,7 +13341,7 @@
12849
13341
  }
12850
13342
 
12851
13343
  this.filterTimeout = setTimeout(function () {
12852
- _this2.filterTerm = "";
13344
+ _this4.filterTerm = "";
12853
13345
  }, 800);
12854
13346
  }
12855
13347
  }, {
@@ -12899,10 +13391,10 @@
12899
13391
  }, {
12900
13392
  key: "_generateOptions",
12901
13393
  value: function _generateOptions(silent) {
12902
- var _this3 = this;
13394
+ var _this5 = this;
12903
13395
 
12904
13396
  var values = [];
12905
- var itteration = ++this.listIteration;
13397
+ var iteration = ++this.listIteration;
12906
13398
  this.filtered = false;
12907
13399
 
12908
13400
  if (this.params.values) {
@@ -12923,10 +13415,10 @@
12923
13415
  }
12924
13416
 
12925
13417
  return values.then().then(function (responseValues) {
12926
- if (_this3.listIteration === itteration) {
12927
- return _this3._parseList(responseValues);
13418
+ if (_this5.listIteration === iteration) {
13419
+ return _this5._parseList(responseValues);
12928
13420
  } else {
12929
- return Promise.reject(itteration);
13421
+ return Promise.reject(iteration);
12930
13422
  }
12931
13423
  });
12932
13424
  } else {
@@ -12939,7 +13431,7 @@
12939
13431
  var placeholder = document.createElement("div");
12940
13432
 
12941
13433
  if (typeof contents === "function") {
12942
- contents = contents(cell.getComponent(), this.listEl);
13434
+ contents = contents(this.cell.getComponent(), this.listEl);
12943
13435
  }
12944
13436
 
12945
13437
  if (contents) {
@@ -13010,7 +13502,7 @@
13010
13502
  }, {
13011
13503
  key: "_parseList",
13012
13504
  value: function _parseList(inputValues) {
13013
- var _this4 = this;
13505
+ var _this6 = this;
13014
13506
 
13015
13507
  var data = [];
13016
13508
 
@@ -13035,7 +13527,7 @@
13035
13527
  };
13036
13528
  }
13037
13529
 
13038
- _this4._parseListItem(value, data, 0);
13530
+ _this6._parseListItem(value, data, 0);
13039
13531
  });
13040
13532
 
13041
13533
  if (!this.currentItems.length && this.params.freetext) {
@@ -13077,7 +13569,7 @@
13077
13569
  }, {
13078
13570
  key: "_parseListGroup",
13079
13571
  value: function _parseListGroup(option, level) {
13080
- var _this5 = this;
13572
+ var _this7 = this;
13081
13573
 
13082
13574
  var item = {
13083
13575
  label: option.label,
@@ -13091,7 +13583,7 @@
13091
13583
  original: option
13092
13584
  };
13093
13585
  option.options.forEach(function (child) {
13094
- _this5._parseListItem(child, item.options, level);
13586
+ _this7._parseListItem(child, item.options, level);
13095
13587
  });
13096
13588
  return item;
13097
13589
  }
@@ -13111,14 +13603,14 @@
13111
13603
  }, {
13112
13604
  key: "_sortGroup",
13113
13605
  value: function _sortGroup(sorter, options) {
13114
- var _this6 = this;
13606
+ var _this8 = this;
13115
13607
 
13116
13608
  options.sort(function (a, b) {
13117
13609
  return sorter(a.label, b.label, a.value, b.value, a.original, b.original);
13118
13610
  });
13119
13611
  options.forEach(function (option) {
13120
13612
  if (option.group) {
13121
- _this6._sortGroup(sorter, option.options);
13613
+ _this8._sortGroup(sorter, option.options);
13122
13614
  }
13123
13615
  });
13124
13616
  }
@@ -13177,15 +13669,15 @@
13177
13669
  }, {
13178
13670
  key: "_filterOptions",
13179
13671
  value: function _filterOptions() {
13180
- var _this7 = this;
13672
+ var _this9 = this;
13181
13673
 
13182
- var filterFunc = this.params.filterFunc || this._defaultFilterFunc;
13183
- var term = this.input.value;
13674
+ var filterFunc = this.params.filterFunc || this._defaultFilterFunc,
13675
+ term = this.input.value;
13184
13676
 
13185
13677
  if (term) {
13186
13678
  this.filtered = true;
13187
13679
  this.data.forEach(function (item) {
13188
- _this7._filterItem(filterFunc, term, item);
13680
+ _this9._filterItem(filterFunc, term, item);
13189
13681
  });
13190
13682
  } else {
13191
13683
  this.filtered = false;
@@ -13196,7 +13688,7 @@
13196
13688
  }, {
13197
13689
  key: "_filterItem",
13198
13690
  value: function _filterItem(func, term, item) {
13199
- var _this8 = this;
13691
+ var _this10 = this;
13200
13692
 
13201
13693
  var matches = false;
13202
13694
 
@@ -13204,7 +13696,7 @@
13204
13696
  item.visible = func(term, item.label, item.value, item.original);
13205
13697
  } else {
13206
13698
  item.options.forEach(function (option) {
13207
- if (_this8._filterItem(func, term, option)) {
13699
+ if (_this10._filterItem(func, term, option)) {
13208
13700
  matches = true;
13209
13701
  }
13210
13702
  });
@@ -13216,10 +13708,10 @@
13216
13708
  }, {
13217
13709
  key: "_defaultFilterFunc",
13218
13710
  value: function _defaultFilterFunc(term, label, value, item) {
13219
- var term = String(term).toLowerCase();
13711
+ term = String(term).toLowerCase();
13220
13712
 
13221
- if (label !== null || typeof label !== "undefined") {
13222
- 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) {
13223
13715
  return true;
13224
13716
  }
13225
13717
  }
@@ -13241,12 +13733,12 @@
13241
13733
  }, {
13242
13734
  key: "_buildList",
13243
13735
  value: function _buildList(data) {
13244
- var _this9 = this;
13736
+ var _this11 = this;
13245
13737
 
13246
13738
  this._clearList();
13247
13739
 
13248
13740
  data.forEach(function (option) {
13249
- _this9._buildItem(option);
13741
+ _this11._buildItem(option);
13250
13742
  });
13251
13743
 
13252
13744
  if (!this.displayItems.length) {
@@ -13256,7 +13748,7 @@
13256
13748
  }, {
13257
13749
  key: "_buildItem",
13258
13750
  value: function _buildItem(item) {
13259
- var _this10 = this;
13751
+ var _this12 = this;
13260
13752
 
13261
13753
  var el = item.element,
13262
13754
  contents;
@@ -13308,7 +13800,7 @@
13308
13800
 
13309
13801
  if (item.group) {
13310
13802
  item.options.forEach(function (option) {
13311
- _this10._buildItem(option);
13803
+ _this12._buildItem(option);
13312
13804
  });
13313
13805
  } else {
13314
13806
  this.displayItems.push(item);
@@ -13318,14 +13810,17 @@
13318
13810
  }, {
13319
13811
  key: "_showList",
13320
13812
  value: function _showList() {
13813
+ var _this13 = this;
13814
+
13321
13815
  var startVis = this.popup && this.popup.isVisible();
13322
13816
 
13323
13817
  if (this.input.parentNode) {
13324
13818
  if (this.params.autocomplete && this.input.value === "" && !this.params.listOnEmpty) {
13325
13819
  if (this.popup) {
13326
13820
  this.popup.hide(true);
13327
- return;
13328
13821
  }
13822
+
13823
+ return;
13329
13824
  }
13330
13825
 
13331
13826
  this._setListWidth();
@@ -13337,7 +13832,9 @@
13337
13832
  this.popup.show(this.cell.getElement(), "bottom");
13338
13833
 
13339
13834
  if (!startVis) {
13340
- this.popup.hideOnBlur(this._resolveValue.bind(this, true));
13835
+ setTimeout(function () {
13836
+ _this13.popup.hideOnBlur(_this13._resolveValue.bind(_this13, true));
13837
+ });
13341
13838
  }
13342
13839
  }
13343
13840
  }
@@ -13379,13 +13876,13 @@
13379
13876
  }, {
13380
13877
  key: "_clearChoices",
13381
13878
  value: function _clearChoices() {
13382
- var _this11 = this;
13879
+ var _this14 = this;
13383
13880
 
13384
13881
  this.typing = true;
13385
13882
  this.currentItems.forEach(function (item) {
13386
13883
  item.selected = false;
13387
13884
 
13388
- _this11._styleItem(item);
13885
+ _this14._styleItem(item);
13389
13886
  });
13390
13887
  this.currentItems = [];
13391
13888
  this.focusedItem = null;
@@ -13415,7 +13912,6 @@
13415
13912
  } else {
13416
13913
  this.currentItems = [item];
13417
13914
  item.selected = true;
13418
- console.log("choose");
13419
13915
  this.input.value = item.label;
13420
13916
 
13421
13917
  this._styleItem(item);
@@ -13431,7 +13927,10 @@
13431
13927
  key: "_resolveValue",
13432
13928
  value: function _resolveValue(blur) {
13433
13929
  var output, initialValue;
13434
- this.popup.hide(true);
13930
+
13931
+ if (this.popup) {
13932
+ this.popup.hide(true);
13933
+ }
13435
13934
 
13436
13935
  if (this.params.multiselect) {
13437
13936
  output = this.currentItems.map(function (item) {
@@ -13467,7 +13966,8 @@
13467
13966
  this.actions.success(output);
13468
13967
 
13469
13968
  if (this.isFilter) {
13470
- this.initialValues = output && !Array.isArray[output] ? [output] : output;
13969
+ this.initialValues = output && !Array.isArray(output) ? [output] : output;
13970
+ this.currentItems = [];
13471
13971
  }
13472
13972
  }
13473
13973
  }]);
@@ -13476,7 +13976,7 @@
13476
13976
  }();
13477
13977
 
13478
13978
  function select (cell, onRendered, success, cancel, editorParams) {
13479
- 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");
13480
13980
  var list = new Edit(this, cell, onRendered, success, cancel, editorParams);
13481
13981
  return list.input;
13482
13982
  }
@@ -13487,7 +13987,7 @@
13487
13987
  }
13488
13988
 
13489
13989
  function autocomplete (cell, onRendered, success, cancel, editorParams) {
13490
- 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");
13491
13991
  editorParams.autocomplete = true;
13492
13992
  var list = new Edit(this, cell, onRendered, success, cancel, editorParams);
13493
13993
  return list.input;
@@ -13796,8 +14296,6 @@
13796
14296
  checkedValue = editorParams.trueValue;
13797
14297
  } else if (falseValueSet && !checkedValue) {
13798
14298
  checkedValue = editorParams.falseValue;
13799
- } else {
13800
- checkedValue = checkedValue;
13801
14299
  }
13802
14300
 
13803
14301
  if (tristate) {
@@ -13848,6 +14346,9 @@
13848
14346
  textarea: textarea,
13849
14347
  number: number,
13850
14348
  range: range,
14349
+ date: date,
14350
+ time: time,
14351
+ datetime: datetime,
13851
14352
  select: select,
13852
14353
  list: list,
13853
14354
  autocomplete: autocomplete,
@@ -13869,7 +14370,7 @@
13869
14370
  _this = _super.call(this, table);
13870
14371
  _this.currentCell = false; //hold currently editing cell
13871
14372
 
13872
- _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
13873
14374
 
13874
14375
  _this.recursionBlock = false; //prevent focus recursion
13875
14376
 
@@ -13905,7 +14406,7 @@
13905
14406
 
13906
14407
  _this.registerTableFunction("navigateDown", _this.navigateDown.bind(_assertThisInitialized(_this)));
13907
14408
 
13908
- _this.registerComponentFunction("cell", "isEdited", _this.cellisEdited.bind(_assertThisInitialized(_this)));
14409
+ _this.registerComponentFunction("cell", "isEdited", _this.cellIsEdited.bind(_assertThisInitialized(_this)));
13909
14410
 
13910
14411
  _this.registerComponentFunction("cell", "clearEdited", _this.clearEdited.bind(_assertThisInitialized(_this)));
13911
14412
 
@@ -13933,6 +14434,7 @@
13933
14434
  value: function initialize() {
13934
14435
  this.subscribe("cell-init", this.bindEditor.bind(this));
13935
14436
  this.subscribe("cell-delete", this.clearEdited.bind(this));
14437
+ this.subscribe("cell-value-changed", this.updateCellClass.bind(this));
13936
14438
  this.subscribe("column-layout", this.initializeColumnCheck.bind(this));
13937
14439
  this.subscribe("column-delete", this.columnDeleteCheck.bind(this));
13938
14440
  this.subscribe("row-deleting", this.rowDeleteCheck.bind(this));
@@ -13981,8 +14483,8 @@
13981
14483
  ///////////////////////////////////
13982
14484
 
13983
14485
  }, {
13984
- key: "cellisEdited",
13985
- value: function cellisEdited(cell) {
14486
+ key: "cellIsEdited",
14487
+ value: function cellIsEdited(cell) {
13986
14488
  return !!cell.modules.edit && cell.modules.edit.edited;
13987
14489
  }
13988
14490
  }, {
@@ -13997,6 +14499,15 @@
13997
14499
  ///////// Table Functions /////////
13998
14500
  ///////////////////////////////////
13999
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
+ }
14000
14511
  }, {
14001
14512
  key: "clearCellEdited",
14002
14513
  value: function clearCellEdited(cells) {
@@ -14180,11 +14691,7 @@
14180
14691
  var cell = row.cells[i];
14181
14692
 
14182
14693
  if (cell.column.modules.edit && Helpers.elVisible(cell.getElement())) {
14183
- var allowEdit = true;
14184
-
14185
- if (typeof cell.column.modules.edit.check == "function") {
14186
- allowEdit = cell.column.modules.edit.check(cell.getComponent());
14187
- }
14694
+ var allowEdit = this.allowEdit(cell);
14188
14695
 
14189
14696
  if (allowEdit) {
14190
14697
  nextCell = cell;
@@ -14203,13 +14710,10 @@
14203
14710
 
14204
14711
  if (index > 0) {
14205
14712
  for (var i = index - 1; i >= 0; i--) {
14206
- var cell = row.cells[i],
14207
- allowEdit = true;
14713
+ var cell = row.cells[i];
14208
14714
 
14209
14715
  if (cell.column.modules.edit && Helpers.elVisible(cell.getElement())) {
14210
- if (typeof cell.column.modules.edit.check == "function") {
14211
- allowEdit = cell.column.modules.edit.check(cell.getComponent());
14212
- }
14716
+ var allowEdit = this.allowEdit(cell);
14213
14717
 
14214
14718
  if (allowEdit) {
14215
14719
  prevCell = cell;
@@ -14312,7 +14816,8 @@
14312
14816
  cellEl.removeChild(cellEl.firstChild);
14313
14817
  }
14314
14818
 
14315
- cell.row.getElement().classList.remove("tabulator-row-editing");
14819
+ cell.row.getElement().classList.remove("tabulator-editing");
14820
+ cell.table.element.classList.remove("tabulator-editing");
14316
14821
  }
14317
14822
  }
14318
14823
  }, {
@@ -14344,6 +14849,7 @@
14344
14849
  if (cell.column.modules.edit) {
14345
14850
  var self = this,
14346
14851
  element = cell.getElement(true);
14852
+ this.updateCellClass(cell);
14347
14853
  element.setAttribute("tabindex", 0);
14348
14854
  element.addEventListener("click", function (e) {
14349
14855
  if (!element.classList.contains("tabulator-editing")) {
@@ -14391,8 +14897,7 @@
14391
14897
  if (this.table.rowManager.getRenderMode() == "virtual") {
14392
14898
  var topEdge = this.table.rowManager.element.scrollTop,
14393
14899
  bottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop,
14394
- rowEl = cell.row.getElement(),
14395
- offset = rowEl.offsetTop;
14900
+ rowEl = cell.row.getElement();
14396
14901
 
14397
14902
  if (rowEl.offsetTop < topEdge) {
14398
14903
  this.table.rowManager.element.scrollTop -= topEdge - rowEl.offsetTop;
@@ -14404,8 +14909,7 @@
14404
14909
 
14405
14910
  var leftEdge = this.table.rowManager.element.scrollLeft,
14406
14911
  rightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft,
14407
- cellEl = cell.getElement(),
14408
- offset = cellEl.offsetLeft;
14912
+ cellEl = cell.getElement();
14409
14913
 
14410
14914
  if (this.table.modExists("frozenColumns")) {
14411
14915
  leftEdge += parseInt(this.table.modules.frozenColumns.leftMargin);
@@ -14426,6 +14930,29 @@
14426
14930
  }
14427
14931
  }
14428
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
+ }
14429
14956
  }, {
14430
14957
  key: "edit",
14431
14958
  value: function edit(cell, e, forceEdit) {
@@ -14491,15 +15018,7 @@
14491
15018
  e.stopPropagation();
14492
15019
  }
14493
15020
 
14494
- switch (_typeof(cell.column.modules.edit.check)) {
14495
- case "function":
14496
- allowEdit = cell.column.modules.edit.check(cell.getComponent());
14497
- break;
14498
-
14499
- case "boolean":
14500
- allowEdit = cell.column.modules.edit.check;
14501
- break;
14502
- }
15021
+ allowEdit = this.allowEdit(cell);
14503
15022
 
14504
15023
  if (allowEdit || forceEdit) {
14505
15024
  self.cancelEdit();
@@ -14527,7 +15046,8 @@
14527
15046
  if (cellEditor !== false) {
14528
15047
  if (cellEditor instanceof Node) {
14529
15048
  element.classList.add("tabulator-editing");
14530
- cell.row.getElement().classList.add("tabulator-row-editing");
15049
+ cell.row.getElement().classList.add("tabulator-editing");
15050
+ cell.table.element.classList.add("tabulator-editing");
14531
15051
 
14532
15052
  while (element.firstChild) {
14533
15053
  element.removeChild(element.firstChild);
@@ -14634,7 +15154,7 @@
14634
15154
  _this.cloneTableStyle = true;
14635
15155
  _this.colVisProp = "";
14636
15156
 
14637
- _this.registerTableOption("htmlOutputConfig", false); //html outypu config
15157
+ _this.registerTableOption("htmlOutputConfig", false); //html output config
14638
15158
 
14639
15159
 
14640
15160
  _this.registerColumnOption("htmlOutput");
@@ -14666,10 +15186,10 @@
14666
15186
  return headers.concat(body);
14667
15187
  }
14668
15188
  }, {
14669
- key: "genereateTable",
14670
- value: function genereateTable(config, style, range, colVisProp) {
15189
+ key: "generateTable",
15190
+ value: function generateTable(config, style, range, colVisProp) {
14671
15191
  var list = this.generateExportList(config, style, range, colVisProp);
14672
- return this.genereateTableElement(list);
15192
+ return this.generateTableElement(list);
14673
15193
  }
14674
15194
  }, {
14675
15195
  key: "rowLookup",
@@ -14777,7 +15297,13 @@
14777
15297
  }, {
14778
15298
  key: "columnVisCheck",
14779
15299
  value: function columnVisCheck(column) {
14780
- 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);
14781
15307
  }
14782
15308
  }, {
14783
15309
  key: "headersToExportRows",
@@ -14797,17 +15323,17 @@
14797
15323
  headers[level].push(column);
14798
15324
 
14799
15325
  if (column.height > 1) {
14800
- for (var _i = 1; _i < column.height; _i++) {
14801
- if (typeof headers[level + _i] === "undefined") {
14802
- headers[level + _i] = [];
15326
+ for (var i = 1; i < column.height; i++) {
15327
+ if (typeof headers[level + i] === "undefined") {
15328
+ headers[level + i] = [];
14803
15329
  }
14804
15330
 
14805
- headers[level + _i].push(false);
15331
+ headers[level + i].push(false);
14806
15332
  }
14807
15333
  }
14808
15334
 
14809
15335
  if (column.width > 1) {
14810
- for (var _i2 = 1; _i2 < column.width; _i2++) {
15336
+ for (var _i = 1; _i < column.width; _i++) {
14811
15337
  headers[level].push(false);
14812
15338
  }
14813
15339
  }
@@ -14817,7 +15343,7 @@
14817
15343
  parseColumnGroup(subGroup, level + 1);
14818
15344
  });
14819
15345
  }
14820
- } //calculate maximum header debth
15346
+ } //calculate maximum header depth
14821
15347
 
14822
15348
 
14823
15349
  columns.forEach(function (column) {
@@ -14908,8 +15434,8 @@
14908
15434
  return exportRows;
14909
15435
  }
14910
15436
  }, {
14911
- key: "genereateTableElement",
14912
- value: function genereateTableElement(list) {
15437
+ key: "generateTableElement",
15438
+ value: function generateTableElement(list) {
14913
15439
  var _this6 = this;
14914
15440
 
14915
15441
  var table = document.createElement("table"),
@@ -14939,21 +15465,23 @@
14939
15465
  }
14940
15466
 
14941
15467
  list.forEach(function (row, i) {
15468
+ var rowEl;
15469
+
14942
15470
  switch (row.type) {
14943
15471
  case "header":
14944
- headerEl.appendChild(_this6.genereateHeaderElement(row, setup, styles));
15472
+ headerEl.appendChild(_this6.generateHeaderElement(row, setup, styles));
14945
15473
  break;
14946
15474
 
14947
15475
  case "group":
14948
- bodyEl.appendChild(_this6.genereateGroupElement(row, setup, styles));
15476
+ bodyEl.appendChild(_this6.generateGroupElement(row, setup, styles));
14949
15477
  break;
14950
15478
 
14951
15479
  case "calc":
14952
- bodyEl.appendChild(_this6.genereateCalcElement(row, setup, styles));
15480
+ bodyEl.appendChild(_this6.generateCalcElement(row, setup, styles));
14953
15481
  break;
14954
15482
 
14955
15483
  case "row":
14956
- var rowEl = _this6.genereateRowElement(row, setup, styles);
15484
+ rowEl = _this6.generateRowElement(row, setup, styles);
14957
15485
 
14958
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"]);
14959
15487
 
@@ -14992,8 +15520,8 @@
14992
15520
  return styles;
14993
15521
  }
14994
15522
  }, {
14995
- key: "genereateHeaderElement",
14996
- value: function genereateHeaderElement(row, setup, styles) {
15523
+ key: "generateHeaderElement",
15524
+ value: function generateHeaderElement(row, setup, styles) {
14997
15525
  var _this7 = this;
14998
15526
 
14999
15527
  var rowEl = document.createElement("tr");
@@ -15035,8 +15563,8 @@
15035
15563
  return rowEl;
15036
15564
  }
15037
15565
  }, {
15038
- key: "genereateGroupElement",
15039
- value: function genereateGroupElement(row, setup, styles) {
15566
+ key: "generateGroupElement",
15567
+ value: function generateGroupElement(row, setup, styles) {
15040
15568
  var rowEl = document.createElement("tr"),
15041
15569
  cellEl = document.createElement("td"),
15042
15570
  group = row.columns[0];
@@ -15045,9 +15573,7 @@
15045
15573
  if (setup.groupHeader && setup.groupHeader[row.indent]) {
15046
15574
  group.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);
15047
15575
  } else {
15048
- if (setup.groupHeader === false) {
15049
- group.value = group.value;
15050
- } else {
15576
+ if (setup.groupHeader !== false) {
15051
15577
  group.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component);
15052
15578
  }
15053
15579
  }
@@ -15067,26 +15593,27 @@
15067
15593
  return rowEl;
15068
15594
  }
15069
15595
  }, {
15070
- key: "genereateCalcElement",
15071
- value: function genereateCalcElement(row, setup, styles) {
15072
- 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);
15073
15599
  rowEl.classList.add("tabulator-print-table-calcs");
15074
15600
  this.mapElementStyles(styles.calcRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]);
15075
15601
  return rowEl;
15076
15602
  }
15077
15603
  }, {
15078
- key: "genereateRowElement",
15079
- value: function genereateRowElement(row, setup, styles) {
15604
+ key: "generateRowElement",
15605
+ value: function generateRowElement(row, setup, styles) {
15080
15606
  var _this8 = this;
15081
15607
 
15082
15608
  var rowEl = document.createElement("tr");
15083
15609
  rowEl.classList.add("tabulator-print-table-row");
15084
- row.columns.forEach(function (col) {
15610
+ row.columns.forEach(function (col, i) {
15085
15611
  if (col) {
15086
15612
  var cellEl = document.createElement("td"),
15087
15613
  column = col.component._column,
15088
15614
  index = _this8.table.columnManager.findColumnIndex(column),
15089
- value = col.value;
15615
+ value = col.value,
15616
+ cellStyle;
15090
15617
 
15091
15618
  var cellWrapper = {
15092
15619
  modules: {},
@@ -15129,9 +15656,6 @@
15129
15656
  case "undefined":
15130
15657
  value = "";
15131
15658
  break;
15132
-
15133
- default:
15134
- value = value;
15135
15659
  }
15136
15660
  }
15137
15661
 
@@ -15141,8 +15665,10 @@
15141
15665
  cellEl.innerHTML = value;
15142
15666
  }
15143
15667
 
15144
- if (styles.styleCells[index] || styles.firstCell) {
15145
- _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"]);
15146
15672
 
15147
15673
  if (column.definition.align) {
15148
15674
  cellEl.style.textAlign = column.definition.align;
@@ -15175,17 +15701,17 @@
15175
15701
  return rowEl;
15176
15702
  }
15177
15703
  }, {
15178
- key: "genereateHTMLTable",
15179
- value: function genereateHTMLTable(list) {
15704
+ key: "generateHTMLTable",
15705
+ value: function generateHTMLTable(list) {
15180
15706
  var holder = document.createElement("div");
15181
- holder.appendChild(this.genereateTableElement(list));
15707
+ holder.appendChild(this.generateTableElement(list));
15182
15708
  return holder.innerHTML;
15183
15709
  }
15184
15710
  }, {
15185
15711
  key: "getHtml",
15186
15712
  value: function getHtml(visible, style, config, colVisProp) {
15187
15713
  var list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || "htmlOutput");
15188
- return this.genereateHTMLTable(list);
15714
+ return this.generateHTMLTable(list);
15189
15715
  }
15190
15716
  }, {
15191
15717
  key: "mapElementStyles",
@@ -15557,8 +16083,7 @@
15557
16083
  key: "initializeColumn",
15558
16084
  value: function initializeColumn(column, value) {
15559
16085
  var self = this,
15560
- field = column.getField();
15561
- //handle successfull value change
16086
+ field = column.getField(); //handle successfully value change
15562
16087
 
15563
16088
  function success(value) {
15564
16089
  var filterType = column.modules.filter.tagType == "input" && column.modules.filter.attrType == "text" || column.modules.filter.tagType == "textarea" ? "partial" : "match",
@@ -15629,8 +16154,7 @@
15629
16154
  self.headerFilters[field] = {
15630
16155
  value: value,
15631
16156
  func: filterFunc,
15632
- type: type,
15633
- params: {}
16157
+ type: type
15634
16158
  };
15635
16159
  } else {
15636
16160
  delete self.headerFilters[field];
@@ -15683,7 +16207,7 @@
15683
16207
  if (field) {
15684
16208
  //set empty value function
15685
16209
  column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function (value) {
15686
- return !value && value !== "0" && value !== 0;
16210
+ return !value && value !== 0;
15687
16211
  };
15688
16212
 
15689
16213
  filterElement = document.createElement("div");
@@ -15764,16 +16288,9 @@
15764
16288
  } //set Placeholder Text
15765
16289
 
15766
16290
 
15767
- if (field) {
15768
- self.langBind("headerFilters|columns|" + column.definition.field, function (value) {
15769
- editorElement.setAttribute("placeholder", typeof value !== "undefined" && value ? value : self.langText("headerFilters|default"));
15770
- });
15771
- } else {
15772
- self.langBind("headerFilters|default", function (value) {
15773
- editorElement.setAttribute("placeholder", value);
15774
- });
15775
- } //focus on element on click
15776
-
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
15777
16294
 
15778
16295
  editorElement.addEventListener("click", function (e) {
15779
16296
  e.stopPropagation();
@@ -15821,7 +16338,7 @@
15821
16338
  if (column.modules.filter.attrType == "text" && this.table.browser !== "ie") {
15822
16339
  editorElement.setAttribute("type", "search"); // editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click
15823
16340
  }
15824
- } //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
15825
16342
 
15826
16343
 
15827
16344
  if (column.modules.filter.tagType == "input" || column.modules.filter.tagType == "select" || column.modules.filter.tagType == "textarea") {
@@ -15861,7 +16378,7 @@
15861
16378
  column.modules.filter.headerElement.style.display = '';
15862
16379
  }
15863
16380
  });
15864
- } //programatically set focus of header filter
16381
+ } //programmatically set focus of header filter
15865
16382
 
15866
16383
  }, {
15867
16384
  key: "setHeaderFilterFocus",
@@ -15881,7 +16398,7 @@
15881
16398
  } else {
15882
16399
  console.warn("Column Filter Error - No header filter set on column:", column.getField());
15883
16400
  }
15884
- } //programatically set value of header filter
16401
+ } //programmatically set value of header filter
15885
16402
 
15886
16403
  }, {
15887
16404
  key: "setHeaderFilterValue",
@@ -16479,7 +16996,7 @@
16479
16996
  }
16480
16997
  }
16481
16998
 
16482
- function datetime (cell, formatterParams, onRendered) {
16999
+ function datetime$1 (cell, formatterParams, onRendered) {
16483
17000
  var DT = window.DateTime || luxon.DateTime;
16484
17001
  var inputFormat = formatterParams.inputFormat || "yyyy-MM-dd HH:mm:ss";
16485
17002
  var outputFormat = formatterParams.outputFormat || "dd/MM/yyyy HH:mm:ss";
@@ -16648,19 +17165,20 @@
16648
17165
  return el;
16649
17166
  }
16650
17167
 
16651
- 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;
16652
17171
  //progress bar
16653
17172
  var value = this.sanitizeHTML(cell.getValue()) || 0,
16654
17173
  element = cell.getElement(),
16655
- max = formatterParams && formatterParams.max ? formatterParams.max : 100,
16656
- min = formatterParams && formatterParams.min ? formatterParams.min : 0,
16657
- 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",
16658
17177
  percent,
16659
17178
  percentValue,
16660
17179
  color,
16661
17180
  legend,
16662
- legendColor;
16663
- //make sure value is in range
17181
+ legendColor; //make sure value is in range
16664
17182
 
16665
17183
  percentValue = parseFloat(value) <= max ? parseFloat(value) : max;
16666
17184
  percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; //workout percentage
@@ -16721,11 +17239,13 @@
16721
17239
 
16722
17240
  case "object":
16723
17241
  if (Array.isArray(formatterParams.legendColor)) {
16724
- var unit = 100 / formatterParams.legendColor.length;
16725
- var index = Math.floor(percentValue / unit);
16726
- index = Math.min(index, formatterParams.legendColor.length - 1);
16727
- index = Math.max(index, 0);
16728
- 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];
16729
17249
  }
16730
17250
 
16731
17251
  break;
@@ -16739,7 +17259,6 @@
16739
17259
  element.setAttribute("aria-label", percentValue);
16740
17260
  var barEl = document.createElement("div");
16741
17261
  barEl.style.display = "inline-block";
16742
- barEl.style.position = "absolute";
16743
17262
  barEl.style.width = percentValue + "%";
16744
17263
  barEl.style.backgroundColor = color;
16745
17264
  barEl.style.height = "100%";
@@ -16798,7 +17317,12 @@
16798
17317
  }
16799
17318
 
16800
17319
  function rownum (cell, formatterParams, onRendered) {
16801
- 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;
16802
17326
  }
16803
17327
 
16804
17328
  function handle (cell, formatterParams, onRendered) {
@@ -16832,6 +17356,7 @@
16832
17356
  el.addEventListener("click", function (e) {
16833
17357
  e.stopImmediatePropagation();
16834
17358
  toggleList(!config.open);
17359
+ cell.getTable().rowManager.adjustTableSize();
16835
17360
  });
16836
17361
  toggleList(config.open);
16837
17362
  return el;
@@ -16853,7 +17378,7 @@
16853
17378
  if (typeof cell.getRow == 'function') {
16854
17379
  var row = cell.getRow();
16855
17380
 
16856
- if (row instanceof RowComponent$1) {
17381
+ if (row instanceof RowComponent) {
16857
17382
  checkbox.addEventListener("change", function (e) {
16858
17383
  if (_this.table.options.selectableRangeMode === "click") {
16859
17384
  if (!blocked) {
@@ -16902,7 +17427,7 @@
16902
17427
  link: link,
16903
17428
  image: image,
16904
17429
  tickCross: tickCross$1,
16905
- datetime: datetime,
17430
+ datetime: datetime$1,
16906
17431
  datetimediff: datetimediff,
16907
17432
  lookup: lookup,
16908
17433
  star: star$1,
@@ -17078,7 +17603,7 @@
17078
17603
  cell.modules.format.rendered = false;
17079
17604
  };
17080
17605
 
17081
- params = typeof formatter.params === "function" ? formatter.params(component) : formatter.params;
17606
+ params = typeof formatter.params === "function" ? formatter.params(cell.getComponent()) : formatter.params;
17082
17607
  return formatter.formatter.call(this, cell.getComponent(), params, onRendered);
17083
17608
  } else {
17084
17609
  return this.formatValue(cell);
@@ -17098,7 +17623,7 @@
17098
17623
  '`': '&#x60;',
17099
17624
  '=': '&#x3D;'
17100
17625
  };
17101
- return String(value).replace(/[&<>"'`=\/]/g, function (s) {
17626
+ return String(value).replace(/[&<>"'`=/]/g, function (s) {
17102
17627
  return entityMap[s];
17103
17628
  });
17104
17629
  } else {
@@ -17114,8 +17639,6 @@
17114
17639
  }, {
17115
17640
  key: "getFormatter",
17116
17641
  value: function getFormatter(formatter) {
17117
- var formatter;
17118
-
17119
17642
  switch (_typeof(formatter)) {
17120
17643
  case "string":
17121
17644
  if (Format.formatters[formatter]) {
@@ -17128,7 +17651,7 @@
17128
17651
  break;
17129
17652
 
17130
17653
  case "function":
17131
- formatter = formatter;
17654
+ //Custom formatter Function, do nothing
17132
17655
  break;
17133
17656
 
17134
17657
  default:
@@ -17271,7 +17794,6 @@
17271
17794
  }, {
17272
17795
  key: "scrollHorizontal",
17273
17796
  value: function scrollHorizontal() {
17274
-
17275
17797
  if (this.active) {
17276
17798
  this.calcMargins(true);
17277
17799
  this.layoutColumnPosition();
@@ -17325,7 +17847,7 @@
17325
17847
  }
17326
17848
 
17327
17849
  if (group.groupList && group.groupList.length) {
17328
- _this3.layoutGroupCalcs(group.groupList && group.groupList);
17850
+ _this3.layoutGroupCalcs(group.groupList);
17329
17851
  }
17330
17852
  });
17331
17853
  } //calculate column positions and layout headers
@@ -17426,7 +17948,7 @@
17426
17948
  value: function reinitializeRows() {
17427
17949
  var _this5 = this;
17428
17950
 
17429
- var visibleRows = this.table.rowManager.getVisibleRows();
17951
+ var visibleRows = this.table.rowManager.getVisibleRows(true);
17430
17952
  var otherRows = this.table.rowManager.getRows().filter(function (row) {
17431
17953
  return !visibleRows.includes(row);
17432
17954
  });
@@ -17518,7 +18040,14 @@
17518
18040
 
17519
18041
  _this.registerComponentFunction("row", "unfreeze", _this.unfreezeRow.bind(_assertThisInitialized(_this)));
17520
18042
 
17521
- _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
+
17522
18051
 
17523
18052
  return _this;
17524
18053
  }
@@ -17533,6 +18062,40 @@
17533
18062
  this.subscribe("row-deleting", this.detachRow.bind(this));
17534
18063
  this.subscribe("rows-visible", this.visibleRows.bind(this));
17535
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
+ }
17536
18099
  }
17537
18100
  }, {
17538
18101
  key: "isRowFrozen",
@@ -17586,8 +18149,6 @@
17586
18149
  }, {
17587
18150
  key: "unfreezeRow",
17588
18151
  value: function unfreezeRow(row) {
17589
- var index = this.rows.indexOf(row);
17590
-
17591
18152
  if (row.modules.frozen) {
17592
18153
  row.modules.frozen = false;
17593
18154
  this.detachRow(row);
@@ -17619,10 +18180,10 @@
17619
18180
  }, {
17620
18181
  key: "styleRows",
17621
18182
  value: function styleRows(row) {
17622
- var _this2 = this;
18183
+ var _this3 = this;
17623
18184
 
17624
18185
  this.rows.forEach(function (row, i) {
17625
- _this2.table.rowManager.styleRow(row, i);
18186
+ _this3.table.rowManager.styleRow(row, i);
17626
18187
  });
17627
18188
  }
17628
18189
  }]);
@@ -17894,7 +18455,7 @@
17894
18455
  }
17895
18456
  }, {
17896
18457
  key: "getRowIndex",
17897
- value: function getRowIndex(row) {} //update row data to match grouping contraints
18458
+ value: function getRowIndex(row) {} //update row data to match grouping constraints
17898
18459
 
17899
18460
  }, {
17900
18461
  key: "conformRowData",
@@ -18183,10 +18744,10 @@
18183
18744
  }
18184
18745
  }, {
18185
18746
  key: "getRows",
18186
- value: function getRows(compoment) {
18747
+ value: function getRows(component) {
18187
18748
  var output = [];
18188
18749
  this.rows.forEach(function (row) {
18189
- output.push(compoment ? row.getComponent() : row);
18750
+ output.push(component ? row.getComponent() : row);
18190
18751
  });
18191
18752
  return output;
18192
18753
  }
@@ -18457,7 +19018,7 @@
18457
19018
  });
18458
19019
  this.groupIDLookups = [];
18459
19020
 
18460
- if (Array.isArray(groupBy) || groupBy) {
19021
+ if (Array.isArray(groupBy)) {
18461
19022
  if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "table" && this.table.options.columnCalcs != "both") {
18462
19023
  this.table.modules.columnCalcs.removeCalcs();
18463
19024
  }
@@ -18519,6 +19080,9 @@
18519
19080
  if (groupHeader) {
18520
19081
  this.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader];
18521
19082
  }
19083
+ } else {
19084
+ this.groupList = [];
19085
+ this.groups = {};
18522
19086
  }
18523
19087
  }
18524
19088
  }, {
@@ -18583,10 +19147,9 @@
18583
19147
 
18584
19148
  if (!this.initialized) {
18585
19149
  this.initialize();
18586
- } else {
18587
- this.configureGroupSetup();
18588
19150
  }
18589
19151
 
19152
+ this.configureGroupSetup();
18590
19153
  this.refreshData();
18591
19154
  this.trackChanges();
18592
19155
  }
@@ -18870,9 +19433,9 @@
18870
19433
  var oldRowGroup = row.modules.group,
18871
19434
  oldGroupPath = oldRowGroup.getPath(),
18872
19435
  newGroupPath = this.getExpectedPath(row),
18873
- 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
18874
19437
 
18875
- var samePath = oldGroupPath.length == newGroupPath.length && oldGroupPath.every(function (element, index) {
19438
+ samePath = oldGroupPath.length == newGroupPath.length && oldGroupPath.every(function (element, index) {
18876
19439
  return element === newGroupPath[index];
18877
19440
  }); // refresh if they new path and old path aren't the same (aka the row's groupings have changed)
18878
19441
 
@@ -19029,8 +19592,8 @@
19029
19592
  key: "rowMoved",
19030
19593
  value: function rowMoved(from, to, after) {
19031
19594
  this.action("rowMove", from, {
19032
- posFrom: this.table.rowManager.getRowPosition(from),
19033
- posTo: this.table.rowManager.getRowPosition(to),
19595
+ posFrom: from.getPosition(),
19596
+ posTo: to.getPosition(),
19034
19597
  to: to,
19035
19598
  after: after
19036
19599
  });
@@ -19217,7 +19780,6 @@
19217
19780
  value: function parseTable() {
19218
19781
  var element = this.table.originalElement,
19219
19782
  options = this.table.options,
19220
- columns = options.columns,
19221
19783
  headers = element.getElementsByTagName("th"),
19222
19784
  rows = element.getElementsByTagName("tbody")[0],
19223
19785
  data = [];
@@ -19237,7 +19799,7 @@
19237
19799
  for (var index = 0; index < rows.length; index++) {
19238
19800
  var row = rows[index],
19239
19801
  cells = row.getElementsByTagName("td"),
19240
- item = {}; //create index if the dont exist in table
19802
+ item = {}; //create index if the don't exist in table
19241
19803
 
19242
19804
  if (!this.hasIndex) {
19243
19805
  item[options.index] = index;
@@ -19443,9 +20005,14 @@
19443
20005
  }
19444
20006
  }
19445
20007
 
20008
+ function arrayImporter(input) {
20009
+ return input;
20010
+ }
20011
+
19446
20012
  var defaultImporters = {
19447
20013
  csv: csvImporter,
19448
- json: json$1
20014
+ json: json$1,
20015
+ array: arrayImporter
19449
20016
  };
19450
20017
 
19451
20018
  var Import = /*#__PURE__*/function (_Module) {
@@ -19480,7 +20047,7 @@
19480
20047
  }, {
19481
20048
  key: "loadDataCheck",
19482
20049
  value: function loadDataCheck(data) {
19483
- return typeof data === "string";
20050
+ return this.table.options.importFormat && (typeof data === "string" || Array.isArray(data) && data.length && Array.isArray(data));
19484
20051
  }
19485
20052
  }, {
19486
20053
  key: "loadData",
@@ -19791,6 +20358,8 @@
19791
20358
  }, {
19792
20359
  key: "cellContentsSelectionFixer",
19793
20360
  value: function cellContentsSelectionFixer(e, cell) {
20361
+ var range;
20362
+
19794
20363
  if (this.table.modExists("edit")) {
19795
20364
  if (this.table.modules.edit.currentCell === this) {
19796
20365
  return; //prevent instant selection of editor content
@@ -19802,11 +20371,11 @@
19802
20371
  try {
19803
20372
  if (document.selection) {
19804
20373
  // IE
19805
- var range = document.body.createTextRange();
20374
+ range = document.body.createTextRange();
19806
20375
  range.moveToElementText(this.element);
19807
20376
  range.select();
19808
20377
  } else if (window.getSelection) {
19809
- var range = document.createRange();
20378
+ range = document.createRange();
19810
20379
  range.selectNode(this.element);
19811
20380
  window.getSelection().removeAllRanges();
19812
20381
  window.getSelection().addRange(range);
@@ -19823,7 +20392,6 @@
19823
20392
  }, {
19824
20393
  key: "subscriptionChanged",
19825
20394
  value: function subscriptionChanged(key, added) {
19826
-
19827
20395
  if (added) {
19828
20396
  if (!this.subscribers[key]) {
19829
20397
  if (this.eventMap[key].includes("-")) {
@@ -19861,7 +20429,7 @@
19861
20429
  }, {
19862
20430
  key: "unsubscribeTouchEvents",
19863
20431
  value: function unsubscribeTouchEvents(key) {
19864
- var notouch = true,
20432
+ var noTouch = true,
19865
20433
  type = this.eventMap[key];
19866
20434
 
19867
20435
  if (this.subscribers[key] && !this.subscribedExternal(key)) {
@@ -19870,12 +20438,12 @@
19870
20438
  for (var i in this.eventMap) {
19871
20439
  if (this.eventMap[i] === type) {
19872
20440
  if (this.subscribers[i]) {
19873
- notouch = false;
20441
+ noTouch = false;
19874
20442
  }
19875
20443
  }
19876
20444
  }
19877
20445
 
19878
- if (notouch) {
20446
+ if (noTouch) {
19879
20447
  this.unsubscribe(type + "-touchstart", this.touchSubscribers[type + "-touchstart"]);
19880
20448
  this.unsubscribe(type + "-touchend", this.touchSubscribers[type + "-touchend"]);
19881
20449
  delete this.touchSubscribers[type + "-touchstart"];
@@ -20001,8 +20569,7 @@
20001
20569
  },
20002
20570
  scrollPageUp: function scrollPageUp(e) {
20003
20571
  var rowManager = this.table.rowManager,
20004
- newPos = rowManager.scrollTop - rowManager.element.clientHeight,
20005
- scrollMax = rowManager.element.scrollHeight;
20572
+ newPos = rowManager.scrollTop - rowManager.element.clientHeight;
20006
20573
  e.preventDefault();
20007
20574
 
20008
20575
  if (rowManager.displayRowsCount) {
@@ -20337,16 +20904,15 @@
20337
20904
  _createClass(Menu, [{
20338
20905
  key: "initialize",
20339
20906
  value: function initialize() {
20340
- this.deprecationCheck();
20907
+ this.deprecatedOptionsCheck();
20341
20908
  this.initializeRowWatchers();
20342
20909
  this.initializeGroupWatchers();
20343
20910
  this.subscribe("column-init", this.initializeColumn.bind(this));
20344
20911
  }
20345
20912
  }, {
20346
- key: "deprecationCheck",
20347
- value: function deprecationCheck() {
20348
- if (typeof this.table.options.menuContainer !== "undefined") {
20349
- 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")) {
20350
20916
  this.table.options.popupContainer = this.table.options.menuContainer;
20351
20917
  }
20352
20918
  }
@@ -20612,7 +21178,7 @@
20612
21178
 
20613
21179
  _this.toCol = false; //destination column
20614
21180
 
20615
- _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
20616
21182
 
20617
21183
  _this.startX = 0; //starting position within header element
20618
21184
 
@@ -20701,7 +21267,8 @@
20701
21267
 
20702
21268
  var colEl = column.getElement(),
20703
21269
  startXMove = false,
20704
- nextCol,
21270
+ //shifting center position of the cell
21271
+ nextCol,
20705
21272
  prevCol,
20706
21273
  nextColWidth,
20707
21274
  prevColWidth,
@@ -20939,7 +21506,7 @@
20939
21506
 
20940
21507
  _this.toRow = false; //destination row
20941
21508
 
20942
- _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
20943
21510
 
20944
21511
  _this.hasHandle = false; //row has handle instead of fully movable row
20945
21512
 
@@ -21001,24 +21568,25 @@
21001
21568
  key: "initializeGroupHeader",
21002
21569
  value: function initializeGroupHeader(group) {
21003
21570
  var self = this,
21004
- config = {};
21005
- //inter table drag drop
21571
+ config = {}; //inter table drag drop
21006
21572
 
21007
21573
  config.mouseup = function (e) {
21008
- self.tableRowDrop(e, row);
21574
+ self.tableRowDrop(e, group);
21009
21575
  }.bind(self); //same table drag drop
21010
21576
 
21011
21577
 
21012
21578
  config.mousemove = function (e) {
21579
+ var rowEl;
21580
+
21013
21581
  if (e.pageY - Helpers.elOffset(group.element).top + self.table.rowManager.element.scrollTop > group.getHeight() / 2) {
21014
21582
  if (self.toRow !== group || !self.toRowAfter) {
21015
- var rowEl = group.getElement();
21583
+ rowEl = group.getElement();
21016
21584
  rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);
21017
21585
  self.moveRow(group, true);
21018
21586
  }
21019
21587
  } else {
21020
21588
  if (self.toRow !== group || self.toRowAfter) {
21021
- var rowEl = group.getElement();
21589
+ rowEl = group.getElement();
21022
21590
 
21023
21591
  if (rowEl.previousSibling) {
21024
21592
  rowEl.parentNode.insertBefore(self.placeholderElement, rowEl);
@@ -21115,7 +21683,8 @@
21115
21683
  var _this2 = this;
21116
21684
 
21117
21685
  var startYMove = false,
21118
- nextRow,
21686
+ //shifting center position of the cell
21687
+ nextRow,
21119
21688
  prevRow,
21120
21689
  nextRowHeight,
21121
21690
  prevRowHeight,
@@ -21330,7 +21899,7 @@
21330
21899
  var rowHolder = this.table.rowManager.getElement(),
21331
21900
  scrollTop = rowHolder.scrollTop,
21332
21901
  yPos = (this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top + scrollTop;
21333
- 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";
21334
21903
  }
21335
21904
  }, {
21336
21905
  key: "moveHoverConnections",
@@ -21423,7 +21992,7 @@
21423
21992
  console.warn("Move Row Error - Table cannot accept connection, already connected to table:", this.connectedTable);
21424
21993
  return false;
21425
21994
  }
21426
- } //close incomming connection
21995
+ } //close incoming connection
21427
21996
 
21428
21997
  }, {
21429
21998
  key: "disconnect",
@@ -21460,7 +22029,7 @@
21460
22029
  }
21461
22030
 
21462
22031
  if (sender) {
21463
- 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);
21464
22033
  } else {
21465
22034
  if (this.table.options.movableRowsSender) {
21466
22035
  console.warn("Mover Row Error - no matching sender found:", this.table.options.movableRowsSender);
@@ -21574,7 +22143,7 @@
21574
22143
  _classCallCheck(this, Mutator);
21575
22144
 
21576
22145
  _this = _super.call(this, table);
21577
- _this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of muatation types
22146
+ _this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of mutation types
21578
22147
 
21579
22148
  _this.enabled = true;
21580
22149
 
@@ -21951,12 +22520,12 @@
21951
22520
  key: "rowAddingPosition",
21952
22521
  value: function rowAddingPosition(row, top) {
21953
22522
  var rowManager = this.table.rowManager,
21954
- dispRows = rowManager.getDisplayRows(),
22523
+ displayRows = rowManager.getDisplayRows(),
21955
22524
  index;
21956
22525
 
21957
22526
  if (top) {
21958
- if (dispRows.length) {
21959
- index = dispRows[0];
22527
+ if (displayRows.length) {
22528
+ index = displayRows[0];
21960
22529
  } else {
21961
22530
  if (rowManager.activeRows.length) {
21962
22531
  index = rowManager.activeRows[rowManager.activeRows.length - 1];
@@ -21964,9 +22533,9 @@
21964
22533
  }
21965
22534
  }
21966
22535
  } else {
21967
- if (dispRows.length) {
21968
- index = dispRows[dispRows.length - 1];
21969
- 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;
21970
22539
  }
21971
22540
  }
21972
22541
 
@@ -22267,7 +22836,7 @@
22267
22836
  this.element.appendChild(this.nextBut);
22268
22837
  this.element.appendChild(this.lastBut);
22269
22838
 
22270
- if (!this.table.options.paginationElement && !hidden) {
22839
+ if (!this.table.options.paginationElement) {
22271
22840
  if (this.table.options.paginationCounter) {
22272
22841
 
22273
22842
  if (this.table.options.paginationCounterElement) {
@@ -22661,7 +23230,7 @@
22661
23230
  value: function _parseRemoteData(data) {
22662
23231
  var _this6 = this;
22663
23232
 
22664
- var data, margin;
23233
+ var margin;
22665
23234
 
22666
23235
  if (typeof data.last_page === "undefined") {
22667
23236
  console.warn("Remote Pagination Error - Server response missing '" + (this.options("dataReceiveParams").last_page || "last_page") + "' property");
@@ -22741,7 +23310,7 @@
22741
23310
 
22742
23311
  Page.pageCounters = defaultPageCounters;
22743
23312
 
22744
- // read peristence information from storage
23313
+ // read persistance information from storage
22745
23314
  var defaultReaders = {
22746
23315
  local: function local(id, type) {
22747
23316
  var data = localStorage.getItem(id + "-" + type);
@@ -22839,7 +23408,7 @@
22839
23408
  //determine persistent layout storage type
22840
23409
  var mode = this.table.options.persistenceMode,
22841
23410
  id = this.table.options.persistenceID,
22842
- retreivedData;
23411
+ retrievedData;
22843
23412
  this.mode = mode !== true ? mode : this.localStorageTest() ? "local" : "cookie";
22844
23413
 
22845
23414
  if (this.table.options.persistenceReaderFunc) {
@@ -22889,34 +23458,34 @@
22889
23458
  }; //load pagination data if needed
22890
23459
 
22891
23460
  if (this.config.page) {
22892
- retreivedData = this.retreiveData("page");
23461
+ retrievedData = this.retrieveData("page");
22893
23462
 
22894
- if (retreivedData) {
22895
- if (typeof retreivedData.paginationSize !== "undefined" && (this.config.page === true || this.config.page.size)) {
22896
- 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;
22897
23466
  }
22898
23467
 
22899
- if (typeof retreivedData.paginationInitialPage !== "undefined" && (this.config.page === true || this.config.page.page)) {
22900
- 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;
22901
23470
  }
22902
23471
  }
22903
23472
  } //load group data if needed
22904
23473
 
22905
23474
 
22906
23475
  if (this.config.group) {
22907
- retreivedData = this.retreiveData("group");
23476
+ retrievedData = this.retrieveData("group");
22908
23477
 
22909
- if (retreivedData) {
22910
- if (typeof retreivedData.groupBy !== "undefined" && (this.config.group === true || this.config.group.groupBy)) {
22911
- 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;
22912
23481
  }
22913
23482
 
22914
- if (typeof retreivedData.groupStartOpen !== "undefined" && (this.config.group === true || this.config.group.groupStartOpen)) {
22915
- 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;
22916
23485
  }
22917
23486
 
22918
- if (typeof retreivedData.groupHeader !== "undefined" && (this.config.group === true || this.config.group.groupHeader)) {
22919
- 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;
22920
23489
  }
22921
23490
  }
22922
23491
  }
@@ -22952,9 +23521,7 @@
22952
23521
  }, {
22953
23522
  key: "tableBuilt",
22954
23523
  value: function tableBuilt() {
22955
- var options = this.table.options,
22956
- sorters,
22957
- filters;
23524
+ var sorters, filters;
22958
23525
 
22959
23526
  if (this.config.sort) {
22960
23527
  sorters = this.load("sort");
@@ -23039,18 +23606,18 @@
23039
23606
  }, {
23040
23607
  key: "load",
23041
23608
  value: function load(type, current) {
23042
- var data = this.retreiveData(type);
23609
+ var data = this.retrieveData(type);
23043
23610
 
23044
23611
  if (current) {
23045
23612
  data = data ? this.mergeDefinition(current, data) : current;
23046
23613
  }
23047
23614
 
23048
23615
  return data;
23049
- } //retreive data from memory
23616
+ } //retrieve data from memory
23050
23617
 
23051
23618
  }, {
23052
- key: "retreiveData",
23053
- value: function retreiveData(type) {
23619
+ key: "retrieveData",
23620
+ value: function retrieveData(type) {
23054
23621
  return this.readFunc ? this.readFunc(this.id, type) : false;
23055
23622
  } //merge old and new column definitions
23056
23623
 
@@ -23536,7 +24103,7 @@
23536
24103
  if (!this.manualBlock) {
23537
24104
  this.element = document.createElement("div");
23538
24105
  this.element.classList.add("tabulator-print-table");
23539
- 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"));
23540
24107
  this.table.element.style.display = "none";
23541
24108
  this.table.element.parentNode.insertBefore(this.element, this.table.element);
23542
24109
  }
@@ -23558,7 +24125,7 @@
23558
24125
  scrollY = window.scrollY,
23559
24126
  headerEl = document.createElement("div"),
23560
24127
  footerEl = document.createElement("div"),
23561
- 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"),
23562
24129
  headerContent,
23563
24130
  footerContent;
23564
24131
  this.manualBlock = true;
@@ -23640,10 +24207,10 @@
23640
24207
  key: "initialize",
23641
24208
  value: function initialize() {
23642
24209
  if (this.table.options.reactiveData) {
23643
- this.subscribe("cell-value-save-before", this.block.bind(this));
23644
- this.subscribe("cell-value-save-after", this.unblock.bind(this));
23645
- this.subscribe("row-data-save-before", this.block.bind(this));
23646
- 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"));
23647
24214
  this.subscribe("row-data-init-after", this.watchRow.bind(this));
23648
24215
  this.subscribe("data-processing", this.watchData.bind(this));
23649
24216
  this.subscribe("table-destroy", this.unwatchData.bind(this));
@@ -23664,15 +24231,19 @@
23664
24231
  enumerable: false,
23665
24232
  configurable: true,
23666
24233
  value: function value() {
23667
- var args = Array.from(arguments);
24234
+ var args = Array.from(arguments),
24235
+ result;
23668
24236
 
23669
24237
  if (!self.blocked && version === self.currentVersion) {
24238
+ self.block("data-push");
23670
24239
  args.forEach(function (arg) {
23671
24240
  self.table.rowManager.addRowActual(arg, false);
23672
24241
  });
24242
+ result = self.origFuncs.push.apply(data, arguments);
24243
+ self.unblock("data-push");
23673
24244
  }
23674
24245
 
23675
- return self.origFuncs.push.apply(data, arguments);
24246
+ return result;
23676
24247
  }
23677
24248
  }); //override array unshift function
23678
24249
 
@@ -23681,15 +24252,19 @@
23681
24252
  enumerable: false,
23682
24253
  configurable: true,
23683
24254
  value: function value() {
23684
- var args = Array.from(arguments);
24255
+ var args = Array.from(arguments),
24256
+ result;
23685
24257
 
23686
24258
  if (!self.blocked && version === self.currentVersion) {
24259
+ self.block("data-unshift");
23687
24260
  args.forEach(function (arg) {
23688
24261
  self.table.rowManager.addRowActual(arg, true);
23689
24262
  });
24263
+ result = self.origFuncs.unshift.apply(data, arguments);
24264
+ self.unblock("data-unshift");
23690
24265
  }
23691
24266
 
23692
- return self.origFuncs.unshift.apply(data, arguments);
24267
+ return result;
23693
24268
  }
23694
24269
  }); //override array shift function
23695
24270
 
@@ -23698,9 +24273,11 @@
23698
24273
  enumerable: false,
23699
24274
  configurable: true,
23700
24275
  value: function value() {
23701
- var row;
24276
+ var row, result;
23702
24277
 
23703
24278
  if (!self.blocked && version === self.currentVersion) {
24279
+ self.block("data-shift");
24280
+
23704
24281
  if (self.data.length) {
23705
24282
  row = self.table.rowManager.getRowFromDataObject(self.data[0]);
23706
24283
 
@@ -23708,9 +24285,12 @@
23708
24285
  row.deleteActual();
23709
24286
  }
23710
24287
  }
24288
+
24289
+ result = self.origFuncs.shift.call(data);
24290
+ self.unblock("data-shift");
23711
24291
  }
23712
24292
 
23713
- return self.origFuncs.shift.call(data);
24293
+ return result;
23714
24294
  }
23715
24295
  }); //override array pop function
23716
24296
 
@@ -23719,9 +24299,11 @@
23719
24299
  enumerable: false,
23720
24300
  configurable: true,
23721
24301
  value: function value() {
23722
- var row;
24302
+ var row, result;
23723
24303
 
23724
24304
  if (!self.blocked && version === self.currentVersion) {
24305
+ self.block("data-pop");
24306
+
23725
24307
  if (self.data.length) {
23726
24308
  row = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]);
23727
24309
 
@@ -23729,9 +24311,12 @@
23729
24311
  row.deleteActual();
23730
24312
  }
23731
24313
  }
24314
+
24315
+ result = self.origFuncs.pop.call(data);
24316
+ self.unblock("data-pop");
23732
24317
  }
23733
24318
 
23734
- return self.origFuncs.pop.call(data);
24319
+ return result;
23735
24320
  }
23736
24321
  }); //override array splice function
23737
24322
 
@@ -23744,10 +24329,12 @@
23744
24329
  start = args[0] < 0 ? data.length + args[0] : args[0],
23745
24330
  end = args[1],
23746
24331
  newRows = args[2] ? args.slice(2) : false,
23747
- startRow;
24332
+ startRow,
24333
+ result;
23748
24334
 
23749
24335
  if (!self.blocked && version === self.currentVersion) {
23750
- //add new rows
24336
+ self.block("data-splice"); //add new rows
24337
+
23751
24338
  if (newRows) {
23752
24339
  startRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false;
23753
24340
 
@@ -23778,9 +24365,12 @@
23778
24365
  if (newRows || end !== 0) {
23779
24366
  self.table.rowManager.reRenderInPosition();
23780
24367
  }
24368
+
24369
+ result = self.origFuncs.splice.apply(data, arguments);
24370
+ self.unblock("data-splice");
23781
24371
  }
23782
24372
 
23783
- return self.origFuncs.splice.apply(data, arguments);
24373
+ return result;
23784
24374
  }
23785
24375
  });
23786
24376
  }
@@ -23802,7 +24392,6 @@
23802
24392
  key: "watchRow",
23803
24393
  value: function watchRow(row) {
23804
24394
  var data = row.getData();
23805
- this.blocked = true;
23806
24395
 
23807
24396
  for (var key in data) {
23808
24397
  this.watchKey(row, data, key);
@@ -23811,21 +24400,16 @@
23811
24400
  if (this.table.options.dataTree) {
23812
24401
  this.watchTreeChildren(row);
23813
24402
  }
23814
-
23815
- this.blocked = false;
23816
24403
  }
23817
24404
  }, {
23818
24405
  key: "watchTreeChildren",
23819
24406
  value: function watchTreeChildren(row) {
23820
- var _arguments = arguments;
23821
- var childField = row.getData()[this.table.options.dataTreeChildField],
23822
- origFuncs = {};
24407
+ var _arguments = arguments,
24408
+ _this2 = this;
23823
24409
 
23824
- function rebuildTree() {
23825
- this.table.modules.dataTree.initializeRow(row);
23826
- this.table.modules.dataTree.layoutRow(row);
23827
- this.table.rowManager.refreshActiveData("tree", false, true);
23828
- }
24410
+ var self = this,
24411
+ childField = row.getData()[this.table.options.dataTreeChildField],
24412
+ origFuncs = {};
23829
24413
 
23830
24414
  if (childField) {
23831
24415
  origFuncs.push = childField.push;
@@ -23833,8 +24417,15 @@
23833
24417
  enumerable: false,
23834
24418
  configurable: true,
23835
24419
  value: function value() {
23836
- var result = origFuncs.push.apply(childField, _arguments);
23837
- 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
+
23838
24429
  return result;
23839
24430
  }
23840
24431
  });
@@ -23843,8 +24434,15 @@
23843
24434
  enumerable: false,
23844
24435
  configurable: true,
23845
24436
  value: function value() {
23846
- var result = origFuncs.unshift.apply(childField, _arguments);
23847
- 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
+
23848
24446
  return result;
23849
24447
  }
23850
24448
  });
@@ -23853,8 +24451,15 @@
23853
24451
  enumerable: false,
23854
24452
  configurable: true,
23855
24453
  value: function value() {
23856
- var result = origFuncs.shift.call(childField);
23857
- 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
+
23858
24463
  return result;
23859
24464
  }
23860
24465
  });
@@ -23863,8 +24468,15 @@
23863
24468
  enumerable: false,
23864
24469
  configurable: true,
23865
24470
  value: function value() {
23866
- var result = origFuncs.pop.call(childField);
23867
- 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
+
23868
24480
  return result;
23869
24481
  }
23870
24482
  });
@@ -23873,29 +24485,44 @@
23873
24485
  enumerable: false,
23874
24486
  configurable: true,
23875
24487
  value: function value() {
23876
- var result = origFuncs.splice.apply(childField, _arguments);
23877
- 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
+
23878
24497
  return result;
23879
24498
  }
23880
24499
  });
23881
24500
  }
23882
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
+ }
23883
24509
  }, {
23884
24510
  key: "watchKey",
23885
24511
  value: function watchKey(row, data, key) {
23886
- var _this2 = this;
23887
-
23888
- var props = Object.getOwnPropertyDescriptor(data, key),
24512
+ var self = this,
24513
+ props = Object.getOwnPropertyDescriptor(data, key),
23889
24514
  value = data[key],
23890
24515
  version = this.currentVersion;
23891
24516
  Object.defineProperty(data, key, {
23892
24517
  set: function set(newValue) {
23893
24518
  value = newValue;
23894
24519
 
23895
- if (!_this2.blocked && version === _this2.currentVersion) {
24520
+ if (!self.blocked && version === self.currentVersion) {
24521
+ self.block("key");
23896
24522
  var update = {};
23897
24523
  update[key] = newValue;
23898
24524
  row.updateData(update);
24525
+ self.unblock("key");
23899
24526
  }
23900
24527
 
23901
24528
  if (props.set) {
@@ -23924,13 +24551,17 @@
23924
24551
  }
23925
24552
  }, {
23926
24553
  key: "block",
23927
- value: function block() {
23928
- this.blocked = true;
24554
+ value: function block(key) {
24555
+ if (!this.blocked) {
24556
+ this.blocked = key;
24557
+ }
23929
24558
  }
23930
24559
  }, {
23931
24560
  key: "unblock",
23932
- value: function unblock() {
23933
- this.blocked = false;
24561
+ value: function unblock(key) {
24562
+ if (this.blocked === key) {
24563
+ this.blocked = false;
24564
+ }
23934
24565
  }
23935
24566
  }]);
23936
24567
 
@@ -24189,7 +24820,7 @@
24189
24820
  }
24190
24821
  }
24191
24822
 
24192
- self.table.columnManager.renderer.rerenderColumns(true);
24823
+ self.table.columnManager.rerenderColumns(true);
24193
24824
 
24194
24825
  if (!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) {
24195
24826
  column.checkCellHeights();
@@ -24218,7 +24849,7 @@
24218
24849
  }
24219
24850
  }
24220
24851
 
24221
- e.stopPropagation(); //prevent resize from interfereing with movable columns
24852
+ e.stopPropagation(); //prevent resize from interfering with movable columns
24222
24853
  //block editor from taking action while resizing is taking place
24223
24854
 
24224
24855
  if (self.startColumn.modules.edit) {
@@ -24339,7 +24970,7 @@
24339
24970
  self.dispatchExternal("rowResized", row.getComponent());
24340
24971
  }
24341
24972
 
24342
- e.stopPropagation(); //prevent resize from interfereing with movable columns
24973
+ e.stopPropagation(); //prevent resize from interfering with movable columns
24343
24974
  //block editor from taking action while resizing is taking place
24344
24975
  // if(self.startColumn.modules.edit){
24345
24976
  // self.startColumn.modules.edit.blocked = true;
@@ -24373,13 +25004,17 @@
24373
25004
 
24374
25005
  _this = _super.call(this, table);
24375
25006
  _this.binding = false;
24376
- _this.observer = false;
25007
+ _this.visibilityObserver = false;
25008
+ _this.resizeObserver = false;
24377
25009
  _this.containerObserver = false;
24378
25010
  _this.tableHeight = 0;
24379
25011
  _this.tableWidth = 0;
24380
25012
  _this.containerHeight = 0;
24381
25013
  _this.containerWidth = 0;
24382
25014
  _this.autoResize = false;
25015
+ _this.visible = false;
25016
+ _this.initialized = false;
25017
+ _this.initialRedraw = false;
24383
25018
 
24384
25019
  _this.registerTableOption("autoResize", true); //auto resize table
24385
25020
 
@@ -24403,9 +25038,10 @@
24403
25038
  this.containerWidth = table.element.parentNode.clientWidth;
24404
25039
  }
24405
25040
 
24406
- if (typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") {
25041
+ if (typeof IntersectionObserver !== "undefined" && typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") {
25042
+ this.initializeVisibilityObserver();
24407
25043
  this.autoResize = true;
24408
- this.observer = new ResizeObserver(function (entry) {
25044
+ this.resizeObserver = new ResizeObserver(function (entry) {
24409
25045
  if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) {
24410
25046
  var nodeHeight = Math.floor(entry[0].contentRect.height);
24411
25047
  var nodeWidth = Math.floor(entry[0].contentRect.width);
@@ -24419,13 +25055,11 @@
24419
25055
  _this2.containerWidth = table.element.parentNode.clientWidth;
24420
25056
  }
24421
25057
 
24422
- _this2.table.columnManager.renderer.rerenderColumns(true);
24423
-
24424
- table.redraw();
25058
+ _this2.redrawTable();
24425
25059
  }
24426
25060
  }
24427
25061
  });
24428
- this.observer.observe(table.element);
25062
+ this.resizeObserver.observe(table.element);
24429
25063
  tableStyle = window.getComputedStyle(table.element);
24430
25064
 
24431
25065
  if (this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue("max-height") || tableStyle.getPropertyValue("min-height"))) {
@@ -24441,8 +25075,7 @@
24441
25075
  _this2.tableWidth = table.element.clientWidth;
24442
25076
  }
24443
25077
 
24444
- table.columnManager.renderer.rerenderColumns(true);
24445
- table.redraw();
25078
+ _this2.redrawTable();
24446
25079
  }
24447
25080
  });
24448
25081
  this.containerObserver.observe(this.table.element.parentNode);
@@ -24452,7 +25085,7 @@
24452
25085
  } else {
24453
25086
  this.binding = function () {
24454
25087
  if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) {
24455
- table.columnManager.renderer.rerenderColumns(true);
25088
+ table.columnManager.rerenderColumns(true);
24456
25089
  table.redraw();
24457
25090
  }
24458
25091
  };
@@ -24463,6 +25096,35 @@
24463
25096
  this.subscribe("table-destroy", this.clearBindings.bind(this));
24464
25097
  }
24465
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
+ }
24466
25128
  }, {
24467
25129
  key: "tableResized",
24468
25130
  value: function tableResized() {
@@ -24475,8 +25137,12 @@
24475
25137
  window.removeEventListener("resize", this.binding);
24476
25138
  }
24477
25139
 
24478
- if (this.observer) {
24479
- 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);
24480
25146
  }
24481
25147
 
24482
25148
  if (this.containerObserver) {
@@ -24530,7 +25196,6 @@
24530
25196
  _createClass(ResponsiveLayout, [{
24531
25197
  key: "initialize",
24532
25198
  value: function initialize() {
24533
-
24534
25199
  if (this.table.options.responsiveLayout) {
24535
25200
  this.subscribe("column-layout", this.initializeColumn.bind(this));
24536
25201
  this.subscribe("column-show", this.updateColumnVisibility.bind(this));
@@ -24898,7 +25563,7 @@
24898
25563
 
24899
25564
  _this.registerTableOption("selectableCheck", function (data, row) {
24900
25565
  return true;
24901
- }); //check wheather row is selectable
25566
+ }); //check whether row is selectable
24902
25567
 
24903
25568
 
24904
25569
  _this.registerTableFunction("selectRow", _this.selectRows.bind(_assertThisInitialized(_this)));
@@ -25144,7 +25809,7 @@
25144
25809
  }, {
25145
25810
  key: "_selectRow",
25146
25811
  value: function _selectRow(rowInfo, silent, force) {
25147
-
25812
+ //handle max row count
25148
25813
  if (!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force) {
25149
25814
  if (this.selectedRows.length >= this.table.options.selectable) {
25150
25815
  if (this.table.options.selectableRollingSelection) {
@@ -25435,27 +26100,27 @@
25435
26100
  }
25436
26101
 
25437
26102
  //sort datetime
25438
- function datetime$1 (a, b, aRow, bRow, column, dir, params) {
26103
+ function datetime$2 (a, b, aRow, bRow, column, dir, params) {
25439
26104
  var DT = window.DateTime || luxon.DateTime;
25440
26105
  var format = params.format || "dd/MM/yyyy HH:mm:ss",
25441
26106
  alignEmptyValues = params.alignEmptyValues,
25442
26107
  emptyAlign = 0;
25443
26108
 
25444
26109
  if (typeof DT != "undefined") {
25445
- if (DT.isDateTime(a)) {
25446
- a = a;
25447
- } else if (format === "iso") {
25448
- a = DT.fromISO(String(a));
25449
- } else {
25450
- 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
+ }
25451
26116
  }
25452
26117
 
25453
- if (DT.isDateTime(b)) {
25454
- b = b;
25455
- } else if (format === "iso") {
25456
- b = DT.fromISO(String(b));
25457
- } else {
25458
- 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
+ }
25459
26124
  }
25460
26125
 
25461
26126
  if (!a.isValid) {
@@ -25478,20 +26143,20 @@
25478
26143
  }
25479
26144
  }
25480
26145
 
25481
- function date (a, b, aRow, bRow, column, dir, params) {
26146
+ function date$1 (a, b, aRow, bRow, column, dir, params) {
25482
26147
  if (!params.format) {
25483
26148
  params.format = "dd/MM/yyyy";
25484
26149
  }
25485
26150
 
25486
- 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);
25487
26152
  }
25488
26153
 
25489
- function time (a, b, aRow, bRow, column, dir, params) {
26154
+ function time$1 (a, b, aRow, bRow, column, dir, params) {
25490
26155
  if (!params.format) {
25491
26156
  params.format = "HH:mm";
25492
26157
  }
25493
26158
 
25494
- 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);
25495
26160
  }
25496
26161
 
25497
26162
  //sort booleans
@@ -25503,45 +26168,49 @@
25503
26168
 
25504
26169
  //sort if element contains any data
25505
26170
  function array (a, b, aRow, bRow, column, dir, params) {
25506
- var el1 = 0;
25507
- var el2 = 0;
25508
- var type = params.type || "length";
25509
- var alignEmptyValues = params.alignEmptyValues;
25510
- var emptyAlign = 0;
26171
+ var type = params.type || "length",
26172
+ alignEmptyValues = params.alignEmptyValues,
26173
+ emptyAlign = 0;
25511
26174
 
25512
26175
  function calc(value) {
26176
+ var result;
26177
+
25513
26178
  switch (type) {
25514
26179
  case "length":
25515
- return value.length;
26180
+ result = value.length;
26181
+ break;
25516
26182
 
25517
26183
  case "sum":
25518
- return value.reduce(function (c, d) {
26184
+ result = value.reduce(function (c, d) {
25519
26185
  return c + d;
25520
26186
  });
26187
+ break;
25521
26188
 
25522
26189
  case "max":
25523
- return Math.max.apply(null, value);
26190
+ result = Math.max.apply(null, value);
26191
+ break;
25524
26192
 
25525
26193
  case "min":
25526
- return Math.min.apply(null, value);
26194
+ result = Math.min.apply(null, value);
26195
+ break;
25527
26196
 
25528
26197
  case "avg":
25529
- return value.reduce(function (c, d) {
26198
+ result = value.reduce(function (c, d) {
25530
26199
  return c + d;
25531
26200
  }) / value.length;
26201
+ break;
25532
26202
  }
26203
+
26204
+ return result;
25533
26205
  } //handle non array values
25534
26206
 
25535
26207
 
25536
26208
  if (!Array.isArray(a)) {
25537
- alignEmptyValues = !Array.isArray(b) ? 0 : -1;
26209
+ emptyAlign = !Array.isArray(b) ? 0 : -1;
25538
26210
  } else if (!Array.isArray(b)) {
25539
- alignEmptyValues = 1;
26211
+ emptyAlign = 1;
25540
26212
  } else {
25541
- //compare valid values
25542
- el1 = a ? calc(a) : 0;
25543
- el2 = b ? calc(b) : 0;
25544
- return el1 - el2;
26213
+ return calc(b) - calc(a);
25545
26214
  } //fix empty values in position
25546
26215
 
25547
26216
 
@@ -25613,9 +26282,9 @@
25613
26282
  var defaultSorters = {
25614
26283
  number: number$1,
25615
26284
  string: string,
25616
- date: date,
25617
- time: time,
25618
- datetime: datetime$1,
26285
+ date: date$1,
26286
+ time: time$1,
26287
+ datetime: datetime$2,
25619
26288
  "boolean": _boolean,
25620
26289
  array: array,
25621
26290
  exists: exists,
@@ -25755,15 +26424,23 @@
25755
26424
  arrowEl = document.createElement("div");
25756
26425
  arrowEl.classList.add("tabulator-col-sorter");
25757
26426
 
25758
- if (_typeof(this.table.options.headerSortElement) == "object") {
25759
- arrowEl.appendChild(this.table.options.headerSortElement);
25760
- } else {
25761
- 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;
25762
26438
  } //create sorter arrow
25763
26439
 
25764
26440
 
25765
26441
  column.titleHolderElement.appendChild(arrowEl);
25766
- column.modules.sort.element = arrowEl; //sort on click
26442
+ column.modules.sort.element = arrowEl;
26443
+ this.setColumnHeaderSortIcon(column, "none"); //sort on click
25767
26444
 
25768
26445
  colEl.addEventListener("click", function (e) {
25769
26446
  var dir = "",
@@ -25969,19 +26646,23 @@
25969
26646
  if (this.table.options.sortMode !== "remote") {
25970
26647
  //build list of valid sorters and trigger column specific callbacks before sort begins
25971
26648
  sortList.forEach(function (item, i) {
25972
- 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
+ }
25973
26659
 
25974
- if (item.column && sortObj) {
25975
- //if no sorter has been defined, take a guess
25976
- if (!sortObj.sorter) {
25977
- 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);
25978
26662
  }
25979
26663
 
25980
- item.params = typeof sortObj.params === "function" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params;
25981
- sortListActual.push(item);
26664
+ self.setColumnHeader(item.column, item.dir);
25982
26665
  }
25983
-
25984
- self.setColumnHeader(item.column, item.dir);
25985
26666
  }); //sort data
25986
26667
 
25987
26668
  if (sortListActual.length) {
@@ -26006,10 +26687,14 @@
26006
26687
  }, {
26007
26688
  key: "clearColumnHeaders",
26008
26689
  value: function clearColumnHeaders() {
26690
+ var _this3 = this;
26691
+
26009
26692
  this.table.columnManager.getRealColumns().forEach(function (column) {
26010
26693
  if (column.modules.sort) {
26011
26694
  column.modules.sort.dir = "none";
26012
26695
  column.getElement().setAttribute("aria-sort", "none");
26696
+
26697
+ _this3.setColumnHeaderSortIcon(column, "none");
26013
26698
  }
26014
26699
  });
26015
26700
  } //set the column header sort direction
@@ -26019,12 +26704,33 @@
26019
26704
  value: function setColumnHeader(column, dir) {
26020
26705
  column.modules.sort.dir = dir;
26021
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
+ }
26022
26728
  } //sort each item in sort list
26023
26729
 
26024
26730
  }, {
26025
26731
  key: "_sortItems",
26026
26732
  value: function _sortItems(data, sortList) {
26027
- var _this3 = this;
26733
+ var _this4 = this;
26028
26734
 
26029
26735
  var sorterCount = sortList.length - 1;
26030
26736
  data.sort(function (a, b) {
@@ -26032,7 +26738,7 @@
26032
26738
 
26033
26739
  for (var i = sorterCount; i >= 0; i--) {
26034
26740
  var sortItem = sortList[i];
26035
- result = _this3._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);
26741
+ result = _this4._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);
26036
26742
 
26037
26743
  if (result !== 0) {
26038
26744
  break;
@@ -26096,15 +26802,13 @@
26096
26802
  _createClass(Tooltip, [{
26097
26803
  key: "initialize",
26098
26804
  value: function initialize() {
26099
- this.deprecationCheck();
26805
+ this.deprecatedOptionsCheck();
26100
26806
  this.subscribe("column-init", this.initializeColumn.bind(this));
26101
26807
  }
26102
26808
  }, {
26103
- key: "deprecationCheck",
26104
- value: function deprecationCheck() {
26105
- if (typeof this.table.options.tooltipGenerationMode !== "undefined") {
26106
- console.warn("Use of the tooltipGenerationMode option is now deprecated. This option is no longer needed as tooltips are always generated on hover now");
26107
- }
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");
26108
26812
  }
26109
26813
  }, {
26110
26814
  key: "initializeColumn",
@@ -26185,7 +26889,7 @@
26185
26889
  contentsEl.innerHTML = tooltip;
26186
26890
  }
26187
26891
 
26188
- if (tooltip || tooltip === 0 || tooltip === "0" || tooltip === false) {
26892
+ if (tooltip || tooltip === 0 || tooltip === false) {
26189
26893
  contentsEl.classList.add("tabulator-tooltip");
26190
26894
  contentsEl.addEventListener("mousemove", function (e) {
26191
26895
  return e.preventDefault();
@@ -26220,7 +26924,7 @@
26220
26924
  }
26221
26925
 
26222
26926
  value = Number(value);
26223
- return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;
26927
+ return !isNaN(value) && isFinite(value) && Math.floor(value) === value;
26224
26928
  },
26225
26929
  //is float
26226
26930
  "float": function float(cell, value, parameters) {
@@ -26229,7 +26933,7 @@
26229
26933
  }
26230
26934
 
26231
26935
  value = Number(value);
26232
- return typeof value === 'number' && isFinite(value) && value % 1 !== 0;
26936
+ return !isNaN(value) && isFinite(value) && value % 1 !== 0;
26233
26937
  },
26234
26938
  //must be a number
26235
26939
  numeric: function numeric(cell, value, parameters) {
@@ -26305,7 +27009,7 @@
26305
27009
  parameters = parameters.split("|");
26306
27010
  }
26307
27011
 
26308
- return value === "" || parameters.indexOf(value) > -1;
27012
+ return parameters.indexOf(value) > -1;
26309
27013
  },
26310
27014
  //must match provided regex
26311
27015
  regex: function regex(cell, value, parameters) {
@@ -26713,7 +27417,8 @@
26713
27417
  }
26714
27418
 
26715
27419
  return TabulatorFull;
26716
- }(Tabulator);
27420
+ }(Tabulator); //bind modules and static functionality
27421
+
26717
27422
 
26718
27423
  new ModuleBinder(TabulatorFull, modules);
26719
27424