Skip to content

Commit

Permalink
update version to 5.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
olifolkerd committed Oct 16, 2022
1 parent eec3b6f commit bc769f3
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 31 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tabulator",
"main": "dist/js/tabulator.js",
"version": "5.4.1",
"version": "5.4.2",
"description": "Interactive table generation JavaScript library",
"keywords": [
"table",
Expand Down
64 changes: 44 additions & 20 deletions dist/js/tabulator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Tabulator v5.4.1 (c) Oliver Folkerd 2022 */
/* Tabulator v5.4.2 (c) Oliver Folkerd 2022 */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
Expand Down Expand Up @@ -1470,6 +1470,16 @@
return width;
}

getLeftOffset(){
var offset = this.element.offsetLeft;

if(this.parent.isGroup){
offset += this.parent.getLeftOffset();
}

return offset;
}

getHeight(){
return Math.ceil(this.element.getBoundingClientRect().height);
}
Expand Down Expand Up @@ -3099,10 +3109,11 @@

scrollToColumn(column, position, ifVisible){
var left = 0,
offset = 0,
offset = column.getLeftOffset(),
adjust = 0,
colEl = column.getElement();


return new Promise((resolve, reject) => {

if(typeof position === "undefined"){
Expand All @@ -3129,16 +3140,13 @@

//check column visibility
if(!ifVisible){

offset = colEl.offsetLeft;

if(offset > 0 && offset + colEl.offsetWidth < this.element.clientWidth){
return false;
}
}

//calculate scroll position
left = colEl.offsetLeft + adjust;
left = offset + adjust;

left = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0);

Expand Down Expand Up @@ -9733,6 +9741,16 @@
}
}

reinitializeCalcs(){
if(this.topCalcs.length){
this.initializeTopRow();
}

if(this.botCalcs.length){
this.initializeBottomRow();
}
}

initializeTopRow(){
if(!this.topInitialized){
this.table.columnManager.getContentsElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);
Expand Down Expand Up @@ -17119,17 +17137,19 @@
this.createValueGroups();
}

wipe(){
if(this.groupList.length){
this.groupList.forEach(function(group){
group.wipe();
});
}else {
this.rows.forEach((row) => {
if(row.modules){
delete row.modules.group;
}
});
wipe(elementsOnly){
if(!elementsOnly){
if(this.groupList.length){
this.groupList.forEach(function(group){
group.wipe();
});
}else {
this.rows.forEach((row) => {
if(row.modules){
delete row.modules.group;
}
});
}
}

this.element = false;
Expand Down Expand Up @@ -17762,7 +17782,7 @@

this.groupIDLookups = [];

if(Array.isArray(groupBy)){
if(groupBy){
if(this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "table" && this.table.options.columnCalcs != "both"){
this.table.modules.columnCalcs.removeCalcs();
}
Expand Down Expand Up @@ -17902,6 +17922,10 @@
}

this.configureGroupSetup();

if(!groups && this.table.modExists("columnCalcs") && this.table.options.columnCalcs === true){
this.table.modules.columnCalcs.reinitializeCalcs();
}

this.refreshData();

Expand Down Expand Up @@ -18148,7 +18172,7 @@
}

Object.values(oldGroups).forEach((group) => {
group.wipe();
group.wipe(true);
});
}

Expand Down Expand Up @@ -19919,7 +19943,7 @@

config.mousemove = function(e){
if(column.parent === self.moving.parent){
if((((self.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(colEl).left) + self.table.columnManager.element.scrollLeft) > (column.getWidth() / 2)){
if((((self.touchMove ? e.touches[0].pageX : e.pageX) - Helpers.elOffset(colEl).left) + self.table.columnManager.contentsElement.scrollLeft) > (column.getWidth() / 2)){
if(self.toCol !== column || !self.toColAfter){
colEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling);
self.moveColumn(column, true);
Expand Down
2 changes: 1 addition & 1 deletion dist/js/tabulator.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/js/tabulator.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/tabulator.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/tabulator_esm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Tabulator v5.4.1 (c) Oliver Folkerd 2022 */
/* Tabulator v5.4.2 (c) Oliver Folkerd 2022 */
class CoreFeature{

constructor(table){
Expand Down
4 changes: 2 additions & 2 deletions dist/js/tabulator_esm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/tabulator_esm.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tabulator-tables",
"version": "5.4.1",
"version": "5.4.2",
"description": "Interactive table generation JavaScript library",
"style": "dist/css/tabulator.css",
"main": "dist/js/tabulator.js",
Expand Down

0 comments on commit bc769f3

Please sign in to comment.