vue-intergrall-plugins 1.0.71 → 1.0.73
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.
|
@@ -10289,7 +10289,9 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10289
10289
|
openMessage: false,
|
|
10290
10290
|
actionsOpen: false,
|
|
10291
10291
|
showInfos: false,
|
|
10292
|
-
isIframeLoading: true
|
|
10292
|
+
isIframeLoading: true,
|
|
10293
|
+
hasError: false,
|
|
10294
|
+
errorCount: 0
|
|
10293
10295
|
};
|
|
10294
10296
|
},
|
|
10295
10297
|
computed: {
|
|
@@ -10352,6 +10354,12 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10352
10354
|
}, 15000);
|
|
10353
10355
|
},
|
|
10354
10356
|
methods: {
|
|
10357
|
+
handleTryAgain: function handleTryAgain() {
|
|
10358
|
+
this.isOpen = true;
|
|
10359
|
+
this.isIframeLoading = true;
|
|
10360
|
+
this.hasError = false;
|
|
10361
|
+
this.$nextTick(this.updateIframeContent());
|
|
10362
|
+
},
|
|
10355
10363
|
returnAuthorName: function returnAuthorName() {
|
|
10356
10364
|
if (!this.from || !this.from.length) return this.autor || '';
|
|
10357
10365
|
var _this$from$ = this.from[0],
|
|
@@ -10415,6 +10423,21 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10415
10423
|
var doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
10416
10424
|
var margin = 20;
|
|
10417
10425
|
var value = doc.documentElement.offsetHeight > 400 ? doc.documentElement.offsetHeight + margin : doc.documentElement.offsetHeight;
|
|
10426
|
+
if (value === 0 || doc.documentElement.querySelector('body').innerHTML === '') {
|
|
10427
|
+
_this4.errorCount++;
|
|
10428
|
+
if (_this4.errorCount > 3) {
|
|
10429
|
+
_this4.hasError = true;
|
|
10430
|
+
if (_this4.isIframeLoading) _this4.isIframeLoading = false;
|
|
10431
|
+
return;
|
|
10432
|
+
}
|
|
10433
|
+
_this4.isIframeLoading = true;
|
|
10434
|
+
_this4.updateIframeContent();
|
|
10435
|
+
return;
|
|
10436
|
+
}
|
|
10437
|
+
if (_this4.hasError || _this4.errorCount > 0) {
|
|
10438
|
+
_this4.hasError = false;
|
|
10439
|
+
_this4.errorCount = 0;
|
|
10440
|
+
}
|
|
10418
10441
|
iframe.style.height = "".concat(value, "px");
|
|
10419
10442
|
emailParent.style.minHeight = "".concat(value, "px");
|
|
10420
10443
|
}, 10);
|
|
@@ -10533,19 +10556,19 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10533
10556
|
return _vm.openByItem($event);
|
|
10534
10557
|
}
|
|
10535
10558
|
}
|
|
10536
|
-
}, [_vm._ssrNode((_vm.showInfos ? "<div class=\"email-overlay\" data-v-
|
|
10559
|
+
}, [_vm._ssrNode((_vm.showInfos ? "<div class=\"email-overlay\" data-v-31b6e56a></div>" : "<!---->") + " "), _vm.autor ? _vm._ssrNode("<div" + _vm._ssrClass("email-author", [_vm.origem, _vm.isMainEmail ? 'main' : '']) + " data-v-31b6e56a>", "</div>", [_c('fa-icon', {
|
|
10537
10560
|
class: [_vm.origem],
|
|
10538
10561
|
attrs: {
|
|
10539
10562
|
"icon": ['fas', 'reply'],
|
|
10540
10563
|
"title": "Enviado por: " + _vm.autor
|
|
10541
10564
|
}
|
|
10542
|
-
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.returnAuthorName()) + " class=\"email-author-name\" data-v-
|
|
10565
|
+
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.returnAuthorName()) + " class=\"email-author-name\" data-v-31b6e56a>" + _vm._ssrEscape(_vm._s(_vm.returnAuthorName())) + "</p> "), _c('fa-icon', {
|
|
10543
10566
|
staticClass: "email-to-svg",
|
|
10544
10567
|
attrs: {
|
|
10545
10568
|
"icon": ['fas', _vm.origem === 'outros' ? 'user' : 'headset'],
|
|
10546
10569
|
"title": "E-mail " + (_vm.origem === 'outros' ? 'recebido' : 'enviado')
|
|
10547
10570
|
}
|
|
10548
|
-
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm.customButtons && _vm.customButtons.length ? _vm._ssrNode("<div class=\"email-custom-buttons\" data-v-
|
|
10571
|
+
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm.customButtons && _vm.customButtons.length ? _vm._ssrNode("<div class=\"email-custom-buttons\" data-v-31b6e56a>", "</div>", _vm._l(_vm.customButtons, function (button, index) {
|
|
10549
10572
|
return _c('span', {
|
|
10550
10573
|
directives: [{
|
|
10551
10574
|
name: "show",
|
|
@@ -10576,7 +10599,7 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10576
10599
|
"innerHTML": _vm._s(button.svgIcon)
|
|
10577
10600
|
}
|
|
10578
10601
|
})], 1);
|
|
10579
|
-
}), 0) : _vm._e(), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-header\" data-v-
|
|
10602
|
+
}), 0) : _vm._e(), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-header\" data-v-31b6e56a>", "</div>", [_vm._ssrNode("<p" + _vm._ssrAttr("title", _vm.returnMainValue()) + " class=\"email-subject\" data-v-31b6e56a>" + _vm._ssrEscape("\n " + _vm._s(_vm.returnMainValue()) + "\n ") + "</p> "), _vm._ssrNode("<div class=\"header-container\" data-v-31b6e56a>", "</div>", [_vm._ssrNode("<div" + _vm._ssrClass(null, "email-header-content" + (_vm.isOpen ? ' open' : '')) + " data-v-31b6e56a>", "</div>", [_vm._ssrNode("<div class=\"email-header-infos\" data-v-31b6e56a>", "</div>", [_vm.para && _vm.para.length ? [_vm._ssrNode("<div class=\"email-to-from-container\" data-v-31b6e56a>", "</div>", [_vm._l(_vm.paraCopia, function (recipient, index) {
|
|
10580
10603
|
return _c('EmailTo', {
|
|
10581
10604
|
key: "to-" + index,
|
|
10582
10605
|
attrs: {
|
|
@@ -10587,13 +10610,13 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10587
10610
|
});
|
|
10588
10611
|
}), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-to-btn\"" + _vm._ssrStyle(null, null, {
|
|
10589
10612
|
display: _vm.isOpen ? '' : 'none'
|
|
10590
|
-
}) + " data-v-
|
|
10613
|
+
}) + " data-v-31b6e56a>", "</div>", [_c('fa-icon', {
|
|
10591
10614
|
attrs: {
|
|
10592
10615
|
"icon": ['fas', 'caret-down']
|
|
10593
10616
|
}
|
|
10594
|
-
})], 1)], 2)] : _vm._e(), _vm._ssrNode(" " + (!_vm.isMainEmail && _vm.isOpen ? "<div class=\"email-subject-secondary\" data-v-
|
|
10617
|
+
})], 1)], 2)] : _vm._e(), _vm._ssrNode(" " + (!_vm.isMainEmail && _vm.isOpen ? "<div class=\"email-subject-secondary\" data-v-31b6e56a><span class=\"email-subject-span\" data-v-31b6e56a>" + _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, {
|
|
10595
10618
|
display: _vm.formattedDate ? '' : 'none'
|
|
10596
|
-
}) + " data-v-
|
|
10619
|
+
}) + " data-v-31b6e56a>", "</span>", [_c('fa-icon', {
|
|
10597
10620
|
attrs: {
|
|
10598
10621
|
"icon": ['fas', 'calendar']
|
|
10599
10622
|
}
|
|
@@ -10614,12 +10637,12 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10614
10637
|
}
|
|
10615
10638
|
}
|
|
10616
10639
|
}, [_vm._ssrNode(_vm._ssrList(_vm.mailInfos, function (info, index) {
|
|
10617
|
-
return "<li class=\"email-info\" data-v-
|
|
10640
|
+
return "<li class=\"email-info\" data-v-31b6e56a><span data-v-31b6e56a>" + _vm._ssrEscape(_vm._s(info.label)) + "</span>" + _vm._ssrEscape("\n " + _vm._s(info.value) + "\n ") + "</li>";
|
|
10618
10641
|
}))]) : _vm._e(), _vm._ssrNode(" " + (_vm.isOpen ? "<span" + _vm._ssrClass(null, ['email-actions box-shadow', {
|
|
10619
10642
|
active: _vm.actionsOpen
|
|
10620
10643
|
}, {
|
|
10621
10644
|
main: _vm.isMainEmail
|
|
10622
|
-
}]) + " data-v-
|
|
10645
|
+
}]) + " data-v-31b6e56a><span data-v-31b6e56a></span> <span data-v-31b6e56a></span> <span data-v-31b6e56a></span></span>" : "<!---->") + " "), _vm.actionsOpen && _vm.isOpen ? _c('ul', {
|
|
10623
10646
|
directives: [{
|
|
10624
10647
|
name: "clickaway",
|
|
10625
10648
|
rawName: "v-clickaway",
|
|
@@ -10632,7 +10655,7 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10632
10655
|
$event.stopPropagation();
|
|
10633
10656
|
}
|
|
10634
10657
|
}
|
|
10635
|
-
}, [_vm._ssrNode("<li class=\"email-action\" data-v-
|
|
10658
|
+
}, [_vm._ssrNode("<li class=\"email-action\" data-v-31b6e56a>" + _vm._ssrEscape("\n " + _vm._s(!_vm.openMessage ? 'Visualizar' : 'Esconder') + " texto do e-mail\n ") + "</li>")]) : _vm._e()], 2), _vm._ssrNode(" "), _c('transition', {
|
|
10636
10659
|
attrs: {
|
|
10637
10660
|
"name": "show-y-top"
|
|
10638
10661
|
}
|
|
@@ -10645,14 +10668,29 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10645
10668
|
}],
|
|
10646
10669
|
ref: "emailIframeParent",
|
|
10647
10670
|
staticClass: "email-content"
|
|
10648
|
-
}, [_vm.isIframeLoading ? _c('VueLoader') : _vm._e(), _vm._v(" "), _c('
|
|
10671
|
+
}, [_vm.isIframeLoading ? _c('VueLoader') : _vm._e(), _vm._v(" "), _vm.hasError ? _c('div', {
|
|
10672
|
+
staticClass: "email-error-content"
|
|
10673
|
+
}, [_c('p', [_vm._v("Erro ao carregar o e-mail")]), _vm._v(" "), _c('button', {
|
|
10674
|
+
staticClass: "box-shadow",
|
|
10675
|
+
on: {
|
|
10676
|
+
"click": function click($event) {
|
|
10677
|
+
return _vm.handleTryAgain();
|
|
10678
|
+
}
|
|
10679
|
+
}
|
|
10680
|
+
}, [_vm._v("Tentar novamente")])]) : _vm._e(), _vm._v(" "), _c('iframe', {
|
|
10681
|
+
directives: [{
|
|
10682
|
+
name: "show",
|
|
10683
|
+
rawName: "v-show",
|
|
10684
|
+
value: !_vm.hasError,
|
|
10685
|
+
expression: "!hasError"
|
|
10686
|
+
}],
|
|
10649
10687
|
ref: "emailIframe",
|
|
10650
10688
|
class: "email-html " + (_vm.isIframeLoading ? 'visibility-hidden' : '')
|
|
10651
10689
|
}), _vm._v(" "), _vm.openMessage ? _c('span', {
|
|
10652
10690
|
staticClass: "email-raw"
|
|
10653
10691
|
}, [_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, {
|
|
10654
10692
|
display: _vm.isOpen || _vm.isMainEmail ? '' : 'none'
|
|
10655
|
-
}) + " data-v-
|
|
10693
|
+
}) + " data-v-31b6e56a>", "</div>", _vm._l(_vm.filteredFiles, function (anexo, index) {
|
|
10656
10694
|
return _c('EmailFile', {
|
|
10657
10695
|
key: index,
|
|
10658
10696
|
attrs: {
|
|
@@ -10667,20 +10705,20 @@ var __vue_staticRenderFns__$1 = [];
|
|
|
10667
10705
|
/* style */
|
|
10668
10706
|
var __vue_inject_styles__$1 = function __vue_inject_styles__(inject) {
|
|
10669
10707
|
if (!inject) return;
|
|
10670
|
-
inject("data-v-
|
|
10671
|
-
source: ".show-y-top-enter-active[data-v-
|
|
10708
|
+
inject("data-v-31b6e56a_0", {
|
|
10709
|
+
source: ".show-y-top-enter-active[data-v-31b6e56a],.show-y-top-leave-enter[data-v-31b6e56a]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-31b6e56a],.show-y-top-leave-to[data-v-31b6e56a]{opacity:0;transform:translateY(-2%)}",
|
|
10672
10710
|
map: undefined,
|
|
10673
10711
|
media: undefined
|
|
10674
|
-
}), inject("data-v-
|
|
10675
|
-
source: "@import url(https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap);.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{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-item.outros{border-left:3px solid #33b8df}.email-author-name{margin:0 5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-author.outros{color:#33b8df}.email-author.outros>svg:nth-child(1){transform:rotate(180deg)}.email-author.principal{color:#ebb552}.email-author.main{font-size:1.025rem}.email-item.principal{border-left:3px solid #ebb552}.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}",
|
|
10712
|
+
}), inject("data-v-31b6e56a_1", {
|
|
10713
|
+
source: "@import url(https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap);.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{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-item.outros{border-left:3px solid #33b8df}.email-author-name{margin:0 5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-author.outros{color:#33b8df}.email-author.outros>svg:nth-child(1){transform:rotate(180deg)}.email-author.principal{color:#ebb552}.email-author.main{font-size:1.025rem}.email-item.principal{border-left:3px solid #ebb552}.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}",
|
|
10676
10714
|
map: undefined,
|
|
10677
10715
|
media: undefined
|
|
10678
10716
|
});
|
|
10679
10717
|
};
|
|
10680
10718
|
/* scoped */
|
|
10681
|
-
var __vue_scope_id__$1 = "data-v-
|
|
10719
|
+
var __vue_scope_id__$1 = "data-v-31b6e56a";
|
|
10682
10720
|
/* module identifier */
|
|
10683
|
-
var __vue_module_identifier__$1 = "data-v-
|
|
10721
|
+
var __vue_module_identifier__$1 = "data-v-31b6e56a";
|
|
10684
10722
|
/* functional template */
|
|
10685
10723
|
var __vue_is_functional_template__$1 = false;
|
|
10686
10724
|
/* style inject shadow dom */
|
package/package.json
CHANGED
|
@@ -68,7 +68,12 @@
|
|
|
68
68
|
<transition name="show-y-top">
|
|
69
69
|
<div class="email-content" v-show="isOpen" ref="emailIframeParent">
|
|
70
70
|
<VueLoader v-if="isIframeLoading" />
|
|
71
|
-
<
|
|
71
|
+
<div v-if="hasError" class="email-error-content">
|
|
72
|
+
<p>Erro ao carregar o e-mail</p>
|
|
73
|
+
<button class="box-shadow" @click="handleTryAgain()">Tentar novamente</button>
|
|
74
|
+
</div>
|
|
75
|
+
<iframe v-show="!hasError" ref="emailIframe"
|
|
76
|
+
:class="`email-html ${isIframeLoading ? 'visibility-hidden' : ''}`"></iframe>
|
|
72
77
|
<span class="email-raw" v-if="openMessage">{{ mensagem }}</span>
|
|
73
78
|
</div>
|
|
74
79
|
</transition>
|
|
@@ -179,7 +184,9 @@ export default {
|
|
|
179
184
|
openMessage: false,
|
|
180
185
|
actionsOpen: false,
|
|
181
186
|
showInfos: false,
|
|
182
|
-
isIframeLoading: true
|
|
187
|
+
isIframeLoading: true,
|
|
188
|
+
hasError: false,
|
|
189
|
+
errorCount: 0
|
|
183
190
|
};
|
|
184
191
|
},
|
|
185
192
|
computed: {
|
|
@@ -249,6 +256,13 @@ export default {
|
|
|
249
256
|
}, 15000);
|
|
250
257
|
},
|
|
251
258
|
methods: {
|
|
259
|
+
handleTryAgain() {
|
|
260
|
+
this.isOpen = true
|
|
261
|
+
this.isIframeLoading = true
|
|
262
|
+
this.hasError = false
|
|
263
|
+
|
|
264
|
+
this.$nextTick(this.updateIframeContent())
|
|
265
|
+
},
|
|
252
266
|
returnAuthorName() {
|
|
253
267
|
if (!this.from || !this.from.length) return this.autor || ''
|
|
254
268
|
const { mail, name } = this.from[0]
|
|
@@ -303,6 +317,21 @@ export default {
|
|
|
303
317
|
const doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
304
318
|
const margin = 20
|
|
305
319
|
const value = doc.documentElement.offsetHeight > 400 ? doc.documentElement.offsetHeight + margin : doc.documentElement.offsetHeight
|
|
320
|
+
if (value === 0 || doc.documentElement.querySelector('body').innerHTML === '') {
|
|
321
|
+
this.errorCount++
|
|
322
|
+
if (this.errorCount > 3) {
|
|
323
|
+
this.hasError = true
|
|
324
|
+
if (this.isIframeLoading) this.isIframeLoading = false
|
|
325
|
+
return
|
|
326
|
+
}
|
|
327
|
+
this.isIframeLoading = true
|
|
328
|
+
this.updateIframeContent()
|
|
329
|
+
return
|
|
330
|
+
}
|
|
331
|
+
if (this.hasError || this.errorCount > 0) {
|
|
332
|
+
this.hasError = false
|
|
333
|
+
this.errorCount = 0
|
|
334
|
+
}
|
|
306
335
|
iframe.style.height = `${value}px`;
|
|
307
336
|
emailParent.style.minHeight = `${value}px`
|
|
308
337
|
}, 10)
|
|
@@ -777,4 +806,31 @@ export default {
|
|
|
777
806
|
.menu-mensagem:active {
|
|
778
807
|
opacity: 1;
|
|
779
808
|
}
|
|
809
|
+
|
|
810
|
+
.email-error-content {
|
|
811
|
+
display: flex;
|
|
812
|
+
justify-content: center;
|
|
813
|
+
align-items: center;
|
|
814
|
+
flex-direction: column;
|
|
815
|
+
gap: 5px;
|
|
816
|
+
padding: 10px;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
.email-error-content p {
|
|
820
|
+
margin: 0;
|
|
821
|
+
color: #E74C3C;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
.email-error-content button {
|
|
825
|
+
border: 1px solid #CCC;
|
|
826
|
+
border-radius: 3px;
|
|
827
|
+
padding: 5px 10px;
|
|
828
|
+
background-color: #FFF;
|
|
829
|
+
cursor: pointer;
|
|
830
|
+
transition: background-color 150ms ease-in-out;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.email-error-content button:hover {
|
|
834
|
+
background-color: #EEE;
|
|
835
|
+
}
|
|
780
836
|
</style>
|