vue-intergrall-plugins 1.0.38 → 1.0.40
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.
|
@@ -6680,7 +6680,26 @@ var __vue_component__$q = __vue_component__$p;var textoLongo = {
|
|
|
6680
6680
|
if (invalids.includes(dataHora)) return '';
|
|
6681
6681
|
var daysOfWeek = ['dom.', 'seg.', 'ter.', 'qua.', 'qui.', 'sex.', dicionario.sabado_abrev];
|
|
6682
6682
|
var monthsOfYear = ['jan.', 'fev.', 'mar.', 'abr.', 'mai.', 'jun.', 'jul.', 'ago.', 'set.', 'out.', 'nov.', 'dez.'];
|
|
6683
|
-
var
|
|
6683
|
+
var parseDate = function parseDate(dateStr) {
|
|
6684
|
+
if (dateStr.includes('/')) {
|
|
6685
|
+
var _dateStr$split = dateStr.split('/'),
|
|
6686
|
+
_dateStr$split2 = _slicedToArray(_dateStr$split, 3),
|
|
6687
|
+
_day = _dateStr$split2[0],
|
|
6688
|
+
_month = _dateStr$split2[1],
|
|
6689
|
+
yearTime = _dateStr$split2[2];
|
|
6690
|
+
var _yearTime$split = yearTime.split(' '),
|
|
6691
|
+
_yearTime$split2 = _slicedToArray(_yearTime$split, 2),
|
|
6692
|
+
year = _yearTime$split2[0],
|
|
6693
|
+
time = _yearTime$split2[1];
|
|
6694
|
+
var _ref = time ? time.split(':') : ['00', '00'],
|
|
6695
|
+
_ref2 = _slicedToArray(_ref, 2),
|
|
6696
|
+
_hours = _ref2[0],
|
|
6697
|
+
_minutes = _ref2[1];
|
|
6698
|
+
return new Date("".concat(year, "-").concat(_month, "-").concat(_day, "T").concat(_hours, ":").concat(_minutes, ":00"));
|
|
6699
|
+
}
|
|
6700
|
+
return new Date(dateStr);
|
|
6701
|
+
};
|
|
6702
|
+
var date = parseDate(dataHora);
|
|
6684
6703
|
var dayOfWeek = daysOfWeek[date.getDay()];
|
|
6685
6704
|
var day = date.getDate();
|
|
6686
6705
|
var month = monthsOfYear[date.getMonth()];
|
|
@@ -6730,7 +6749,8 @@ var __vue_component__$q = __vue_component__$p;var textoLongo = {
|
|
|
6730
6749
|
} else {
|
|
6731
6750
|
distance = "".concat(date.getFullYear(), " ").concat(dicionario.ha_message, " ").concat(yearsDifference, " ").concat(yearsDifference === 1 ? 'ano' : 'anos');
|
|
6732
6751
|
}
|
|
6733
|
-
|
|
6752
|
+
var finalText = !"".concat(formattedDate, " (").concat(distance, ")").includes('undefined') ? "".concat(formattedDate, " (").concat(distance, ")") : '';
|
|
6753
|
+
return finalText;
|
|
6734
6754
|
}
|
|
6735
6755
|
}
|
|
6736
6756
|
};function gerarVariaveisAnexo(anexos, storeObj) {
|
|
@@ -10229,10 +10249,6 @@ var script = {
|
|
|
10229
10249
|
isClosedClass: {
|
|
10230
10250
|
type: String,
|
|
10231
10251
|
default: 'bg-light-gray-2'
|
|
10232
|
-
},
|
|
10233
|
-
sanitizeOptions: {
|
|
10234
|
-
type: Object,
|
|
10235
|
-
default: null
|
|
10236
10252
|
}
|
|
10237
10253
|
},
|
|
10238
10254
|
data: function data() {
|
|
@@ -10247,23 +10263,6 @@ var script = {
|
|
|
10247
10263
|
formattedDate: function formattedDate() {
|
|
10248
10264
|
return this.formataDateHoraDateFns(this.dataHora, this.dataServer, this.dicionario);
|
|
10249
10265
|
},
|
|
10250
|
-
cleanHtml: function cleanHtml() {
|
|
10251
|
-
var defaultOptions = {
|
|
10252
|
-
allowedTags: ['a', 'b', 'br', 'div', 'i', 'p', 'span', 'strong', 'u', 'ul', 'ol', 'li', 'img', 'link', 'center', 'em', 'blockquote', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'table', 'tr', 'td', 'th', 'thead', 'tbody', 'fieldset', 'input', 'textarea', 'hr', 'del', 'header', 'footer', 'section', 'article', 'nav', 'aside', 'figure', 'figcaption', 'address', 'abbr', 'code', 'pre', 'small', 'sub', 'sup', 'mark', 'wbr', 'q', 'cite', 'time', 'var', 'kbd', 'samp', 'dfn'],
|
|
10253
|
-
allowedAttributes: {
|
|
10254
|
-
'a': ['href', 'name', 'target', 'title'],
|
|
10255
|
-
'img': ['src', 'width', 'height', 'alt', 'title'],
|
|
10256
|
-
'link': ['rel', 'href', 'type'],
|
|
10257
|
-
'input': ['type', 'name', 'value', 'placeholder', 'maxlength', 'minlength', 'size', 'readonly', 'disabled'],
|
|
10258
|
-
'textarea': ['name', 'rows', 'cols', 'placeholder', 'maxlength', 'minlength', 'readonly', 'disabled'],
|
|
10259
|
-
'table': ['border', 'cellpadding', 'cellspacing', 'width', 'height'],
|
|
10260
|
-
'th': ['colspan', 'rowspan'],
|
|
10261
|
-
'td': ['colspan', 'rowspan'],
|
|
10262
|
-
'*': ['style', 'class', 'id', 'title', 'align', 'valign', 'dir', 'lang', 'tabindex', 'accesskey', 'data-*', 'dir']
|
|
10263
|
-
}
|
|
10264
|
-
};
|
|
10265
|
-
return this.$sanitize(this.html, this.sanitizeOptions || defaultOptions);
|
|
10266
|
-
},
|
|
10267
10266
|
mailInfos: function mailInfos() {
|
|
10268
10267
|
var formatAsString = function formatAsString(arr) {
|
|
10269
10268
|
var str = '';
|
|
@@ -10289,13 +10288,48 @@ var script = {
|
|
|
10289
10288
|
}];
|
|
10290
10289
|
}
|
|
10291
10290
|
},
|
|
10291
|
+
watch: {
|
|
10292
|
+
html: 'updateIframeContent',
|
|
10293
|
+
isOpen: 'updateIframeContent'
|
|
10294
|
+
},
|
|
10295
|
+
mounted: function mounted() {
|
|
10296
|
+
this.updateIframeContent();
|
|
10297
|
+
},
|
|
10292
10298
|
methods: {
|
|
10299
|
+
updateIframeContent: function updateIframeContent() {
|
|
10300
|
+
var _this = this;
|
|
10301
|
+
this.$nextTick(function () {
|
|
10302
|
+
if (_this.isOpen) {
|
|
10303
|
+
var iframe = _this.$refs.emailIframe;
|
|
10304
|
+
var doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
10305
|
+
doc.open();
|
|
10306
|
+
doc.write(_this.html);
|
|
10307
|
+
doc.close();
|
|
10308
|
+
_this.adjustIframeHeight();
|
|
10309
|
+
}
|
|
10310
|
+
});
|
|
10311
|
+
},
|
|
10312
|
+
adjustIframeHeight: function adjustIframeHeight() {
|
|
10313
|
+
var _this2 = this;
|
|
10314
|
+
this.$nextTick(function () {
|
|
10315
|
+
var iframe = _this2.$refs.emailIframe;
|
|
10316
|
+
var emailParent = _this2.$refs.emailIframeParent;
|
|
10317
|
+
if (iframe && emailParent) {
|
|
10318
|
+
var doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
10319
|
+
iframe.style.height = "".concat(doc.documentElement.offsetHeight < 1000 ? doc.documentElement.offsetHeight : 1000, "px");
|
|
10320
|
+
emailParent.style.minHeight = "".concat(doc.documentElement.offsetHeight < 1000 ? doc.documentElement.offsetHeight : 1000, "px");
|
|
10321
|
+
}
|
|
10322
|
+
});
|
|
10323
|
+
},
|
|
10293
10324
|
toggleShowInfos: function toggleShowInfos() {
|
|
10294
10325
|
this.showInfos = !this.showInfos;
|
|
10295
10326
|
},
|
|
10296
10327
|
toggleIsOpen: function toggleIsOpen() {
|
|
10297
10328
|
this.isOpen = !this.isOpen;
|
|
10298
|
-
if (!this.isOpen)
|
|
10329
|
+
if (!this.isOpen) {
|
|
10330
|
+
this.actionsOpen = false;
|
|
10331
|
+
this.openMessage = false;
|
|
10332
|
+
}
|
|
10299
10333
|
},
|
|
10300
10334
|
toggleActions: function toggleActions() {
|
|
10301
10335
|
this.actionsOpen = !this.actionsOpen;
|
|
@@ -10326,7 +10360,7 @@ var __vue_render__ = function __vue_render__() {
|
|
|
10326
10360
|
var _c = _vm._self._c || _h;
|
|
10327
10361
|
return _c('div', {
|
|
10328
10362
|
class: ['email-item box-shadow', _vm.isOpen ? _vm.isOpenClass : _vm.isClosedClass]
|
|
10329
|
-
}, [_vm._ssrNode("<div class=\"email-header\" data-v-
|
|
10363
|
+
}, [_vm._ssrNode("<div class=\"email-header\" data-v-42a3cc0e>", "</div>", [_vm._ssrNode("<div class=\"email-header-content\" data-v-42a3cc0e>", "</div>", [_vm._ssrNode("<div class=\"email-header-infos\" data-v-42a3cc0e>", "</div>", [_vm._ssrNode("<p" + _vm._ssrAttr("title", _vm.htmlEntityToEmoji(_vm.replaceUnicodeWithEmoji(_vm.assunto)) || '(Sem assunto)') + " class=\"email-subject\" data-v-42a3cc0e>" + _vm._ssrEscape("\n " + _vm._s(_vm.htmlEntityToEmoji(_vm.replaceUnicodeWithEmoji(_vm.tratarTextoLongo(_vm.assunto, 30))) || '(Sem assunto)') + "\n ") + "</p> "), _vm.from && _vm.from.length ? [_vm._ssrNode("<div class=\"email-to-from-container\" data-v-42a3cc0e>", "</div>", _vm._l(_vm.from, function (sender, index) {
|
|
10330
10364
|
return _c('EmailFrom', {
|
|
10331
10365
|
key: "from-" + index,
|
|
10332
10366
|
attrs: {
|
|
@@ -10335,7 +10369,7 @@ var __vue_render__ = function __vue_render__() {
|
|
|
10335
10369
|
"showMail": _vm.isOpen
|
|
10336
10370
|
}
|
|
10337
10371
|
});
|
|
10338
|
-
}), 1)] : _vm._e(), _vm._ssrNode(" "), _vm.para && _vm.para.length && _vm.isOpen ? [_vm._ssrNode("<div class=\"email-to-from-container\" data-v-
|
|
10372
|
+
}), 1)] : _vm._e(), _vm._ssrNode(" "), _vm.para && _vm.para.length && _vm.isOpen ? [_vm._ssrNode("<div class=\"email-to-from-container\" data-v-42a3cc0e>", "</div>", [_vm._l(_vm.para, function (recipient, index) {
|
|
10339
10373
|
return _c('EmailTo', {
|
|
10340
10374
|
key: "to-" + index,
|
|
10341
10375
|
attrs: {
|
|
@@ -10344,7 +10378,7 @@ var __vue_render__ = function __vue_render__() {
|
|
|
10344
10378
|
"showMail": _vm.para.length === 1
|
|
10345
10379
|
}
|
|
10346
10380
|
});
|
|
10347
|
-
}), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-to-btn\" data-v-
|
|
10381
|
+
}), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-to-btn\" data-v-42a3cc0e>", "</div>", [_c('fa-icon', {
|
|
10348
10382
|
attrs: {
|
|
10349
10383
|
"icon": ['fas', 'caret-down']
|
|
10350
10384
|
}
|
|
@@ -10364,14 +10398,14 @@ var __vue_render__ = function __vue_render__() {
|
|
|
10364
10398
|
}
|
|
10365
10399
|
}
|
|
10366
10400
|
}, [_vm._ssrNode(_vm._ssrList(_vm.mailInfos, function (info, index) {
|
|
10367
|
-
return "<li class=\"email-info\" data-v-
|
|
10368
|
-
}))]) : _vm._e()], 2)] : _vm._e()], 2)]), _vm._ssrNode(" "), _vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.formattedDate) + " class=\"email-date\" data-v-
|
|
10401
|
+
return "<li class=\"email-info\" data-v-42a3cc0e><span data-v-42a3cc0e>" + _vm._ssrEscape(_vm._s(info.label)) + "</span>" + _vm._ssrEscape("\n " + _vm._s(info.value) + "\n ") + "</li>";
|
|
10402
|
+
}))]) : _vm._e()], 2)] : _vm._e()], 2)]), _vm._ssrNode(" "), _vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.formattedDate) + " class=\"email-date\" data-v-42a3cc0e>", "</span>", [_c('fa-icon', {
|
|
10369
10403
|
attrs: {
|
|
10370
10404
|
"icon": ['fas', 'calendar']
|
|
10371
10405
|
}
|
|
10372
10406
|
}), _vm._ssrNode(_vm._ssrEscape("\n " + _vm._s(_vm.formattedDate) + "\n "))], 2), _vm._ssrNode(" " + (_vm.isOpen ? "<span" + _vm._ssrClass(null, ['email-actions box-shadow', {
|
|
10373
10407
|
active: _vm.actionsOpen
|
|
10374
|
-
}]) + " data-v-
|
|
10408
|
+
}]) + " data-v-42a3cc0e><span data-v-42a3cc0e></span> <span data-v-42a3cc0e></span> <span data-v-42a3cc0e></span></span>" : "<!---->") + " "), _vm.actionsOpen && _vm.isOpen ? _c('ul', {
|
|
10375
10409
|
directives: [{
|
|
10376
10410
|
name: "clickaway",
|
|
10377
10411
|
rawName: "v-clickaway",
|
|
@@ -10384,20 +10418,19 @@ var __vue_render__ = function __vue_render__() {
|
|
|
10384
10418
|
$event.stopPropagation();
|
|
10385
10419
|
}
|
|
10386
10420
|
}
|
|
10387
|
-
}, [_vm._ssrNode("<li class=\"email-action\" data-v-
|
|
10421
|
+
}, [_vm._ssrNode("<li class=\"email-action\" data-v-42a3cc0e>" + _vm._ssrEscape("\n " + _vm._s(!_vm.openMessage ? 'Visualizar' : 'Esconder') + " texto do e-mail\n ") + "</li>")]) : _vm._e()], 2), _vm._ssrNode(" "), _c('transition', {
|
|
10388
10422
|
attrs: {
|
|
10389
10423
|
"name": "show-y-top"
|
|
10390
10424
|
}
|
|
10391
10425
|
}, [_vm.isOpen ? _c('div', {
|
|
10426
|
+
ref: "emailIframeParent",
|
|
10392
10427
|
staticClass: "email-content"
|
|
10393
|
-
}, [_c('
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
"innerHTML": _vm._s(_vm.cleanHtml)
|
|
10397
|
-
}
|
|
10428
|
+
}, [_c('iframe', {
|
|
10429
|
+
ref: "emailIframe",
|
|
10430
|
+
staticClass: "email-html"
|
|
10398
10431
|
}), _vm._v(" "), _vm.openMessage ? _c('span', {
|
|
10399
10432
|
staticClass: "email-raw"
|
|
10400
|
-
}, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()]) : _vm._e()]), _vm._ssrNode(" "), _vm.anexos && _vm.anexos.length ? _vm._ssrNode("<div class=\"email-files\" data-v-
|
|
10433
|
+
}, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()]) : _vm._e()]), _vm._ssrNode(" "), _vm.anexos && _vm.anexos.length ? _vm._ssrNode("<div class=\"email-files\" data-v-42a3cc0e>", "</div>", _vm._l(_vm.anexos, function (anexo, index) {
|
|
10401
10434
|
return _c('EmailFile', {
|
|
10402
10435
|
key: index,
|
|
10403
10436
|
attrs: {
|
|
@@ -10412,20 +10445,20 @@ var __vue_staticRenderFns__ = [];
|
|
|
10412
10445
|
/* style */
|
|
10413
10446
|
var __vue_inject_styles__ = function __vue_inject_styles__(inject) {
|
|
10414
10447
|
if (!inject) return;
|
|
10415
|
-
inject("data-v-
|
|
10416
|
-
source: ".show-y-top-enter-active[data-v-
|
|
10448
|
+
inject("data-v-42a3cc0e_0", {
|
|
10449
|
+
source: ".show-y-top-enter-active[data-v-42a3cc0e],.show-y-top-leave-enter[data-v-42a3cc0e]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-42a3cc0e],.show-y-top-leave-to[data-v-42a3cc0e]{opacity:0;transform:translateY(-2%)}",
|
|
10417
10450
|
map: undefined,
|
|
10418
10451
|
media: undefined
|
|
10419
|
-
}), inject("data-v-
|
|
10420
|
-
source: ".bg-dark-white-2{background-color:#f7f7f7}.bg-light-gray-2{background-color:#d8d8d8}.email-item{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%}.email-header{width:100%;display:flex;align-items:center;justify-content:space-between;cursor:pointer;border-top-right-radius:5px;border-top-left-radius:5px;position:relative;overflow:hidden}.email-header-content{display:flex;align-items:center;margin:10px;flex:1;min-width:250px}.email-header-infos{display:flex;flex-direction:column;flex:1}.email-subject{margin:0 0 5px 0;font-weight:700;font-size:.95rem}.email-date{--width:245px;font-size:.8rem;margin-right:10px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;min-width:var(--width);width:var(--width);max-width:var(--width)}.email-content{display:flex;flex-direction:column;align-items:center;justify-content:
|
|
10452
|
+
}), inject("data-v-42a3cc0e_1", {
|
|
10453
|
+
source: ".bg-dark-white-2{background-color:#f7f7f7}.bg-light-gray-2{background-color:#d8d8d8}.email-item{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%}.email-header{width:100%;display:flex;align-items:center;justify-content:space-between;cursor:pointer;border-top-right-radius:5px;border-top-left-radius:5px;position:relative;overflow:hidden}.email-header-content{display:flex;align-items:center;margin:10px;flex:1;min-width:250px}.email-header-infos{display:flex;flex-direction:column;flex:1}.email-subject{margin:0 0 5px 0;font-weight:700;font-size:.95rem}.email-date{--width:245px;font-size:.8rem;margin-right:10px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;min-width:var(--width);width:var(--width);max-width:var(--width)}.email-content{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;padding:15px;background-color:#fff;position:relative;max-width:100%}.email-actions{align-self:flex-end;display:flex;border-radius:10px;cursor:pointer;align-items:center;justify-content:center;gap:3px;padding:5px 7px;background-color:#ddd;position:absolute;right:5px;top:5px;z-index:1}.email-actions.active{background-color:#dfdfdf}.email-actions>span{width:4px;height:4px;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%;max-width:100%;padding:10px;border:none;max-height:1000px;overflow:auto}.email-raw{width:100%;max-width:100%;font-size:.9rem;color:#222}.email-files{display:flex;gap:10px;flex-wrap:wrap;width:100%}.email-header-content,.email-header-infos{max-width:100%;overflow:hidden}.email-to-from-container{margin-bottom:10px;max-width:100%;display:flex;flex-wrap:wrap;flex:1;gap:5px}.email-to-from-container:last-child{margin-bottom:0}.email-to-btn{padding:0 5px;font-size:.9rem;cursor:pointer;color:#666}.email-to-infos{position:absolute;bottom:-300px;border:1px solid #ccc;z-index:2;padding:10px;background-color:#fff;height:300px;max-height:300px;overflow-y:auto;overflow-x:hidden;width:300px;display:flex;flex-direction:column;gap:5px;margin:0;cursor:default}.email-info{width:100%;font-size:.8rem}.email-info>span{font-size:.75rem;color:gray;margin-left:5px}",
|
|
10421
10454
|
map: undefined,
|
|
10422
10455
|
media: undefined
|
|
10423
10456
|
});
|
|
10424
10457
|
};
|
|
10425
10458
|
/* scoped */
|
|
10426
|
-
var __vue_scope_id__ = "data-v-
|
|
10459
|
+
var __vue_scope_id__ = "data-v-42a3cc0e";
|
|
10427
10460
|
/* module identifier */
|
|
10428
|
-
var __vue_module_identifier__ = "data-v-
|
|
10461
|
+
var __vue_module_identifier__ = "data-v-42a3cc0e";
|
|
10429
10462
|
/* functional template */
|
|
10430
10463
|
var __vue_is_functional_template__ = false;
|
|
10431
10464
|
/* style inject shadow dom */
|
package/package.json
CHANGED
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
</ul>
|
|
48
48
|
</div>
|
|
49
49
|
<transition name="show-y-top">
|
|
50
|
-
<div class="email-content" v-if="isOpen">
|
|
51
|
-
<
|
|
50
|
+
<div class="email-content" v-if="isOpen" ref="emailIframeParent">
|
|
51
|
+
<iframe ref="emailIframe" class="email-html"></iframe>
|
|
52
52
|
<span class="email-raw" v-if="openMessage">{{ mensagem }}</span>
|
|
53
53
|
</div>
|
|
54
54
|
</transition>
|
|
@@ -123,10 +123,6 @@ export default {
|
|
|
123
123
|
isClosedClass: {
|
|
124
124
|
type: String,
|
|
125
125
|
default: 'bg-light-gray-2'
|
|
126
|
-
},
|
|
127
|
-
sanitizeOptions: {
|
|
128
|
-
type: Object,
|
|
129
|
-
default: null
|
|
130
126
|
}
|
|
131
127
|
},
|
|
132
128
|
data() {
|
|
@@ -141,28 +137,6 @@ export default {
|
|
|
141
137
|
formattedDate() {
|
|
142
138
|
return this.formataDateHoraDateFns(this.dataHora, this.dataServer, this.dicionario);
|
|
143
139
|
},
|
|
144
|
-
cleanHtml() {
|
|
145
|
-
const defaultOptions = {
|
|
146
|
-
allowedTags: [
|
|
147
|
-
'a', 'b', 'br', 'div', 'i', 'p', 'span', 'strong', 'u', 'ul', 'ol', 'li', 'img', 'link', 'center', 'em', 'blockquote',
|
|
148
|
-
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'table', 'tr', 'td', 'th', 'thead', 'tbody', 'fieldset', 'input', 'textarea', 'hr',
|
|
149
|
-
'del', 'header', 'footer', 'section', 'article', 'nav', 'aside', 'figure', 'figcaption', 'address', 'abbr', 'code', 'pre',
|
|
150
|
-
'small', 'sub', 'sup', 'mark', 'wbr', 'q', 'cite', 'time', 'var', 'kbd', 'samp', 'dfn'
|
|
151
|
-
],
|
|
152
|
-
allowedAttributes: {
|
|
153
|
-
'a': ['href', 'name', 'target', 'title'],
|
|
154
|
-
'img': ['src', 'width', 'height', 'alt', 'title'],
|
|
155
|
-
'link': ['rel', 'href', 'type'],
|
|
156
|
-
'input': ['type', 'name', 'value', 'placeholder', 'maxlength', 'minlength', 'size', 'readonly', 'disabled'],
|
|
157
|
-
'textarea': ['name', 'rows', 'cols', 'placeholder', 'maxlength', 'minlength', 'readonly', 'disabled'],
|
|
158
|
-
'table': ['border', 'cellpadding', 'cellspacing', 'width', 'height'],
|
|
159
|
-
'th': ['colspan', 'rowspan'],
|
|
160
|
-
'td': ['colspan', 'rowspan'],
|
|
161
|
-
'*': ['style', 'class', 'id', 'title', 'align', 'valign', 'dir', 'lang', 'tabindex', 'accesskey', 'data-*', 'dir']
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
return this.$sanitize(this.html, this.sanitizeOptions || defaultOptions);
|
|
165
|
-
},
|
|
166
140
|
mailInfos() {
|
|
167
141
|
const formatAsString = (arr) => {
|
|
168
142
|
let str = ''
|
|
@@ -192,13 +166,46 @@ export default {
|
|
|
192
166
|
]
|
|
193
167
|
},
|
|
194
168
|
},
|
|
169
|
+
watch: {
|
|
170
|
+
html: 'updateIframeContent',
|
|
171
|
+
isOpen: 'updateIframeContent'
|
|
172
|
+
},
|
|
173
|
+
mounted() {
|
|
174
|
+
this.updateIframeContent();
|
|
175
|
+
},
|
|
195
176
|
methods: {
|
|
177
|
+
updateIframeContent() {
|
|
178
|
+
this.$nextTick(() => {
|
|
179
|
+
if (this.isOpen) {
|
|
180
|
+
const iframe = this.$refs.emailIframe;
|
|
181
|
+
const doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
182
|
+
doc.open();
|
|
183
|
+
doc.write(this.html);
|
|
184
|
+
doc.close();
|
|
185
|
+
this.adjustIframeHeight()
|
|
186
|
+
}
|
|
187
|
+
})
|
|
188
|
+
},
|
|
189
|
+
adjustIframeHeight() {
|
|
190
|
+
this.$nextTick(() => {
|
|
191
|
+
const iframe = this.$refs.emailIframe;
|
|
192
|
+
const emailParent = this.$refs.emailIframeParent
|
|
193
|
+
if (iframe && emailParent) {
|
|
194
|
+
const doc = iframe.contentDocument || iframe.contentWindow.document;
|
|
195
|
+
iframe.style.height = `${doc.documentElement.offsetHeight < 1000 ? doc.documentElement.offsetHeight : 1000}px`;
|
|
196
|
+
emailParent.style.minHeight = `${doc.documentElement.offsetHeight < 1000 ? doc.documentElement.offsetHeight : 1000}px`
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
},
|
|
196
200
|
toggleShowInfos() {
|
|
197
|
-
this.showInfos = !this.showInfos
|
|
201
|
+
this.showInfos = !this.showInfos;
|
|
198
202
|
},
|
|
199
203
|
toggleIsOpen() {
|
|
200
204
|
this.isOpen = !this.isOpen;
|
|
201
|
-
if (!this.isOpen)
|
|
205
|
+
if (!this.isOpen) {
|
|
206
|
+
this.actionsOpen = false;
|
|
207
|
+
this.openMessage = false
|
|
208
|
+
}
|
|
202
209
|
},
|
|
203
210
|
toggleActions() {
|
|
204
211
|
this.actionsOpen = !this.actionsOpen;
|
|
@@ -308,7 +315,7 @@ export default {
|
|
|
308
315
|
display: flex;
|
|
309
316
|
flex-direction: column;
|
|
310
317
|
align-items: center;
|
|
311
|
-
justify-content:
|
|
318
|
+
justify-content: flex-start;
|
|
312
319
|
width: 100%;
|
|
313
320
|
padding: 15px;
|
|
314
321
|
background-color: #FFF;
|
|
@@ -382,6 +389,9 @@ export default {
|
|
|
382
389
|
width: 100%;
|
|
383
390
|
max-width: 100%;
|
|
384
391
|
padding: 10px;
|
|
392
|
+
border: none;
|
|
393
|
+
max-height: 1000px;
|
|
394
|
+
overflow: auto;
|
|
385
395
|
}
|
|
386
396
|
|
|
387
397
|
.email-raw {
|