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.
@@ -6922,7 +6922,8 @@ const textoLongo = {
6922
6922
  } else {
6923
6923
  distance = `${date.getFullYear()} ${dicionario.ha_message} ${yearsDifference} ${yearsDifference === 1 ? 'ano' : 'anos'}`;
6924
6924
  }
6925
- return `${formattedDate} (${distance})`;
6925
+ const finalText = !`${formattedDate} (${distance})`.includes('undefined') ? `${formattedDate} (${distance})` : '';
6926
+ return finalText;
6926
6927
  }
6927
6928
  }
6928
6929
  };
@@ -10984,10 +10985,6 @@ var script = {
10984
10985
  isClosedClass: {
10985
10986
  type: String,
10986
10987
  default: 'bg-light-gray-2'
10987
- },
10988
- sanitizeOptions: {
10989
- type: Object,
10990
- default: null
10991
10988
  }
10992
10989
  },
10993
10990
  data() {
@@ -11002,23 +10999,6 @@ var script = {
11002
10999
  formattedDate() {
11003
11000
  return this.formataDateHoraDateFns(this.dataHora, this.dataServer, this.dicionario);
11004
11001
  },
11005
- cleanHtml() {
11006
- const defaultOptions = {
11007
- 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'],
11008
- allowedAttributes: {
11009
- 'a': ['href', 'name', 'target', 'title'],
11010
- 'img': ['src', 'width', 'height', 'alt', 'title'],
11011
- 'link': ['rel', 'href', 'type'],
11012
- 'input': ['type', 'name', 'value', 'placeholder', 'maxlength', 'minlength', 'size', 'readonly', 'disabled'],
11013
- 'textarea': ['name', 'rows', 'cols', 'placeholder', 'maxlength', 'minlength', 'readonly', 'disabled'],
11014
- 'table': ['border', 'cellpadding', 'cellspacing', 'width', 'height'],
11015
- 'th': ['colspan', 'rowspan'],
11016
- 'td': ['colspan', 'rowspan'],
11017
- '*': ['style', 'class', 'id', 'title', 'align', 'valign', 'dir', 'lang', 'tabindex', 'accesskey', 'data-*', 'dir']
11018
- }
11019
- };
11020
- return this.$sanitize(this.html, this.sanitizeOptions || defaultOptions);
11021
- },
11022
11002
  mailInfos() {
11023
11003
  const formatAsString = arr => {
11024
11004
  let str = '';
@@ -11045,13 +11025,46 @@ var script = {
11045
11025
  }];
11046
11026
  }
11047
11027
  },
11028
+ watch: {
11029
+ html: 'updateIframeContent',
11030
+ isOpen: 'updateIframeContent'
11031
+ },
11032
+ mounted() {
11033
+ this.updateIframeContent();
11034
+ },
11048
11035
  methods: {
11036
+ updateIframeContent() {
11037
+ this.$nextTick(() => {
11038
+ if (this.isOpen) {
11039
+ const iframe = this.$refs.emailIframe;
11040
+ const doc = iframe.contentDocument || iframe.contentWindow.document;
11041
+ doc.open();
11042
+ doc.write(this.html);
11043
+ doc.close();
11044
+ this.adjustIframeHeight();
11045
+ }
11046
+ });
11047
+ },
11048
+ adjustIframeHeight() {
11049
+ this.$nextTick(() => {
11050
+ const iframe = this.$refs.emailIframe;
11051
+ const emailParent = this.$refs.emailIframeParent;
11052
+ if (iframe && emailParent) {
11053
+ const doc = iframe.contentDocument || iframe.contentWindow.document;
11054
+ iframe.style.height = `${doc.documentElement.offsetHeight}px`;
11055
+ emailParent.style.minHeight = `${doc.documentElement.offsetHeight + 250}px`;
11056
+ }
11057
+ });
11058
+ },
11049
11059
  toggleShowInfos() {
11050
11060
  this.showInfos = !this.showInfos;
11051
11061
  },
11052
11062
  toggleIsOpen() {
11053
11063
  this.isOpen = !this.isOpen;
11054
- if (!this.isOpen) this.actionsOpen = false;
11064
+ if (!this.isOpen) {
11065
+ this.actionsOpen = false;
11066
+ this.openMessage = false;
11067
+ }
11055
11068
  },
11056
11069
  toggleActions() {
11057
11070
  this.actionsOpen = !this.actionsOpen;
@@ -11198,12 +11211,11 @@ var __vue_render__ = function () {
11198
11211
  "name": "show-y-top"
11199
11212
  }
11200
11213
  }, [_vm.isOpen ? _c('div', {
11214
+ ref: "emailIframeParent",
11201
11215
  staticClass: "email-content"
11202
- }, [_c('section', {
11203
- staticClass: "email-html",
11204
- domProps: {
11205
- "innerHTML": _vm._s(_vm.cleanHtml)
11206
- }
11216
+ }, [_c('iframe', {
11217
+ ref: "emailIframe",
11218
+ staticClass: "email-html"
11207
11219
  }), _vm._v(" "), _vm.openMessage ? _c('span', {
11208
11220
  staticClass: "email-raw"
11209
11221
  }, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()]) : _vm._e()]), _vm._v(" "), _vm.anexos && _vm.anexos.length ? _c('div', {
@@ -11223,18 +11235,18 @@ var __vue_staticRenderFns__ = [];
11223
11235
  /* style */
11224
11236
  const __vue_inject_styles__ = function (inject) {
11225
11237
  if (!inject) return;
11226
- inject("data-v-4309d8cc_0", {
11227
- 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%)}",
11238
+ inject("data-v-3869bfe2_0", {
11239
+ 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%)}",
11228
11240
  map: undefined,
11229
11241
  media: undefined
11230
- }), inject("data-v-4309d8cc_1", {
11231
- 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}",
11242
+ }), inject("data-v-3869bfe2_1", {
11243
+ 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}",
11232
11244
  map: undefined,
11233
11245
  media: undefined
11234
11246
  });
11235
11247
  };
11236
11248
  /* scoped */
11237
- const __vue_scope_id__ = "data-v-4309d8cc";
11249
+ const __vue_scope_id__ = "data-v-3869bfe2";
11238
11250
  /* module identifier */
11239
11251
  const __vue_module_identifier__ = undefined;
11240
11252
  /* functional template */