vue-intergrall-plugins 1.0.73 → 1.0.75
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.
|
@@ -10370,6 +10370,53 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10370
10370
|
if (this.isOpen) return "".concat(name, " (").concat(mail, ")");
|
|
10371
10371
|
return name;
|
|
10372
10372
|
},
|
|
10373
|
+
gerarMensagemEstilizada: function gerarMensagemEstilizada(msg) {
|
|
10374
|
+
try {
|
|
10375
|
+
var currentStyles = [{
|
|
10376
|
+
tagAbertura: "<i>",
|
|
10377
|
+
tagFechamento: "</i>",
|
|
10378
|
+
find: /_(.*?)_/g
|
|
10379
|
+
}, {
|
|
10380
|
+
tagAbertura: "<b>",
|
|
10381
|
+
tagFechamento: "</b>",
|
|
10382
|
+
find: /\*(.*?)\*/g
|
|
10383
|
+
}, {
|
|
10384
|
+
tagAbertura: "<del>",
|
|
10385
|
+
tagFechamento: "</del>",
|
|
10386
|
+
find: /~(.*?)~/g
|
|
10387
|
+
}];
|
|
10388
|
+
var isLetterOrUnderscore = function isLetterOrUnderscore(char) {
|
|
10389
|
+
return /[a-zA-Z_]/.test(char);
|
|
10390
|
+
};
|
|
10391
|
+
var isValidMatch = function isValidMatch(message, fullMatch, startIndex) {
|
|
10392
|
+
var beforeChar = message[startIndex - 1];
|
|
10393
|
+
var afterChar = message[startIndex + fullMatch.length];
|
|
10394
|
+
return (beforeChar === undefined || !isLetterOrUnderscore(beforeChar)) && (afterChar === undefined || !isLetterOrUnderscore(afterChar));
|
|
10395
|
+
};
|
|
10396
|
+
var message = msg;
|
|
10397
|
+
for (var _i = 0, _currentStyles = currentStyles; _i < _currentStyles.length; _i++) {
|
|
10398
|
+
var _currentStyles$_i = _currentStyles[_i],
|
|
10399
|
+
tagAbertura = _currentStyles$_i.tagAbertura,
|
|
10400
|
+
tagFechamento = _currentStyles$_i.tagFechamento,
|
|
10401
|
+
find = _currentStyles$_i.find;
|
|
10402
|
+
var match = void 0;
|
|
10403
|
+
while ((match = find.exec(message)) !== null) {
|
|
10404
|
+
var fullMatch = match[0];
|
|
10405
|
+
var content = match[1];
|
|
10406
|
+
var startIndex = match.index;
|
|
10407
|
+
if (isValidMatch(message, fullMatch, startIndex)) {
|
|
10408
|
+
var endIndex = startIndex + fullMatch.length;
|
|
10409
|
+
var replacedContent = "".concat(tagAbertura).concat(content).concat(tagFechamento);
|
|
10410
|
+
message = message.slice(0, startIndex) + replacedContent + message.slice(endIndex);
|
|
10411
|
+
}
|
|
10412
|
+
}
|
|
10413
|
+
}
|
|
10414
|
+
return message;
|
|
10415
|
+
} catch (err) {
|
|
10416
|
+
console.error('Erro ao gerar mensagem estilizada: ', err);
|
|
10417
|
+
return msg;
|
|
10418
|
+
}
|
|
10419
|
+
},
|
|
10373
10420
|
updateIframeContent: function updateIframeContent() {
|
|
10374
10421
|
var _this3 = this;
|
|
10375
10422
|
this.$nextTick(function () {
|
|
@@ -10380,6 +10427,8 @@ var EmailTo = __vue_component__$4;var script$1 = {
|
|
|
10380
10427
|
if (!doc) return;
|
|
10381
10428
|
var content = _this3.html;
|
|
10382
10429
|
if (!/<[a-z][\s\S]*>/i.test(content)) {
|
|
10430
|
+
content = content.replace(/\n/g, '<br>');
|
|
10431
|
+
content = _this3.gerarMensagemEstilizada(content);
|
|
10383
10432
|
content = "<p>".concat(content, "</p>");
|
|
10384
10433
|
}
|
|
10385
10434
|
doc.open();
|
|
@@ -10556,19 +10605,19 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10556
10605
|
return _vm.openByItem($event);
|
|
10557
10606
|
}
|
|
10558
10607
|
}
|
|
10559
|
-
}, [_vm._ssrNode((_vm.showInfos ? "<div class=\"email-overlay\" data-v-
|
|
10608
|
+
}, [_vm._ssrNode((_vm.showInfos ? "<div class=\"email-overlay\" data-v-3f80d34e></div>" : "<!---->") + " "), _vm.autor ? _vm._ssrNode("<div" + _vm._ssrClass("email-author", [_vm.origem, _vm.isMainEmail ? 'main' : '']) + " data-v-3f80d34e>", "</div>", [_c('fa-icon', {
|
|
10560
10609
|
class: [_vm.origem],
|
|
10561
10610
|
attrs: {
|
|
10562
10611
|
"icon": ['fas', 'reply'],
|
|
10563
10612
|
"title": "Enviado por: " + _vm.autor
|
|
10564
10613
|
}
|
|
10565
|
-
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.returnAuthorName()) + " class=\"email-author-name\" data-v-
|
|
10614
|
+
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.returnAuthorName()) + " class=\"email-author-name\" data-v-3f80d34e>" + _vm._ssrEscape(_vm._s(_vm.returnAuthorName())) + "</p> "), _c('fa-icon', {
|
|
10566
10615
|
staticClass: "email-to-svg",
|
|
10567
10616
|
attrs: {
|
|
10568
10617
|
"icon": ['fas', _vm.origem === 'outros' ? 'user' : 'headset'],
|
|
10569
10618
|
"title": "E-mail " + (_vm.origem === 'outros' ? 'recebido' : 'enviado')
|
|
10570
10619
|
}
|
|
10571
|
-
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm.customButtons && _vm.customButtons.length ? _vm._ssrNode("<div class=\"email-custom-buttons\" data-v-
|
|
10620
|
+
})], 2) : _vm._e(), _vm._ssrNode(" "), _vm.customButtons && _vm.customButtons.length ? _vm._ssrNode("<div class=\"email-custom-buttons\" data-v-3f80d34e>", "</div>", _vm._l(_vm.customButtons, function (button, index) {
|
|
10572
10621
|
return _c('span', {
|
|
10573
10622
|
directives: [{
|
|
10574
10623
|
name: "show",
|
|
@@ -10599,7 +10648,7 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10599
10648
|
"innerHTML": _vm._s(button.svgIcon)
|
|
10600
10649
|
}
|
|
10601
10650
|
})], 1);
|
|
10602
|
-
}), 0) : _vm._e(), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-header\" data-v-
|
|
10651
|
+
}), 0) : _vm._e(), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-header\" data-v-3f80d34e>", "</div>", [_vm._ssrNode("<p" + _vm._ssrAttr("title", _vm.returnMainValue()) + " class=\"email-subject\" data-v-3f80d34e>" + _vm._ssrEscape("\n " + _vm._s(_vm.returnMainValue()) + "\n ") + "</p> "), _vm._ssrNode("<div class=\"header-container\" data-v-3f80d34e>", "</div>", [_vm._ssrNode("<div" + _vm._ssrClass(null, "email-header-content" + (_vm.isOpen ? ' open' : '')) + " data-v-3f80d34e>", "</div>", [_vm._ssrNode("<div class=\"email-header-infos\" data-v-3f80d34e>", "</div>", [_vm.para && _vm.para.length ? [_vm._ssrNode("<div class=\"email-to-from-container\" data-v-3f80d34e>", "</div>", [_vm._l(_vm.paraCopia, function (recipient, index) {
|
|
10603
10652
|
return _c('EmailTo', {
|
|
10604
10653
|
key: "to-" + index,
|
|
10605
10654
|
attrs: {
|
|
@@ -10610,13 +10659,13 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10610
10659
|
});
|
|
10611
10660
|
}), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-to-btn\"" + _vm._ssrStyle(null, null, {
|
|
10612
10661
|
display: _vm.isOpen ? '' : 'none'
|
|
10613
|
-
}) + " data-v-
|
|
10662
|
+
}) + " data-v-3f80d34e>", "</div>", [_c('fa-icon', {
|
|
10614
10663
|
attrs: {
|
|
10615
10664
|
"icon": ['fas', 'caret-down']
|
|
10616
10665
|
}
|
|
10617
|
-
})], 1)], 2)] : _vm._e(), _vm._ssrNode(" " + (!_vm.isMainEmail && _vm.isOpen ? "<div class=\"email-subject-secondary\" data-v-
|
|
10666
|
+
})], 1)], 2)] : _vm._e(), _vm._ssrNode(" " + (!_vm.isMainEmail && _vm.isOpen ? "<div class=\"email-subject-secondary\" data-v-3f80d34e><span class=\"email-subject-span\" data-v-3f80d34e>" + _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, {
|
|
10618
10667
|
display: _vm.formattedDate ? '' : 'none'
|
|
10619
|
-
}) + " data-v-
|
|
10668
|
+
}) + " data-v-3f80d34e>", "</span>", [_c('fa-icon', {
|
|
10620
10669
|
attrs: {
|
|
10621
10670
|
"icon": ['fas', 'calendar']
|
|
10622
10671
|
}
|
|
@@ -10637,12 +10686,12 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10637
10686
|
}
|
|
10638
10687
|
}
|
|
10639
10688
|
}, [_vm._ssrNode(_vm._ssrList(_vm.mailInfos, function (info, index) {
|
|
10640
|
-
return "<li class=\"email-info\" data-v-
|
|
10689
|
+
return "<li class=\"email-info\" data-v-3f80d34e><span data-v-3f80d34e>" + _vm._ssrEscape(_vm._s(info.label)) + "</span>" + _vm._ssrEscape("\n " + _vm._s(info.value) + "\n ") + "</li>";
|
|
10641
10690
|
}))]) : _vm._e(), _vm._ssrNode(" " + (_vm.isOpen ? "<span" + _vm._ssrClass(null, ['email-actions box-shadow', {
|
|
10642
10691
|
active: _vm.actionsOpen
|
|
10643
10692
|
}, {
|
|
10644
10693
|
main: _vm.isMainEmail
|
|
10645
|
-
}]) + " data-v-
|
|
10694
|
+
}]) + " data-v-3f80d34e><span data-v-3f80d34e></span> <span data-v-3f80d34e></span> <span data-v-3f80d34e></span></span>" : "<!---->") + " "), _vm.actionsOpen && _vm.isOpen ? _c('ul', {
|
|
10646
10695
|
directives: [{
|
|
10647
10696
|
name: "clickaway",
|
|
10648
10697
|
rawName: "v-clickaway",
|
|
@@ -10655,7 +10704,7 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10655
10704
|
$event.stopPropagation();
|
|
10656
10705
|
}
|
|
10657
10706
|
}
|
|
10658
|
-
}, [_vm._ssrNode("<li class=\"email-action\" data-v-
|
|
10707
|
+
}, [_vm._ssrNode("<li class=\"email-action\" data-v-3f80d34e>" + _vm._ssrEscape("\n " + _vm._s(!_vm.openMessage ? 'Visualizar' : 'Esconder') + " texto do e-mail\n ") + "</li>")]) : _vm._e()], 2), _vm._ssrNode(" "), _c('transition', {
|
|
10659
10708
|
attrs: {
|
|
10660
10709
|
"name": "show-y-top"
|
|
10661
10710
|
}
|
|
@@ -10690,7 +10739,7 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
10690
10739
|
staticClass: "email-raw"
|
|
10691
10740
|
}, [_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, {
|
|
10692
10741
|
display: _vm.isOpen || _vm.isMainEmail ? '' : 'none'
|
|
10693
|
-
}) + " data-v-
|
|
10742
|
+
}) + " data-v-3f80d34e>", "</div>", _vm._l(_vm.filteredFiles, function (anexo, index) {
|
|
10694
10743
|
return _c('EmailFile', {
|
|
10695
10744
|
key: index,
|
|
10696
10745
|
attrs: {
|
|
@@ -10705,20 +10754,20 @@ var __vue_staticRenderFns__$1 = [];
|
|
|
10705
10754
|
/* style */
|
|
10706
10755
|
var __vue_inject_styles__$1 = function __vue_inject_styles__(inject) {
|
|
10707
10756
|
if (!inject) return;
|
|
10708
|
-
inject("data-v-
|
|
10709
|
-
source: ".show-y-top-enter-active[data-v-
|
|
10757
|
+
inject("data-v-3f80d34e_0", {
|
|
10758
|
+
source: ".show-y-top-enter-active[data-v-3f80d34e],.show-y-top-leave-enter[data-v-3f80d34e]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-3f80d34e],.show-y-top-leave-to[data-v-3f80d34e]{opacity:0;transform:translateY(-2%)}",
|
|
10710
10759
|
map: undefined,
|
|
10711
10760
|
media: undefined
|
|
10712
|
-
}), inject("data-v-
|
|
10761
|
+
}), inject("data-v-3f80d34e_1", {
|
|
10713
10762
|
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}",
|
|
10714
10763
|
map: undefined,
|
|
10715
10764
|
media: undefined
|
|
10716
10765
|
});
|
|
10717
10766
|
};
|
|
10718
10767
|
/* scoped */
|
|
10719
|
-
var __vue_scope_id__$1 = "data-v-
|
|
10768
|
+
var __vue_scope_id__$1 = "data-v-3f80d34e";
|
|
10720
10769
|
/* module identifier */
|
|
10721
|
-
var __vue_module_identifier__$1 = "data-v-
|
|
10770
|
+
var __vue_module_identifier__$1 = "data-v-3f80d34e";
|
|
10722
10771
|
/* functional template */
|
|
10723
10772
|
var __vue_is_functional_template__$1 = false;
|
|
10724
10773
|
/* style inject shadow dom */
|
package/package.json
CHANGED
|
@@ -271,6 +271,50 @@ export default {
|
|
|
271
271
|
if (this.isOpen) return `${name} (${mail})`
|
|
272
272
|
return name
|
|
273
273
|
},
|
|
274
|
+
gerarMensagemEstilizada(msg) {
|
|
275
|
+
try {
|
|
276
|
+
const currentStyles = [
|
|
277
|
+
{ tagAbertura: "<i>", tagFechamento: "</i>", find: /_(.*?)_/g },
|
|
278
|
+
{ tagAbertura: "<b>", tagFechamento: "</b>", find: /\*(.*?)\*/g },
|
|
279
|
+
{ tagAbertura: "<del>", tagFechamento: "</del>", find: /~(.*?)~/g }
|
|
280
|
+
]
|
|
281
|
+
|
|
282
|
+
const isLetterOrUnderscore = (char) => {
|
|
283
|
+
return /[a-zA-Z_]/.test(char)
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
const isValidMatch = (message, fullMatch, startIndex) => {
|
|
287
|
+
const beforeChar = message[startIndex - 1]
|
|
288
|
+
const afterChar = message[startIndex + fullMatch.length]
|
|
289
|
+
return (
|
|
290
|
+
(beforeChar === undefined || !isLetterOrUnderscore(beforeChar)) &&
|
|
291
|
+
(afterChar === undefined || !isLetterOrUnderscore(afterChar))
|
|
292
|
+
)
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
let message = msg
|
|
296
|
+
|
|
297
|
+
for (const { tagAbertura, tagFechamento, find } of currentStyles) {
|
|
298
|
+
let match
|
|
299
|
+
while ((match = find.exec(message)) !== null) {
|
|
300
|
+
const fullMatch = match[0]
|
|
301
|
+
const content = match[1]
|
|
302
|
+
const startIndex = match.index
|
|
303
|
+
|
|
304
|
+
if (isValidMatch(message, fullMatch, startIndex)) {
|
|
305
|
+
const endIndex = startIndex + fullMatch.length
|
|
306
|
+
const replacedContent = `${tagAbertura}${content}${tagFechamento}`
|
|
307
|
+
message = message.slice(0, startIndex) + replacedContent + message.slice(endIndex)
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return message
|
|
313
|
+
} catch (err) {
|
|
314
|
+
console.error('Erro ao gerar mensagem estilizada: ', err)
|
|
315
|
+
return msg
|
|
316
|
+
}
|
|
317
|
+
},
|
|
274
318
|
updateIframeContent() {
|
|
275
319
|
this.$nextTick(() => {
|
|
276
320
|
if (this.isOpen && this.isIframeLoading) {
|
|
@@ -280,6 +324,8 @@ export default {
|
|
|
280
324
|
if (!doc) return
|
|
281
325
|
let content = this.html
|
|
282
326
|
if (!/<[a-z][\s\S]*>/i.test(content)) {
|
|
327
|
+
content = content.replace(/\n/g, '<br>');
|
|
328
|
+
content = this.gerarMensagemEstilizada(content)
|
|
283
329
|
content = `<p>${content}</p>`;
|
|
284
330
|
}
|
|
285
331
|
|