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.132-beta1 to 0.0.132-beta2

78

dist/stat-utils.js

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

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var STATISTICS_COUNT_TYPE = {

@@ -41,25 +43,2 @@ COUNT: 'count',

_createClass(StatUtils, null, [{
key: "init",
value: function init() {
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
this.config = config;
}
}, {
key: "getStatisticRows",
value: function getStatisticRows(table, view, value) {
var _ref = this.config || {},
_ref$username = _ref.username,
username = _ref$username === void 0 ? null : _ref$username,
_ref$userId = _ref.userId,
userId = _ref$userId === void 0 ? null : _ref$userId;
console.log('config: ', this.config);
if (_dtableStore.Views.isFilterView(view, table.columns)) {
return _dtableStore.TableUtils.getRowsByIds(table, _dtableStore.Views.getRowIds(view, table, value, username, userId));
}
return table.rows;
}
}, {
key: "isValidRow",

@@ -109,10 +88,10 @@ value: function isValidRow(row, formulaRow, linkRow, column, includeEmpty) {

key: "getCellValueDisplayString",
value: function getCellValueDisplayString(row, type, key, _ref2) {
var _ref2$tables = _ref2.tables,
tables = _ref2$tables === void 0 ? [] : _ref2$tables,
_ref2$formulaRows = _ref2.formulaRows,
formulaRows = _ref2$formulaRows === void 0 ? {} : _ref2$formulaRows,
data = _ref2.data,
_ref2$collaborators = _ref2.collaborators,
collaborators = _ref2$collaborators === void 0 ? [] : _ref2$collaborators;
value: function getCellValueDisplayString(row, type, key, _ref) {
var _ref$tables = _ref.tables,
tables = _ref$tables === void 0 ? [] : _ref$tables,
_ref$formulaRows = _ref.formulaRows,
formulaRows = _ref$formulaRows === void 0 ? {} : _ref$formulaRows,
data = _ref.data,
_ref$collaborators = _ref.collaborators,
collaborators = _ref$collaborators === void 0 ? [] : _ref$collaborators;
return (0, _dtableStore.getCellValueDisplayString)(row, type, key, {

@@ -205,4 +184,4 @@ tables: tables,

var _ref3 = data || {},
result_type = _ref3.result_type;
var _ref2 = data || {},
result_type = _ref2.result_type;

@@ -224,4 +203,4 @@ if (result_type === _dtableStore.FORMULA_RESULT_TYPE.ARRAY) {

{
var _ref4 = data || {},
geo_format = _ref4.geo_format;
var _ref3 = data || {},
geo_format = _ref3.geo_format;

@@ -359,4 +338,4 @@ if (geo_format === 'country_region' || geo_format === 'lng_lat' || !geoGranularity) {

if (column_type === _dtableStore.CellType.SINGLE_SELECT) {
var _ref5 = data || {},
options = _ref5.options;
var _ref4 = data || {},
options = _ref4.options;

@@ -414,4 +393,4 @@ Array.isArray(options) && options.forEach(function (option, index) {

{
var _ref6 = data || {},
result_type = _ref6.result_type;
var _ref5 = data || {},
result_type = _ref5.result_type;

@@ -473,2 +452,23 @@ if (result_type === _dtableStore.FORMULA_RESULT_TYPE.NUMBER) {

_defineProperty(StatUtils, "init", function () {
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
StatUtils.config = config;
});
_defineProperty(StatUtils, "getStatisticRows", function (table, view, value) {
var _ref6 = StatUtils.config || {},
_ref6$username = _ref6.username,
username = _ref6$username === void 0 ? null : _ref6$username,
_ref6$userId = _ref6.userId,
userId = _ref6$userId === void 0 ? null : _ref6$userId;
console.log('config: ', StatUtils.config);
if (_dtableStore.Views.isFilterView(view, table.columns)) {
return _dtableStore.TableUtils.getRowsByIds(table, _dtableStore.Views.getRowIds(view, table, value, username, userId));
}
return table.rows;
});
var getValidCollaborators = function getValidCollaborators(collaborators, emails) {

@@ -475,0 +475,0 @@ if (!Array.isArray(emails)) {

{
"name": "dtable-sdk",
"version": "0.0.132beta1",
"version": "0.0.132beta2",
"description": "dtable sdk",

@@ -5,0 +5,0 @@ "main": "./dist/index.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