@eturnity/eturnity_reusable_components 6.43.9-EPDM-3186.2 → 6.43.9-EPDM-6226.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
@@ -510,8 +510,13 @@ export default {
|
|
510
510
|
}
|
511
511
|
},
|
512
512
|
methods: {
|
513
|
-
toggleOpen() {
|
514
|
-
if (
|
513
|
+
toggleOpen(event) {
|
514
|
+
if (
|
515
|
+
this.isDisabled ||
|
516
|
+
(event &&
|
517
|
+
!(event.target === this.$el) &&
|
518
|
+
!this.$el.contains(event.target))
|
519
|
+
) {
|
515
520
|
return
|
516
521
|
}
|
517
522
|
this.wasClicked = false
|
@@ -1,11 +1,12 @@
|
|
1
|
-
import { langForLocaleString } from './translateLang'
|
2
|
-
|
3
1
|
export const stringToNumber = ({
|
4
|
-
value
|
2
|
+
value,
|
5
3
|
numberPrecision = false,
|
6
|
-
allowNegative
|
4
|
+
allowNegative
|
7
5
|
}) => {
|
8
6
|
// This is for saving. It converts our input string to a readable number
|
7
|
+
if (value === undefined) {
|
8
|
+
value = ''
|
9
|
+
}
|
9
10
|
let newVal = value.toString()
|
10
11
|
const selectedLang = localStorage.getItem('lang')
|
11
12
|
// The first replace will replace not allowed characters with a blank
|
@@ -92,18 +93,17 @@ export const stringToNumber = ({
|
|
92
93
|
}
|
93
94
|
|
94
95
|
export const numberToString = ({ value, numberPrecision }) => {
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
minNumberPrecision = numberPrecision[0]
|
103
|
-
maxNumberPrecision = numberPrecision[1]
|
96
|
+
let selectedLang = localStorage.getItem('lang')
|
97
|
+
? localStorage.getItem('lang') === 'fr-lu'
|
98
|
+
? 'fr-fr'
|
99
|
+
: localStorage.getItem('lang')
|
100
|
+
: 'en-US'
|
101
|
+
if (selectedLang == 'null') {
|
102
|
+
selectedLang = 'en-US'
|
104
103
|
}
|
105
|
-
|
106
|
-
|
107
|
-
|
104
|
+
value = parseFloat(value)
|
105
|
+
return value.toLocaleString(selectedLang, {
|
106
|
+
minimumFractionDigits: numberPrecision,
|
107
|
+
maximumFractionDigits: numberPrecision
|
108
108
|
})
|
109
109
|
}
|
@@ -78,7 +78,6 @@ export const datePickerLang = (lang) => {
|
|
78
78
|
}
|
79
79
|
|
80
80
|
export const tinyLanguage = (lang) => {
|
81
|
-
// the function is used to pass correct language to Tiny MCE text editor https://www.tiny.cloud/docs/tinymce/6/ui-localization/#language
|
82
81
|
if (
|
83
82
|
lang === 'de' ||
|
84
83
|
lang === 'de-de' ||
|
@@ -107,14 +106,3 @@ export const tinyLanguage = (lang) => {
|
|
107
106
|
return langCode
|
108
107
|
}
|
109
108
|
}
|
110
|
-
|
111
|
-
export const langForLocaleString = () => {
|
112
|
-
const selectedLang = localStorage.getItem('lang')
|
113
|
-
? localStorage.getItem('lang') === 'fr-lu'
|
114
|
-
? 'fr-fr'
|
115
|
-
: localStorage.getItem('lang') === 'fr-ch'
|
116
|
-
? 'de-ch'
|
117
|
-
: localStorage.getItem('lang')
|
118
|
-
: 'en-US'
|
119
|
-
return selectedLang !== 'null' ? selectedLang : 'en-US'
|
120
|
-
}
|