vue-intergrall-plugins 0.0.141 → 0.0.145
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.
|
@@ -6518,11 +6518,15 @@ var script$3 = {
|
|
|
6518
6518
|
AnexoMensagem: AnexoMensagem,
|
|
6519
6519
|
InteratividadeBotoes: InteratividadeBotoes
|
|
6520
6520
|
},
|
|
6521
|
-
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"],
|
|
6521
|
+
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"],
|
|
6522
6522
|
data: function data() {
|
|
6523
6523
|
return {
|
|
6524
6524
|
strTooltipAux: "",
|
|
6525
6525
|
linkAux: "",
|
|
6526
|
+
urlSticker: "",
|
|
6527
|
+
urlFileName: "",
|
|
6528
|
+
message: "",
|
|
6529
|
+
reply: "reply",
|
|
6526
6530
|
center: {},
|
|
6527
6531
|
marker: {},
|
|
6528
6532
|
infos: [],
|
|
@@ -6562,13 +6566,63 @@ var script$3 = {
|
|
|
6562
6566
|
set: function set(msg) {
|
|
6563
6567
|
return this.contentTooltip = msg;
|
|
6564
6568
|
}
|
|
6569
|
+
},
|
|
6570
|
+
contentTooltipStar: function contentTooltipStar() {
|
|
6571
|
+
var tooltipStar = "";
|
|
6572
|
+
|
|
6573
|
+
if (this.iniDialogo == 1) {
|
|
6574
|
+
tooltipStar += this.dictionary['ini_sessao'] + "<br/>";
|
|
6575
|
+
tooltipStar += this.dictionary['id_conversa'] + " - " + this.dialogoId + "<br/>";
|
|
6576
|
+
tooltipStar += this.dictionary['origem_conversa'] + " - " + this.dialogoOrigem + "<br/>";
|
|
6577
|
+
tooltipStar += this.dictionary['expiracao_sessao'] + " - " + formataTimezoneData(this.expSessao) + "<br/>";
|
|
6578
|
+
return tooltipStar;
|
|
6579
|
+
}
|
|
6580
|
+
|
|
6581
|
+
return tooltipStar;
|
|
6565
6582
|
}
|
|
6566
6583
|
},
|
|
6567
6584
|
mounted: function mounted() {
|
|
6568
6585
|
if (this.mapa) this.setMap();
|
|
6569
6586
|
if (this.corMsg) this.setCorMsg();
|
|
6587
|
+
this.setClasses();
|
|
6588
|
+
this.validadeUrlToMsg();
|
|
6570
6589
|
},
|
|
6571
6590
|
methods: {
|
|
6591
|
+
validadeUrlToMsg: function validadeUrlToMsg() {
|
|
6592
|
+
this.message = this.msg;
|
|
6593
|
+
|
|
6594
|
+
if (this.validadeIfExistsSticker()) {
|
|
6595
|
+
this.urlSticker = this.getUrlSticker();
|
|
6596
|
+
this.urlFileName = this.getUrlFileName();
|
|
6597
|
+
this.message = this.removeUrlStickerByString(this.urlSticker);
|
|
6598
|
+
}
|
|
6599
|
+
},
|
|
6600
|
+
getUrlFileName: function getUrlFileName() {
|
|
6601
|
+
var urlRegex = /(?<=\/)[^\/\?#]+(?=[^\/]*$)/;
|
|
6602
|
+
var urlName = this.urlSticker.match(urlRegex)[0];
|
|
6603
|
+
return urlName;
|
|
6604
|
+
},
|
|
6605
|
+
removeUrlStickerByString: function removeUrlStickerByString(url) {
|
|
6606
|
+
var msg = this.message.replace("STICKER ".concat(url), '');
|
|
6607
|
+
return msg;
|
|
6608
|
+
},
|
|
6609
|
+
getUrlSticker: function getUrlSticker() {
|
|
6610
|
+
var urlRegex = /(https?:\/\/[^ ]*)/;
|
|
6611
|
+
var url = this.message.match(urlRegex)[1];
|
|
6612
|
+
return url;
|
|
6613
|
+
},
|
|
6614
|
+
validadeIfExistsSticker: function validadeIfExistsSticker() {
|
|
6615
|
+
if (this.message && this.message.indexOf("STICKER https://smarters") === 0) {
|
|
6616
|
+
return true;
|
|
6617
|
+
}
|
|
6618
|
+
|
|
6619
|
+
return false;
|
|
6620
|
+
},
|
|
6621
|
+
setClasses: function setClasses() {
|
|
6622
|
+
if (this.hasReply && (this.status == "C" || this.status == "T") && this.iniDialogo == 0) {
|
|
6623
|
+
this.reply = "reply reply-with-2-icons";
|
|
6624
|
+
}
|
|
6625
|
+
},
|
|
6572
6626
|
setCorMsg: function setCorMsg() {
|
|
6573
6627
|
try {
|
|
6574
6628
|
var root = document.documentElement;
|
|
@@ -6645,7 +6699,7 @@ var __vue_render__$3 = function __vue_render__() {
|
|
|
6645
6699
|
"abrir-imagem": _vm.abrirImagem
|
|
6646
6700
|
}
|
|
6647
6701
|
})], 1);
|
|
6648
|
-
}) : _vm._e(), _vm._ssrNode(" "), _vm.mapa ? _vm._ssrNode("<div class=\"mensagem-div-mapa\">", "</div>", [_c('GmapMap', {
|
|
6702
|
+
}) : _vm._e(), _vm._ssrNode(" " + (_vm.urlSticker ? "<img" + _vm._ssrAttr("src", _vm.urlSticker) + _vm._ssrAttr("title", _vm.urlFileName) + " class=\"default-stick-size\">" : "<!---->") + " "), _vm.mapa ? _vm._ssrNode("<div class=\"mensagem-div-mapa\">", "</div>", [_c('GmapMap', {
|
|
6649
6703
|
staticClass: "msg-mapa",
|
|
6650
6704
|
attrs: {
|
|
6651
6705
|
"id": "mapa_" + _vm.seq,
|
|
@@ -6663,7 +6717,7 @@ var __vue_render__$3 = function __vue_render__() {
|
|
|
6663
6717
|
"icon": ['fas', 'map-marker-alt']
|
|
6664
6718
|
}
|
|
6665
6719
|
})], 2)], 2);
|
|
6666
|
-
}), 0) : _vm._e()], 2) : _vm._e(), _vm._ssrNode(" <p>" + _vm._s(_vm.formatMsg(_vm.
|
|
6720
|
+
}), 0) : _vm._e()], 2) : _vm._e(), _vm._ssrNode(" <p>" + _vm._s(_vm.formatMsg(_vm.message)) + "</p> "), _vm.interatividade ? _c('InteratividadeBotoes', {
|
|
6667
6721
|
attrs: {
|
|
6668
6722
|
"interatividade": _vm.interatividade
|
|
6669
6723
|
}
|
|
@@ -6677,7 +6731,7 @@ var __vue_render__$3 = function __vue_render__() {
|
|
|
6677
6731
|
name: "tippy",
|
|
6678
6732
|
rawName: "v-tippy"
|
|
6679
6733
|
}],
|
|
6680
|
-
|
|
6734
|
+
class: _vm.reply,
|
|
6681
6735
|
attrs: {
|
|
6682
6736
|
"content": _vm.msgReply ? _vm.msgReply : 'Fazer reenvio da mensagem'
|
|
6683
6737
|
},
|
|
@@ -6695,6 +6749,25 @@ var __vue_render__$3 = function __vue_render__() {
|
|
|
6695
6749
|
"name": "fade",
|
|
6696
6750
|
"mode": "out-in"
|
|
6697
6751
|
}
|
|
6752
|
+
}, [_vm.iniDialogo == 1 ? _c('span', {
|
|
6753
|
+
directives: [{
|
|
6754
|
+
name: "tippy",
|
|
6755
|
+
rawName: "v-tippy"
|
|
6756
|
+
}],
|
|
6757
|
+
key: "star-padrao",
|
|
6758
|
+
staticClass: "star dourado",
|
|
6759
|
+
attrs: {
|
|
6760
|
+
"content": _vm.contentTooltipStar
|
|
6761
|
+
}
|
|
6762
|
+
}, [_c('fa-icon', {
|
|
6763
|
+
attrs: {
|
|
6764
|
+
"icon": ['fas', 'star']
|
|
6765
|
+
}
|
|
6766
|
+
})], 1) : _vm._e()]), _vm._ssrNode(" "), _c('transition', {
|
|
6767
|
+
attrs: {
|
|
6768
|
+
"name": "fade",
|
|
6769
|
+
"mode": "out-in"
|
|
6770
|
+
}
|
|
6698
6771
|
}, [_vm.status == 'D' ? _c('span', {
|
|
6699
6772
|
directives: [{
|
|
6700
6773
|
name: "tippy",
|
|
@@ -6801,8 +6874,8 @@ var __vue_staticRenderFns__$3 = [];
|
|
|
6801
6874
|
|
|
6802
6875
|
var __vue_inject_styles__$3 = function __vue_inject_styles__(inject) {
|
|
6803
6876
|
if (!inject) return;
|
|
6804
|
-
inject("data-v-
|
|
6805
|
-
source: ":root{--message-color:#373737}.fade-enter-active,.fade-leave-active{transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}.mensagem{padding:14px 7px;border-radius:2.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:.85rem;word-break:break-word}.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:
|
|
6877
|
+
inject("data-v-12c3ee62_0", {
|
|
6878
|
+
source: ":root{--message-color:#373737}.fade-enter-active,.fade-leave-active{transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}.mensagem{padding:14px 7px;border-radius:2.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:.85rem;word-break:break-word}.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:3px;font-size:.7rem}.star.dourado svg{color:gold}.default-stick-size{width:250px;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:#fff}.mensagem__principal>.mensagem .horario-envio{color:#fff}.mensagem__principal>.mensagem .autor-mensagem{right:5px;color:#fff}.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 .check{display:none}.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:.7em}.info-mapa li.url{font-size:.7em}.tooltip-list{margin:0;padding:0;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}",
|
|
6806
6879
|
map: undefined,
|
|
6807
6880
|
media: undefined
|
|
6808
6881
|
});
|
|
@@ -6813,7 +6886,7 @@ var __vue_inject_styles__$3 = function __vue_inject_styles__(inject) {
|
|
|
6813
6886
|
var __vue_scope_id__$3 = undefined;
|
|
6814
6887
|
/* module identifier */
|
|
6815
6888
|
|
|
6816
|
-
var __vue_module_identifier__$3 = "data-v-
|
|
6889
|
+
var __vue_module_identifier__$3 = "data-v-12c3ee62";
|
|
6817
6890
|
/* functional template */
|
|
6818
6891
|
|
|
6819
6892
|
var __vue_is_functional_template__$3 = false;
|
package/package.json
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vue-intergrall-plugins",
|
|
3
|
-
"version": "0.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
|
-
"dependencies": {},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@babel/core": "^7.15.5",
|
|
25
|
-
"@babel/preset-env": "^7.15.6",
|
|
26
|
-
"@rollup/plugin-alias": "^3.1.2",
|
|
27
|
-
"@rollup/plugin-babel": "^5.3.0",
|
|
28
|
-
"@rollup/plugin-commonjs": "^14.0.0",
|
|
29
|
-
"@rollup/plugin-json": "^4.1.0",
|
|
30
|
-
"@rollup/plugin-node-resolve": "^9.0.0",
|
|
31
|
-
"@rollup/plugin-replace": "^2.4.2",
|
|
32
|
-
"@vue/cli-plugin-babel": "^4.5.13",
|
|
33
|
-
"@vue/cli-service": "^4.5.13",
|
|
34
|
-
"autoprefixer": "^10.3.6",
|
|
35
|
-
"cross-env": "^7.0.3",
|
|
36
|
-
"cssnano": "^5.0.8",
|
|
37
|
-
"minimist": "^1.2.5",
|
|
38
|
-
"rimraf": "^3.0.2",
|
|
39
|
-
"rollup": "^2.58.0",
|
|
40
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
41
|
-
"rollup-plugin-vue": "^5.1.9",
|
|
42
|
-
"vue": "^2.6.14",
|
|
43
|
-
"vue-template-compiler": "^2.6.14"
|
|
44
|
-
},
|
|
45
|
-
"peerDependencies": {
|
|
46
|
-
"vue": "^2.6.14",
|
|
47
|
-
"@fortawesome/fontawesome-free": "^5.15.4",
|
|
48
|
-
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
|
49
|
-
"@fortawesome/free-solid-svg-icons": "^5.15.4",
|
|
50
|
-
"@fortawesome/vue-fontawesome": "^2.0.2",
|
|
51
|
-
"@popperjs/core": "^2.10.2",
|
|
52
|
-
"core-js": "^3.18.1",
|
|
53
|
-
"postcss": "^8.3.8",
|
|
54
|
-
"vue-clickaway": "^2.2.2",
|
|
55
|
-
"vue-select": "^3.13.0",
|
|
56
|
-
"vue-tippy": "^4.12.0",
|
|
57
|
-
"vue-toasted": "^1.1.28",
|
|
58
|
-
"vue2-google-maps": "^0.10.7"
|
|
59
|
-
},
|
|
60
|
-
"engines": {
|
|
61
|
-
"node": ">=12"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vue-intergrall-plugins",
|
|
3
|
+
"version": "0.0.145",
|
|
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
|
+
"dependencies": {},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@babel/core": "^7.15.5",
|
|
25
|
+
"@babel/preset-env": "^7.15.6",
|
|
26
|
+
"@rollup/plugin-alias": "^3.1.2",
|
|
27
|
+
"@rollup/plugin-babel": "^5.3.0",
|
|
28
|
+
"@rollup/plugin-commonjs": "^14.0.0",
|
|
29
|
+
"@rollup/plugin-json": "^4.1.0",
|
|
30
|
+
"@rollup/plugin-node-resolve": "^9.0.0",
|
|
31
|
+
"@rollup/plugin-replace": "^2.4.2",
|
|
32
|
+
"@vue/cli-plugin-babel": "^4.5.13",
|
|
33
|
+
"@vue/cli-service": "^4.5.13",
|
|
34
|
+
"autoprefixer": "^10.3.6",
|
|
35
|
+
"cross-env": "^7.0.3",
|
|
36
|
+
"cssnano": "^5.0.8",
|
|
37
|
+
"minimist": "^1.2.5",
|
|
38
|
+
"rimraf": "^3.0.2",
|
|
39
|
+
"rollup": "^2.58.0",
|
|
40
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
41
|
+
"rollup-plugin-vue": "^5.1.9",
|
|
42
|
+
"vue": "^2.6.14",
|
|
43
|
+
"vue-template-compiler": "^2.6.14"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"vue": "^2.6.14",
|
|
47
|
+
"@fortawesome/fontawesome-free": "^5.15.4",
|
|
48
|
+
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
|
49
|
+
"@fortawesome/free-solid-svg-icons": "^5.15.4",
|
|
50
|
+
"@fortawesome/vue-fontawesome": "^2.0.2",
|
|
51
|
+
"@popperjs/core": "^2.10.2",
|
|
52
|
+
"core-js": "^3.18.1",
|
|
53
|
+
"postcss": "^8.3.8",
|
|
54
|
+
"vue-clickaway": "^2.2.2",
|
|
55
|
+
"vue-select": "^3.13.0",
|
|
56
|
+
"vue-tippy": "^4.12.0",
|
|
57
|
+
"vue-toasted": "^1.1.28",
|
|
58
|
+
"vue2-google-maps": "^0.10.7"
|
|
59
|
+
},
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=12"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
<AnexoMensagem :dictionary="dictionary" :anexo="anexo" :origemExterna="origemExterna" :dominio="dominio" @abrir-imagem="abrirImagem"/>
|
|
7
7
|
</div>
|
|
8
8
|
</template>
|
|
9
|
+
<img class="default-stick-size" v-if="urlSticker" :src="urlSticker" :title="urlFileName">
|
|
9
10
|
<div v-if="mapa" class="mensagem-div-mapa">
|
|
10
11
|
<GmapMap
|
|
11
12
|
:id="`mapa_${seq}`"
|
|
@@ -23,14 +24,17 @@
|
|
|
23
24
|
</li>
|
|
24
25
|
</ul>
|
|
25
26
|
</div>
|
|
26
|
-
<p v-html="formatMsg(
|
|
27
|
+
<p v-html="formatMsg(message)"></p>
|
|
27
28
|
<InteratividadeBotoes
|
|
28
29
|
v-if="interatividade"
|
|
29
30
|
:interatividade="interatividade"
|
|
30
31
|
/>
|
|
31
32
|
<span class="horario-envio" v-text="horario"></span>
|
|
32
33
|
<transition name="fade" mode="out-in">
|
|
33
|
-
<span class="reply" v-if="hasReply && (status == 'C' || status == 'T')" v-tippy :content="msgReply ? msgReply : 'Fazer reenvio da mensagem'" @click="$emit('replyMsg')"> <fa-icon :icon="['fas', 'reply']" /> </span>
|
|
34
|
+
<span :class="reply" v-if="hasReply && (status == 'C' || status == 'T')" v-tippy :content="msgReply ? msgReply : 'Fazer reenvio da mensagem'" @click="$emit('replyMsg')"> <fa-icon :icon="['fas', 'reply']" /> </span>
|
|
35
|
+
</transition>
|
|
36
|
+
<transition name="fade" mode="out-in">
|
|
37
|
+
<span class="star dourado" v-if="iniDialogo == 1" :content="contentTooltipStar" v-tippy key="star-padrao"> <fa-icon :icon="['fas', 'star']" /> </span>
|
|
34
38
|
</transition>
|
|
35
39
|
<transition name="fade" mode="out-in">
|
|
36
40
|
<span class="check" v-if="status == 'D'" :content="contentTooltip" v-tippy key="check-padrao"> <fa-icon :icon="['fas', 'check']" /> </span>
|
|
@@ -50,14 +54,19 @@
|
|
|
50
54
|
<script>
|
|
51
55
|
import AnexoMensagem from "./AnexoMensagem"
|
|
52
56
|
import InteratividadeBotoes from "./InteratividadeBotoes"
|
|
57
|
+
import { formataTimezoneData } from "../../services/textFormatting"
|
|
53
58
|
|
|
54
59
|
export default {
|
|
55
60
|
components: { AnexoMensagem, InteratividadeBotoes },
|
|
56
|
-
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"],
|
|
61
|
+
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"],
|
|
57
62
|
data(){
|
|
58
63
|
return{
|
|
59
64
|
strTooltipAux: "",
|
|
60
65
|
linkAux: "",
|
|
66
|
+
urlSticker: "",
|
|
67
|
+
urlFileName: "",
|
|
68
|
+
message: "",
|
|
69
|
+
reply: "reply",
|
|
61
70
|
center: {},
|
|
62
71
|
marker: {},
|
|
63
72
|
infos: [],
|
|
@@ -97,13 +106,59 @@ export default {
|
|
|
97
106
|
set(msg){
|
|
98
107
|
return this.contentTooltip = msg
|
|
99
108
|
}
|
|
109
|
+
},
|
|
110
|
+
contentTooltipStar() {
|
|
111
|
+
let tooltipStar = "";
|
|
112
|
+
if(this.iniDialogo == 1){
|
|
113
|
+
tooltipStar += this.dictionary['ini_sessao']+"<br/>"
|
|
114
|
+
tooltipStar += this.dictionary['id_conversa']+" - "+this.dialogoId+"<br/>"
|
|
115
|
+
tooltipStar += this.dictionary['origem_conversa']+" - "+this.dialogoOrigem+"<br/>"
|
|
116
|
+
tooltipStar += this.dictionary['expiracao_sessao']+" - "+formataTimezoneData(this.expSessao)+"<br/>"
|
|
117
|
+
return tooltipStar
|
|
118
|
+
}
|
|
119
|
+
return tooltipStar
|
|
100
120
|
}
|
|
101
121
|
},
|
|
102
122
|
mounted() {
|
|
103
123
|
if(this.mapa) this.setMap()
|
|
104
124
|
if(this.corMsg) this.setCorMsg()
|
|
125
|
+
this.setClasses()
|
|
126
|
+
this.validadeUrlToMsg()
|
|
105
127
|
},
|
|
106
128
|
methods: {
|
|
129
|
+
validadeUrlToMsg(){
|
|
130
|
+
this.message = this.msg
|
|
131
|
+
if(this.validadeIfExistsSticker()){
|
|
132
|
+
this.urlSticker = this.getUrlSticker()
|
|
133
|
+
this.urlFileName = this.getUrlFileName()
|
|
134
|
+
this.message = this.removeUrlStickerByString(this.urlSticker)
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
getUrlFileName(){
|
|
138
|
+
let urlRegex = /(?<=\/)[^\/\?#]+(?=[^\/]*$)/;
|
|
139
|
+
let urlName = this.urlSticker.match(urlRegex)[0];
|
|
140
|
+
return urlName;
|
|
141
|
+
},
|
|
142
|
+
removeUrlStickerByString(url){
|
|
143
|
+
let msg = this.message.replace(`KSTICKERK ${url}`, '')
|
|
144
|
+
return msg;
|
|
145
|
+
},
|
|
146
|
+
getUrlSticker(){
|
|
147
|
+
let urlRegex = /(https?:\/\/[^ ]*)/;
|
|
148
|
+
let url = this.message.match(urlRegex)[1];
|
|
149
|
+
return url;
|
|
150
|
+
},
|
|
151
|
+
validadeIfExistsSticker(){
|
|
152
|
+
if(this.message && this.message.indexOf("KSTICKERK https://smarters") === 0){
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
return false;
|
|
156
|
+
},
|
|
157
|
+
setClasses(){
|
|
158
|
+
if(this.hasReply && (this.status == "C" || this.status == "T") && this.iniDialogo == 0){
|
|
159
|
+
this.reply = "reply reply-with-2-icons"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
107
162
|
setCorMsg() {
|
|
108
163
|
try {
|
|
109
164
|
const root = document.documentElement
|
|
@@ -201,7 +256,7 @@ export default {
|
|
|
201
256
|
.reply {
|
|
202
257
|
cursor: pointer;
|
|
203
258
|
position: absolute;
|
|
204
|
-
right:
|
|
259
|
+
right: 53px;
|
|
205
260
|
bottom: 5px;
|
|
206
261
|
font-size: .6rem;
|
|
207
262
|
color: #67a332;
|
|
@@ -217,6 +272,9 @@ export default {
|
|
|
217
272
|
margin-top: -1px;
|
|
218
273
|
margin-right: -1px;
|
|
219
274
|
}
|
|
275
|
+
.reply-with-2-icons{
|
|
276
|
+
right: 30px;
|
|
277
|
+
}
|
|
220
278
|
|
|
221
279
|
.check{
|
|
222
280
|
cursor: pointer;
|
|
@@ -240,7 +298,20 @@ export default {
|
|
|
240
298
|
.check.preto, .check.preto svg{
|
|
241
299
|
color: #666
|
|
242
300
|
}
|
|
243
|
-
|
|
301
|
+
.star{
|
|
302
|
+
cursor: pointer;
|
|
303
|
+
position: absolute;
|
|
304
|
+
right: 30px;
|
|
305
|
+
bottom: 3px;
|
|
306
|
+
font-size: 0.7rem;
|
|
307
|
+
}
|
|
308
|
+
.star.dourado svg{
|
|
309
|
+
color: gold
|
|
310
|
+
}
|
|
311
|
+
.default-stick-size{
|
|
312
|
+
width: 250px;
|
|
313
|
+
height: auto;
|
|
314
|
+
}
|
|
244
315
|
.horario-envio {
|
|
245
316
|
margin-right: 15px;
|
|
246
317
|
font-size: 0.7rem;
|