vue-intergrall-plugins 1.0.65 → 1.0.67
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 */
|
|
@@ -10187,6 +10187,10 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10187
10187
|
type: Object,
|
|
10188
10188
|
required: true
|
|
10189
10189
|
},
|
|
10190
|
+
customClass: {
|
|
10191
|
+
type: String,
|
|
10192
|
+
default: ''
|
|
10193
|
+
},
|
|
10190
10194
|
from: {
|
|
10191
10195
|
type: Array,
|
|
10192
10196
|
default: function _default() {
|
|
@@ -10199,6 +10203,12 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10199
10203
|
return [];
|
|
10200
10204
|
}
|
|
10201
10205
|
},
|
|
10206
|
+
copia: {
|
|
10207
|
+
type: Array,
|
|
10208
|
+
default: function _default() {
|
|
10209
|
+
return [];
|
|
10210
|
+
}
|
|
10211
|
+
},
|
|
10202
10212
|
html: {
|
|
10203
10213
|
type: String,
|
|
10204
10214
|
default: ""
|
|
@@ -10269,6 +10279,10 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10269
10279
|
};
|
|
10270
10280
|
},
|
|
10271
10281
|
computed: {
|
|
10282
|
+
paraCopia: function paraCopia() {
|
|
10283
|
+
if (!this.copia || !this.copia.length) return this.para && this.para.length ? this.para : [];
|
|
10284
|
+
return this.para && this.para.length ? this.para.concat(this.copia) : this.copia;
|
|
10285
|
+
},
|
|
10272
10286
|
formattedDate: function formattedDate() {
|
|
10273
10287
|
return this.formataDateHoraDateFns(this.dataHora, this.dataServer, this.dicionario);
|
|
10274
10288
|
},
|
|
@@ -10282,12 +10296,12 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10282
10296
|
});
|
|
10283
10297
|
return str;
|
|
10284
10298
|
};
|
|
10285
|
-
|
|
10299
|
+
var infos = [{
|
|
10286
10300
|
label: 'De:',
|
|
10287
|
-
value: formatAsString(this.from)
|
|
10301
|
+
value: this.from && this.from.length ? formatAsString(this.from) : '--'
|
|
10288
10302
|
}, {
|
|
10289
10303
|
label: 'Para:',
|
|
10290
|
-
value: formatAsString(this.para)
|
|
10304
|
+
value: this.para && this.para.length ? formatAsString(this.para) : '--'
|
|
10291
10305
|
}, {
|
|
10292
10306
|
label: 'Assunto:',
|
|
10293
10307
|
value: this.htmlEntityToEmoji(this.replaceUnicodeWithEmoji(this.assunto)) || '(Sem assunto)'
|
|
@@ -10295,18 +10309,30 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10295
10309
|
label: 'Data:',
|
|
10296
10310
|
value: this.formataDataHora(this.dataHora) || '--'
|
|
10297
10311
|
}];
|
|
10312
|
+
if (this.copia && this.copia.length) {
|
|
10313
|
+
infos.push({
|
|
10314
|
+
label: this.dicionario.tit_copia,
|
|
10315
|
+
value: formatAsString(this.copia)
|
|
10316
|
+
});
|
|
10317
|
+
}
|
|
10318
|
+
return infos;
|
|
10298
10319
|
}
|
|
10299
10320
|
},
|
|
10300
10321
|
watch: {
|
|
10301
10322
|
isOpen: 'updateIframeContent'
|
|
10302
10323
|
},
|
|
10303
10324
|
mounted: function mounted() {
|
|
10325
|
+
var _this = this;
|
|
10304
10326
|
this.updateIframeContent();
|
|
10305
10327
|
this.adjustMaxWidth();
|
|
10306
10328
|
if (this.refKey) this.$root.$refs["".concat(refKey)] = this;
|
|
10329
|
+
setTimeout(function () {
|
|
10330
|
+
if (_this.isIframeLoading) _this.adjustIframeHeight();
|
|
10331
|
+
}, 15000);
|
|
10307
10332
|
},
|
|
10308
10333
|
methods: {
|
|
10309
10334
|
returnAuthorName: function returnAuthorName() {
|
|
10335
|
+
if (!this.from || !this.from.length) return this.autor || '';
|
|
10310
10336
|
var _this$from$ = this.from[0],
|
|
10311
10337
|
mail = _this$from$.mail,
|
|
10312
10338
|
name = _this$from$.name;
|
|
@@ -10316,24 +10342,26 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10316
10342
|
return name;
|
|
10317
10343
|
},
|
|
10318
10344
|
updateIframeContent: function updateIframeContent() {
|
|
10319
|
-
var
|
|
10345
|
+
var _this2 = this;
|
|
10320
10346
|
this.$nextTick(function () {
|
|
10321
|
-
if (
|
|
10322
|
-
var iframe =
|
|
10347
|
+
if (_this2.isOpen && _this2.isIframeLoading) {
|
|
10348
|
+
var iframe = _this2.$refs.emailIframe;
|
|
10349
|
+
if (!iframe) return;
|
|
10323
10350
|
var doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
10351
|
+
if (!doc) return;
|
|
10324
10352
|
doc.open();
|
|
10325
|
-
doc.write(
|
|
10353
|
+
doc.write(_this2.html);
|
|
10326
10354
|
doc.close();
|
|
10327
10355
|
var images = doc.getElementsByTagName('img');
|
|
10328
10356
|
var imagesLoaded = 0;
|
|
10329
10357
|
var imageLoadHandler = function imageLoadHandler() {
|
|
10330
10358
|
imagesLoaded++;
|
|
10331
10359
|
if (imagesLoaded === images.length) {
|
|
10332
|
-
|
|
10360
|
+
_this2.adjustIframeHeight();
|
|
10333
10361
|
}
|
|
10334
10362
|
};
|
|
10335
10363
|
if (images.length === 0) {
|
|
10336
|
-
|
|
10364
|
+
_this2.adjustIframeHeight();
|
|
10337
10365
|
} else {
|
|
10338
10366
|
var _iterator = _createForOfIteratorHelper(images),
|
|
10339
10367
|
_step;
|
|
@@ -10353,10 +10381,10 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10353
10381
|
});
|
|
10354
10382
|
},
|
|
10355
10383
|
adjustIframeHeight: function adjustIframeHeight() {
|
|
10356
|
-
var
|
|
10384
|
+
var _this3 = this;
|
|
10357
10385
|
this.$nextTick(function () {
|
|
10358
|
-
var iframe =
|
|
10359
|
-
var emailParent =
|
|
10386
|
+
var iframe = _this3.$refs.emailIframe;
|
|
10387
|
+
var emailParent = _this3.$refs.emailIframeParent;
|
|
10360
10388
|
if (iframe && emailParent) {
|
|
10361
10389
|
setTimeout(function () {
|
|
10362
10390
|
var doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
@@ -10366,15 +10394,15 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10366
10394
|
emailParent.style.minHeight = "".concat(value, "px");
|
|
10367
10395
|
}, 10);
|
|
10368
10396
|
}
|
|
10369
|
-
if (
|
|
10397
|
+
if (_this3.isIframeLoading) _this3.isIframeLoading = false;
|
|
10370
10398
|
});
|
|
10371
10399
|
},
|
|
10372
10400
|
toggleShowInfos: function toggleShowInfos() {
|
|
10373
|
-
var
|
|
10401
|
+
var _this4 = this;
|
|
10374
10402
|
this.showInfos = !this.showInfos;
|
|
10375
10403
|
if (this.showInfos) {
|
|
10376
10404
|
this.$nextTick(function () {
|
|
10377
|
-
|
|
10405
|
+
_this4.adjustTopPosition();
|
|
10378
10406
|
});
|
|
10379
10407
|
}
|
|
10380
10408
|
},
|
|
@@ -10395,10 +10423,10 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10395
10423
|
}
|
|
10396
10424
|
},
|
|
10397
10425
|
adjustMaxWidth: function adjustMaxWidth() {
|
|
10398
|
-
var
|
|
10426
|
+
var _this5 = this;
|
|
10399
10427
|
this.$nextTick(function () {
|
|
10400
|
-
var toContainer =
|
|
10401
|
-
var dateContainer =
|
|
10428
|
+
var toContainer = _this5.$refs.emailToContainer;
|
|
10429
|
+
var dateContainer = _this5.$refs.emailDate;
|
|
10402
10430
|
if (!toContainer || !dateContainer) return;
|
|
10403
10431
|
toContainer.style.maxWidth = "calc(100% - ".concat(dateContainer.offsetWidth, "px)");
|
|
10404
10432
|
});
|
|
@@ -10433,7 +10461,10 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10433
10461
|
return "<".concat(mail || '--').concat(index !== length - 1 && isOpen ? '>, ' : '>');
|
|
10434
10462
|
},
|
|
10435
10463
|
formattedToName: function formattedToName(name, index, length) {
|
|
10436
|
-
|
|
10464
|
+
var addVirgulaDps = index < length - 1;
|
|
10465
|
+
var addVirgulaAntes = index === 1 && length >= 2;
|
|
10466
|
+
var text = index === 0 ? "Para: ".concat(name || '') : name ? "".concat(addVirgulaAntes ? ', ' : '').concat(name).concat(addVirgulaDps ? ', ' : '') : '';
|
|
10467
|
+
return text;
|
|
10437
10468
|
},
|
|
10438
10469
|
returnMainValue: function returnMainValue() {
|
|
10439
10470
|
if (this.isMainEmail) return this.htmlEntityToEmoji(this.replaceUnicodeWithEmoji(this.assunto)) || '(Sem assunto)';
|
|
@@ -10444,6 +10475,22 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10444
10475
|
event.preventDefault();
|
|
10445
10476
|
event.stopPropagation();
|
|
10446
10477
|
this.toggleIsOpen();
|
|
10478
|
+
},
|
|
10479
|
+
returnParams: function returnParams(params) {
|
|
10480
|
+
var _this6 = this;
|
|
10481
|
+
var defaultParams = {
|
|
10482
|
+
message: this.mensagem
|
|
10483
|
+
};
|
|
10484
|
+
if (!params) return defaultParams;
|
|
10485
|
+
var keys = params.instanceKeys.split("|");
|
|
10486
|
+
if (!keys || !keys.length) return _objectSpread2({
|
|
10487
|
+
defaultParams: defaultParams
|
|
10488
|
+
}, params.values);
|
|
10489
|
+
var customParams = _objectSpread2({}, params.values);
|
|
10490
|
+
keys.forEach(function (key) {
|
|
10491
|
+
if (_this6[key]) customParams[key] = _this6[key];else console.warn("Cant find ".concat(key, " on 'this' instance"));
|
|
10492
|
+
});
|
|
10493
|
+
return Object.keys(customParams).length ? customParams : defaultParams;
|
|
10447
10494
|
}
|
|
10448
10495
|
}
|
|
10449
10496
|
};/* script */
|
|
@@ -10455,25 +10502,25 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10455
10502
|
var _h = _vm.$createElement;
|
|
10456
10503
|
var _c = _vm._self._c || _h;
|
|
10457
10504
|
return _c('div', {
|
|
10458
|
-
class: ['email-item box-shadow-active', _vm.isOpen ? _vm.isOpenClass : _vm.isClosedClass + " cursor-pointer", _vm.showInfos ? 'info-open' : '', _vm.origem],
|
|
10505
|
+
class: ['email-item box-shadow-active', _vm.isOpen ? _vm.isOpenClass : _vm.isClosedClass + " cursor-pointer", _vm.showInfos ? 'info-open' : '', _vm.origem, _vm.customClass],
|
|
10459
10506
|
on: {
|
|
10460
10507
|
"click": function click($event) {
|
|
10461
10508
|
return _vm.openByItem($event);
|
|
10462
10509
|
}
|
|
10463
10510
|
}
|
|
10464
|
-
}, [_vm._ssrNode((_vm.showInfos ? "<div class=\"email-overlay\" data-v-
|
|
10511
|
+
}, [_vm._ssrNode((_vm.showInfos ? "<div class=\"email-overlay\" data-v-514b8f3d></div>" : "<!---->") + " "), _vm.autor ? _vm._ssrNode("<div" + _vm._ssrClass("email-author", [_vm.origem]) + " data-v-514b8f3d>", "</div>", [_c('fa-icon', {
|
|
10465
10512
|
class: [_vm.origem],
|
|
10466
10513
|
attrs: {
|
|
10467
10514
|
"icon": ['fas', 'reply'],
|
|
10468
10515
|
"title": "Enviado por: " + _vm.autor
|
|
10469
10516
|
}
|
|
10470
|
-
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.returnAuthorName()) + " class=\"email-author-name\" data-v-
|
|
10517
|
+
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.returnAuthorName()) + " class=\"email-author-name\" data-v-514b8f3d>" + _vm._ssrEscape(_vm._s(_vm.returnAuthorName())) + "</p> "), _c('fa-icon', {
|
|
10471
10518
|
staticClass: "email-to-svg",
|
|
10472
10519
|
attrs: {
|
|
10473
10520
|
"icon": ['fas', _vm.origem === 'outros' ? 'user' : 'headset'],
|
|
10474
10521
|
"title": "E-mail " + (_vm.origem === 'outros' ? 'recebido' : 'enviado')
|
|
10475
10522
|
}
|
|
10476
|
-
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm.customButtons && _vm.customButtons.length ? _vm._ssrNode("<div class=\"email-custom-buttons\" data-v-
|
|
10523
|
+
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm.customButtons && _vm.customButtons.length ? _vm._ssrNode("<div class=\"email-custom-buttons\" data-v-514b8f3d>", "</div>", _vm._l(_vm.customButtons, function (button, index) {
|
|
10477
10524
|
return _c('span', {
|
|
10478
10525
|
directives: [{
|
|
10479
10526
|
name: "show",
|
|
@@ -10504,22 +10551,22 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10504
10551
|
"innerHTML": _vm._s(button.svgIcon)
|
|
10505
10552
|
}
|
|
10506
10553
|
})], 1);
|
|
10507
|
-
}), 0) : _vm._e(), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-header\" data-v-
|
|
10554
|
+
}), 0) : _vm._e(), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-header\" data-v-514b8f3d>", "</div>", [_vm._ssrNode("<p" + _vm._ssrAttr("title", _vm.returnMainValue()) + " class=\"email-subject\" data-v-514b8f3d>" + _vm._ssrEscape("\n " + _vm._s(_vm.returnMainValue()) + "\n ") + "</p> "), _vm._ssrNode("<div class=\"header-container\" data-v-514b8f3d>", "</div>", [_vm._ssrNode("<div" + _vm._ssrClass(null, "email-header-content" + (_vm.isOpen ? ' open' : '')) + " data-v-514b8f3d>", "</div>", [_vm._ssrNode("<div class=\"email-header-infos\" data-v-514b8f3d>", "</div>", [_vm.para && _vm.para.length ? [_vm._ssrNode("<div class=\"email-to-from-container\" data-v-514b8f3d>", "</div>", [_vm._l(_vm.paraCopia, function (recipient, index) {
|
|
10508
10555
|
return _c('EmailTo', {
|
|
10509
10556
|
key: "to-" + index,
|
|
10510
10557
|
attrs: {
|
|
10511
|
-
"currentName": _vm.formattedToName(recipient.name, index, _vm.
|
|
10558
|
+
"currentName": _vm.formattedToName(recipient.name, index, _vm.paraCopia.length),
|
|
10512
10559
|
"mail": recipient.mail,
|
|
10513
|
-
"showMail": _vm.
|
|
10560
|
+
"showMail": _vm.isOpen
|
|
10514
10561
|
}
|
|
10515
10562
|
});
|
|
10516
10563
|
}), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-to-btn\"" + _vm._ssrStyle(null, null, {
|
|
10517
10564
|
display: _vm.isOpen ? '' : 'none'
|
|
10518
|
-
}) + " data-v-
|
|
10565
|
+
}) + " data-v-514b8f3d>", "</div>", [_c('fa-icon', {
|
|
10519
10566
|
attrs: {
|
|
10520
10567
|
"icon": ['fas', 'caret-down']
|
|
10521
10568
|
}
|
|
10522
|
-
})], 1)], 2)] : _vm._e(), _vm._ssrNode(" " + (!_vm.isMainEmail && _vm.isOpen ? "<div class=\"email-subject-secondary\" data-v-
|
|
10569
|
+
})], 1)], 2)] : _vm._e(), _vm._ssrNode(" " + (!_vm.isMainEmail && _vm.isOpen ? "<div class=\"email-subject-secondary\" data-v-514b8f3d><span class=\"email-subject-span\" data-v-514b8f3d>" + _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-514b8f3d>", "</span>", [_c('fa-icon', {
|
|
10523
10570
|
attrs: {
|
|
10524
10571
|
"icon": ['fas', 'calendar']
|
|
10525
10572
|
}
|
|
@@ -10540,12 +10587,12 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10540
10587
|
}
|
|
10541
10588
|
}
|
|
10542
10589
|
}, [_vm._ssrNode(_vm._ssrList(_vm.mailInfos, function (info, index) {
|
|
10543
|
-
return "<li class=\"email-info\" data-v-
|
|
10590
|
+
return "<li class=\"email-info\" data-v-514b8f3d><span data-v-514b8f3d>" + _vm._ssrEscape(_vm._s(info.label)) + "</span>" + _vm._ssrEscape("\n " + _vm._s(info.value) + "\n ") + "</li>";
|
|
10544
10591
|
}))]) : _vm._e(), _vm._ssrNode(" " + (_vm.isOpen ? "<span" + _vm._ssrClass(null, ['email-actions box-shadow', {
|
|
10545
10592
|
active: _vm.actionsOpen
|
|
10546
10593
|
}, {
|
|
10547
10594
|
main: _vm.isMainEmail
|
|
10548
|
-
}]) + " data-v-
|
|
10595
|
+
}]) + " data-v-514b8f3d><span data-v-514b8f3d></span> <span data-v-514b8f3d></span> <span data-v-514b8f3d></span></span>" : "<!---->") + " "), _vm.actionsOpen && _vm.isOpen ? _c('ul', {
|
|
10549
10596
|
directives: [{
|
|
10550
10597
|
name: "clickaway",
|
|
10551
10598
|
rawName: "v-clickaway",
|
|
@@ -10558,7 +10605,7 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10558
10605
|
$event.stopPropagation();
|
|
10559
10606
|
}
|
|
10560
10607
|
}
|
|
10561
|
-
}, [_vm._ssrNode("<li class=\"email-action\" data-v-
|
|
10608
|
+
}, [_vm._ssrNode("<li class=\"email-action\" data-v-514b8f3d>" + _vm._ssrEscape("\n " + _vm._s(!_vm.openMessage ? 'Visualizar' : 'Esconder') + " texto do e-mail\n ") + "</li>")]) : _vm._e()], 2), _vm._ssrNode(" "), _c('transition', {
|
|
10562
10609
|
attrs: {
|
|
10563
10610
|
"name": "show-y-top"
|
|
10564
10611
|
}
|
|
@@ -10576,7 +10623,7 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10576
10623
|
class: "email-html " + (_vm.isIframeLoading ? 'visibility-hidden' : '')
|
|
10577
10624
|
}), _vm._v(" "), _vm.openMessage ? _c('span', {
|
|
10578
10625
|
staticClass: "email-raw"
|
|
10579
|
-
}, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()], 1)]), _vm._ssrNode(" "), _vm.anexos && _vm.anexos.length ? _vm._ssrNode("<div class=\"email-files\" data-v-
|
|
10626
|
+
}, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()], 1)]), _vm._ssrNode(" "), _vm.anexos && _vm.anexos.length ? _vm._ssrNode("<div class=\"email-files\" data-v-514b8f3d>", "</div>", _vm._l(_vm.anexos, function (anexo, index) {
|
|
10580
10627
|
return _c('EmailFile', {
|
|
10581
10628
|
key: index,
|
|
10582
10629
|
attrs: {
|
|
@@ -10591,20 +10638,20 @@ var __vue_staticRenderFns__$1 = [];
|
|
|
10591
10638
|
/* style */
|
|
10592
10639
|
var __vue_inject_styles__$1 = function __vue_inject_styles__(inject) {
|
|
10593
10640
|
if (!inject) return;
|
|
10594
|
-
inject("data-v-
|
|
10595
|
-
source: ".show-y-top-enter-active[data-v-
|
|
10641
|
+
inject("data-v-514b8f3d_0", {
|
|
10642
|
+
source: ".show-y-top-enter-active[data-v-514b8f3d],.show-y-top-leave-enter[data-v-514b8f3d]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-514b8f3d],.show-y-top-leave-to[data-v-514b8f3d]{opacity:0;transform:translateY(-2%)}",
|
|
10596
10643
|
map: undefined,
|
|
10597
10644
|
media: undefined
|
|
10598
|
-
}), inject("data-v-
|
|
10599
|
-
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:
|
|
10645
|
+
}), inject("data-v-514b8f3d_1", {
|
|
10646
|
+
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}",
|
|
10600
10647
|
map: undefined,
|
|
10601
10648
|
media: undefined
|
|
10602
10649
|
});
|
|
10603
10650
|
};
|
|
10604
10651
|
/* scoped */
|
|
10605
|
-
var __vue_scope_id__$1 = "data-v-
|
|
10652
|
+
var __vue_scope_id__$1 = "data-v-514b8f3d";
|
|
10606
10653
|
/* module identifier */
|
|
10607
|
-
var __vue_module_identifier__$1 = "data-v-
|
|
10654
|
+
var __vue_module_identifier__$1 = "data-v-514b8f3d";
|
|
10608
10655
|
/* functional template */
|
|
10609
10656
|
var __vue_is_functional_template__$1 = false;
|
|
10610
10657
|
/* style inject shadow dom */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
:class="['email-item box-shadow-active', isOpen ? isOpenClass : `${isClosedClass} cursor-pointer`, showInfos ? 'info-open' : '', origem]"
|
|
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
6
|
<div class="email-author" v-if="autor" :class="[origem]" @click.stop="toggleIsOpen">
|
|
@@ -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>
|
|
@@ -98,6 +98,10 @@ export default {
|
|
|
98
98
|
type: Object,
|
|
99
99
|
required: true
|
|
100
100
|
},
|
|
101
|
+
customClass: {
|
|
102
|
+
type: String,
|
|
103
|
+
default: ''
|
|
104
|
+
},
|
|
101
105
|
from: {
|
|
102
106
|
type: Array,
|
|
103
107
|
default: () => []
|
|
@@ -106,6 +110,10 @@ export default {
|
|
|
106
110
|
type: Array,
|
|
107
111
|
default: () => []
|
|
108
112
|
},
|
|
113
|
+
copia: {
|
|
114
|
+
type: Array,
|
|
115
|
+
default: () => []
|
|
116
|
+
},
|
|
109
117
|
html: {
|
|
110
118
|
type: String,
|
|
111
119
|
default: ""
|
|
@@ -174,6 +182,10 @@ export default {
|
|
|
174
182
|
};
|
|
175
183
|
},
|
|
176
184
|
computed: {
|
|
185
|
+
paraCopia() {
|
|
186
|
+
if (!this.copia || !this.copia.length) return this.para && this.para.length ? this.para : []
|
|
187
|
+
return this.para && this.para.length ? this.para.concat(this.copia) : this.copia
|
|
188
|
+
},
|
|
177
189
|
formattedDate() {
|
|
178
190
|
return this.formataDateHoraDateFns(this.dataHora, this.dataServer, this.dicionario);
|
|
179
191
|
},
|
|
@@ -186,14 +198,14 @@ export default {
|
|
|
186
198
|
return str
|
|
187
199
|
}
|
|
188
200
|
|
|
189
|
-
|
|
201
|
+
const infos = [
|
|
190
202
|
{
|
|
191
203
|
label: 'De:',
|
|
192
|
-
value: formatAsString(this.from)
|
|
204
|
+
value: this.from && this.from.length ? formatAsString(this.from) : '--'
|
|
193
205
|
},
|
|
194
206
|
{
|
|
195
207
|
label: 'Para:',
|
|
196
|
-
value: formatAsString(this.para)
|
|
208
|
+
value: this.para && this.para.length ? formatAsString(this.para) : '--'
|
|
197
209
|
},
|
|
198
210
|
{
|
|
199
211
|
label: 'Assunto:',
|
|
@@ -204,6 +216,15 @@ export default {
|
|
|
204
216
|
value: this.formataDataHora(this.dataHora) || '--'
|
|
205
217
|
},
|
|
206
218
|
]
|
|
219
|
+
|
|
220
|
+
if (this.copia && this.copia.length) {
|
|
221
|
+
infos.push({
|
|
222
|
+
label: this.dicionario.tit_copia,
|
|
223
|
+
value: formatAsString(this.copia)
|
|
224
|
+
})
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return infos
|
|
207
228
|
},
|
|
208
229
|
},
|
|
209
230
|
watch: {
|
|
@@ -214,9 +235,14 @@ export default {
|
|
|
214
235
|
this.adjustMaxWidth()
|
|
215
236
|
|
|
216
237
|
if (this.refKey) this.$root.$refs[`${refKey}`] = this
|
|
238
|
+
|
|
239
|
+
setTimeout(() => {
|
|
240
|
+
if (this.isIframeLoading) this.adjustIframeHeight()
|
|
241
|
+
}, 15000);
|
|
217
242
|
},
|
|
218
243
|
methods: {
|
|
219
244
|
returnAuthorName() {
|
|
245
|
+
if (!this.from || !this.from.length) return this.autor || ''
|
|
220
246
|
const { mail, name } = this.from[0]
|
|
221
247
|
if (!name) return mail
|
|
222
248
|
if (!mail) return name
|
|
@@ -227,7 +253,9 @@ export default {
|
|
|
227
253
|
this.$nextTick(() => {
|
|
228
254
|
if (this.isOpen && this.isIframeLoading) {
|
|
229
255
|
const iframe = this.$refs.emailIframe;
|
|
256
|
+
if (!iframe) return
|
|
230
257
|
const doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
258
|
+
if (!doc) return
|
|
231
259
|
doc.open();
|
|
232
260
|
doc.write(this.html);
|
|
233
261
|
doc.close();
|
|
@@ -333,7 +361,10 @@ export default {
|
|
|
333
361
|
return `<${mail || '--'}${index !== length - 1 && isOpen ? '>, ' : '>'}`;
|
|
334
362
|
},
|
|
335
363
|
formattedToName(name, index, length) {
|
|
336
|
-
|
|
364
|
+
let addVirgulaDps = index < length - 1
|
|
365
|
+
let addVirgulaAntes = index === 1 && length >= 2
|
|
366
|
+
const text = index === 0 ? `Para: ${name || ''}` : name ? `${addVirgulaAntes ? ', ' : ''}${name}${addVirgulaDps ? ', ' : ''}` : '';
|
|
367
|
+
return text
|
|
337
368
|
},
|
|
338
369
|
returnMainValue() {
|
|
339
370
|
if (this.isMainEmail) return this.htmlEntityToEmoji(this.replaceUnicodeWithEmoji(this.assunto)) || '(Sem assunto)'
|
|
@@ -346,6 +377,28 @@ export default {
|
|
|
346
377
|
event.stopPropagation();
|
|
347
378
|
|
|
348
379
|
this.toggleIsOpen();
|
|
380
|
+
},
|
|
381
|
+
returnParams(params) {
|
|
382
|
+
const defaultParams = {
|
|
383
|
+
message: this.mensagem,
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
if (!params) return defaultParams;
|
|
387
|
+
|
|
388
|
+
const keys = params.instanceKeys.split("|");
|
|
389
|
+
if (!keys || !keys.length)
|
|
390
|
+
return {
|
|
391
|
+
defaultParams,
|
|
392
|
+
...params.values,
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
const customParams = { ...params.values };
|
|
396
|
+
keys.forEach((key) => {
|
|
397
|
+
if (this[key]) customParams[key] = this[key];
|
|
398
|
+
else console.warn(`Cant find ${key} on 'this' instance`);
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
return Object.keys(customParams).length ? customParams : defaultParams;
|
|
349
402
|
}
|
|
350
403
|
}
|
|
351
404
|
};
|
|
@@ -530,7 +583,7 @@ export default {
|
|
|
530
583
|
}
|
|
531
584
|
|
|
532
585
|
.email-actions.main {
|
|
533
|
-
top:
|
|
586
|
+
top: 10px
|
|
534
587
|
}
|
|
535
588
|
|
|
536
589
|
.email-actions.active {
|