Lines Matching refs:value

217   return { value: v }
228 * - value: number|null
234 return { value: v }
236 return { value: v }
238 return { value: v }
251 * - value: number|null
257 return { value: v }
259 return { value: v }
272 * - value: number|null
278 return { value: v }
280 return { value: v }
293 return v === '0' ? { value: parseFloat(v) + SUPPORT_UNIT[0] } :
295 value: parseFloat(v) + SUPPORT_UNIT[0],
302 return { value: v }
305 value: parseFloat(v) + SUPPORT_UNIT[0],
322 return { value: "@sys.float." + OHOS_THEME_PROP_GROUPS[resourceName] }
331 return { value: "@app.float." + resourceName}
340 return { value: "@ohos_id_" + OHOS_THEME_PROP_GROUPS[resourceName] }
346 value: null,
349 v + '` value (only numbers are supported).'
362 return { value: v }
375 * - value: number|null
389 * - value: number|null
418 * - hex color value (#xxxxxx or #xxx)
424 * - value: string|null
430 return { value: v }
438 * - hex color value (#xxxxxx or #xxx)
443 * - value: string|null
454 if (util.isValidValue(temp.value)) {
455 let tempValue = JSON.parse(temp.value)
457 return { value: JSON.stringify(result) }
464 return { value: v }
475 return { value: "@sys.color." + OHOS_THEME_PROP_GROUPS[resourceName] }
484 return { value: "@app.color." + resourceName}
493 return { value: "@ohos_id_" + OHOS_THEME_PROP_GROUPS[resourceName] }
499 return { value: v }
504 value: '#' + v[1] + v[1] + v[2] + v[2] + v[3] + v[3],
506 return 'NOTE: Attribute value `' + v + '` is automatically fixed to `' + result + '`.'
513 value: EXTENDED_COLOR_KEYWORDS[v],
515 return 'NOTE: Attribute value `' + v + '` is automatically fixed to `' + result + '`.'
521 return { value: 'rgba(0,0,0,0)' }
525 if (returnColorReg.value !== null) {
530 value: null,
548 return { value: 'rgb(' + [r, g, b].join(',') + ')' }
557 return { value: 'rgba(' + [r, g, b, a].join(',') + ')' }
565 return { value: 'hsl(' + [r, g+'%', b+'%'].join(',') + ')' }
574 return { value: 'hsla(' + [r, g+'%', b+'%', a].join(',') + ')' }
578 return { value: null }
587 * - value: color|null
611 return { value:v }
614 value: null,
616 return 'ERROR: The `' + util.camelCaseToHyphened(k) + '` attribute does not support value `' +
617 v + '` (the support value is `' + styleList.join('`|`') + '`).'
625 let value = []
630 if (!res.value) {
631 value = null
635 value.push(res.value)
641 if (!value) {
643 value: value,
649 value: isArray ? value.join(',') : value.join(' '),
661 var BORDER_VALIDATOR = function BORDER_VALIDATOR (value, name) {
662 value = (value || '').toString().trim();
664 const colorAttribute = value.match(/\(.*?\)/g);
666 values = value.replace(colorAttribute[0], colorAttribute[0].replace(/\s+/g, '')).split(/\s+/);
668 values = value.split(/\s+/);
678 match (item) { return LENGTH_VALIDATOR(item).value },
683 value: validatorResult.value,
689 match (item) { return validate('borderStyle', item).value },
694 value: validatorResult.value,
700 match (item) { return COLOR_VAR_VALIDATOR(item).value },
705 value: validatorResult.value,
737 value: res,
740 logTypes[index] + ': There are some problems with value `' + v + '` of the `' +
748 value: null,
751 '` attribute does not support value `' + v +
752 '` (this value does not meet the inspection standards for the width, style, and color).'
759 let str = validatorResult.reason(name, item, validatorResult.value)
771 var BOX_SHADOW_VALIDATOR = function BOX_SHADOW_VALIDATOR(value, name) {
772 value = (value || '').toString().trim()
773 const values = value.split(/\s+/)
783 match (item) { return validate('boxShadowH', item).value },
788 value: validatorResult.value,
794 match (item) { return validate('boxShadowV', item).value },
799 value: validatorResult.value,
805 match (item) { return validate('boxShadowBlur', item).value },
810 value: validatorResult.value,
816 match (item) { return validate('boxShadowSpread', item).value },
821 value: validatorResult.value,
827 match (item) { return COLOR_VAR_VALIDATOR(item).value },
832 value: validatorResult.value,
859 value: res,
862 logTypes[index] + ': There are some problems with value `' + v +
869 value: null,
872 '` attribute does not support value `' + v +
873 '` (this value does not meet the inspection standards).'
879 * only integer or float value is valid
883 * - value: number|null
890 return { value: v }
896 return { value: isInt === true ? parseInt(v, 10) : parseFloat(v) }
907 return { value: "@sys.float." + OHOS_THEME_PROP_GROUPS[resourceName] }
916 return { value: "@app.float." + resourceName}
925 return { value: "@ohos_id_" + OHOS_THEME_PROP_GROUPS[resourceName] }
931 value: null,
934 '` attribute does not support value `' + v + '` (only numbers are supported).'
946 * only integer value is valid
950 * - value: number|null
962 * - value: string|null
970 return {value: v}
974 value: null,
976 return 'ERROR: The `' + util.camelCaseToHyphened(k) + '` attribute does not support value `' +
977 v + '` (only CSS attributes support this value).'
987 * - value: number|null
997 ret = {value: parseInt(num)}
1004 value: parseInt(num),
1006 return 'NOTE: Attribute value `' + v + '` is automatically fixed to `' + result + '`.'
1014 value: null,
1016 return 'ERROR: The `' + util.camelCaseToHyphened(k) + '` attribute does not support value `' +
1027 * - value: linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(n,n,n,n)|null
1035 return {value: v}
1045 return {value: 'cubic-bezier(' + ret + ')'}
1058 return {value: 'steps(' + ret + ')'}
1063 value: null,
1065 return 'ERROR: The `' + util.camelCaseToHyphened(k) + '` attribute does not support value `' + v +
1075 if (subResult.value) {
1076 style[key] = subResult.value
1083 // init default animation brief value
1148 return {value: style}
1151 value: null,
1162 return { value: JSON.stringify({}) }
1175 value: null,
1177 return 'ERROR: The `' + util.camelCaseToHyphened(k) + '` attribute does not support value `' + v + '`.'
1193 if (typeof checkResult.value == 'number' || typeof checkResult.value == 'string') {
1194 result[firstValue] = checkResult.value
1207 reasonMaps.push('property value `' + v + '` is invalid.')
1214 value: result ? JSON.stringify(result) : null,
1248 reasonMaps.push('The number of properties is 4, value ' + values + ' is incorrect.')
1250 values.forEach(function (value, index) {
1252 childResult = NUMBER_VALIDATOR(value)
1254 childResult = ANGLE_VALIDATOR(value)
1256 if (typeof childResult.value == 'number' || typeof childResult.value == 'string') {
1257 resultValues.push(childResult.value)
1259 let check = checkReason(childResult, index.toString(), value, length)
1268 value: length < 2 ? resultValues.join(' ') : null,
1288 reasonMaps.push('The maximum number of properties is 16, value ' + values + ' is incorrect.')
1290 values.forEach(function (value, index) {
1291 childResult = validateFunction(value)
1292 if (typeof childResult.value == 'number' || typeof childResult.value == 'string') {
1293 resultValues.push(childResult.value)
1295 let check = checkReason(childResult, index.toString(), value, length)
1302 value: length < 2 ? resultValues.join(' ') : null,
1313 * generate a function to check whether a value is in `list`
1314 * - first value: default, could be removed
1319 * - value: string|null
1326 return {value: v}
1331 return {value: v}
1335 value: v,
1338 return 'NOTE: Value `' + v + '` is the default value of the `' + util.camelCaseToHyphened(k) +
1339 '` attribute (the value can be removed).'
1345 value: null,
1347 return 'ERROR: The `' + util.camelCaseToHyphened(k) + '` attribute does not support value `' + v +
1348 '` (the supported value is `' + list.join('`|`') + '`).'
1381 if (util.isValidValue(validateResult.value)) {
1382 let jsonValue = JSON.parse(validateResult.value)
1396 value: length < 2 ? JSON.stringify(resultValues) : null,
1406 value: null,
1408 return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) +
1438 if (util.isValidValue(tempResult.value)) {
1439 result.directions = tempResult.value.split(/\s+/)
1452 if (util.isValidValue(colorStopResult.value)) {
1453 result.values = JSON.parse(colorStopResult.value)
1465 value: length < 2 ? JSON.stringify(result) : null,
1474 value: null,
1476 return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) +
1491 value: length < 2 ? JSON.stringify(resultValues) : null,
1500 value: null,
1502 return 'ERROR: The format of value `' + v + '` of the `'+ util.camelCaseToHyphened(k) +
1509 values.forEach(function (value, n) {
1510 let widthMatch = value.match(/[\s]+[-+0-9]+(px|%|vp|fp)?$/)
1514 let index = value.indexOf(widthMatch[0])
1515 value = value.substring(0, index)
1516 if (util.isValidValue(matchResult.value)) {
1517 tempValues.push(matchResult.value)
1525 if (value) {
1526 let colorResult = COLOR_VAR_VALIDATOR(value)
1527 if (util.isValidValue(colorResult.value)) {
1528 tempValues.unshift(colorResult.value)
1531 let check = checkReason(colorResult, n.toString(), value, length)
1546 reason = result.reason(k, v, result.value)
1574 value: Math.round(180 * angle / Math.PI) + SUPPORT_CSS_ANGLE_UNIT[0]
1578 return { value: v }
1581 value: angle + SUPPORT_CSS_ANGLE_UNIT[0],
1592 value: parseFloat(v) + SUPPORT_CSS_ANGLE_UNIT[0],
1594 return 'WARNING: No unit is specified for the value `' + v +
1602 value: null,
1604 return 'ERROR: The `' + util.camelCaseToHyphened(k) + '` attribute does not support value `'
1618 values.forEach(function (value) {
1619 if (value === 'to') {
1621 } else if (scaleY.includes(value)) {
1623 } else if (scaleX.includes(value)) {
1638 value: invalid ? null : v,
1641 return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) +
1650 return { value: "none" }
1660 return { value: "@sys.media." + OHOS_THEME_PROP_GROUPS[resourceName] }
1669 return { value: "@app.media." + resourceName}
1677 return { value: matchValues[0] }
1681 value: matchValues[1],
1686 return { value: matchValues[1] }
1692 value: null,
1704 return { value: v }
1707 value: null,
1709 return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) +
1720 value: parseInt(v, 10)
1723 return { value: -1 }
1726 value: null,
1728 return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) +
1741 return { value: v }
1750 value: null,
1763 return { value: v }
1776 value: null,
1788 values.forEach(function(value, index) {
1789 if (/^(left|right|top|bottom|center)$/.test(value)) {
1790 result.push(value)
1791 if (checkDirection(value)) {
1792 directions.push(checkDirection(value))
1795 let tempResult = PERCENTAGE_LENGTH_VALIDATOR(value)
1796 if (tempResult.value) {
1797 result.push(value)
1815 value: result.length > 0 ? result.join(' ') : null,
1855 if (typeof COLOR_VAR_VALIDATOR(realValue).value == 'string') {
1856 resultValues.push(COLOR_VAR_VALIDATOR(realValue).value)
1858 } else if (typeof URL_VALIDATOR(realValue).value == 'string') {
1859 resultValues.push(URL_VALIDATOR(realValue).value)
1862 reason = 'value'
1877 value : null,
1879 return reason == 'value' ?
1888 value: resultValues.join(" ")
1892 value: null,
1905 return { value: v }
1918 value: null,
1930 values.forEach(function (value, index) {
1931 if (/^(left|right|top|bottom|center)$/.test(value)) {
1932 result.push(value)
1933 directions.push(checkDirection(value))
1935 let tempResult = PERCENTAGE_LENGTH_VALIDATOR(value)
1936 if (tempResult.value) {
1937 result.push(value)
1956 value: result.length > 0 ? result.join(' ') : null,
1971 return { value: v }
1997 value: null,
1999 return 'ERROR: The `' + util.camelCaseToHyphened(k) + '` attribute does not support value `' + v + '`.'
2006 let value = []
2011 if (!res.value) {
2012 value = null
2016 value.push(res.value)
2022 if (!value) {
2024 value: value,
2029 value: value.join(' '),
2045 return { value: v }
2048 value: null,
2050 return 'ERROR: The format of value `' + v + '` of the `' +
2060 return { value: v }
2063 value: null,
2065 return 'ERROR: The format of value `' + v + '` of the `' +
2075 return { value: v }
2083 if(util.isValidValue(blurStyleResult.value)){
2084 return { value: v }
2093 value: check.length < 2 ? JSON.stringify(blurStyleResult.value) : null,
2101 value: null,
2103 return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k) +
2122 let value = {
2133 value = BORDER_IMAGE_NOL(res[1]);
2134 value.repeat = res[2];
2138 value = BORDER_IMAGE_NOL(result[2]);
2141 value.url = result[1];
2142 base.values.push(value);
2144 value: JSON.stringify(base)
2149 let value = {
2155 return value;
2160 value.slice = BORDER_IMAGE_SPLIT(num[0]);
2163 value.slice = BORDER_IMAGE_SPLIT(num[0]);
2164 value.width = BORDER_IMAGE_SPLIT(num[1]);
2167 value.slice = BORDER_IMAGE_SPLIT(num[0]);
2168 value.width = BORDER_IMAGE_SPLIT(num[1]);
2169 value.outset = BORDER_IMAGE_SPLIT(num[2]);
2172 return value;
2178 const value = NUM_REGEXP.value.split(/\s/);
2179 value.forEach(element => {
2195 let value = {};
2196 if (util.isValidValue(gradient.value)) {
2197 value = JSON.parse(gradient.value)
2201 value.slice = BORDER_IMAGE_SPLIT(valueMatch[3]);
2203 base.values.push(value);
2205 value: JSON.stringify(base),
2210 value: null,
2212 return 'ERROR: The format of value `' + v + '` of the `' + util.camelCaseToHyphened(k)
2225 base.cValues.push(COLOR_VAR_VALIDATOR(element).value);
2228 value: JSON.stringify(base)
3101 var result = {value: getValue, unit: getUnit}
3105 function isOperator(value) {
3107 return operatorString.indexOf(value) > -1
3110 function getPrioraty(value) {
3111 switch(value) {
3134 var value, log
3160 value: outputQueue,
3166 var value, log
3191 var value, log, errLog
3200 return { value: null, log: errLog }
3202 var result, value, unit
3209 value = leftValue.value * rightValue.value
3213 result = value + unit
3215 if (parseInt(rightValue.value) != 0) {
3216 value = leftValue.value / rightValue.value
3218 result = value + unit
3222 value = parseInt(leftValue.value) + parseInt(rightValue.value)
3224 result = value + unit
3228 value = parseInt(leftValue.value) - parseInt(rightValue.value)
3230 result = value + unit
3234 return { value: result, log: null }
3239 var value, res, log
3254 value: null,
3258 outputStack.push(res.value)
3266 value = 'calc' + outputStack[0]
3268 value = outputStack[0]
3272 value: value,
3279 function saveCssProp(name, value) {
3281 while (value.match(/var/)) {
3282 var value = cssVarFun(value)
3284 cssPropData.push({name: name,value: value})
3288 function cssVarFun(value) {
3289 if (value.match(/calc/)) {
3290 return value
3292 if (value.match(/var/)) {
3293 if (value.match(/\,/)) {
3294 var cssVarFir = value.substring(0,value.indexOf(",")).replace("var(","").trim()
3295 var cssVarSec = value.substring(value.indexOf(",")+1,value.length).replace(")","").trim()
3297 var cssVarFir = value.replace("var(","").replace(")","").trim()
3305 varValue = cssPropData[i].value
3310 return value
3315 function expValidate(name, value) {
3317 saveCssProp(name, value)
3318 if (typeof value === 'string' && name != 'border') {
3319 if (value.match(/var/)) {
3320 value = cssVarFun(value)
3322 if (value.match(/calc/)) {
3325 if (value.match(checkOp) && value.match(/calc\(|var\(\-\-/)) {
3331 res = dal2Rpn(value)
3332 res = evalRpn(res.value)
3334 value = res.value
3338 value: value,
3344 * validate a CSS name/value pair
3347 * @param {string} value
3349 * - value:string or null
3352 function validate(name, value) {
3354 expRes = expValidate(name, value)
3357 value: null,
3361 value = expRes.value
3367 const flag = /{{{(.+?)}}}|{{(.+?)}}/.test(value) && card
3368 if (typeof value !== 'function' && !flag) {
3369 result = validator(value, name)
3373 result = {value: value}
3376 log = {reason: result.reason(name, value, result.value)}
3382 if (typeof value !== 'function') {
3383 var match = value.match(LENGTH_REGEXP)
3385 value = parseFloat(value)
3388 result = {value: value}
3395 value: result.value,