vue-intergrall-plugins 1.0.38 → 1.0.39

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.
@@ -6730,7 +6730,8 @@ var __vue_component__$q = __vue_component__$p;var textoLongo = {
6730
6730
  } else {
6731
6731
  distance = "".concat(date.getFullYear(), " ").concat(dicionario.ha_message, " ").concat(yearsDifference, " ").concat(yearsDifference === 1 ? 'ano' : 'anos');
6732
6732
  }
6733
- return "".concat(formattedDate, " (").concat(distance, ")");
6733
+ var finalText = !"".concat(formattedDate, " (").concat(distance, ")").includes('undefined') ? "".concat(formattedDate, " (").concat(distance, ")") : '';
6734
+ return finalText;
6734
6735
  }
6735
6736
  }
6736
6737
  };function gerarVariaveisAnexo(anexos, storeObj) {
@@ -10229,10 +10230,6 @@ var script = {
10229
10230
  isClosedClass: {
10230
10231
  type: String,
10231
10232
  default: 'bg-light-gray-2'
10232
- },
10233
- sanitizeOptions: {
10234
- type: Object,
10235
- default: null
10236
10233
  }
10237
10234
  },
10238
10235
  data: function data() {
@@ -10247,23 +10244,6 @@ var script = {
10247
10244
  formattedDate: function formattedDate() {
10248
10245
  return this.formataDateHoraDateFns(this.dataHora, this.dataServer, this.dicionario);
10249
10246
  },
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
10247
  mailInfos: function mailInfos() {
10268
10248
  var formatAsString = function formatAsString(arr) {
10269
10249
  var str = '';
@@ -10289,13 +10269,48 @@ var script = {
10289
10269
  }];
10290
10270
  }
10291
10271
  },
10272
+ watch: {
10273
+ html: 'updateIframeContent',
10274
+ isOpen: 'updateIframeContent'
10275
+ },
10276
+ mounted: function mounted() {
10277
+ this.updateIframeContent();
10278
+ },
10292
10279
  methods: {
10280
+ updateIframeContent: function updateIframeContent() {
10281
+ var _this = this;
10282
+ this.$nextTick(function () {
10283
+ if (_this.isOpen) {
10284
+ var iframe = _this.$refs.emailIframe;
10285
+ var doc = iframe.contentDocument || iframe.contentWindow.document;
10286
+ doc.open();
10287
+ doc.write(_this.html);
10288
+ doc.close();
10289
+ _this.adjustIframeHeight();
10290
+ }
10291
+ });
10292
+ },
10293
+ adjustIframeHeight: function adjustIframeHeight() {
10294
+ var _this2 = this;
10295
+ this.$nextTick(function () {
10296
+ var iframe = _this2.$refs.emailIframe;
10297
+ var emailParent = _this2.$refs.emailIframeParent;
10298
+ if (iframe && emailParent) {
10299
+ var doc = iframe.contentDocument || iframe.contentWindow.document;
10300
+ iframe.style.height = "".concat(doc.documentElement.offsetHeight, "px");
10301
+ emailParent.style.minHeight = "".concat(doc.documentElement.offsetHeight + 250, "px");
10302
+ }
10303
+ });
10304
+ },
10293
10305
  toggleShowInfos: function toggleShowInfos() {
10294
10306
  this.showInfos = !this.showInfos;
10295
10307
  },
10296
10308
  toggleIsOpen: function toggleIsOpen() {
10297
10309
  this.isOpen = !this.isOpen;
10298
- if (!this.isOpen) this.actionsOpen = false;
10310
+ if (!this.isOpen) {
10311
+ this.actionsOpen = false;
10312
+ this.openMessage = false;
10313
+ }
10299
10314
  },
10300
10315
  toggleActions: function toggleActions() {
10301
10316
  this.actionsOpen = !this.actionsOpen;
@@ -10326,7 +10341,7 @@ var __vue_render__ = function __vue_render__() {
10326
10341
  var _c = _vm._self._c || _h;
10327
10342
  return _c('div', {
10328
10343
  class: ['email-item box-shadow', _vm.isOpen ? _vm.isOpenClass : _vm.isClosedClass]
10329
- }, [_vm._ssrNode("<div class=\"email-header\" data-v-4309d8cc>", "</div>", [_vm._ssrNode("<div class=\"email-header-content\" data-v-4309d8cc>", "</div>", [_vm._ssrNode("<div class=\"email-header-infos\" data-v-4309d8cc>", "</div>", [_vm._ssrNode("<p" + _vm._ssrAttr("title", _vm.htmlEntityToEmoji(_vm.replaceUnicodeWithEmoji(_vm.assunto)) || '(Sem assunto)') + " class=\"email-subject\" data-v-4309d8cc>" + _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-4309d8cc>", "</div>", _vm._l(_vm.from, function (sender, index) {
10344
+ }, [_vm._ssrNode("<div class=\"email-header\" data-v-3869bfe2>", "</div>", [_vm._ssrNode("<div class=\"email-header-content\" data-v-3869bfe2>", "</div>", [_vm._ssrNode("<div class=\"email-header-infos\" data-v-3869bfe2>", "</div>", [_vm._ssrNode("<p" + _vm._ssrAttr("title", _vm.htmlEntityToEmoji(_vm.replaceUnicodeWithEmoji(_vm.assunto)) || '(Sem assunto)') + " class=\"email-subject\" data-v-3869bfe2>" + _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-3869bfe2>", "</div>", _vm._l(_vm.from, function (sender, index) {
10330
10345
  return _c('EmailFrom', {
10331
10346
  key: "from-" + index,
10332
10347
  attrs: {
@@ -10335,7 +10350,7 @@ var __vue_render__ = function __vue_render__() {
10335
10350
  "showMail": _vm.isOpen
10336
10351
  }
10337
10352
  });
10338
- }), 1)] : _vm._e(), _vm._ssrNode(" "), _vm.para && _vm.para.length && _vm.isOpen ? [_vm._ssrNode("<div class=\"email-to-from-container\" data-v-4309d8cc>", "</div>", [_vm._l(_vm.para, function (recipient, index) {
10353
+ }), 1)] : _vm._e(), _vm._ssrNode(" "), _vm.para && _vm.para.length && _vm.isOpen ? [_vm._ssrNode("<div class=\"email-to-from-container\" data-v-3869bfe2>", "</div>", [_vm._l(_vm.para, function (recipient, index) {
10339
10354
  return _c('EmailTo', {
10340
10355
  key: "to-" + index,
10341
10356
  attrs: {
@@ -10344,7 +10359,7 @@ var __vue_render__ = function __vue_render__() {
10344
10359
  "showMail": _vm.para.length === 1
10345
10360
  }
10346
10361
  });
10347
- }), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-to-btn\" data-v-4309d8cc>", "</div>", [_c('fa-icon', {
10362
+ }), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"email-to-btn\" data-v-3869bfe2>", "</div>", [_c('fa-icon', {
10348
10363
  attrs: {
10349
10364
  "icon": ['fas', 'caret-down']
10350
10365
  }
@@ -10364,14 +10379,14 @@ var __vue_render__ = function __vue_render__() {
10364
10379
  }
10365
10380
  }
10366
10381
  }, [_vm._ssrNode(_vm._ssrList(_vm.mailInfos, function (info, index) {
10367
- return "<li class=\"email-info\" data-v-4309d8cc><span data-v-4309d8cc>" + _vm._ssrEscape(_vm._s(info.label)) + "</span>" + _vm._ssrEscape("\n " + _vm._s(info.value) + "\n ") + "</li>";
10368
- }))]) : _vm._e()], 2)] : _vm._e()], 2)]), _vm._ssrNode(" "), _vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.formattedDate) + " class=\"email-date\" data-v-4309d8cc>", "</span>", [_c('fa-icon', {
10382
+ return "<li class=\"email-info\" data-v-3869bfe2><span data-v-3869bfe2>" + _vm._ssrEscape(_vm._s(info.label)) + "</span>" + _vm._ssrEscape("\n " + _vm._s(info.value) + "\n ") + "</li>";
10383
+ }))]) : _vm._e()], 2)] : _vm._e()], 2)]), _vm._ssrNode(" "), _vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.formattedDate) + " class=\"email-date\" data-v-3869bfe2>", "</span>", [_c('fa-icon', {
10369
10384
  attrs: {
10370
10385
  "icon": ['fas', 'calendar']
10371
10386
  }
10372
10387
  }), _vm._ssrNode(_vm._ssrEscape("\n " + _vm._s(_vm.formattedDate) + "\n "))], 2), _vm._ssrNode(" " + (_vm.isOpen ? "<span" + _vm._ssrClass(null, ['email-actions box-shadow', {
10373
10388
  active: _vm.actionsOpen
10374
- }]) + " data-v-4309d8cc><span data-v-4309d8cc></span> <span data-v-4309d8cc></span> <span data-v-4309d8cc></span></span>" : "<!---->") + " "), _vm.actionsOpen && _vm.isOpen ? _c('ul', {
10389
+ }]) + " data-v-3869bfe2><span data-v-3869bfe2></span> <span data-v-3869bfe2></span> <span data-v-3869bfe2></span></span>" : "<!---->") + " "), _vm.actionsOpen && _vm.isOpen ? _c('ul', {
10375
10390
  directives: [{
10376
10391
  name: "clickaway",
10377
10392
  rawName: "v-clickaway",
@@ -10384,20 +10399,19 @@ var __vue_render__ = function __vue_render__() {
10384
10399
  $event.stopPropagation();
10385
10400
  }
10386
10401
  }
10387
- }, [_vm._ssrNode("<li class=\"email-action\" data-v-4309d8cc>" + _vm._ssrEscape("\n " + _vm._s(!_vm.openMessage ? 'Visualizar' : 'Esconder') + " texto do e-mail\n ") + "</li>")]) : _vm._e()], 2), _vm._ssrNode(" "), _c('transition', {
10402
+ }, [_vm._ssrNode("<li class=\"email-action\" data-v-3869bfe2>" + _vm._ssrEscape("\n " + _vm._s(!_vm.openMessage ? 'Visualizar' : 'Esconder') + " texto do e-mail\n ") + "</li>")]) : _vm._e()], 2), _vm._ssrNode(" "), _c('transition', {
10388
10403
  attrs: {
10389
10404
  "name": "show-y-top"
10390
10405
  }
10391
10406
  }, [_vm.isOpen ? _c('div', {
10407
+ ref: "emailIframeParent",
10392
10408
  staticClass: "email-content"
10393
- }, [_c('section', {
10394
- staticClass: "email-html",
10395
- domProps: {
10396
- "innerHTML": _vm._s(_vm.cleanHtml)
10397
- }
10409
+ }, [_c('iframe', {
10410
+ ref: "emailIframe",
10411
+ staticClass: "email-html"
10398
10412
  }), _vm._v(" "), _vm.openMessage ? _c('span', {
10399
10413
  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-4309d8cc>", "</div>", _vm._l(_vm.anexos, function (anexo, index) {
10414
+ }, [_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-3869bfe2>", "</div>", _vm._l(_vm.anexos, function (anexo, index) {
10401
10415
  return _c('EmailFile', {
10402
10416
  key: index,
10403
10417
  attrs: {
@@ -10412,20 +10426,20 @@ var __vue_staticRenderFns__ = [];
10412
10426
  /* style */
10413
10427
  var __vue_inject_styles__ = function __vue_inject_styles__(inject) {
10414
10428
  if (!inject) return;
10415
- inject("data-v-4309d8cc_0", {
10416
- source: ".show-y-top-enter-active[data-v-4309d8cc],.show-y-top-leave-enter[data-v-4309d8cc]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-4309d8cc],.show-y-top-leave-to[data-v-4309d8cc]{opacity:0;transform:translateY(-2%)}",
10429
+ inject("data-v-3869bfe2_0", {
10430
+ source: ".show-y-top-enter-active[data-v-3869bfe2],.show-y-top-leave-enter[data-v-3869bfe2]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-3869bfe2],.show-y-top-leave-to[data-v-3869bfe2]{opacity:0;transform:translateY(-2%)}",
10417
10431
  map: undefined,
10418
10432
  media: undefined
10419
- }), inject("data-v-4309d8cc_1", {
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:center;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}.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}",
10433
+ }), inject("data-v-3869bfe2_1", {
10434
+ 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:center;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:1200px;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
10435
  map: undefined,
10422
10436
  media: undefined
10423
10437
  });
10424
10438
  };
10425
10439
  /* scoped */
10426
- var __vue_scope_id__ = "data-v-4309d8cc";
10440
+ var __vue_scope_id__ = "data-v-3869bfe2";
10427
10441
  /* module identifier */
10428
- var __vue_module_identifier__ = "data-v-4309d8cc";
10442
+ var __vue_module_identifier__ = "data-v-3869bfe2";
10429
10443
  /* functional template */
10430
10444
  var __vue_is_functional_template__ = false;
10431
10445
  /* style inject shadow dom */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intergrall-plugins",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "description": "",
5
5
  "main": "dist/vue-intergrall-plugins.ssr.js",
6
6
  "browser": "dist/vue-intergrall-plugins.esm.js",
@@ -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
- <section class="email-html" v-html="cleanHtml"></section>
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}px`;
196
+ emailParent.style.minHeight = `${doc.documentElement.offsetHeight + 250}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) this.actionsOpen = false;
205
+ if (!this.isOpen) {
206
+ this.actionsOpen = false;
207
+ this.openMessage = false
208
+ }
202
209
  },
203
210
  toggleActions() {
204
211
  this.actionsOpen = !this.actionsOpen;
@@ -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: 1200px;
394
+ overflow: auto;
385
395
  }
386
396
 
387
397
  .email-raw {