vue-intergrall-plugins 1.0.19 → 1.0.21
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 +61 -31
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +64 -36
- package/package.json +1 -1
- package/src/lib-components/Chat/StandardMessages.vue +62 -65
- package/src/lib-components/Chat/TextFooter.vue +8 -1
- package/src/lib-components/Messages/LinkPreview.vue +15 -24
|
@@ -4841,40 +4841,63 @@ var dev = window.location.hostname == 'localhost' ? '&teste=levchat2' : '';var s
|
|
|
4841
4841
|
getStandardMessages: function getStandardMessages(type, token) {
|
|
4842
4842
|
var _this = this;
|
|
4843
4843
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
4844
|
+
var url, response, value, data, tipo, nivel, conteudo, msg_ret, st_ret;
|
|
4844
4845
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4845
4846
|
while (1) switch (_context.prev = _context.next) {
|
|
4846
4847
|
case 0:
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4848
|
+
url = "".concat(baseURL, "/messages/").concat(type, "?token_cliente=").concat(token).concat(dev);
|
|
4849
|
+
_context.prev = 1;
|
|
4850
|
+
_context.next = 4;
|
|
4851
|
+
return fetch(url, {
|
|
4852
|
+
method: 'GET'
|
|
4851
4853
|
// headers: {
|
|
4852
4854
|
// Authorization: "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdGQiOiJNS1VUUnd3aW00bDV3d0piTHczb2xPYWtTbWxab283Q1F2MDY3V3pWR2E3VkhDQ2FMUEdsS2VQIiwibWFuYWdlciI6Ik1LVXFCcGtGUjNCTkhrbTZ5Znd3aW00bDV3d0l2Tlk0MDZrMzQ3SVdkRnNnRUY4Y3RIaDlQdngiLCJoYXNfaW5mb3MiOnRydWUsIm5yb3MiOltdLCJhdXRoIjoiTUtVdXdGZjdjMXd3eGI0NGF3d1F4eGlia3N2NW5YR2FxOWZVNkxMYnAzQ0tkS1NHa0RvbWV4ZiIsImlhdCI6MTY0ODgxMjYzOSwiZXhwIjoxNjQ4ODk5MDM5fQ.IMpYYLoxiX566-Y2fqNlJu0qBkEyOOTWZ25UqeOyPUs"
|
|
4853
4855
|
// }
|
|
4854
|
-
})
|
|
4855
|
-
var data = response.data;
|
|
4856
|
-
var tipo = data.tipo,
|
|
4857
|
-
nivel = data.nivel,
|
|
4858
|
-
conteudo = data.conteudo,
|
|
4859
|
-
msg_ret = data.msg_ret,
|
|
4860
|
-
st_ret = data.st_ret;
|
|
4861
|
-
if (tipo) _this.$emit('set-message-type', tipo);
|
|
4862
|
-
return st_ret === 'OK' ? conteudo ? conteudo : nivel : st_ret === 'AVISO' ? {
|
|
4863
|
-
msg_ret: msg_ret
|
|
4864
|
-
} : false;
|
|
4865
|
-
}).catch(function (err) {
|
|
4866
|
-
return console.error('Erro na requisicao para o servidor', err);
|
|
4867
|
-
}));
|
|
4856
|
+
});
|
|
4868
4857
|
case 4:
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4858
|
+
response = _context.sent;
|
|
4859
|
+
if (response.ok) {
|
|
4860
|
+
_context.next = 8;
|
|
4861
|
+
break;
|
|
4862
|
+
}
|
|
4863
|
+
console.error('Erro na requisicao para o servidor (1)', response.statusText);
|
|
4864
|
+
return _context.abrupt("return", false);
|
|
4873
4865
|
case 8:
|
|
4866
|
+
_context.next = 10;
|
|
4867
|
+
return response.json();
|
|
4868
|
+
case 10:
|
|
4869
|
+
value = _context.sent;
|
|
4870
|
+
data = value.data;
|
|
4871
|
+
tipo = data.tipo, nivel = data.nivel, conteudo = data.conteudo, msg_ret = data.msg_ret, st_ret = data.st_ret;
|
|
4872
|
+
if (tipo) _this.$emit('set-message-type', tipo);
|
|
4873
|
+
if (!(st_ret === 'OK')) {
|
|
4874
|
+
_context.next = 18;
|
|
4875
|
+
break;
|
|
4876
|
+
}
|
|
4877
|
+
return _context.abrupt("return", conteudo ? conteudo : nivel);
|
|
4878
|
+
case 18:
|
|
4879
|
+
if (!(st_ret === 'AVISO')) {
|
|
4880
|
+
_context.next = 22;
|
|
4881
|
+
break;
|
|
4882
|
+
}
|
|
4883
|
+
return _context.abrupt("return", {
|
|
4884
|
+
msg_ret: msg_ret
|
|
4885
|
+
});
|
|
4886
|
+
case 22:
|
|
4887
|
+
return _context.abrupt("return", false);
|
|
4888
|
+
case 23:
|
|
4889
|
+
_context.next = 29;
|
|
4890
|
+
break;
|
|
4891
|
+
case 25:
|
|
4892
|
+
_context.prev = 25;
|
|
4893
|
+
_context.t0 = _context["catch"](1);
|
|
4894
|
+
console.error("Erro na requisicao para o servidor (2)", _context.t0);
|
|
4895
|
+
return _context.abrupt("return", false);
|
|
4896
|
+
case 29:
|
|
4874
4897
|
case "end":
|
|
4875
4898
|
return _context.stop();
|
|
4876
4899
|
}
|
|
4877
|
-
}, _callee, null, [[
|
|
4900
|
+
}, _callee, null, [[1, 25]]);
|
|
4878
4901
|
}))();
|
|
4879
4902
|
}
|
|
4880
4903
|
}
|
|
@@ -4969,9 +4992,11 @@ var script$l = {
|
|
|
4969
4992
|
if (data.msg_ret) return _this.$toasted.global.defaultInfo({
|
|
4970
4993
|
msg: data.msg_ret
|
|
4971
4994
|
});
|
|
4972
|
-
|
|
4995
|
+
return _this.showFormattedMessage(data, selectionIndex);
|
|
4973
4996
|
}
|
|
4974
|
-
_this.$toasted.global.defaultError(
|
|
4997
|
+
_this.$toasted.global.defaultError({
|
|
4998
|
+
msg: 'Problema com as mensagens formatadas. Contate o suporte.'
|
|
4999
|
+
});
|
|
4975
5000
|
_this.$emit("error-standard-message");
|
|
4976
5001
|
}).catch(function (e) {
|
|
4977
5002
|
_this.loadingReq = false;
|
|
@@ -5164,7 +5189,7 @@ var __vue_staticRenderFns__$l = [];
|
|
|
5164
5189
|
/* style */
|
|
5165
5190
|
var __vue_inject_styles__$l = function __vue_inject_styles__(inject) {
|
|
5166
5191
|
if (!inject) return;
|
|
5167
|
-
inject("data-v-
|
|
5192
|
+
inject("data-v-5427991a_0", {
|
|
5168
5193
|
source: ".transition-selects{min-height:80px;display:flex;flex-direction:column;width:100%}.loader-select{position:relative;min-height:35px;background:#fff;width:100%;border:1px solid #ccc;border-radius:5px;z-index:1}.loading-message{background-color:#555!important}",
|
|
5169
5194
|
map: undefined,
|
|
5170
5195
|
media: undefined
|
|
@@ -5173,7 +5198,7 @@ var __vue_inject_styles__$l = function __vue_inject_styles__(inject) {
|
|
|
5173
5198
|
/* scoped */
|
|
5174
5199
|
var __vue_scope_id__$l = undefined;
|
|
5175
5200
|
/* module identifier */
|
|
5176
|
-
var __vue_module_identifier__$l = "data-v-
|
|
5201
|
+
var __vue_module_identifier__$l = "data-v-5427991a";
|
|
5177
5202
|
/* functional template */
|
|
5178
5203
|
var __vue_is_functional_template__$l = false;
|
|
5179
5204
|
/* style inject shadow dom */
|
|
@@ -5692,7 +5717,7 @@ var __vue_render__$k = function __vue_render__() {
|
|
|
5692
5717
|
"message": _vm.message,
|
|
5693
5718
|
"maxCharacters": _vm.textareaSettings.maxCharacters
|
|
5694
5719
|
}
|
|
5695
|
-
}), _vm._ssrNode(" "), _vm.buttons.hasFiles || _vm.buttons.hasAudio || _vm.buttons.hasExpand || _vm.formattedMessageSettings.hasStandardMessages || _vm.buttons.hasScreenShare || _vm.buttons.hasDownloadAll ? _vm._ssrNode("<div" + _vm._ssrClass("text-footer-actions", {
|
|
5720
|
+
}), _vm._ssrNode(" "), _vm.buttons.hasFiles || _vm.buttons.hasAudio || _vm.buttons.hasExpand || _vm.formattedMessageSettings.hasStandardMessages || _vm.buttons.hasScreenShare || _vm.buttons.hasDownloadAll || _vm.buttons.hasCustomButtom ? _vm._ssrNode("<div" + _vm._ssrClass("text-footer-actions", {
|
|
5696
5721
|
'outside-buttons': _vm.cssStyle.outsideButtons && !_vm.audioFile
|
|
5697
5722
|
}) + ">", "</div>", [_c('BtnDownloadAllFiles', {
|
|
5698
5723
|
directives: [{
|
|
@@ -5796,7 +5821,11 @@ var __vue_render__$k = function __vue_render__() {
|
|
|
5796
5821
|
return _vm.$emit('expand-textarea');
|
|
5797
5822
|
}
|
|
5798
5823
|
}
|
|
5799
|
-
})
|
|
5824
|
+
}), _vm._ssrNode(" "), _vm.buttons.customButtom && _vm.buttons.customButtom.use ? _vm._ssrNode("<div" + _vm._ssrAttr("title", _vm.buttons.customButtom.title) + " class=\"text-footer-actions--btn\">", "</div>", [_c('fa-icon', {
|
|
5825
|
+
attrs: {
|
|
5826
|
+
"icon": _vm.buttons.customButtom.icon
|
|
5827
|
+
}
|
|
5828
|
+
})], 1) : _vm._e()], 2) : _vm._e(), _vm._ssrNode(" "), _vm.buttons.hasSendButton ? _vm._ssrNode("<div class=\"text-footer-actions\">", "</div>", [_vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.dictionary.title_enviar_msg) + " class=\"text-footer-actions--btn\">", "</span>", [_c('fa-icon', {
|
|
5800
5829
|
attrs: {
|
|
5801
5830
|
"icon": ['fas', 'paper-plane']
|
|
5802
5831
|
}
|
|
@@ -5832,7 +5861,7 @@ var __vue_staticRenderFns__$k = [];
|
|
|
5832
5861
|
/* style */
|
|
5833
5862
|
var __vue_inject_styles__$k = function __vue_inject_styles__(inject) {
|
|
5834
5863
|
if (!inject) return;
|
|
5835
|
-
inject("data-v-
|
|
5864
|
+
inject("data-v-773f5b8e_0", {
|
|
5836
5865
|
source: ".text-footer-container{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%;position:relative}.text-footer-container .text-footer{min-height:48px;box-shadow:0 3px 7px -2px rgba(0,0,0,.45);position:relative;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;padding:5px 2px 5px 5px;border-radius:5px}.text-footer-container .text-footer.full{width:100%}.text-footer-container .text-footer.almostFull{width:95%}.text-footer-container .text-footer.medium{width:75%}.text-footer-container.bigger .text-footer{height:80px}.text-footer-container.bigger .text-footer>textarea{font-size:14px;height:75px;max-height:75px;min-height:75px}.text-footer-container textarea{margin:0 5px;border:unset;flex:1;resize:none;min-height:30px;max-height:60px;font-size:14px;font-family:inherit;background:inherit}.text-footer-container textarea:focus{outline:unset}.text-footer-container textarea::placeholder{font-size:12px}.text-footer-container .text-footer-audio{flex:1;display:flex;justify-content:center;align-items:center}.text-footer-container audio{flex:1;outline:unset;width:auto;height:38px}.text-footer-container .delete-audio{display:flex;justify-content:center;align-items:center;color:#e74c3c;transition:background .3s;border-radius:50%;font-size:16px;padding:10px;cursor:pointer;margin:0 5px;width:31px;height:31px}.text-footer-container .delete-audio:hover{background-color:rgba(208,0,0,.2)}.text-footer-container .max-characters{font-size:9.2px;z-index:1;color:#444;position:relative;top:30px;left:-30px}.text-footer-container .max-characters.no-width{width:0}.text-footer-container .text-footer-actions{display:flex}.text-footer-container .text-footer-actions.outside-buttons{display:flex;align-items:center;justify-content:flex-end;position:absolute;top:-30px;right:35px;background-color:#fafafa}.text-footer-container .text-footer-actions .text-footer-actions--btn{display:flex;justify-content:center;align-items:center;color:#777;border-radius:50%;transition:background .3s;padding:10px;font-size:16px;width:36px;height:36px;cursor:pointer;margin-right:2.5px}.text-footer-container .text-footer-actions .text-footer-actions--btn:last-child{margin-right:unset}.text-footer-container .text-footer-actions .text-footer-actions--btn:hover{background-color:rgba(0,0,0,.1)}.text-footer-container .text-footer-actions .text-footer-actions--btn.files-activated{background-color:rgba(0,0,0,.1)}.text-footer-container .text-footer-actions .text-footer-actions--btn.audio-activated{background-color:rgba(208,0,0,.7);color:#fff}.text-footer-container .text-footer-actions .text-footer-actions--btn.left-button{position:absolute;left:0}.text-footer-container .text-footer-hsm-container{margin:12px 0 7px 0}.text-footer-container .text-footer-hsm-container.full{width:100%}.text-footer-container .text-footer-hsm-container.almostFull{width:95%}.text-footer-container .text-footer-hsm-container.medium{width:75%}.text-footer-container .text-footer-hsm-container .text-footer-v-select{border-radius:5px;margin-bottom:5px}.text-footer-container .text-footer-hsm-container .text-footer-select-03{display:flex;align-items:center;flex:1;width:100%}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer-v-select{flex:1}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03{transition-duration:.3s;user-select:none;cursor:pointer;box-shadow:inset 0 -3px rgba(0,0,0,.2);opacity:.9;border-radius:2.5px;display:flex;justify-content:center;align-items:center;margin-left:5px;margin-bottom:5px;background-color:#f7fe72;width:32px;height:32px}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:hover{opacity:1}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:active{opacity:1;box-shadow:inset 0 -1px rgba(0,0,0,.2);-webkit-transform:translateY(1px);-moz-transform:translateY(1px);-o-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03 svg{font-size:16px}.text-footer-container .text-footer-files-container{position:absolute;right:0;top:-55px;padding:5px;background-color:rgba(0,0,0,.4);border-radius:5px;display:flex;align-items:center;justify-content:space-between;z-index:1}.text-footer-container .text-footer-files-container.horizontal{right:-55px;flex-direction:column}.text-footer-container .text-footer-files-container .files-btn{transition-duration:.3s;transition-property:opacity;opacity:.8;cursor:pointer;display:flex;justify-content:center;align-items:center;border-radius:10px;padding:3px;width:40px;height:40px;font-size:16px;color:#fff}.text-footer-container .text-footer-files-container .files-btn:hover{opacity:1}.text-footer-container .text-footer-files-container .files-btn svg{color:#fff}.text-footer-container .text-footer-files-container .files-btn.images{background-color:#9575cd;margin-right:5px}.text-footer-container .text-footer-files-container .files-btn.images.margin-bottom{margin-right:unset;margin-bottom:5px}.text-footer-container .text-footer-files-container .files-btn.docs{background-color:#7986cb}.text-footer-container .text-footer-files-container .files-btn.system{background-color:#49a349;margin-left:5px}.text-footer-container .text-footer-files-container .files-btn.both{font-size:15.2px;background-color:#5555ec;flex-direction:column}.text-footer-container .text-footer-files-container .files-btn.both svg:nth-child(1){transform:translateX(5px)}.text-footer-container .text-footer-files-container .files-btn.both svg:nth-child(2){transform:translateX(-5px)}.text-footer-container .text-footer-preview-container{width:100%;cursor:default;position:absolute;left:0;background-color:#f1f1f1;border:2px solid #ccc;border-bottom:unset;border-top-left-radius:2.5px;border-top-right-radius:2.5px}.text-footer-container .text-footer-preview-container.isDoc{top:-50px;width:100%;height:45px}.text-footer-container .text-footer-preview-container.isImg,.text-footer-container .text-footer-preview-container.isMultiple{top:-205px;width:100%;height:200px;min-width:200px}.text-footer-container .text-footer-preview-container.isImg .text-footer-image-preview{height:170px}.text-footer-container .text-footer-preview-container.isError{top:-80px;width:100%;height:75px}.text-footer-container .text-footer-alt{margin-top:-12px;width:100%;padding:0 10px}.text-footer-container .text-footer-alt .text-footer-out-session{margin-top:12px}.text-footer-container .text-footer-alt .text-footer-sem-24h{font-size:12.8px;text-align:right;font-weight:600;letter-spacing:-.5px;color:#dd7f0c;margin-top:5px;position:absolute;right:0}.text-footer-container .text-footer-alt .sem-templates{margin-top:10px;font-size:12.8px;text-align:right;font-weight:600;letter-spacing:-.5px;color:#921e12}.text-footer-container .text-footer-alt .text-footer-templates{position:relative;width:100%}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection{width:100%;display:flex;align-items:center}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection h4{margin-right:5px}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection .sm__select{flex:1}.vs__dropdown-menu{font-size:13.6px!important}.emoji-mart-anchor,.emoji-mart-emoji span{cursor:pointer!important}.emoji-mart{z-index:2!important}.emoji-mart-scroll{overflow-x:hidden}",
|
|
5837
5866
|
map: undefined,
|
|
5838
5867
|
media: undefined
|
|
@@ -5841,7 +5870,7 @@ var __vue_inject_styles__$k = function __vue_inject_styles__(inject) {
|
|
|
5841
5870
|
/* scoped */
|
|
5842
5871
|
var __vue_scope_id__$k = undefined;
|
|
5843
5872
|
/* module identifier */
|
|
5844
|
-
var __vue_module_identifier__$k = "data-v-
|
|
5873
|
+
var __vue_module_identifier__$k = "data-v-773f5b8e";
|
|
5845
5874
|
/* functional template */
|
|
5846
5875
|
var __vue_is_functional_template__$k = false;
|
|
5847
5876
|
/* style inject shadow dom */
|
|
@@ -8461,9 +8490,8 @@ var InteratividadeBotoes = __vue_component__$b;var script$6 = {
|
|
|
8461
8490
|
case 4:
|
|
8462
8491
|
encodedURL = Buffer(url).toString("base64");
|
|
8463
8492
|
_context.next = 7;
|
|
8464
|
-
return fetch({
|
|
8465
|
-
method: "get"
|
|
8466
|
-
url: "".concat(baseURL, "/preview?url=").concat(encodedURL).concat(dev)
|
|
8493
|
+
return fetch("".concat(baseURL, "/preview?url=").concat(encodedURL).concat(dev), {
|
|
8494
|
+
method: "get"
|
|
8467
8495
|
// headers: {
|
|
8468
8496
|
// Authorization: "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdGQiOiJNS1VGWnBQeEV1UHc5UXdvN21HU2tWNEl4VHN0blM3MHNyZUJTTWt3d3hiNDRhd3dDcWwxd09jIiwibWFuYWdlciI6Ik1LVXRhd3dpbTRsNXd3WW1LMWFJYXd3aW00bDV3d3d3eGI0NGF3d0s0a2pveHBPMnl6TFZ3dXBud3d4YjQ0YXd3cmxNNHRqZ3FKTExsTjMiLCJoYXNfaW5mb3MiOnRydWUsIm5yb3MiOlsiMjczIl0sImF1dGgiOiJNS1VncmxDdkdRbElGbXZVTERCSGplV0wyOXFVUHdyOVlSMVMyeXdJanlLOUNteCIsImlhdCI6MTY0ODQ3MzYxNSwiZXhwIjoxNjQ4NTYwMDE1fQ.KSG_6_9NfQhk5br7hnXzeLyVZuT69XLaEYF9XkdgmmQ"
|
|
8469
8497
|
// }
|
|
@@ -8547,7 +8575,7 @@ var __vue_staticRenderFns__$6 = [];
|
|
|
8547
8575
|
/* style */
|
|
8548
8576
|
var __vue_inject_styles__$6 = function __vue_inject_styles__(inject) {
|
|
8549
8577
|
if (!inject) return;
|
|
8550
|
-
inject("data-v-
|
|
8578
|
+
inject("data-v-2e1c7e66_0", {
|
|
8551
8579
|
source: ".link-preview{display:flex;flex-direction:column;background-color:#eee;color:#333;cursor:pointer;margin:5px 0;border-radius:5px;opacity:.95;transition:opacity .3s ease-in-out;font-size:13.6px}.link-preview-image{display:flex;justify-content:center;align-items:center;padding:1px;border-top-left-radius:5px;border-top-right-radius:5px}.link-preview-author{margin:5px;font-size:.615em;font-weight:700}.link-preview-author.mb-0{margin-bottom:0}.link-preview-author h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.link-preview-image img{min-width:100px;max-width:200px;border-top-left-radius:5px;border-top-right-radius:5px}.link-preview-infos{background-color:#2626261a;padding:5px;margin:5px;font-size:.83em;border-radius:5px}.link-preview:hover{opacity:1}.link-preview:hover .link-preview-infos p{text-decoration:underline}",
|
|
8552
8580
|
map: undefined,
|
|
8553
8581
|
media: undefined
|
|
@@ -8556,7 +8584,7 @@ var __vue_inject_styles__$6 = function __vue_inject_styles__(inject) {
|
|
|
8556
8584
|
/* scoped */
|
|
8557
8585
|
var __vue_scope_id__$6 = undefined;
|
|
8558
8586
|
/* module identifier */
|
|
8559
|
-
var __vue_module_identifier__$6 = "data-v-
|
|
8587
|
+
var __vue_module_identifier__$6 = "data-v-2e1c7e66";
|
|
8560
8588
|
/* functional template */
|
|
8561
8589
|
var __vue_is_functional_template__$6 = false;
|
|
8562
8590
|
/* style inject shadow dom */
|
package/package.json
CHANGED
|
@@ -3,17 +3,10 @@
|
|
|
3
3
|
<div class="transition-selects">
|
|
4
4
|
<transition name="fade" mode="out-in">
|
|
5
5
|
<div v-if="formatted_messages_2.length && key_1">
|
|
6
|
-
<v-select
|
|
7
|
-
:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class="text-footer-v-select"
|
|
11
|
-
:options="formatted_messages_2"
|
|
12
|
-
label="value"
|
|
13
|
-
v-model="key_2"
|
|
14
|
-
:reduce="formatted_messages_2 => formatted_messages_2.cod"
|
|
15
|
-
@input="inputSelectKey2"
|
|
16
|
-
>
|
|
6
|
+
<v-select :style="`background-color: ${backgroundColor}`" appendToBody
|
|
7
|
+
:calculatePosition="calculateSelectPosition" class="text-footer-v-select" :options="formatted_messages_2"
|
|
8
|
+
label="value" v-model="key_2" :reduce="formatted_messages_2 => formatted_messages_2.cod"
|
|
9
|
+
@input="inputSelectKey2">
|
|
17
10
|
<div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
|
|
18
11
|
</v-select>
|
|
19
12
|
</div>
|
|
@@ -22,19 +15,12 @@
|
|
|
22
15
|
</div>
|
|
23
16
|
</transition>
|
|
24
17
|
<transition name="fade" mode="out-in">
|
|
25
|
-
<div class="text-footer-select-03"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
:
|
|
30
|
-
|
|
31
|
-
:options="formatted_messages_3"
|
|
32
|
-
:reduce="formatted_messages_3 => formatted_messages_3.cod"
|
|
33
|
-
label="value"
|
|
34
|
-
:clearable="false"
|
|
35
|
-
@input="openMsg()"
|
|
36
|
-
v-model="key_3"
|
|
37
|
-
>
|
|
18
|
+
<div class="text-footer-select-03"
|
|
19
|
+
v-if="formatted_messages_3.length && key_2 && formatted_messages_2.length && key_1">
|
|
20
|
+
<v-select :style="`background-color: ${backgroundColor}`" appendToBody
|
|
21
|
+
:calculatePosition="calculateSelectPosition" class="text-footer-v-select" :options="formatted_messages_3"
|
|
22
|
+
:reduce="formatted_messages_3 => formatted_messages_3.cod" label="value" :clearable="false"
|
|
23
|
+
@input="openMsg()" v-model="key_3">
|
|
38
24
|
<div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
|
|
39
25
|
</v-select>
|
|
40
26
|
</div>
|
|
@@ -48,13 +34,24 @@
|
|
|
48
34
|
|
|
49
35
|
<style>
|
|
50
36
|
.transition-selects {
|
|
51
|
-
min-height: 80px;
|
|
37
|
+
min-height: 80px;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
width: 100%;
|
|
52
41
|
}
|
|
42
|
+
|
|
53
43
|
.loader-select {
|
|
54
|
-
position: relative;
|
|
44
|
+
position: relative;
|
|
45
|
+
min-height: 35px;
|
|
46
|
+
background: #FFF;
|
|
47
|
+
width: 100%;
|
|
48
|
+
border: 1px solid #ccc;
|
|
49
|
+
border-radius: 5px;
|
|
50
|
+
z-index: 1;
|
|
55
51
|
}
|
|
52
|
+
|
|
56
53
|
.loading-message {
|
|
57
|
-
background-color: #555!important;
|
|
54
|
+
background-color: #555 !important;
|
|
58
55
|
}
|
|
59
56
|
</style>
|
|
60
57
|
|
|
@@ -120,43 +117,43 @@ export default {
|
|
|
120
117
|
return () => popper.destroy()
|
|
121
118
|
},
|
|
122
119
|
inputSelectKey1() {
|
|
123
|
-
if(!this.key_1) {
|
|
124
|
-
if(this.formatted_messages_2.length) this.formatted_messages_2 = []
|
|
125
|
-
if(this.key_2) this.key_2 = ""
|
|
120
|
+
if (!this.key_1) {
|
|
121
|
+
if (this.formatted_messages_2.length) this.formatted_messages_2 = []
|
|
122
|
+
if (this.key_2) this.key_2 = ""
|
|
126
123
|
return
|
|
127
124
|
}
|
|
128
125
|
this.receiveValueFormattedMessage(this.key_1, 2)
|
|
129
126
|
},
|
|
130
127
|
inputSelectKey2() {
|
|
131
|
-
if(!this.key_2) {
|
|
132
|
-
if(this.formatted_messages_3.length) this.formatted_messages_3 = []
|
|
133
|
-
if(this.key_3) this.key_3 = ""
|
|
128
|
+
if (!this.key_2) {
|
|
129
|
+
if (this.formatted_messages_3.length) this.formatted_messages_3 = []
|
|
130
|
+
if (this.key_3) this.key_3 = ""
|
|
134
131
|
return
|
|
135
132
|
}
|
|
136
|
-
if(this.formatted_messages_3.length) this.formatted_messages_3 = []
|
|
137
|
-
if(this.key_3) this.key_3 = ""
|
|
133
|
+
if (this.formatted_messages_3.length) this.formatted_messages_3 = []
|
|
134
|
+
if (this.key_3) this.key_3 = ""
|
|
138
135
|
this.receiveValueFormattedMessage(`T/${this.key_2}`, 3)
|
|
139
136
|
},
|
|
140
137
|
receiveValueFormattedMessage(cod, selectionIndex) {
|
|
141
138
|
try {
|
|
142
|
-
if(!this.token_cliente) throw new Error("Informe token_cliente como chave na propriedade formattedMessageSettings que ocorre na chamada componente TextFooter ")
|
|
139
|
+
if (!this.token_cliente) throw new Error("Informe token_cliente como chave na propriedade formattedMessageSettings que ocorre na chamada componente TextFooter ")
|
|
143
140
|
this.loadingReq = true
|
|
144
141
|
this.getStandardMessages(cod, this.token_cliente).then((data) => {
|
|
145
142
|
this.loadingReq = false
|
|
146
|
-
if(data) {
|
|
147
|
-
if(data.msg_ret) return this.$toasted.global.defaultInfo({ msg: data.msg_ret })
|
|
148
|
-
|
|
143
|
+
if (data) {
|
|
144
|
+
if (data.msg_ret) return this.$toasted.global.defaultInfo({ msg: data.msg_ret })
|
|
145
|
+
return this.showFormattedMessage(data, selectionIndex)
|
|
149
146
|
}
|
|
150
|
-
this.$toasted.global.defaultError()
|
|
147
|
+
this.$toasted.global.defaultError({ msg: 'Problema com as mensagens formatadas. Contate o suporte.' })
|
|
151
148
|
this.$emit("error-standard-message")
|
|
152
|
-
}).catch(e => {
|
|
149
|
+
}).catch(e => {
|
|
153
150
|
this.loadingReq = false
|
|
154
151
|
this.$toasted.global.defaultError({ msg: e && e.message ? e.message : e })
|
|
155
152
|
this.closeStandardMessages()
|
|
156
153
|
this.$emit("error-standard-message")
|
|
157
154
|
console.error("Error in getStandardMessages: ", e)
|
|
158
155
|
})
|
|
159
|
-
}catch(e) {
|
|
156
|
+
} catch (e) {
|
|
160
157
|
this.loadingReq = false
|
|
161
158
|
console.error("Error in receiveValueFormattedMessage: ", e)
|
|
162
159
|
}
|
|
@@ -164,51 +161,51 @@ export default {
|
|
|
164
161
|
showFormattedMessage(messageData, selectionIndex) {
|
|
165
162
|
try {
|
|
166
163
|
let success = false
|
|
167
|
-
if(Array.isArray(messageData)) success = true
|
|
168
|
-
if(!success && selectionIndex != 4) this.$toasted.global.defaultInfo({ msg: messageData ? messageData.msg : "Nao foi possível obter mensagens" })
|
|
164
|
+
if (Array.isArray(messageData)) success = true
|
|
165
|
+
if (!success && selectionIndex != 4) this.$toasted.global.defaultInfo({ msg: messageData ? messageData.msg : "Nao foi possível obter mensagens" })
|
|
169
166
|
|
|
170
167
|
switch (selectionIndex) {
|
|
171
168
|
case 2:
|
|
172
|
-
if(!success){
|
|
169
|
+
if (!success) {
|
|
173
170
|
this.formatted_messages_2.push(messageData)
|
|
174
171
|
this.key_2 = this.formatted_messages_2[0]
|
|
175
|
-
}else{
|
|
172
|
+
} else {
|
|
176
173
|
this.formatted_messages_2 = messageData
|
|
177
|
-
if(this.formatted_messages_2.length == 1) {
|
|
178
|
-
if(this.formatted_messages_2[0].cod) {
|
|
174
|
+
if (this.formatted_messages_2.length == 1) {
|
|
175
|
+
if (this.formatted_messages_2[0].cod) {
|
|
179
176
|
this.key_2 = this.formatted_messages_2[0].cod
|
|
180
177
|
this.receiveValueFormattedMessage(`T/${this.key_2}`, 3)
|
|
181
178
|
}
|
|
182
179
|
}
|
|
183
180
|
}
|
|
184
|
-
|
|
181
|
+
break
|
|
185
182
|
case 3:
|
|
186
|
-
if(!success) {
|
|
183
|
+
if (!success) {
|
|
187
184
|
this.formatted_messages_3.push(messageData)
|
|
188
|
-
this.$toasted.global.defaultInfo({msg: this.dictionary.msg_erro_sem_msg_formatada})
|
|
185
|
+
this.$toasted.global.defaultInfo({ msg: this.dictionary.msg_erro_sem_msg_formatada })
|
|
189
186
|
this.$emit("close-blocker-standard-message")
|
|
190
|
-
}else{
|
|
191
|
-
if(messageData.length){
|
|
187
|
+
} else {
|
|
188
|
+
if (messageData.length) {
|
|
192
189
|
this.formatted_messages_3 = messageData
|
|
193
|
-
if(this.formatted_messages_3.length == 1 && this.formatted_messages_3[0].cod) {
|
|
190
|
+
if (this.formatted_messages_3.length == 1 && this.formatted_messages_3[0].cod) {
|
|
194
191
|
this.key_3 = this.formatted_messages_3[0].cod
|
|
195
192
|
this.openMsg()
|
|
196
193
|
}
|
|
197
194
|
}
|
|
198
195
|
}
|
|
199
|
-
|
|
200
|
-
case 4:
|
|
196
|
+
break
|
|
197
|
+
case 4:
|
|
201
198
|
const finalMessage = `${this.message}${this.message && !this.message.endsWith(" ") ? ` ${messageData}` : messageData}`
|
|
202
199
|
this.$emit("add-standard-message", finalMessage)
|
|
203
200
|
this.$parent.focusTextarea()
|
|
204
201
|
// return this.closeStandardMessages()
|
|
205
|
-
|
|
206
|
-
default:
|
|
202
|
+
break
|
|
203
|
+
default:
|
|
207
204
|
console.error("Error in showFormattedMessage: selectionIndex not found")
|
|
208
|
-
|
|
205
|
+
break
|
|
209
206
|
}
|
|
210
207
|
|
|
211
|
-
}catch(e) {
|
|
208
|
+
} catch (e) {
|
|
212
209
|
console.error("Error in showFormattedMessage: ", e)
|
|
213
210
|
}
|
|
214
211
|
},
|
|
@@ -218,25 +215,25 @@ export default {
|
|
|
218
215
|
openMsg() {
|
|
219
216
|
try {
|
|
220
217
|
this.messageType == 1 ? this.insertFormattedMessage(this.key_3) : this.openFormattedMsgType2(this.key_3)
|
|
221
|
-
}catch(e) {
|
|
218
|
+
} catch (e) {
|
|
222
219
|
console.error("Error in openMsg: ", e)
|
|
223
220
|
}
|
|
224
221
|
},
|
|
225
222
|
openFormattedMsgType2(key) {
|
|
226
223
|
try {
|
|
227
|
-
if(!key || !this.key_2) return
|
|
224
|
+
if (!key || !this.key_2) return
|
|
228
225
|
this.$emit("open-blocker-standard-message")
|
|
229
226
|
key = key.cod
|
|
230
227
|
this.$emit("set-standard-infos", { category: this.key_2, subject: key })
|
|
231
|
-
}catch(e) {
|
|
228
|
+
} catch (e) {
|
|
232
229
|
console.error("Error in openFormattedMsgType2: ", e)
|
|
233
230
|
}
|
|
234
231
|
},
|
|
235
232
|
insertFormattedMessage() {
|
|
236
233
|
try {
|
|
237
|
-
if(!this.key_3) return this.$toasted.global.defaultError({msg: 'Selecione uma mensagem'})
|
|
234
|
+
if (!this.key_3) return this.$toasted.global.defaultError({ msg: 'Selecione uma mensagem' })
|
|
238
235
|
this.receiveValueFormattedMessage(`T/${this.key_2}/${this.key_3}`, 4)
|
|
239
|
-
}catch(e) {
|
|
236
|
+
} catch (e) {
|
|
240
237
|
console.error("Erro ao inserir mensagem formatada: ", e)
|
|
241
238
|
}
|
|
242
239
|
}
|
|
@@ -60,7 +60,8 @@
|
|
|
60
60
|
buttons.hasExpand ||
|
|
61
61
|
formattedMessageSettings.hasStandardMessages ||
|
|
62
62
|
buttons.hasScreenShare ||
|
|
63
|
-
buttons.hasDownloadAll
|
|
63
|
+
buttons.hasDownloadAll ||
|
|
64
|
+
buttons.hasCustomButtom
|
|
64
65
|
"
|
|
65
66
|
class="text-footer-actions"
|
|
66
67
|
:class="{ 'outside-buttons': cssStyle.outsideButtons && !audioFile }"
|
|
@@ -111,6 +112,12 @@
|
|
|
111
112
|
@expand-textarea="$emit('expand-textarea')"
|
|
112
113
|
:dictionary="dictionary"
|
|
113
114
|
/>
|
|
115
|
+
<div v-if="buttons.customButtom && buttons.customButtom.use" class="text-footer-actions--btn" @click="() => {
|
|
116
|
+
if(buttons.customButtom.callback) buttons.customButtom.callback()
|
|
117
|
+
if(buttons.customButtom.emiter) $emit(buttons.customButtom.emiter)
|
|
118
|
+
}" :title="buttons.customButtom.title">
|
|
119
|
+
<fa-icon :icon="buttons.customButtom.icon" />
|
|
120
|
+
</div>
|
|
114
121
|
</div>
|
|
115
122
|
<div class="text-footer-actions" v-if="buttons.hasSendButton">
|
|
116
123
|
<span
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
:title="`Abrir ${returnURL()} em uma nova guia`"
|
|
7
|
-
>
|
|
8
|
-
<div
|
|
9
|
-
v-if="linkPreview.imageSource"
|
|
10
|
-
:style="linkPreview.colorTheme ? `background-color: ${linkPreview.colorTheme}` : ''"
|
|
11
|
-
class="link-preview-image"
|
|
12
|
-
>
|
|
2
|
+
<div v-if="linkPreview.isValid" class="link-preview" @click="openUrl()"
|
|
3
|
+
:title="`Abrir ${returnURL()} em uma nova guia`">
|
|
4
|
+
<div v-if="linkPreview.imageSource"
|
|
5
|
+
:style="linkPreview.colorTheme ? `background-color: ${linkPreview.colorTheme}` : ''" class="link-preview-image">
|
|
13
6
|
<img :src="linkPreview.imageSource" alt="Imagem referente ao link" />
|
|
14
7
|
</div>
|
|
15
|
-
<div
|
|
16
|
-
class="link-preview-author"
|
|
17
|
-
:class="{ 'mb-0': linkPreview.description }"
|
|
18
|
-
v-if="linkPreview.author"
|
|
19
|
-
>
|
|
8
|
+
<div class="link-preview-author" :class="{ 'mb-0': linkPreview.description }" v-if="linkPreview.author">
|
|
20
9
|
<h1 v-text="linkPreview.author"></h1>
|
|
21
10
|
</div>
|
|
22
11
|
<div v-if="linkPreview.description" class="link-preview-infos">
|
|
@@ -76,9 +65,8 @@ export default {
|
|
|
76
65
|
const url = this.returnURL();
|
|
77
66
|
if (!url) return;
|
|
78
67
|
const encodedURL = Buffer(url).toString("base64");
|
|
79
|
-
const response = await fetch({
|
|
68
|
+
const response = await fetch(`${baseURL}/preview?url=${encodedURL}${dev}`, {
|
|
80
69
|
method: "get",
|
|
81
|
-
url: `${baseURL}/preview?url=${encodedURL}${dev}`,
|
|
82
70
|
// headers: {
|
|
83
71
|
// Authorization: "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdGQiOiJNS1VGWnBQeEV1UHc5UXdvN21HU2tWNEl4VHN0blM3MHNyZUJTTWt3d3hiNDRhd3dDcWwxd09jIiwibWFuYWdlciI6Ik1LVXRhd3dpbTRsNXd3WW1LMWFJYXd3aW00bDV3d3d3eGI0NGF3d0s0a2pveHBPMnl6TFZ3dXBud3d4YjQ0YXd3cmxNNHRqZ3FKTExsTjMiLCJoYXNfaW5mb3MiOnRydWUsIm5yb3MiOlsiMjczIl0sImF1dGgiOiJNS1VncmxDdkdRbElGbXZVTERCSGplV0wyOXFVUHdyOVlSMVMyeXdJanlLOUNteCIsImlhdCI6MTY0ODQ3MzYxNSwiZXhwIjoxNjQ4NTYwMDE1fQ.KSG_6_9NfQhk5br7hnXzeLyVZuT69XLaEYF9XkdgmmQ"
|
|
84
72
|
// }
|
|
@@ -99,16 +87,16 @@ export default {
|
|
|
99
87
|
this.linkPreview.imageSource = image.url
|
|
100
88
|
? image.url
|
|
101
89
|
: image.url == ""
|
|
102
|
-
|
|
103
|
-
|
|
90
|
+
? ""
|
|
91
|
+
: image;
|
|
104
92
|
if (author || site_name || title)
|
|
105
93
|
this.linkPreview.author = title
|
|
106
94
|
? title
|
|
107
95
|
: author
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
96
|
+
? author
|
|
97
|
+
: site_name
|
|
98
|
+
? site_name
|
|
99
|
+
: "";
|
|
112
100
|
if (og.description) this.linkPreview.description = og.description;
|
|
113
101
|
}
|
|
114
102
|
if (theme_color) this.linkPreview.colorTheme = theme_color;
|
|
@@ -156,9 +144,11 @@ export default {
|
|
|
156
144
|
font-size: 0.615em;
|
|
157
145
|
font-weight: bold;
|
|
158
146
|
}
|
|
147
|
+
|
|
159
148
|
.link-preview-author.mb-0 {
|
|
160
149
|
margin-bottom: 0;
|
|
161
150
|
}
|
|
151
|
+
|
|
162
152
|
.link-preview-author h1 {
|
|
163
153
|
overflow: hidden;
|
|
164
154
|
text-overflow: ellipsis;
|
|
@@ -183,6 +173,7 @@ export default {
|
|
|
183
173
|
.link-preview:hover {
|
|
184
174
|
opacity: 1;
|
|
185
175
|
}
|
|
176
|
+
|
|
186
177
|
.link-preview:hover .link-preview-infos p {
|
|
187
178
|
text-decoration: underline;
|
|
188
179
|
}
|