@eturnity/eturnity_reusable_components 8.22.16 → 8.22.17
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
@@ -1003,11 +1003,19 @@
|
|
1003
1003
|
},
|
1004
1004
|
onInputBlur(e) {
|
1005
1005
|
this.isFocused = false
|
1006
|
-
|
1007
|
-
|
1008
|
-
this
|
1009
|
-
}
|
1010
|
-
this
|
1006
|
+
let evaluatedVal
|
1007
|
+
try {
|
1008
|
+
evaluatedVal = this.onEvaluateCode(this.enteredValue)
|
1009
|
+
} finally {
|
1010
|
+
this.inputValue = this.onChangeHandler(evaluatedVal)
|
1011
|
+
if (
|
1012
|
+
this.enteredval != '' &&
|
1013
|
+
this.inputValue !== undefined &&
|
1014
|
+
!Number.isNaN(this.inputValue) &&
|
1015
|
+
typeof this.inputValue == 'number'
|
1016
|
+
) {
|
1017
|
+
this.$emit(EVENT_TYPES.INPUT_BLUR, this.inputValue)
|
1018
|
+
}
|
1011
1019
|
}
|
1012
1020
|
},
|
1013
1021
|
focusInput() {
|
@@ -1016,8 +1024,11 @@
|
|
1016
1024
|
}
|
1017
1025
|
this.isFocused = true
|
1018
1026
|
this.textInput = this.formatWithCurrency(this.value)
|
1019
|
-
this.
|
1020
|
-
|
1027
|
+
this.enteredValue = stringToNumber({
|
1028
|
+
value: this.textInput,
|
1029
|
+
numberPrecision: this.numberPrecision,
|
1030
|
+
minDecimals: this.minDecimals,
|
1031
|
+
})
|
1021
1032
|
this.$nextTick(() => {
|
1022
1033
|
this.$refs.inputField1.$el.select()
|
1023
1034
|
})
|
@@ -1051,7 +1062,10 @@
|
|
1051
1062
|
: adjustedMinValue
|
1052
1063
|
let unit = this.showLinearUnitName ? '' : this.unitName
|
1053
1064
|
//return input + ' ' + unit
|
1054
|
-
|
1065
|
+
if (unit) {
|
1066
|
+
return input + ' ' + unit
|
1067
|
+
}
|
1068
|
+
return input
|
1055
1069
|
} else if (!adjustedMinValue && adjustedMinValue !== 0) {
|
1056
1070
|
return ''
|
1057
1071
|
} else if (this.isFocused) {
|