@eturnity/eturnity_reusable_components 7.4.4-EPDM-7260.21 → 7.4.4-EPDM-7260.23

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": "7.4.4-EPDM-7260.21",
3
+ "version": "7.4.4-EPDM-7260.23",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -351,7 +351,7 @@ const inputAttrs = { alignItems: String, hasLabel: Boolean, minWidth: String }
351
351
  const InputWrapper = styled('div', inputAttrs)`
352
352
  position: relative;
353
353
  display: grid;
354
- width: max-content;
354
+ width: 100%;
355
355
  min-width: ${(props) => (props.minWidth ? props.minWidth : '150px')};
356
356
  align-items: center;
357
357
  gap: 8px;
@@ -533,11 +533,7 @@ export default {
533
533
  data() {
534
534
  return {
535
535
  selectedValue: null,
536
- paddingLeft: this.isDraggable
537
- ? '30px'
538
- : this.leftPadding
539
- ? this.leftPadding
540
- : '15px',
536
+ paddingLeft: this.isDraggable ? '30px' : this.leftPadding,
541
537
  isDropdownOpen: false,
542
538
  isActive: false,
543
539
  textSearch: '',
@@ -788,12 +784,9 @@ export default {
788
784
  return Number(item.replace('px', ''))
789
785
  }
790
786
 
791
- const value =
792
- this.selectWidth === '100%'
793
- ? '100%'
794
- : removePX(this.selectWidth) - removePX(CARET_WIDTH)
795
-
796
- return value + 'px'
787
+ return this.selectWidth === '100%'
788
+ ? '100%'
789
+ : removePX(this.selectWidth) - removePX(CARET_WIDTH) + 'px'
797
790
  },
798
791
  getOptionWidth() {
799
792
  if (this.optionWidth) return this.optionWidth
@@ -508,6 +508,8 @@ export default {
508
508
  },
509
509
  watch: {
510
510
  labels(newVal, oldVal) {
511
+ const overlapContainer = []
512
+
511
513
  //check items for overlap
512
514
  if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
513
515
  const labels = newVal.find((label) => label.placement === 'left')
@@ -515,9 +517,14 @@ export default {
515
517
  if (labels) {
516
518
  labels.value.forEach((label) => {
517
519
  label.selectedTariffs.forEach((tariff) => {
518
- this.hasOverlap = this.checkOverlap(tariff, label.selectedTariffs)
520
+ const hasOverlap = this.checkOverlap(
521
+ tariff,
522
+ label.selectedTariffs
523
+ )
524
+
525
+ overlapContainer.push(hasOverlap)
519
526
 
520
- if (this.hasOverlap) {
527
+ if (hasOverlap) {
521
528
  const existing = this.OverlapId.find((id) => id === label.id)
522
529
 
523
530
  if (!existing) this.OverlapId.push(label.id)
@@ -530,7 +537,8 @@ export default {
530
537
  })
531
538
  }
532
539
 
533
- this.$emit('has-overlap', this.hasOverlap)
540
+ this.hasOverlap = overlapContainer.includes(true)
541
+ this.$emit('has-overlap', overlapContainer.includes(true))
534
542
  }
535
543
  }
536
544
  }