vue-intergrall-plugins 1.0.64 → 1.0.66
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.
|
@@ -10061,8 +10061,8 @@ var __vue_staticRenderFns__$3 = [];
|
|
|
10061
10061
|
/* style */
|
|
10062
10062
|
var __vue_inject_styles__$3 = function __vue_inject_styles__(inject) {
|
|
10063
10063
|
if (!inject) return;
|
|
10064
|
-
inject("data-v-
|
|
10065
|
-
source: ".email-file{display:flex;align-items:center;justify-content:flex-end;flex-direction:column;min-width:50px;width:auto;max-width:100px;height:70px;position:relative}.anexo-img{display:flex;justify-content:center;align-items:center;width:100%;height:100%;overflow:hidden;background-color:rgba(0,0,0,.2);border-radius:2.5px;cursor:pointer;opacity:.9;transition:opacity 150ms}.anexo-img:hover{opacity:1}.anexo-img img{max-width:100%;font-size:.8rem}.anexo-video{width:100%;height:100%;max-width:100
|
|
10064
|
+
inject("data-v-5fc0ce34_0", {
|
|
10065
|
+
source: ".email-file{display:flex;align-items:center;justify-content:flex-end;flex-direction:column;min-width:50px;width:auto;max-width:100px;height:70px;position:relative}.anexo-img{display:flex;justify-content:center;align-items:center;width:100%;height:100%;overflow:hidden;background-color:rgba(0,0,0,.2);border-radius:2.5px;cursor:pointer;opacity:.9;transition:opacity 150ms}.anexo-img:hover{opacity:1}.anexo-img img{max-width:100%;font-size:.8rem}.anexo-video{width:100%;height:100%;max-width:100%;overflow:hidden}.anexo-video video{max-width:100%}.box-shadow{-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-moz-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.anexo-icone{display:flex;justify-content:center;align-items:center;font-size:30px;cursor:pointer}.anexo-icone:hover{opacity:1}.anexo-icone:visited{color:inherit}.anexo-icone.pdf{position:relative}.anexo-icone.pdf svg{color:#e74c3c}.anexo-icone.pdf::after{content:\"\";position:absolute;bottom:2px;transform:translateY(2px);width:20px;height:20px}.anexo-icone.doc{color:#15517f}.anexo-icone.doc::after{content:\"\";position:absolute;width:20px;height:20px}.anexo-download{position:absolute;top:0;right:0;border-radius:5px;padding:5px;display:flex;justify-content:center;align-items:center;color:#222;background-color:#fff;z-index:1;font-size:.8rem;cursor:pointer}.anexo-name{max-width:100%;font-size:.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:2px 0 5px 0;height:20px}.anexo-icone,.anexo-img,.anexo-video{max-height:calc(100% - 20px)}",
|
|
10066
10066
|
map: undefined,
|
|
10067
10067
|
media: undefined
|
|
10068
10068
|
});
|
|
@@ -10070,7 +10070,7 @@ var __vue_inject_styles__$3 = function __vue_inject_styles__(inject) {
|
|
|
10070
10070
|
/* scoped */
|
|
10071
10071
|
var __vue_scope_id__$3 = undefined;
|
|
10072
10072
|
/* module identifier */
|
|
10073
|
-
var __vue_module_identifier__$3 = "data-v-
|
|
10073
|
+
var __vue_module_identifier__$3 = "data-v-5fc0ce34";
|
|
10074
10074
|
/* functional template */
|
|
10075
10075
|
var __vue_is_functional_template__$3 = false;
|
|
10076
10076
|
/* style inject shadow dom */
|
|
@@ -10199,6 +10199,12 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10199
10199
|
return [];
|
|
10200
10200
|
}
|
|
10201
10201
|
},
|
|
10202
|
+
copia: {
|
|
10203
|
+
type: Array,
|
|
10204
|
+
default: function _default() {
|
|
10205
|
+
return [];
|
|
10206
|
+
}
|
|
10207
|
+
},
|
|
10202
10208
|
html: {
|
|
10203
10209
|
type: String,
|
|
10204
10210
|
default: ""
|
|
@@ -10269,6 +10275,10 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10269
10275
|
};
|
|
10270
10276
|
},
|
|
10271
10277
|
computed: {
|
|
10278
|
+
paraCopia: function paraCopia() {
|
|
10279
|
+
if (!this.copia || !this.copia.length) return this.para && this.para.length ? this.para : [];
|
|
10280
|
+
return this.para && this.para.length ? this.para.concat(this.copia) : this.copia;
|
|
10281
|
+
},
|
|
10272
10282
|
formattedDate: function formattedDate() {
|
|
10273
10283
|
return this.formataDateHoraDateFns(this.dataHora, this.dataServer, this.dicionario);
|
|
10274
10284
|
},
|
|
@@ -10282,12 +10292,12 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10282
10292
|
});
|
|
10283
10293
|
return str;
|
|
10284
10294
|
};
|
|
10285
|
-
|
|
10295
|
+
var infos = [{
|
|
10286
10296
|
label: 'De:',
|
|
10287
|
-
value: formatAsString(this.from)
|
|
10297
|
+
value: this.from && this.from.length ? formatAsString(this.from) : '--'
|
|
10288
10298
|
}, {
|
|
10289
10299
|
label: 'Para:',
|
|
10290
|
-
value: formatAsString(this.para)
|
|
10300
|
+
value: this.para && this.para.length ? formatAsString(this.para) : '--'
|
|
10291
10301
|
}, {
|
|
10292
10302
|
label: 'Assunto:',
|
|
10293
10303
|
value: this.htmlEntityToEmoji(this.replaceUnicodeWithEmoji(this.assunto)) || '(Sem assunto)'
|
|
@@ -10295,18 +10305,30 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10295
10305
|
label: 'Data:',
|
|
10296
10306
|
value: this.formataDataHora(this.dataHora) || '--'
|
|
10297
10307
|
}];
|
|
10308
|
+
if (this.copia && this.copia.length) {
|
|
10309
|
+
infos.push({
|
|
10310
|
+
label: this.dicionario.tit_copia,
|
|
10311
|
+
value: formatAsString(this.copia)
|
|
10312
|
+
});
|
|
10313
|
+
}
|
|
10314
|
+
return infos;
|
|
10298
10315
|
}
|
|
10299
10316
|
},
|
|
10300
10317
|
watch: {
|
|
10301
10318
|
isOpen: 'updateIframeContent'
|
|
10302
10319
|
},
|
|
10303
10320
|
mounted: function mounted() {
|
|
10321
|
+
var _this = this;
|
|
10304
10322
|
this.updateIframeContent();
|
|
10305
10323
|
this.adjustMaxWidth();
|
|
10306
10324
|
if (this.refKey) this.$root.$refs["".concat(refKey)] = this;
|
|
10325
|
+
setTimeout(function () {
|
|
10326
|
+
if (_this.isIframeLoading) _this.adjustIframeHeight();
|
|
10327
|
+
}, 15000);
|
|
10307
10328
|
},
|
|
10308
10329
|
methods: {
|
|
10309
10330
|
returnAuthorName: function returnAuthorName() {
|
|
10331
|
+
if (!this.from || !this.from.length) return this.autor || '';
|
|
10310
10332
|
var _this$from$ = this.from[0],
|
|
10311
10333
|
mail = _this$from$.mail,
|
|
10312
10334
|
name = _this$from$.name;
|
|
@@ -10316,24 +10338,26 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10316
10338
|
return name;
|
|
10317
10339
|
},
|
|
10318
10340
|
updateIframeContent: function updateIframeContent() {
|
|
10319
|
-
var
|
|
10341
|
+
var _this2 = this;
|
|
10320
10342
|
this.$nextTick(function () {
|
|
10321
|
-
if (
|
|
10322
|
-
var iframe =
|
|
10343
|
+
if (_this2.isOpen && _this2.isIframeLoading) {
|
|
10344
|
+
var iframe = _this2.$refs.emailIframe;
|
|
10345
|
+
if (!iframe) return;
|
|
10323
10346
|
var doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
10347
|
+
if (!doc) return;
|
|
10324
10348
|
doc.open();
|
|
10325
|
-
doc.write(
|
|
10349
|
+
doc.write(_this2.html);
|
|
10326
10350
|
doc.close();
|
|
10327
10351
|
var images = doc.getElementsByTagName('img');
|
|
10328
10352
|
var imagesLoaded = 0;
|
|
10329
10353
|
var imageLoadHandler = function imageLoadHandler() {
|
|
10330
10354
|
imagesLoaded++;
|
|
10331
10355
|
if (imagesLoaded === images.length) {
|
|
10332
|
-
|
|
10356
|
+
_this2.adjustIframeHeight();
|
|
10333
10357
|
}
|
|
10334
10358
|
};
|
|
10335
10359
|
if (images.length === 0) {
|
|
10336
|
-
|
|
10360
|
+
_this2.adjustIframeHeight();
|
|
10337
10361
|
} else {
|
|
10338
10362
|
var _iterator = _createForOfIteratorHelper(images),
|
|
10339
10363
|
_step;
|
|
@@ -10353,10 +10377,10 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10353
10377
|
});
|
|
10354
10378
|
},
|
|
10355
10379
|
adjustIframeHeight: function adjustIframeHeight() {
|
|
10356
|
-
var
|
|
10380
|
+
var _this3 = this;
|
|
10357
10381
|
this.$nextTick(function () {
|
|
10358
|
-
var iframe =
|
|
10359
|
-
var emailParent =
|
|
10382
|
+
var iframe = _this3.$refs.emailIframe;
|
|
10383
|
+
var emailParent = _this3.$refs.emailIframeParent;
|
|
10360
10384
|
if (iframe && emailParent) {
|
|
10361
10385
|
setTimeout(function () {
|
|
10362
10386
|
var doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
@@ -10366,15 +10390,15 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10366
10390
|
emailParent.style.minHeight = "".concat(value, "px");
|
|
10367
10391
|
}, 10);
|
|
10368
10392
|
}
|
|
10369
|
-
if (
|
|
10393
|
+
if (_this3.isIframeLoading) _this3.isIframeLoading = false;
|
|
10370
10394
|
});
|
|
10371
10395
|
},
|
|
10372
10396
|
toggleShowInfos: function toggleShowInfos() {
|
|
10373
|
-
var
|
|
10397
|
+
var _this4 = this;
|
|
10374
10398
|
this.showInfos = !this.showInfos;
|
|
10375
10399
|
if (this.showInfos) {
|
|
10376
10400
|
this.$nextTick(function () {
|
|
10377
|
-
|
|
10401
|
+
_this4.adjustTopPosition();
|
|
10378
10402
|
});
|
|
10379
10403
|
}
|
|
10380
10404
|
},
|
|
@@ -10382,9 +10406,8 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10382
10406
|
var ulElement = this.$refs.emailToInfos;
|
|
10383
10407
|
if (!ulElement) return;
|
|
10384
10408
|
var ulHeight = ulElement.offsetHeight;
|
|
10385
|
-
var margin = 25;
|
|
10386
10409
|
var maxHeight = 300;
|
|
10387
|
-
var finalHeight = ulHeight < maxHeight ? ulHeight
|
|
10410
|
+
var finalHeight = ulHeight < maxHeight ? ulHeight : maxHeight;
|
|
10388
10411
|
ulElement.style.bottom = "-".concat(finalHeight, "px");
|
|
10389
10412
|
},
|
|
10390
10413
|
toggleIsOpen: function toggleIsOpen() {
|
|
@@ -10396,10 +10419,10 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10396
10419
|
}
|
|
10397
10420
|
},
|
|
10398
10421
|
adjustMaxWidth: function adjustMaxWidth() {
|
|
10399
|
-
var
|
|
10422
|
+
var _this5 = this;
|
|
10400
10423
|
this.$nextTick(function () {
|
|
10401
|
-
var toContainer =
|
|
10402
|
-
var dateContainer =
|
|
10424
|
+
var toContainer = _this5.$refs.emailToContainer;
|
|
10425
|
+
var dateContainer = _this5.$refs.emailDate;
|
|
10403
10426
|
if (!toContainer || !dateContainer) return;
|
|
10404
10427
|
toContainer.style.maxWidth = "calc(100% - ".concat(dateContainer.offsetWidth, "px)");
|
|
10405
10428
|
});
|
|
@@ -10434,7 +10457,10 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10434
10457
|
return "<".concat(mail || '--').concat(index !== length - 1 && isOpen ? '>, ' : '>');
|
|
10435
10458
|
},
|
|
10436
10459
|
formattedToName: function formattedToName(name, index, length) {
|
|
10437
|
-
|
|
10460
|
+
var addVirgulaDps = index < length - 1;
|
|
10461
|
+
var addVirgulaAntes = index === 1 && length >= 2;
|
|
10462
|
+
var text = index === 0 ? "Para: ".concat(name || '') : name ? "".concat(addVirgulaAntes ? ', ' : '').concat(name).concat(addVirgulaDps ? ', ' : '') : '';
|
|
10463
|
+
return text;
|
|
10438
10464
|
},
|
|
10439
10465
|
returnMainValue: function returnMainValue() {
|
|
10440
10466
|
if (this.isMainEmail) return this.htmlEntityToEmoji(this.replaceUnicodeWithEmoji(this.assunto)) || '(Sem assunto)';
|
|
@@ -10445,6 +10471,22 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10445
10471
|
event.preventDefault();
|
|
10446
10472
|
event.stopPropagation();
|
|
10447
10473
|
this.toggleIsOpen();
|
|
10474
|
+
},
|
|
10475
|
+
returnParams: function returnParams(params) {
|
|
10476
|
+
var _this6 = this;
|
|
10477
|
+
var defaultParams = {
|
|
10478
|
+
message: this.mensagem
|
|
10479
|
+
};
|
|
10480
|
+
if (!params) return defaultParams;
|
|
10481
|
+
var keys = params.instanceKeys.split("|");
|
|
10482
|
+
if (!keys || !keys.length) return _objectSpread2({
|
|
10483
|
+
defaultParams: defaultParams
|
|
10484
|
+
}, params.values);
|
|
10485
|
+
var customParams = _objectSpread2({}, params.values);
|
|
10486
|
+
keys.forEach(function (key) {
|
|
10487
|
+
if (_this6[key]) customParams[key] = _this6[key];else console.warn("Cant find ".concat(key, " on 'this' instance"));
|
|
10488
|
+
});
|
|
10489
|
+
return Object.keys(customParams).length ? customParams : defaultParams;
|
|
10448
10490
|
}
|
|
10449
10491
|
}
|
|
10450
10492
|
};/* script */
|
|
@@ -10462,19 +10504,19 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10462
10504
|
return _vm.openByItem($event);
|
|
10463
10505
|
}
|
|
10464
10506
|
}
|
|
10465
|
-
}, [_vm._ssrNode((_vm.showInfos ? "<div class=\"email-overlay\" data-v-
|
|
10507
|
+
}, [_vm._ssrNode((_vm.showInfos ? "<div class=\"email-overlay\" data-v-82cc4396></div>" : "<!---->") + " "), _vm.autor ? _vm._ssrNode("<div" + _vm._ssrClass("email-author", [_vm.origem]) + " data-v-82cc4396>", "</div>", [_c('fa-icon', {
|
|
10466
10508
|
class: [_vm.origem],
|
|
10467
10509
|
attrs: {
|
|
10468
10510
|
"icon": ['fas', 'reply'],
|
|
10469
10511
|
"title": "Enviado por: " + _vm.autor
|
|
10470
10512
|
}
|
|
10471
|
-
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.returnAuthorName()) + " class=\"email-author-name\" data-v-
|
|
10513
|
+
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.returnAuthorName()) + " class=\"email-author-name\" data-v-82cc4396>" + _vm._ssrEscape(_vm._s(_vm.returnAuthorName())) + "</p> "), _c('fa-icon', {
|
|
10472
10514
|
staticClass: "email-to-svg",
|
|
10473
10515
|
attrs: {
|
|
10474
10516
|
"icon": ['fas', _vm.origem === 'outros' ? 'user' : 'headset'],
|
|
10475
10517
|
"title": "E-mail " + (_vm.origem === 'outros' ? 'recebido' : 'enviado')
|
|
10476
10518
|
}
|
|
10477
|
-
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm.customButtons && _vm.customButtons.length ? _vm._ssrNode("<div class=\"email-custom-buttons\" data-v-
|
|
10519
|
+
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm.customButtons && _vm.customButtons.length ? _vm._ssrNode("<div class=\"email-custom-buttons\" data-v-82cc4396>", "</div>", _vm._l(_vm.customButtons, function (button, index) {
|
|
10478
10520
|
return _c('span', {
|
|
10479
10521
|
directives: [{
|
|
10480
10522
|
name: "show",
|
|
@@ -10505,22 +10547,22 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10505
10547
|
"innerHTML": _vm._s(button.svgIcon)
|
|
10506
10548
|
}
|
|
10507
10549
|
})], 1);
|
|
10508
|
-
}), 0) : _vm._e(), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-header\" data-v-
|
|
10550
|
+
}), 0) : _vm._e(), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-header\" data-v-82cc4396>", "</div>", [_vm._ssrNode("<p" + _vm._ssrAttr("title", _vm.returnMainValue()) + " class=\"email-subject\" data-v-82cc4396>" + _vm._ssrEscape("\n " + _vm._s(_vm.returnMainValue()) + "\n ") + "</p> "), _vm._ssrNode("<div class=\"header-container\" data-v-82cc4396>", "</div>", [_vm._ssrNode("<div" + _vm._ssrClass(null, "email-header-content" + (_vm.isOpen ? ' open' : '')) + " data-v-82cc4396>", "</div>", [_vm._ssrNode("<div class=\"email-header-infos\" data-v-82cc4396>", "</div>", [_vm.para && _vm.para.length ? [_vm._ssrNode("<div class=\"email-to-from-container\" data-v-82cc4396>", "</div>", [_vm._l(_vm.paraCopia, function (recipient, index) {
|
|
10509
10551
|
return _c('EmailTo', {
|
|
10510
10552
|
key: "to-" + index,
|
|
10511
10553
|
attrs: {
|
|
10512
|
-
"currentName": _vm.formattedToName(recipient.name, index, _vm.
|
|
10554
|
+
"currentName": _vm.formattedToName(recipient.name, index, _vm.paraCopia.length),
|
|
10513
10555
|
"mail": recipient.mail,
|
|
10514
|
-
"showMail": _vm.
|
|
10556
|
+
"showMail": _vm.isOpen
|
|
10515
10557
|
}
|
|
10516
10558
|
});
|
|
10517
10559
|
}), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-to-btn\"" + _vm._ssrStyle(null, null, {
|
|
10518
10560
|
display: _vm.isOpen ? '' : 'none'
|
|
10519
|
-
}) + " data-v-
|
|
10561
|
+
}) + " data-v-82cc4396>", "</div>", [_c('fa-icon', {
|
|
10520
10562
|
attrs: {
|
|
10521
10563
|
"icon": ['fas', 'caret-down']
|
|
10522
10564
|
}
|
|
10523
|
-
})], 1)], 2)] : _vm._e(), _vm._ssrNode(" " + (!_vm.isMainEmail && _vm.isOpen ? "<div class=\"email-subject-secondary\" data-v-
|
|
10565
|
+
})], 1)], 2)] : _vm._e(), _vm._ssrNode(" " + (!_vm.isMainEmail && _vm.isOpen ? "<div class=\"email-subject-secondary\" data-v-82cc4396><span class=\"email-subject-span\" data-v-82cc4396>" + _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-82cc4396>", "</span>", [_c('fa-icon', {
|
|
10524
10566
|
attrs: {
|
|
10525
10567
|
"icon": ['fas', 'calendar']
|
|
10526
10568
|
}
|
|
@@ -10541,12 +10583,12 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10541
10583
|
}
|
|
10542
10584
|
}
|
|
10543
10585
|
}, [_vm._ssrNode(_vm._ssrList(_vm.mailInfos, function (info, index) {
|
|
10544
|
-
return "<li class=\"email-info\" data-v-
|
|
10586
|
+
return "<li class=\"email-info\" data-v-82cc4396><span data-v-82cc4396>" + _vm._ssrEscape(_vm._s(info.label)) + "</span>" + _vm._ssrEscape("\n " + _vm._s(info.value) + "\n ") + "</li>";
|
|
10545
10587
|
}))]) : _vm._e(), _vm._ssrNode(" " + (_vm.isOpen ? "<span" + _vm._ssrClass(null, ['email-actions box-shadow', {
|
|
10546
10588
|
active: _vm.actionsOpen
|
|
10547
10589
|
}, {
|
|
10548
10590
|
main: _vm.isMainEmail
|
|
10549
|
-
}]) + " data-v-
|
|
10591
|
+
}]) + " data-v-82cc4396><span data-v-82cc4396></span> <span data-v-82cc4396></span> <span data-v-82cc4396></span></span>" : "<!---->") + " "), _vm.actionsOpen && _vm.isOpen ? _c('ul', {
|
|
10550
10592
|
directives: [{
|
|
10551
10593
|
name: "clickaway",
|
|
10552
10594
|
rawName: "v-clickaway",
|
|
@@ -10559,7 +10601,7 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10559
10601
|
$event.stopPropagation();
|
|
10560
10602
|
}
|
|
10561
10603
|
}
|
|
10562
|
-
}, [_vm._ssrNode("<li class=\"email-action\" data-v-
|
|
10604
|
+
}, [_vm._ssrNode("<li class=\"email-action\" data-v-82cc4396>" + _vm._ssrEscape("\n " + _vm._s(!_vm.openMessage ? 'Visualizar' : 'Esconder') + " texto do e-mail\n ") + "</li>")]) : _vm._e()], 2), _vm._ssrNode(" "), _c('transition', {
|
|
10563
10605
|
attrs: {
|
|
10564
10606
|
"name": "show-y-top"
|
|
10565
10607
|
}
|
|
@@ -10577,7 +10619,7 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10577
10619
|
class: "email-html " + (_vm.isIframeLoading ? 'visibility-hidden' : '')
|
|
10578
10620
|
}), _vm._v(" "), _vm.openMessage ? _c('span', {
|
|
10579
10621
|
staticClass: "email-raw"
|
|
10580
|
-
}, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()], 1)]), _vm._ssrNode(" "), _vm.anexos && _vm.anexos.length ? _vm._ssrNode("<div class=\"email-files\" data-v-
|
|
10622
|
+
}, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()], 1)]), _vm._ssrNode(" "), _vm.anexos && _vm.anexos.length ? _vm._ssrNode("<div class=\"email-files\" data-v-82cc4396>", "</div>", _vm._l(_vm.anexos, function (anexo, index) {
|
|
10581
10623
|
return _c('EmailFile', {
|
|
10582
10624
|
key: index,
|
|
10583
10625
|
attrs: {
|
|
@@ -10592,20 +10634,20 @@ var __vue_staticRenderFns__$1 = [];
|
|
|
10592
10634
|
/* style */
|
|
10593
10635
|
var __vue_inject_styles__$1 = function __vue_inject_styles__(inject) {
|
|
10594
10636
|
if (!inject) return;
|
|
10595
|
-
inject("data-v-
|
|
10596
|
-
source: ".show-y-top-enter-active[data-v-
|
|
10637
|
+
inject("data-v-82cc4396_0", {
|
|
10638
|
+
source: ".show-y-top-enter-active[data-v-82cc4396],.show-y-top-leave-enter[data-v-82cc4396]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-82cc4396],.show-y-top-leave-to[data-v-82cc4396]{opacity:0;transform:translateY(-2%)}",
|
|
10597
10639
|
map: undefined,
|
|
10598
10640
|
media: undefined
|
|
10599
|
-
}), inject("data-v-
|
|
10600
|
-
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;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-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:
|
|
10641
|
+
}), inject("data-v-82cc4396_1", {
|
|
10642
|
+
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;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-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%;cursor:default;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}",
|
|
10601
10643
|
map: undefined,
|
|
10602
10644
|
media: undefined
|
|
10603
10645
|
});
|
|
10604
10646
|
};
|
|
10605
10647
|
/* scoped */
|
|
10606
|
-
var __vue_scope_id__$1 = "data-v-
|
|
10648
|
+
var __vue_scope_id__$1 = "data-v-82cc4396";
|
|
10607
10649
|
/* module identifier */
|
|
10608
|
-
var __vue_module_identifier__$1 = "data-v-
|
|
10650
|
+
var __vue_module_identifier__$1 = "data-v-82cc4396";
|
|
10609
10651
|
/* functional template */
|
|
10610
10652
|
var __vue_is_functional_template__$1 = false;
|
|
10611
10653
|
/* style inject shadow dom */
|
package/package.json
CHANGED
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
<div class="email-header-infos">
|
|
27
27
|
<template v-if="para && para.length">
|
|
28
28
|
<div class="email-to-from-container" ref="emailToContainer">
|
|
29
|
-
<EmailTo v-for="(recipient, index) in
|
|
30
|
-
:currentName="formattedToName(recipient.name, index,
|
|
31
|
-
:showMail="
|
|
29
|
+
<EmailTo v-for="(recipient, index) in paraCopia" :key="`to-${index}`"
|
|
30
|
+
:currentName="formattedToName(recipient.name, index, paraCopia.length)" :mail="recipient.mail"
|
|
31
|
+
:showMail="isOpen" />
|
|
32
32
|
<div class="email-to-btn" v-show="isOpen" @click.stop="toggleShowInfos()">
|
|
33
33
|
<fa-icon :icon="['fas', 'caret-down']" />
|
|
34
34
|
</div>
|
|
@@ -106,6 +106,10 @@ export default {
|
|
|
106
106
|
type: Array,
|
|
107
107
|
default: () => []
|
|
108
108
|
},
|
|
109
|
+
copia: {
|
|
110
|
+
type: Array,
|
|
111
|
+
default: () => []
|
|
112
|
+
},
|
|
109
113
|
html: {
|
|
110
114
|
type: String,
|
|
111
115
|
default: ""
|
|
@@ -174,6 +178,10 @@ export default {
|
|
|
174
178
|
};
|
|
175
179
|
},
|
|
176
180
|
computed: {
|
|
181
|
+
paraCopia() {
|
|
182
|
+
if (!this.copia || !this.copia.length) return this.para && this.para.length ? this.para : []
|
|
183
|
+
return this.para && this.para.length ? this.para.concat(this.copia) : this.copia
|
|
184
|
+
},
|
|
177
185
|
formattedDate() {
|
|
178
186
|
return this.formataDateHoraDateFns(this.dataHora, this.dataServer, this.dicionario);
|
|
179
187
|
},
|
|
@@ -186,14 +194,14 @@ export default {
|
|
|
186
194
|
return str
|
|
187
195
|
}
|
|
188
196
|
|
|
189
|
-
|
|
197
|
+
const infos = [
|
|
190
198
|
{
|
|
191
199
|
label: 'De:',
|
|
192
|
-
value: formatAsString(this.from)
|
|
200
|
+
value: this.from && this.from.length ? formatAsString(this.from) : '--'
|
|
193
201
|
},
|
|
194
202
|
{
|
|
195
203
|
label: 'Para:',
|
|
196
|
-
value: formatAsString(this.para)
|
|
204
|
+
value: this.para && this.para.length ? formatAsString(this.para) : '--'
|
|
197
205
|
},
|
|
198
206
|
{
|
|
199
207
|
label: 'Assunto:',
|
|
@@ -204,6 +212,15 @@ export default {
|
|
|
204
212
|
value: this.formataDataHora(this.dataHora) || '--'
|
|
205
213
|
},
|
|
206
214
|
]
|
|
215
|
+
|
|
216
|
+
if (this.copia && this.copia.length) {
|
|
217
|
+
infos.push({
|
|
218
|
+
label: this.dicionario.tit_copia,
|
|
219
|
+
value: formatAsString(this.copia)
|
|
220
|
+
})
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return infos
|
|
207
224
|
},
|
|
208
225
|
},
|
|
209
226
|
watch: {
|
|
@@ -214,9 +231,14 @@ export default {
|
|
|
214
231
|
this.adjustMaxWidth()
|
|
215
232
|
|
|
216
233
|
if (this.refKey) this.$root.$refs[`${refKey}`] = this
|
|
234
|
+
|
|
235
|
+
setTimeout(() => {
|
|
236
|
+
if (this.isIframeLoading) this.adjustIframeHeight()
|
|
237
|
+
}, 15000);
|
|
217
238
|
},
|
|
218
239
|
methods: {
|
|
219
240
|
returnAuthorName() {
|
|
241
|
+
if (!this.from || !this.from.length) return this.autor || ''
|
|
220
242
|
const { mail, name } = this.from[0]
|
|
221
243
|
if (!name) return mail
|
|
222
244
|
if (!mail) return name
|
|
@@ -227,7 +249,9 @@ export default {
|
|
|
227
249
|
this.$nextTick(() => {
|
|
228
250
|
if (this.isOpen && this.isIframeLoading) {
|
|
229
251
|
const iframe = this.$refs.emailIframe;
|
|
252
|
+
if (!iframe) return
|
|
230
253
|
const doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
254
|
+
if (!doc) return
|
|
231
255
|
doc.open();
|
|
232
256
|
doc.write(this.html);
|
|
233
257
|
doc.close();
|
|
@@ -282,9 +306,8 @@ export default {
|
|
|
282
306
|
const ulElement = this.$refs.emailToInfos;
|
|
283
307
|
if (!ulElement) return
|
|
284
308
|
const ulHeight = ulElement.offsetHeight;
|
|
285
|
-
const margin = 25
|
|
286
309
|
const maxHeight = 300
|
|
287
|
-
const finalHeight = ulHeight < maxHeight ? ulHeight
|
|
310
|
+
const finalHeight = ulHeight < maxHeight ? ulHeight : maxHeight
|
|
288
311
|
ulElement.style.bottom = `-${finalHeight}px`;
|
|
289
312
|
},
|
|
290
313
|
toggleIsOpen() {
|
|
@@ -334,7 +357,10 @@ export default {
|
|
|
334
357
|
return `<${mail || '--'}${index !== length - 1 && isOpen ? '>, ' : '>'}`;
|
|
335
358
|
},
|
|
336
359
|
formattedToName(name, index, length) {
|
|
337
|
-
|
|
360
|
+
let addVirgulaDps = index < length - 1
|
|
361
|
+
let addVirgulaAntes = index === 1 && length >= 2
|
|
362
|
+
const text = index === 0 ? `Para: ${name || ''}` : name ? `${addVirgulaAntes ? ', ' : ''}${name}${addVirgulaDps ? ', ' : ''}` : '';
|
|
363
|
+
return text
|
|
338
364
|
},
|
|
339
365
|
returnMainValue() {
|
|
340
366
|
if (this.isMainEmail) return this.htmlEntityToEmoji(this.replaceUnicodeWithEmoji(this.assunto)) || '(Sem assunto)'
|
|
@@ -347,6 +373,28 @@ export default {
|
|
|
347
373
|
event.stopPropagation();
|
|
348
374
|
|
|
349
375
|
this.toggleIsOpen();
|
|
376
|
+
},
|
|
377
|
+
returnParams(params) {
|
|
378
|
+
const defaultParams = {
|
|
379
|
+
message: this.mensagem,
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
if (!params) return defaultParams;
|
|
383
|
+
|
|
384
|
+
const keys = params.instanceKeys.split("|");
|
|
385
|
+
if (!keys || !keys.length)
|
|
386
|
+
return {
|
|
387
|
+
defaultParams,
|
|
388
|
+
...params.values,
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
const customParams = { ...params.values };
|
|
392
|
+
keys.forEach((key) => {
|
|
393
|
+
if (this[key]) customParams[key] = this[key];
|
|
394
|
+
else console.warn(`Cant find ${key} on 'this' instance`);
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
return Object.keys(customParams).length ? customParams : defaultParams;
|
|
350
398
|
}
|
|
351
399
|
}
|
|
352
400
|
};
|
|
@@ -531,7 +579,7 @@ export default {
|
|
|
531
579
|
}
|
|
532
580
|
|
|
533
581
|
.email-actions.main {
|
|
534
|
-
top:
|
|
582
|
+
top: 10px
|
|
535
583
|
}
|
|
536
584
|
|
|
537
585
|
.email-actions.active {
|