@eturnity/eturnity_reusable_components 6.33.1-EPDM-6487 → 6.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eturnity/eturnity_reusable_components",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.34.0",
|
4
4
|
"private": false,
|
5
5
|
"scripts": {
|
6
6
|
"dev": "vue-cli-service serve",
|
@@ -60,4 +60,4 @@
|
|
60
60
|
"author": "Aaron Enser",
|
61
61
|
"license": "ISC",
|
62
62
|
"homepage": "https://bitbucket.org/eturnitydevs/eturnity_reusable_components#readme"
|
63
|
-
}
|
63
|
+
}
|
@@ -311,8 +311,7 @@ export default {
|
|
311
311
|
return {
|
312
312
|
textInput: '',
|
313
313
|
isFocused: false,
|
314
|
-
warningIcon: warningIcon
|
315
|
-
isBlurred: false
|
314
|
+
warningIcon: warningIcon
|
316
315
|
}
|
317
316
|
},
|
318
317
|
props: {
|
@@ -489,9 +488,7 @@ export default {
|
|
489
488
|
return num
|
490
489
|
}
|
491
490
|
})
|
492
|
-
let evaluated
|
493
|
-
formatted = this.removeStringItemsAfterLastNumber(formatted)
|
494
|
-
evaluated = eval(formatted.join(' '))
|
491
|
+
let evaluated = eval(formatted.join(''))
|
495
492
|
if (typeof evaluated === 'string') {
|
496
493
|
evaluated = stringToNumber({
|
497
494
|
value: evaluated,
|
@@ -502,32 +499,7 @@ export default {
|
|
502
499
|
}
|
503
500
|
return evaluated
|
504
501
|
},
|
505
|
-
removeStringItemsAfterLastNumber(array) {
|
506
|
-
// fixed in EPDM-6487, in order to prevent 'Unexpected end of input'
|
507
|
-
let lastNumberIndex = -1
|
508
|
-
// Find the index of the last number in the array
|
509
|
-
for (let i = array.length - 1; i >= 0; i--) {
|
510
|
-
if (typeof array[i] === 'number') {
|
511
|
-
lastNumberIndex = i
|
512
|
-
break
|
513
|
-
}
|
514
|
-
}
|
515
|
-
// if there are no numbers, return an empty array
|
516
|
-
if (lastNumberIndex === -1) {
|
517
|
-
return []
|
518
|
-
}
|
519
|
-
// Remove non-numeric items after the last number
|
520
|
-
if (lastNumberIndex !== -1) {
|
521
|
-
const newArray = array.slice(0, lastNumberIndex + 1)
|
522
|
-
return newArray
|
523
|
-
}
|
524
|
-
return array
|
525
|
-
},
|
526
502
|
onInput(value) {
|
527
|
-
if (this.isBlurred) {
|
528
|
-
this.isBlurred = false
|
529
|
-
return
|
530
|
-
}
|
531
503
|
if (value === '') {
|
532
504
|
this.$emit('on-input', '')
|
533
505
|
}
|
@@ -542,8 +514,6 @@ export default {
|
|
542
514
|
},
|
543
515
|
onInputBlur(e) {
|
544
516
|
this.isFocused = false
|
545
|
-
// setting isBlurred so we don't trigger onInput as well
|
546
|
-
this.isBlurred = true
|
547
517
|
let value = e.target.value
|
548
518
|
let evaluatedInput = this.onEvaluateCode(value)
|
549
519
|
this.onChangeHandler(evaluatedInput ? evaluatedInput : value)
|