vue-intergrall-plugins 0.0.168 → 0.0.169
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.
|
@@ -8269,7 +8269,7 @@ axios_1.default = _default;
|
|
|
8269
8269
|
var axios = axios_1;
|
|
8270
8270
|
|
|
8271
8271
|
vue.prototype.$httpRequest = axios;
|
|
8272
|
-
const baseURL = window.location.hostname == 'localhost' ? `https://linux07/im/atdHumano/middleware/
|
|
8272
|
+
const baseURL = window.location.hostname == 'localhost' ? `https://linux07/im/atdHumano/middleware/smartchannel_api.php` : `https://${window.location.hostname}/im/atdHumano/middleware/smartchannel_api.php`;
|
|
8273
8273
|
const dev = window.location.hostname == 'localhost' ? '&teste=levchat2' : '';
|
|
8274
8274
|
const standardMessages = {
|
|
8275
8275
|
methods: {
|
|
@@ -8277,10 +8277,10 @@ const standardMessages = {
|
|
|
8277
8277
|
try {
|
|
8278
8278
|
return this.$httpRequest({
|
|
8279
8279
|
method: 'get',
|
|
8280
|
-
url: `${baseURL}/
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8280
|
+
url: `${baseURL}/messages/${type}?token_cliente=${token}${dev}`,
|
|
8281
|
+
headers: {
|
|
8282
|
+
Authorization: "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdGQiOiJNS1VuWHd3eGI0NGF3dzkwVVRXOGlIYUREd2doNm1sOFB0RVdoUHRWUjRHZW5YNnd3aW00bDV3d3M5SHB0bUIiLCJtYW5hZ2VyIjoiTUtVWHJHY2hOUlRZTkF3aHRvVUxldmtJYUdHcW9vSTVad3d4YjQ0YXd3ODRZQWxIVXpPZFZ3d3hiNDRhd3dpIiwibnJvcyI6WyI0OCJdLCJhdXRoIjoiTUtVd3d4YjQ0YXd3ZFVQVXQwVUlhaTNwanFGcmlQZ2dtaTY0SkViVnJJOXVjWFdBODRXRzR5ciIsImlhdCI6MTY0NjY1NzA0OSwiZXhwIjoxNjQ2NzQzNDQ5fQ.MqUARy1bbSc0iSOBcERwPYesIf-AdDcZaHa1yvn3RDM"
|
|
8283
|
+
}
|
|
8284
8284
|
}).then(response => {
|
|
8285
8285
|
const {
|
|
8286
8286
|
data
|
|
@@ -8288,11 +8288,14 @@ const standardMessages = {
|
|
|
8288
8288
|
const {
|
|
8289
8289
|
tipo,
|
|
8290
8290
|
nivel,
|
|
8291
|
+
conteudo,
|
|
8291
8292
|
msg_ret,
|
|
8292
8293
|
st_ret
|
|
8293
8294
|
} = data;
|
|
8294
8295
|
if (tipo) this.$emit('set-message-type', tipo);
|
|
8295
|
-
return st_ret === 'OK' ? nivel : st_ret === 'AVISO' ?
|
|
8296
|
+
return st_ret === 'OK' ? conteudo ? conteudo : nivel : st_ret === 'AVISO' ? {
|
|
8297
|
+
msg_ret
|
|
8298
|
+
} : false;
|
|
8296
8299
|
}).catch(err => console.error('Erro na requisicao para o servidor', err));
|
|
8297
8300
|
} catch (e) {
|
|
8298
8301
|
console.error("Axios nao identificado");
|
|
@@ -8391,8 +8394,8 @@ var script$g = {
|
|
|
8391
8394
|
this.loadingReq = true;
|
|
8392
8395
|
this.getStandardMessages(cod, this.token_cliente).then(data => {
|
|
8393
8396
|
this.loadingReq = false;
|
|
8394
|
-
if (data
|
|
8395
|
-
msg: data
|
|
8397
|
+
if (data.msg_ret) return this.$toasted.global.emConstrucao({
|
|
8398
|
+
msg: data.msg_ret
|
|
8396
8399
|
});
|
|
8397
8400
|
if (data) return this.showFormattedMessage(data, selectionIndex);
|
|
8398
8401
|
this.$toasted.global.defaultError();
|
|
@@ -8410,7 +8413,7 @@ var script$g = {
|
|
|
8410
8413
|
try {
|
|
8411
8414
|
let success = false;
|
|
8412
8415
|
if (Array.isArray(messageData)) success = true;
|
|
8413
|
-
if (!success) this.$toasted.global.emConstrucao({
|
|
8416
|
+
if (!success && selectionIndex != 4) this.$toasted.global.emConstrucao({
|
|
8414
8417
|
msg: messageData ? messageData.msg : "Nao foi possível obter mensagens"
|
|
8415
8418
|
});
|
|
8416
8419
|
|
|
@@ -8440,24 +8443,24 @@ var script$g = {
|
|
|
8440
8443
|
});
|
|
8441
8444
|
this.$emit("close-blocker-standard-message");
|
|
8442
8445
|
} else {
|
|
8443
|
-
if (
|
|
8444
|
-
this.formatted_messages_3.push(this.dictionary.msg_erro_sem_msg_formatada);
|
|
8445
|
-
this.key_3 = this.formatted_messages_3[0];
|
|
8446
|
-
this.openFormattedMsgType2(this.key_3);
|
|
8447
|
-
} else {
|
|
8446
|
+
if (messageData.length) {
|
|
8448
8447
|
this.formatted_messages_3 = messageData;
|
|
8449
8448
|
|
|
8450
|
-
if (this.formatted_messages_3.length == 1) {
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
this.openFormattedMsgType2(this.key_3);
|
|
8454
|
-
}
|
|
8449
|
+
if (this.formatted_messages_3.length == 1 && this.formatted_messages_3[0].cod) {
|
|
8450
|
+
this.key_3 = this.formatted_messages_3[0].cod;
|
|
8451
|
+
this.openMsg();
|
|
8455
8452
|
}
|
|
8456
8453
|
}
|
|
8457
8454
|
}
|
|
8458
8455
|
|
|
8459
8456
|
break;
|
|
8460
8457
|
|
|
8458
|
+
case 4:
|
|
8459
|
+
const finalMessage = `${this.message}${this.message && !this.message.endsWith(" ") ? ` ${messageData}` : messageData}`;
|
|
8460
|
+
return messageData ? this.$emit("add-standard-message", finalMessage) : this.$toasted.global.emConstrucao({
|
|
8461
|
+
msg: 'Mensagem vazia'
|
|
8462
|
+
});
|
|
8463
|
+
|
|
8461
8464
|
default:
|
|
8462
8465
|
console.error("Error in showFormattedMessage: selectionIndex not found");
|
|
8463
8466
|
break;
|
|
@@ -8469,8 +8472,7 @@ var script$g = {
|
|
|
8469
8472
|
|
|
8470
8473
|
openMsg() {
|
|
8471
8474
|
try {
|
|
8472
|
-
|
|
8473
|
-
this.openFormattedMsgType2(this.key_3);
|
|
8475
|
+
this.messageType == 1 ? this.insertFormattedMessage(this.key_3) : this.openFormattedMsgType2(this.key_3);
|
|
8474
8476
|
} catch (e) {
|
|
8475
8477
|
console.error("Error in openMsg: ", e);
|
|
8476
8478
|
}
|
|
@@ -8494,9 +8496,8 @@ var script$g = {
|
|
|
8494
8496
|
try {
|
|
8495
8497
|
if (!this.key_3) return this.$toasted.global.defaultError({
|
|
8496
8498
|
msg: 'Selecione uma mensagem'
|
|
8497
|
-
});
|
|
8498
|
-
|
|
8499
|
-
// return value ? this.$emit("add-standard-message", finalMessage) : this.$toasted.global.emConstrucao({msg: 'Mensagem vazia'})
|
|
8499
|
+
});
|
|
8500
|
+
this.receiveValueFormattedMessage(`T/${this.key_2}/${this.key_3}`, 4);
|
|
8500
8501
|
} catch (e) {
|
|
8501
8502
|
console.error("Erro ao inserir mensagem formatada: ", e);
|
|
8502
8503
|
}
|
|
@@ -8595,6 +8596,9 @@ var __vue_render__$g = function () {
|
|
|
8595
8596
|
"appendToBody": "",
|
|
8596
8597
|
"calculatePosition": _vm.calculateSelectPosition,
|
|
8597
8598
|
"options": _vm.formatted_messages_3,
|
|
8599
|
+
"reduce": function (formatted_messages_3) {
|
|
8600
|
+
return formatted_messages_3.cod;
|
|
8601
|
+
},
|
|
8598
8602
|
"label": "value",
|
|
8599
8603
|
"clearable": false
|
|
8600
8604
|
},
|
|
@@ -8615,7 +8619,24 @@ var __vue_render__$g = function () {
|
|
|
8615
8619
|
"slot": "no-options"
|
|
8616
8620
|
},
|
|
8617
8621
|
slot: "no-options"
|
|
8618
|
-
}, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm._v(" "), _vm.key_3.
|
|
8622
|
+
}, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm._v(" "), _vm.key_3 && _vm.messageType == 1 ? _c('span', {
|
|
8623
|
+
staticClass: "text-footer--btn-select-03",
|
|
8624
|
+
class: {
|
|
8625
|
+
'loading-message': _vm.loadingReq
|
|
8626
|
+
},
|
|
8627
|
+
attrs: {
|
|
8628
|
+
"title": _vm.dictionary.title_btn_preencher_msg_formatada
|
|
8629
|
+
},
|
|
8630
|
+
on: {
|
|
8631
|
+
"click": function ($event) {
|
|
8632
|
+
return _vm.insertFormattedMessage(_vm.key_3);
|
|
8633
|
+
}
|
|
8634
|
+
}
|
|
8635
|
+
}, [_vm.loadingReq ? _c('VueLoader') : _c('fa-icon', {
|
|
8636
|
+
attrs: {
|
|
8637
|
+
"icon": ['fas', 'level-up-alt']
|
|
8638
|
+
}
|
|
8639
|
+
})], 1) : _vm.key_3 && _vm.messageType == 2 ? _c('span', {
|
|
8619
8640
|
staticClass: "text-footer--btn-select-03",
|
|
8620
8641
|
attrs: {
|
|
8621
8642
|
"title": _vm.dictionary.title_btn_abrir_msg_tipo_2
|
|
@@ -8629,7 +8650,7 @@ var __vue_render__$g = function () {
|
|
|
8629
8650
|
attrs: {
|
|
8630
8651
|
"icon": ['fas', 'file-alt']
|
|
8631
8652
|
}
|
|
8632
|
-
})], 1)
|
|
8653
|
+
})], 1) : _vm._e()], 1) : _vm.key_2 && _vm.loadingReq ? _c('div', {
|
|
8633
8654
|
staticClass: "loader-select"
|
|
8634
8655
|
}, [_c('VueLoader')], 1) : _vm._e()])], 1)], 1);
|
|
8635
8656
|
};
|
|
@@ -8639,8 +8660,8 @@ var __vue_staticRenderFns__$g = [];
|
|
|
8639
8660
|
|
|
8640
8661
|
const __vue_inject_styles__$g = function (inject) {
|
|
8641
8662
|
if (!inject) return;
|
|
8642
|
-
inject("data-v-
|
|
8643
|
-
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}",
|
|
8663
|
+
inject("data-v-4b879b5e_0", {
|
|
8664
|
+
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}",
|
|
8644
8665
|
map: undefined,
|
|
8645
8666
|
media: undefined
|
|
8646
8667
|
});
|
|
@@ -8809,23 +8830,23 @@ var script$f = {
|
|
|
8809
8830
|
|
|
8810
8831
|
methods: {
|
|
8811
8832
|
listenerPostMessage(event) {
|
|
8833
|
+
const baseURL = window.location.hostname == 'localhost' ? `https://linux07` : `https://${window.location.hostname}`;
|
|
8812
8834
|
if (!this.formattedMessageSettings.hasStandardMessages) return;
|
|
8813
8835
|
if (event.data.gerenciador || event.data.abrirFishing || event.data.multiplos_contatos || event.data.inserir_cliente_omni || event.data.multiple_contatos) return;
|
|
8814
8836
|
|
|
8815
|
-
if (event.
|
|
8816
|
-
if (this.showStandardMessages) {
|
|
8837
|
+
if (event.origin == baseURL) {
|
|
8838
|
+
if (event.data == '' && this.showStandardMessages) {
|
|
8839
|
+
this.closeBlockerStandardMessage();
|
|
8840
|
+
this.toggleStandardMessages();
|
|
8841
|
+
this.$toasted.global.emConstrucao({
|
|
8842
|
+
msg: this.dictionary.msg_erro_sem_msg_formatada
|
|
8843
|
+
});
|
|
8844
|
+
} else if (typeof event.data === "string" && this.showStandardMessages) {
|
|
8845
|
+
this.message = event.data;
|
|
8846
|
+
this.focusTextarea();
|
|
8817
8847
|
this.closeBlockerStandardMessage();
|
|
8818
8848
|
this.toggleStandardMessages();
|
|
8819
8849
|
}
|
|
8820
|
-
|
|
8821
|
-
this.$toasted.global.emConstrucao({
|
|
8822
|
-
msg: this.dicionario.msg_erro_sem_msg_formatada
|
|
8823
|
-
});
|
|
8824
|
-
} else if (typeof event.data === "string") {
|
|
8825
|
-
this.message = event.data;
|
|
8826
|
-
this.focusTextarea();
|
|
8827
|
-
this.closeBlockerStandardMessage();
|
|
8828
|
-
this.toggleStandardMessages();
|
|
8829
8850
|
}
|
|
8830
8851
|
},
|
|
8831
8852
|
|
|
@@ -9392,7 +9413,7 @@ var __vue_staticRenderFns__$f = [];
|
|
|
9392
9413
|
|
|
9393
9414
|
const __vue_inject_styles__$f = function (inject) {
|
|
9394
9415
|
if (!inject) return;
|
|
9395
|
-
inject("data-v-
|
|
9416
|
+
inject("data-v-3d59a30a_0", {
|
|
9396
9417
|
source: ".toasted svg{margin-right:10px}.d-none{display:none}ul{list-style-type:none}.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:.875rem;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:.875rem;font-family:inherit;background:inherit}.text-footer-container textarea:focus{outline:unset}.text-footer-container textarea::placeholder{font-size:.75rem}.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:1rem;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:.575rem;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:-42px;right:2px;background-color:#ddd;box-shadow:inset 0 -10px 5px -11px rgba(0,0,0,.5)}.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:1rem;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:1rem}.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:1rem;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;margin-right:5px}.text-footer-container .text-footer-files-container .files-btn.system{background-color:#49a349}.text-footer-container .text-footer-preview-container{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}.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:.8rem;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:.8rem;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:.85rem!important}.emoji-mart-anchor,.emoji-mart-emoji span{cursor:pointer!important}.emoji-mart{z-index:2!important}.emoji-mart-scroll{overflow-x:hidden}",
|
|
9397
9418
|
map: undefined,
|
|
9398
9419
|
media: undefined
|