dtable-utils
Advanced tools
Comparing version 4.2.8 to 4.2.9
import { getColumnType } from './core.js'; | ||
import { DATE_COLUMN_OPTIONS, DATE_FORMAT_MAP } from '../constants/column.js'; | ||
import { DATE_COLUMN_OPTIONS } from '../constants/column.js'; | ||
@@ -16,14 +16,2 @@ /** | ||
/** | ||
* Check whether the format is supported in date column | ||
* @param {string} format | ||
* @returns bool | ||
*/ | ||
var isSupportDateColumnFormat = function isSupportDateColumnFormat(format) { | ||
if (!format) { | ||
return false; | ||
} | ||
return format === DATE_FORMAT_MAP.YYYY_MM_DD || format === DATE_FORMAT_MAP.YYYY_MM_DD_HH_MM || format === DATE_FORMAT_MAP.YYYY_MM_DD_HH_MM_SS; | ||
}; | ||
export { isDateColumn, isSupportDateColumnFormat }; | ||
export { isDateColumn }; |
@@ -80,11 +80,2 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
} | ||
case CellType.COLLABORATOR: | ||
{ | ||
var collaborator_email_map = {}; | ||
value.collaborators.forEach(function (collaborator) { | ||
collaborator_email_map[collaborator.email] = true; | ||
}); | ||
newGroupby.collaborator_email_map = collaborator_email_map; | ||
break; | ||
} | ||
case CellType.LINK: | ||
@@ -91,0 +82,0 @@ { |
@@ -84,9 +84,3 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
{ | ||
if (!Array.isArray(cellValue)) { | ||
return []; | ||
} | ||
var collaborator_email_map = groupby.collaborator_email_map; | ||
return cellValue.filter(function (email) { | ||
return collaborator_email_map[email]; | ||
}); | ||
return Array.isArray(cellValue) ? cellValue : []; | ||
} | ||
@@ -93,0 +87,0 @@ case CellType.GEOLOCATION: |
@@ -36,3 +36,3 @@ export { CellType } from './constants/cell-type.js'; | ||
export { createOption, generateOptionID, generatorCellOption, generatorCellOptions, getColumnOptions } from './column/option.js'; | ||
export { isDateColumn, isSupportDateColumnFormat } from './column/date.js'; | ||
export { isDateColumn } from './column/date.js'; | ||
export { isNumberColumn, isNumericColumn } from './column/number.js'; | ||
@@ -39,0 +39,0 @@ export { DateUtils } from './date.js'; |
@@ -20,15 +20,2 @@ 'use strict'; | ||
/** | ||
* Check whether the format is supported in date column | ||
* @param {string} format | ||
* @returns bool | ||
*/ | ||
var isSupportDateColumnFormat = function isSupportDateColumnFormat(format) { | ||
if (!format) { | ||
return false; | ||
} | ||
return format === column.DATE_FORMAT_MAP.YYYY_MM_DD || format === column.DATE_FORMAT_MAP.YYYY_MM_DD_HH_MM || format === column.DATE_FORMAT_MAP.YYYY_MM_DD_HH_MM_SS; | ||
}; | ||
exports.isDateColumn = isDateColumn; | ||
exports.isSupportDateColumnFormat = isSupportDateColumnFormat; |
@@ -88,11 +88,2 @@ 'use strict'; | ||
} | ||
case cellType.CellType.COLLABORATOR: | ||
{ | ||
var collaborator_email_map = {}; | ||
value.collaborators.forEach(function (collaborator) { | ||
collaborator_email_map[collaborator.email] = true; | ||
}); | ||
newGroupby.collaborator_email_map = collaborator_email_map; | ||
break; | ||
} | ||
case cellType.CellType.LINK: | ||
@@ -99,0 +90,0 @@ { |
@@ -93,9 +93,3 @@ 'use strict'; | ||
{ | ||
if (!Array.isArray(cellValue$1)) { | ||
return []; | ||
} | ||
var collaborator_email_map = groupby.collaborator_email_map; | ||
return cellValue$1.filter(function (email) { | ||
return collaborator_email_map[email]; | ||
}); | ||
return Array.isArray(cellValue$1) ? cellValue$1 : []; | ||
} | ||
@@ -102,0 +96,0 @@ case cellType.CellType.GEOLOCATION: |
@@ -190,3 +190,2 @@ 'use strict'; | ||
exports.isDateColumn = date$2.isDateColumn; | ||
exports.isSupportDateColumnFormat = date$2.isSupportDateColumnFormat; | ||
exports.isNumberColumn = number$2.isNumberColumn; | ||
@@ -193,0 +192,0 @@ exports.isNumericColumn = number$2.isNumericColumn; |
{ | ||
"name": "dtable-utils", | ||
"version": "4.2.8", | ||
"version": "4.2.9", | ||
"description": "dtable common utils", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is too big to display
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
662359
14768