vue-intergrall-plugins 0.0.246 → 0.0.249
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.
- package/dist/vue-intergrall-plugins.esm.js +141 -94
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +100 -117
- package/package.json +1 -1
- package/src/lib-components/Messages/AnexoMensagem.vue +110 -40
- package/src/lib-components/Messages/ChatMessages.vue +9 -2
|
@@ -10142,7 +10142,9 @@ var __vue_component__$n = __vue_component__$m;var textoLongo = {
|
|
|
10142
10142
|
case "mp3":
|
|
10143
10143
|
case "audio/mp3":
|
|
10144
10144
|
case "aac":
|
|
10145
|
-
|
|
10145
|
+
case "audio/mpeg":
|
|
10146
|
+
case "mpeg":
|
|
10147
|
+
tipoDoc = type.startsWith("audio/") ? type : "audio/".concat(type);
|
|
10146
10148
|
docAnexo = "".concat(dominio, "/callcenter/docs.php?mku=").concat(mku);
|
|
10147
10149
|
nomeArquivo = name;
|
|
10148
10150
|
audio = true;
|
|
@@ -10152,7 +10154,7 @@ var __vue_component__$n = __vue_component__$m;var textoLongo = {
|
|
|
10152
10154
|
case "video":
|
|
10153
10155
|
case "mp4":
|
|
10154
10156
|
case "m4v":
|
|
10155
|
-
tipoDoc = type;
|
|
10157
|
+
tipoDoc = type.startsWith("video/") ? type : "video/".concat(type);
|
|
10156
10158
|
docAnexo = "".concat(dominio, "/callcenter/docs.php?mku=").concat(mku);
|
|
10157
10159
|
nomeArquivo = name;
|
|
10158
10160
|
video = true;
|
|
@@ -10261,6 +10263,40 @@ var __vue_component__$n = __vue_component__$m;var textoLongo = {
|
|
|
10261
10263
|
},
|
|
10262
10264
|
setIcon: function setIcon() {
|
|
10263
10265
|
this.icon = this.fileType === "pdf" ? ['fas', 'file-pdf'] : ['fas', 'file-alt'];
|
|
10266
|
+
},
|
|
10267
|
+
downloadAllFilesHandler: function downloadAllFilesHandler() {
|
|
10268
|
+
try {
|
|
10269
|
+
if (!this.$root.$refs.chatMessages || !this.$root.$refs.chatMessages.referenceSelector) return this.$emit("download-all");
|
|
10270
|
+
var container = document.querySelector("".concat(this.$root.$refs.chatMessages.referenceSelector));
|
|
10271
|
+
if (!container) return this.$emit("download-all");
|
|
10272
|
+
var currentFilesToDownload = container.querySelectorAll("a[download]");
|
|
10273
|
+
if (!currentFilesToDownload.length) return this.$emit("download-all", {
|
|
10274
|
+
status: 'erro',
|
|
10275
|
+
message: 'Sem anexos para fazer o download'
|
|
10276
|
+
});
|
|
10277
|
+
var index = 0;
|
|
10278
|
+
|
|
10279
|
+
var handleInterval = function handleInterval() {
|
|
10280
|
+
if (index > currentFilesToDownload.length) return false;
|
|
10281
|
+
currentFilesToDownload[index] && currentFilesToDownload[index].click();
|
|
10282
|
+
index += 1;
|
|
10283
|
+
return true;
|
|
10284
|
+
};
|
|
10285
|
+
|
|
10286
|
+
var interval = setInterval(function () {
|
|
10287
|
+
var handler = handleInterval();
|
|
10288
|
+
|
|
10289
|
+
if (!handler) {
|
|
10290
|
+
clearInterval(interval);
|
|
10291
|
+
interval = 0;
|
|
10292
|
+
}
|
|
10293
|
+
}, 300);
|
|
10294
|
+
} catch (error) {
|
|
10295
|
+
console.error("Erro ao fazer o donwload de todos anexos");
|
|
10296
|
+
this.$toasted.global.defaultError({
|
|
10297
|
+
msg: error.message ? error.message : error
|
|
10298
|
+
});
|
|
10299
|
+
}
|
|
10264
10300
|
}
|
|
10265
10301
|
}
|
|
10266
10302
|
};//
|
|
@@ -11467,144 +11503,83 @@ var __vue_render__$8 = function __vue_render__() {
|
|
|
11467
11503
|
|
|
11468
11504
|
return _c('div', {
|
|
11469
11505
|
staticClass: "mensagem-div-anexo"
|
|
11470
|
-
}, [_c('
|
|
11471
|
-
|
|
11506
|
+
}, [_vm._ssrNode("<div class=\"anexo-mensagem\" data-v-9dd05594>", "</div>", [_vm.imageURL ? _vm._ssrNode("<img" + _vm._ssrAttr("src", _vm.imageURL) + _vm._ssrAttr("alt", _vm.dictionary.alt_msg_img) + " data-v-9dd05594>", "</img>") : _vm.audio ? _vm._ssrNode("<audio controls=\"controls\" data-v-9dd05594><source" + _vm._ssrAttr("src", _vm.docURL) + _vm._ssrAttr("type", _vm.fileType) + " data-v-9dd05594>\n Sem suporte para o elemento audio\n </audio>") : _vm.video ? _vm._ssrNode("<video controls=\"controls\" data-v-9dd05594><source" + _vm._ssrAttr("src", _vm.docURL) + _vm._ssrAttr("type", _vm.fileType) + " data-v-9dd05594>\n Sem suporte para o elemento video\n </video>") : _vm.docURL ? _vm._ssrNode("<a" + _vm._ssrAttr("href", _vm.docURL) + " target=\"_blank\" rel=\"noreferrer noopener\" class=\"default-doc\" data-v-9dd05594>", "</a>", [_c('fa-icon', {
|
|
11507
|
+
class: [_vm.iconClass],
|
|
11472
11508
|
attrs: {
|
|
11473
|
-
"
|
|
11474
|
-
"mode": "out-in"
|
|
11509
|
+
"icon": _vm.icon
|
|
11475
11510
|
}
|
|
11476
|
-
},
|
|
11511
|
+
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.filename) + " data-v-9dd05594>" + _vm._ssrEscape(_vm._s(_vm.filename)) + "</p>")], 2) : _vm._ssrNode("<span class=\"default-doc\" data-v-9dd05594>", "</span>", [_c('fa-icon', {
|
|
11512
|
+
class: [_vm.iconClass ? _vm.iconClass : ''],
|
|
11513
|
+
attrs: {
|
|
11514
|
+
"icon": ['fas', 'file-alt']
|
|
11515
|
+
}
|
|
11516
|
+
}), _vm._ssrNode(" <p" + _vm._ssrAttr("title", _vm.filename) + " data-v-9dd05594>" + _vm._ssrEscape(_vm._s(_vm.filename)) + "</p>")], 2), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"file-actions\" data-v-9dd05594>", "</div>", [_vm.imageURL ? _vm._ssrNode("<span class=\"file-action-button\" data-v-9dd05594>", "</span>", [_c('fa-icon', {
|
|
11477
11517
|
directives: [{
|
|
11478
11518
|
name: "tippy",
|
|
11479
11519
|
rawName: "v-tippy"
|
|
11480
11520
|
}],
|
|
11481
|
-
key: "error-msg",
|
|
11482
|
-
attrs: {
|
|
11483
|
-
"content": _vm.imgMsgErro
|
|
11484
|
-
}
|
|
11485
|
-
}, [_c('div', {
|
|
11486
|
-
staticClass: "alert alert-danger",
|
|
11487
|
-
attrs: {
|
|
11488
|
-
"role": "alert"
|
|
11489
|
-
}
|
|
11490
|
-
}, [_c('fa-icon', {
|
|
11491
|
-
attrs: {
|
|
11492
|
-
"icon": ['fas', 'file-image']
|
|
11493
|
-
}
|
|
11494
|
-
}), _vm._v("\n " + _vm._s(_vm.dictionary.img_com_erro) + "\n ")], 1)]) : _vm._e(), _vm._v(" "), _vm.isLoading ? _c('Loader', {
|
|
11495
|
-
key: "anexo-loader",
|
|
11496
|
-
attrs: {
|
|
11497
|
-
"small": true,
|
|
11498
|
-
"slow": true
|
|
11499
|
-
}
|
|
11500
|
-
}) : _c('div', {
|
|
11501
|
-
key: "anexo-mensagem",
|
|
11502
|
-
staticClass: "anexo-mensagem"
|
|
11503
|
-
}, [_vm.imageURL ? _c('img', {
|
|
11504
|
-
attrs: {
|
|
11505
|
-
"src": _vm.imageURL,
|
|
11506
|
-
"alt": _vm.dictionary.alt_msg_img
|
|
11507
|
-
},
|
|
11508
|
-
on: {
|
|
11509
|
-
"click": function click($event) {
|
|
11510
|
-
return _vm.showImage(_vm.imageURL);
|
|
11511
|
-
}
|
|
11512
|
-
}
|
|
11513
|
-
}) : _vm._e(), _vm._v(" "), _vm.imageURL ? _c('div', {
|
|
11514
|
-
staticClass: "anexos-links-container"
|
|
11515
|
-
}, [_c('a', {
|
|
11516
|
-
attrs: {
|
|
11517
|
-
"href": "#"
|
|
11518
|
-
},
|
|
11519
|
-
on: {
|
|
11520
|
-
"click": function click($event) {
|
|
11521
|
-
$event.preventDefault();
|
|
11522
|
-
return _vm.showImage(_vm.imageURL);
|
|
11523
|
-
}
|
|
11524
|
-
}
|
|
11525
|
-
}, [_vm._v(" " + _vm._s(_vm.dictionary.titulo_visualizar_img) + " ")]), _vm._v(" "), _c('fa-icon', {
|
|
11526
|
-
attrs: {
|
|
11527
|
-
"icon": ['fas', 'search-plus']
|
|
11528
|
-
},
|
|
11529
|
-
on: {
|
|
11530
|
-
"click": function click($event) {
|
|
11531
|
-
return _vm.showImage(_vm.imageURL);
|
|
11532
|
-
}
|
|
11533
|
-
}
|
|
11534
|
-
})], 1) : _vm.docURL ? _c('div', {
|
|
11535
|
-
staticClass: "anexo-container"
|
|
11536
|
-
}, [_vm.audio || _vm.video ? [_vm.audio ? _c('audio', {
|
|
11537
11521
|
attrs: {
|
|
11538
|
-
"
|
|
11539
|
-
"
|
|
11540
|
-
"title": _vm.fileType + " - " + _vm.filename
|
|
11522
|
+
"icon": ['fas', 'search-plus'],
|
|
11523
|
+
"content": "" + _vm.dictionary.titulo_visualizar_img
|
|
11541
11524
|
}
|
|
11542
|
-
},
|
|
11525
|
+
})], 1) : _vm._e(), _vm._ssrNode(" "), _vm.docURL ? _c('a', {
|
|
11526
|
+
directives: [{
|
|
11527
|
+
name: "tippy",
|
|
11528
|
+
rawName: "v-tippy"
|
|
11529
|
+
}],
|
|
11530
|
+
staticClass: "file-action-button",
|
|
11543
11531
|
attrs: {
|
|
11544
11532
|
"href": _vm.docURL,
|
|
11545
11533
|
"target": "_blank",
|
|
11546
|
-
"rel": "noreferrer noopener"
|
|
11547
|
-
|
|
11548
|
-
}, [_vm._v(" " + _vm._s(_vm.dictionary.msg_abrir_audio) + " ")])])]) : _vm._e(), _vm._v(" "), _vm.video ? _c('video', {
|
|
11549
|
-
attrs: {
|
|
11550
|
-
"src": _vm.docURL,
|
|
11551
|
-
"controls": "",
|
|
11552
|
-
"title": _vm.fileType + " - " + _vm.filename
|
|
11534
|
+
"rel": "noreferrer noopener",
|
|
11535
|
+
"content": "Visualizar anexo"
|
|
11553
11536
|
}
|
|
11554
|
-
}, [_c('
|
|
11537
|
+
}, [_c('fa-icon', {
|
|
11555
11538
|
attrs: {
|
|
11556
|
-
"
|
|
11557
|
-
"target": "_blank",
|
|
11558
|
-
"rel": "noreferrer noopener"
|
|
11539
|
+
"icon": ['fas', 'search-plus']
|
|
11559
11540
|
}
|
|
11560
|
-
},
|
|
11541
|
+
})], 1) : _vm._e(), _vm._ssrNode(" "), _vm.imageURL || _vm.docURL ? _c('a', {
|
|
11542
|
+
directives: [{
|
|
11543
|
+
name: "tippy",
|
|
11544
|
+
rawName: "v-tippy"
|
|
11545
|
+
}],
|
|
11546
|
+
staticClass: "file-action-button",
|
|
11561
11547
|
attrs: {
|
|
11562
|
-
"href": _vm.docURL,
|
|
11548
|
+
"href": _vm.imageURL ? _vm.imageURL : _vm.docURL,
|
|
11549
|
+
"download": "" + _vm.filename,
|
|
11563
11550
|
"target": "_blank",
|
|
11564
11551
|
"rel": "noreferrer noopener",
|
|
11565
|
-
"
|
|
11552
|
+
"content": "Fazer o download do anexo"
|
|
11566
11553
|
}
|
|
11567
11554
|
}, [_c('fa-icon', {
|
|
11568
|
-
class: [_vm.iconClass],
|
|
11569
11555
|
attrs: {
|
|
11570
|
-
"icon":
|
|
11571
|
-
}
|
|
11572
|
-
}), _vm._v(" "), _c('p', {
|
|
11573
|
-
domProps: {
|
|
11574
|
-
"textContent": _vm._s(_vm.filename)
|
|
11556
|
+
"icon": ['fas', 'download']
|
|
11575
11557
|
}
|
|
11576
|
-
})], 1) : _c('
|
|
11577
|
-
|
|
11558
|
+
})], 1) : _vm._e(), _vm._ssrNode(" "), _c('span', {
|
|
11559
|
+
directives: [{
|
|
11560
|
+
name: "tippy",
|
|
11561
|
+
rawName: "v-tippy"
|
|
11562
|
+
}],
|
|
11563
|
+
staticClass: "file-action-button",
|
|
11578
11564
|
attrs: {
|
|
11579
|
-
"
|
|
11565
|
+
"content": "Fazer download de todos anexos da tela"
|
|
11566
|
+
},
|
|
11567
|
+
on: {
|
|
11568
|
+
"click": _vm.downloadAllFilesHandler
|
|
11580
11569
|
}
|
|
11581
11570
|
}, [_c('fa-icon', {
|
|
11582
|
-
attrs: {
|
|
11583
|
-
"icon": ['fas', 'file-alt']
|
|
11584
|
-
}
|
|
11585
|
-
}), _vm._v("\n " + _vm._s(_vm.filename) + "\n ")], 1)]], 2) : _vm._e(), _vm._v(" "), _vm.imageURL ? _c('a', {
|
|
11586
|
-
attrs: {
|
|
11587
|
-
"href": _vm.imageURL,
|
|
11588
|
-
"download": "" + _vm.filename,
|
|
11589
|
-
"target": "_blank",
|
|
11590
|
-
"rel": "noreferrer noopener"
|
|
11591
|
-
}
|
|
11592
|
-
}, [_vm._v(" " + _vm._s(_vm.dictionary.titulo_baixar_img) + " "), _c('fa-icon', {
|
|
11593
11571
|
attrs: {
|
|
11594
11572
|
"icon": ['fas', 'download']
|
|
11595
11573
|
}
|
|
11596
|
-
})
|
|
11574
|
+
}), _vm._ssrNode(" "), _c('fa-icon', {
|
|
11597
11575
|
attrs: {
|
|
11598
|
-
"
|
|
11599
|
-
"download": "" + _vm.filename,
|
|
11600
|
-
"target": "_blank",
|
|
11601
|
-
"rel": "noreferrer noopener"
|
|
11576
|
+
"icon": ['fas', 'download']
|
|
11602
11577
|
}
|
|
11603
|
-
},
|
|
11578
|
+
}), _vm._ssrNode(" "), _c('fa-icon', {
|
|
11604
11579
|
attrs: {
|
|
11605
11580
|
"icon": ['fas', 'download']
|
|
11606
11581
|
}
|
|
11607
|
-
})],
|
|
11582
|
+
})], 2)], 2)], 2)]);
|
|
11608
11583
|
};
|
|
11609
11584
|
|
|
11610
11585
|
var __vue_staticRenderFns__$8 = [];
|
|
@@ -11612,8 +11587,8 @@ var __vue_staticRenderFns__$8 = [];
|
|
|
11612
11587
|
|
|
11613
11588
|
var __vue_inject_styles__$8 = function __vue_inject_styles__(inject) {
|
|
11614
11589
|
if (!inject) return;
|
|
11615
|
-
inject("data-v-
|
|
11616
|
-
source: ".fade-enter-active[data-v-
|
|
11590
|
+
inject("data-v-9dd05594_0", {
|
|
11591
|
+
source: ".mensagem__principal .default-doc[data-v-9dd05594]{background-color:var(--files-bg)}.mensagem__outros .default-doc[data-v-9dd05594]{background-color:rgba(100,100,100,.1)}.default-doc[data-v-9dd05594]{display:flex;align-items:center;padding:10px;border-radius:5px;width:100%;max-width:100%}.default-doc svg[data-v-9dd05594]{font-size:1.2rem;margin-right:5px}.default-doc p[data-v-9dd05594]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-actions[data-v-9dd05594]{display:flex;justify-content:flex-end;width:100%;padding:5px}.file-actions a[data-v-9dd05594]{margin-right:0}.mensagem__principal .file-action-button[data-v-9dd05594]{background-color:var(--files-bg)}.mensagem__outros .file-action-button[data-v-9dd05594]{background-color:rgba(100,100,100,.1)}.mensagem__principal .file-action-button[data-v-9dd05594]:hover{background-color:var(--files-bg-hover)}.mensagem__outros .file-action-button[data-v-9dd05594]:hover{background-color:rgba(100,100,100,.3)}.file-action-button[data-v-9dd05594]{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[data-v-9dd05594]{margin:0}.fade-enter-active[data-v-9dd05594],.fade-leave-active[data-v-9dd05594]{transition:opacity .5s}.fade-enter[data-v-9dd05594],.fade-leave-to[data-v-9dd05594]{opacity:0}.mensagem-div-anexo[data-v-9dd05594]{width:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;overflow:hidden}.anexo-container[data-v-9dd05594]{width:100%;margin-top:5px;overflow:hidden;display:flex;max-height:300px}.anexo-container .arquivo-erro[data-v-9dd05594],.anexo-container a[data-v-9dd05594]{padding:10px 15px 15px 15px;display:flex;justify-content:center;align-items:center}.anexo-container p[data-v-9dd05594]{text-overflow:ellipsis;overflow:hidden}.anexo-container .arquivo-erro[data-v-9dd05594],.anexo-container p[data-v-9dd05594]{margin:0;margin-left:15px;font-size:.9rem}.anexo-container svg[data-v-9dd05594]{font-size:2rem}.anexo-mensagem audio[data-v-9dd05594]{outline:0;width:100%;margin-bottom:5px}.anexo-mensagem video[data-v-9dd05594]{flex:1;width:100%;max-width:350px;cursor:pointer;margin-bottom:5px}.anexos-links-container[data-v-9dd05594]{width:100%;display:flex;justify-content:center;align-items:center}.anexos-links-container a[data-v-9dd05594]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-right:5px;font-weight:550;color:inherit;text-decoration:none}.anexos-links-container svg[data-v-9dd05594]{cursor:pointer}.mensagem-div-anexo img[data-v-9dd05594]{cursor:pointer;margin:10px 0;min-width:35px;width:100%;max-width:250px}.anexo-transition[data-v-9dd05594]{width:100%;height:100%}.anexo-mensagem[data-v-9dd05594]{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%}.alert-danger[data-v-9dd05594]{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert[data-v-9dd05594]{position:relative;padding:.65rem 1.2rem;margin:5px 0;border:1px solid transparent;border-radius:.25rem;text-align:center}.alert svg[data-v-9dd05594]{font-size:1.025em;margin-right:2px}.pdf[data-v-9dd05594]{color:#e74c3c}.doc[data-v-9dd05594]{color:#006bc9}",
|
|
11617
11592
|
map: undefined,
|
|
11618
11593
|
media: undefined
|
|
11619
11594
|
});
|
|
@@ -11621,10 +11596,10 @@ var __vue_inject_styles__$8 = function __vue_inject_styles__(inject) {
|
|
|
11621
11596
|
/* scoped */
|
|
11622
11597
|
|
|
11623
11598
|
|
|
11624
|
-
var __vue_scope_id__$8 = "data-v-
|
|
11599
|
+
var __vue_scope_id__$8 = "data-v-9dd05594";
|
|
11625
11600
|
/* module identifier */
|
|
11626
11601
|
|
|
11627
|
-
var __vue_module_identifier__$8 = "data-v-
|
|
11602
|
+
var __vue_module_identifier__$8 = "data-v-9dd05594";
|
|
11628
11603
|
/* functional template */
|
|
11629
11604
|
|
|
11630
11605
|
var __vue_is_functional_template__$8 = false;
|
|
@@ -11937,7 +11912,10 @@ var script$5 = {
|
|
|
11937
11912
|
InteratividadeFormulario: InteratividadeFormulario,
|
|
11938
11913
|
LinkPreview: LinkPreview
|
|
11939
11914
|
},
|
|
11940
|
-
props: ["smartchannel", "messageIndex", "dictionary", "autor", "origem", "msg", "link", "anexo", "imgAnexo", "tipoDoc", "docAnexo", "nomeArquivo", "audio", "video", "horario", "status", "logo", "msgTooltip", "seq", "mapa", "histMsg", "erro", "msgErro", "origemExterna", "anexos", "dominio", "corMsg", "interatividade", "msgReply", "hasReply", "iniDialogo", "dialogoId", "dialogoOrigem", "expSessao"],
|
|
11915
|
+
props: ["smartchannel", "messageIndex", "dictionary", "autor", "origem", "msg", "link", "anexo", "imgAnexo", "tipoDoc", "docAnexo", "nomeArquivo", "audio", "video", "horario", "status", "logo", "msgTooltip", "seq", "mapa", "histMsg", "erro", "msgErro", "origemExterna", "anexos", "dominio", "corMsg", "interatividade", "msgReply", "hasReply", "iniDialogo", "dialogoId", "dialogoOrigem", "expSessao", "referenceSelector"],
|
|
11916
|
+
created: function created() {
|
|
11917
|
+
if (!this.$root.$refs.chatMessages) this.$root.$refs.chatMessages = this;
|
|
11918
|
+
},
|
|
11941
11919
|
data: function data() {
|
|
11942
11920
|
return {
|
|
11943
11921
|
strTooltipAux: "",
|
|
@@ -12147,6 +12125,8 @@ var script$5 = {
|
|
|
12147
12125
|
h = Math.round(360 * h);
|
|
12148
12126
|
var root = document.documentElement;
|
|
12149
12127
|
root.style.setProperty('--text-color', l <= 50 ? "#FFF" : "#111B21");
|
|
12128
|
+
root.style.setProperty('--files-bg', l <= 50 ? "rgba(255, 255, 255, 0.1)" : "rgba(100, 100, 100, 0.1)");
|
|
12129
|
+
root.style.setProperty('--files-bg-hover', l <= 50 ? "rgba(255, 255, 255, 0.3)" : "rgba(100, 100, 100, 0.3)");
|
|
12150
12130
|
} catch (e) {
|
|
12151
12131
|
console.error("Erro ao ajustar a cor da mensagem: ", e);
|
|
12152
12132
|
}
|
|
@@ -12200,7 +12180,10 @@ var __vue_render__$5 = function __vue_render__() {
|
|
|
12200
12180
|
"dominio": _vm.dominio
|
|
12201
12181
|
},
|
|
12202
12182
|
on: {
|
|
12203
|
-
"abrir-imagem": _vm.abrirImagem
|
|
12183
|
+
"abrir-imagem": _vm.abrirImagem,
|
|
12184
|
+
"download-all": function downloadAll($event) {
|
|
12185
|
+
return _vm.$emit('download-all');
|
|
12186
|
+
}
|
|
12204
12187
|
}
|
|
12205
12188
|
})], 1);
|
|
12206
12189
|
}) : _vm._e(), _vm._v(" "), _vm.urlSticker ? _c('img', {
|
|
@@ -12445,8 +12428,8 @@ var __vue_staticRenderFns__$5 = [];
|
|
|
12445
12428
|
|
|
12446
12429
|
var __vue_inject_styles__$5 = function __vue_inject_styles__(inject) {
|
|
12447
12430
|
if (!inject) return;
|
|
12448
|
-
inject("data-v-
|
|
12449
|
-
source: ":root{--message-color:#373737;--text-color:#FFF;--light:80;--threshold:60}.fade-enter-active,.fade-leave-active{transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}.mensagem{padding:14px 7px;border-radius:5px;min-width:150px;min-height:60px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;max-width:80%;margin-bottom:10px;font-size:.75rem;word-break:break-word;-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)}.mensagem.max-w-60{max-width:60%}.mensagem.mapa{width:100%}.mensagem.hist-msg{animation:show 1s}.mensagem a{margin-right:5px;font-weight:550;color:inherit;text-decoration:none}.mensagem a:hover{text-decoration:underline}.message p{white-space:pre-wrap}.mensagem-anexo a,.mensagem-div-mapa a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.reply{cursor:pointer;position:absolute;right:53px;bottom:5px;font-size:.6rem;color:#67a332;width:.9rem;height:.9rem;display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:#fff}.reply svg{margin-top:-1px;margin-right:-1px}.reply-with-2-icons{right:30px}.check{cursor:pointer;position:absolute;right:10px;bottom:2px;font-size:.7rem}.check.visualizado,.check.visualizado svg{color:#006daa}.check.verde,.check.verde svg{color:#4f772d}.check.vermelho,.check.vermelho svg{color:#ba181b}.check.cinza,.check.cinza svg{color:#999}.check.preto,.check.preto svg{color:#666}.star{cursor:pointer;position:absolute;right:30px;bottom:2px;font-size:.4rem;width:11.2px}.default-stick-size{width:180px;height:auto}.horario-envio{margin-right:15px;font-size:.7rem;position:absolute;left:10px;bottom:2px}.autor-mensagem{position:absolute;font-size:.6rem;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:90%;font-weight:700;top:2px}.mensagem__principal{width:100%;display:flex;justify-content:flex-end}.mensagem__principal>.mensagem::after{content:\"\";width:0;height:0;position:absolute;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid var(--message-color);bottom:5px;right:-10px;transform:rotate(-90deg)}.mensagem__principal>.mensagem{background-color:var(--message-color);color:var(--text-color)}.mensagem__principal>.mensagem .horario-envio{color:var(--text-color)}.mensagem__principal>.mensagem .autor-mensagem{right:5px;color:var(--text-color)}.mensagem__outros{width:100%;display:flex}.mensagem__outros>.mensagem{background-color:#fff;color:#333}.mensagem__outros>.mensagem::after{content:\"\";width:0;height:0;position:absolute;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #fff;bottom:5px;left:-10px;transform:rotate(90deg)}.mensagem__outros>.autor-mensagem{left:5px;color:#333}.mensagem-div-mapa{width:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;margin-bottom:5px}.msg-mapa{width:100%;min-height:225px;height:100%;box-sizing:initial}.msg-mapa img{max-width:none!important}.info-mapa{list-style-type:none}.info-mapa li.title{font-size:.85em}.info-mapa li.address,.info-mapa li.url{font-size:.85em}.info-mapa li.url{font-size:.85em}.tooltip-list{margin:0;padding:0;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}",
|
|
12431
|
+
inject("data-v-8292b8c8_0", {
|
|
12432
|
+
source: ":root{--message-color:#373737;--text-color:#FFF;--files-bg:rgba(255, 255, 255, 0.1);--files-bg-hover:rgba(255, 255, 255, 0.1);--light:80;--threshold:60}.fade-enter-active,.fade-leave-active{transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}.mensagem{padding:14px 7px;border-radius:5px;min-width:150px;min-height:60px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;max-width:80%;margin-bottom:10px;font-size:.75rem;word-break:break-word;-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)}.mensagem.max-w-60{max-width:60%}.mensagem.mapa{width:100%}.mensagem.hist-msg{animation:show 1s}.mensagem a{margin-right:5px;font-weight:550;color:inherit;text-decoration:none}.mensagem a:hover{text-decoration:underline}.message p{white-space:pre-wrap}.mensagem-anexo a,.mensagem-div-mapa a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.reply{cursor:pointer;position:absolute;right:53px;bottom:5px;font-size:.6rem;color:#67a332;width:.9rem;height:.9rem;display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:#fff}.reply svg{margin-top:-1px;margin-right:-1px}.reply-with-2-icons{right:30px}.check{cursor:pointer;position:absolute;right:10px;bottom:2px;font-size:.7rem}.check.visualizado,.check.visualizado svg{color:#006daa}.check.verde,.check.verde svg{color:#4f772d}.check.vermelho,.check.vermelho svg{color:#ba181b}.check.cinza,.check.cinza svg{color:#999}.check.preto,.check.preto svg{color:#666}.star{cursor:pointer;position:absolute;right:30px;bottom:2px;font-size:.4rem;width:11.2px}.default-stick-size{width:180px;height:auto}.horario-envio{margin-right:15px;font-size:.7rem;position:absolute;left:10px;bottom:2px}.autor-mensagem{position:absolute;font-size:.6rem;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:90%;font-weight:700;top:2px}.mensagem__principal{width:100%;display:flex;justify-content:flex-end}.mensagem__principal>.mensagem::after{content:\"\";width:0;height:0;position:absolute;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid var(--message-color);bottom:5px;right:-10px;transform:rotate(-90deg)}.mensagem__principal>.mensagem{background-color:var(--message-color);color:var(--text-color)}.mensagem__principal>.mensagem .horario-envio{color:var(--text-color)}.mensagem__principal>.mensagem .autor-mensagem{right:5px;color:var(--text-color)}.mensagem__outros{width:100%;display:flex}.mensagem__outros>.mensagem{background-color:#fff;color:#333}.mensagem__outros>.mensagem::after{content:\"\";width:0;height:0;position:absolute;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #fff;bottom:5px;left:-10px;transform:rotate(90deg)}.mensagem__outros>.autor-mensagem{left:5px;color:#333}.mensagem-div-mapa{width:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;margin-bottom:5px}.msg-mapa{width:100%;min-height:225px;height:100%;box-sizing:initial}.msg-mapa img{max-width:none!important}.info-mapa{list-style-type:none}.info-mapa li.title{font-size:.85em}.info-mapa li.address,.info-mapa li.url{font-size:.85em}.info-mapa li.url{font-size:.85em}.tooltip-list{margin:0;padding:0;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}",
|
|
12450
12433
|
map: undefined,
|
|
12451
12434
|
media: undefined
|
|
12452
12435
|
});
|
|
@@ -12457,7 +12440,7 @@ var __vue_inject_styles__$5 = function __vue_inject_styles__(inject) {
|
|
|
12457
12440
|
var __vue_scope_id__$5 = undefined;
|
|
12458
12441
|
/* module identifier */
|
|
12459
12442
|
|
|
12460
|
-
var __vue_module_identifier__$5 = "data-v-
|
|
12443
|
+
var __vue_module_identifier__$5 = "data-v-8292b8c8";
|
|
12461
12444
|
/* functional template */
|
|
12462
12445
|
|
|
12463
12446
|
var __vue_is_functional_template__$5 = false;
|
package/package.json
CHANGED
|
@@ -1,43 +1,41 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="mensagem-div-anexo">
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
<div class="anexo-mensagem">
|
|
4
|
+
<img v-if="imageURL" @click="showImage(imageURL)" :src="imageURL" :alt="dictionary.alt_msg_img">
|
|
5
|
+
<audio v-else-if="audio" controls>
|
|
6
|
+
<source :src="docURL" :type="fileType" />
|
|
7
|
+
Sem suporte para o elemento audio
|
|
8
|
+
</audio>
|
|
9
|
+
<video v-else-if="video" controls>
|
|
10
|
+
<source :src="docURL" :type="fileType" />
|
|
11
|
+
Sem suporte para o elemento video
|
|
12
|
+
</video>
|
|
13
|
+
<a v-else-if="docURL" :href="docURL" target="_blank" rel="noreferrer noopener" class="default-doc">
|
|
14
|
+
<fa-icon :class="[iconClass]" :icon="icon" />
|
|
15
|
+
<p v-text="filename" :title="filename"></p>
|
|
16
|
+
</a>
|
|
17
|
+
<span v-else class="default-doc">
|
|
18
|
+
<fa-icon :class="[iconClass ? iconClass : '']" :icon="['fas', 'file-alt']" />
|
|
19
|
+
<p v-text="filename" :title="filename"></p>
|
|
20
|
+
</span>
|
|
21
|
+
<!-- Acoes -->
|
|
22
|
+
<div class="file-actions">
|
|
23
|
+
<span v-if="imageURL" class="file-action-button" @click="showImage(imageURL)">
|
|
24
|
+
<fa-icon :icon="['fas', 'search-plus']" v-tippy :content="`${dictionary.titulo_visualizar_img}`" />
|
|
25
|
+
</span>
|
|
26
|
+
<a v-if="docURL" :href="docURL" target="_blank" rel="noreferrer noopener" v-tippy :content="`Visualizar anexo`" class="file-action-button">
|
|
27
|
+
<fa-icon :icon="['fas', 'search-plus']" />
|
|
28
|
+
</a>
|
|
29
|
+
<a v-if="imageURL || docURL" :href="imageURL ? imageURL : docURL" :download="`${filename}`" target="_blank" rel="noreferrer noopener" v-tippy :content="`Fazer o download do anexo`" class="file-action-button">
|
|
30
|
+
<fa-icon :icon="['fas', 'download']" />
|
|
31
|
+
</a>
|
|
32
|
+
<span class="file-action-button" v-tippy :content="`Fazer download de todos anexos da tela`" @click="downloadAllFilesHandler">
|
|
33
|
+
<fa-icon :icon="['fas', 'download']" />
|
|
34
|
+
<fa-icon :icon="['fas', 'download']" />
|
|
35
|
+
<fa-icon :icon="['fas', 'download']" />
|
|
36
|
+
</span>
|
|
9
37
|
</div>
|
|
10
|
-
|
|
11
|
-
<div v-else key="anexo-mensagem" class="anexo-mensagem">
|
|
12
|
-
<img v-if="imageURL" @click="showImage(imageURL)" :src="imageURL" :alt="dictionary.alt_msg_img">
|
|
13
|
-
<div class="anexos-links-container" v-if="imageURL">
|
|
14
|
-
<a href="#" @click.prevent="showImage(imageURL)"> {{ dictionary.titulo_visualizar_img }} </a>
|
|
15
|
-
<fa-icon :icon="['fas', 'search-plus']" @click="showImage(imageURL)" />
|
|
16
|
-
</div>
|
|
17
|
-
<div v-else-if="docURL" class="anexo-container">
|
|
18
|
-
<template v-if="audio || video">
|
|
19
|
-
<audio v-if="audio" :src="docURL" controls :title="`${fileType} - ${filename}`">
|
|
20
|
-
<p> {{ dictionary.msg_erro_audio }} <a :href="docURL" target="_blank" rel="noreferrer noopener"> {{ dictionary.msg_abrir_audio }} </a> </p>
|
|
21
|
-
</audio>
|
|
22
|
-
<video v-if="video" :src="docURL" controls :title="`${fileType} - ${filename}`">
|
|
23
|
-
<p> {{ dictionary.msg_erro_video }} <a v-if="fileType != 'erro'" :href="docURL" target="_blank" rel="noreferrer noopener"> {{ dictionary.msg_abrir_video }} </a> </p>
|
|
24
|
-
</video>
|
|
25
|
-
</template>
|
|
26
|
-
<template v-else>
|
|
27
|
-
<a v-if="fileType != 'erro'" :href="docURL" target="_blank" rel="noreferrer noopener" :title="`${fileType} - ${filename}`">
|
|
28
|
-
<fa-icon :class="[iconClass]" :icon="icon" />
|
|
29
|
-
<p v-text="filename"></p>
|
|
30
|
-
</a>
|
|
31
|
-
<p v-else :title="`${fileType} - ${filename}`" class="arquivo-erro">
|
|
32
|
-
<fa-icon :icon="['fas', 'file-alt']" />
|
|
33
|
-
{{ filename }}
|
|
34
|
-
</p>
|
|
35
|
-
</template>
|
|
36
|
-
</div>
|
|
37
|
-
<a v-if="imageURL" :href="imageURL" :download="`${filename}`" target="_blank" rel="noreferrer noopener"> {{ dictionary.titulo_baixar_img }} <fa-icon :icon="['fas', 'download']" /> </a>
|
|
38
|
-
<a v-if="docURL" :href="docURL" :download="`${filename}`" target="_blank" rel="noreferrer noopener"> {{ dictionary.titulo_baixar_doc }} <fa-icon :icon="['fas', 'download']" /> </a>
|
|
39
|
-
</div>
|
|
40
|
-
</transition-group>
|
|
38
|
+
</div>
|
|
41
39
|
</div>
|
|
42
40
|
</template>
|
|
43
41
|
|
|
@@ -105,6 +103,73 @@ export default {
|
|
|
105
103
|
</script>
|
|
106
104
|
|
|
107
105
|
<style scoped>
|
|
106
|
+
.mensagem__principal .default-doc {
|
|
107
|
+
background-color: var(--files-bg);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.mensagem__outros .default-doc {
|
|
111
|
+
background-color: rgba(100, 100, 100, 0.1);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.default-doc {
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
padding: 10px;
|
|
118
|
+
border-radius: 5px;
|
|
119
|
+
width: 100%;
|
|
120
|
+
max-width: 100%;
|
|
121
|
+
}
|
|
122
|
+
.default-doc svg {
|
|
123
|
+
font-size: 1.2rem;
|
|
124
|
+
margin-right: 5px;
|
|
125
|
+
}
|
|
126
|
+
.default-doc p {
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
text-overflow: ellipsis;
|
|
129
|
+
white-space: nowrap;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.file-actions {
|
|
133
|
+
display: flex;
|
|
134
|
+
justify-content: flex-end;
|
|
135
|
+
width: 100%;
|
|
136
|
+
padding: 5px;
|
|
137
|
+
}
|
|
138
|
+
.file-actions a {
|
|
139
|
+
margin-right: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.mensagem__principal .file-action-button {
|
|
143
|
+
background-color: var(--files-bg);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.mensagem__outros .file-action-button {
|
|
147
|
+
background-color: rgba(100, 100, 100, 0.1);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.mensagem__principal .file-action-button:hover {
|
|
151
|
+
background-color: var(--files-bg-hover);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.mensagem__outros .file-action-button:hover {
|
|
155
|
+
background-color: rgba(100, 100, 100, 0.3);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.file-action-button {
|
|
159
|
+
display: flex;
|
|
160
|
+
justify-content: center;
|
|
161
|
+
align-items: center;
|
|
162
|
+
margin-left: 12px;
|
|
163
|
+
cursor: pointer;
|
|
164
|
+
padding: 5px;
|
|
165
|
+
border-radius: 5px;
|
|
166
|
+
transition: background-color 150ms ease-in-out;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.file-action-button a {
|
|
170
|
+
margin: 0
|
|
171
|
+
}
|
|
172
|
+
|
|
108
173
|
.fade-enter-active, .fade-leave-active {
|
|
109
174
|
transition: opacity .5s;
|
|
110
175
|
}
|
|
@@ -145,15 +210,19 @@ export default {
|
|
|
145
210
|
.anexo-container svg{
|
|
146
211
|
font-size: 2rem;
|
|
147
212
|
}
|
|
148
|
-
|
|
213
|
+
|
|
214
|
+
.anexo-mensagem audio{
|
|
149
215
|
outline: none;
|
|
150
216
|
width: 100%;
|
|
217
|
+
margin-bottom: 5px;
|
|
151
218
|
}
|
|
152
|
-
|
|
219
|
+
|
|
220
|
+
.anexo-mensagem video{
|
|
153
221
|
flex: 1;
|
|
154
222
|
width: 100%;
|
|
155
223
|
max-width: 350px;
|
|
156
224
|
cursor: pointer;
|
|
225
|
+
margin-bottom: 5px;
|
|
157
226
|
}
|
|
158
227
|
|
|
159
228
|
.anexos-links-container{
|
|
@@ -193,6 +262,7 @@ export default {
|
|
|
193
262
|
justify-content: center;
|
|
194
263
|
align-items: center;
|
|
195
264
|
flex-direction: column;
|
|
265
|
+
width: 100%;
|
|
196
266
|
}
|
|
197
267
|
|
|
198
268
|
.alert-danger {
|
|
@@ -222,4 +292,4 @@ export default {
|
|
|
222
292
|
.doc {
|
|
223
293
|
color: #006bc9
|
|
224
294
|
}
|
|
225
|
-
</style>
|
|
295
|
+
</style>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<div v-else class="mensagem" :class="{mapa, 'hist-msg' : histMsg, 'max-w-60' : link && !mapa}">
|
|
12
12
|
<template v-if="anexos && anexos.length">
|
|
13
13
|
<div class="mensagem-anexo" v-for="(anexo, index) in anexos" :key="index">
|
|
14
|
-
<AnexoMensagem :dictionary="dictionary" :anexo="anexo" :origemExterna="origemExterna" :dominio="dominio" @abrir-imagem="abrirImagem"/>
|
|
14
|
+
<AnexoMensagem :dictionary="dictionary" :anexo="anexo" :origemExterna="origemExterna" :dominio="dominio" @abrir-imagem="abrirImagem" @download-all="$emit('download-all')"/>
|
|
15
15
|
</div>
|
|
16
16
|
</template>
|
|
17
17
|
<img class="default-stick-size" v-if="urlSticker" :src="urlSticker" :title="urlFileName">
|
|
@@ -78,7 +78,10 @@ import LinkPreview from './LinkPreview'
|
|
|
78
78
|
|
|
79
79
|
export default {
|
|
80
80
|
components: { AnexoMensagem, InteratividadeBotoes, InteratividadeFormulario, LinkPreview },
|
|
81
|
-
props: ["smartchannel", "messageIndex", "dictionary", "autor", "origem", "msg", "link", "anexo", "imgAnexo", "tipoDoc", "docAnexo", "nomeArquivo", "audio", "video", "horario", "status", "logo", "msgTooltip", "seq", "mapa", "histMsg", "erro", "msgErro", "origemExterna", "anexos", "dominio", "corMsg", "interatividade", "msgReply", "hasReply", "iniDialogo", "dialogoId", "dialogoOrigem", "expSessao"],
|
|
81
|
+
props: ["smartchannel", "messageIndex", "dictionary", "autor", "origem", "msg", "link", "anexo", "imgAnexo", "tipoDoc", "docAnexo", "nomeArquivo", "audio", "video", "horario", "status", "logo", "msgTooltip", "seq", "mapa", "histMsg", "erro", "msgErro", "origemExterna", "anexos", "dominio", "corMsg", "interatividade", "msgReply", "hasReply", "iniDialogo", "dialogoId", "dialogoOrigem", "expSessao", "referenceSelector"],
|
|
82
|
+
created() {
|
|
83
|
+
if(!this.$root.$refs.chatMessages) this.$root.$refs.chatMessages = this
|
|
84
|
+
},
|
|
82
85
|
data(){
|
|
83
86
|
return{
|
|
84
87
|
strTooltipAux: "",
|
|
@@ -263,6 +266,8 @@ export default {
|
|
|
263
266
|
|
|
264
267
|
const root = document.documentElement
|
|
265
268
|
root.style.setProperty('--text-color', l <= 50 ? "#FFF" : "#111B21")
|
|
269
|
+
root.style.setProperty('--files-bg', l <= 50 ? "rgba(255, 255, 255, 0.1)" : "rgba(100, 100, 100, 0.1)")
|
|
270
|
+
root.style.setProperty('--files-bg-hover', l <= 50 ? "rgba(255, 255, 255, 0.3)" : "rgba(100, 100, 100, 0.3)")
|
|
266
271
|
}catch(e) {
|
|
267
272
|
console.error("Erro ao ajustar a cor da mensagem: ", e)
|
|
268
273
|
}
|
|
@@ -280,6 +285,8 @@ export default {
|
|
|
280
285
|
:root {
|
|
281
286
|
--message-color: #373737;
|
|
282
287
|
--text-color: #FFF;
|
|
288
|
+
--files-bg: rgba(255, 255, 255, 0.1);
|
|
289
|
+
--files-bg-hover: rgba(255, 255, 255, 0.1);
|
|
283
290
|
|
|
284
291
|
--light: 80;
|
|
285
292
|
--threshold: 60;
|