vue-intergrall-plugins 1.0.55 → 1.0.57

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.
@@ -10932,7 +10932,8 @@ var script$1 = {
10932
10932
  isOpen: this.iniciarAberto,
10933
10933
  openMessage: false,
10934
10934
  actionsOpen: false,
10935
- showInfos: false
10935
+ showInfos: false,
10936
+ isIframeLoading: true
10936
10937
  };
10937
10938
  },
10938
10939
  computed: {
@@ -10966,7 +10967,6 @@ var script$1 = {
10966
10967
  }
10967
10968
  },
10968
10969
  watch: {
10969
- html: 'updateIframeContent',
10970
10970
  isOpen: 'updateIframeContent'
10971
10971
  },
10972
10972
  mounted() {
@@ -10986,13 +10986,28 @@ var script$1 = {
10986
10986
  },
10987
10987
  updateIframeContent() {
10988
10988
  this.$nextTick(() => {
10989
- if (this.isOpen) {
10989
+ if (this.isOpen && this.isIframeLoading) {
10990
10990
  const iframe = this.$refs.emailIframe;
10991
10991
  const doc = iframe.contentDocument || iframe.contentWindow.document;
10992
10992
  doc.open();
10993
10993
  doc.write(this.html);
10994
10994
  doc.close();
10995
- this.adjustIframeHeight();
10995
+ const images = doc.getElementsByTagName('img');
10996
+ let imagesLoaded = 0;
10997
+ const imageLoadHandler = () => {
10998
+ imagesLoaded++;
10999
+ if (imagesLoaded === images.length) {
11000
+ this.adjustIframeHeight();
11001
+ }
11002
+ };
11003
+ if (images.length === 0) {
11004
+ this.adjustIframeHeight();
11005
+ } else {
11006
+ for (let img of images) {
11007
+ img.addEventListener('load', imageLoadHandler);
11008
+ img.addEventListener('error', imageLoadHandler);
11009
+ }
11010
+ }
10996
11011
  }
10997
11012
  });
10998
11013
  },
@@ -11005,6 +11020,7 @@ var script$1 = {
11005
11020
  iframe.style.height = `${doc.documentElement.offsetHeight}px`;
11006
11021
  emailParent.style.minHeight = `${doc.documentElement.offsetHeight}px`;
11007
11022
  }
11023
+ if (this.isIframeLoading) this.isIframeLoading = false;
11008
11024
  });
11009
11025
  },
11010
11026
  toggleShowInfos() {
@@ -11226,15 +11242,21 @@ var __vue_render__$1 = function () {
11226
11242
  attrs: {
11227
11243
  "name": "show-y-top"
11228
11244
  }
11229
- }, [_vm.isOpen ? _c('div', {
11245
+ }, [_c('div', {
11246
+ directives: [{
11247
+ name: "show",
11248
+ rawName: "v-show",
11249
+ value: _vm.isOpen,
11250
+ expression: "isOpen"
11251
+ }],
11230
11252
  ref: "emailIframeParent",
11231
11253
  staticClass: "email-content"
11232
- }, [_c('iframe', {
11254
+ }, [_vm.isIframeLoading ? _c('VueLoader') : _vm._e(), _vm._v(" "), _c('iframe', {
11233
11255
  ref: "emailIframe",
11234
- staticClass: "email-html"
11256
+ class: "email-html " + (_vm.isIframeLoading ? 'visibility-hidden' : '')
11235
11257
  }), _vm._v(" "), _vm.openMessage ? _c('span', {
11236
11258
  staticClass: "email-raw"
11237
- }, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()]) : _vm._e()]), _vm._v(" "), _vm.anexos && _vm.anexos.length ? _c('div', {
11259
+ }, [_vm._v(_vm._s(_vm.mensagem))]) : _vm._e()], 1)]), _vm._v(" "), _vm.anexos && _vm.anexos.length ? _c('div', {
11238
11260
  staticClass: "email-files",
11239
11261
  on: {
11240
11262
  "click": function ($event) {
@@ -11256,18 +11278,18 @@ var __vue_staticRenderFns__$1 = [];
11256
11278
  /* style */
11257
11279
  const __vue_inject_styles__$1 = function (inject) {
11258
11280
  if (!inject) return;
11259
- inject("data-v-e3682be0_0", {
11260
- source: ".show-y-top-enter-active[data-v-e3682be0],.show-y-top-leave-enter[data-v-e3682be0]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-e3682be0],.show-y-top-leave-to[data-v-e3682be0]{opacity:0;transform:translateY(-2%)}",
11281
+ inject("data-v-ce46c090_0", {
11282
+ source: ".show-y-top-enter-active[data-v-ce46c090],.show-y-top-leave-enter[data-v-ce46c090]{opacity:1;transform:translateY(0);transition:all .2s linear}.show-y-top-enter[data-v-ce46c090],.show-y-top-leave-to[data-v-ce46c090]{opacity:0;transform:translateY(-2%)}",
11261
11283
  map: undefined,
11262
11284
  media: undefined
11263
- }), inject("data-v-e3682be0_1", {
11264
- 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);.box-shadow-active{box-shadow:0 0 4px 2px rgba(0,0,0,.25)!important}.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}.email-author.outros{color:#33b8df}.email-author.outros>svg:nth-child(1){transform:rotate(180deg)}.email-author.principal{color:#ebb552}.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:0 0 5px 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:5px;top:5px;z-index:1}.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%;cursor:default}.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;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-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}",
11285
+ }), inject("data-v-ce46c090_1", {
11286
+ 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)!important}.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}.email-author.outros{color:#33b8df}.email-author.outros>svg:nth-child(1){transform:rotate(180deg)}.email-author.principal{color:#ebb552}.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:0 0 5px 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:5px;top:5px;z-index:1}.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%;cursor:default}.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;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-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}",
11265
11287
  map: undefined,
11266
11288
  media: undefined
11267
11289
  });
11268
11290
  };
11269
11291
  /* scoped */
11270
- const __vue_scope_id__$1 = "data-v-e3682be0";
11292
+ const __vue_scope_id__$1 = "data-v-ce46c090";
11271
11293
  /* module identifier */
11272
11294
  const __vue_module_identifier__$1 = undefined;
11273
11295
  /* functional template */