@eturnity/eturnity_reusable_components 1.1.86 → 1.1.89
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
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
:noBorder="noBorder"
|
|
31
31
|
:textAlign="textAlign"
|
|
32
32
|
:fontSize="fontSize"
|
|
33
|
+
:fontColor="fontColor"
|
|
33
34
|
/>
|
|
34
35
|
<unit-container
|
|
35
36
|
v-if="unitName && showLinearUnitName"
|
|
@@ -66,6 +67,7 @@
|
|
|
66
67
|
// labelInfoText="Here is some information for you..."
|
|
67
68
|
// labelInfoAlign="left"
|
|
68
69
|
// :minNumber="0"
|
|
70
|
+
// fontColor="blue"
|
|
69
71
|
// />
|
|
70
72
|
import styled from "vue-styled-components"
|
|
71
73
|
import {
|
|
@@ -89,6 +91,7 @@ const inputProps = {
|
|
|
89
91
|
noBorder: Boolean,
|
|
90
92
|
textAlign: String,
|
|
91
93
|
fontSize: String,
|
|
94
|
+
fontColor: String,
|
|
92
95
|
}
|
|
93
96
|
const InputContainer = styled("input", inputProps)`
|
|
94
97
|
border: ${(props) =>
|
|
@@ -106,7 +109,11 @@ const InputContainer = styled("input", inputProps)`
|
|
|
106
109
|
cursor: ${(props) => (props.isDisabled ? "not-allowed" : "auto")};
|
|
107
110
|
font-size: ${(props) => (props.fontSize ? props.fontSize : "13px")};
|
|
108
111
|
color: ${(props) =>
|
|
109
|
-
props.isError
|
|
112
|
+
props.isError
|
|
113
|
+
? props.theme.colors.red
|
|
114
|
+
: props.fontColor
|
|
115
|
+
? props.fontColor + " !important"
|
|
116
|
+
: props.theme.colors.black};
|
|
110
117
|
width: ${(props) => (props.inputWidth ? props.inputWidth : "100%")};
|
|
111
118
|
min-width: ${(props) => (props.minWidth ? props.minWidth : "unset")};
|
|
112
119
|
background-color: ${(props) =>
|
|
@@ -255,6 +262,10 @@ export default {
|
|
|
255
262
|
required: false,
|
|
256
263
|
default: null,
|
|
257
264
|
},
|
|
265
|
+
fontColor: {
|
|
266
|
+
required: false,
|
|
267
|
+
default: null,
|
|
268
|
+
},
|
|
258
269
|
},
|
|
259
270
|
methods: {
|
|
260
271
|
onChangeHandler(event) {
|
|
@@ -195,7 +195,7 @@ const TableContainer = styled.table`
|
|
|
195
195
|
&.footer {
|
|
196
196
|
td {
|
|
197
197
|
background-color: ${(props) => props.theme.colors.grey5};
|
|
198
|
-
border-top: 1px solid ${(props) => props.theme.colors.grey4};
|
|
198
|
+
/* border-top: 1px solid ${(props) => props.theme.colors.grey4}; */
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
.text {
|
|
@@ -70,7 +70,7 @@ export const stringToNumber = ({ value, numberPrecision, allowNegative }) => {
|
|
|
70
70
|
|
|
71
71
|
export const numberToString = ({ value, numberPrecision }) => {
|
|
72
72
|
let selectedLang = localStorage.getItem("lang")
|
|
73
|
-
? localStorage.getItem("lang")
|
|
73
|
+
? localStorage.getItem("lang") === 'fr-lu' ? 'fr-fr' : localStorage.getItem("lang")
|
|
74
74
|
: "en-US"
|
|
75
75
|
return value.toLocaleString(selectedLang, {
|
|
76
76
|
minimumFractionDigits: numberPrecision,
|
|
@@ -48,3 +48,33 @@ export const translateLang = (lang) => {
|
|
|
48
48
|
return lang
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
|
|
52
|
+
export const datePickerLang = (lang) => {
|
|
53
|
+
if (lang === 'de-de' || lang === 'de-ch' || lang === 'de-lu' || lang === 'de-be') {
|
|
54
|
+
return 'de'
|
|
55
|
+
} else if (lang === 'fr-fr' || lang === 'fr-ch' || lang === 'fr-lu' || lang === 'fr-be') {
|
|
56
|
+
return 'fr'
|
|
57
|
+
} else if (lang === 'it-it' || lang === 'it-ch') {
|
|
58
|
+
return 'it'
|
|
59
|
+
} else {
|
|
60
|
+
return lang
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const tinyLanguage = (lang) => {
|
|
65
|
+
if (lang === 'de' || lang === 'de-de' || lang === 'de-ch' || lang === 'de-lu' || lang === 'de-be') {
|
|
66
|
+
return 'de'
|
|
67
|
+
} else if (lang === 'fr' || lang === 'fr-fr' || lang === 'fr-ch' || lang === 'fr-lu' || lang === 'fr-be') {
|
|
68
|
+
return 'fr_FR'
|
|
69
|
+
} else if (lang === 'it' || lang === 'it-it' || lang === 'it-ch') {
|
|
70
|
+
return 'it-IT'
|
|
71
|
+
} else if (lang === 'en-us') {
|
|
72
|
+
return null
|
|
73
|
+
} else {
|
|
74
|
+
let langCode = lang.replace(/-/g, '_').split('')
|
|
75
|
+
langCode[3] = langCode[3].toUpperCase()
|
|
76
|
+
langCode[4] = langCode[4].toUpperCase()
|
|
77
|
+
langCode = langCode.join('')
|
|
78
|
+
return langCode
|
|
79
|
+
}
|
|
80
|
+
}
|