vue-intergrall-plugins 0.0.159 → 0.0.162
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 +70 -20
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +95 -28
- package/package.json +1 -1
- package/src/lib-components/Chat/BtnFiles.vue +17 -2
- package/src/lib-components/Chat/MultipleFilePreview.vue +1 -1
- package/src/lib-components/Chat/StandardMessages.vue +69 -38
- package/src/lib-components/Chat/TextFooter.vue +7 -2
|
@@ -3266,7 +3266,7 @@ var script$k = {
|
|
|
3266
3266
|
required: true
|
|
3267
3267
|
},
|
|
3268
3268
|
file: {
|
|
3269
|
-
type:
|
|
3269
|
+
type: Array,
|
|
3270
3270
|
required: true
|
|
3271
3271
|
},
|
|
3272
3272
|
fileFormatError: {
|
|
@@ -3400,7 +3400,7 @@ var __vue_staticRenderFns__$k = [];
|
|
|
3400
3400
|
|
|
3401
3401
|
var __vue_inject_styles__$k = function __vue_inject_styles__(inject) {
|
|
3402
3402
|
if (!inject) return;
|
|
3403
|
-
inject("data-v-
|
|
3403
|
+
inject("data-v-55cbc293_0", {
|
|
3404
3404
|
source: ".multiple-file-preview{position:relative;display:flex;flex-direction:column;width:100%;height:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;border-top-left-radius:2.5px;border-top-right-radius:2.5px;transition:background-color 150ms;scrollbar-color:#888 rgba(0,0,0,.2);scrollbar-width:4px}.multiple-file-preview::-webkit-scrollbar{width:4px}.multiple-file-preview::-webkit-scrollbar-track{background-color:rgba(0,0,0,.2)}.multiple-file-preview::-webkit-scrollbar-thumb{transition-duration:.5s;background-color:#222}.multiple-file-preview::-webkit-scrollbar-thumb:hover{background-color:#555}.text-footer-invalid-format{color:#222;padding:10px}.text-footer-invalid-format h3{font-weight:500}.text-footer-invalid-format h4{font-size:.9rem}.text-footer-exclude-file{position:absolute;top:5px;right:5px;cursor:pointer;display:flex;justify-content:center;align-items:center;min-width:1rem;min-height:1rem;background-color:#fff;border-radius:50%}.text-footer-exclude-file svg{transition:color .2s;color:#e9594a}.text-footer-exclude-file svg:hover{color:#e74c3c}.file-preview{display:flex;width:100%;align-items:center;padding:5px 10px;transition:background-color 150ms}.file-preview:hover{background-color:rgba(0,0,0,.1)}.file-title{color:#222;display:flex;align-items:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding:4px 10px;background-color:#fff;border-radius:30px;display:inline-block}.file-title.red{color:#e74c3c;margin-left:5px}.file-title>svg{margin-right:5px}.small-img{flex:1;margin:0 15px;display:flex;justify-content:center;align-items:center;position:relative}.small-img img{height:40px;cursor:pointer}.small-img .pdf{display:flex;justify-content:center;align-items:center;font-size:30px;color:#e74c3c}.small-img .pdf svg{z-index:1}.small-img .pdf::after{content:\"\";position:absolute;bottom:2px;transform:translateY(2px);width:20px;height:20px;background-color:#fff}.img-container{padding:5px;border-radius:2.5px;background-color:rgba(0,0,0,.15);display:flex;justify-content:center;align-items:center}.delete-file{display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:#fff;min-width:1rem;min-height:1rem;cursor:pointer}.delete-file>svg{font-size:1rem;color:#e74c3c}",
|
|
3405
3405
|
map: undefined,
|
|
3406
3406
|
media: undefined
|
|
@@ -3412,7 +3412,7 @@ var __vue_inject_styles__$k = function __vue_inject_styles__(inject) {
|
|
|
3412
3412
|
var __vue_scope_id__$k = undefined;
|
|
3413
3413
|
/* module identifier */
|
|
3414
3414
|
|
|
3415
|
-
var __vue_module_identifier__$k = "data-v-
|
|
3415
|
+
var __vue_module_identifier__$k = "data-v-55cbc293";
|
|
3416
3416
|
/* functional template */
|
|
3417
3417
|
|
|
3418
3418
|
var __vue_is_functional_template__$k = false;
|
|
@@ -3450,11 +3450,16 @@ var script$j = {
|
|
|
3450
3450
|
hasButtonFiles: {
|
|
3451
3451
|
type: Boolean,
|
|
3452
3452
|
required: false
|
|
3453
|
+
},
|
|
3454
|
+
externalFiles: {
|
|
3455
|
+
type: Array,
|
|
3456
|
+
required: false
|
|
3453
3457
|
}
|
|
3454
3458
|
},
|
|
3455
3459
|
data: function data() {
|
|
3456
3460
|
return {
|
|
3457
3461
|
file: [],
|
|
3462
|
+
fileSize: 0,
|
|
3458
3463
|
openFiles: false,
|
|
3459
3464
|
showFilePreview: false,
|
|
3460
3465
|
imagePreview: "",
|
|
@@ -3472,6 +3477,13 @@ var script$j = {
|
|
|
3472
3477
|
return "isMsg";
|
|
3473
3478
|
}
|
|
3474
3479
|
},
|
|
3480
|
+
watch: {
|
|
3481
|
+
externalFiles: function externalFiles() {
|
|
3482
|
+
this.file = this.externalFiles;
|
|
3483
|
+
this.fileSize = this.externalFiles.length;
|
|
3484
|
+
multipleFileUpload();
|
|
3485
|
+
}
|
|
3486
|
+
},
|
|
3475
3487
|
methods: {
|
|
3476
3488
|
openFilesByClip: function openFilesByClip() {
|
|
3477
3489
|
if (this.fileSettings.multiple && !this.hasButtonFiles) {
|
|
@@ -3487,9 +3499,10 @@ var script$j = {
|
|
|
3487
3499
|
this.openFiles = !this.openFiles;
|
|
3488
3500
|
},
|
|
3489
3501
|
openSelectFileHandler: function openSelectFileHandler(type) {
|
|
3490
|
-
if (type == "system")
|
|
3491
|
-
|
|
3492
|
-
|
|
3502
|
+
if (type == "system") return this.$emit("open-file-system");
|
|
3503
|
+
|
|
3504
|
+
if (this.fileSettings.multiple) {
|
|
3505
|
+
type = 'both';
|
|
3493
3506
|
}
|
|
3494
3507
|
|
|
3495
3508
|
var fileInput = document.querySelector("#".concat(type, "-").concat(this.textId));
|
|
@@ -3518,12 +3531,14 @@ var script$j = {
|
|
|
3518
3531
|
},
|
|
3519
3532
|
fileUpload: function fileUpload(event, type, externalCall) {
|
|
3520
3533
|
try {
|
|
3534
|
+
this.fileSize = 0;
|
|
3521
3535
|
if (this.fileFormatError) this.file = [];
|
|
3522
3536
|
this.openFiles = false;
|
|
3523
3537
|
var filesAux = !externalCall ? event.target.files ? event.target.files : event.dataTransfer.files : event;
|
|
3524
3538
|
this.file = filesAux.length ? filesAux : this.file;
|
|
3525
3539
|
if (!this.file.length) return;
|
|
3526
3540
|
this.hasAnyFile = true;
|
|
3541
|
+
this.fileSize = this.file.length;
|
|
3527
3542
|
|
|
3528
3543
|
if (!this.fileSettings.multiple) {
|
|
3529
3544
|
this.file = this.file[0];
|
|
@@ -3673,13 +3688,13 @@ var __vue_render__$j = function __vue_render__() {
|
|
|
3673
3688
|
attrs: {
|
|
3674
3689
|
"name": "fade"
|
|
3675
3690
|
}
|
|
3676
|
-
}, [_vm.
|
|
3691
|
+
}, [_vm.fileSize > 0 ? _c('span', {
|
|
3677
3692
|
staticClass: "files-counter",
|
|
3678
3693
|
attrs: {
|
|
3679
3694
|
"title": _vm.dictionary.msg_abrir_anexos
|
|
3680
3695
|
},
|
|
3681
3696
|
domProps: {
|
|
3682
|
-
"textContent": _vm._s(_vm.
|
|
3697
|
+
"textContent": _vm._s(_vm.fileSize)
|
|
3683
3698
|
},
|
|
3684
3699
|
on: {
|
|
3685
3700
|
"click": function click($event) {
|
|
@@ -3802,7 +3817,7 @@ var __vue_staticRenderFns__$j = [];
|
|
|
3802
3817
|
|
|
3803
3818
|
var __vue_inject_styles__$j = function __vue_inject_styles__(inject) {
|
|
3804
3819
|
if (!inject) return;
|
|
3805
|
-
inject("data-v-
|
|
3820
|
+
inject("data-v-0352a8b0_0", {
|
|
3806
3821
|
source: ".fade-enter-active,.fade-leave-active{transition:opacity .3s}.fade-enter,.fade-leave-to{opacity:0}.files-counter{position:absolute;top:unset;transform:translate(17.5px,-15px);background-color:#888;z-index:1;font-size:.5rem;width:15px;height:15px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer;opacity:.9;transition:all .3s;color:#fff;font-weight:900}.files-counter:hover{opacity:1}",
|
|
3807
3822
|
map: undefined,
|
|
3808
3823
|
media: undefined
|
|
@@ -3814,7 +3829,7 @@ var __vue_inject_styles__$j = function __vue_inject_styles__(inject) {
|
|
|
3814
3829
|
var __vue_scope_id__$j = undefined;
|
|
3815
3830
|
/* module identifier */
|
|
3816
3831
|
|
|
3817
|
-
var __vue_module_identifier__$j = "data-v-
|
|
3832
|
+
var __vue_module_identifier__$j = "data-v-0352a8b0";
|
|
3818
3833
|
/* functional template */
|
|
3819
3834
|
|
|
3820
3835
|
var __vue_is_functional_template__$j = false;
|
|
@@ -7833,7 +7848,8 @@ var script$g = {
|
|
|
7833
7848
|
formatted_messages_2: [],
|
|
7834
7849
|
key_2: "",
|
|
7835
7850
|
formatted_messages_3: [],
|
|
7836
|
-
key_3: ""
|
|
7851
|
+
key_3: "",
|
|
7852
|
+
loadingReq: false
|
|
7837
7853
|
};
|
|
7838
7854
|
},
|
|
7839
7855
|
mounted: function mounted() {
|
|
@@ -7865,6 +7881,8 @@ var script$g = {
|
|
|
7865
7881
|
return;
|
|
7866
7882
|
}
|
|
7867
7883
|
|
|
7884
|
+
if (this.formatted_messages_3.length) this.formatted_messages_3 = [];
|
|
7885
|
+
if (this.key_3) this.key_3 = "";
|
|
7868
7886
|
this.receiveValueFormattedMessage("T/".concat(this.key_2), 3);
|
|
7869
7887
|
},
|
|
7870
7888
|
receiveValueFormattedMessage: function receiveValueFormattedMessage(cod, selectionIndex) {
|
|
@@ -7872,7 +7890,9 @@ var script$g = {
|
|
|
7872
7890
|
|
|
7873
7891
|
try {
|
|
7874
7892
|
if (!this.token_cliente) throw new Error("Informe token_cliente como chave na propriedade formattedMessageSettings que ocorre na chamada componente TextFooter ");
|
|
7893
|
+
this.loadingReq = true;
|
|
7875
7894
|
this.getStandardMessages(cod, this.token_cliente).then(function (data) {
|
|
7895
|
+
_this.loadingReq = false;
|
|
7876
7896
|
if (data && typeof data == 'string') return _this.$toasted.global.emConstrucao({
|
|
7877
7897
|
msg: data
|
|
7878
7898
|
});
|
|
@@ -7880,9 +7900,11 @@ var script$g = {
|
|
|
7880
7900
|
|
|
7881
7901
|
_this.$toasted.global.defaultError();
|
|
7882
7902
|
}).catch(function (e) {
|
|
7903
|
+
_this.loadingReq = false;
|
|
7883
7904
|
console.error("Error in getStandardMessages: ", e);
|
|
7884
7905
|
});
|
|
7885
7906
|
} catch (e) {
|
|
7907
|
+
this.loadingReq = false;
|
|
7886
7908
|
console.error("Error in receiveValueFormattedMessage: ", e);
|
|
7887
7909
|
}
|
|
7888
7910
|
},
|
|
@@ -8020,7 +8042,12 @@ var __vue_render__$g = function __vue_render__() {
|
|
|
8020
8042
|
"slot": "no-options"
|
|
8021
8043
|
},
|
|
8022
8044
|
slot: "no-options"
|
|
8023
|
-
}, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm._ssrNode(" "), _vm.
|
|
8045
|
+
}, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"transition-selects\">", "</div>", [_c('transition', {
|
|
8046
|
+
attrs: {
|
|
8047
|
+
"name": "fade",
|
|
8048
|
+
"mode": "out-in"
|
|
8049
|
+
}
|
|
8050
|
+
}, [_vm.formatted_messages_2.length && _vm.key_1 ? _c('div', [_c('v-select', {
|
|
8024
8051
|
staticClass: "text-footer-v-select",
|
|
8025
8052
|
style: "background-color: " + _vm.backgroundColor,
|
|
8026
8053
|
attrs: {
|
|
@@ -8047,7 +8074,16 @@ var __vue_render__$g = function __vue_render__() {
|
|
|
8047
8074
|
"slot": "no-options"
|
|
8048
8075
|
},
|
|
8049
8076
|
slot: "no-options"
|
|
8050
|
-
}, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])])
|
|
8077
|
+
}, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])])], 1) : _vm.key_1 && _vm.loadingReq ? _c('div', {
|
|
8078
|
+
staticClass: "loader-select"
|
|
8079
|
+
}, [_c('VueLoader')], 1) : _vm._e()]), _vm._ssrNode(" "), _c('transition', {
|
|
8080
|
+
attrs: {
|
|
8081
|
+
"name": "fade",
|
|
8082
|
+
"mode": "out-in"
|
|
8083
|
+
}
|
|
8084
|
+
}, [_vm.formatted_messages_3.length && _vm.key_2 ? _c('div', {
|
|
8085
|
+
staticClass: "text-footer-select-03"
|
|
8086
|
+
}, [_c('v-select', {
|
|
8051
8087
|
staticClass: "text-footer-v-select",
|
|
8052
8088
|
style: "background-color: " + _vm.backgroundColor,
|
|
8053
8089
|
attrs: {
|
|
@@ -8074,40 +8110,66 @@ var __vue_render__$g = function __vue_render__() {
|
|
|
8074
8110
|
"slot": "no-options"
|
|
8075
8111
|
},
|
|
8076
8112
|
slot: "no-options"
|
|
8077
|
-
}, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm.
|
|
8113
|
+
}, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm._v(" "), _vm.key_3.cod ? [_vm.messageType == 1 ? _c('span', {
|
|
8114
|
+
staticClass: "text-footer--btn-select-03",
|
|
8115
|
+
attrs: {
|
|
8116
|
+
"title": _vm.dictionary.title_btn_preencher_msg_formatada
|
|
8117
|
+
},
|
|
8118
|
+
on: {
|
|
8119
|
+
"click": function click($event) {
|
|
8120
|
+
return _vm.insertFormattedMessage(_vm.key_3);
|
|
8121
|
+
}
|
|
8122
|
+
}
|
|
8123
|
+
}, [_c('fa-icon', {
|
|
8078
8124
|
attrs: {
|
|
8079
8125
|
"icon": ['fas', 'level-up-alt']
|
|
8080
8126
|
}
|
|
8081
|
-
})], 1) : _vm.messageType == 2 ?
|
|
8127
|
+
})], 1) : _vm.messageType == 2 ? _c('span', {
|
|
8128
|
+
staticClass: "text-footer--btn-select-03",
|
|
8129
|
+
attrs: {
|
|
8130
|
+
"title": _vm.dictionary.title_btn_abrir_msg_tipo_2
|
|
8131
|
+
},
|
|
8132
|
+
on: {
|
|
8133
|
+
"click": function click($event) {
|
|
8134
|
+
return _vm.openFormattedMsgType2(_vm.key_3);
|
|
8135
|
+
}
|
|
8136
|
+
}
|
|
8137
|
+
}, [_c('fa-icon', {
|
|
8082
8138
|
attrs: {
|
|
8083
8139
|
"icon": ['fas', 'file-alt']
|
|
8084
8140
|
}
|
|
8085
|
-
})], 1) : _vm._e()] : _vm._e()], 2) : _vm.
|
|
8141
|
+
})], 1) : _vm._e()] : _vm._e()], 2) : _vm.key_2 && _vm.loadingReq ? _c('div', {
|
|
8142
|
+
staticClass: "loader-select"
|
|
8143
|
+
}, [_c('VueLoader')], 1) : _vm._e()])], 2)], 2);
|
|
8086
8144
|
};
|
|
8087
8145
|
|
|
8088
8146
|
var __vue_staticRenderFns__$g = [];
|
|
8089
8147
|
/* style */
|
|
8090
8148
|
|
|
8091
|
-
var __vue_inject_styles__$g =
|
|
8149
|
+
var __vue_inject_styles__$g = function __vue_inject_styles__(inject) {
|
|
8150
|
+
if (!inject) return;
|
|
8151
|
+
inject("data-v-9fe38344_0", {
|
|
8152
|
+
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}",
|
|
8153
|
+
map: undefined,
|
|
8154
|
+
media: undefined
|
|
8155
|
+
});
|
|
8156
|
+
};
|
|
8092
8157
|
/* scoped */
|
|
8093
8158
|
|
|
8159
|
+
|
|
8094
8160
|
var __vue_scope_id__$g = undefined;
|
|
8095
8161
|
/* module identifier */
|
|
8096
8162
|
|
|
8097
|
-
var __vue_module_identifier__$g = "data-v-
|
|
8163
|
+
var __vue_module_identifier__$g = "data-v-9fe38344";
|
|
8098
8164
|
/* functional template */
|
|
8099
8165
|
|
|
8100
8166
|
var __vue_is_functional_template__$g = false;
|
|
8101
|
-
/* style inject */
|
|
8102
|
-
|
|
8103
|
-
/* style inject SSR */
|
|
8104
|
-
|
|
8105
8167
|
/* style inject shadow dom */
|
|
8106
8168
|
|
|
8107
8169
|
var __vue_component__$n = /*#__PURE__*/normalizeComponent({
|
|
8108
8170
|
render: __vue_render__$g,
|
|
8109
8171
|
staticRenderFns: __vue_staticRenderFns__$g
|
|
8110
|
-
}, __vue_inject_styles__$g, __vue_script__$g, __vue_scope_id__$g, __vue_is_functional_template__$g, __vue_module_identifier__$g, false, undefined,
|
|
8172
|
+
}, __vue_inject_styles__$g, __vue_script__$g, __vue_scope_id__$g, __vue_is_functional_template__$g, __vue_module_identifier__$g, false, undefined, createInjectorSSR, undefined);
|
|
8111
8173
|
|
|
8112
8174
|
var StandardMessages = __vue_component__$n;//
|
|
8113
8175
|
var script$f = {
|
|
@@ -8213,6 +8275,10 @@ var script$f = {
|
|
|
8213
8275
|
hasButtonFiles: {
|
|
8214
8276
|
type: Boolean,
|
|
8215
8277
|
required: false
|
|
8278
|
+
},
|
|
8279
|
+
externalFiles: {
|
|
8280
|
+
type: Array,
|
|
8281
|
+
require: false
|
|
8216
8282
|
}
|
|
8217
8283
|
},
|
|
8218
8284
|
data: function data() {
|
|
@@ -8397,8 +8463,8 @@ var script$f = {
|
|
|
8397
8463
|
openImage: function openImage(imagePreview) {
|
|
8398
8464
|
this.$emit("open-image", imagePreview);
|
|
8399
8465
|
},
|
|
8400
|
-
openFileSystem: function openFileSystem(
|
|
8401
|
-
this.$emit("open-file-system"
|
|
8466
|
+
openFileSystem: function openFileSystem() {
|
|
8467
|
+
this.$emit("open-file-system");
|
|
8402
8468
|
},
|
|
8403
8469
|
setAudio: function setAudio(audioObj) {
|
|
8404
8470
|
var audioFile = audioObj.audioFile,
|
|
@@ -8634,7 +8700,8 @@ var __vue_render__$f = function __vue_render__() {
|
|
|
8634
8700
|
"dictionary": _vm.dictionary,
|
|
8635
8701
|
"fileSettings": _vm.fileSettings,
|
|
8636
8702
|
"cssStyle": _vm.cssStyle,
|
|
8637
|
-
"hasButtonFiles": _vm.hasButtonFiles
|
|
8703
|
+
"hasButtonFiles": _vm.hasButtonFiles,
|
|
8704
|
+
"externalFiles": _vm.externalFiles
|
|
8638
8705
|
},
|
|
8639
8706
|
on: {
|
|
8640
8707
|
"set-file-vars": _vm.setFileVars,
|
|
@@ -8685,7 +8752,7 @@ var __vue_staticRenderFns__$f = [];
|
|
|
8685
8752
|
|
|
8686
8753
|
var __vue_inject_styles__$f = function __vue_inject_styles__(inject) {
|
|
8687
8754
|
if (!inject) return;
|
|
8688
|
-
inject("data-v-
|
|
8755
|
+
inject("data-v-35ab0f5c_0", {
|
|
8689
8756
|
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}",
|
|
8690
8757
|
map: undefined,
|
|
8691
8758
|
media: undefined
|
|
@@ -8697,7 +8764,7 @@ var __vue_inject_styles__$f = function __vue_inject_styles__(inject) {
|
|
|
8697
8764
|
var __vue_scope_id__$f = undefined;
|
|
8698
8765
|
/* module identifier */
|
|
8699
8766
|
|
|
8700
|
-
var __vue_module_identifier__$f = "data-v-
|
|
8767
|
+
var __vue_module_identifier__$f = "data-v-35ab0f5c";
|
|
8701
8768
|
/* functional template */
|
|
8702
8769
|
|
|
8703
8770
|
var __vue_is_functional_template__$f = false;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span class="text-footer-actions--btn" :class="{'files-activated' : openFiles || file.length}" @click="openFilesByClip()">
|
|
3
3
|
<transition name="fade">
|
|
4
|
-
<span v-if="
|
|
4
|
+
<span v-if="fileSize > 0" class="files-counter" v-text="fileSize" @click.stop="toggleFilePreview" :title="dictionary.msg_abrir_anexos"></span>
|
|
5
5
|
</transition>
|
|
6
6
|
<fa-icon :icon="['fas', 'paperclip']" :title="dictionary.title_selecionar_anexo" />
|
|
7
7
|
<transition name="show">
|
|
@@ -112,11 +112,16 @@ export default {
|
|
|
112
112
|
hasButtonFiles: {
|
|
113
113
|
type: Boolean,
|
|
114
114
|
required: false
|
|
115
|
+
},
|
|
116
|
+
externalFiles: {
|
|
117
|
+
type: Array,
|
|
118
|
+
required: false
|
|
115
119
|
}
|
|
116
120
|
},
|
|
117
121
|
data() {
|
|
118
122
|
return {
|
|
119
123
|
file: [],
|
|
124
|
+
fileSize: 0,
|
|
120
125
|
openFiles: false,
|
|
121
126
|
showFilePreview: false,
|
|
122
127
|
imagePreview: "",
|
|
@@ -134,6 +139,13 @@ export default {
|
|
|
134
139
|
return "isMsg"
|
|
135
140
|
}
|
|
136
141
|
},
|
|
142
|
+
watch: {
|
|
143
|
+
externalFiles() {
|
|
144
|
+
this.file = this.externalFiles
|
|
145
|
+
this.fileSize = this.externalFiles.length
|
|
146
|
+
multipleFileUpload()
|
|
147
|
+
}
|
|
148
|
+
},
|
|
137
149
|
methods: {
|
|
138
150
|
openFilesByClip(){
|
|
139
151
|
if(this.fileSettings.multiple && !this.hasButtonFiles){
|
|
@@ -148,7 +160,8 @@ export default {
|
|
|
148
160
|
this.openFiles = !this.openFiles
|
|
149
161
|
},
|
|
150
162
|
openSelectFileHandler(type) {
|
|
151
|
-
if(type == "system")
|
|
163
|
+
if(type == "system") return this.$emit("open-file-system")
|
|
164
|
+
if(this.fileSettings.multiple){ type = 'both' }
|
|
152
165
|
const fileInput = document.querySelector(`#${type}-${this.textId}`)
|
|
153
166
|
if(fileInput) fileInput.click()
|
|
154
167
|
if(!fileInput) if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError()
|
|
@@ -172,6 +185,7 @@ export default {
|
|
|
172
185
|
},
|
|
173
186
|
fileUpload(event, type, externalCall) {
|
|
174
187
|
try {
|
|
188
|
+
this.fileSize = 0
|
|
175
189
|
if(this.fileFormatError) this.file = []
|
|
176
190
|
this.openFiles = false
|
|
177
191
|
let filesAux = !externalCall ? event.target.files ? event.target.files : event.dataTransfer.files : event
|
|
@@ -179,6 +193,7 @@ export default {
|
|
|
179
193
|
|
|
180
194
|
if(!this.file.length) return
|
|
181
195
|
this.hasAnyFile = true
|
|
196
|
+
this.fileSize = this.file.length
|
|
182
197
|
if(!this.fileSettings.multiple) {
|
|
183
198
|
this.file = this.file[0]
|
|
184
199
|
this.singleFileUpload(type, this.file.name)
|
|
@@ -70,7 +70,7 @@ export default {
|
|
|
70
70
|
},
|
|
71
71
|
props: {
|
|
72
72
|
dictionary: { type: Object, required: true },
|
|
73
|
-
file: { type:
|
|
73
|
+
file: { type: Array, required: true },
|
|
74
74
|
fileFormatError: { type: Boolean, required: false },
|
|
75
75
|
validFileFormats: { type: String, required: false, default: "" }
|
|
76
76
|
},
|
|
@@ -13,46 +13,68 @@
|
|
|
13
13
|
>
|
|
14
14
|
<div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
|
|
15
15
|
</v-select>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
16
|
+
<div class="transition-selects">
|
|
17
|
+
<transition name="fade" mode="out-in">
|
|
18
|
+
<div v-if="formatted_messages_2.length && key_1">
|
|
19
|
+
<v-select
|
|
20
|
+
:style="`background-color: ${backgroundColor}`"
|
|
21
|
+
appendToBody
|
|
22
|
+
:calculatePosition="calculateSelectPosition"
|
|
23
|
+
class="text-footer-v-select"
|
|
24
|
+
:options="formatted_messages_2"
|
|
25
|
+
label="value"
|
|
26
|
+
v-model="key_2"
|
|
27
|
+
:reduce="formatted_messages_2 => formatted_messages_2.cod"
|
|
28
|
+
@input="inputSelectKey2"
|
|
29
|
+
>
|
|
30
|
+
<div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
|
|
31
|
+
</v-select>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="loader-select" v-else-if="key_1 && loadingReq">
|
|
34
|
+
<VueLoader />
|
|
35
|
+
</div>
|
|
36
|
+
</transition>
|
|
37
|
+
<transition name="fade" mode="out-in">
|
|
38
|
+
<div class="text-footer-select-03" v-if="formatted_messages_3.length && key_2">
|
|
39
|
+
<v-select
|
|
40
|
+
:style="`background-color: ${backgroundColor}`"
|
|
41
|
+
appendToBody
|
|
42
|
+
:calculatePosition="calculateSelectPosition"
|
|
43
|
+
class="text-footer-v-select"
|
|
44
|
+
:options="formatted_messages_3"
|
|
45
|
+
label="value"
|
|
46
|
+
:clearable="false"
|
|
47
|
+
@input="openMsg()"
|
|
48
|
+
v-model="key_3"
|
|
49
|
+
>
|
|
50
|
+
<div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
|
|
51
|
+
</v-select>
|
|
52
|
+
<template v-if="key_3.cod">
|
|
53
|
+
<span class="text-footer--btn-select-03" v-if="messageType == 1" :title="dictionary.title_btn_preencher_msg_formatada" @click="insertFormattedMessage(key_3)">
|
|
54
|
+
<fa-icon :icon="['fas', 'level-up-alt']" />
|
|
55
|
+
</span>
|
|
56
|
+
<span class="text-footer--btn-select-03" v-else-if="messageType == 2" :title="dictionary.title_btn_abrir_msg_tipo_2" @click="openFormattedMsgType2(key_3)">
|
|
57
|
+
<fa-icon :icon="['fas', 'file-alt']" />
|
|
58
|
+
</span>
|
|
59
|
+
</template>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="loader-select" v-else-if="key_2 && loadingReq">
|
|
62
|
+
<VueLoader />
|
|
63
|
+
</div>
|
|
64
|
+
</transition>
|
|
52
65
|
</div>
|
|
53
66
|
</div>
|
|
54
67
|
</template>
|
|
55
68
|
|
|
69
|
+
<style>
|
|
70
|
+
.transition-selects {
|
|
71
|
+
min-height: 80px;display: flex; flex-direction: column; width: 100%;
|
|
72
|
+
}
|
|
73
|
+
.loader-select {
|
|
74
|
+
position: relative; min-height: 35px;background: #FFF;width: 100%; border: 1px solid #ccc;border-radius: 5px;z-index: 1;
|
|
75
|
+
}
|
|
76
|
+
</style>
|
|
77
|
+
|
|
56
78
|
<script>
|
|
57
79
|
|
|
58
80
|
import { createPopper } from "@popperjs/core"
|
|
@@ -95,7 +117,8 @@ export default {
|
|
|
95
117
|
formatted_messages_2: [],
|
|
96
118
|
key_2: "",
|
|
97
119
|
formatted_messages_3: [],
|
|
98
|
-
key_3: ""
|
|
120
|
+
key_3: "",
|
|
121
|
+
loadingReq: false
|
|
99
122
|
}
|
|
100
123
|
},
|
|
101
124
|
mounted() {
|
|
@@ -123,17 +146,25 @@ export default {
|
|
|
123
146
|
if(this.key_3) this.key_3 = ""
|
|
124
147
|
return
|
|
125
148
|
}
|
|
149
|
+
if(this.formatted_messages_3.length) this.formatted_messages_3 = []
|
|
150
|
+
if(this.key_3) this.key_3 = ""
|
|
126
151
|
this.receiveValueFormattedMessage(`T/${this.key_2}`, 3)
|
|
127
152
|
},
|
|
128
153
|
receiveValueFormattedMessage(cod, selectionIndex) {
|
|
129
154
|
try {
|
|
130
155
|
if(!this.token_cliente) throw new Error("Informe token_cliente como chave na propriedade formattedMessageSettings que ocorre na chamada componente TextFooter ")
|
|
156
|
+
this.loadingReq = true
|
|
131
157
|
this.getStandardMessages(cod, this.token_cliente).then((data) => {
|
|
158
|
+
this.loadingReq = false
|
|
132
159
|
if(data && typeof(data) == 'string') return this.$toasted.global.emConstrucao({msg: data})
|
|
133
160
|
if(data) return this.showFormattedMessage(data, selectionIndex)
|
|
134
161
|
this.$toasted.global.defaultError()
|
|
135
|
-
}).catch(e => {
|
|
162
|
+
}).catch(e => {
|
|
163
|
+
this.loadingReq = false
|
|
164
|
+
console.error("Error in getStandardMessages: ", e)
|
|
165
|
+
})
|
|
136
166
|
}catch(e) {
|
|
167
|
+
this.loadingReq = false
|
|
137
168
|
console.error("Error in receiveValueFormattedMessage: ", e)
|
|
138
169
|
}
|
|
139
170
|
},
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
:cssStyle="cssStyle"
|
|
65
65
|
:ref="`${textId}-file`"
|
|
66
66
|
:hasButtonFiles="hasButtonFiles"
|
|
67
|
+
:externalFiles="externalFiles"
|
|
67
68
|
@set-file-vars="setFileVars"
|
|
68
69
|
@open-image="openImage"
|
|
69
70
|
@open-file-system="openFileSystem"
|
|
@@ -165,6 +166,10 @@ export default {
|
|
|
165
166
|
hasButtonFiles: {
|
|
166
167
|
type: Boolean,
|
|
167
168
|
required: false
|
|
169
|
+
},
|
|
170
|
+
externalFiles: {
|
|
171
|
+
type: Array,
|
|
172
|
+
require: false
|
|
168
173
|
}
|
|
169
174
|
},
|
|
170
175
|
data() {
|
|
@@ -345,8 +350,8 @@ export default {
|
|
|
345
350
|
openImage(imagePreview) {
|
|
346
351
|
this.$emit("open-image", imagePreview)
|
|
347
352
|
},
|
|
348
|
-
openFileSystem(
|
|
349
|
-
this.$emit("open-file-system"
|
|
353
|
+
openFileSystem() {
|
|
354
|
+
this.$emit("open-file-system")
|
|
350
355
|
},
|
|
351
356
|
setAudio(audioObj) {
|
|
352
357
|
const { audioFile, audioSource } = audioObj
|