tabulator-tables 5.1.3 → 5.1.6
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/js/tabulator.js +314 -155
- 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 +344 -235
- 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/FooterManager.js +1 -1
- package/src/js/core/Tabulator.js +1 -1
- package/src/js/core/rendering/renderers/VirtualDomHorizontal.js +189 -111
- package/src/js/core/row/Row.js +2 -2
- package/src/js/core/tools/InteractionMonitor.js +1 -1
- package/src/js/modules/Export/Export.js +3 -3
- package/src/js/modules/Filter/Filter.js +3 -1
- package/src/js/modules/Format/defaults/formatters/rowSelection.js +2 -1
- package/src/js/modules/FrozenColumns/FrozenColumns.js +87 -83
- package/src/js/modules/Menu/Menu.js +3 -5
- package/src/js/modules/Page/Page.js +28 -13
- package/src/js/modules/Page/defaults/pageCounters/rows.js +21 -13
- package/src/js/modules/SelectRow/SelectRow.js +3 -1
package/dist/js/tabulator_esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Tabulator v5.1.
|
|
1
|
+
/* Tabulator v5.1.6 (c) Oliver Folkerd 2022 */
|
|
2
2
|
class CoreFeature{
|
|
3
3
|
|
|
4
4
|
constructor(table){
|
|
@@ -2847,6 +2847,8 @@ class Row extends CoreFeature{
|
|
|
2847
2847
|
|
|
2848
2848
|
this.generateCells();
|
|
2849
2849
|
|
|
2850
|
+
this.initialized = true;
|
|
2851
|
+
|
|
2850
2852
|
this.table.columnManager.renderer.renderRowCells(this);
|
|
2851
2853
|
|
|
2852
2854
|
if(force){
|
|
@@ -2855,8 +2857,6 @@ class Row extends CoreFeature{
|
|
|
2855
2857
|
|
|
2856
2858
|
this.dispatch("row-layout", this);
|
|
2857
2859
|
|
|
2858
|
-
this.initialized = true;
|
|
2859
|
-
|
|
2860
2860
|
if(this.table.options.rowFormatter){
|
|
2861
2861
|
this.table.options.rowFormatter(this.getComponent());
|
|
2862
2862
|
}
|
|
@@ -7906,10 +7906,10 @@ class Export extends Module{
|
|
|
7906
7906
|
rowEl.classList.add("tabulator-print-table-row");
|
|
7907
7907
|
|
|
7908
7908
|
row.columns.forEach((col) => {
|
|
7909
|
-
|
|
7910
7909
|
if(col){
|
|
7911
7910
|
var cellEl = document.createElement("td"),
|
|
7912
7911
|
column = col.component._column,
|
|
7912
|
+
index = this.table.columnManager.findColumnIndex(column),
|
|
7913
7913
|
value = col.value;
|
|
7914
7914
|
|
|
7915
7915
|
var cellWrapper = {
|
|
@@ -7968,8 +7968,8 @@ class Export extends Module{
|
|
|
7968
7968
|
cellEl.innerHTML = value;
|
|
7969
7969
|
}
|
|
7970
7970
|
|
|
7971
|
-
if(styles.firstCell){
|
|
7972
|
-
this.mapElementStyles(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"]);
|
|
7971
|
+
if(styles.styleCells[index] || styles.firstCell){
|
|
7972
|
+
this.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"]);
|
|
7973
7973
|
|
|
7974
7974
|
if(column.definition.align){
|
|
7975
7975
|
cellEl.style.textAlign = column.definition.align;
|
|
@@ -8572,7 +8572,9 @@ class Filter extends Module{
|
|
|
8572
8572
|
editorElement.addEventListener("focus", (e) => {
|
|
8573
8573
|
var left = this.table.columnManager.element.scrollLeft;
|
|
8574
8574
|
|
|
8575
|
-
|
|
8575
|
+
var headerPos = this.table.rowManager.element.scrollLeft + parseInt(this.table.columnManager.element.style.marginLeft);
|
|
8576
|
+
|
|
8577
|
+
if(left !== headerPos){
|
|
8576
8578
|
this.table.rowManager.scrollHorizontal(left);
|
|
8577
8579
|
this.table.columnManager.scrollHorizontal(left);
|
|
8578
8580
|
}
|
|
@@ -9582,8 +9584,9 @@ function rowSelection(cell, formatterParams, onRendered){
|
|
|
9582
9584
|
var blocked = false;
|
|
9583
9585
|
|
|
9584
9586
|
checkbox.type = 'checkbox';
|
|
9585
|
-
|
|
9586
9587
|
|
|
9588
|
+
checkbox.setAttribute("aria-label", "Select Row");
|
|
9589
|
+
|
|
9587
9590
|
if(this.table.modExists("selectRow", true)){
|
|
9588
9591
|
|
|
9589
9592
|
checkbox.addEventListener("click", (e) => {
|
|
@@ -9863,10 +9866,10 @@ Format.moduleName = "format";
|
|
|
9863
9866
|
Format.formatters = defaultFormatters;
|
|
9864
9867
|
|
|
9865
9868
|
class FrozenColumns extends Module{
|
|
9866
|
-
|
|
9869
|
+
|
|
9867
9870
|
constructor(table){
|
|
9868
9871
|
super(table);
|
|
9869
|
-
|
|
9872
|
+
|
|
9870
9873
|
this.leftColumns = [];
|
|
9871
9874
|
this.rightColumns = [];
|
|
9872
9875
|
this.leftMargin = 0;
|
|
@@ -9876,10 +9879,10 @@ class FrozenColumns extends Module{
|
|
|
9876
9879
|
this.active = false;
|
|
9877
9880
|
this.scrollEndTimer = false;
|
|
9878
9881
|
this.blocked = true;
|
|
9879
|
-
|
|
9882
|
+
|
|
9880
9883
|
this.registerColumnOption("frozen");
|
|
9881
9884
|
}
|
|
9882
|
-
|
|
9885
|
+
|
|
9883
9886
|
//reset initial state
|
|
9884
9887
|
reset(){
|
|
9885
9888
|
this.initializationMode = "left";
|
|
@@ -9889,11 +9892,11 @@ class FrozenColumns extends Module{
|
|
|
9889
9892
|
this.rightMargin = 0;
|
|
9890
9893
|
this.rightMargin = 0;
|
|
9891
9894
|
this.active = false;
|
|
9892
|
-
|
|
9895
|
+
|
|
9893
9896
|
this.table.columnManager.headersElement.style.marginLeft = 0;
|
|
9894
9897
|
this.table.columnManager.element.style.paddingRight = 0;
|
|
9895
9898
|
}
|
|
9896
|
-
|
|
9899
|
+
|
|
9897
9900
|
initialize(){
|
|
9898
9901
|
this.subscribe("cell-layout", this.layoutCell.bind(this));
|
|
9899
9902
|
this.subscribe("column-init", this.initializeColumn.bind(this));
|
|
@@ -9906,183 +9909,191 @@ class FrozenColumns extends Module{
|
|
|
9906
9909
|
this.subscribe("layout-refreshing", this.blockLayout.bind(this));
|
|
9907
9910
|
this.subscribe("layout-refreshed", this.unblockLayout.bind(this));
|
|
9908
9911
|
}
|
|
9909
|
-
|
|
9912
|
+
|
|
9910
9913
|
blockLayout(){
|
|
9911
9914
|
this.blocked = true;
|
|
9912
9915
|
}
|
|
9913
|
-
|
|
9916
|
+
|
|
9914
9917
|
unblockLayout(){
|
|
9915
9918
|
this.blocked = false;
|
|
9916
9919
|
}
|
|
9917
|
-
|
|
9920
|
+
|
|
9918
9921
|
layoutCell(cell){
|
|
9919
9922
|
this.layoutElement(cell.element, cell.column);
|
|
9920
9923
|
}
|
|
9921
|
-
|
|
9924
|
+
|
|
9922
9925
|
//initialize specific column
|
|
9923
9926
|
initializeColumn(column){
|
|
9924
9927
|
var config = {margin:0, edge:false};
|
|
9925
|
-
|
|
9928
|
+
|
|
9926
9929
|
if(!column.isGroup){
|
|
9927
|
-
|
|
9930
|
+
|
|
9928
9931
|
if(this.frozenCheck(column)){
|
|
9929
|
-
|
|
9932
|
+
|
|
9930
9933
|
config.position = this.initializationMode;
|
|
9931
|
-
|
|
9934
|
+
|
|
9932
9935
|
if(this.initializationMode == "left"){
|
|
9933
9936
|
this.leftColumns.push(column);
|
|
9934
9937
|
}else {
|
|
9935
9938
|
this.rightColumns.unshift(column);
|
|
9936
9939
|
}
|
|
9937
|
-
|
|
9940
|
+
|
|
9938
9941
|
this.active = true;
|
|
9939
|
-
|
|
9942
|
+
|
|
9940
9943
|
column.modules.frozen = config;
|
|
9941
9944
|
}else {
|
|
9942
9945
|
this.initializationMode = "right";
|
|
9943
9946
|
}
|
|
9944
9947
|
}
|
|
9945
9948
|
}
|
|
9946
|
-
|
|
9949
|
+
|
|
9947
9950
|
frozenCheck(column){
|
|
9948
|
-
|
|
9951
|
+
|
|
9949
9952
|
if(column.parent.isGroup && column.definition.frozen){
|
|
9950
9953
|
console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups");
|
|
9951
9954
|
}
|
|
9952
|
-
|
|
9955
|
+
|
|
9953
9956
|
if(column.parent.isGroup){
|
|
9954
9957
|
return this.frozenCheck(column.parent);
|
|
9955
9958
|
}else {
|
|
9956
9959
|
return column.definition.frozen;
|
|
9957
9960
|
}
|
|
9958
9961
|
}
|
|
9959
|
-
|
|
9962
|
+
|
|
9960
9963
|
//quick layout to smooth horizontal scrolling
|
|
9961
9964
|
scrollHorizontal(){
|
|
9962
9965
|
var rows;
|
|
9963
|
-
|
|
9966
|
+
|
|
9964
9967
|
if(this.active){
|
|
9965
9968
|
clearTimeout(this.scrollEndTimer);
|
|
9966
9969
|
|
|
9967
|
-
//layout all rows after scroll is complete
|
|
9968
|
-
this.scrollEndTimer = setTimeout(() => {
|
|
9969
|
-
this.layout();
|
|
9970
|
-
}, 100);
|
|
9971
|
-
|
|
9972
9970
|
rows = this.table.rowManager.getVisibleRows();
|
|
9973
|
-
|
|
9974
|
-
this.calcMargins();
|
|
9975
|
-
|
|
9971
|
+
|
|
9972
|
+
this.calcMargins(true);
|
|
9973
|
+
|
|
9976
9974
|
this.layoutColumnPosition();
|
|
9977
|
-
|
|
9975
|
+
|
|
9978
9976
|
this.layoutCalcRows();
|
|
9979
|
-
|
|
9977
|
+
|
|
9980
9978
|
rows.forEach((row) => {
|
|
9981
9979
|
if(row.type === "row"){
|
|
9982
9980
|
this.layoutRow(row);
|
|
9983
9981
|
}
|
|
9984
9982
|
});
|
|
9985
|
-
|
|
9986
|
-
this.table.rowManager.tableElement.style.marginRight = this.rightMargin;
|
|
9987
9983
|
}
|
|
9988
9984
|
}
|
|
9989
|
-
|
|
9985
|
+
|
|
9990
9986
|
//calculate margins for rows
|
|
9991
|
-
calcMargins(){
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
9987
|
+
calcMargins(scroll){
|
|
9988
|
+
|
|
9989
|
+
if(!scroll){
|
|
9990
|
+
this.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + "px";
|
|
9991
|
+
this.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + "px";
|
|
9992
|
+
this.table.rowManager.tableElement.style.marginRight = this.rightMargin;
|
|
9993
|
+
}
|
|
9994
|
+
|
|
9998
9995
|
//calculate right frozen columns
|
|
9999
9996
|
this.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft;
|
|
10000
9997
|
}
|
|
10001
|
-
|
|
9998
|
+
|
|
10002
9999
|
//layout calculation rows
|
|
10003
10000
|
layoutCalcRows(){
|
|
10004
10001
|
if(this.table.modExists("columnCalcs")){
|
|
10005
10002
|
if(this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow){
|
|
10006
10003
|
this.layoutRow(this.table.modules.columnCalcs.topRow);
|
|
10007
10004
|
}
|
|
10008
|
-
|
|
10005
|
+
|
|
10009
10006
|
if(this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow){
|
|
10010
10007
|
this.layoutRow(this.table.modules.columnCalcs.botRow);
|
|
10011
10008
|
}
|
|
10012
|
-
|
|
10009
|
+
|
|
10013
10010
|
if(this.table.modExists("groupRows")){
|
|
10014
10011
|
this.layoutGroupCalcs(this.table.modules.groupRows.getGroups());
|
|
10015
10012
|
}
|
|
10016
10013
|
}
|
|
10017
10014
|
}
|
|
10018
|
-
|
|
10015
|
+
|
|
10019
10016
|
layoutGroupCalcs(groups){
|
|
10020
10017
|
groups.forEach((group) => {
|
|
10021
10018
|
if(group.calcs.top){
|
|
10022
10019
|
this.layoutRow(group.calcs.top);
|
|
10023
10020
|
}
|
|
10024
|
-
|
|
10021
|
+
|
|
10025
10022
|
if(group.calcs.bottom){
|
|
10026
10023
|
this.layoutRow(group.calcs.bottom);
|
|
10027
10024
|
}
|
|
10028
|
-
|
|
10025
|
+
|
|
10029
10026
|
if(group.groupList && group.groupList.length){
|
|
10030
10027
|
this.layoutGroupCalcs(group.groupList && group.groupList);
|
|
10031
10028
|
}
|
|
10032
10029
|
});
|
|
10033
10030
|
}
|
|
10034
|
-
|
|
10031
|
+
|
|
10035
10032
|
//calculate column positions and layout headers
|
|
10036
10033
|
layoutColumnPosition(allCells){
|
|
10037
|
-
|
|
10038
10034
|
var leftParents = [];
|
|
10035
|
+
|
|
10036
|
+
var leftMargin = 0;
|
|
10037
|
+
var rightMargin = 0;
|
|
10038
|
+
|
|
10039
|
+
this.table.columnManager.headersElement.style.marginLeft = this.leftMargin;
|
|
10040
|
+
this.table.columnManager.element.style.paddingRight = this.rightMargin;
|
|
10039
10041
|
|
|
10040
|
-
this.leftColumns.forEach((column, i) => {
|
|
10041
|
-
column.modules.frozen.margin = (
|
|
10042
|
+
this.leftColumns.forEach((column, i) => {
|
|
10043
|
+
column.modules.frozen.margin = (leftMargin + this.table.columnManager.scrollLeft) + "px";
|
|
10042
10044
|
|
|
10045
|
+
if(column.visible){
|
|
10046
|
+
leftMargin += column.getWidth();
|
|
10047
|
+
}
|
|
10048
|
+
|
|
10043
10049
|
if(i == this.leftColumns.length - 1){
|
|
10044
10050
|
column.modules.frozen.edge = true;
|
|
10045
10051
|
}else {
|
|
10046
10052
|
column.modules.frozen.edge = false;
|
|
10047
10053
|
}
|
|
10048
|
-
|
|
10054
|
+
|
|
10049
10055
|
if(column.parent.isGroup){
|
|
10050
10056
|
var parentEl = this.getColGroupParentElement(column);
|
|
10051
10057
|
if(!leftParents.includes(parentEl)){
|
|
10052
10058
|
this.layoutElement(parentEl, column);
|
|
10053
10059
|
leftParents.push(parentEl);
|
|
10054
10060
|
}
|
|
10055
|
-
|
|
10061
|
+
|
|
10056
10062
|
if(column.modules.frozen.edge){
|
|
10057
10063
|
parentEl.classList.add("tabulator-frozen-" + column.modules.frozen.position);
|
|
10058
10064
|
}
|
|
10059
10065
|
}else {
|
|
10060
10066
|
this.layoutElement(column.getElement(), column);
|
|
10061
10067
|
}
|
|
10062
|
-
|
|
10068
|
+
|
|
10063
10069
|
if(allCells){
|
|
10064
10070
|
column.cells.forEach((cell) => {
|
|
10065
10071
|
this.layoutElement(cell.getElement(true), column);
|
|
10066
10072
|
});
|
|
10067
10073
|
}
|
|
10068
10074
|
});
|
|
10069
|
-
|
|
10075
|
+
|
|
10070
10076
|
this.rightColumns.forEach((column, i) => {
|
|
10071
|
-
column.modules.frozen.margin = (this.rightPadding - this._calcSpace(this.rightColumns, i + 1)) + "px";
|
|
10072
10077
|
|
|
10078
|
+
if(column.visible){
|
|
10079
|
+
rightMargin += column.getWidth();
|
|
10080
|
+
}
|
|
10081
|
+
|
|
10082
|
+
column.modules.frozen.margin = (this.rightPadding - rightMargin) + "px";
|
|
10083
|
+
|
|
10073
10084
|
if(i == this.rightColumns.length - 1){
|
|
10074
10085
|
column.modules.frozen.edge = true;
|
|
10075
10086
|
}else {
|
|
10076
10087
|
column.modules.frozen.edge = false;
|
|
10077
10088
|
}
|
|
10078
|
-
|
|
10079
|
-
|
|
10089
|
+
|
|
10090
|
+
|
|
10080
10091
|
if(column.parent.isGroup){
|
|
10081
10092
|
this.layoutElement(this.getColGroupParentElement(column), column);
|
|
10082
10093
|
}else {
|
|
10083
10094
|
this.layoutElement(column.getElement(), column);
|
|
10084
10095
|
}
|
|
10085
|
-
|
|
10096
|
+
|
|
10086
10097
|
if(allCells){
|
|
10087
10098
|
column.cells.forEach((cell) => {
|
|
10088
10099
|
this.layoutElement(cell.getElement(true), column);
|
|
@@ -10090,82 +10101,79 @@ class FrozenColumns extends Module{
|
|
|
10090
10101
|
}
|
|
10091
10102
|
});
|
|
10092
10103
|
}
|
|
10093
|
-
|
|
10104
|
+
|
|
10094
10105
|
getColGroupParentElement(column){
|
|
10095
10106
|
return column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement();
|
|
10096
10107
|
}
|
|
10097
|
-
|
|
10108
|
+
|
|
10098
10109
|
//layout columns appropriately
|
|
10099
10110
|
layout(){
|
|
10100
|
-
|
|
10101
10111
|
if(this.active && !this.blocked){
|
|
10102
10112
|
//calculate row padding
|
|
10103
10113
|
this.calcMargins();
|
|
10104
|
-
|
|
10114
|
+
|
|
10105
10115
|
this.table.rowManager.getDisplayRows().forEach((row) =>{
|
|
10106
10116
|
if(row.type === "row"){
|
|
10107
10117
|
this.layoutRow(row);
|
|
10108
10118
|
}
|
|
10109
10119
|
});
|
|
10110
|
-
|
|
10120
|
+
|
|
10111
10121
|
this.layoutCalcRows();
|
|
10112
|
-
|
|
10122
|
+
|
|
10113
10123
|
//calculate left columns
|
|
10114
10124
|
this.layoutColumnPosition(true);
|
|
10115
|
-
|
|
10116
|
-
this.table.rowManager.tableElement.style.marginRight = this.rightMargin;
|
|
10117
10125
|
}
|
|
10118
10126
|
}
|
|
10119
|
-
|
|
10127
|
+
|
|
10120
10128
|
layoutRow(row){
|
|
10121
10129
|
var rowEl = row.getElement();
|
|
10122
|
-
|
|
10130
|
+
|
|
10123
10131
|
rowEl.style.paddingLeft = this.leftMargin;
|
|
10124
|
-
|
|
10132
|
+
|
|
10125
10133
|
if(this.table.options.layout === "fitDataFill" && this.rightColumns.length){
|
|
10126
10134
|
this.table.rowManager.getTableElement().style.minWidth = "calc(100% - " + this.rightMargin + ")";
|
|
10127
10135
|
}
|
|
10128
|
-
|
|
10136
|
+
|
|
10129
10137
|
this.leftColumns.forEach((column) => {
|
|
10130
10138
|
var cell = row.getCell(column);
|
|
10131
|
-
|
|
10139
|
+
|
|
10132
10140
|
if(cell){
|
|
10133
10141
|
this.layoutElement(cell.getElement(true), column);
|
|
10134
10142
|
}
|
|
10135
10143
|
});
|
|
10136
|
-
|
|
10144
|
+
|
|
10137
10145
|
this.rightColumns.forEach((column) => {
|
|
10138
10146
|
var cell = row.getCell(column);
|
|
10139
|
-
|
|
10147
|
+
|
|
10140
10148
|
if(cell){
|
|
10141
10149
|
this.layoutElement(cell.getElement(true), column);
|
|
10142
10150
|
}
|
|
10143
10151
|
});
|
|
10144
10152
|
}
|
|
10145
|
-
|
|
10153
|
+
|
|
10146
10154
|
layoutElement(element, column){
|
|
10147
|
-
|
|
10155
|
+
|
|
10148
10156
|
if(column.modules.frozen){
|
|
10149
10157
|
element.style.position = "absolute";
|
|
10150
10158
|
element.style.left = column.modules.frozen.margin;
|
|
10151
|
-
|
|
10159
|
+
|
|
10152
10160
|
element.classList.add("tabulator-frozen");
|
|
10153
|
-
|
|
10161
|
+
|
|
10154
10162
|
if(column.modules.frozen.edge){
|
|
10155
10163
|
element.classList.add("tabulator-frozen-" + column.modules.frozen.position);
|
|
10156
10164
|
}
|
|
10157
10165
|
}
|
|
10158
10166
|
}
|
|
10159
|
-
|
|
10167
|
+
|
|
10160
10168
|
_calcSpace(columns, index){
|
|
10161
10169
|
var width = 0;
|
|
10162
|
-
|
|
10170
|
+
|
|
10163
10171
|
for (let i = 0; i < index; i++){
|
|
10164
10172
|
if(columns[i].visible){
|
|
10165
10173
|
width += columns[i].getWidth();
|
|
10166
10174
|
}
|
|
10167
10175
|
}
|
|
10168
|
-
|
|
10176
|
+
|
|
10169
10177
|
return width;
|
|
10170
10178
|
}
|
|
10171
10179
|
}
|
|
@@ -13139,13 +13147,11 @@ class Menu extends Module{
|
|
|
13139
13147
|
}
|
|
13140
13148
|
|
|
13141
13149
|
//move menu to start on bottom edge if it is too close to the edge of the screen
|
|
13142
|
-
if((y + element.offsetHeight)
|
|
13143
|
-
element.style.top = "";
|
|
13144
|
-
|
|
13150
|
+
if((y + element.offsetHeight) > this.menuContainer.offsetHeight) {
|
|
13145
13151
|
if(parentEl){
|
|
13146
|
-
element.style.
|
|
13152
|
+
element.style.top = (parseInt(element.style.top) - element.offsetHeight + parentEl.offsetHeight + 1) + "px";
|
|
13147
13153
|
}else {
|
|
13148
|
-
element.style.
|
|
13154
|
+
element.style.top = (parseInt(element.style.top) - element.offsetHeight) + "px";
|
|
13149
13155
|
}
|
|
13150
13156
|
}
|
|
13151
13157
|
}
|
|
@@ -14253,28 +14259,36 @@ function rows(pageSize, currentRow, currentPage, totalRows, totalPages){
|
|
|
14253
14259
|
ofEl = document.createElement("span"),
|
|
14254
14260
|
totalEl = document.createElement("span"),
|
|
14255
14261
|
rowsEl = document.createElement("span");
|
|
14256
|
-
|
|
14262
|
+
|
|
14257
14263
|
this.table.modules.localize.langBind("pagination|counter|showing", (value) => {
|
|
14258
14264
|
showingEl.innerHTML = value;
|
|
14259
14265
|
});
|
|
14260
|
-
|
|
14261
|
-
valueEl.innerHTML = " " + currentRow + "-" + Math.min((currentRow + pageSize - 1), totalRows) + " ";
|
|
14262
|
-
|
|
14266
|
+
|
|
14263
14267
|
this.table.modules.localize.langBind("pagination|counter|of", (value) => {
|
|
14264
14268
|
ofEl.innerHTML = value;
|
|
14265
14269
|
});
|
|
14266
|
-
|
|
14267
|
-
totalEl.innerHTML = " " + totalRows + " ";
|
|
14268
|
-
|
|
14270
|
+
|
|
14269
14271
|
this.table.modules.localize.langBind("pagination|counter|rows", (value) => {
|
|
14270
14272
|
rowsEl.innerHTML = value;
|
|
14271
14273
|
});
|
|
14272
|
-
|
|
14273
|
-
|
|
14274
|
-
|
|
14275
|
-
|
|
14276
|
-
|
|
14277
|
-
|
|
14274
|
+
|
|
14275
|
+
if(totalRows){
|
|
14276
|
+
valueEl.innerHTML = " " + currentRow + "-" + Math.min((currentRow + pageSize - 1), totalRows) + " ";
|
|
14277
|
+
|
|
14278
|
+
totalEl.innerHTML = " " + totalRows + " ";
|
|
14279
|
+
|
|
14280
|
+
el.appendChild(showingEl);
|
|
14281
|
+
el.appendChild(valueEl);
|
|
14282
|
+
el.appendChild(ofEl);
|
|
14283
|
+
el.appendChild(totalEl);
|
|
14284
|
+
el.appendChild(rowsEl);
|
|
14285
|
+
}else {
|
|
14286
|
+
valueEl.innerHTML = " 0 ";
|
|
14287
|
+
|
|
14288
|
+
el.appendChild(showingEl);
|
|
14289
|
+
el.appendChild(valueEl);
|
|
14290
|
+
el.appendChild(rowsEl);
|
|
14291
|
+
}
|
|
14278
14292
|
|
|
14279
14293
|
return el;
|
|
14280
14294
|
}
|
|
@@ -14885,17 +14899,18 @@ class Page extends Module{
|
|
|
14885
14899
|
this.trackChanges();
|
|
14886
14900
|
}
|
|
14887
14901
|
|
|
14888
|
-
_setPageCounter(totalRows){
|
|
14889
|
-
var content
|
|
14902
|
+
_setPageCounter(totalRows, size, currentRow){
|
|
14903
|
+
var content;
|
|
14890
14904
|
|
|
14891
14905
|
if(this.pageCounter){
|
|
14892
|
-
currentRow = ((this.page - 1) * this.size) + 1;
|
|
14893
14906
|
|
|
14894
14907
|
if(this.mode === "remote"){
|
|
14908
|
+
size = this.size;
|
|
14909
|
+
currentRow = ((this.page - 1) * this.size) + 1;
|
|
14895
14910
|
totalRows = this.remoteRowCountEstimate;
|
|
14896
14911
|
}
|
|
14897
14912
|
|
|
14898
|
-
content = this.pageCounter.call(this,
|
|
14913
|
+
content = this.pageCounter.call(this, size, currentRow, this.page, totalRows, this.max);
|
|
14899
14914
|
|
|
14900
14915
|
switch(typeof content){
|
|
14901
14916
|
case "object":
|
|
@@ -15035,7 +15050,12 @@ class Page extends Module{
|
|
|
15035
15050
|
|
|
15036
15051
|
//return appropriate rows for current page
|
|
15037
15052
|
getRows(data){
|
|
15038
|
-
var
|
|
15053
|
+
var actualRowPageSize = 0,
|
|
15054
|
+
output, start, end, actualStartRow;
|
|
15055
|
+
|
|
15056
|
+
var actualRows = data.filter((row) => {
|
|
15057
|
+
return row.type === "row";
|
|
15058
|
+
});
|
|
15039
15059
|
|
|
15040
15060
|
if(this.mode == "local"){
|
|
15041
15061
|
output = [];
|
|
@@ -15050,21 +15070,30 @@ class Page extends Module{
|
|
|
15050
15070
|
end = start + parseInt(this.size);
|
|
15051
15071
|
}
|
|
15052
15072
|
|
|
15053
|
-
|
|
15054
15073
|
this._setPageButtons();
|
|
15055
15074
|
|
|
15056
15075
|
for(let i = start; i < end; i++){
|
|
15057
|
-
|
|
15058
|
-
|
|
15076
|
+
let row = data[i];
|
|
15077
|
+
|
|
15078
|
+
if(row){
|
|
15079
|
+
output.push(row);
|
|
15080
|
+
|
|
15081
|
+
if(row.type === "row"){
|
|
15082
|
+
if(!actualStartRow){
|
|
15083
|
+
actualStartRow = row;
|
|
15084
|
+
}
|
|
15085
|
+
|
|
15086
|
+
actualRowPageSize++;
|
|
15087
|
+
}
|
|
15059
15088
|
}
|
|
15060
15089
|
}
|
|
15061
|
-
|
|
15062
|
-
this._setPageCounter(
|
|
15090
|
+
|
|
15091
|
+
this._setPageCounter(actualRows.length, actualRowPageSize, actualStartRow ? (actualRows.indexOf(actualStartRow) + 1) : 0);
|
|
15063
15092
|
|
|
15064
15093
|
return output;
|
|
15065
15094
|
}else {
|
|
15066
15095
|
this._setPageButtons();
|
|
15067
|
-
this._setPageCounter(
|
|
15096
|
+
this._setPageCounter(actualRows.length);
|
|
15068
15097
|
|
|
15069
15098
|
return data.slice(0);
|
|
15070
15099
|
}
|
|
@@ -15164,8 +15193,8 @@ class Page extends Module{
|
|
|
15164
15193
|
|
|
15165
15194
|
//handle the footer element being redrawn
|
|
15166
15195
|
footerRedraw(){
|
|
15167
|
-
var footer = this.table.footerManager.
|
|
15168
|
-
|
|
15196
|
+
var footer = this.table.footerManager.containerElement;
|
|
15197
|
+
|
|
15169
15198
|
if((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){
|
|
15170
15199
|
this.pagesElement.style.display = 'none';
|
|
15171
15200
|
}else {
|
|
@@ -17223,7 +17252,9 @@ class SelectRow extends Module{
|
|
|
17223
17252
|
self._deselectRow(self.selectedRows[0], true);
|
|
17224
17253
|
}
|
|
17225
17254
|
|
|
17226
|
-
|
|
17255
|
+
if(rowCount){
|
|
17256
|
+
self._rowSelectionChanged(silent);
|
|
17257
|
+
}
|
|
17227
17258
|
|
|
17228
17259
|
}else {
|
|
17229
17260
|
if(Array.isArray(rows)){
|
|
@@ -18796,15 +18827,20 @@ class VirtualDomHorizontal extends Renderer{
|
|
|
18796
18827
|
|
|
18797
18828
|
this.fitDataColAvg = 0;
|
|
18798
18829
|
|
|
18799
|
-
this.
|
|
18830
|
+
this.windowBuffer = 200; //pixel margin to make column visible before it is shown on screen
|
|
18800
18831
|
|
|
18832
|
+
this.visibleRows = null;
|
|
18833
|
+
|
|
18801
18834
|
this.initialized = false;
|
|
18835
|
+
this.isFitData = false;
|
|
18802
18836
|
|
|
18803
18837
|
this.columns = [];
|
|
18804
18838
|
}
|
|
18805
18839
|
|
|
18806
18840
|
initialize(){
|
|
18807
18841
|
this.compatibilityCheck();
|
|
18842
|
+
this.layoutCheck();
|
|
18843
|
+
this.vertScrollListen();
|
|
18808
18844
|
}
|
|
18809
18845
|
|
|
18810
18846
|
compatibilityCheck(){
|
|
@@ -18845,6 +18881,16 @@ class VirtualDomHorizontal extends Renderer{
|
|
|
18845
18881
|
return ok;
|
|
18846
18882
|
}
|
|
18847
18883
|
|
|
18884
|
+
layoutCheck(){
|
|
18885
|
+
this.isFitData = this.options("layout").startsWith('fitData');
|
|
18886
|
+
}
|
|
18887
|
+
|
|
18888
|
+
vertScrollListen(){
|
|
18889
|
+
this.subscribe("scroll-vertical", () => {
|
|
18890
|
+
this.visibleRows = null;
|
|
18891
|
+
});
|
|
18892
|
+
}
|
|
18893
|
+
|
|
18848
18894
|
//////////////////////////////////////
|
|
18849
18895
|
///////// Public Functions ///////////
|
|
18850
18896
|
//////////////////////////////////////
|
|
@@ -18852,21 +18898,40 @@ class VirtualDomHorizontal extends Renderer{
|
|
|
18852
18898
|
renderColumns(row, force){
|
|
18853
18899
|
this.dataChange();
|
|
18854
18900
|
}
|
|
18901
|
+
|
|
18855
18902
|
|
|
18856
18903
|
scrollColumns(left, dir){
|
|
18857
18904
|
if(this.scrollLeft != left){
|
|
18858
18905
|
this.scrollLeft = left;
|
|
18859
18906
|
|
|
18860
|
-
this.scroll(left - (this.vDomScrollPosLeft + this.
|
|
18907
|
+
this.scroll(left - (this.vDomScrollPosLeft + this.windowBuffer));
|
|
18861
18908
|
}
|
|
18862
18909
|
}
|
|
18863
18910
|
|
|
18911
|
+
calcWindowBuffer(){
|
|
18912
|
+
var buffer = this.elementVertical.clientWidth;
|
|
18913
|
+
|
|
18914
|
+
this.table.columnManager.columnsByIndex.forEach((column) => {
|
|
18915
|
+
if(column.visible){
|
|
18916
|
+
var width = column.getWidth();
|
|
18917
|
+
|
|
18918
|
+
if(width > buffer){
|
|
18919
|
+
buffer = width;
|
|
18920
|
+
}
|
|
18921
|
+
}
|
|
18922
|
+
});
|
|
18923
|
+
|
|
18924
|
+
this.windowBuffer = buffer * 2;
|
|
18925
|
+
}
|
|
18926
|
+
|
|
18864
18927
|
rerenderColumns(update, blockRedraw){
|
|
18865
18928
|
var old = {
|
|
18866
18929
|
cols:this.columns,
|
|
18867
18930
|
leftCol:this.leftCol,
|
|
18868
18931
|
rightCol:this.rightCol,
|
|
18869
|
-
}
|
|
18932
|
+
},
|
|
18933
|
+
colPos = 0;
|
|
18934
|
+
|
|
18870
18935
|
|
|
18871
18936
|
if(update && !this.initialized){
|
|
18872
18937
|
return;
|
|
@@ -18874,12 +18939,12 @@ class VirtualDomHorizontal extends Renderer{
|
|
|
18874
18939
|
|
|
18875
18940
|
this.clear();
|
|
18876
18941
|
|
|
18877
|
-
this.
|
|
18942
|
+
this.calcWindowBuffer();
|
|
18878
18943
|
|
|
18879
|
-
this.
|
|
18880
|
-
this.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.window;
|
|
18944
|
+
this.scrollLeft = this.elementVertical.scrollLeft;
|
|
18881
18945
|
|
|
18882
|
-
|
|
18946
|
+
this.vDomScrollPosLeft = this.scrollLeft - this.windowBuffer;
|
|
18947
|
+
this.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;
|
|
18883
18948
|
|
|
18884
18949
|
this.table.columnManager.columnsByIndex.forEach((column) => {
|
|
18885
18950
|
var config = {};
|
|
@@ -18892,7 +18957,7 @@ class VirtualDomHorizontal extends Renderer{
|
|
|
18892
18957
|
|
|
18893
18958
|
config.width = width;
|
|
18894
18959
|
|
|
18895
|
-
if (this.
|
|
18960
|
+
if (this.isFitData) {
|
|
18896
18961
|
config.fitDataCheck = column.modules.vdomHoz ? column.modules.vdomHoz.fitDataCheck : true;
|
|
18897
18962
|
}
|
|
18898
18963
|
|
|
@@ -18981,7 +19046,7 @@ class VirtualDomHorizontal extends Renderer{
|
|
|
18981
19046
|
colEnd = 0,
|
|
18982
19047
|
row, rowEl;
|
|
18983
19048
|
|
|
18984
|
-
if(this.
|
|
19049
|
+
if(this.isFitData){
|
|
18985
19050
|
this.table.columnManager.columnsByIndex.forEach((column) => {
|
|
18986
19051
|
if(!column.definition.width && column.visible){
|
|
18987
19052
|
change = true;
|
|
@@ -18991,10 +19056,10 @@ class VirtualDomHorizontal extends Renderer{
|
|
|
18991
19056
|
if(change){
|
|
18992
19057
|
if(change && this.table.rowManager.getDisplayRows().length){
|
|
18993
19058
|
|
|
18994
|
-
this.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.
|
|
19059
|
+
this.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer;
|
|
18995
19060
|
|
|
18996
19061
|
var row = this.chain("rows-sample", [1], [], () => {
|
|
18997
|
-
return this.table.rowManager.getDisplayRows()
|
|
19062
|
+
return this.table.rowManager.getDisplayRows();
|
|
18998
19063
|
})[0];
|
|
18999
19064
|
|
|
19000
19065
|
if(row){
|
|
@@ -19013,18 +19078,18 @@ class VirtualDomHorizontal extends Renderer{
|
|
|
19013
19078
|
|
|
19014
19079
|
collsWidth += cell.column.getWidth();
|
|
19015
19080
|
|
|
19016
|
-
if(collsWidth > this.vDomScrollPosRight){
|
|
19017
|
-
|
|
19018
|
-
}
|
|
19081
|
+
// if(collsWidth > this.vDomScrollPosRight){
|
|
19082
|
+
// break;
|
|
19083
|
+
// }
|
|
19019
19084
|
}
|
|
19020
19085
|
|
|
19021
19086
|
rowEl.parentNode.removeChild(rowEl);
|
|
19022
19087
|
|
|
19023
|
-
this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1));
|
|
19088
|
+
// this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1));
|
|
19024
19089
|
|
|
19025
|
-
for(colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++){
|
|
19026
|
-
|
|
19027
|
-
}
|
|
19090
|
+
// for(colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++){
|
|
19091
|
+
// this.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg);
|
|
19092
|
+
// }
|
|
19028
19093
|
|
|
19029
19094
|
this.rerenderColumns(false, true);
|
|
19030
19095
|
}
|
|
@@ -19055,17 +19120,25 @@ class VirtualDomHorizontal extends Renderer{
|
|
|
19055
19120
|
}
|
|
19056
19121
|
|
|
19057
19122
|
reinitializeRows(){
|
|
19058
|
-
var rows = this.
|
|
19123
|
+
var rows = this.getVisibleRows();
|
|
19059
19124
|
rows.forEach((row) => {
|
|
19060
19125
|
this.reinitializeRow(row, true);
|
|
19061
19126
|
});
|
|
19062
19127
|
}
|
|
19063
19128
|
|
|
19129
|
+
getVisibleRows(){
|
|
19130
|
+
if (!this.visibleRows){
|
|
19131
|
+
this.visibleRows = this.table.rowManager.getVisibleRows();
|
|
19132
|
+
}
|
|
19133
|
+
|
|
19134
|
+
return this.visibleRows;
|
|
19135
|
+
}
|
|
19136
|
+
|
|
19064
19137
|
scroll(diff){
|
|
19065
19138
|
this.vDomScrollPosLeft += diff;
|
|
19066
19139
|
this.vDomScrollPosRight += diff;
|
|
19067
|
-
|
|
19068
|
-
if(diff > (this.
|
|
19140
|
+
|
|
19141
|
+
if(Math.abs(diff) > (this.windowBuffer / 2)){
|
|
19069
19142
|
this.rerenderColumns();
|
|
19070
19143
|
}else {
|
|
19071
19144
|
if(diff > 0){
|
|
@@ -19090,131 +19163,165 @@ class VirtualDomHorizontal extends Renderer{
|
|
|
19090
19163
|
}
|
|
19091
19164
|
|
|
19092
19165
|
addColRight(){
|
|
19093
|
-
var
|
|
19094
|
-
rows;
|
|
19166
|
+
var changes = false;
|
|
19095
19167
|
|
|
19096
|
-
|
|
19097
|
-
rows = this.table.rowManager.getVisibleRows();
|
|
19098
|
-
|
|
19099
|
-
rows.forEach((row) => {
|
|
19100
|
-
if(row.type !== "group"){
|
|
19101
|
-
var cell = row.getCell(column);
|
|
19102
|
-
row.getElement().appendChild(cell.getElement());
|
|
19103
|
-
cell.cellRendered();
|
|
19104
|
-
}
|
|
19105
|
-
});
|
|
19106
|
-
|
|
19107
|
-
this.fitDataColActualWidthCheck(column);
|
|
19168
|
+
while(true){
|
|
19108
19169
|
|
|
19109
|
-
|
|
19170
|
+
let column = this.columns[this.rightCol + 1];
|
|
19110
19171
|
|
|
19111
|
-
if(
|
|
19112
|
-
|
|
19172
|
+
if(column){
|
|
19173
|
+
if(column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight){
|
|
19174
|
+
changes = true;
|
|
19175
|
+
|
|
19176
|
+
this.getVisibleRows().forEach((row) => {
|
|
19177
|
+
if(row.type !== "group"){
|
|
19178
|
+
var cell = row.getCell(column);
|
|
19179
|
+
row.getElement().appendChild(cell.getElement());
|
|
19180
|
+
cell.cellRendered();
|
|
19181
|
+
}
|
|
19182
|
+
});
|
|
19183
|
+
|
|
19184
|
+
this.fitDataColActualWidthCheck(column);
|
|
19185
|
+
|
|
19186
|
+
this.rightCol++; // Don't move this below the >= check below
|
|
19187
|
+
|
|
19188
|
+
if(this.rightCol >= (this.columns.length - 1)){
|
|
19189
|
+
this.vDomPadRight = 0;
|
|
19190
|
+
}else {
|
|
19191
|
+
this.vDomPadRight -= column.getWidth();
|
|
19192
|
+
}
|
|
19193
|
+
}else {
|
|
19194
|
+
break;
|
|
19195
|
+
}
|
|
19113
19196
|
}else {
|
|
19114
|
-
|
|
19197
|
+
break;
|
|
19115
19198
|
}
|
|
19116
|
-
|
|
19199
|
+
}
|
|
19200
|
+
|
|
19201
|
+
if(changes){
|
|
19117
19202
|
this.tableElement.style.paddingRight = this.vDomPadRight + "px";
|
|
19118
|
-
|
|
19119
|
-
this.addColRight();
|
|
19120
19203
|
}
|
|
19121
19204
|
}
|
|
19122
19205
|
|
|
19123
19206
|
addColLeft(){
|
|
19124
|
-
var
|
|
19125
|
-
rows;
|
|
19207
|
+
var changes = false;
|
|
19126
19208
|
|
|
19127
|
-
|
|
19128
|
-
|
|
19209
|
+
while(true){
|
|
19210
|
+
let column = this.columns[this.leftCol - 1];
|
|
19129
19211
|
|
|
19130
|
-
|
|
19131
|
-
if(
|
|
19132
|
-
|
|
19133
|
-
|
|
19134
|
-
|
|
19212
|
+
if(column){
|
|
19213
|
+
if(column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft){
|
|
19214
|
+
changes = true;
|
|
19215
|
+
|
|
19216
|
+
this.getVisibleRows().forEach((row) => {
|
|
19217
|
+
if(row.type !== "group"){
|
|
19218
|
+
var cell = row.getCell(column);
|
|
19219
|
+
row.getElement().prepend(cell.getElement());
|
|
19220
|
+
cell.cellRendered();
|
|
19221
|
+
}
|
|
19222
|
+
});
|
|
19223
|
+
|
|
19224
|
+
this.leftCol--; // don't move this below the <= check below
|
|
19225
|
+
|
|
19226
|
+
if(this.leftCol <= 0){ // replicating logic in addColRight
|
|
19227
|
+
this.vDomPadLeft = 0;
|
|
19228
|
+
}else {
|
|
19229
|
+
this.vDomPadLeft -= column.getWidth();
|
|
19230
|
+
}
|
|
19231
|
+
|
|
19232
|
+
let diff = this.fitDataColActualWidthCheck(column);
|
|
19233
|
+
|
|
19234
|
+
if(diff){
|
|
19235
|
+
this.scrollLeft = this.elementVertical.scrollLeft = this.elementVertical.scrollLeft + diff;
|
|
19236
|
+
this.vDomPadRight -= diff;
|
|
19237
|
+
}
|
|
19238
|
+
|
|
19239
|
+
}else {
|
|
19240
|
+
break;
|
|
19135
19241
|
}
|
|
19136
|
-
});
|
|
19137
|
-
|
|
19138
|
-
this.fitDataColActualWidthCheck(column);
|
|
19139
|
-
|
|
19140
|
-
this.leftCol--; // don't move this below the <= check below
|
|
19141
|
-
|
|
19142
|
-
if(this.leftCol <= 0){ // replicating logic in addColRight
|
|
19143
|
-
this.vDomPadLeft = 0;
|
|
19144
19242
|
}else {
|
|
19145
|
-
|
|
19243
|
+
break;
|
|
19146
19244
|
}
|
|
19147
|
-
|
|
19245
|
+
}
|
|
19246
|
+
|
|
19247
|
+
if(changes){
|
|
19148
19248
|
this.tableElement.style.paddingLeft = this.vDomPadLeft + "px";
|
|
19149
|
-
|
|
19150
|
-
|
|
19151
|
-
this.addColLeft();
|
|
19152
19249
|
}
|
|
19153
19250
|
}
|
|
19154
19251
|
|
|
19155
|
-
removeColRight(
|
|
19156
|
-
var
|
|
19157
|
-
rows;
|
|
19252
|
+
removeColRight(){
|
|
19253
|
+
var changes = false;
|
|
19158
19254
|
|
|
19159
|
-
|
|
19160
|
-
|
|
19161
|
-
|
|
19162
|
-
column.modules.vdomHoz.visible = false;
|
|
19255
|
+
while(true){
|
|
19256
|
+
let column = this.columns[this.rightCol];
|
|
19163
19257
|
|
|
19164
|
-
|
|
19165
|
-
if(
|
|
19166
|
-
|
|
19167
|
-
|
|
19168
|
-
|
|
19169
|
-
|
|
19170
|
-
|
|
19171
|
-
|
|
19258
|
+
if(column){
|
|
19259
|
+
if(column.modules.vdomHoz.leftPos > this.vDomScrollPosRight){
|
|
19260
|
+
changes = true;
|
|
19261
|
+
|
|
19262
|
+
this.getVisibleRows().forEach((row) => {
|
|
19263
|
+
if(row.type !== "group"){
|
|
19264
|
+
var cell = row.getCell(column);
|
|
19265
|
+
|
|
19266
|
+
try {
|
|
19267
|
+
row.getElement().removeChild(cell.getElement());
|
|
19268
|
+
} catch (ex) {
|
|
19269
|
+
console.warn("Could not removeColRight", ex.message);
|
|
19270
|
+
}
|
|
19271
|
+
}
|
|
19272
|
+
});
|
|
19273
|
+
|
|
19274
|
+
this.vDomPadRight += column.getWidth();
|
|
19275
|
+
this.rightCol --;
|
|
19276
|
+
}else {
|
|
19277
|
+
break;
|
|
19172
19278
|
}
|
|
19173
|
-
}
|
|
19174
|
-
|
|
19175
|
-
|
|
19279
|
+
}else {
|
|
19280
|
+
break;
|
|
19281
|
+
}
|
|
19282
|
+
}
|
|
19283
|
+
|
|
19284
|
+
if(changes){
|
|
19176
19285
|
this.tableElement.style.paddingRight = this.vDomPadRight + "px";
|
|
19177
|
-
|
|
19178
|
-
this.rightCol --;
|
|
19179
|
-
|
|
19180
|
-
this.removeColRight();
|
|
19181
19286
|
}
|
|
19182
19287
|
}
|
|
19183
19288
|
|
|
19184
19289
|
removeColLeft(){
|
|
19185
|
-
var
|
|
19186
|
-
rows;
|
|
19290
|
+
var changes = false;
|
|
19187
19291
|
|
|
19188
|
-
|
|
19189
|
-
|
|
19292
|
+
while(true){
|
|
19293
|
+
let column = this.columns[this.leftCol];
|
|
19190
19294
|
|
|
19191
|
-
|
|
19192
|
-
|
|
19193
|
-
|
|
19194
|
-
|
|
19195
|
-
|
|
19196
|
-
|
|
19197
|
-
|
|
19198
|
-
|
|
19199
|
-
|
|
19200
|
-
if(el.parentNode){
|
|
19295
|
+
if(column){
|
|
19296
|
+
if(column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft){
|
|
19297
|
+
changes = true;
|
|
19298
|
+
|
|
19299
|
+
this.getVisibleRows().forEach((row) => {
|
|
19300
|
+
if(row.type !== "group"){
|
|
19301
|
+
var cell = row.getCell(column);
|
|
19302
|
+
|
|
19201
19303
|
try {
|
|
19202
|
-
row.getElement().removeChild(
|
|
19304
|
+
row.getElement().removeChild(cell.getElement());
|
|
19203
19305
|
} catch (ex) {
|
|
19204
19306
|
console.warn("Could not removeColLeft", ex.message);
|
|
19205
19307
|
}
|
|
19206
19308
|
}
|
|
19207
|
-
}
|
|
19309
|
+
});
|
|
19310
|
+
|
|
19311
|
+
this.vDomPadLeft += column.getWidth();
|
|
19312
|
+
this.leftCol ++;
|
|
19313
|
+
}else {
|
|
19314
|
+
break;
|
|
19208
19315
|
}
|
|
19209
|
-
}
|
|
19210
|
-
|
|
19211
|
-
|
|
19316
|
+
}else {
|
|
19317
|
+
break;
|
|
19318
|
+
}
|
|
19319
|
+
}
|
|
19320
|
+
|
|
19321
|
+
if(changes){
|
|
19212
19322
|
this.tableElement.style.paddingLeft = this.vDomPadLeft + "px";
|
|
19213
|
-
|
|
19214
|
-
this.leftCol ++;
|
|
19215
|
-
|
|
19216
|
-
this.removeColLeft();
|
|
19217
19323
|
}
|
|
19324
|
+
|
|
19218
19325
|
}
|
|
19219
19326
|
|
|
19220
19327
|
fitDataColActualWidthCheck(column){
|
|
@@ -19229,12 +19336,14 @@ class VirtualDomHorizontal extends Renderer{
|
|
|
19229
19336
|
if(widthDiff){
|
|
19230
19337
|
column.modules.vdomHoz.rightPos += widthDiff;
|
|
19231
19338
|
column.modules.vdomHoz.width = newWidth;
|
|
19232
|
-
this.colPositionAdjust(this.
|
|
19339
|
+
this.colPositionAdjust(this.columns.indexOf(column) + 1, this.columns.length, widthDiff);
|
|
19233
19340
|
}
|
|
19234
19341
|
|
|
19235
19342
|
column.modules.vdomHoz.fitDataCheck = false;
|
|
19236
19343
|
}
|
|
19237
|
-
|
|
19344
|
+
|
|
19345
|
+
return widthDiff;
|
|
19346
|
+
}
|
|
19238
19347
|
|
|
19239
19348
|
initializeRow(row){
|
|
19240
19349
|
if(row.type !== "group"){
|
|
@@ -21685,7 +21794,7 @@ class FooterManager extends CoreFeature{
|
|
|
21685
21794
|
this.containerElement.innerHTML = this.table.options.footerElement;
|
|
21686
21795
|
}else {
|
|
21687
21796
|
this.external = true;
|
|
21688
|
-
this.
|
|
21797
|
+
this.containerElement = document.querySelector(this.table.options.footerElement);
|
|
21689
21798
|
}
|
|
21690
21799
|
break;
|
|
21691
21800
|
|
|
@@ -22002,7 +22111,7 @@ class InteractionManager extends CoreFeature {
|
|
|
22002
22111
|
return row.getElement() === target;
|
|
22003
22112
|
});
|
|
22004
22113
|
|
|
22005
|
-
if(targets["row"].parentNode && targets["row"].parentNode.closest(".tabulator-row")){
|
|
22114
|
+
if(targets["row"] && targets["row"].parentNode && targets["row"].parentNode.closest(".tabulator-row")){
|
|
22006
22115
|
targets[key] = false;
|
|
22007
22116
|
}
|
|
22008
22117
|
}
|
|
@@ -23433,7 +23542,7 @@ class Tabulator {
|
|
|
23433
23542
|
_clearObjectPointers(){
|
|
23434
23543
|
this.options.columns = this.options.columns.slice(0);
|
|
23435
23544
|
|
|
23436
|
-
if(this.options.data && !this.options.reactiveData){
|
|
23545
|
+
if(Array.isArray(this.options.data) && !this.options.reactiveData){
|
|
23437
23546
|
this.options.data = this.options.data.slice(0);
|
|
23438
23547
|
}
|
|
23439
23548
|
}
|