vue-intergrall-plugins 1.0.74 → 1.0.76
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.
|
@@ -11039,6 +11039,53 @@ var script$1 = {
|
|
|
11039
11039
|
if (this.isOpen) return `${name} (${mail})`;
|
|
11040
11040
|
return name;
|
|
11041
11041
|
},
|
|
11042
|
+
gerarMensagemEstilizada(msg) {
|
|
11043
|
+
try {
|
|
11044
|
+
const currentStyles = [{
|
|
11045
|
+
tagAbertura: "<i>",
|
|
11046
|
+
tagFechamento: "</i>",
|
|
11047
|
+
find: /_(.*?)_/g
|
|
11048
|
+
}, {
|
|
11049
|
+
tagAbertura: "<b>",
|
|
11050
|
+
tagFechamento: "</b>",
|
|
11051
|
+
find: /\*(.*?)\*/g
|
|
11052
|
+
}, {
|
|
11053
|
+
tagAbertura: "<del>",
|
|
11054
|
+
tagFechamento: "</del>",
|
|
11055
|
+
find: /~(.*?)~/g
|
|
11056
|
+
}];
|
|
11057
|
+
const isLetterOrUnderscore = char => {
|
|
11058
|
+
return /[a-zA-Z_]/.test(char);
|
|
11059
|
+
};
|
|
11060
|
+
const isValidMatch = (message, fullMatch, startIndex) => {
|
|
11061
|
+
const beforeChar = message[startIndex - 1];
|
|
11062
|
+
const afterChar = message[startIndex + fullMatch.length];
|
|
11063
|
+
return (beforeChar === undefined || !isLetterOrUnderscore(beforeChar)) && (afterChar === undefined || !isLetterOrUnderscore(afterChar));
|
|
11064
|
+
};
|
|
11065
|
+
let message = msg;
|
|
11066
|
+
for (const {
|
|
11067
|
+
tagAbertura,
|
|
11068
|
+
tagFechamento,
|
|
11069
|
+
find
|
|
11070
|
+
} of currentStyles) {
|
|
11071
|
+
let match;
|
|
11072
|
+
while ((match = find.exec(message)) !== null) {
|
|
11073
|
+
const fullMatch = match[0];
|
|
11074
|
+
const content = match[1];
|
|
11075
|
+
const startIndex = match.index;
|
|
11076
|
+
if (isValidMatch(message, fullMatch, startIndex)) {
|
|
11077
|
+
const endIndex = startIndex + fullMatch.length;
|
|
11078
|
+
const replacedContent = `${tagAbertura}${content}${tagFechamento}`;
|
|
11079
|
+
message = message.slice(0, startIndex) + replacedContent + message.slice(endIndex);
|
|
11080
|
+
}
|
|
11081
|
+
}
|
|
11082
|
+
}
|
|
11083
|
+
return message;
|
|
11084
|
+
} catch (err) {
|
|
11085
|
+
console.error('Erro ao gerar mensagem estilizada: ', err);
|
|
11086
|
+
return msg;
|
|
11087
|
+
}
|
|
11088
|
+
},
|
|
11042
11089
|
updateIframeContent() {
|
|
11043
11090
|
this.$nextTick(() => {
|
|
11044
11091
|
if (this.isOpen && this.isIframeLoading) {
|
|
@@ -11048,6 +11095,8 @@ var script$1 = {
|
|
|
11048
11095
|
if (!doc) return;
|
|
11049
11096
|
let content = this.html;
|
|
11050
11097
|
if (!/<[a-z][\s\S]*>/i.test(content)) {
|
|
11098
|
+
content = content.replace(/\n/g, '<br>');
|
|
11099
|
+
content = this.gerarMensagemEstilizada(content);
|
|
11051
11100
|
content = `<p>${content}</p>`;
|
|
11052
11101
|
}
|
|
11053
11102
|
doc.open();
|
|
@@ -11098,7 +11147,7 @@ var script$1 = {
|
|
|
11098
11147
|
}
|
|
11099
11148
|
iframe.style.height = `${value}px`;
|
|
11100
11149
|
emailParent.style.minHeight = `${value}px`;
|
|
11101
|
-
},
|
|
11150
|
+
}, 100);
|
|
11102
11151
|
}
|
|
11103
11152
|
if (this.isIframeLoading) this.isIframeLoading = false;
|
|
11104
11153
|
});
|
|
@@ -11471,18 +11520,18 @@ var __vue_staticRenderFns__$1 = [];
|
|
|
11471
11520
|
/* style */
|
|
11472
11521
|
const __vue_inject_styles__$1 = function (inject) {
|
|
11473
11522
|
if (!inject) return;
|
|
11474
|
-
inject("data-v-
|
|
11475
|
-
source: ".show-y-top-enter-active[data-v-
|
|
11523
|
+
inject("data-v-0e9ee273_0", {
|
|
11524
|
+
source: ".show-y-top-enter-active[data-v-0e9ee273],.show-y-top-leave-enter[data-v-0e9ee273]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-0e9ee273],.show-y-top-leave-to[data-v-0e9ee273]{opacity:0;transform:translateY(-2%)}",
|
|
11476
11525
|
map: undefined,
|
|
11477
11526
|
media: undefined
|
|
11478
|
-
}), inject("data-v-
|
|
11527
|
+
}), inject("data-v-0e9ee273_1", {
|
|
11479
11528
|
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}",
|
|
11480
11529
|
map: undefined,
|
|
11481
11530
|
media: undefined
|
|
11482
11531
|
});
|
|
11483
11532
|
};
|
|
11484
11533
|
/* scoped */
|
|
11485
|
-
const __vue_scope_id__$1 = "data-v-
|
|
11534
|
+
const __vue_scope_id__$1 = "data-v-0e9ee273";
|
|
11486
11535
|
/* module identifier */
|
|
11487
11536
|
const __vue_module_identifier__$1 = undefined;
|
|
11488
11537
|
/* functional template */
|