Skip to content

Commit

Permalink
update version no to 5.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
olifolkerd committed Jan 21, 2024
1 parent 81634af commit 3cab42c
Show file tree
Hide file tree
Showing 34 changed files with 136 additions and 112 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.5.2",
"version": "5.5.3",
"description": "Interactive table generation JavaScript library",
"keywords": [
"table",
Expand Down
2 changes: 1 addition & 1 deletion dist/css/tabulator.min.css

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_bootstrap3.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_bootstrap3.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_bootstrap4.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_bootstrap4.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_bootstrap5.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_bootstrap5.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_bulma.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_bulma.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_materialize.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_materialize.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_midnight.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_midnight.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_modern.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_modern.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_semanticui.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_semanticui.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_simple.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_simple.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_site.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/tabulator_site.min.css.map

Large diffs are not rendered by default.

80 changes: 52 additions & 28 deletions dist/js/tabulator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Tabulator v5.5.2 (c) Oliver Folkerd 2023 */
/* Tabulator v5.5.3 (c) Oliver Folkerd 2024 */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
Expand Down Expand Up @@ -1712,6 +1712,25 @@
};
}

static retrieveNestedData(separator, field, data){
var structure = separator ? field.split(separator) : [field],
length = structure.length,
output;

for(let i = 0; i < length; i++){

data = data[structure[i]];

output = data;

if(!data){
break;
}
}

return output;
}

static deepClone(obj, clone, list = []){
var objectProto = {}.__proto__,
arrayProto = [].__proto__;
Expand Down Expand Up @@ -2979,7 +2998,7 @@
var matches = [];

Object.keys(this.columnsByField).forEach((field) => {
var fieldRoot = field.split(".")[0];
var fieldRoot = this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator)[0] : field;
if(fieldRoot === root){
matches.push(this.columnsByField[field]);
}
Expand Down Expand Up @@ -5334,7 +5353,7 @@
refreshPipelines(handler, stage, index, renderInPosition){
this.dispatch("data-refreshing");

if(!handler){
if(!handler || !this.activeRowsPipeline[0]){
this.activeRowsPipeline[0] = this.rows.slice(0);
}

Expand All @@ -5344,7 +5363,6 @@
//handle case where all data needs refreshing

case "dataPipeline":

for(let i = index; i < this.dataPipeline.length; i++){
let result = this.dataPipeline[i].handler(this.activeRowsPipeline[i].slice(0));

Expand Down Expand Up @@ -9096,7 +9114,7 @@
ajaxParams = ajaxParams.call(this.table);
}

params = Object.assign(params, ajaxParams);
params = Object.assign(Object.assign({}, ajaxParams), params);
}

return params;
Expand Down Expand Up @@ -13746,21 +13764,24 @@
if(newRow){
cell.getElement().firstChild.blur();

if(newRow === true){
newRow = this.table.addRow({});
}else {
if(typeof newRow == "function"){
newRow = this.table.addRow(newRow(cell.row.getComponent()));
if(!this.invalidEdit){

if(newRow === true){
newRow = this.table.addRow({});
}else {
newRow = this.table.addRow(Object.assign({}, newRow));
if(typeof newRow == "function"){
newRow = this.table.addRow(newRow(cell.row.getComponent()));
}else {
newRow = this.table.addRow(Object.assign({}, newRow));
}
}
}

newRow.then(() => {
setTimeout(() => {
cell.getComponent().navigateNext();
newRow.then(() => {
setTimeout(() => {
cell.getComponent().navigateNext();
});
});
});
}
}
}
}
Expand Down Expand Up @@ -14016,7 +14037,7 @@
this.cancelEdit();
}
}

rowEditableCheck(row){
row.getCells().forEach((cell) => {
if(cell.column.modules.edit && typeof cell.column.modules.edit.check === "function"){
Expand Down Expand Up @@ -14203,25 +14224,25 @@

allowEdit(cell) {
var check = cell.column.modules.edit ? true : false;

if(cell.column.modules.edit){
switch(typeof cell.column.modules.edit.check){
case "function":
if(cell.row.initialized){
check = cell.column.modules.edit.check(cell.getComponent());
}
break;

case "string":
check = !!cell.row.data[cell.column.modules.edit.check];
break;

case "boolean":
check = cell.column.modules.edit.check;
break;
}
}

return check;
}

Expand All @@ -14233,7 +14254,7 @@
cellEditor, component, params;

//prevent editing if another cell is refusing to leave focus (eg. validation fail)

if(this.currentCell){
if(!this.invalidEdit && this.currentCell !== cell){
this.cancelEdit();
Expand Down Expand Up @@ -16138,7 +16159,8 @@
if(label){
if(formatterParams.urlField){
data = cell.getData();
value = data[formatterParams.urlField];

value = Helpers.retrieveNestedData(this.table.options.nestedFieldSeparator, formatterParams.urlField, data);
}

if(formatterParams.url){
Expand Down Expand Up @@ -21642,7 +21664,7 @@

userSetPageToRow(row){
if(this.table.options.pagination){
row = this.rowManager.findRow(row);
row = this.table.rowManager.findRow(row);

if(row){
return this.setPageToRow(row);
Expand Down Expand Up @@ -22582,7 +22604,7 @@
}

setColumnLayout(layout){
this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns, layout));
this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns, layout, true));
return true;
}

Expand Down Expand Up @@ -22648,7 +22670,7 @@
}

//merge old and new column definitions
mergeDefinition(oldCols, newCols){
mergeDefinition(oldCols, newCols, mergeAllNew){
var output = [];

newCols = newCols || [];
Expand All @@ -22658,7 +22680,9 @@
keys;

if(from){
if(this.config.columns === true || this.config.columns == undefined){
if(mergeAllNew){
keys = Object.keys(column);
}else if(this.config.columns === true || this.config.columns == undefined){
keys = Object.keys(from);
keys.push("width");
}else {
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.

52 changes: 26 additions & 26 deletions dist/js/tabulator_esm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Tabulator v5.5.2 (c) Oliver Folkerd 2024 */
/* Tabulator v5.5.3 (c) Oliver Folkerd 2024 */
class CoreFeature{

constructor(table){
Expand Down Expand Up @@ -7979,30 +7979,30 @@ class Edit$1 extends Module{
//set column editor
switch(typeof column.definition.editor){
case "string":
if(this.editors[column.definition.editor]){
config.editor = this.editors[column.definition.editor];
}else {
console.warn("Editor Error - No such editor found: ", column.definition.editor);
}
break;
if(this.editors[column.definition.editor]){
config.editor = this.editors[column.definition.editor];
}else {
console.warn("Editor Error - No such editor found: ", column.definition.editor);
}
break;

case "function":
config.editor = column.definition.editor;
break;
config.editor = column.definition.editor;
break;

case "boolean":
if(column.definition.editor === true){
if(typeof column.definition.formatter !== "function"){
if(this.editors[column.definition.formatter]){
config.editor = this.editors[column.definition.formatter];
if(column.definition.editor === true){
if(typeof column.definition.formatter !== "function"){
if(this.editors[column.definition.formatter]){
config.editor = this.editors[column.definition.formatter];
}else {
config.editor = this.editors["input"];
}
}else {
config.editor = this.editors["input"];
console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter);
}
}else {
console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter);
}
}
break;
break;
}

if(config.editor){
Expand Down Expand Up @@ -8149,18 +8149,18 @@ class Edit$1 extends Module{
if(cell.column.modules.edit){
switch(typeof cell.column.modules.edit.check){
case "function":
if(cell.row.initialized){
check = cell.column.modules.edit.check(cell.getComponent());
}
break;
if(cell.row.initialized){
check = cell.column.modules.edit.check(cell.getComponent());
}
break;

case "string":
check = !!cell.row.data[cell.column.modules.edit.check];
break;
check = !!cell.row.data[cell.column.modules.edit.check];
break;

case "boolean":
check = cell.column.modules.edit.check;
break;
check = cell.column.modules.edit.check;
break;
}
}

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

Large diffs are not rendered by default.

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.5.2",
"version": "5.5.3",
"description": "Interactive table generation JavaScript library",
"style": "dist/css/tabulator.css",
"main": "dist/js/tabulator.js",
Expand Down
50 changes: 25 additions & 25 deletions src/js/modules/Edit/Edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,30 +372,30 @@ class Edit extends Module{
//set column editor
switch(typeof column.definition.editor){
case "string":
if(this.editors[column.definition.editor]){
config.editor = this.editors[column.definition.editor];
}else{
console.warn("Editor Error - No such editor found: ", column.definition.editor);
}
break;
if(this.editors[column.definition.editor]){
config.editor = this.editors[column.definition.editor];
}else{
console.warn("Editor Error - No such editor found: ", column.definition.editor);
}
break;

case "function":
config.editor = column.definition.editor;
break;
config.editor = column.definition.editor;
break;

case "boolean":
if(column.definition.editor === true){
if(typeof column.definition.formatter !== "function"){
if(this.editors[column.definition.formatter]){
config.editor = this.editors[column.definition.formatter];
if(column.definition.editor === true){
if(typeof column.definition.formatter !== "function"){
if(this.editors[column.definition.formatter]){
config.editor = this.editors[column.definition.formatter];
}else{
config.editor = this.editors["input"];
}
}else{
config.editor = this.editors["input"];
console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter);
}
}else{
console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter);
}
}
break;
break;
}

if(config.editor){
Expand Down Expand Up @@ -542,18 +542,18 @@ class Edit extends Module{
if(cell.column.modules.edit){
switch(typeof cell.column.modules.edit.check){
case "function":
if(cell.row.initialized){
check = cell.column.modules.edit.check(cell.getComponent());
}
break;
if(cell.row.initialized){
check = cell.column.modules.edit.check(cell.getComponent());
}
break;

case "string":
check = !!cell.row.data[cell.column.modules.edit.check];
break;
check = !!cell.row.data[cell.column.modules.edit.check];
break;

case "boolean":
check = cell.column.modules.edit.check;
break;
check = cell.column.modules.edit.check;
break;
}
}

Expand Down

0 comments on commit 3cab42c

Please sign in to comment.