vue-intergrall-plugins 1.2.0 → 1.2.19

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.
@@ -6779,10 +6779,10 @@ var __vue_component__$u = __vue_component__$t;var textoLongo = {
6779
6779
  if (!type || !mku || !name || !mkuDownload) {
6780
6780
  if (anexos.anexo) {
6781
6781
  ignoreMku = true;
6782
- imgAnexo = anexos.imgAnexo ? anexos.imgAnexo : '';
6783
- tipoDoc = anexos.tipoDoc ? anexos.tipoDoc : '';
6784
- docAnexo = anexos.docAnexo ? anexos.docAnexo : '';
6785
- nomeArquivo = anexos.nomeArquivo ? anexos.nomeArquivo : '';
6782
+ imgAnexo = anexos.imgAnexo ? anexos.imgAnexo : "";
6783
+ tipoDoc = anexos.tipoDoc ? anexos.tipoDoc : "";
6784
+ docAnexo = anexos.docAnexo ? anexos.docAnexo : "";
6785
+ nomeArquivo = anexos.nomeArquivo ? anexos.nomeArquivo : "";
6786
6786
  audio = anexos.audio ? anexos.audio : false;
6787
6787
  } else {
6788
6788
  return anexos;
@@ -6861,7 +6861,7 @@ var __vue_component__$u = __vue_component__$t;var textoLongo = {
6861
6861
  }
6862
6862
  break;
6863
6863
  }
6864
- return Object.assign(anexos, {
6864
+ return Object.assign({}, anexos, {
6865
6865
  anexo: anexo,
6866
6866
  imgAnexo: imgAnexo,
6867
6867
  tipoDoc: tipoDoc,
@@ -8339,19 +8339,39 @@ var script$d = {
8339
8339
  return {
8340
8340
  imgErro: false,
8341
8341
  imgMsgErro: "",
8342
- fileAccessError: false
8342
+ fileAccessError: false,
8343
+ hideTranscription: false
8343
8344
  };
8344
8345
  },
8346
+ watch: {
8347
+ anexo: function anexo(newAnexo) {
8348
+ var _this = this;
8349
+ this.fileAccessError = false;
8350
+ this.imgErro = false;
8351
+ this.imgMsgErro = "";
8352
+ if (this.validarAnexo()) {
8353
+ this.setFileVars(newAnexo, {
8354
+ dominio: this.dominio
8355
+ });
8356
+ this.$nextTick(function () {
8357
+ var hasValidFile = _this.imageURL || _this.docURL || _this.audio || _this.video;
8358
+ if (!hasValidFile) {
8359
+ _this.fileAccessError = true;
8360
+ }
8361
+ });
8362
+ }
8363
+ }
8364
+ },
8345
8365
  mounted: function mounted() {
8346
- var _this = this;
8366
+ var _this2 = this;
8347
8367
  if (this.validarAnexo()) {
8348
8368
  this.setFileVars(this.anexo, {
8349
8369
  dominio: this.dominio
8350
8370
  });
8351
8371
  this.$nextTick(function () {
8352
- var hasValidFile = _this.imageURL || _this.docURL || _this.audio || _this.video;
8372
+ var hasValidFile = _this2.imageURL || _this2.docURL || _this2.audio || _this2.video;
8353
8373
  if (!hasValidFile) {
8354
- _this.fileAccessError = true;
8374
+ _this2.fileAccessError = true;
8355
8375
  }
8356
8376
  });
8357
8377
  }
@@ -8407,7 +8427,7 @@ var __vue_render__$d = function __vue_render__() {
8407
8427
  attrs: {
8408
8428
  "icon": ['fas', 'exclamation-triangle']
8409
8429
  }
8410
- }), _vm._ssrNode(" <p>" + _vm._ssrEscape(_vm._s(_vm.filename || _vm.dictionary.arquivo_sem_nome || 'Arquivo sem nome')) + "</p>")], 2) : [_vm.imageURL ? _vm._ssrNode("<img" + _vm._ssrAttr("src", _vm.imageURL) + _vm._ssrAttr("alt", _vm.dictionary.alt_msg_img) + ">", "</img>") : _vm.audio ? _vm._ssrNode("<div class=\"divAudioPai\">", "</div>", [_vm._ssrNode("<audio controls=\"controls\" class=\"audioStyle\"><source" + _vm._ssrAttr("src", _vm.docURL) + _vm._ssrAttr("type", _vm.fileType) + ">\n Sem suporte para o elemento audio\n </audio> "), _c('audio-speed-control', {
8430
+ }), _vm._ssrNode(" <p>" + _vm._ssrEscape("\n " + _vm._s(_vm.filename || _vm.dictionary.arquivo_sem_nome || "Arquivo sem nome") + "\n ") + "</p>")], 2) : [_vm.imageURL ? _vm._ssrNode("<img" + _vm._ssrAttr("src", _vm.imageURL) + _vm._ssrAttr("alt", _vm.dictionary.alt_msg_img) + ">", "</img>") : _vm.audio ? _vm._ssrNode("<div class=\"divAudioPai\">", "</div>", [_vm._ssrNode("<audio controls=\"controls\" class=\"audioStyle\"><source" + _vm._ssrAttr("src", _vm.docURL) + _vm._ssrAttr("type", _vm.fileType) + ">\n Sem suporte para o elemento audio\n </audio> "), _c('audio-speed-control', {
8411
8431
  on: {
8412
8432
  "change-speed": _vm.changeAudioSpeed
8413
8433
  }
@@ -8421,11 +8441,11 @@ var __vue_render__$d = function __vue_render__() {
8421
8441
  attrs: {
8422
8442
  "icon": ['fas', 'file-alt']
8423
8443
  }
8424
- }), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.filename) + ">" + _vm._ssrEscape(_vm._s(_vm.filename)) + "</p>")], 2), _vm._ssrNode(" " + (_vm.audio && _vm.hasTranscription ? "<div class=\"transcription-controls\">" + _vm._ssrEscape("\n " + _vm._s(_vm.dictionary.transcricaoControl || 'Transcrever') + "\n ") + "</div>" : "<!---->") + " "), _vm.audio && _vm.transcriptionText ? _vm._ssrNode("<div class=\"transcription-container\">", "</div>", [_vm._ssrNode("<div class=\"transcription-header\">", "</div>", [_vm._ssrNode((!_vm.hideTranscription ? "<p>" + _vm._ssrEscape(_vm._s("" + (_vm.dictionary.transcricaoLabel ? _vm.dictionary.transcricaoLabel + ":" : ''))) + "</p>" : "<!---->") + " "), _vm._ssrNode("<button class=\"transcription-button\">", "</button>", [_c('fa-icon', {
8444
+ }), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.filename) + ">" + _vm._ssrEscape(_vm._s(_vm.filename)) + "</p>")], 2), _vm._ssrNode(" " + (_vm.audio && _vm.hasTranscription ? "<div class=\"transcription-controls\">" + _vm._ssrEscape("\n " + _vm._s(_vm.dictionary.transcricaoControl || "Transcrever") + "\n ") + "</div>" : "<!---->") + " "), _vm.audio && _vm.transcriptionText ? _vm._ssrNode("<div class=\"transcription-container\">", "</div>", [_vm._ssrNode("<div class=\"transcription-header\">", "</div>", [_vm._ssrNode((!_vm.hideTranscription ? "<p>" + _vm._ssrEscape(_vm._s("" + (_vm.dictionary.transcricaoLabel ? _vm.dictionary.transcricaoLabel + ":" : ''))) + "</p>" : "<!---->") + " "), _vm._ssrNode("<button class=\"transcription-button\">", "</button>", [_c('fa-icon', {
8425
8445
  attrs: {
8426
8446
  "icon": ['fas', "caret-" + (_vm.hideTranscription ? 'down' : 'up')]
8427
8447
  }
8428
- })], 1)], 2), _vm._ssrNode(" "), _vm.transcriptionLoading ? _vm._ssrNode("<div class=\"transcription-loader\">", "</div>", [_c('VueLoader')], 1) : !_vm.hideTranscription ? _vm._ssrNode("<p class=\"transcription-text\">" + _vm._ssrEscape(_vm._s(_vm.transcriptionText)) + "</p>") : _vm._e()], 2) : _vm._e(), _vm._ssrNode(" "), _vm.showControlFiles ? _vm._ssrNode("<div class=\"file-actions\">", "</div>", [_vm.imageURL ? _vm._ssrNode("<span lass=\"file-action-button\">", "</span>", [_c('fa-icon', {
8448
+ })], 1)], 2), _vm._ssrNode(" "), _vm.transcriptionLoading ? _vm._ssrNode("<div class=\"transcription-loader\">", "</div>", [_c('VueLoader')], 1) : !_vm.hideTranscription ? _vm._ssrNode("<p class=\"transcription-text\">" + _vm._ssrEscape("\n " + _vm._s(_vm.transcriptionText) + "\n ") + "</p>") : _vm._e()], 2) : _vm._e(), _vm._ssrNode(" "), _vm.showControlFiles ? _vm._ssrNode("<div class=\"file-actions\">", "</div>", [_vm.imageURL ? _vm._ssrNode("<span lass=\"file-action-button\">", "</span>", [_c('fa-icon', {
8429
8449
  directives: [{
8430
8450
  name: "tippy",
8431
8451
  rawName: "v-tippy"
@@ -8511,7 +8531,7 @@ var __vue_render__$d = function __vue_render__() {
8511
8531
  on: {
8512
8532
  "click": _vm.closeTippy
8513
8533
  }
8514
- }, [_vm._v("Cancelar")]), _vm._v(" "), _c('button', {
8534
+ }, [_vm._v("\n Cancelar\n ")]), _vm._v(" "), _c('button', {
8515
8535
  staticClass: "confirm box-shadow",
8516
8536
  on: {
8517
8537
  "click": function click($event) {
@@ -8525,11 +8545,11 @@ var __vue_staticRenderFns__$d = [];
8525
8545
  /* style */
8526
8546
  var __vue_inject_styles__$d = function __vue_inject_styles__(inject) {
8527
8547
  if (!inject) return;
8528
- inject("data-v-14e512bc_0", {
8548
+ inject("data-v-00e864df_0", {
8529
8549
  source: ".transcription-container{display:flex;flex-wrap:wrap;width:100%}.transcription-header{display:flex;justify-content:flex-end;align-items:center;gap:10px;width:100%}.transcription-header>p{flex:1}.transcription-button{background-color:transparent;border:none;cursor:pointer;transition:background 150ms ease-in-out;border-radius:5px;display:flex;justify-content:center;align-items:center}.transcription-button:hover{background:rgba(0,0,0,.1)}.transcription-controls{margin-top:10px;color:#00f;cursor:pointer}.transcription-controls:hover{text-decoration:underline}.transcription-loader{position:relative;height:30px;width:100%}.transcription-text{white-space:break-spaces;color:rgba(0,0,0,.6)}.tippy-tooltip.light-theme .tippy-backdrop{background-color:#fff}.tippy-tooltip.light-theme{background-color:#fff;border:1px solid #ccc;color:#333;-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-moz-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.tippy-confirmation p{margin-bottom:3px}.tippy-confirmation button{border:unset;background-color:#f1f1f1;border-radius:3px;padding:5px 8px;cursor:pointer;font-size:12px}.tippy-confirmation button.cancel{border-bottom:2px solid red;margin-right:15px}.tippy-confirmation button.confirm{border-bottom:2px solid green}",
8530
8550
  map: undefined,
8531
8551
  media: undefined
8532
- }), inject("data-v-14e512bc_1", {
8552
+ }), inject("data-v-00e864df_1", {
8533
8553
  source: ".mensagem__principal .default-doc{background-color:var(--files-bg)}.mensagem__principal .default-doc:hover{background-color:var(--files-bg-hover)}.mensagem__outros .default-doc{background-color:rgba(100,100,100,.1)}.mensagem__outros .default-doc:hover{background-color:rgba(100,100,100,.3)}.default-doc:hover p{text-decoration:underline}.default-doc{display:flex;align-items:center;padding:10px;border-radius:5px;width:100%;max-width:100%;cursor:pointer;transition:background-color 150ms ease-in-out}.default-doc svg{font-size:19.2px;margin:0 5px}.default-doc p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-actions{display:flex;justify-content:flex-end;width:100%;padding:5px}.file-actions a{margin-right:0}.mensagem__principal .file-action-button{background-color:var(--files-bg)}.mensagem__outros .file-action-button{background-color:rgba(100,100,100,.1)}.mensagem__principal .file-action-button:hover{background-color:var(--files-bg-hover)}.mensagem__outros .file-action-button:hover{background-color:rgba(100,100,100,.3)}.file-action-button{display:flex;justify-content:center;align-items:center;margin-left:12px;cursor:pointer;padding:5px;border-radius:5px;transition:background-color 150ms ease-in-out}.file-action-button a{margin:0}.fade-enter-active,.fade-leave-active{transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}.mensagem-div-anexo{width:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;overflow:hidden}.anexo-container{width:100%;margin-top:5px;overflow:hidden;display:flex;max-height:300px}.anexo-container .arquivo-erro,.anexo-container a{padding:10px 15px 15px 15px;display:flex;justify-content:center;align-items:center}.anexo-container p{text-overflow:ellipsis;overflow:hidden}.anexo-container .arquivo-erro,.anexo-container p{margin:0;margin-left:15px;font-size:14.4px}.anexo-container svg{font-size:32px}.anexo-mensagem audio .divAudioPai{outline:0;width:100%;margin-bottom:5px}.audioStyle{width:370px;min-width:calc(100% - 45px)}.divAudioPai{display:flex;background-color:#f1f3f4;border-radius:50%;width:100%;border-bottom-right-radius:26px;border-top-right-radius:26px}.anexo-mensagem video{flex:1;width:100%;max-width:350px;cursor:pointer;margin-bottom:5px}.anexos-links-container{width:100%;display:flex;justify-content:center;align-items:center}.anexos-links-container a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-right:5px;font-weight:550;color:inherit;text-decoration:none}.anexos-links-container svg{cursor:pointer}.mensagem-div-anexo img{cursor:pointer;margin:10px 0;min-width:35px;width:100%;max-width:250px}.anexo-transition{width:100%;height:100%}.anexo-mensagem{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert{position:relative;padding:10.4px 19.2px;margin:5px 0;border:1px solid transparent;border-radius:4px;text-align:center}.alert svg{font-size:16.4px;margin-right:2px}.pdf{color:#e74c3c}.doc{color:#006bc9}.file-unavailable{opacity:.6;cursor:not-allowed;border:1px dashed rgba(255,0,0,.3);pointer-events:none;background-color:rgba(255,0,0,.05)}.file-unavailable:hover{background-color:rgba(255,0,0,.05)}.file-unavailable svg{color:#e74c3c;font-size:24px}.file-unavailable p{color:rgba(0,0,0,.5);text-decoration:line-through}",
8534
8554
  map: undefined,
8535
8555
  media: undefined
@@ -8538,7 +8558,7 @@ var __vue_inject_styles__$d = function __vue_inject_styles__(inject) {
8538
8558
  /* scoped */
8539
8559
  var __vue_scope_id__$d = undefined;
8540
8560
  /* module identifier */
8541
- var __vue_module_identifier__$d = "data-v-14e512bc";
8561
+ var __vue_module_identifier__$d = "data-v-00e864df";
8542
8562
  /* functional template */
8543
8563
  var __vue_is_functional_template__$d = false;
8544
8564
  /* style inject shadow dom */
@@ -9253,10 +9273,10 @@ var LinkPreview = __vue_component__$e;var script$8 = {
9253
9273
  if (REACTION) {
9254
9274
  var hexa = REACTION.split("u").slice(1).map(function (code) {
9255
9275
  return "&#x".concat(code, ";");
9256
- }).join('');
9276
+ }).join("");
9257
9277
  var finalEmoji = REACTION.split("u").slice(1).map(function (code) {
9258
9278
  return String.fromCodePoint(parseInt(code, 16));
9259
- }).join('');
9279
+ }).join("");
9260
9280
  this.messageReaction = {
9261
9281
  hexa: hexa,
9262
9282
  finalEmoji: finalEmoji
@@ -9272,12 +9292,12 @@ var LinkPreview = __vue_component__$e;var script$8 = {
9272
9292
  finalEmoji: emoji.finalEmoji
9273
9293
  };
9274
9294
  this.isEmojisOpen = false;
9275
- var ckEditorContext = document.querySelector('.ck-editor');
9295
+ var ckEditorContext = document.querySelector(".ck-editor");
9276
9296
  if (ckEditorContext) {
9277
9297
  this.$emit("insert-emoji", {
9278
9298
  finalEmoji: emoji.finalEmoji,
9279
9299
  hexa: emoji.hexa,
9280
- editorType: 'ckeditor'
9300
+ editorType: "ckeditor"
9281
9301
  });
9282
9302
  } else {
9283
9303
  this.$emit("insert-emoji", emoji);
@@ -9513,7 +9533,7 @@ var __vue_render__$8 = function __vue_render__() {
9513
9533
  }
9514
9534
  }) : _vm._e(), _vm._v("\n " + _vm._s(_vm.defaultReplyMessage ? _vm.defaultReplyMessage : _vm.dictionary.mensagem_reply_padrao) + "\n ")], 1)]) : _vm._e(), _vm._v(" "), _vm.anexos && _vm.anexos.length ? _vm._l(_vm.anexos, function (anexo, index) {
9515
9535
  return _c('div', {
9516
- key: index + "_" + _vm.transcriptionLoading,
9536
+ key: anexo.mku || index,
9517
9537
  staticClass: "mensagem-anexo"
9518
9538
  }, [_c('AnexoMensagem', {
9519
9539
  attrs: {
@@ -9934,7 +9954,7 @@ var __vue_inject_styles__$8 = undefined;
9934
9954
  /* scoped */
9935
9955
  var __vue_scope_id__$8 = undefined;
9936
9956
  /* module identifier */
9937
- var __vue_module_identifier__$8 = "data-v-663b80d0";
9957
+ var __vue_module_identifier__$8 = "data-v-7fcf61b8";
9938
9958
  /* functional template */
9939
9959
  var __vue_is_functional_template__$8 = false;
9940
9960
  /* style inject */
@@ -21354,6 +21374,7 @@ __vue_component__$4.install = install$1;var script$1 = {
21354
21374
  data: function data() {
21355
21375
  return {
21356
21376
  isOpen: this.iniciarAberto,
21377
+ pdfReady: false,
21357
21378
  openMessage: false,
21358
21379
  actionsOpen: false,
21359
21380
  showInfos: false,
@@ -21779,9 +21800,16 @@ __vue_component__$4.install = install$1;var script$1 = {
21779
21800
  return Object.keys(customParams).length ? customParams : defaultParams;
21780
21801
  },
21781
21802
  generatePdf: function generatePdf() {
21782
- if (this.$refs.html2pdf) {
21783
- this.$refs.html2pdf.generatePdf();
21784
- }
21803
+ var _this0 = this;
21804
+ // Monta o layout de PDF sob demanda. O slot do vue-html2pdf fica sempre
21805
+ // no DOM real, entao manter o html (potencialmente enorme) via v-html
21806
+ // montado de inicio travava a tela. So renderiza ao clicar para baixar.
21807
+ this.pdfReady = true;
21808
+ this.$nextTick(function () {
21809
+ if (_this0.$refs.html2pdf) {
21810
+ _this0.$refs.html2pdf.generatePdf();
21811
+ }
21812
+ });
21785
21813
  },
21786
21814
  formatPdfRecipients: function formatPdfRecipients(recipients) {
21787
21815
  if (!recipients || !recipients.length) return '--';
@@ -22126,7 +22154,7 @@ var __vue_render__$1 = function __vue_render__() {
22126
22154
  attrs: {
22127
22155
  "icon": ['fas', 'times']
22128
22156
  }
22129
- })], 1) : _vm._e()]), _vm._ssrNode(" "), _c('vue-html2pdf', {
22157
+ })], 1) : _vm._e()]), _vm._ssrNode(" "), _vm.pdfReady ? _c('vue-html2pdf', {
22130
22158
  key: _vm.htmlToPdfOptions.filename,
22131
22159
  ref: "html2pdf",
22132
22160
  attrs: {
@@ -22165,7 +22193,7 @@ var __vue_render__$1 = function __vue_render__() {
22165
22193
  return _c('li', {
22166
22194
  key: index
22167
22195
  }, [_vm._v("\n " + _vm._s(anexo.name || "Anexo " + (index + 1)) + "\n ")]);
22168
- }), 0)]) : _vm._e()])])])], 2);
22196
+ }), 0)]) : _vm._e()])])]) : _vm._e()], 2);
22169
22197
  };
22170
22198
  var __vue_staticRenderFns__$1 = [];
22171
22199
 
@@ -22174,7 +22202,7 @@ var __vue_inject_styles__$1 = undefined;
22174
22202
  /* scoped */
22175
22203
  var __vue_scope_id__$1 = undefined;
22176
22204
  /* module identifier */
22177
- var __vue_module_identifier__$1 = "data-v-7dfcbd78";
22205
+ var __vue_module_identifier__$1 = "data-v-49a701b0";
22178
22206
  /* functional template */
22179
22207
  var __vue_is_functional_template__$1 = false;
22180
22208
  /* style inject */
package/package.json CHANGED
@@ -1,61 +1,61 @@
1
- {
2
- "name": "vue-intergrall-plugins",
3
- "version": "1.2.0",
4
- "description": "",
5
- "main": "dist/vue-intergrall-plugins.ssr.js",
6
- "browser": "dist/vue-intergrall-plugins.esm.js",
7
- "module": "dist/vue-intergrall-plugins.esm.js",
8
- "unpkg": "dist/vue-intergrall-plugins.min.js",
9
- "files": [
10
- "dist/*",
11
- "src/**/*.vue"
12
- ],
13
- "sideEffects": false,
14
- "scripts": {
15
- "serve": "vue-cli-service serve dev/serve.js",
16
- "prebuild": "rimraf ./dist",
17
- "build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js",
18
- "build:ssr": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs",
19
- "build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es",
20
- "build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife"
21
- },
22
- "devDependencies": {
23
- "@babel/preset-env": "^7.15.6",
24
- "@rollup/plugin-alias": "^3.1.2",
25
- "@rollup/plugin-babel": "^5.3.0",
26
- "@rollup/plugin-commonjs": "^14.0.0",
27
- "@rollup/plugin-json": "^4.1.0",
28
- "@rollup/plugin-node-resolve": "^9.0.0",
29
- "@rollup/plugin-replace": "^2.4.2",
30
- "@vue/cli-service": "^4.5.13",
31
- "autoprefixer": "^10.4.14",
32
- "cross-env": "^7.0.3",
33
- "cssnano": "^5.1.15",
34
- "minimist": "^1.2.5",
35
- "rimraf": "^3.0.2",
36
- "rollup": "^2.58.0",
37
- "rollup-plugin-postcss": "^4.0.2",
38
- "rollup-plugin-terser": "^7.0.2",
39
- "rollup-plugin-vue": "^5.1.9",
40
- "vue": "^2.6.14"
41
- },
42
- "peerDependencies": {
43
- "@fortawesome/fontawesome-free": "^5.15.4",
44
- "@fortawesome/fontawesome-svg-core": "^1.2.36",
45
- "@fortawesome/free-solid-svg-icons": "^5.15.4",
46
- "@fortawesome/vue-fontawesome": "^2.0.2",
47
- "@popperjs/core": "^2.11.2",
48
- "core-js": "^3.18.1",
49
- "vue": "^2.6.14",
50
- "vue-select": "^3.13.0",
51
- "vue-tippy": "^4.12.0",
52
- "vue-toasted": "^1.1.28",
53
- "vue2-google-maps": "^0.10.7"
54
- },
55
- "engines": {
56
- "node": ">=12"
57
- },
58
- "dependencies": {
59
- "vue-html2pdf": "^1.8.0"
60
- }
61
- }
1
+ {
2
+ "name": "vue-intergrall-plugins",
3
+ "version": "1.2.19",
4
+ "description": "",
5
+ "main": "dist/vue-intergrall-plugins.ssr.js",
6
+ "browser": "dist/vue-intergrall-plugins.esm.js",
7
+ "module": "dist/vue-intergrall-plugins.esm.js",
8
+ "unpkg": "dist/vue-intergrall-plugins.min.js",
9
+ "files": [
10
+ "dist/*",
11
+ "src/**/*.vue"
12
+ ],
13
+ "sideEffects": false,
14
+ "scripts": {
15
+ "serve": "vue-cli-service serve dev/serve.js",
16
+ "prebuild": "rimraf ./dist",
17
+ "build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js",
18
+ "build:ssr": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs",
19
+ "build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es",
20
+ "build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife"
21
+ },
22
+ "devDependencies": {
23
+ "@babel/preset-env": "^7.15.6",
24
+ "@rollup/plugin-alias": "^3.1.2",
25
+ "@rollup/plugin-babel": "^5.3.0",
26
+ "@rollup/plugin-commonjs": "^14.0.0",
27
+ "@rollup/plugin-json": "^4.1.0",
28
+ "@rollup/plugin-node-resolve": "^9.0.0",
29
+ "@rollup/plugin-replace": "^2.4.2",
30
+ "@vue/cli-service": "^4.5.13",
31
+ "autoprefixer": "^10.4.14",
32
+ "cross-env": "^7.0.3",
33
+ "cssnano": "^5.1.15",
34
+ "minimist": "^1.2.5",
35
+ "rimraf": "^3.0.2",
36
+ "rollup": "^2.58.0",
37
+ "rollup-plugin-postcss": "^4.0.2",
38
+ "rollup-plugin-terser": "^7.0.2",
39
+ "rollup-plugin-vue": "^5.1.9",
40
+ "vue": "^2.6.14"
41
+ },
42
+ "peerDependencies": {
43
+ "@fortawesome/fontawesome-free": "^5.15.4",
44
+ "@fortawesome/fontawesome-svg-core": "^1.2.36",
45
+ "@fortawesome/free-solid-svg-icons": "^5.15.4",
46
+ "@fortawesome/vue-fontawesome": "^2.0.2",
47
+ "@popperjs/core": "^2.11.2",
48
+ "core-js": "^3.18.1",
49
+ "vue": "^2.6.14",
50
+ "vue-select": "^3.13.0",
51
+ "vue-tippy": "^4.12.0",
52
+ "vue-toasted": "^1.1.28",
53
+ "vue2-google-maps": "^0.10.7"
54
+ },
55
+ "engines": {
56
+ "node": ">=12"
57
+ },
58
+ "dependencies": {
59
+ "vue-html2pdf": "^1.8.0"
60
+ }
61
+ }
@@ -222,6 +222,7 @@
222
222
  <!-- Status de mensagem deletada -->
223
223
  </transition>
224
224
  <vue-html2pdf
225
+ v-if="pdfReady"
225
226
  :show-layout="false"
226
227
  :enable-download="true"
227
228
  :preview-modal="false"
@@ -411,6 +412,7 @@ export default {
411
412
  data() {
412
413
  return {
413
414
  isOpen: this.iniciarAberto,
415
+ pdfReady: false,
414
416
  openMessage: false,
415
417
  actionsOpen: false,
416
418
  showInfos: false,
@@ -841,9 +843,15 @@ export default {
841
843
  return Object.keys(customParams).length ? customParams : defaultParams;
842
844
  },
843
845
  generatePdf() {
844
- if (this.$refs.html2pdf) {
845
- this.$refs.html2pdf.generatePdf();
846
- }
846
+ // Monta o layout de PDF sob demanda. O slot do vue-html2pdf fica sempre
847
+ // no DOM real, entao manter o html (potencialmente enorme) via v-html
848
+ // montado de inicio travava a tela. So renderiza ao clicar para baixar.
849
+ this.pdfReady = true;
850
+ this.$nextTick(() => {
851
+ if (this.$refs.html2pdf) {
852
+ this.$refs.html2pdf.generatePdf();
853
+ }
854
+ });
847
855
  },
848
856
  formatPdfRecipients(recipients) {
849
857
  if (!recipients || !recipients.length) return '--';
@@ -1,70 +1,137 @@
1
1
  <template>
2
2
  <div class="mensagem-div-anexo">
3
3
  <div class="anexo-mensagem">
4
- <span v-if="fileAccessError" class="default-doc file-unavailable"
5
- :title="dictionary.arquivo_indisponivel || 'Arquivo indisponível ou foi removido'">
4
+ <span
5
+ v-if="fileAccessError"
6
+ class="default-doc file-unavailable"
7
+ :title="
8
+ dictionary.arquivo_indisponivel ||
9
+ 'Arquivo indisponível ou foi removido'
10
+ "
11
+ >
6
12
  <fa-icon :icon="['fas', 'exclamation-triangle']" />
7
- <p>{{ filename || dictionary.arquivo_sem_nome || 'Arquivo sem nome' }}</p>
13
+ <p>
14
+ {{ filename || dictionary.arquivo_sem_nome || "Arquivo sem nome" }}
15
+ </p>
8
16
  </span>
9
17
 
10
18
  <template v-else>
11
- <img v-if="imageURL" @click="showImage(imageURL)" :src="imageURL" :alt="dictionary.alt_msg_img" />
19
+ <img
20
+ v-if="imageURL"
21
+ @click="showImage(imageURL)"
22
+ :src="imageURL"
23
+ :alt="dictionary.alt_msg_img"
24
+ />
12
25
  <div class="divAudioPai" v-else-if="audio">
13
26
  <audio ref="audioPlayer" class="audioStyle" controls="controls">
14
27
  <source :src="docURL" :type="fileType" />
15
28
  Sem suporte para o elemento audio
16
29
  </audio>
17
- <audio-speed-control @change-speed="changeAudioSpeed"></audio-speed-control>
30
+ <audio-speed-control
31
+ @change-speed="changeAudioSpeed"
32
+ ></audio-speed-control>
18
33
  </div>
19
34
 
20
35
  <video v-else-if="video" controls="controls">
21
36
  <source :src="docURL" :type="fileType" />
22
37
  Sem suporte para o elemento video
23
38
  </video>
24
- <span v-else-if="docURL" @click="openWindowFromURL(docURL)" class="default-doc">
39
+ <span
40
+ v-else-if="docURL"
41
+ @click="openWindowFromURL(docURL)"
42
+ class="default-doc"
43
+ >
25
44
  <fa-icon :class="[iconClass]" :icon="icon" />
26
45
  <p v-text="filename" :title="filename"></p>
27
46
  </span>
28
47
  <span v-else class="default-doc">
29
- <fa-icon :class="[iconClass ? iconClass : '']" :icon="['fas', 'file-alt']" />
48
+ <fa-icon
49
+ :class="[iconClass ? iconClass : '']"
50
+ :icon="['fas', 'file-alt']"
51
+ />
30
52
  <p v-text="filename" :title="filename"></p>
31
53
  </span>
32
54
 
33
55
  <!-- Transcricao -->
34
- <div v-if="audio && hasTranscription" class="transcription-controls" @click="emitTranscription">
35
- {{ dictionary.transcricaoControl || 'Transcrever' }}
56
+ <div
57
+ v-if="audio && hasTranscription"
58
+ class="transcription-controls"
59
+ @click="emitTranscription"
60
+ >
61
+ {{ dictionary.transcricaoControl || "Transcrever" }}
36
62
  </div>
37
63
  <div v-if="audio && transcriptionText" class="transcription-container">
38
64
  <div class="transcription-header">
39
- <p v-if="!hideTranscription" v-text="`${dictionary.transcricaoLabel ? `${dictionary.transcricaoLabel}:` : ''}`"></p>
40
- <button @click="toggleHideTranscription" class="transcription-button">
41
- <fa-icon :icon="['fas', `caret-${hideTranscription ? 'down' : 'up'}`]" />
42
- </button>
65
+ <p
66
+ v-if="!hideTranscription"
67
+ v-text="
68
+ `${
69
+ dictionary.transcricaoLabel
70
+ ? `${dictionary.transcricaoLabel}:`
71
+ : ''
72
+ }`
73
+ "
74
+ ></p>
75
+ <button
76
+ @click="toggleHideTranscription"
77
+ class="transcription-button"
78
+ >
79
+ <fa-icon
80
+ :icon="['fas', `caret-${hideTranscription ? 'down' : 'up'}`]"
81
+ />
82
+ </button>
43
83
  </div>
44
- <div v-if="transcriptionLoading" class="transcription-loader">
45
- <VueLoader />
46
- </div>
47
- <p v-else-if="!hideTranscription" class="transcription-text">{{ transcriptionText }}</p>
84
+ <div v-if="transcriptionLoading" class="transcription-loader">
85
+ <VueLoader />
86
+ </div>
87
+ <p v-else-if="!hideTranscription" class="transcription-text">
88
+ {{ transcriptionText }}
89
+ </p>
48
90
  </div>
49
91
 
50
92
  <!-- Acoes -->
51
93
  <div v-if="showControlFiles" class="file-actions">
52
- <span v-if="imageURL" lass="file-action-button" @click="showImage(imageURL)">
53
- <fa-icon :icon="['fas', 'search-plus']" v-tippy :content="`${dictionary.titulo_visualizar_img}`" />
94
+ <span
95
+ v-if="imageURL"
96
+ lass="file-action-button"
97
+ @click="showImage(imageURL)"
98
+ >
99
+ <fa-icon
100
+ :icon="['fas', 'search-plus']"
101
+ v-tippy
102
+ :content="`${dictionary.titulo_visualizar_img}`"
103
+ />
54
104
  </span>
55
- <span v-if="docURL" @click="openWindowFromURL(docURL)" v-tippy :content="`Visualizar anexo`"
56
- class="file-action-button">
105
+ <span
106
+ v-if="docURL"
107
+ @click="openWindowFromURL(docURL)"
108
+ v-tippy
109
+ :content="`Visualizar anexo`"
110
+ class="file-action-button"
111
+ >
57
112
  <fa-icon :icon="['fas', 'search-plus']" />
58
113
  </span>
59
- <a v-if="imageURL || docURL" :href="imageURL ? imageURL : docURL" :download="`${filename}`" target="_blank"
60
- rel="noreferrer noopener" v-tippy :content="`Fazer o download do anexo`" class="file-action-button">
114
+ <a
115
+ v-if="imageURL || docURL"
116
+ :href="imageURL ? imageURL : docURL"
117
+ :download="`${filename}`"
118
+ target="_blank"
119
+ rel="noreferrer noopener"
120
+ v-tippy
121
+ :content="`Fazer o download do anexo`"
122
+ class="file-action-button"
123
+ >
61
124
  <fa-icon :icon="['fas', 'download']" />
62
125
  </a>
63
126
  <template v-if="imageURL || docURL">
64
127
  <tippy interactive theme="light" trigger="click">
65
128
  <template v-slot:trigger>
66
- <span class="file-action-button" ref="download-multiple-trigger" v-tippy
67
- :content="`Fazer o download de todos anexos da conversa`">
129
+ <span
130
+ class="file-action-button"
131
+ ref="download-multiple-trigger"
132
+ v-tippy
133
+ :content="`Fazer o download de todos anexos da conversa`"
134
+ >
68
135
  <fa-icon :icon="['fas', 'download']" />
69
136
  <fa-icon :icon="['fas', 'download']" />
70
137
  <fa-icon :icon="['fas', 'download']" />
@@ -73,8 +140,13 @@
73
140
 
74
141
  <div class="tippy-confirmation">
75
142
  <p>Deseja fazer download de todos anexos da tela?</p>
76
- <button class="cancel box-shadow" @click="closeTippy">Cancelar</button>
77
- <button class="confirm box-shadow" @click="downloadAllFilesHandler(referenceSelector)">
143
+ <button class="cancel box-shadow" @click="closeTippy">
144
+ Cancelar
145
+ </button>
146
+ <button
147
+ class="confirm box-shadow"
148
+ @click="downloadAllFilesHandler(referenceSelector)"
149
+ >
78
150
  Confirmar
79
151
  </button>
80
152
  </div>
@@ -154,8 +226,8 @@
154
226
  0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
155
227
  -moz-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
156
228
  0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
157
- box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
158
- 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
229
+ box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
230
+ 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
159
231
  }
160
232
 
161
233
  .tippy-confirmation p {
@@ -213,21 +285,40 @@ export default {
213
285
  showControlFiles: { type: Boolean },
214
286
  hasTranscription: { type: Boolean, default: false },
215
287
  transcriptionText: { type: String, default: "" },
216
- transcriptionLoading: { type: Boolean, default: false }
288
+ transcriptionLoading: { type: Boolean, default: false },
217
289
  },
218
290
  data() {
219
291
  return {
220
292
  imgErro: false,
221
293
  imgMsgErro: "",
222
294
  fileAccessError: false,
295
+ hideTranscription: false,
223
296
  };
224
297
  },
298
+ watch: {
299
+ anexo(newAnexo) {
300
+ this.fileAccessError = false;
301
+ this.imgErro = false;
302
+ this.imgMsgErro = "";
303
+ if (this.validarAnexo()) {
304
+ this.setFileVars(newAnexo, { dominio: this.dominio });
305
+ this.$nextTick(() => {
306
+ const hasValidFile =
307
+ this.imageURL || this.docURL || this.audio || this.video;
308
+ if (!hasValidFile) {
309
+ this.fileAccessError = true;
310
+ }
311
+ });
312
+ }
313
+ },
314
+ },
225
315
  mounted() {
226
316
  if (this.validarAnexo()) {
227
317
  this.setFileVars(this.anexo, { dominio: this.dominio });
228
-
318
+
229
319
  this.$nextTick(() => {
230
- const hasValidFile = this.imageURL || this.docURL || this.audio || this.video;
320
+ const hasValidFile =
321
+ this.imageURL || this.docURL || this.audio || this.video;
231
322
  if (!hasValidFile) {
232
323
  this.fileAccessError = true;
233
324
  }