vue-intergrall-plugins 1.0.37 → 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,18 +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'],
11008
- allowedAttributes: {
11009
- 'a': ['href'],
11010
- 'img': ['src', 'width', 'height', 'alt'],
11011
- 'link': ['rel', 'href'],
11012
- '*': ['style']
11013
- }
11014
- };
11015
- return this.$sanitize(this.html, this.sanitizeOptions || defaultOptions);
11016
- },
11017
11002
  mailInfos() {
11018
11003
  const formatAsString = arr => {
11019
11004
  let str = '';
@@ -11040,13 +11025,46 @@ var script = {
11040
11025
  }];
11041
11026
  }
11042
11027
  },
11028
+ watch: {
11029
+ html: 'updateIframeContent',
11030
+ isOpen: 'updateIframeContent'
11031
+ },
11032
+ mounted() {
11033
+ this.updateIframeContent();
11034
+ },
11043
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
+ },
11044
11059
  toggleShowInfos() {
11045
11060
  this.showInfos = !this.showInfos;
11046
11061
  },
11047
11062
  toggleIsOpen() {
11048
11063
  this.isOpen = !this.isOpen;
11049
- if (!this.isOpen) this.actionsOpen = false;
11064
+ if (!this.isOpen) {
11065
+ this.actionsOpen = false;
11066
+ this.openMessage = false;
11067
+ }
11050
11068
  },
11051
11069
  toggleActions() {
11052
11070
  this.actionsOpen = !this.actionsOpen;
@@ -11193,12 +11211,11 @@ var __vue_render__ = function () {
11193
11211
  "name": "show-y-top"
11194
11212
  }
11195
11213
  }, [_vm.isOpen ? _c('div', {
11214
+ ref: "emailIframeParent",
11196
11215
  staticClass: "email-content"
11197
- }, [_c('section', {
11198
- staticClass: "email-html",
11199
- domProps: {
11200
- "innerHTML": _vm._s(_vm.cleanHtml)
11201
- }
11216
+ }, [_c('iframe', {
11217
+ ref: "emailIframe",
11218
+ staticClass: "email-html"
11202
11219
  }), _vm._v(" "), _vm.openMessage ? _c('span', {
11203
11220
  staticClass: "email-raw"
11204
11221
  }, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()]) : _vm._e()]), _vm._v(" "), _vm.anexos && _vm.anexos.length ? _c('div', {
@@ -11218,18 +11235,18 @@ var __vue_staticRenderFns__ = [];
11218
11235
  /* style */
11219
11236
  const __vue_inject_styles__ = function (inject) {
11220
11237
  if (!inject) return;
11221
- inject("data-v-7d5e37b1_0", {
11222
- source: ".show-y-top-enter-active[data-v-7d5e37b1],.show-y-top-leave-enter[data-v-7d5e37b1]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-7d5e37b1],.show-y-top-leave-to[data-v-7d5e37b1]{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%)}",
11223
11240
  map: undefined,
11224
11241
  media: undefined
11225
- }), inject("data-v-7d5e37b1_1", {
11226
- 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}",
11227
11244
  map: undefined,
11228
11245
  media: undefined
11229
11246
  });
11230
11247
  };
11231
11248
  /* scoped */
11232
- const __vue_scope_id__ = "data-v-7d5e37b1";
11249
+ const __vue_scope_id__ = "data-v-3869bfe2";
11233
11250
  /* module identifier */
11234
11251
  const __vue_module_identifier__ = undefined;
11235
11252
  /* functional template */