dtable-sdk
Advanced tools
Comparing version 0.0.48 to 0.0.49
@@ -63,13 +63,2 @@ "use strict"; | ||
} | ||
}, { | ||
key: "getUserCommonInfo", | ||
value: function getUserCommonInfo(email, avatarSize) { | ||
var url = this.server + '/api/v2.1/user-common-info/' + email; | ||
var params = { | ||
avatar_size: avatarSize | ||
}; | ||
return this.req.get(url, { | ||
params: params | ||
}); | ||
} | ||
}]); | ||
@@ -76,0 +65,0 @@ |
@@ -460,7 +460,2 @@ "use strict"; | ||
}, { | ||
key: "getUserCommonInfo", | ||
value: function getUserCommonInfo(email, avatar_size) { | ||
return this.dtableWebAPI.getUserCommonInfo(email, avatar_size); | ||
} | ||
}, { | ||
key: "addTable", | ||
@@ -544,2 +539,30 @@ value: function addTable(tableName) { | ||
} | ||
}, { | ||
key: "moveColumn", | ||
value: function moveColumn(selectedTable, source, target) { | ||
var tables = this.getTables(); | ||
var selectedTableIdx = tables.findIndex(function (table) { | ||
return table._id === selectedTable._id; | ||
}); | ||
if (selectedTableIdx === -1) return; | ||
var columns = selectedTable.columns; | ||
var sourceIndex = columns.findIndex(function (column) { | ||
return column.name === source; | ||
}); | ||
var targetIndex = columns.findIndex(function (column) { | ||
return column.name === target; | ||
}); | ||
var sourceColumn = columns[sourceIndex]; | ||
var targetColumn = columns[targetIndex]; | ||
var upper_column_key = sourceIndex === 0 ? null : columns[sourceIndex - 1].key; | ||
var move_position; | ||
if (sourceIndex > targetIndex) { | ||
move_position = 'move_left'; | ||
} else { | ||
move_position = 'move_right'; | ||
} | ||
this.dtableStore.moveColumn(selectedTableIdx, move_position, sourceColumn.key, targetColumn.key, upper_column_key); | ||
} | ||
}]); | ||
@@ -546,0 +569,0 @@ |
{ | ||
"name": "dtable-sdk", | ||
"version": "0.0.48", | ||
"version": "0.0.49", | ||
"description": "dtable sdk", | ||
@@ -5,0 +5,0 @@ "main": "./dist/dtable.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
382900
9545