tabulator-tables 5.3.1 → 5.3.4

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 (40) hide show
  1. package/bower.json +1 -1
  2. package/dist/css/tabulator_bootstrap3.css +1 -1
  3. package/dist/css/tabulator_bootstrap3.css.map +1 -1
  4. package/dist/css/tabulator_bootstrap3.min.css +1 -1
  5. package/dist/css/tabulator_bootstrap3.min.css.map +1 -1
  6. package/dist/css/tabulator_bootstrap4.css +4 -4
  7. package/dist/css/tabulator_bootstrap4.css.map +1 -1
  8. package/dist/css/tabulator_bootstrap4.min.css +1 -1
  9. package/dist/css/tabulator_bootstrap4.min.css.map +1 -1
  10. package/dist/css/tabulator_bootstrap5.css +4 -4
  11. package/dist/css/tabulator_bootstrap5.css.map +1 -1
  12. package/dist/css/tabulator_bootstrap5.min.css +1 -1
  13. package/dist/css/tabulator_bootstrap5.min.css.map +1 -1
  14. package/dist/js/tabulator.js +225 -216
  15. package/dist/js/tabulator.js.map +1 -1
  16. package/dist/js/tabulator.min.js +2 -2
  17. package/dist/js/tabulator.min.js.map +1 -1
  18. package/dist/js/tabulator_esm.js +379 -377
  19. package/dist/js/tabulator_esm.js.map +1 -1
  20. package/dist/js/tabulator_esm.min.js +2 -2
  21. package/dist/js/tabulator_esm.min.js.map +1 -1
  22. package/package.json +1 -1
  23. package/src/js/core/ColumnManager.js +7 -3
  24. package/src/js/core/Module.js +54 -23
  25. package/src/js/core/RowManager.js +81 -94
  26. package/src/js/core/Tabulator.js +2 -2
  27. package/src/js/core/tools/InteractionMonitor.js +9 -8
  28. package/src/js/modules/DataTree/DataTree.js +0 -10
  29. package/src/js/modules/FrozenRows/FrozenRows.js +3 -2
  30. package/src/js/modules/GroupRows/Group.js +3 -7
  31. package/src/js/modules/GroupRows/GroupComponent.js +1 -1
  32. package/src/js/modules/GroupRows/GroupRows.js +200 -200
  33. package/src/js/modules/Interaction/Interaction.js +1 -1
  34. package/src/js/modules/Page/Page.js +2 -12
  35. package/src/js/modules/Persistence/Persistence.js +3 -2
  36. package/src/js/modules/SelectRow/SelectRow.js +8 -4
  37. package/src/js/modules/Sort/Sort.js +4 -7
  38. package/src/scss/themes/bootstrap/tabulator_bootstrap3.scss +1 -1
  39. package/src/scss/themes/bootstrap/tabulator_bootstrap4.scss +1 -1
  40. package/src/scss/themes/bootstrap/tabulator_bootstrap5.scss +1 -1
@@ -128,7 +128,7 @@ class Interaction extends Module{
128
128
  var range;
129
129
 
130
130
  if(this.table.modExists("edit")){
131
- if (this.table.modules.edit.currentCell === this){
131
+ if (this.table.modules.edit.currentCell === cell){
132
132
  return; //prevent instant selection of editor content
133
133
  }
134
134
  }
@@ -21,8 +21,6 @@ class Page extends Module{
21
21
 
22
22
  this.remoteRowCountEstimate = null;
23
23
 
24
- this.displayIndex = 0; //index in display pipeline
25
-
26
24
  this.initialLoad = true;
27
25
  this.dataChanging = false; //flag to check if data is being changed by this module
28
26
 
@@ -470,14 +468,6 @@ class Page extends Module{
470
468
  this.dispatch("page-changed");
471
469
  }
472
470
 
473
- setDisplayIndex(index){
474
- this.displayIndex = index;
475
- }
476
-
477
- getDisplayIndex(){
478
- return this.displayIndex;
479
- }
480
-
481
471
  //calculate maximum page from number of rows
482
472
  setMaxRows(rowCount){
483
473
  if(!rowCount){
@@ -544,9 +534,9 @@ class Page extends Module{
544
534
  }
545
535
 
546
536
  setPageToRow(row){
547
- var rows = this.table.rowManager.getDisplayRows(this.displayIndex - 1);
537
+ var rows = this.displayRows(-1);
548
538
  var index = rows.indexOf(row);
549
-
539
+
550
540
  if(index > -1){
551
541
  var page = this.size === true ? 1 : Math.ceil((index + 1) / this.size);
552
542
 
@@ -211,9 +211,10 @@ class Persistence extends Module{
211
211
  keys.forEach((key)=>{
212
212
  var props = Object.getOwnPropertyDescriptor(def, key);
213
213
  var value = def[key];
214
+
214
215
  if(props){
215
216
  Object.defineProperty(def, key, {
216
- set: function(newValue){
217
+ set: (newValue) => {
217
218
  value = newValue;
218
219
 
219
220
  if(!this.defWatcherBlock){
@@ -224,7 +225,7 @@ class Persistence extends Module{
224
225
  props.set(newValue);
225
226
  }
226
227
  },
227
- get:function(){
228
+ get:() => {
228
229
  if(props.get){
229
230
  props.get();
230
231
  }
@@ -216,18 +216,22 @@ class SelectRow extends Module{
216
216
  break;
217
217
 
218
218
  case "string":
219
-
220
219
  rowMatch = this.table.rowManager.findRow(rows);
221
220
 
222
221
  if(rowMatch){
223
222
  this._selectRow(rowMatch, true, true);
223
+ this._rowSelectionChanged();
224
224
  }else{
225
- this.table.rowManager.getRows(rows).forEach((row) => {
225
+ rowMatch = this.table.rowManager.getRows(rows);
226
+
227
+ rowMatch.forEach((row) => {
226
228
  this._selectRow(row, true, true);
227
229
  });
230
+
231
+ if(rowMatch.length){
232
+ this._rowSelectionChanged();
233
+ }
228
234
  }
229
-
230
- this._rowSelectionChanged();
231
235
  break;
232
236
 
233
237
  default:
@@ -169,7 +169,6 @@ class Sort extends Module{
169
169
  }
170
170
  }
171
171
 
172
-
173
172
  if (this.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) {
174
173
  sorters = this.getSort();
175
174
 
@@ -180,11 +179,9 @@ class Sort extends Module{
180
179
  if(match > -1){
181
180
  sorters[match].dir = dir;
182
181
 
183
- if(match != sorters.length -1){
184
- match = sorters.splice(match, 1)[0];
185
- if(dir != "none"){
186
- sorters.push(match);
187
- }
182
+ match = sorters.splice(match, 1)[0];
183
+ if(dir != "none"){
184
+ sorters.push(match);
188
185
  }
189
186
  }else{
190
187
  if(dir != "none"){
@@ -399,7 +396,7 @@ class Sort extends Module{
399
396
  var sortEl = column.modules.sort.element,
400
397
  arrowEl;
401
398
 
402
- if(typeof this.table.options.headerSortElement === "function"){
399
+ if(column.definition.headerSort && typeof this.table.options.headerSortElement === "function"){
403
400
  while(sortEl.firstChild) sortEl.removeChild(sortEl.firstChild);
404
401
 
405
402
  arrowEl = this.table.options.headerSortElement.call(this.table, column.getComponent(), dir);
@@ -99,7 +99,7 @@ $footerActiveColor:#d00 !default; //footer bottom active text color
99
99
 
100
100
  &.table-striped{
101
101
  .tabulator-row{
102
- &:nth-child(even){
102
+ &.tabulator-row-even{
103
103
  background-color: $rowAltBackgroundColor;
104
104
  }
105
105
  }
@@ -234,7 +234,7 @@ $table-cell-padding-sm: 5px;
234
234
  &.table-striped{
235
235
  &:not(.table-dark){
236
236
  .tabulator-row{
237
- &:nth-child(even){
237
+ &.tabulator-row-even{
238
238
  background-color: $rowAltBackgroundColor;
239
239
 
240
240
  &.tabulator-selected{
@@ -235,7 +235,7 @@ $table-cell-padding-sm: 5px;
235
235
  &.table-striped{
236
236
  &:not(.table){
237
237
  .tabulator-row{
238
- &:nth-child(even){
238
+ &.tabulator-row-even{
239
239
  background-color: $rowAltBackgroundColor;
240
240
 
241
241
  &.tabulator-selected{