vue-intergrall-plugins 1.0.51 → 1.0.53

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": "vue-intergrall-plugins",
3
- "version": "1.0.51",
3
+ "version": "1.0.53",
4
4
  "description": "",
5
5
  "main": "dist/vue-intergrall-plugins.ssr.js",
6
6
  "browser": "dist/vue-intergrall-plugins.esm.js",
@@ -2,8 +2,11 @@
2
2
  <div
3
3
  :class="['email-item box-shadow-active', isOpen ? isOpenClass : isClosedClass, showInfos ? 'info-open' : '', origem]">
4
4
  <div v-if="showInfos" class="email-overlay"></div>
5
- <div class="email-author" v-if="autor" :class="[origem]">
5
+ <div class="email-author" v-if="autor" :class="[origem]" @click="toggleIsOpen">
6
6
  <fa-icon :icon="['fas', 'reply']" :class="[origem]" :title="`Enviado por: ${autor}`" />
7
+ <p class="email-author-name" v-text="returnAuthorName()" :title="returnAuthorName()"></p>
8
+ <fa-icon :icon="['fas', origem === 'outros' ? 'user' : 'headset']"
9
+ :title="`E-mail ${origem === 'outros' ? 'recebido' : 'enviado'}`" class="email-to-svg" />
7
10
  </div>
8
11
  <div class="email-header" @click="toggleIsOpen">
9
12
  <p class="email-subject" :title="returnMainValue()">
@@ -12,13 +15,6 @@
12
15
  <div class="header-container">
13
16
  <div class="email-header-content">
14
17
  <div class="email-header-infos">
15
- <template v-if="from && from.length">
16
- <div class="email-to-from-container" ref="fromContainer">
17
- <EmailFrom v-for="(sender, index) in from" :key="`from-${index}`"
18
- :currentName="formattedName(sender.name, index, from.length, isOpen)"
19
- :mail="formattedMail(sender.mail, index, from.length, isOpen)" :showMail="isOpen" />
20
- </div>
21
- </template>
22
18
  <template v-if="para && para.length && isOpen">
23
19
  <div class="email-to-from-container">
24
20
  <EmailTo v-for="(recipient, index) in para" :key="`to-${index}`"
@@ -72,7 +68,6 @@
72
68
  <script>
73
69
  import EmailFile from "./EmailFile.vue";
74
70
  import EmailTo from "./EmailTo.vue";
75
- import EmailFrom from "./EmailFrom.vue";
76
71
  import { textoLongo } from "@/mixins/formatarTexto";
77
72
  import Clickaway from '@/directives/clickaway';
78
73
 
@@ -81,7 +76,7 @@ export default {
81
76
  directives: {
82
77
  clickaway: Clickaway
83
78
  },
84
- components: { EmailFile, EmailTo, EmailFrom },
79
+ components: { EmailFile, EmailTo },
85
80
  props: {
86
81
  dominio: {
87
82
  type: String,
@@ -201,11 +196,17 @@ export default {
201
196
  },
202
197
  mounted() {
203
198
  this.updateIframeContent();
204
- this.updateFromContainerMaxWidth()
205
199
 
206
200
  if (this.refKey) this.$root.$refs[`${refKey}`] = this
207
201
  },
208
202
  methods: {
203
+ returnAuthorName() {
204
+ const { mail, name } = this.from[0]
205
+ if (!name) return mail
206
+ if (!mail) return name
207
+ if (this.isOpen) return `${name} (${mail})`
208
+ return name
209
+ },
209
210
  updateIframeContent() {
210
211
  this.$nextTick(() => {
211
212
  if (this.isOpen) {
@@ -218,15 +219,6 @@ export default {
218
219
  }
219
220
  })
220
221
  },
221
- updateFromContainerMaxWidth() {
222
- this.$nextTick(() => {
223
- const fromContainer = this.$refs.fromContainer
224
- const emailDate = this.$refs.emailDate
225
- if (!fromContainer || !emailDate) return
226
- const MARGIN = 15
227
- fromContainer.style.maxWidth = `calc(100% - ${emailDate.getBoundingClientRect().width + MARGIN}px)`
228
- })
229
- },
230
222
  adjustIframeHeight() {
231
223
  this.$nextTick(() => {
232
224
  const iframe = this.$refs.emailIframe;
@@ -350,19 +342,24 @@ export default {
350
342
  border-left: 3px solid #33B8DF;
351
343
  }
352
344
 
345
+ .email-author-name {
346
+ margin: 0 5px;
347
+ }
348
+
353
349
  .email-author.outros {
354
350
  color: #33B8DF;
355
- justify-content: flex-end;
356
- transform: rotateY(180deg) translateY(-3px);
351
+ }
352
+
353
+ .email-author.outros>svg:nth-child(1) {
354
+ transform: rotate(180deg);
357
355
  }
358
356
 
359
357
  .email-author.principal {
360
- justify-content: flex-end;
361
358
  color: #ebb552;
362
359
  }
363
360
 
364
361
  .email-item.principal {
365
- border-right: 3px solid #ebb552;
362
+ border-left: 3px solid #ebb552;
366
363
  }
367
364
 
368
365
  .email-item.info-open {
@@ -457,6 +454,10 @@ export default {
457
454
  .email-actions>span {
458
455
  width: 4px;
459
456
  height: 4px;
457
+ min-width: 4px;
458
+ min-height: 4px;
459
+ max-width: 4px;
460
+ max-height: 4px;
460
461
  background-color: #222;
461
462
  border-radius: 50%;
462
463
  }
@@ -531,6 +532,7 @@ export default {
531
532
  min-width: 250px;
532
533
  overflow: hidden;
533
534
  display: flex;
535
+ align-items: center;
534
536
  flex-wrap: wrap;
535
537
  flex: 1;
536
538
  gap: 5px;
@@ -581,6 +583,7 @@ export default {
581
583
  font-weight: bold;
582
584
  transform: translateY(-2px);
583
585
  width: 100%;
586
+ cursor: pointer;
584
587
  }
585
588
 
586
589
  .email-subject-secondary {
@@ -591,4 +594,8 @@ export default {
591
594
  font-size: .7rem;
592
595
  color: gray;
593
596
  }
597
+
598
+ .email-to-svg {
599
+ font-size: .85rem;
600
+ }
594
601
  </style>