dtable-sdk
Advanced tools
Comparing version 0.0.44 to 0.0.45
@@ -63,2 +63,13 @@ "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 | ||
}); | ||
} | ||
}]); | ||
@@ -65,0 +76,0 @@ |
@@ -447,2 +447,86 @@ "use strict"; | ||
} | ||
}, { | ||
key: "getUserCommonInfo", | ||
value: function getUserCommonInfo(email, avatar_size) { | ||
return this.dtableWebAPI.getUserCommonInfo(email, avatar_size); | ||
} | ||
}, { | ||
key: "addTable", | ||
value: function addTable(tableName) { | ||
this.dtableStore.insertTable(tableName); | ||
} | ||
}, { | ||
key: "deleteTable", | ||
value: function deleteTable(tableName) { | ||
var tables = this.getTables(); | ||
var index = tables.findIndex(function (table) { | ||
return table.name === tableName; | ||
}); | ||
this.dtableStore.deleteTable(index); | ||
} | ||
}, { | ||
key: "renameTable", | ||
value: function renameTable(previousName, tableName) { | ||
var tables = this.getTables(); | ||
var index = tables.findIndex(function (table) { | ||
return table.name === previousName; | ||
}); | ||
this.dtableStore.renameTable(index, tableName); | ||
} | ||
}, { | ||
key: "addView", | ||
value: function addView(tableName, viewName) { | ||
var viewData = { | ||
name: viewName, | ||
type: 'table' | ||
}; | ||
var tables = this.getTables(); | ||
var index = tables.findIndex(function (table) { | ||
return table.name === tableName; | ||
}); | ||
this.dtableStore.insertView(index, viewData); | ||
} | ||
}, { | ||
key: "renameView", | ||
value: function renameView(tableName, previousName, viewName) { | ||
var tables = this.getTables(); | ||
var index = tables.findIndex(function (table) { | ||
return table.name === tableName; | ||
}); | ||
var selectedTable = tables[index]; | ||
var viewIndex = selectedTable.views.findIndex(function (view) { | ||
return view.name === previousName; | ||
}); | ||
this.dtableStore.renameView(index, viewIndex, viewName); | ||
} | ||
}, { | ||
key: "deleteView", | ||
value: function deleteView(tableName, viewName) { | ||
var tables = this.getTables(); | ||
var tableIndex = tables.findIndex(function (table) { | ||
return table.name === tableName; | ||
}); | ||
var selectedTable = tables[tableIndex]; | ||
var viewIndex = selectedTable.views.findIndex(function (view) { | ||
return view.name === viewName; | ||
}); | ||
this.dtableStore.deleteView(tableIndex, viewIndex); | ||
} | ||
}, { | ||
key: "addRow", | ||
value: function addRow(tableName) { | ||
var tables = this.getTables(); | ||
var tableIndex = tables.findIndex(function (table) { | ||
return table.name === tableName; | ||
}); | ||
var rows = tables[tableIndex].rows; | ||
var rowId = rows[rows.length - 1]._id; | ||
this.dtableStore.insertRow(tableIndex, rowId, 'insert_below', undefined); | ||
} | ||
}, { | ||
key: "getGroupRows", | ||
value: function getGroupRows(view, table) { | ||
var value = this.dtableStore.value; | ||
return _dtableStore.Views.getGroupedRows(view, table, value); | ||
} | ||
}]); | ||
@@ -449,0 +533,0 @@ |
{ | ||
"name": "dtable-sdk", | ||
"version": "0.0.44", | ||
"version": "0.0.45", | ||
"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
195963
4947