vue-intergrall-plugins 1.0.55 → 1.0.57
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.
|
@@ -447,6 +447,57 @@ function _nonIterableSpread() {
|
|
|
447
447
|
}
|
|
448
448
|
function _nonIterableRest() {
|
|
449
449
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
450
|
+
}
|
|
451
|
+
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
452
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
453
|
+
if (!it) {
|
|
454
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
455
|
+
if (it) o = it;
|
|
456
|
+
var i = 0;
|
|
457
|
+
var F = function () {};
|
|
458
|
+
return {
|
|
459
|
+
s: F,
|
|
460
|
+
n: function () {
|
|
461
|
+
if (i >= o.length) return {
|
|
462
|
+
done: true
|
|
463
|
+
};
|
|
464
|
+
return {
|
|
465
|
+
done: false,
|
|
466
|
+
value: o[i++]
|
|
467
|
+
};
|
|
468
|
+
},
|
|
469
|
+
e: function (e) {
|
|
470
|
+
throw e;
|
|
471
|
+
},
|
|
472
|
+
f: F
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
476
|
+
}
|
|
477
|
+
var normalCompletion = true,
|
|
478
|
+
didErr = false,
|
|
479
|
+
err;
|
|
480
|
+
return {
|
|
481
|
+
s: function () {
|
|
482
|
+
it = it.call(o);
|
|
483
|
+
},
|
|
484
|
+
n: function () {
|
|
485
|
+
var step = it.next();
|
|
486
|
+
normalCompletion = step.done;
|
|
487
|
+
return step;
|
|
488
|
+
},
|
|
489
|
+
e: function (e) {
|
|
490
|
+
didErr = true;
|
|
491
|
+
err = e;
|
|
492
|
+
},
|
|
493
|
+
f: function () {
|
|
494
|
+
try {
|
|
495
|
+
if (!normalCompletion && it.return != null) it.return();
|
|
496
|
+
} finally {
|
|
497
|
+
if (didErr) throw err;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
};
|
|
450
501
|
}var top = 'top';
|
|
451
502
|
var bottom = 'bottom';
|
|
452
503
|
var right = 'right';
|
|
@@ -10118,8 +10169,7 @@ var __vue_component__$4 = /*#__PURE__*/normalizeComponent({
|
|
|
10118
10169
|
render: __vue_render__$2,
|
|
10119
10170
|
staticRenderFns: __vue_staticRenderFns__$2
|
|
10120
10171
|
}, __vue_inject_styles__$2, __vue_script__$2, __vue_scope_id__$2, __vue_is_functional_template__$2, __vue_module_identifier__$2, false, undefined, createInjectorSSR, undefined);
|
|
10121
|
-
var EmailTo = __vue_component__$4
|
|
10122
|
-
var script$1 = {
|
|
10172
|
+
var EmailTo = __vue_component__$4;var script$1 = {
|
|
10123
10173
|
mixins: [textoLongo],
|
|
10124
10174
|
directives: {
|
|
10125
10175
|
clickaway: Clickaway
|
|
@@ -10211,7 +10261,8 @@ var script$1 = {
|
|
|
10211
10261
|
isOpen: this.iniciarAberto,
|
|
10212
10262
|
openMessage: false,
|
|
10213
10263
|
actionsOpen: false,
|
|
10214
|
-
showInfos: false
|
|
10264
|
+
showInfos: false,
|
|
10265
|
+
isIframeLoading: true
|
|
10215
10266
|
};
|
|
10216
10267
|
},
|
|
10217
10268
|
computed: {
|
|
@@ -10244,7 +10295,6 @@ var script$1 = {
|
|
|
10244
10295
|
}
|
|
10245
10296
|
},
|
|
10246
10297
|
watch: {
|
|
10247
|
-
html: 'updateIframeContent',
|
|
10248
10298
|
isOpen: 'updateIframeContent'
|
|
10249
10299
|
},
|
|
10250
10300
|
mounted: function mounted() {
|
|
@@ -10264,13 +10314,37 @@ var script$1 = {
|
|
|
10264
10314
|
updateIframeContent: function updateIframeContent() {
|
|
10265
10315
|
var _this = this;
|
|
10266
10316
|
this.$nextTick(function () {
|
|
10267
|
-
if (_this.isOpen) {
|
|
10317
|
+
if (_this.isOpen && _this.isIframeLoading) {
|
|
10268
10318
|
var iframe = _this.$refs.emailIframe;
|
|
10269
10319
|
var doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
10270
10320
|
doc.open();
|
|
10271
10321
|
doc.write(_this.html);
|
|
10272
10322
|
doc.close();
|
|
10273
|
-
|
|
10323
|
+
var images = doc.getElementsByTagName('img');
|
|
10324
|
+
var imagesLoaded = 0;
|
|
10325
|
+
var imageLoadHandler = function imageLoadHandler() {
|
|
10326
|
+
imagesLoaded++;
|
|
10327
|
+
if (imagesLoaded === images.length) {
|
|
10328
|
+
_this.adjustIframeHeight();
|
|
10329
|
+
}
|
|
10330
|
+
};
|
|
10331
|
+
if (images.length === 0) {
|
|
10332
|
+
_this.adjustIframeHeight();
|
|
10333
|
+
} else {
|
|
10334
|
+
var _iterator = _createForOfIteratorHelper(images),
|
|
10335
|
+
_step;
|
|
10336
|
+
try {
|
|
10337
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
10338
|
+
var img = _step.value;
|
|
10339
|
+
img.addEventListener('load', imageLoadHandler);
|
|
10340
|
+
img.addEventListener('error', imageLoadHandler);
|
|
10341
|
+
}
|
|
10342
|
+
} catch (err) {
|
|
10343
|
+
_iterator.e(err);
|
|
10344
|
+
} finally {
|
|
10345
|
+
_iterator.f();
|
|
10346
|
+
}
|
|
10347
|
+
}
|
|
10274
10348
|
}
|
|
10275
10349
|
});
|
|
10276
10350
|
},
|
|
@@ -10284,6 +10358,7 @@ var script$1 = {
|
|
|
10284
10358
|
iframe.style.height = "".concat(doc.documentElement.offsetHeight, "px");
|
|
10285
10359
|
emailParent.style.minHeight = "".concat(doc.documentElement.offsetHeight, "px");
|
|
10286
10360
|
}
|
|
10361
|
+
if (_this2.isIframeLoading) _this2.isIframeLoading = false;
|
|
10287
10362
|
});
|
|
10288
10363
|
},
|
|
10289
10364
|
toggleShowInfos: function toggleShowInfos() {
|
|
@@ -10354,19 +10429,19 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10354
10429
|
return _vm.openByItem($event);
|
|
10355
10430
|
}
|
|
10356
10431
|
}
|
|
10357
|
-
}, [_vm._ssrNode((_vm.showInfos ? "<div class=\"email-overlay\" data-v-
|
|
10432
|
+
}, [_vm._ssrNode((_vm.showInfos ? "<div class=\"email-overlay\" data-v-ce46c090></div>" : "<!---->") + " "), _vm.autor ? _vm._ssrNode("<div" + _vm._ssrClass("email-author", [_vm.origem]) + " data-v-ce46c090>", "</div>", [_c('fa-icon', {
|
|
10358
10433
|
class: [_vm.origem],
|
|
10359
10434
|
attrs: {
|
|
10360
10435
|
"icon": ['fas', 'reply'],
|
|
10361
10436
|
"title": "Enviado por: " + _vm.autor
|
|
10362
10437
|
}
|
|
10363
|
-
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.returnAuthorName()) + " class=\"email-author-name\" data-v-
|
|
10438
|
+
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.returnAuthorName()) + " class=\"email-author-name\" data-v-ce46c090>" + _vm._ssrEscape(_vm._s(_vm.returnAuthorName())) + "</p> "), _c('fa-icon', {
|
|
10364
10439
|
staticClass: "email-to-svg",
|
|
10365
10440
|
attrs: {
|
|
10366
10441
|
"icon": ['fas', _vm.origem === 'outros' ? 'user' : 'headset'],
|
|
10367
10442
|
"title": "E-mail " + (_vm.origem === 'outros' ? 'recebido' : 'enviado')
|
|
10368
10443
|
}
|
|
10369
|
-
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-header\" data-v-
|
|
10444
|
+
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-header\" data-v-ce46c090>", "</div>", [_vm._ssrNode("<p" + _vm._ssrAttr("title", _vm.returnMainValue()) + " class=\"email-subject\" data-v-ce46c090>" + _vm._ssrEscape("\n " + _vm._s(_vm.returnMainValue()) + "\n ") + "</p> "), _vm._ssrNode("<div class=\"header-container\" data-v-ce46c090>", "</div>", [_vm._ssrNode("<div class=\"email-header-content\" data-v-ce46c090>", "</div>", [_vm._ssrNode("<div class=\"email-header-infos\" data-v-ce46c090>", "</div>", [_vm.para && _vm.para.length && _vm.isOpen ? [_vm._ssrNode("<div class=\"email-to-from-container\" data-v-ce46c090>", "</div>", [_vm._l(_vm.para, function (recipient, index) {
|
|
10370
10445
|
return _c('EmailTo', {
|
|
10371
10446
|
key: "to-" + index,
|
|
10372
10447
|
attrs: {
|
|
@@ -10375,11 +10450,11 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10375
10450
|
"showMail": _vm.para.length === 1
|
|
10376
10451
|
}
|
|
10377
10452
|
});
|
|
10378
|
-
}), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-to-btn\" data-v-
|
|
10453
|
+
}), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-to-btn\" data-v-ce46c090>", "</div>", [_c('fa-icon', {
|
|
10379
10454
|
attrs: {
|
|
10380
10455
|
"icon": ['fas', 'caret-down']
|
|
10381
10456
|
}
|
|
10382
|
-
})], 1)], 2)] : _vm._e(), _vm._ssrNode(" " + (!_vm.isMainEmail && _vm.isOpen ? "<div class=\"email-subject-secondary\" data-v-
|
|
10457
|
+
})], 1)], 2)] : _vm._e(), _vm._ssrNode(" " + (!_vm.isMainEmail && _vm.isOpen ? "<div class=\"email-subject-secondary\" data-v-ce46c090><span class=\"email-subject-span\" data-v-ce46c090>" + _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)) + " data-v-ce46c090>", "</span>", [_c('fa-icon', {
|
|
10383
10458
|
attrs: {
|
|
10384
10459
|
"icon": ['fas', 'calendar']
|
|
10385
10460
|
}
|
|
@@ -10399,10 +10474,10 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10399
10474
|
}
|
|
10400
10475
|
}
|
|
10401
10476
|
}, [_vm._ssrNode(_vm._ssrList(_vm.mailInfos, function (info, index) {
|
|
10402
|
-
return "<li class=\"email-info\" data-v-
|
|
10477
|
+
return "<li class=\"email-info\" data-v-ce46c090><span data-v-ce46c090>" + _vm._ssrEscape(_vm._s(info.label)) + "</span>" + _vm._ssrEscape("\n " + _vm._s(info.value) + "\n ") + "</li>";
|
|
10403
10478
|
}))]) : _vm._e(), _vm._ssrNode(" " + (_vm.isOpen ? "<span" + _vm._ssrClass(null, ['email-actions box-shadow', {
|
|
10404
10479
|
active: _vm.actionsOpen
|
|
10405
|
-
}]) + " data-v-
|
|
10480
|
+
}]) + " data-v-ce46c090><span data-v-ce46c090></span> <span data-v-ce46c090></span> <span data-v-ce46c090></span></span>" : "<!---->") + " "), _vm.actionsOpen && _vm.isOpen ? _c('ul', {
|
|
10406
10481
|
directives: [{
|
|
10407
10482
|
name: "clickaway",
|
|
10408
10483
|
rawName: "v-clickaway",
|
|
@@ -10415,19 +10490,25 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10415
10490
|
$event.stopPropagation();
|
|
10416
10491
|
}
|
|
10417
10492
|
}
|
|
10418
|
-
}, [_vm._ssrNode("<li class=\"email-action\" data-v-
|
|
10493
|
+
}, [_vm._ssrNode("<li class=\"email-action\" data-v-ce46c090>" + _vm._ssrEscape("\n " + _vm._s(!_vm.openMessage ? 'Visualizar' : 'Esconder') + " texto do e-mail\n ") + "</li>")]) : _vm._e()], 2), _vm._ssrNode(" "), _c('transition', {
|
|
10419
10494
|
attrs: {
|
|
10420
10495
|
"name": "show-y-top"
|
|
10421
10496
|
}
|
|
10422
|
-
}, [
|
|
10497
|
+
}, [_c('div', {
|
|
10498
|
+
directives: [{
|
|
10499
|
+
name: "show",
|
|
10500
|
+
rawName: "v-show",
|
|
10501
|
+
value: _vm.isOpen,
|
|
10502
|
+
expression: "isOpen"
|
|
10503
|
+
}],
|
|
10423
10504
|
ref: "emailIframeParent",
|
|
10424
10505
|
staticClass: "email-content"
|
|
10425
|
-
}, [_c('iframe', {
|
|
10506
|
+
}, [_vm.isIframeLoading ? _c('VueLoader') : _vm._e(), _vm._v(" "), _c('iframe', {
|
|
10426
10507
|
ref: "emailIframe",
|
|
10427
|
-
|
|
10508
|
+
class: "email-html " + (_vm.isIframeLoading ? 'visibility-hidden' : '')
|
|
10428
10509
|
}), _vm._v(" "), _vm.openMessage ? _c('span', {
|
|
10429
10510
|
staticClass: "email-raw"
|
|
10430
|
-
}, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()]
|
|
10511
|
+
}, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()], 1)]), _vm._ssrNode(" "), _vm.anexos && _vm.anexos.length ? _vm._ssrNode("<div class=\"email-files\" data-v-ce46c090>", "</div>", _vm._l(_vm.anexos, function (anexo, index) {
|
|
10431
10512
|
return _c('EmailFile', {
|
|
10432
10513
|
key: index,
|
|
10433
10514
|
attrs: {
|
|
@@ -10442,20 +10523,20 @@ var __vue_staticRenderFns__$1 = [];
|
|
|
10442
10523
|
/* style */
|
|
10443
10524
|
var __vue_inject_styles__$1 = function __vue_inject_styles__(inject) {
|
|
10444
10525
|
if (!inject) return;
|
|
10445
|
-
inject("data-v-
|
|
10446
|
-
source: ".show-y-top-enter-active[data-v-
|
|
10526
|
+
inject("data-v-ce46c090_0", {
|
|
10527
|
+
source: ".show-y-top-enter-active[data-v-ce46c090],.show-y-top-leave-enter[data-v-ce46c090]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-ce46c090],.show-y-top-leave-to[data-v-ce46c090]{opacity:0;transform:translateY(-2%)}",
|
|
10447
10528
|
map: undefined,
|
|
10448
10529
|
media: undefined
|
|
10449
|
-
}), inject("data-v-
|
|
10450
|
-
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);.box-shadow-active{box-shadow:0 0 4px 2px rgba(0,0,0,.25)!important}.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}.email-author.outros{color:#33b8df}.email-author.outros>svg:nth-child(1){transform:rotate(180deg)}.email-author.principal{color:#ebb552}.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:0 0 5px 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:5px;top:5px;z-index:1}.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%;cursor:default}.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;height:300px;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}",
|
|
10530
|
+
}), inject("data-v-ce46c090_1", {
|
|
10531
|
+
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)!important}.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}.email-author.outros{color:#33b8df}.email-author.outros>svg:nth-child(1){transform:rotate(180deg)}.email-author.principal{color:#ebb552}.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:0 0 5px 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:5px;top:5px;z-index:1}.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%;cursor:default}.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;height:300px;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}",
|
|
10451
10532
|
map: undefined,
|
|
10452
10533
|
media: undefined
|
|
10453
10534
|
});
|
|
10454
10535
|
};
|
|
10455
10536
|
/* scoped */
|
|
10456
|
-
var __vue_scope_id__$1 = "data-v-
|
|
10537
|
+
var __vue_scope_id__$1 = "data-v-ce46c090";
|
|
10457
10538
|
/* module identifier */
|
|
10458
|
-
var __vue_module_identifier__$1 = "data-v-
|
|
10539
|
+
var __vue_module_identifier__$1 = "data-v-ce46c090";
|
|
10459
10540
|
/* functional template */
|
|
10460
10541
|
var __vue_is_functional_template__$1 = false;
|
|
10461
10542
|
/* style inject shadow dom */
|
package/package.json
CHANGED
|
@@ -55,8 +55,9 @@
|
|
|
55
55
|
</ul>
|
|
56
56
|
</div>
|
|
57
57
|
<transition name="show-y-top">
|
|
58
|
-
<div class="email-content" v-
|
|
59
|
-
<
|
|
58
|
+
<div class="email-content" v-show="isOpen" ref="emailIframeParent">
|
|
59
|
+
<VueLoader v-if="isIframeLoading" />
|
|
60
|
+
<iframe ref="emailIframe" :class="`email-html ${isIframeLoading ? 'visibility-hidden' : ''}`"></iframe>
|
|
60
61
|
<span class="email-raw" v-if="openMessage">{{ mensagem }}</span>
|
|
61
62
|
</div>
|
|
62
63
|
</transition>
|
|
@@ -155,7 +156,8 @@ export default {
|
|
|
155
156
|
isOpen: this.iniciarAberto,
|
|
156
157
|
openMessage: false,
|
|
157
158
|
actionsOpen: false,
|
|
158
|
-
showInfos: false
|
|
159
|
+
showInfos: false,
|
|
160
|
+
isIframeLoading: true
|
|
159
161
|
};
|
|
160
162
|
},
|
|
161
163
|
computed: {
|
|
@@ -192,7 +194,6 @@ export default {
|
|
|
192
194
|
},
|
|
193
195
|
},
|
|
194
196
|
watch: {
|
|
195
|
-
html: 'updateIframeContent',
|
|
196
197
|
isOpen: 'updateIframeContent'
|
|
197
198
|
},
|
|
198
199
|
mounted() {
|
|
@@ -210,15 +211,33 @@ export default {
|
|
|
210
211
|
},
|
|
211
212
|
updateIframeContent() {
|
|
212
213
|
this.$nextTick(() => {
|
|
213
|
-
if (this.isOpen) {
|
|
214
|
+
if (this.isOpen && this.isIframeLoading) {
|
|
214
215
|
const iframe = this.$refs.emailIframe;
|
|
215
216
|
const doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
216
217
|
doc.open();
|
|
217
218
|
doc.write(this.html);
|
|
218
219
|
doc.close();
|
|
219
|
-
|
|
220
|
+
|
|
221
|
+
const images = doc.getElementsByTagName('img');
|
|
222
|
+
let imagesLoaded = 0;
|
|
223
|
+
|
|
224
|
+
const imageLoadHandler = () => {
|
|
225
|
+
imagesLoaded++;
|
|
226
|
+
if (imagesLoaded === images.length) {
|
|
227
|
+
this.adjustIframeHeight();
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
if (images.length === 0) {
|
|
232
|
+
this.adjustIframeHeight();
|
|
233
|
+
} else {
|
|
234
|
+
for (let img of images) {
|
|
235
|
+
img.addEventListener('load', imageLoadHandler);
|
|
236
|
+
img.addEventListener('error', imageLoadHandler);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
220
239
|
}
|
|
221
|
-
})
|
|
240
|
+
});
|
|
222
241
|
},
|
|
223
242
|
adjustIframeHeight() {
|
|
224
243
|
this.$nextTick(() => {
|
|
@@ -229,6 +248,8 @@ export default {
|
|
|
229
248
|
iframe.style.height = `${doc.documentElement.offsetHeight}px`;
|
|
230
249
|
emailParent.style.minHeight = `${doc.documentElement.offsetHeight}px`
|
|
231
250
|
}
|
|
251
|
+
|
|
252
|
+
if (this.isIframeLoading) this.isIframeLoading = false
|
|
232
253
|
});
|
|
233
254
|
},
|
|
234
255
|
toggleShowInfos() {
|
|
@@ -308,6 +329,10 @@ export default {
|
|
|
308
329
|
<style>
|
|
309
330
|
@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');
|
|
310
331
|
|
|
332
|
+
.visibility-hidden {
|
|
333
|
+
visibility: hidden;
|
|
334
|
+
}
|
|
335
|
+
|
|
311
336
|
.box-shadow-active {
|
|
312
337
|
box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, 0.25) !important;
|
|
313
338
|
}
|