@eturnity/eturnity_reusable_components 1.1.95 → 1.1.98
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
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
:inputWidth="inputWidth"
|
|
22
22
|
:minWidth="minWidth"
|
|
23
23
|
:value="formatWithCurrency(value)"
|
|
24
|
-
:hasLength="!!value && !!value.length"
|
|
25
24
|
@blur="onInputBlur($event)"
|
|
26
25
|
@focus="focusInput()"
|
|
27
26
|
@keyup.enter="$emit('on-enter-click')"
|
|
@@ -86,7 +85,6 @@ const inputProps = {
|
|
|
86
85
|
hasUnit: Boolean,
|
|
87
86
|
inputWidth: String,
|
|
88
87
|
minWidth: String,
|
|
89
|
-
hasLength: Boolean,
|
|
90
88
|
isDisabled: Boolean,
|
|
91
89
|
noBorder: Boolean,
|
|
92
90
|
textAlign: String,
|
|
@@ -99,8 +97,6 @@ const InputContainer = styled("input", inputProps)`
|
|
|
99
97
|
? "1px solid " + props.theme.colors.red
|
|
100
98
|
: props.noBorder
|
|
101
99
|
? "none"
|
|
102
|
-
: props.hasLength
|
|
103
|
-
? "1px solid " + props.theme.colors.black
|
|
104
100
|
: "1px solid " + props.theme.colors.mediumGray};
|
|
105
101
|
padding: ${(props) =>
|
|
106
102
|
props.hasUnit ? "11px 40px 11px 10px" : "11px 5px 11px 10px"};
|
|
@@ -275,7 +271,7 @@ export default {
|
|
|
275
271
|
methods: {
|
|
276
272
|
onChangeHandler(event) {
|
|
277
273
|
if (isNaN(event)) {
|
|
278
|
-
event =
|
|
274
|
+
event = this.minNumber || this.minNumber === 0 ? this.minNumber : event
|
|
279
275
|
}
|
|
280
276
|
this.$emit("input-change", event)
|
|
281
277
|
},
|
|
@@ -310,10 +306,10 @@ export default {
|
|
|
310
306
|
this.isFocused = false
|
|
311
307
|
let value = e.target.value
|
|
312
308
|
let evaluatedInput = this.onEvaluateCode(value)
|
|
313
|
-
this.onChangeHandler(evaluatedInput)
|
|
314
|
-
if ((
|
|
309
|
+
this.onChangeHandler(evaluatedInput ? evaluatedInput : value)
|
|
310
|
+
if ((evaluatedInput && value.length) || this.minNumber !== null) {
|
|
315
311
|
this.textInput = numberToString({
|
|
316
|
-
value:
|
|
312
|
+
value: evaluatedInput && value.length ? evaluatedInput : this.minNumber,
|
|
317
313
|
numberPrecision: this.numberPrecision,
|
|
318
314
|
})
|
|
319
315
|
}
|
|
@@ -341,22 +337,20 @@ export default {
|
|
|
341
337
|
: this.minNumber || this.minNumber === 0
|
|
342
338
|
? this.minNumber
|
|
343
339
|
: ""
|
|
344
|
-
if ((adjustedMinValue || adjustedMinValue === 0) && !this.isFocused
|
|
345
|
-
let input = numberToString({
|
|
340
|
+
if ((adjustedMinValue || adjustedMinValue === 0) && !this.isFocused) {
|
|
341
|
+
let input = this.numberToStringEnabled ? numberToString({
|
|
346
342
|
value: adjustedMinValue,
|
|
347
343
|
numberPrecision: this.numberPrecision,
|
|
348
|
-
})
|
|
344
|
+
}) : adjustedMinValue
|
|
349
345
|
let unit = this.showLinearUnitName ? "" : this.unitName
|
|
350
346
|
return input + " " + unit
|
|
351
347
|
} else if (!adjustedMinValue && adjustedMinValue !== 0) {
|
|
352
348
|
return ""
|
|
353
|
-
} else
|
|
354
|
-
return numberToString({
|
|
349
|
+
} else {
|
|
350
|
+
return this.numberToStringEnabled ? numberToString({
|
|
355
351
|
value: adjustedMinValue,
|
|
356
352
|
numberPrecision: this.numberPrecision,
|
|
357
|
-
})
|
|
358
|
-
} else {
|
|
359
|
-
return adjustedMinValue
|
|
353
|
+
}) : adjustedMinValue
|
|
360
354
|
}
|
|
361
355
|
},
|
|
362
356
|
},
|
|
@@ -218,6 +218,7 @@ const ComponentItem = styled("td", ItemAttrs)`
|
|
|
218
218
|
&.table-dropdown-item {
|
|
219
219
|
background-clip: content-box;
|
|
220
220
|
padding: 8px 0 7px 0 !important;
|
|
221
|
+
vertical-align: middle;
|
|
221
222
|
|
|
222
223
|
@media not all and (min-resolution: 0.001dpcm) {
|
|
223
224
|
@supports (-webkit-appearance: none) {
|