vue-intergrall-plugins 1.1.1 → 1.1.2
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.
|
@@ -10427,6 +10427,24 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10427
10427
|
return this.anexos.filter(function (anexo) {
|
|
10428
10428
|
return !_this.html.includes(anexo.name);
|
|
10429
10429
|
});
|
|
10430
|
+
},
|
|
10431
|
+
returnAuthorName: function returnAuthorName() {
|
|
10432
|
+
if (!this.from || !this.from.length) return this.autor || '';
|
|
10433
|
+
var _this$from$ = this.from[0],
|
|
10434
|
+
email = _this$from$.email,
|
|
10435
|
+
name = _this$from$.name;
|
|
10436
|
+
if (!name) return email;
|
|
10437
|
+
if (!email) return name;
|
|
10438
|
+
if (this.isOpen) return "".concat(name, " (").concat(email, ")");
|
|
10439
|
+
return name;
|
|
10440
|
+
},
|
|
10441
|
+
formattedToName: function formattedToName() {
|
|
10442
|
+
return function (name, index, length) {
|
|
10443
|
+
var addVirgulaDps = index < length - 1;
|
|
10444
|
+
var addVirgulaAntes = index === 1 && length >= 2;
|
|
10445
|
+
var text = index === 0 ? "Para: ".concat(name || '') : name ? "".concat(addVirgulaAntes ? ', ' : '').concat(name).concat(addVirgulaDps ? ', ' : '') : '';
|
|
10446
|
+
return text;
|
|
10447
|
+
};
|
|
10430
10448
|
}
|
|
10431
10449
|
},
|
|
10432
10450
|
watch: {
|
|
@@ -10448,16 +10466,6 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10448
10466
|
this.hasError = false;
|
|
10449
10467
|
this.$nextTick(this.updateIframeContent());
|
|
10450
10468
|
},
|
|
10451
|
-
returnAuthorName: function returnAuthorName() {
|
|
10452
|
-
if (!this.from || !this.from.length) return this.autor || '';
|
|
10453
|
-
var _this$from$ = this.from[0],
|
|
10454
|
-
email = _this$from$.email,
|
|
10455
|
-
name = _this$from$.name;
|
|
10456
|
-
if (!name) return email;
|
|
10457
|
-
if (!email) return name;
|
|
10458
|
-
if (this.isOpen) return "".concat(name, " (").concat(email, ")");
|
|
10459
|
-
return name;
|
|
10460
|
-
},
|
|
10461
10469
|
gerarMensagemEstilizada: function gerarMensagemEstilizada(msg) {
|
|
10462
10470
|
try {
|
|
10463
10471
|
var currentStyles = [{
|
|
@@ -10639,20 +10647,6 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10639
10647
|
closeActions: function closeActions() {
|
|
10640
10648
|
this.actionsOpen = false;
|
|
10641
10649
|
},
|
|
10642
|
-
formattedName: function formattedName(name, index, length, isOpen) {
|
|
10643
|
-
if (!name) return '--';
|
|
10644
|
-
return "".concat(name || '--').concat(index !== length - 1 && !isOpen ? ', ' : '');
|
|
10645
|
-
},
|
|
10646
|
-
formattedMail: function formattedMail(email, index, length, isOpen) {
|
|
10647
|
-
if (!email) return '';
|
|
10648
|
-
return "<".concat(email || '--').concat(index !== length - 1 && isOpen ? '>, ' : '>');
|
|
10649
|
-
},
|
|
10650
|
-
formattedToName: function formattedToName(name, index, length) {
|
|
10651
|
-
var addVirgulaDps = index < length - 1;
|
|
10652
|
-
var addVirgulaAntes = index === 1 && length >= 2;
|
|
10653
|
-
var text = index === 0 ? "Para: ".concat(name || '') : name ? "".concat(addVirgulaAntes ? ', ' : '').concat(name).concat(addVirgulaDps ? ', ' : '') : '';
|
|
10654
|
-
return text;
|
|
10655
|
-
},
|
|
10656
10650
|
returnMainValue: function returnMainValue() {
|
|
10657
10651
|
if (this.isMainEmail) return this.htmlEntityToEmoji(this.replaceUnicodeWithEmoji(this.assunto)) || '(Sem assunto)';
|
|
10658
10652
|
return '';
|
|
@@ -10695,19 +10689,19 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10695
10689
|
return _vm.openByItem($event);
|
|
10696
10690
|
}
|
|
10697
10691
|
}
|
|
10698
|
-
}, [_vm._ssrNode((_vm.showInfos ? "<div class=\"email-overlay\" data-v-
|
|
10692
|
+
}, [_vm._ssrNode((_vm.showInfos ? "<div class=\"email-overlay\" data-v-0df370a6></div>" : "<!---->") + " "), _vm.autor ? _vm._ssrNode("<div" + _vm._ssrClass("email-author", [_vm.origem, _vm.isMainEmail ? 'main' : '']) + " data-v-0df370a6>", "</div>", [_c('fa-icon', {
|
|
10699
10693
|
class: [_vm.origem],
|
|
10700
10694
|
attrs: {
|
|
10701
10695
|
"icon": ['fas', 'reply'],
|
|
10702
10696
|
"title": "Enviado por: " + _vm.autor
|
|
10703
10697
|
}
|
|
10704
|
-
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.returnAuthorName
|
|
10698
|
+
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.returnAuthorName) + " class=\"email-author-name\" data-v-0df370a6>" + _vm._ssrEscape(_vm._s(_vm.returnAuthorName)) + "</p> "), _c('fa-icon', {
|
|
10705
10699
|
staticClass: "email-to-svg",
|
|
10706
10700
|
attrs: {
|
|
10707
10701
|
"icon": ['fas', _vm.origem === 'outros' ? 'user' : 'headset'],
|
|
10708
10702
|
"title": "E-mail " + (_vm.origem === 'outros' ? 'recebido' : 'enviado')
|
|
10709
10703
|
}
|
|
10710
|
-
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm.customButtons && _vm.customButtons.length ? _vm._ssrNode("<div class=\"email-custom-buttons\" data-v-
|
|
10704
|
+
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm.customButtons && _vm.customButtons.length ? _vm._ssrNode("<div class=\"email-custom-buttons\" data-v-0df370a6>", "</div>", _vm._l(_vm.customButtons, function (button, index) {
|
|
10711
10705
|
return _c('span', {
|
|
10712
10706
|
directives: [{
|
|
10713
10707
|
name: "show",
|
|
@@ -10738,7 +10732,7 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10738
10732
|
"innerHTML": _vm._s(button.svgIcon)
|
|
10739
10733
|
}
|
|
10740
10734
|
})], 1);
|
|
10741
|
-
}), 0) : _vm._e(), _vm._ssrNode(" "), _vm.customActionButtons && _vm.customActionButtons.length ? _vm._ssrNode("<div class=\"email-custom-action-buttons\" data-v-
|
|
10735
|
+
}), 0) : _vm._e(), _vm._ssrNode(" "), _vm.customActionButtons && _vm.customActionButtons.length ? _vm._ssrNode("<div class=\"email-custom-action-buttons\" data-v-0df370a6>", "</div>", _vm._l(_vm.customActionButtons, function (button, index) {
|
|
10742
10736
|
return _c('button', {
|
|
10743
10737
|
directives: [{
|
|
10744
10738
|
name: "show",
|
|
@@ -10768,8 +10762,8 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10768
10762
|
domProps: {
|
|
10769
10763
|
"innerHTML": _vm._s(button.svgIcon)
|
|
10770
10764
|
}
|
|
10771
|
-
}), _vm._ssrNode(" " + (button.label ? "<span class=\"email-custom-action-label\" data-v-
|
|
10772
|
-
}), 0) : _vm._e(), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-header\" data-v-
|
|
10765
|
+
}), _vm._ssrNode(" " + (button.label ? "<span class=\"email-custom-action-label\" data-v-0df370a6>" + _vm._ssrEscape(_vm._s(button.label)) + "</span>" : "<!---->"))], 2);
|
|
10766
|
+
}), 0) : _vm._e(), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-header\" data-v-0df370a6>", "</div>", [_vm._ssrNode("<p" + _vm._ssrAttr("title", _vm.returnMainValue()) + " class=\"email-subject\" data-v-0df370a6>" + _vm._ssrEscape("\n " + _vm._s(_vm.returnMainValue()) + "\n ") + "</p> "), _vm._ssrNode("<div class=\"header-container\" data-v-0df370a6>", "</div>", [_vm._ssrNode("<div" + _vm._ssrClass(null, "email-header-content" + (_vm.isOpen ? ' open' : '')) + " data-v-0df370a6>", "</div>", [_vm._ssrNode("<div class=\"email-header-infos\" data-v-0df370a6>", "</div>", [_vm.para && _vm.para.length ? [_vm._ssrNode("<div class=\"email-to-from-container\" data-v-0df370a6>", "</div>", [_vm._l(_vm.paraCopia, function (recipient, index) {
|
|
10773
10767
|
return _c('EmailTo', {
|
|
10774
10768
|
key: "to-" + index,
|
|
10775
10769
|
attrs: {
|
|
@@ -10780,13 +10774,13 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10780
10774
|
});
|
|
10781
10775
|
}), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-to-btn\"" + _vm._ssrStyle(null, null, {
|
|
10782
10776
|
display: _vm.isOpen ? '' : 'none'
|
|
10783
|
-
}) + " data-v-
|
|
10777
|
+
}) + " data-v-0df370a6>", "</div>", [_c('fa-icon', {
|
|
10784
10778
|
attrs: {
|
|
10785
10779
|
"icon": ['fas', 'caret-down']
|
|
10786
10780
|
}
|
|
10787
|
-
})], 1)], 2)] : _vm._e(), _vm._ssrNode(" " + (!_vm.isMainEmail && _vm.isOpen ? "<div class=\"email-subject-secondary\" data-v-
|
|
10781
|
+
})], 1)], 2)] : _vm._e(), _vm._ssrNode(" " + (!_vm.isMainEmail && _vm.isOpen ? "<div class=\"email-subject-secondary\" data-v-0df370a6><span class=\"email-subject-span\" data-v-0df370a6>" + _vm._ssrEscape(_vm._s("Assunto: " + (_vm.htmlEntityToEmoji(_vm.replaceUnicodeWithEmoji(_vm.assunto)) || '(Sem assunto)'))) + "</span></div>" : "<!---->"))], 2)]), _vm._ssrNode(" "), _vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.formattedDate) + _vm._ssrClass(null, "email-date " + (_vm.isOpen ? _vm.isOpenClass : _vm.isClosedClass)) + _vm._ssrStyle(null, null, {
|
|
10788
10782
|
display: _vm.formattedDate ? '' : 'none'
|
|
10789
|
-
}) + " data-v-
|
|
10783
|
+
}) + " data-v-0df370a6>", "</span>", [_c('fa-icon', {
|
|
10790
10784
|
attrs: {
|
|
10791
10785
|
"icon": ['fas', 'calendar']
|
|
10792
10786
|
}
|
|
@@ -10807,12 +10801,12 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10807
10801
|
}
|
|
10808
10802
|
}
|
|
10809
10803
|
}, [_vm._ssrNode(_vm._ssrList(_vm.mailInfos, function (info, index) {
|
|
10810
|
-
return "<li class=\"email-info\" data-v-
|
|
10804
|
+
return "<li class=\"email-info\" data-v-0df370a6><span data-v-0df370a6>" + _vm._ssrEscape(_vm._s(info.label)) + "</span>" + _vm._ssrEscape("\n " + _vm._s(info.value) + "\n ") + "</li>";
|
|
10811
10805
|
}))]) : _vm._e(), _vm._ssrNode(" " + (_vm.isOpen ? "<span" + _vm._ssrClass(null, ['email-actions box-shadow', {
|
|
10812
10806
|
active: _vm.actionsOpen
|
|
10813
10807
|
}, {
|
|
10814
10808
|
main: _vm.isMainEmail
|
|
10815
|
-
}]) + " data-v-
|
|
10809
|
+
}]) + " data-v-0df370a6><span data-v-0df370a6></span> <span data-v-0df370a6></span> <span data-v-0df370a6></span></span>" : "<!---->") + " "), _vm.actionsOpen && _vm.isOpen ? _c('ul', {
|
|
10816
10810
|
directives: [{
|
|
10817
10811
|
name: "clickaway",
|
|
10818
10812
|
rawName: "v-clickaway",
|
|
@@ -10825,7 +10819,7 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10825
10819
|
$event.stopPropagation();
|
|
10826
10820
|
}
|
|
10827
10821
|
}
|
|
10828
|
-
}, [_vm._ssrNode("<li class=\"email-action\" data-v-
|
|
10822
|
+
}, [_vm._ssrNode("<li class=\"email-action\" data-v-0df370a6>" + _vm._ssrEscape("\n " + _vm._s(!_vm.openMessage ? 'Visualizar' : 'Esconder') + " texto do e-mail\n ") + "</li>")]) : _vm._e()], 2), _vm._ssrNode(" "), _c('transition', {
|
|
10829
10823
|
attrs: {
|
|
10830
10824
|
"name": "show-y-top"
|
|
10831
10825
|
}
|
|
@@ -10860,7 +10854,7 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10860
10854
|
staticClass: "email-raw"
|
|
10861
10855
|
}, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()], 1)]), _vm._ssrNode(" "), _vm.filteredFiles && _vm.filteredFiles.length ? _vm._ssrNode("<div class=\"email-files\"" + _vm._ssrStyle(null, null, {
|
|
10862
10856
|
display: _vm.isOpen || _vm.isMainEmail ? '' : 'none'
|
|
10863
|
-
}) + " data-v-
|
|
10857
|
+
}) + " data-v-0df370a6>", "</div>", _vm._l(_vm.filteredFiles, function (anexo, index) {
|
|
10864
10858
|
return _c('EmailFile', {
|
|
10865
10859
|
key: index,
|
|
10866
10860
|
attrs: {
|
|
@@ -10875,20 +10869,20 @@ var __vue_staticRenderFns__$1 = [];
|
|
|
10875
10869
|
/* style */
|
|
10876
10870
|
var __vue_inject_styles__$1 = function __vue_inject_styles__(inject) {
|
|
10877
10871
|
if (!inject) return;
|
|
10878
|
-
inject("data-v-
|
|
10879
|
-
source: ".show-y-top-enter-active[data-v-
|
|
10872
|
+
inject("data-v-0df370a6_0", {
|
|
10873
|
+
source: ".show-y-top-enter-active[data-v-0df370a6],.show-y-top-leave-enter[data-v-0df370a6]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-0df370a6],.show-y-top-leave-to[data-v-0df370a6]{opacity:0;transform:translateY(-2%)}",
|
|
10880
10874
|
map: undefined,
|
|
10881
10875
|
media: undefined
|
|
10882
|
-
}), inject("data-v-
|
|
10876
|
+
}), inject("data-v-0df370a6_1", {
|
|
10883
10877
|
source: ".visibility-hidden{visibility:hidden}.box-shadow-active{box-shadow:0 0 4px 2px rgba(0,0,0,.25)}.bg-dark-white-2{background-color:#f7f7f7}.bg-white{background-color:#fff}.cursor-pointer{cursor:pointer}.email-overlay{width:100%;height:100%;background-color:transparent;z-index:1;position:absolute;top:0;left:0}.email-item{--konecta-gray-3:#515050;--konecta-light:#f8f9fa;--blue-silver-4:#dae0e5;--email-principal:#faa732;--email-outros:#86b7fe;font-family:Roboto,sans-serif;flex:1;margin:0 0 10px 0;color:#222;min-height:60px;display:flex;flex-wrap:wrap;padding:10px;border-radius:5px;transition:all 150ms ease-in-out;max-width:100%;width:100%;overflow:hidden;position:relative}.email-custom-action-buttons{display:flex;gap:7px;align-items:center;flex-wrap:wrap;max-width:100%;cursor:default}.email-custom-action-button{margin-top:10px;background-color:var(--konecta-light)!important;color:var(--konecta-dark)!important;border:1px solid var(--blue-silver-4)!important;flex:1;min-width:100px;display:flex;align-items:center;justify-content:center;gap:5px;padding:5px;overflow:hidden;border-radius:5px;text-overflow:ellipsis;white-space:nowrap;transition:all .1s ease-in-out;max-width:100%;cursor:pointer}.email-custom-action-button:hover{background-color:#e9ecef!important}.email-custom-action-button:disabled{background-color:var(--konecta-gray-3)!important;border:1px solid #25282b!important;cursor:not-allowed!important}.email-item.outros{border-left:3px solid var(--email-outros)}.email-author-name{margin:0 5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-author.outros{color:var(--email-outros)}.email-author.outros>svg:nth-child(1){transform:rotate(180deg)}.email-author.principal{color:var(--email-principal)}.email-author.main{font-size:1.025rem}.email-item.principal{border-left:3px solid var(--email-principal)}.email-item.info-open{overflow:visible}.email-header{width:100%;display:flex;flex-direction:column;cursor:pointer;border-top-right-radius:5px;border-top-left-radius:5px;position:relative;overflow:visible}.header-container{display:flex;overflow:hidden;position:relative}.email-header-content{display:flex;align-items:center;flex:1;min-width:250px}.email-header-infos{display:flex;flex-direction:column;flex:1}.email-subject{margin:5px 0 0 0;font-size:1.025rem;cursor:pointer}.email-date{--width:245px;font-size:.8rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:absolute;right:0;top:0;min-width:var(--width);width:var(--width);max-width:var(--width);display:flex;justify-content:flex-end;gap:3px;align-items:center}.email-content{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;background-color:#fff;position:relative;max-width:100%}.email-actions{align-self:flex-end;display:flex;border-radius:10px;cursor:pointer;align-items:center;justify-content:center;gap:3px;padding:5px 7px;background-color:#ddd;position:absolute;right:0;top:30px;z-index:1}.email-actions.main{top:10px}.email-actions.active{background-color:#dfdfdf}.email-actions>span{width:4px;height:4px;min-width:4px;min-height:4px;max-width:4px;max-height:4px;background-color:#222;border-radius:50%}.email-actions-list{position:absolute;right:45px;width:250px;top:5px;margin:0;list-style-type:none;padding:0;border-radius:5px;z-index:1}.email-action{background-color:#dfdfdf;padding:5px 10px;cursor:pointer;transition:background-color 150ms ease-in-out;font-size:.9rem;user-select:none}.email-action:nth-child(1){border-top-left-radius:5px;border-top-right-radius:5px}.email-action:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.email-action:hover{background-color:#ccc}.email-html{width:100%;min-width:300px;max-width:100%;border:none;overflow:auto}.email-raw{width:100%;max-width:100%;padding:15px;font-size:.9rem;color:#222}.email-files{display:flex;gap:10px;flex-wrap:wrap;width:100%;margin-top:5px}.email-header-content,.email-header-infos{max-width:100%;overflow:hidden}.email-to-from-container{margin-bottom:5px;max-width:100%;min-width:250px;overflow:hidden;display:flex;align-items:center;flex-wrap:wrap;flex:1;gap:5px}.email-to-btn{padding:0 5px;font-size:.9rem;cursor:pointer;color:#666}.email-to-infos{position:absolute;bottom:-325px;border:1px solid #ccc;z-index:2;padding:10px;background-color:#fff;max-height:300px;overflow-y:auto;overflow-x:hidden;width:300px;display:flex;flex-direction:column;gap:5px;margin:0;cursor:default}.email-info{width:100%;font-size:.8rem}.email-info>span{font-size:.75rem;color:gray;margin-right:3px}.email-author{display:flex;align-items:center;height:5px;font-size:.75rem;font-weight:700;transform:translateY(-2px);width:100%;cursor:pointer}.email-subject-secondary{margin-top:-5px}.email-subject-span{font-size:.7rem;color:gray}.email-to-svg{font-size:.85rem}.email-custom-buttons{display:flex;gap:7px;position:absolute;top:5px;right:5px;z-index:1;font-size:.8rem}.menu-mensagem{cursor:pointer;padding:1px;opacity:.7;transition:opacity .1s ease-in-out}.menu-mensagem:active,.menu-mensagem:focus,.menu-mensagem:hover{opacity:1}.email-error-content{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:5px;padding:10px}.email-error-content p{margin:0;color:#e74c3c}.email-error-content button{border:1px solid #ccc;border-radius:3px;padding:5px 10px;background-color:#fff;cursor:pointer;transition:background-color 150ms ease-in-out}.email-error-content button:hover{background-color:#eee}",
|
|
10884
10878
|
map: undefined,
|
|
10885
10879
|
media: undefined
|
|
10886
10880
|
});
|
|
10887
10881
|
};
|
|
10888
10882
|
/* scoped */
|
|
10889
|
-
var __vue_scope_id__$1 = "data-v-
|
|
10883
|
+
var __vue_scope_id__$1 = "data-v-0df370a6";
|
|
10890
10884
|
/* module identifier */
|
|
10891
|
-
var __vue_module_identifier__$1 = "data-v-
|
|
10885
|
+
var __vue_module_identifier__$1 = "data-v-0df370a6";
|
|
10892
10886
|
/* functional template */
|
|
10893
10887
|
var __vue_is_functional_template__$1 = false;
|
|
10894
10888
|
/* style inject shadow dom */
|
package/package.json
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
:class="['email-item box-shadow-active', isOpen ? isOpenClass : `${isClosedClass} cursor-pointer`, showInfos ? 'info-open' : '', origem, customClass]"
|
|
4
4
|
@click="openByItem($event)">
|
|
5
5
|
<div v-if="showInfos" class="email-overlay"></div>
|
|
6
|
-
<div class="email-author" v-if="autor" :class="[origem, isMainEmail ? 'main' : '']" @click.stop="toggleIsOpen"
|
|
6
|
+
<div class="email-author" v-if="autor" :class="[origem, isMainEmail ? 'main' : '']" @click.stop="toggleIsOpen"
|
|
7
|
+
:key="autor">
|
|
7
8
|
<fa-icon :icon="['fas', 'reply']" :class="[origem]" :title="`Enviado por: ${autor}`" />
|
|
8
|
-
<p class="email-author-name" v-text="returnAuthorName
|
|
9
|
+
<p class="email-author-name" v-text="returnAuthorName" :title="returnAuthorName"></p>
|
|
9
10
|
<fa-icon :icon="['fas', origem === 'outros' ? 'user' : 'headset']"
|
|
10
11
|
:title="`E-mail ${origem === 'outros' ? 'recebido' : 'enviado'}`" class="email-to-svg" />
|
|
11
12
|
</div>
|
|
@@ -254,6 +255,22 @@ export default {
|
|
|
254
255
|
return !this.html.includes(anexo.name);
|
|
255
256
|
})
|
|
256
257
|
},
|
|
258
|
+
returnAuthorName() {
|
|
259
|
+
if (!this.from || !this.from.length) return this.autor || ''
|
|
260
|
+
const { email, name } = this.from[0]
|
|
261
|
+
if (!name) return email
|
|
262
|
+
if (!email) return name
|
|
263
|
+
if (this.isOpen) return `${name} (${email})`
|
|
264
|
+
return name
|
|
265
|
+
},
|
|
266
|
+
formattedToName() {
|
|
267
|
+
return (name, index, length) => {
|
|
268
|
+
let addVirgulaDps = index < length - 1
|
|
269
|
+
let addVirgulaAntes = index === 1 && length >= 2
|
|
270
|
+
const text = index === 0 ? `Para: ${name || ''}` : name ? `${addVirgulaAntes ? ', ' : ''}${name}${addVirgulaDps ? ', ' : ''}` : '';
|
|
271
|
+
return text
|
|
272
|
+
}
|
|
273
|
+
}
|
|
257
274
|
},
|
|
258
275
|
watch: {
|
|
259
276
|
isOpen: 'updateIframeContent'
|
|
@@ -276,14 +293,6 @@ export default {
|
|
|
276
293
|
|
|
277
294
|
this.$nextTick(this.updateIframeContent())
|
|
278
295
|
},
|
|
279
|
-
returnAuthorName() {
|
|
280
|
-
if (!this.from || !this.from.length) return this.autor || ''
|
|
281
|
-
const { email, name } = this.from[0]
|
|
282
|
-
if (!name) return email
|
|
283
|
-
if (!email) return name
|
|
284
|
-
if (this.isOpen) return `${name} (${email})`
|
|
285
|
-
return name
|
|
286
|
-
},
|
|
287
296
|
gerarMensagemEstilizada(msg) {
|
|
288
297
|
try {
|
|
289
298
|
const currentStyles = [
|
|
@@ -455,20 +464,6 @@ export default {
|
|
|
455
464
|
closeActions() {
|
|
456
465
|
this.actionsOpen = false;
|
|
457
466
|
},
|
|
458
|
-
formattedName(name, index, length, isOpen) {
|
|
459
|
-
if (!name) return '--';
|
|
460
|
-
return `${name || '--'}${index !== length - 1 && !isOpen ? ', ' : ''}`;
|
|
461
|
-
},
|
|
462
|
-
formattedMail(email, index, length, isOpen) {
|
|
463
|
-
if (!email) return ''
|
|
464
|
-
return `<${email || '--'}${index !== length - 1 && isOpen ? '>, ' : '>'}`;
|
|
465
|
-
},
|
|
466
|
-
formattedToName(name, index, length) {
|
|
467
|
-
let addVirgulaDps = index < length - 1
|
|
468
|
-
let addVirgulaAntes = index === 1 && length >= 2
|
|
469
|
-
const text = index === 0 ? `Para: ${name || ''}` : name ? `${addVirgulaAntes ? ', ' : ''}${name}${addVirgulaDps ? ', ' : ''}` : '';
|
|
470
|
-
return text
|
|
471
|
-
},
|
|
472
467
|
returnMainValue() {
|
|
473
468
|
if (this.isMainEmail) return this.htmlEntityToEmoji(this.replaceUnicodeWithEmoji(this.assunto)) || '(Sem assunto)'
|
|
474
469
|
return ''
|