Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dtable-sdk

Package Overview
Dependencies
Maintainers
1
Versions
213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dtable-sdk - npm Package Compare versions

Comparing version 0.0.49 to 0.0.50

11

dist/dtable-web-api.js

@@ -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 @@

53

dist/dtable.js

@@ -26,2 +26,4 @@ "use strict";

function _readOnlyError(name) { throw new Error("\"" + name + "\" is read-only"); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -461,2 +463,7 @@

}, {
key: "getUserCommonInfo",
value: function getUserCommonInfo(email, avatar_size) {
return this.dtableWebAPI.getUserCommonInfo(email, avatar_size);
}
}, {
key: "addTable",

@@ -525,10 +532,12 @@ value: function addTable(tableName) {

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);
value: function addRow(tableName, rowData) {
var viewName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var table = this.getTableByName(tableName);
var view = null;
if (viewName) {
view = (_readOnlyError("view"), this.getViewByName(table, viewName));
}
this.appendRow(table, rowData, view);
}

@@ -541,30 +550,2 @@ }, {

}
}, {
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);
}
}]);

@@ -571,0 +552,0 @@

{
"name": "dtable-sdk",
"version": "0.0.49",
"version": "0.0.50",
"description": "dtable sdk",

@@ -5,0 +5,0 @@ "main": "./dist/dtable.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc