tabulator-tables 5.0.8 → 5.0.9

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 (70) hide show
  1. package/bower.json +1 -1
  2. package/build/rollup.js +1 -1
  3. package/dist/css/tabulator.css +4 -0
  4. package/dist/css/tabulator.css.map +1 -1
  5. package/dist/css/tabulator.min.css +1 -1
  6. package/dist/css/tabulator.min.css.map +1 -1
  7. package/dist/css/tabulator_bootstrap3.css +4 -0
  8. package/dist/css/tabulator_bootstrap3.css.map +1 -1
  9. package/dist/css/tabulator_bootstrap3.min.css +1 -1
  10. package/dist/css/tabulator_bootstrap3.min.css.map +1 -1
  11. package/dist/css/tabulator_bootstrap4.css +4 -0
  12. package/dist/css/tabulator_bootstrap4.css.map +1 -1
  13. package/dist/css/tabulator_bootstrap4.min.css +1 -1
  14. package/dist/css/tabulator_bootstrap4.min.css.map +1 -1
  15. package/dist/css/tabulator_bulma.css +4 -0
  16. package/dist/css/tabulator_bulma.css.map +1 -1
  17. package/dist/css/tabulator_bulma.min.css +1 -1
  18. package/dist/css/tabulator_bulma.min.css.map +1 -1
  19. package/dist/css/tabulator_materialize.css +4 -0
  20. package/dist/css/tabulator_materialize.css.map +1 -1
  21. package/dist/css/tabulator_materialize.min.css +1 -1
  22. package/dist/css/tabulator_materialize.min.css.map +1 -1
  23. package/dist/css/tabulator_midnight.css +4 -0
  24. package/dist/css/tabulator_midnight.css.map +1 -1
  25. package/dist/css/tabulator_midnight.min.css +1 -1
  26. package/dist/css/tabulator_midnight.min.css.map +1 -1
  27. package/dist/css/tabulator_modern.css +4 -0
  28. package/dist/css/tabulator_modern.css.map +1 -1
  29. package/dist/css/tabulator_modern.min.css +1 -1
  30. package/dist/css/tabulator_modern.min.css.map +1 -1
  31. package/dist/css/tabulator_semanticui.css +4 -0
  32. package/dist/css/tabulator_semanticui.css.map +1 -1
  33. package/dist/css/tabulator_semanticui.min.css +1 -1
  34. package/dist/css/tabulator_semanticui.min.css.map +1 -1
  35. package/dist/css/tabulator_simple.css +4 -0
  36. package/dist/css/tabulator_simple.css.map +1 -1
  37. package/dist/css/tabulator_simple.min.css +1 -1
  38. package/dist/css/tabulator_simple.min.css.map +1 -1
  39. package/dist/css/tabulator_site.css +4 -0
  40. package/dist/css/tabulator_site.css.map +1 -1
  41. package/dist/css/tabulator_site.min.css +1 -1
  42. package/dist/css/tabulator_site.min.css.map +1 -1
  43. package/dist/js/tabulator.js +158 -69
  44. package/dist/js/tabulator.js.map +1 -1
  45. package/dist/js/tabulator.min.js +2 -2
  46. package/dist/js/tabulator.min.js.map +1 -1
  47. package/dist/js/tabulator_esm.js +191 -104
  48. package/dist/js/tabulator_esm.js.map +1 -1
  49. package/dist/js/tabulator_esm.min.js +2 -2
  50. package/dist/js/tabulator_esm.min.js.map +1 -1
  51. package/package.json +1 -1
  52. package/src/js/core/ColumnManager.js +1 -1
  53. package/src/js/core/CoreFeature.js +1 -5
  54. package/src/js/core/RowManager.js +8 -2
  55. package/src/js/core/column/Column.js +1 -1
  56. package/src/js/core/defaults/options.js +1 -1
  57. package/src/js/core/rendering/Renderer.js +2 -1
  58. package/src/js/core/rendering/renderers/VirtualDomVertical.js +1 -1
  59. package/src/js/core/tools/DataLoader.js +1 -1
  60. package/src/js/core/tools/InteractionMonitor.js +123 -49
  61. package/src/js/modules/ColumnCalcs/ColumnCalcs.js +13 -0
  62. package/src/js/modules/DataTree/DataTree.js +18 -9
  63. package/src/js/modules/Download/defaults/downloaders/pdf.js +0 -2
  64. package/src/js/modules/Download/defaults/downloaders/xlsx.js +3 -2
  65. package/src/js/modules/Edit/Edit.js +1 -8
  66. package/src/js/modules/Export/Export.js +1 -1
  67. package/src/js/modules/GroupRows/Group.js +6 -2
  68. package/src/js/modules/Page/Page.js +6 -9
  69. package/src/js/modules/SelectRow/SelectRow.js +3 -8
  70. package/src/scss/tabulator.scss +4 -0
@@ -1,4 +1,4 @@
1
- /* Tabulator v5.0.8 (c) Oliver Folkerd 2021 */
1
+ /* Tabulator v5.0.9 (c) Oliver Folkerd 2021 */
2
2
  class CoreFeature{
3
3
 
4
4
  constructor(table){
@@ -103,11 +103,7 @@ class CoreFeature{
103
103
  //////////////// Options /////////////////
104
104
  //////////////////////////////////////////
105
105
 
106
- options(key, value){
107
- if(typeof value !== "undefined"){
108
- this.table.options[key] = value;
109
- }
110
-
106
+ options(key){
111
107
  return this.table.options[key];
112
108
  }
113
109
 
@@ -1810,7 +1806,7 @@ class Column$1 extends CoreFeature{
1810
1806
  var def = this.definition;
1811
1807
 
1812
1808
  //set header tooltips
1813
- var tooltip = typeof def.headerTooltip === "undefined" ? def.tooltip : def.headerTooltip;
1809
+ var tooltip = def.headerTooltip;
1814
1810
 
1815
1811
  if(tooltip){
1816
1812
  if(tooltip === true){
@@ -3325,6 +3321,7 @@ class ColumnCalcs extends Module{
3325
3321
  this.subscribe("column-add", this.recalcActiveRows.bind(this));
3326
3322
  this.subscribe("data-refeshed", this.recalcActiveRows.bind(this));
3327
3323
  this.subscribe("table-redraw", this.tableRedraw.bind(this));
3324
+ this.subscribe("rows-visible", this.visibleRows.bind(this));
3328
3325
 
3329
3326
  this.registerTableFunction("getCalcResults", this.getResults.bind(this));
3330
3327
  this.registerTableFunction("recalc", this.userRecalc.bind(this));
@@ -3350,6 +3347,18 @@ class ColumnCalcs extends Module{
3350
3347
  ///////// Internal Logic //////////
3351
3348
  ///////////////////////////////////
3352
3349
 
3350
+ visibleRows(viewable, rows){
3351
+ if(this.topRow){
3352
+ rows.unshift(this.topRow);
3353
+ }
3354
+
3355
+ if(this.botRow){
3356
+ rows.push(this.botRow);
3357
+ }
3358
+
3359
+ return rows;
3360
+ }
3361
+
3353
3362
  rowsUpdated(row){
3354
3363
  if(this.table.options.groupBy){
3355
3364
  this.recalcRowGroup(this);
@@ -3808,12 +3817,10 @@ class DataTree extends Module{
3808
3817
  initialize(){
3809
3818
  if(this.table.options.dataTree){
3810
3819
  var dummyEl = null,
3811
- firstCol = this.table.columnManager.getFirstVisibileColumn(),
3812
3820
  options = this.table.options;
3813
3821
 
3814
3822
  this.field = options.dataTreeChildField;
3815
3823
  this.indent = options.dataTreeChildIndent;
3816
- this.elementField = options.dataTreeElementColumn || (firstCol ? firstCol.field : false);
3817
3824
 
3818
3825
  if(options.dataTreeBranchElement){
3819
3826
 
@@ -3882,15 +3889,23 @@ class DataTree extends Module{
3882
3889
 
3883
3890
  this.subscribe("row-init", this.initializeRow.bind(this));
3884
3891
  this.subscribe("row-layout-after", this.layoutRow.bind(this));
3885
- this.subscribe("row-relayout", this.layoutRow.bind(this));
3886
3892
  this.subscribe("row-deleted", this.rowDelete.bind(this),0);
3887
3893
  this.subscribe("row-data-changed", this.rowDataChanged.bind(this), 10);
3894
+ this.subscribe("cell-value-updated", this.cellValueChanged.bind(this));
3895
+ this.subscribe("edit-cancelled", this.cellValueChanged.bind(this));
3888
3896
  this.subscribe("column-moving-rows", this.columnMoving.bind(this));
3897
+ this.subscribe("table-built", this.initializeElementField.bind(this));
3889
3898
 
3890
3899
  this.registerDisplayHandler(this.getRows.bind(this), 30);
3891
3900
  }
3892
3901
  }
3893
3902
 
3903
+ initializeElementField(){
3904
+ var firstCol = this.table.columnManager.getFirstVisibleColumn();
3905
+
3906
+ this.elementField = this.table.options.dataTreeElementColumn || (firstCol ? firstCol.field : false);
3907
+ }
3908
+
3894
3909
  getRowChildren(row){
3895
3910
  return this.getTreeChildren(row, true);
3896
3911
  }
@@ -3916,6 +3931,14 @@ class DataTree extends Module{
3916
3931
  }
3917
3932
  }
3918
3933
 
3934
+ cellValueChanged(cell){
3935
+ var field = cell.column.getField();
3936
+
3937
+ if(field === this.elementField){
3938
+ this.layoutRow(cell.row);
3939
+ }
3940
+ }
3941
+
3919
3942
  initializeRow(row){
3920
3943
  var childArray = row.getData()[this.field];
3921
3944
  var isArray = Array.isArray(childArray);
@@ -4320,17 +4343,12 @@ class DataTree extends Module{
4320
4343
  return output;
4321
4344
  }
4322
4345
 
4323
- checkForRestyle(cell){
4324
- if(!cell.row.cells.indexOf(cell)){
4325
- this.layoutRow(cell.row);
4326
- }
4327
- }
4328
-
4329
4346
  getChildField(){
4330
4347
  return this.field;
4331
4348
  }
4332
4349
 
4333
4350
  redrawNeeded(data){
4351
+ console.log("needed?", data);
4334
4352
  return (this.field ? typeof data[this.field] !== "undefined" : false) || (this.elementField ? typeof data[this.elementField] !== "undefined" : false);
4335
4353
  }
4336
4354
  }
@@ -4513,8 +4531,6 @@ function pdf(list, options, setFileContents){
4513
4531
  }
4514
4532
 
4515
4533
  rowData.push(cell);
4516
- }else {
4517
- rowData.push("");
4518
4534
  }
4519
4535
  });
4520
4536
 
@@ -4577,7 +4593,9 @@ function xlsx(list, options, setFileContents){
4577
4593
  rowData.push(!(col.value instanceof Date) && typeof col.value === "object" ? JSON.stringify(col.value) : col.value);
4578
4594
 
4579
4595
  if(col.width > 1 || col.height > -1){
4580
- merges.push({s:{r:i,c:j},e:{r:i + col.height - 1,c:j + col.width - 1}});
4596
+ if(col.height > 1 || col.width > 1){
4597
+ merges.push({s:{r:i,c:j},e:{r:i + col.height - 1,c:j + col.width - 1}});
4598
+ }
4581
4599
  }
4582
4600
  }else {
4583
4601
  rowData.push("");
@@ -4587,7 +4605,6 @@ function xlsx(list, options, setFileContents){
4587
4605
  rows.push(rowData);
4588
4606
  });
4589
4607
 
4590
-
4591
4608
  //convert rows to worksheet
4592
4609
  XLSX.utils.sheet_add_aoa(worksheet, rows);
4593
4610
 
@@ -7085,6 +7102,7 @@ class Edit extends Module{
7085
7102
  cell.column.definition.cellEditCancelled.call(this.table, component);
7086
7103
  }
7087
7104
 
7105
+ this.dispatch("edit-cancelled", cell);
7088
7106
  this.dispatchExternal("cellEditCancelled", component);
7089
7107
  }
7090
7108
  }
@@ -7215,10 +7233,6 @@ class Edit extends Module{
7215
7233
 
7216
7234
  cell.setValue(value, true);
7217
7235
 
7218
- if(self.table.options.dataTree && self.table.modExists("dataTree")){
7219
- self.table.modules.dataTree.checkForRestyle(cell);
7220
- }
7221
-
7222
7236
  if(valid !== true){
7223
7237
  element.classList.add("tabulator-validation-fail");
7224
7238
  self.table.externalEvents.dispatch("validationFailed", cell.getComponent(), value, valid);
@@ -7241,10 +7255,6 @@ class Edit extends Module{
7241
7255
  function cancel(){
7242
7256
  if(self.currentCell === cell){
7243
7257
  self.cancelEdit();
7244
-
7245
- if(self.table.options.dataTree && self.table.modExists("dataTree")){
7246
- self.table.modules.dataTree.checkForRestyle(cell);
7247
- }
7248
7258
  }
7249
7259
  }
7250
7260
 
@@ -7452,7 +7462,7 @@ class Export extends Module{
7452
7462
  switch(range){
7453
7463
  case true:
7454
7464
  case "visible":
7455
- rows = this.table.rowManager.getVisibleRows(true);
7465
+ rows = this.table.rowManager.getVisibleRows(false, true);
7456
7466
  break;
7457
7467
 
7458
7468
  case "all":
@@ -10716,7 +10726,7 @@ class Group{
10716
10726
 
10717
10727
  this.element.classList.add("tabulator-group-visible");
10718
10728
 
10719
- var prev = this.getElement();
10729
+ var prev = this.generateElement();
10720
10730
 
10721
10731
  if(this.groupList.length){
10722
10732
  this.groupList.forEach((group) => {
@@ -10834,7 +10844,11 @@ class Group{
10834
10844
  ////////////// Standard Row Functions //////////////
10835
10845
 
10836
10846
  getElement(){
10837
- this.addBindingsd = false;
10847
+ return this.elementContents ? this.element : this.generateElement();
10848
+ }
10849
+
10850
+ generateElement(){
10851
+ this.addBindings = false;
10838
10852
 
10839
10853
  this._visSet();
10840
10854
 
@@ -13907,13 +13921,10 @@ class Page extends Module{
13907
13921
 
13908
13922
  this.pageSizes = [];
13909
13923
 
13910
- this.dataReceivedNames = {}; //TODO - remove once pagimation update is complete
13911
- this.dataSentNames = {}; //TODO - remove once pagimation update is complete
13912
-
13913
13924
  this.registerTableOption("pagination", false); //set pagination type
13914
13925
  this.registerTableOption("paginationMode", "local"); //local or remote pagination
13915
13926
  this.registerTableOption("paginationSize", false); //set number of rows to a page
13916
- this.registerTableOption("paginationInitialPage", 1); //initail page to show on load
13927
+ this.registerTableOption("paginationInitialPage", 1); //initial page to show on load
13917
13928
  this.registerTableOption("paginationButtonCount", 5); // set count of page button
13918
13929
  this.registerTableOption("paginationSizeSelector", false); //add pagination size selector element
13919
13930
  this.registerTableOption("paginationElement", false); //element to hold pagination numbers
@@ -13962,10 +13973,10 @@ class Page extends Module{
13962
13973
  this.createElements();
13963
13974
  this.initializePaginator();
13964
13975
  }else if(this.table.options.progressiveLoad){
13965
-
13966
13976
  this.subscribe("data-params", this.remotePageParams.bind(this));
13967
13977
  this.subscribe("data-loaded", this._parseRemoteData.bind(this));
13968
13978
  this.subscribe("table-built", this.calculatePageSizes.bind(this));
13979
+ this.subscribe("data-processed", this.initialLoadComplete.bind(this));
13969
13980
 
13970
13981
  this.initializeProgressive(this.table.options.progressiveLoad);
13971
13982
 
@@ -14329,7 +14340,7 @@ class Page extends Module{
14329
14340
  }
14330
14341
  }
14331
14342
 
14332
- //set the maxmum page
14343
+ //set the maximum page
14333
14344
  setMaxPage(max){
14334
14345
 
14335
14346
  max = parseInt(max);
@@ -14583,7 +14594,7 @@ class Page extends Module{
14583
14594
  var data, margin;
14584
14595
 
14585
14596
  if(typeof data.last_page === "undefined"){
14586
- console.warn("Remote Pagination Error - Server response missing '" + this.dataReceivedNames.last_page + "' property");
14597
+ console.warn("Remote Pagination Error - Server response missing '" + (this.options("dataReceiveParams").last_page || "last_page") + "' property");
14587
14598
  }
14588
14599
 
14589
14600
  if(data.data){
@@ -14607,7 +14618,7 @@ class Page extends Module{
14607
14618
  break;
14608
14619
 
14609
14620
  case "progressive_scroll":
14610
- data = this.table.rowManager.getData().concat(data.data);
14621
+ data = this.page === 1 ? data.data : this.table.rowManager.getData().concat(data.data);
14611
14622
 
14612
14623
  this.table.rowManager.setData(data, this.page !== 1, this.page == 1);
14613
14624
 
@@ -14630,7 +14641,7 @@ class Page extends Module{
14630
14641
  }
14631
14642
 
14632
14643
  }else {
14633
- console.warn("Remote Pagination Error - Server response missing '" + this.dataReceivedNames.data + "' property");
14644
+ console.warn("Remote Pagination Error - Server response missing '" + (this.options("dataReceiveParams").data || "data") + "' property");
14634
14645
  }
14635
14646
 
14636
14647
  return data.data;
@@ -16654,9 +16665,7 @@ class SelectRow extends Module{
16654
16665
  this.childRowSelection(row, true);
16655
16666
  }
16656
16667
 
16657
- if(!silent){
16658
- this.dispatchExternal("rowSelected", row.getComponent());
16659
- }
16668
+ this.dispatchExternal("rowSelected", row.getComponent());
16660
16669
 
16661
16670
  this._rowSelectionChanged(silent);
16662
16671
  }
@@ -16675,8 +16684,7 @@ class SelectRow extends Module{
16675
16684
  deselectRows(rows, silent){
16676
16685
  var self = this,
16677
16686
  rowCount;
16678
-
16679
- console.trace("deselect");
16687
+
16680
16688
  if(typeof rows == "undefined"){
16681
16689
 
16682
16690
  rowCount = self.selectedRows.length;
@@ -16728,9 +16736,7 @@ class SelectRow extends Module{
16728
16736
  this.childRowSelection(row, false);
16729
16737
  }
16730
16738
 
16731
- if(!silent){
16732
- this.dispatchExternal("rowDeselected", row.getComponent());
16733
- }
16739
+ this.dispatchExternal("rowDeselected", row.getComponent());
16734
16740
 
16735
16741
  self._rowSelectionChanged(silent);
16736
16742
  }
@@ -17942,7 +17948,7 @@ var defaultOptions = {
17942
17948
  autoColumns:false, //build columns from data row structure
17943
17949
  autoColumnsDefinitions:false,
17944
17950
 
17945
- nestedFieldSeparator:".", //seperatpr for nested data
17951
+ nestedFieldSeparator:".", //separator for nested data
17946
17952
 
17947
17953
  tooltipGenerationMode:"load", //when to generate tooltips
17948
17954
 
@@ -18169,8 +18175,9 @@ class Renderer extends CoreFeature{
18169
18175
  if(!ifVisible){
18170
18176
  if(Helpers.elVisible(rowEl)){
18171
18177
  offset = Helpers.elOffset(rowEl).top - Helpers.elOffset(this.elementVertical).top;
18172
-
18178
+
18173
18179
  if(offset > 0 && offset < this.elementVertical.clientHeight - rowEl.offsetHeight){
18180
+ resolve();
18174
18181
  return false;
18175
18182
  }
18176
18183
  }
@@ -19055,7 +19062,7 @@ class ColumnManager extends CoreFeature {
19055
19062
  return this.columnsByIndex[index];
19056
19063
  }
19057
19064
 
19058
- getFirstVisibileColumn(index){
19065
+ getFirstVisibleColumn(index){
19059
19066
  var index = this.columnsByIndex.findIndex((col) => {
19060
19067
  return col.visible;
19061
19068
  });
@@ -19499,7 +19506,7 @@ class VirtualDomVertical extends Renderer{
19499
19506
 
19500
19507
  element.style.paddingTop = "";
19501
19508
  element.style.paddingBottom = "";
19502
- element.style.minWidth = "";
19509
+ // element.style.minWidth = "";
19503
19510
  element.style.minHeight = "";
19504
19511
  element.style.display = "";
19505
19512
  element.style.visibility = "";
@@ -20787,8 +20794,14 @@ class RowManager extends CoreFeature{
20787
20794
  }
20788
20795
  }
20789
20796
 
20790
- getVisibleRows(viewable){
20791
- return this.renderer.visibleRows(!viewable);
20797
+ getVisibleRows(chain, viewable){
20798
+ var rows = Object.assign([], this.renderer.visibleRows(!viewable));
20799
+
20800
+ if(chain){
20801
+ rows = this.chain("rows-visible", [viewable], rows, rows);
20802
+ }
20803
+
20804
+ return rows;
20792
20805
  }
20793
20806
 
20794
20807
  //repeat action accross display rows
@@ -21152,74 +21165,131 @@ class FooterManager extends CoreFeature{
21152
21165
  }
21153
21166
 
21154
21167
  class InteractionManager extends CoreFeature {
21155
-
21168
+
21156
21169
  constructor (table){
21157
21170
  super(table);
21158
-
21171
+
21159
21172
  this.el = null;
21160
-
21173
+
21161
21174
  this.abortClasses = ["tabulator-headers", "tabulator-table"];
21162
-
21175
+
21163
21176
  this.previousTargets = {};
21164
-
21177
+
21165
21178
  this.listeners = [
21166
- "click",
21167
- "dblclick",
21168
- "contextmenu",
21169
- "mouseenter",
21170
- "mouseleave",
21171
- "mouseover",
21172
- "mouseout",
21173
- "mousemove",
21174
- "touchstart",
21175
- "touchend",
21179
+ "click",
21180
+ "dblclick",
21181
+ "contextmenu",
21182
+ "mouseenter",
21183
+ "mouseleave",
21184
+ "mouseover",
21185
+ "mouseout",
21186
+ "mousemove",
21187
+ "touchstart",
21188
+ "touchend",
21176
21189
  ];
21177
-
21190
+
21178
21191
  this.componentMap = {
21179
21192
  "tabulator-cell":"cell",
21180
21193
  "tabulator-row":"row",
21181
21194
  "tabulator-group":"group",
21182
21195
  "tabulator-col":"column",
21183
21196
  };
21184
- }
21185
21197
 
21198
+ this.pseudoTrackers = {
21199
+ "row":null,
21200
+ "cell":null,
21201
+ "group":null,
21202
+ "column":null,
21203
+ };
21204
+ }
21205
+
21186
21206
  initialize(){
21187
21207
  this.el = this.table.element;
21188
21208
  this.buildListenerMap();
21189
21209
  this.bindSubscriptionWatchers();
21210
+ this.bindPseudoEvents();
21190
21211
  }
21191
-
21212
+
21192
21213
  buildListenerMap(){
21193
21214
  var listenerMap = {};
21194
-
21215
+
21195
21216
  this.listeners.forEach((listener) => {
21196
21217
  listenerMap[listener] = {
21197
21218
  handler:null,
21198
21219
  components:[],
21199
21220
  };
21200
21221
  });
21201
-
21222
+
21202
21223
  this.listeners = listenerMap;
21203
21224
  }
21204
21225
 
21226
+ bindPseudoEvents(){
21227
+ Object.keys(this.pseudoTrackers).forEach((key) => {
21228
+ this.subscribe(key + "-mouseover", this.pseudoMouseEnter.bind(this, key));
21229
+ // this.subscribe(key + "-mouseout", this.pseudoMouseLeave.bind(this, key));
21230
+ });
21231
+ }
21232
+
21233
+ pseudoMouseEnter(key, e, target){
21234
+ if(this.pseudoTrackers[key] !== target){
21235
+
21236
+ if(this.pseudoTrackers[key]){
21237
+ this.dispatch(key + "-mouseleave", e, target);
21238
+ }
21239
+
21240
+ this.pseudoMouseLeave(key, e);
21241
+
21242
+ this.pseudoTrackers[key] = target;
21243
+
21244
+ this.dispatch(key + "-mouseenter", e, target);
21245
+ }
21246
+ }
21247
+
21248
+ pseudoMouseLeave(key, e){
21249
+ var leaveList = Object.keys(this.pseudoTrackers),
21250
+ linkedKeys = {
21251
+ "row":["cell"],
21252
+ "cell":["row"],
21253
+ };
21254
+
21255
+ leaveList = leaveList.filter((item) => {
21256
+ var links = linkedKeys[key];
21257
+ return item !== key && (!links || (links && !links.includes(item)));
21258
+ });
21259
+
21260
+
21261
+ leaveList.forEach((key) => {
21262
+ var target = this.pseudoTrackers[key];
21263
+
21264
+ if(this.pseudoTrackers[key]){
21265
+ this.dispatch(key + "-mouseleave", e, target);
21266
+
21267
+ this.pseudoTrackers[key] = null;
21268
+ }
21269
+ });
21270
+ }
21271
+
21272
+
21205
21273
  bindSubscriptionWatchers(){
21206
21274
  var listeners = Object.keys(this.listeners),
21207
21275
  components = Object.values(this.componentMap);
21208
-
21276
+
21209
21277
  for(let comp of components){
21210
21278
  for(let listener of listeners){
21211
21279
  let key = comp + "-" + listener;
21212
-
21280
+
21213
21281
  this.subscriptionChange(key, this.subscriptionChanged.bind(this, comp, listener));
21214
21282
  }
21215
21283
  }
21284
+
21285
+ this.subscribe("table-destroy", this.clearWatchers.bind(this));
21216
21286
  }
21217
-
21287
+
21218
21288
  subscriptionChanged(component, key, added){
21219
21289
  var listener = this.listeners[key].components,
21220
21290
  index = listener.indexOf(component),
21221
21291
  changed = false;
21222
-
21292
+
21223
21293
  if(added){
21224
21294
  if(index === -1){
21225
21295
  listener.push(component);
@@ -21233,16 +21303,16 @@ class InteractionManager extends CoreFeature {
21233
21303
  }
21234
21304
  }
21235
21305
  }
21236
-
21306
+
21237
21307
  if(changed){
21238
21308
  this.updateEventListeners();
21239
21309
  }
21240
21310
  }
21241
-
21311
+
21242
21312
  updateEventListeners(){
21243
21313
  for(let key in this.listeners){
21244
21314
  let listener = this.listeners[key];
21245
-
21315
+
21246
21316
  if(listener.components.length){
21247
21317
  if(!listener.handler){
21248
21318
  listener.handler = this.track.bind(this, key);
@@ -21257,57 +21327,63 @@ class InteractionManager extends CoreFeature {
21257
21327
  }
21258
21328
  }
21259
21329
  }
21260
-
21330
+
21261
21331
  track(type, e){
21262
21332
  var path = (e.composedPath && e.composedPath()) || e.path;
21333
+
21263
21334
  var targets = this.findTargets(path);
21264
21335
  targets = this.bindComponents(type, targets);
21336
+
21265
21337
  this.triggerEvents(type, e, targets);
21266
- }
21267
21338
 
21339
+ if((type == "mouseover" || type == "mouseleave") && !Object.keys(targets).length){
21340
+ this.pseudoMouseLeave("none", e);
21341
+ }
21342
+ }
21343
+
21268
21344
  findTargets(path){
21269
21345
  var targets = {};
21270
-
21346
+
21271
21347
  let componentMap = Object.keys(this.componentMap);
21272
-
21348
+
21273
21349
  for (let el of path) {
21274
21350
  let classList = el.classList ? [...el.classList] : [];
21275
-
21351
+
21276
21352
  let abort = classList.filter((item) => {
21277
21353
  return this.abortClasses.includes(item);
21278
21354
  });
21279
-
21355
+
21280
21356
  if(abort.length){
21281
21357
  break;
21282
21358
  }
21283
-
21359
+
21284
21360
  let elTargets = classList.filter((item) => {
21285
21361
  return componentMap.includes(item);
21286
21362
  });
21287
-
21363
+
21288
21364
  for (let target of elTargets) {
21289
21365
  targets[this.componentMap[target]] = el;
21290
21366
  }
21291
21367
  }
21292
-
21368
+
21293
21369
  if(targets.group && targets.group === targets.row){
21294
21370
  delete targets.row;
21295
21371
  }
21296
-
21372
+
21297
21373
  return targets;
21298
21374
  }
21299
-
21375
+
21300
21376
  bindComponents(type, targets){
21301
21377
  //ensure row component is looked up before cell
21302
21378
  var keys = Object.keys(targets).reverse(),
21303
21379
  listener = this.listeners[type],
21304
21380
  targetMatches = {};
21305
-
21381
+
21306
21382
  for(let key of keys){
21307
21383
  let component;
21308
21384
  let target = targets[key];
21309
21385
  let previousTarget = this.previousTargets[key];
21310
-
21386
+
21311
21387
  if(previousTarget && previousTarget.target === target){
21312
21388
  component = previousTarget.component;
21313
21389
  }else {
@@ -21315,20 +21391,20 @@ class InteractionManager extends CoreFeature {
21315
21391
  case "row":
21316
21392
  case "group":
21317
21393
  if(listener.components.includes("row") || listener.components.includes("cell")){
21318
- let rows = this.table.rowManager.getVisibleRows();
21319
-
21394
+ let rows = this.table.rowManager.getVisibleRows(true);
21395
+
21320
21396
  component = rows.find((row) => {
21321
21397
  return row.getElement() === target;
21322
21398
  });
21323
21399
  }
21324
21400
  break;
21325
-
21401
+
21326
21402
  case "column":
21327
21403
  if(listener.components.includes("column")){
21328
21404
  component = this.table.columnManager.findColumn(target);
21329
21405
  }
21330
21406
  break
21331
-
21407
+
21332
21408
  case "cell":
21333
21409
  if(listener.components.includes("cell")){
21334
21410
  component = targets["row"].findCell(target);
@@ -21336,7 +21412,7 @@ class InteractionManager extends CoreFeature {
21336
21412
  break;
21337
21413
  }
21338
21414
  }
21339
-
21415
+
21340
21416
  if(component){
21341
21417
  targets[key] = component;
21342
21418
  targetMatches[key] = {
@@ -21345,21 +21421,32 @@ class InteractionManager extends CoreFeature {
21345
21421
  };
21346
21422
  }
21347
21423
  }
21348
-
21424
+
21349
21425
  this.previousTargets = targetMatches;
21350
-
21426
+
21351
21427
  return targets;
21352
21428
  }
21353
-
21429
+
21354
21430
  triggerEvents(type, e, targets){
21355
21431
  var listener = this.listeners[type];
21356
-
21432
+
21357
21433
  for(let key in targets){
21358
21434
  if(targets[key] && listener.components.includes(key)){
21359
21435
  this.dispatch(key + "-" + type, e, targets[key]);
21360
21436
  }
21361
21437
  }
21362
21438
  }
21439
+
21440
+ clearWatchers(){
21441
+ for(let key in this.listeners){
21442
+ let listener = this.listeners[key];
21443
+
21444
+ if(listener.handler){
21445
+ this.el.removeEventListener(key, listener.handler);
21446
+ listener.handler = null;
21447
+ }
21448
+ }
21449
+ }
21363
21450
  }
21364
21451
 
21365
21452
  class ComponentFunctionBinder{
@@ -21465,7 +21552,7 @@ class DataLoader extends CoreFeature{
21465
21552
  }
21466
21553
 
21467
21554
  //get params for request
21468
- var params = this.chain("data-params", [data, config, silent], params || {}, {});
21555
+ params = this.chain("data-params", [data, config, silent], params || {}, params || {});
21469
21556
 
21470
21557
  params = this.mapParams(params, this.table.options.dataSendParams);
21471
21558