dtable-utils
Advanced tools
Comparing version 4.4.2 to 4.4.3-alpha1
@@ -14,5 +14,5 @@ import dayjs from 'dayjs'; | ||
import '@babel/runtime/helpers/typeof'; | ||
import '../../date.js'; | ||
import '@babel/runtime/helpers/defineProperty'; | ||
import '@babel/runtime/helpers/toConsumableArray'; | ||
import '../../date.js'; | ||
@@ -19,0 +19,0 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } |
@@ -36,3 +36,5 @@ import { DURATION_FORMATS_MAP, DURATION_FORMATS } from '../constants/column.js'; | ||
if (timePartsLen === 0) return ''; | ||
var hoursIndex, minutesIndex, secondsIndex; | ||
var hoursIndex; | ||
var minutesIndex; | ||
var secondsIndex; | ||
if (duration_format === DURATION_FORMATS_MAP.H_MM) { | ||
@@ -39,0 +41,0 @@ hoursIndex = timePartsLen - 2; |
@@ -39,6 +39,6 @@ var provinceReg = /.+省|.+自治区|.+特别行政区|北京市|天津市|上海市|重庆市|安徽|福建|甘肃|广东|广西|贵州|海南|河北|河南|黑龙江|湖北|湖南|吉林|江苏|江西|辽宁|内蒙古|宁夏|青海|山东|山西|陕西|四川|西藏|新疆|云南|浙江|北京|上海|天津|重庆/; | ||
var matchedProvince = cellValue.match(provinceReg); | ||
var province = '', | ||
city = '', | ||
district = '', | ||
detail = ''; | ||
var province = ''; | ||
var city = ''; | ||
var district = ''; | ||
var detail = ''; | ||
if (matchedProvince) { | ||
@@ -45,0 +45,0 @@ province = matchedProvince[0]; |
@@ -7,8 +7,8 @@ var formatTextToImage = function formatTextToImage(value) { | ||
var imageUrls = imageUrl.split(' '); | ||
imageUrls = imageUrls.filter(function (imageUrl) { | ||
var strUrl = imageUrl.match(/http:\/\/.+/); | ||
imageUrls = imageUrls.filter(function (item) { | ||
var strUrl = item.match(/http:\/\/.+/); | ||
if (!strUrl) { | ||
return false; | ||
} | ||
if (!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(imageUrl)) { | ||
if (!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(item)) { | ||
return false; | ||
@@ -15,0 +15,0 @@ } |
@@ -31,4 +31,4 @@ import '../constants/column.js'; | ||
// is exist | ||
var option = options.find(function (option) { | ||
return option.name === optionName; | ||
var option = options.find(function (item) { | ||
return item.name === optionName; | ||
}); | ||
@@ -41,4 +41,4 @@ if (option) { | ||
var optionNames = optionName.split(' '); | ||
var optionIds = optionNames.map(function (optionName) { | ||
return formatTextToSingleOption(optionName, column); | ||
var optionIds = optionNames.map(function (item) { | ||
return formatTextToSingleOption(item, column); | ||
}); | ||
@@ -62,4 +62,4 @@ return optionIds; | ||
var selectOptions = value.map(function (optionName) { | ||
var option = options.find(function (option) { | ||
return option.name === optionName; | ||
var option = options.find(function (item) { | ||
return item.name === optionName; | ||
}); | ||
@@ -66,0 +66,0 @@ if (option) return option; |
@@ -29,4 +29,4 @@ import '../constants/column.js'; | ||
} | ||
var option = options.find(function (option) { | ||
return option.name === optionName; | ||
var option = options.find(function (item) { | ||
return item.name === optionName; | ||
}); | ||
@@ -33,0 +33,0 @@ if (option) { |
import _typeof from '@babel/runtime/helpers/typeof'; | ||
import '../constants/column.js'; | ||
import '../constants/filter/filter-column-options.js'; | ||
import '../constants/filter/filter-modifier.js'; | ||
import '../constants/filter/filter-predicate.js'; | ||
import '../constants/filter/filter-is-within.js'; | ||
import '../constants/formula.js'; | ||
import '../constants/sort.js'; | ||
import '../constants/group.js'; | ||
import '../date.js'; | ||
@@ -3,0 +12,0 @@ /** |
@@ -18,5 +18,5 @@ 'use strict'; | ||
require('@babel/runtime/helpers/typeof'); | ||
require('../../date.js'); | ||
require('@babel/runtime/helpers/defineProperty'); | ||
require('@babel/runtime/helpers/toConsumableArray'); | ||
require('../../date.js'); | ||
@@ -23,0 +23,0 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } |
@@ -40,3 +40,5 @@ 'use strict'; | ||
if (timePartsLen === 0) return ''; | ||
var hoursIndex, minutesIndex, secondsIndex; | ||
var hoursIndex; | ||
var minutesIndex; | ||
var secondsIndex; | ||
if (duration_format === column.DURATION_FORMATS_MAP.H_MM) { | ||
@@ -43,0 +45,0 @@ hoursIndex = timePartsLen - 2; |
@@ -43,6 +43,6 @@ 'use strict'; | ||
var matchedProvince = cellValue.match(provinceReg); | ||
var province = '', | ||
city = '', | ||
district = '', | ||
detail = ''; | ||
var province = ''; | ||
var city = ''; | ||
var district = ''; | ||
var detail = ''; | ||
if (matchedProvince) { | ||
@@ -49,0 +49,0 @@ province = matchedProvince[0]; |
@@ -11,8 +11,8 @@ 'use strict'; | ||
var imageUrls = imageUrl.split(' '); | ||
imageUrls = imageUrls.filter(function (imageUrl) { | ||
var strUrl = imageUrl.match(/http:\/\/.+/); | ||
imageUrls = imageUrls.filter(function (item) { | ||
var strUrl = item.match(/http:\/\/.+/); | ||
if (!strUrl) { | ||
return false; | ||
} | ||
if (!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(imageUrl)) { | ||
if (!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(item)) { | ||
return false; | ||
@@ -19,0 +19,0 @@ } |
@@ -35,4 +35,4 @@ 'use strict'; | ||
// is exist | ||
var option = options.find(function (option) { | ||
return option.name === optionName; | ||
var option = options.find(function (item) { | ||
return item.name === optionName; | ||
}); | ||
@@ -45,4 +45,4 @@ if (option) { | ||
var optionNames = optionName.split(' '); | ||
var optionIds = optionNames.map(function (optionName) { | ||
return singleSelect.formatTextToSingleOption(optionName, column); | ||
var optionIds = optionNames.map(function (item) { | ||
return singleSelect.formatTextToSingleOption(item, column); | ||
}); | ||
@@ -66,4 +66,4 @@ return optionIds; | ||
var selectOptions = value.map(function (optionName) { | ||
var option$1 = options.find(function (option) { | ||
return option.name === optionName; | ||
var option$1 = options.find(function (item) { | ||
return item.name === optionName; | ||
}); | ||
@@ -70,0 +70,0 @@ if (option$1) return option$1; |
@@ -33,4 +33,4 @@ 'use strict'; | ||
} | ||
var option$1 = options.find(function (option) { | ||
return option.name === optionName; | ||
var option$1 = options.find(function (item) { | ||
return item.name === optionName; | ||
}); | ||
@@ -37,0 +37,0 @@ if (option$1) { |
@@ -6,2 +6,11 @@ 'use strict'; | ||
var _typeof = require('@babel/runtime/helpers/typeof'); | ||
require('../constants/column.js'); | ||
require('../constants/filter/filter-column-options.js'); | ||
require('../constants/filter/filter-modifier.js'); | ||
require('../constants/filter/filter-predicate.js'); | ||
require('../constants/filter/filter-is-within.js'); | ||
require('../constants/formula.js'); | ||
require('../constants/sort.js'); | ||
require('../constants/group.js'); | ||
require('../date.js'); | ||
@@ -8,0 +17,0 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } |
{ | ||
"name": "dtable-utils", | ||
"version": "4.4.2", | ||
"version": "4.4.3-alpha1", | ||
"description": "dtable common utils", | ||
@@ -12,2 +12,3 @@ "main": "./lib/index.js", | ||
"eslint": "eslint ./src/**", | ||
"eslint-fix": "eslint ./src/** --fix", | ||
"build": "rm -rf dist lib es && rollup -c", | ||
@@ -14,0 +15,0 @@ "prepublishOnly": "npm run build" |
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
861943
19013
3