tabulator-tables 5.3.2 → 5.3.3
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.
- package/bower.json +1 -1
- package/dist/css/tabulator_bootstrap3.css +1 -1
- package/dist/css/tabulator_bootstrap3.css.map +1 -1
- package/dist/css/tabulator_bootstrap3.min.css +1 -1
- package/dist/css/tabulator_bootstrap3.min.css.map +1 -1
- package/dist/css/tabulator_bootstrap4.css +4 -4
- package/dist/css/tabulator_bootstrap4.css.map +1 -1
- package/dist/css/tabulator_bootstrap4.min.css +1 -1
- package/dist/css/tabulator_bootstrap4.min.css.map +1 -1
- package/dist/css/tabulator_bootstrap5.css +4 -4
- package/dist/css/tabulator_bootstrap5.css.map +1 -1
- package/dist/css/tabulator_bootstrap5.min.css +1 -1
- package/dist/css/tabulator_bootstrap5.min.css.map +1 -1
- package/dist/js/tabulator.js +151 -133
- package/dist/js/tabulator.js.map +1 -1
- package/dist/js/tabulator.min.js +2 -2
- package/dist/js/tabulator.min.js.map +1 -1
- package/dist/js/tabulator_esm.js +297 -283
- package/dist/js/tabulator_esm.js.map +1 -1
- package/dist/js/tabulator_esm.min.js +2 -2
- package/dist/js/tabulator_esm.min.js.map +1 -1
- package/package.json +1 -1
- package/src/js/core/ColumnManager.js +5 -1
- package/src/js/core/Module.js +54 -23
- package/src/js/core/RowManager.js +20 -23
- package/src/js/modules/DataTree/DataTree.js +0 -10
- package/src/js/modules/GroupRows/Group.js +3 -7
- package/src/js/modules/GroupRows/GroupComponent.js +1 -1
- package/src/js/modules/GroupRows/GroupRows.js +200 -199
- package/src/js/modules/Page/Page.js +2 -12
- package/src/js/modules/Persistence/Persistence.js +3 -2
- package/src/js/modules/SelectRow/SelectRow.js +8 -4
- package/src/scss/themes/bootstrap/tabulator_bootstrap3.scss +1 -1
- package/src/scss/themes/bootstrap/tabulator_bootstrap4.scss +1 -1
- package/src/scss/themes/bootstrap/tabulator_bootstrap5.scss +1 -1
package/package.json
CHANGED
|
@@ -286,6 +286,8 @@ export default class ColumnManager extends CoreFeature {
|
|
|
286
286
|
var minHeight = 0;
|
|
287
287
|
|
|
288
288
|
if(!this.redrawBlock){
|
|
289
|
+
|
|
290
|
+
this.element.style.height="";
|
|
289
291
|
|
|
290
292
|
this.columns.forEach((column) => {
|
|
291
293
|
column.clearVerticalAlign();
|
|
@@ -298,7 +300,9 @@ export default class ColumnManager extends CoreFeature {
|
|
|
298
300
|
minHeight = height;
|
|
299
301
|
}
|
|
300
302
|
});
|
|
301
|
-
|
|
303
|
+
|
|
304
|
+
this.element.style.height = minHeight + "px";
|
|
305
|
+
|
|
302
306
|
this.columns.forEach((column) => {
|
|
303
307
|
column.verticalAlign(this.table.options.columnHeaderVertAlign, minHeight);
|
|
304
308
|
});
|
package/src/js/core/Module.js
CHANGED
|
@@ -2,90 +2,121 @@ import CoreFeature from './CoreFeature.js';
|
|
|
2
2
|
import Popup from './tools/Popup.js';
|
|
3
3
|
|
|
4
4
|
class Module extends CoreFeature{
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
constructor(table, name){
|
|
7
7
|
super(table);
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
this._handler = null;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
initialize(){
|
|
13
13
|
// setup module when table is initialized, to be overridden in module
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
|
|
16
|
+
|
|
17
17
|
///////////////////////////////////
|
|
18
18
|
////// Options Registration ///////
|
|
19
19
|
///////////////////////////////////
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
registerTableOption(key, value){
|
|
22
22
|
this.table.optionsList.register(key, value);
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
registerColumnOption(key, value){
|
|
26
26
|
this.table.columnManager.optionsList.register(key, value);
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
///////////////////////////////////
|
|
30
30
|
/// Public Function Registration ///
|
|
31
31
|
///////////////////////////////////
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
registerTableFunction(name, func){
|
|
34
34
|
if(typeof this.table[name] === "undefined"){
|
|
35
35
|
this.table[name] = (...args) => {
|
|
36
36
|
this.table.initGuard(name);
|
|
37
|
-
|
|
37
|
+
|
|
38
38
|
return func(...args);
|
|
39
39
|
};
|
|
40
40
|
}else{
|
|
41
41
|
console.warn("Unable to bind table function, name already in use", name);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
registerComponentFunction(component, func, handler){
|
|
46
46
|
return this.table.componentFunctionBinder.bind(component, func, handler);
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
///////////////////////////////////
|
|
50
50
|
////////// Data Pipeline //////////
|
|
51
51
|
///////////////////////////////////
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
registerDataHandler(handler, priority){
|
|
54
54
|
this.table.rowManager.registerDataPipelineHandler(handler, priority);
|
|
55
55
|
this._handler = handler;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
|
|
58
58
|
registerDisplayHandler(handler, priority){
|
|
59
59
|
this.table.rowManager.registerDisplayPipelineHandler(handler, priority);
|
|
60
60
|
this._handler = handler;
|
|
61
61
|
}
|
|
62
|
+
|
|
63
|
+
displayRows(adjust){
|
|
64
|
+
var index = this.table.rowManager.displayRows.length - 1,
|
|
65
|
+
lookupIndex;
|
|
66
|
+
|
|
67
|
+
if(this._handler){
|
|
68
|
+
lookupIndex = this.table.rowManager.displayPipeline.findIndex((item) => {
|
|
69
|
+
return item.handler === this._handler;
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
if(lookupIndex > -1){
|
|
73
|
+
index = lookupIndex;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if(adjust){
|
|
78
|
+
index = index + adjust;
|
|
79
|
+
}
|
|
62
80
|
|
|
81
|
+
if(this._handler){
|
|
82
|
+
if(index > -1){
|
|
83
|
+
return this.table.rowManager.getDisplayRows(index);
|
|
84
|
+
}else{
|
|
85
|
+
return this.activeRows();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
activeRows(){
|
|
91
|
+
return this.table.rowManager.activeRows;
|
|
92
|
+
}
|
|
93
|
+
|
|
63
94
|
refreshData(renderInPosition, handler){
|
|
64
95
|
if(!handler){
|
|
65
96
|
handler = this._handler;
|
|
66
97
|
}
|
|
67
|
-
|
|
98
|
+
|
|
68
99
|
if(handler){
|
|
69
100
|
this.table.rowManager.refreshActiveData(handler, false, renderInPosition);
|
|
70
101
|
}
|
|
71
102
|
}
|
|
72
|
-
|
|
103
|
+
|
|
73
104
|
///////////////////////////////////
|
|
74
105
|
//////// Footer Management ////////
|
|
75
106
|
///////////////////////////////////
|
|
76
|
-
|
|
107
|
+
|
|
77
108
|
footerAppend(element){
|
|
78
109
|
return this.table.footerManager.append(element);
|
|
79
110
|
}
|
|
80
|
-
|
|
111
|
+
|
|
81
112
|
footerPrepend(element){
|
|
82
113
|
return this.table.footerManager.prepend(element);
|
|
83
114
|
}
|
|
84
|
-
|
|
115
|
+
|
|
85
116
|
footerRemove(element){
|
|
86
117
|
return this.table.footerManager.remove(element);
|
|
87
118
|
}
|
|
88
|
-
|
|
119
|
+
|
|
89
120
|
///////////////////////////////////
|
|
90
121
|
//////// Popups Management ////////
|
|
91
122
|
///////////////////////////////////
|
|
@@ -93,15 +124,15 @@ class Module extends CoreFeature{
|
|
|
93
124
|
popup(menuEl, menuContainer){
|
|
94
125
|
return new Popup(this.table, menuEl, menuContainer);
|
|
95
126
|
}
|
|
96
|
-
|
|
127
|
+
|
|
97
128
|
///////////////////////////////////
|
|
98
129
|
//////// Alert Management ////////
|
|
99
130
|
///////////////////////////////////
|
|
100
|
-
|
|
131
|
+
|
|
101
132
|
alert(content, type){
|
|
102
133
|
return this.table.alertManager.alert(content, type);
|
|
103
134
|
}
|
|
104
|
-
|
|
135
|
+
|
|
105
136
|
clearAlert(){
|
|
106
137
|
return this.table.alertManager.clear();
|
|
107
138
|
}
|
|
@@ -749,10 +749,6 @@ export default class RowManager extends CoreFeature{
|
|
|
749
749
|
this.displayRowsCount = this.displayRows[0].length;
|
|
750
750
|
}
|
|
751
751
|
|
|
752
|
-
getNextDisplayIndex(){
|
|
753
|
-
return this.displayRows.length;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
752
|
//set display row pipeline data
|
|
757
753
|
setDisplayRows(displayRows, index){
|
|
758
754
|
this.displayRows[index] = displayRows;
|
|
@@ -790,23 +786,24 @@ export default class RowManager extends CoreFeature{
|
|
|
790
786
|
|
|
791
787
|
//return only actual rows (not group headers etc)
|
|
792
788
|
getRows(type){
|
|
793
|
-
var rows;
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
break;
|
|
803
|
-
|
|
804
|
-
case "visible":
|
|
805
|
-
rows = this.getVisibleRows(false, true);
|
|
806
|
-
break;
|
|
789
|
+
var rows = [];
|
|
790
|
+
|
|
791
|
+
if(!type){
|
|
792
|
+
rows = this.chain("rows-retrieve", type, null, this.rows) || this.rows;
|
|
793
|
+
}else{
|
|
794
|
+
switch(type){
|
|
795
|
+
case "active":
|
|
796
|
+
rows = this.activeRows;
|
|
797
|
+
break;
|
|
807
798
|
|
|
808
|
-
|
|
809
|
-
|
|
799
|
+
case "display":
|
|
800
|
+
rows = this.table.rowManager.getDisplayRows();
|
|
801
|
+
break;
|
|
802
|
+
|
|
803
|
+
case "visible":
|
|
804
|
+
rows = this.getVisibleRows(false, true);
|
|
805
|
+
break;
|
|
806
|
+
}
|
|
810
807
|
}
|
|
811
808
|
|
|
812
809
|
return rows;
|
|
@@ -915,9 +912,6 @@ export default class RowManager extends CoreFeature{
|
|
|
915
912
|
|
|
916
913
|
this.scrollTop = 0;
|
|
917
914
|
this.scrollLeft = 0;
|
|
918
|
-
|
|
919
|
-
// clear empty table placeholder min
|
|
920
|
-
this.tableElement.style.minWidth = "";
|
|
921
915
|
|
|
922
916
|
this.renderer.clearRows();
|
|
923
917
|
}
|
|
@@ -934,6 +928,9 @@ export default class RowManager extends CoreFeature{
|
|
|
934
928
|
_clearPlaceholder(){
|
|
935
929
|
if(this.placeholder && this.placeholder.parentNode){
|
|
936
930
|
this.placeholder.parentNode.removeChild(this.placeholder);
|
|
931
|
+
|
|
932
|
+
// clear empty table placeholder min
|
|
933
|
+
this.tableElement.style.minWidth = "";
|
|
937
934
|
}
|
|
938
935
|
}
|
|
939
936
|
|
|
@@ -18,8 +18,6 @@ class DataTree extends Module{
|
|
|
18
18
|
|
|
19
19
|
this.startOpen = function(){};
|
|
20
20
|
|
|
21
|
-
this.displayIndex = 0;
|
|
22
|
-
|
|
23
21
|
this.registerTableOption("dataTree", false); //enable data tree
|
|
24
22
|
this.registerTableOption("dataTreeFilter", true); //filter child rows
|
|
25
23
|
this.registerTableOption("dataTreeSort", true); //sort child rows
|
|
@@ -295,14 +293,6 @@ class DataTree extends Module{
|
|
|
295
293
|
}
|
|
296
294
|
}
|
|
297
295
|
|
|
298
|
-
setDisplayIndex (index) {
|
|
299
|
-
this.displayIndex = index;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
getDisplayIndex () {
|
|
303
|
-
return this.displayIndex;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
296
|
getRows(rows){
|
|
307
297
|
var output = [];
|
|
308
298
|
|
|
@@ -379,9 +379,7 @@ class Group{
|
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
-
this.groupManager.
|
|
383
|
-
|
|
384
|
-
this.groupManager.checkBasicModeGroupHeaderWidth();
|
|
382
|
+
this.groupManager.updateGroupRows(true);
|
|
385
383
|
|
|
386
384
|
}else{
|
|
387
385
|
this.groupManager.updateGroupRows(true);
|
|
@@ -419,10 +417,8 @@ class Group{
|
|
|
419
417
|
prev = rowEl;
|
|
420
418
|
});
|
|
421
419
|
}
|
|
422
|
-
|
|
423
|
-
this.groupManager.
|
|
424
|
-
|
|
425
|
-
this.groupManager.checkBasicModeGroupHeaderWidth();
|
|
420
|
+
|
|
421
|
+
this.groupManager.updateGroupRows(true);
|
|
426
422
|
}else{
|
|
427
423
|
this.groupManager.updateGroupRows(true);
|
|
428
424
|
}
|