@eturnity/eturnity_reusable_components 6.38.0 → 6.39.1-qa-3d-6.41.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "6.38.0",
3
+ "version": "6.39.1-qa-3d-6.41.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -60,4 +60,4 @@
60
60
  "author": "Aaron Enser",
61
61
  "license": "ISC",
62
62
  "homepage": "https://bitbucket.org/eturnitydevs/eturnity_reusable_components#readme"
63
- }
63
+ }
@@ -5,6 +5,7 @@
5
5
  :minWidth="minWidth"
6
6
  :isDisabled="isDisabled"
7
7
  :customColor="customColor"
8
+ :noWrap="noWrap"
8
9
  >
9
10
  {{ text }}
10
11
  </button-container>
@@ -26,7 +27,7 @@ import styled from "vue-styled-components"
26
27
 
27
28
  const PageContainer = styled.div``
28
29
 
29
- const ButtonAttrs = { type: String, isDisabled: Boolean, minWidth: String, customColor: String }
30
+ const ButtonAttrs = { type: String, isDisabled: Boolean, minWidth: String, customColor: String, noWrap: Boolean }
30
31
  const ButtonContainer = styled("div", ButtonAttrs)`
31
32
  padding: 7px 15px;
32
33
  font-size: 13px;
@@ -48,6 +49,7 @@ const ButtonContainer = styled("div", ButtonAttrs)`
48
49
  cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
49
50
  user-select: none;
50
51
  ${(props) => (props.minWidth ? `min-width: ${props.minWidth};` : '')};
52
+ ${(props) => (props.noWrap ? `white-space: nowrap;` : '')};
51
53
 
52
54
  &:hover {
53
55
  opacity: ${(props) => (props.isDisabled ? "1" : "0.8")};
@@ -80,6 +82,10 @@ export default {
80
82
  required: false,
81
83
  default: null,
82
84
  },
85
+ noWrap: {
86
+ required: false,
87
+ default: false
88
+ },
83
89
  minWidth: {
84
90
  required: false,
85
91
  default: null
@@ -311,7 +311,8 @@ export default {
311
311
  return {
312
312
  textInput: '',
313
313
  isFocused: false,
314
- warningIcon: warningIcon
314
+ warningIcon: warningIcon,
315
+ isBlurred: false
315
316
  }
316
317
  },
317
318
  props: {
@@ -432,6 +433,10 @@ export default {
432
433
  labelFontColor: {
433
434
  required: false,
434
435
  default: 'eturnityGrey'
436
+ },
437
+ focus:{
438
+ required: false,
439
+ default: false
435
440
  }
436
441
  },
437
442
  computed: {
@@ -488,7 +493,9 @@ export default {
488
493
  return num
489
494
  }
490
495
  })
491
- let evaluated = eval(formatted.join(''))
496
+ let evaluated
497
+ formatted = this.removeStringItemsAfterLastNumber(formatted)
498
+ evaluated = eval(formatted.join(' '))
492
499
  if (typeof evaluated === 'string') {
493
500
  evaluated = stringToNumber({
494
501
  value: evaluated,
@@ -499,7 +506,32 @@ export default {
499
506
  }
500
507
  return evaluated
501
508
  },
509
+ removeStringItemsAfterLastNumber(array) {
510
+ // fixed in EPDM-6487, in order to prevent 'Unexpected end of input'
511
+ let lastNumberIndex = -1
512
+ // Find the index of the last number in the array
513
+ for (let i = array.length - 1; i >= 0; i--) {
514
+ if (typeof array[i] === 'number') {
515
+ lastNumberIndex = i
516
+ break
517
+ }
518
+ }
519
+ // if there are no numbers, return an empty array
520
+ if (lastNumberIndex === -1) {
521
+ return []
522
+ }
523
+ // Remove non-numeric items after the last number
524
+ if (lastNumberIndex !== -1) {
525
+ const newArray = array.slice(0, lastNumberIndex + 1)
526
+ return newArray
527
+ }
528
+ return array
529
+ },
502
530
  onInput(value) {
531
+ if (this.isBlurred) {
532
+ this.isBlurred = false
533
+ return
534
+ }
503
535
  if (value === '') {
504
536
  this.$emit('on-input', '')
505
537
  }
@@ -514,6 +546,8 @@ export default {
514
546
  },
515
547
  onInputBlur(e) {
516
548
  this.isFocused = false
549
+ // setting isBlurred so we don't trigger onInput as well
550
+ this.isBlurred = true
517
551
  let value = e.target.value
518
552
  let evaluatedInput = this.onEvaluateCode(value)
519
553
  this.onChangeHandler(evaluatedInput ? evaluatedInput : value)
@@ -544,7 +578,7 @@ export default {
544
578
  }
545
579
  this.isFocused = true
546
580
  this.$nextTick(() => {
547
- this.$refs.inputField1.$el.select()
581
+ this.$refs.inputField1.$el.focus()
548
582
  })
549
583
  this.$emit('input-focus')
550
584
  },
@@ -630,7 +664,17 @@ export default {
630
664
  })
631
665
  }
632
666
  },
667
+ mounted(){
668
+ if(this.focus){
669
+ this.focusInput()
670
+ }
671
+ },
633
672
  watch: {
673
+ focus(value){
674
+ if(value){
675
+ this.focusInput()
676
+ }
677
+ },
634
678
  clearInput: function (value) {
635
679
  if (value) {
636
680
  // If the value is typed, then we should clear the textInput on Continue
@@ -20,7 +20,9 @@ export const stringToNumber = ({
20
20
  selectedLang === 'de-be' ||
21
21
  selectedLang === 'es-es' ||
22
22
  selectedLang === 'de' ||
23
+ selectedLang === 'de-at' ||
23
24
  selectedLang === 'it' ||
25
+ selectedLang === 'it-it' ||
24
26
  selectedLang === 'nl-nl' ||
25
27
  selectedLang === 'nl-be'
26
28
  ) {
@@ -8,6 +8,8 @@ export const translateLang = (lang) => {
8
8
  return 'english_uk'
9
9
  } else if (lang === 'de' || lang === 'de-de') {
10
10
  return 'german'
11
+ } else if (lang === 'de-at') {
12
+ return 'german_at'
11
13
  } else if (lang === 'de-ch') {
12
14
  return 'german_ch'
13
15
  } else if (lang === 'de-lu') {
@@ -34,8 +36,10 @@ export const translateLang = (lang) => {
34
36
  return 'swedish'
35
37
  } else if (lang === 'no-no' || lang === 'nb-no') {
36
38
  return 'norwegian'
37
- } else if (lang === 'nl-nl' || lang === 'nl') {
38
- return 'nl-nl'
39
+ } else if (lang === 'nl-nl') {
40
+ return 'dutch_nl'
41
+ } else if (lang === 'nl-be') {
42
+ return 'dutch_be'
39
43
  } else if (lang === 'cs') {
40
44
  return 'czech'
41
45
  } else if (lang === 'fi-fi') {