@eturnity/eturnity_reusable_components 1.2.19-3d-master.0 → 1.2.19-3d-master.1
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/babel.config.js
CHANGED
package/package.json
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
:placeholder="displayedPlaceholder"
|
|
21
21
|
:isError="isError"
|
|
22
22
|
:inputWidth="inputWidth"
|
|
23
|
+
:inputHeight="inputHeight"
|
|
23
24
|
:minWidth="minWidth"
|
|
24
25
|
:value="formatWithCurrency(value)"
|
|
25
26
|
@blur="onInputBlur($event)"
|
|
@@ -101,7 +102,8 @@ const inputProps = {
|
|
|
101
102
|
fontSize: String,
|
|
102
103
|
fontColor: String,
|
|
103
104
|
hasSlot: Boolean,
|
|
104
|
-
slotSize: String
|
|
105
|
+
slotSize: String,
|
|
106
|
+
inputHeight:String
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
const Container = styled('div', inputProps)`
|
|
@@ -140,7 +142,7 @@ const InputContainer = styled('input', inputProps)`
|
|
|
140
142
|
background-color: ${(props) =>
|
|
141
143
|
props.isDisabled ? props.theme.colors.grey5 : '#fff'};
|
|
142
144
|
box-sizing: border-box;
|
|
143
|
-
|
|
145
|
+
max-height: ${(props) => (props.inputHeight)};
|
|
144
146
|
&::placeholder {
|
|
145
147
|
color: ${(props) =>
|
|
146
148
|
props.isError ? props.theme.colors.red : props.theme.colors.darkGray};
|
|
@@ -258,6 +260,10 @@ export default {
|
|
|
258
260
|
required: false,
|
|
259
261
|
default: null
|
|
260
262
|
},
|
|
263
|
+
inputHeight:{
|
|
264
|
+
required:false,
|
|
265
|
+
default:null
|
|
266
|
+
},
|
|
261
267
|
value: {
|
|
262
268
|
required: true,
|
|
263
269
|
default: null
|
|
@@ -390,6 +396,8 @@ export default {
|
|
|
390
396
|
value: evaluated,
|
|
391
397
|
numberPrecision: this.numberPrecision
|
|
392
398
|
})
|
|
399
|
+
}else if(typeof evaluated === 'number'){
|
|
400
|
+
evaluated=evaluated.toFixed(this.numberPrecision)
|
|
393
401
|
}
|
|
394
402
|
return evaluated
|
|
395
403
|
},
|
|
@@ -406,11 +414,11 @@ export default {
|
|
|
406
414
|
})
|
|
407
415
|
}
|
|
408
416
|
let adjustedMinValue =
|
|
409
|
-
|
|
410
|
-
?
|
|
417
|
+
evaluatedInput && evaluatedInput.length
|
|
418
|
+
? evaluatedInput
|
|
411
419
|
: this.minNumber || this.minNumber === 0
|
|
412
420
|
? this.minNumber
|
|
413
|
-
: ''
|
|
421
|
+
: ''
|
|
414
422
|
this.$emit('input-blur', adjustedMinValue)
|
|
415
423
|
},
|
|
416
424
|
focusInput() {
|
|
@@ -438,6 +446,7 @@ export default {
|
|
|
438
446
|
})
|
|
439
447
|
: adjustedMinValue
|
|
440
448
|
let unit = this.showLinearUnitName ? '' : this.unitName
|
|
449
|
+
//return input + ' ' + unit
|
|
441
450
|
return input + ' ' + unit
|
|
442
451
|
} else if (!adjustedMinValue && adjustedMinValue !== 0) {
|
|
443
452
|
return ''
|
|
@@ -94,6 +94,7 @@ export const numberToString = ({ value, numberPrecision }) => {
|
|
|
94
94
|
? 'fr-fr'
|
|
95
95
|
: localStorage.getItem('lang')
|
|
96
96
|
: 'en-US'
|
|
97
|
+
value=parseFloat(value)
|
|
97
98
|
return value.toLocaleString(selectedLang, {
|
|
98
99
|
minimumFractionDigits: numberPrecision,
|
|
99
100
|
maximumFractionDigits: numberPrecision
|