@eturnity/eturnity_reusable_components 1.1.45 → 1.1.48

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": "1.1.45",
3
+ "version": "1.1.48",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -8,6 +8,7 @@
8
8
  v-if="!!infoText"
9
9
  size="14"
10
10
  borderColor="#ccc"
11
+ :alignText="alignInfoText"
11
12
  />
12
13
  </subtitle-text>
13
14
  </template>
@@ -54,6 +55,10 @@ export default {
54
55
  required: false,
55
56
  default: null,
56
57
  },
58
+ alignInfoText: {
59
+ required: false,
60
+ default: "left",
61
+ },
57
62
  },
58
63
  }
59
64
  </script>
@@ -525,17 +525,24 @@ export default {
525
525
  this.$emit("custom-input-change", event)
526
526
  },
527
527
  setDropdownWidth(options) {
528
+ this.dynamicWidth = []
528
529
  options.map((item) => {
529
530
  this.optionsDisplay.map((header, index) => {
530
531
  let value =
531
532
  header === "template"
532
533
  ? this.$gettext("No main component template")
533
534
  : item[header]
535
+
536
+ value = !!value ? value : ""
537
+
534
538
  if (
535
- this.dynamicWidth.length < this.optionsDisplay.length ||
536
- value.length > this.dynamicWidth[index]
539
+ this.optionsDisplay.length &&
540
+ (this.dynamicWidth.length < this.optionsDisplay.length ||
541
+ value.length > this.dynamicWidth[index])
537
542
  ) {
538
- this.dynamicGridWidth[index] = value.length + "ch"
543
+ if (Array.isArray(this.dynamicGridWidth)) {
544
+ this.dynamicGridWidth[index] = value.length + "ch"
545
+ }
539
546
  this.dynamicWidth[index] = value.length
540
547
  }
541
548
  })
@@ -564,14 +571,10 @@ export default {
564
571
  }
565
572
  },
566
573
  optionItems(val) {
567
- console.log("optionItems", val)
568
- if (val.length) {
574
+ if (val && val.length) {
569
575
  this.setDropdownWidth(val)
570
576
  }
571
577
  },
572
578
  },
573
- mounted() {
574
- console.log("optionsDisplay", this.optionsDisplay)
575
- },
576
579
  }
577
580
  </script>