vue-intergrall-plugins 0.0.5 → 0.0.9
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 +1342 -516
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +1219 -479
- package/package.json +1 -1
- package/src/lib-components/Chat/BtnFiles.vue +257 -0
- package/src/lib-components/Chat/BtnMic.vue +60 -0
- package/src/lib-components/Chat/MultipleFilePreview.vue +197 -0
- package/src/lib-components/Chat/RemainingCharacters.vue +28 -0
- package/src/lib-components/Chat/SingleFilePreview.vue +46 -0
- package/src/lib-components/Chat/TextFooter.vue +169 -202
- package/src/lib-components/Loader/{ReqLoader.vue → Loader.vue} +0 -0
- package/src/lib-components/Templates/TemplateMessage.vue +0 -7
- package/src/lib-components/Templates/TemplateSingle.vue +15 -4
|
@@ -1742,7 +1742,7 @@ var createPopper = /*#__PURE__*/popperGenerator({
|
|
|
1742
1742
|
//
|
|
1743
1743
|
//
|
|
1744
1744
|
//
|
|
1745
|
-
var script$
|
|
1745
|
+
var script$a = {
|
|
1746
1746
|
data: function data() {
|
|
1747
1747
|
return {
|
|
1748
1748
|
varValues: {},
|
|
@@ -1919,9 +1919,21 @@ var script$5 = {
|
|
|
1919
1919
|
}
|
|
1920
1920
|
},
|
|
1921
1921
|
isValid: function isValid(textValue) {
|
|
1922
|
-
var regex =
|
|
1922
|
+
var regex = {
|
|
1923
|
+
htmlTags: /<\/?[\d\w\s=\-:\.\/\'\";]+>/gi,
|
|
1924
|
+
enter: /\n/g,
|
|
1925
|
+
consecutiveSpaces: /\s{3,}/g
|
|
1926
|
+
};
|
|
1923
1927
|
var value = textValue ? textValue.trim("") : "";
|
|
1924
|
-
|
|
1928
|
+
if (!value.length) return false;
|
|
1929
|
+
var isValueValid = true;
|
|
1930
|
+
|
|
1931
|
+
for (var key in regex) {
|
|
1932
|
+
if (!isValueValid) return isValueValid;
|
|
1933
|
+
if (regex[key].test(value)) isValueValid = false;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
return isValueValid;
|
|
1925
1937
|
},
|
|
1926
1938
|
setVar: function setVar(event, key, notificar) {
|
|
1927
1939
|
if (event && event.target) {
|
|
@@ -2015,10 +2027,10 @@ var script$5 = {
|
|
|
2015
2027
|
}
|
|
2016
2028
|
return script;
|
|
2017
2029
|
}/* script */
|
|
2018
|
-
var __vue_script__$
|
|
2030
|
+
var __vue_script__$a = script$a;
|
|
2019
2031
|
/* template */
|
|
2020
2032
|
|
|
2021
|
-
var __vue_render__$
|
|
2033
|
+
var __vue_render__$a = function __vue_render__() {
|
|
2022
2034
|
var _vm = this;
|
|
2023
2035
|
|
|
2024
2036
|
var _h = _vm.$createElement;
|
|
@@ -2046,36 +2058,36 @@ var __vue_render__$5 = function __vue_render__() {
|
|
|
2046
2058
|
})], 2)]) : _vm._e()], 2);
|
|
2047
2059
|
};
|
|
2048
2060
|
|
|
2049
|
-
var __vue_staticRenderFns__$
|
|
2061
|
+
var __vue_staticRenderFns__$a = [];
|
|
2050
2062
|
/* style */
|
|
2051
2063
|
|
|
2052
|
-
var __vue_inject_styles__$
|
|
2064
|
+
var __vue_inject_styles__$a = undefined;
|
|
2053
2065
|
/* scoped */
|
|
2054
2066
|
|
|
2055
|
-
var __vue_scope_id__$
|
|
2067
|
+
var __vue_scope_id__$a = undefined;
|
|
2056
2068
|
/* module identifier */
|
|
2057
2069
|
|
|
2058
|
-
var __vue_module_identifier__$
|
|
2070
|
+
var __vue_module_identifier__$a = "data-v-4f6e98c8";
|
|
2059
2071
|
/* functional template */
|
|
2060
2072
|
|
|
2061
|
-
var __vue_is_functional_template__$
|
|
2073
|
+
var __vue_is_functional_template__$a = false;
|
|
2062
2074
|
/* style inject */
|
|
2063
2075
|
|
|
2064
2076
|
/* style inject SSR */
|
|
2065
2077
|
|
|
2066
2078
|
/* style inject shadow dom */
|
|
2067
2079
|
|
|
2068
|
-
var __vue_component__$
|
|
2069
|
-
render: __vue_render__$
|
|
2070
|
-
staticRenderFns: __vue_staticRenderFns__$
|
|
2071
|
-
}, __vue_inject_styles__$
|
|
2080
|
+
var __vue_component__$b = /*#__PURE__*/normalizeComponent({
|
|
2081
|
+
render: __vue_render__$a,
|
|
2082
|
+
staticRenderFns: __vue_staticRenderFns__$a
|
|
2083
|
+
}, __vue_inject_styles__$a, __vue_script__$a, __vue_scope_id__$a, __vue_is_functional_template__$a, __vue_module_identifier__$a, false, undefined, undefined, undefined);
|
|
2072
2084
|
|
|
2073
|
-
var TemplateSingle = __vue_component__$
|
|
2085
|
+
var TemplateSingle = __vue_component__$b;var setResizeListeners = function setResizeListeners($el, inputClass, parentClass) {
|
|
2074
2086
|
var inputTargets = $el.querySelectorAll(inputClass);
|
|
2075
2087
|
inputTargets.forEach(function (target) {
|
|
2076
2088
|
target.addEventListener("input", function () {
|
|
2077
2089
|
var currentHeight = target.scrollHeight;
|
|
2078
|
-
if (target.textLength == 0) currentHeight =
|
|
2090
|
+
if (target.textLength == 0) currentHeight = 30;
|
|
2079
2091
|
target.style.height = "auto";
|
|
2080
2092
|
target.style.height = "".concat(currentHeight, "px");
|
|
2081
2093
|
var parentTargets = $el.querySelectorAll(parentClass);
|
|
@@ -7812,7 +7824,7 @@ exports.default = { search: search, emojis: emojis, emoticons: emoticons };
|
|
|
7812
7824
|
/******/ ]);
|
|
7813
7825
|
});
|
|
7814
7826
|
});//
|
|
7815
|
-
var script$
|
|
7827
|
+
var script$9 = {
|
|
7816
7828
|
components: {
|
|
7817
7829
|
"picker": emojiMart.Picker
|
|
7818
7830
|
},
|
|
@@ -7893,10 +7905,10 @@ var script$4 = {
|
|
|
7893
7905
|
}
|
|
7894
7906
|
}
|
|
7895
7907
|
};/* script */
|
|
7896
|
-
var __vue_script__$
|
|
7908
|
+
var __vue_script__$9 = script$9;
|
|
7897
7909
|
/* template */
|
|
7898
7910
|
|
|
7899
|
-
var __vue_render__$
|
|
7911
|
+
var __vue_render__$9 = function __vue_render__() {
|
|
7900
7912
|
var _vm = this;
|
|
7901
7913
|
|
|
7902
7914
|
var _h = _vm.$createElement;
|
|
@@ -7936,37 +7948,37 @@ var __vue_render__$4 = function __vue_render__() {
|
|
|
7936
7948
|
})], 2);
|
|
7937
7949
|
};
|
|
7938
7950
|
|
|
7939
|
-
var __vue_staticRenderFns__$
|
|
7951
|
+
var __vue_staticRenderFns__$9 = [];
|
|
7940
7952
|
/* style */
|
|
7941
7953
|
|
|
7942
|
-
var __vue_inject_styles__$
|
|
7954
|
+
var __vue_inject_styles__$9 = undefined;
|
|
7943
7955
|
/* scoped */
|
|
7944
7956
|
|
|
7945
|
-
var __vue_scope_id__$
|
|
7957
|
+
var __vue_scope_id__$9 = undefined;
|
|
7946
7958
|
/* module identifier */
|
|
7947
7959
|
|
|
7948
|
-
var __vue_module_identifier__$
|
|
7960
|
+
var __vue_module_identifier__$9 = "data-v-7a052c7e";
|
|
7949
7961
|
/* functional template */
|
|
7950
7962
|
|
|
7951
|
-
var __vue_is_functional_template__$
|
|
7963
|
+
var __vue_is_functional_template__$9 = false;
|
|
7952
7964
|
/* style inject */
|
|
7953
7965
|
|
|
7954
7966
|
/* style inject SSR */
|
|
7955
7967
|
|
|
7956
7968
|
/* style inject shadow dom */
|
|
7957
7969
|
|
|
7958
|
-
var __vue_component__$
|
|
7959
|
-
render: __vue_render__$
|
|
7960
|
-
staticRenderFns: __vue_staticRenderFns__$
|
|
7961
|
-
}, __vue_inject_styles__$
|
|
7970
|
+
var __vue_component__$a = /*#__PURE__*/normalizeComponent({
|
|
7971
|
+
render: __vue_render__$9,
|
|
7972
|
+
staticRenderFns: __vue_staticRenderFns__$9
|
|
7973
|
+
}, __vue_inject_styles__$9, __vue_script__$9, __vue_scope_id__$9, __vue_is_functional_template__$9, __vue_module_identifier__$9, false, undefined, undefined, undefined);
|
|
7962
7974
|
|
|
7963
|
-
var EmojisTextFooter = __vue_component__$
|
|
7975
|
+
var EmojisTextFooter = __vue_component__$a;//
|
|
7964
7976
|
//
|
|
7965
7977
|
//
|
|
7966
7978
|
//
|
|
7967
7979
|
//
|
|
7968
7980
|
//
|
|
7969
|
-
var script$
|
|
7981
|
+
var script$8 = {
|
|
7970
7982
|
props: {
|
|
7971
7983
|
hasBg: {
|
|
7972
7984
|
type: Boolean,
|
|
@@ -8023,10 +8035,10 @@ function renderStyles(styles) {
|
|
|
8023
8035
|
}
|
|
8024
8036
|
return css;
|
|
8025
8037
|
}/* script */
|
|
8026
|
-
var __vue_script__$
|
|
8038
|
+
var __vue_script__$8 = script$8;
|
|
8027
8039
|
/* template */
|
|
8028
8040
|
|
|
8029
|
-
var __vue_render__$
|
|
8041
|
+
var __vue_render__$8 = function __vue_render__() {
|
|
8030
8042
|
var _vm = this;
|
|
8031
8043
|
|
|
8032
8044
|
var _h = _vm.$createElement;
|
|
@@ -8044,12 +8056,12 @@ var __vue_render__$3 = function __vue_render__() {
|
|
|
8044
8056
|
}) + "></div>")]);
|
|
8045
8057
|
};
|
|
8046
8058
|
|
|
8047
|
-
var __vue_staticRenderFns__$
|
|
8059
|
+
var __vue_staticRenderFns__$8 = [];
|
|
8048
8060
|
/* style */
|
|
8049
8061
|
|
|
8050
|
-
var __vue_inject_styles__$
|
|
8062
|
+
var __vue_inject_styles__$8 = function __vue_inject_styles__(inject) {
|
|
8051
8063
|
if (!inject) return;
|
|
8052
|
-
inject("data-v-
|
|
8064
|
+
inject("data-v-8ff43434_0", {
|
|
8053
8065
|
source: ".req-loader-container{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.req-loader-container.light-bg{background-color:rgba(0,0,0,.3);border-radius:inherit}.req-loader-container.align-right{justify-content:flex-end}.req-loader-container.align-right .req-loader{margin-right:15px}.req-loader{border:2px solid #ccc;border-top:2px solid #333;border-radius:50%;width:20px;height:20px;min-width:20px;min-height:20px;animation:spin 2s linear infinite}.req-loader.big{width:40px;height:40px;animation:spin 3s linear infinite}.req-loader.slow{animation:spin 4s linear infinite}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}",
|
|
8054
8066
|
map: undefined,
|
|
8055
8067
|
media: undefined
|
|
@@ -8058,209 +8070,1053 @@ var __vue_inject_styles__$3 = function __vue_inject_styles__(inject) {
|
|
|
8058
8070
|
/* scoped */
|
|
8059
8071
|
|
|
8060
8072
|
|
|
8061
|
-
var __vue_scope_id__$
|
|
8073
|
+
var __vue_scope_id__$8 = undefined;
|
|
8062
8074
|
/* module identifier */
|
|
8063
8075
|
|
|
8064
|
-
var __vue_module_identifier__$
|
|
8076
|
+
var __vue_module_identifier__$8 = "data-v-8ff43434";
|
|
8065
8077
|
/* functional template */
|
|
8066
8078
|
|
|
8067
|
-
var __vue_is_functional_template__$
|
|
8079
|
+
var __vue_is_functional_template__$8 = false;
|
|
8068
8080
|
/* style inject shadow dom */
|
|
8069
8081
|
|
|
8070
|
-
var __vue_component__$
|
|
8071
|
-
render: __vue_render__$
|
|
8072
|
-
staticRenderFns: __vue_staticRenderFns__$
|
|
8073
|
-
}, __vue_inject_styles__$
|
|
8082
|
+
var __vue_component__$9 = /*#__PURE__*/normalizeComponent({
|
|
8083
|
+
render: __vue_render__$8,
|
|
8084
|
+
staticRenderFns: __vue_staticRenderFns__$8
|
|
8085
|
+
}, __vue_inject_styles__$8, __vue_script__$8, __vue_scope_id__$8, __vue_is_functional_template__$8, __vue_module_identifier__$8, false, undefined, createInjectorSSR, undefined);
|
|
8074
8086
|
|
|
8075
|
-
var
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8087
|
+
var Loader = __vue_component__$9;//
|
|
8088
|
+
//
|
|
8089
|
+
//
|
|
8090
|
+
//
|
|
8091
|
+
//
|
|
8092
|
+
//
|
|
8093
|
+
//
|
|
8094
|
+
//
|
|
8095
|
+
var script$7 = {
|
|
8082
8096
|
props: {
|
|
8083
|
-
|
|
8084
|
-
type: Object,
|
|
8085
|
-
default: function _default() {
|
|
8086
|
-
return {
|
|
8087
|
-
hasEmojis: false,
|
|
8088
|
-
hasSendButton: false,
|
|
8089
|
-
hasFiles: false,
|
|
8090
|
-
hasAudio: false
|
|
8091
|
-
};
|
|
8092
|
-
},
|
|
8093
|
-
required: false
|
|
8094
|
-
},
|
|
8095
|
-
cssStyle: {
|
|
8096
|
-
type: Object,
|
|
8097
|
-
default: function _default() {
|
|
8098
|
-
return {
|
|
8099
|
-
width: "full",
|
|
8100
|
-
backgroundColor: "#FFF",
|
|
8101
|
-
outsideButtons: false
|
|
8102
|
-
};
|
|
8103
|
-
},
|
|
8104
|
-
required: false
|
|
8105
|
-
},
|
|
8106
|
-
textareaSettings: {
|
|
8107
|
-
type: Object,
|
|
8108
|
-
default: function _default() {
|
|
8109
|
-
return {
|
|
8110
|
-
placeholderMessage: "",
|
|
8111
|
-
maxCharacters: 0,
|
|
8112
|
-
sendOnEnter: false,
|
|
8113
|
-
disabled: false
|
|
8114
|
-
};
|
|
8115
|
-
},
|
|
8116
|
-
required: false
|
|
8117
|
-
},
|
|
8118
|
-
emojiSettings: {
|
|
8119
|
-
type: Object,
|
|
8120
|
-
default: function _default() {
|
|
8121
|
-
return {
|
|
8122
|
-
openEmojisFrom: "top",
|
|
8123
|
-
smallEmojis: false
|
|
8124
|
-
};
|
|
8125
|
-
},
|
|
8126
|
-
required: false
|
|
8127
|
-
},
|
|
8128
|
-
formattedMessageSettings: {
|
|
8129
|
-
type: Object,
|
|
8130
|
-
default: function _default() {
|
|
8131
|
-
return {
|
|
8132
|
-
hasHsm: false,
|
|
8133
|
-
msgType: 0
|
|
8134
|
-
};
|
|
8135
|
-
},
|
|
8136
|
-
required: false
|
|
8137
|
-
},
|
|
8138
|
-
fileSettings: {
|
|
8139
|
-
type: Object,
|
|
8140
|
-
default: function _default() {
|
|
8141
|
-
return {
|
|
8142
|
-
docsExtensions: "",
|
|
8143
|
-
imagesExtensions: ""
|
|
8144
|
-
};
|
|
8145
|
-
},
|
|
8146
|
-
required: false
|
|
8147
|
-
},
|
|
8148
|
-
textId: {
|
|
8097
|
+
message: {
|
|
8149
8098
|
type: String,
|
|
8150
8099
|
required: true
|
|
8151
8100
|
},
|
|
8152
|
-
|
|
8153
|
-
type:
|
|
8154
|
-
default: false,
|
|
8155
|
-
required: false
|
|
8156
|
-
},
|
|
8157
|
-
isSending: {
|
|
8158
|
-
type: Boolean,
|
|
8159
|
-
default: false,
|
|
8101
|
+
maxCharacters: {
|
|
8102
|
+
type: Number,
|
|
8160
8103
|
required: false
|
|
8161
|
-
},
|
|
8162
|
-
dictionary: {
|
|
8163
|
-
type: Object,
|
|
8164
|
-
required: true
|
|
8165
8104
|
}
|
|
8166
8105
|
},
|
|
8167
8106
|
computed: {
|
|
8168
8107
|
remainingCharacters: function remainingCharacters() {
|
|
8169
|
-
if (this.message
|
|
8170
|
-
|
|
8171
|
-
|
|
8108
|
+
if (this.message.length) return this.maxCharacters - this.message.length;
|
|
8109
|
+
return this.maxCharacters;
|
|
8110
|
+
}
|
|
8111
|
+
}
|
|
8112
|
+
};/* script */
|
|
8113
|
+
var __vue_script__$7 = script$7;
|
|
8114
|
+
/* template */
|
|
8115
|
+
|
|
8116
|
+
var __vue_render__$7 = function __vue_render__() {
|
|
8117
|
+
var _vm = this;
|
|
8118
|
+
|
|
8119
|
+
var _h = _vm.$createElement;
|
|
8120
|
+
|
|
8121
|
+
var _c = _vm._self._c || _h;
|
|
8122
|
+
|
|
8123
|
+
return _vm.maxCharacters ? _c('span', {
|
|
8124
|
+
staticClass: "max-characters no-width",
|
|
8125
|
+
domProps: {
|
|
8126
|
+
"textContent": _vm._s("(" + this.remainingCharacters + ")")
|
|
8127
|
+
}
|
|
8128
|
+
}, []) : _vm._e();
|
|
8129
|
+
};
|
|
8130
|
+
|
|
8131
|
+
var __vue_staticRenderFns__$7 = [];
|
|
8132
|
+
/* style */
|
|
8133
|
+
|
|
8134
|
+
var __vue_inject_styles__$7 = undefined;
|
|
8135
|
+
/* scoped */
|
|
8172
8136
|
|
|
8173
|
-
|
|
8137
|
+
var __vue_scope_id__$7 = undefined;
|
|
8138
|
+
/* module identifier */
|
|
8139
|
+
|
|
8140
|
+
var __vue_module_identifier__$7 = "data-v-f8dac3e4";
|
|
8141
|
+
/* functional template */
|
|
8142
|
+
|
|
8143
|
+
var __vue_is_functional_template__$7 = false;
|
|
8144
|
+
/* style inject */
|
|
8145
|
+
|
|
8146
|
+
/* style inject SSR */
|
|
8147
|
+
|
|
8148
|
+
/* style inject shadow dom */
|
|
8149
|
+
|
|
8150
|
+
var __vue_component__$8 = /*#__PURE__*/normalizeComponent({
|
|
8151
|
+
render: __vue_render__$7,
|
|
8152
|
+
staticRenderFns: __vue_staticRenderFns__$7
|
|
8153
|
+
}, __vue_inject_styles__$7, __vue_script__$7, __vue_scope_id__$7, __vue_is_functional_template__$7, __vue_module_identifier__$7, false, undefined, undefined, undefined);
|
|
8154
|
+
|
|
8155
|
+
var RemainingCharacters = __vue_component__$8;//
|
|
8156
|
+
//
|
|
8157
|
+
//
|
|
8158
|
+
//
|
|
8159
|
+
//
|
|
8160
|
+
//
|
|
8161
|
+
var script$6 = {
|
|
8162
|
+
props: {
|
|
8163
|
+
dictionary: {
|
|
8164
|
+
type: Object,
|
|
8165
|
+
required: true
|
|
8174
8166
|
}
|
|
8175
8167
|
},
|
|
8176
8168
|
data: function data() {
|
|
8177
8169
|
return {
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
file: [],
|
|
8181
|
-
showFilePreview: false,
|
|
8182
|
-
imagePreview: "",
|
|
8183
|
-
isDoc: false,
|
|
8184
|
-
fileFormatError: false,
|
|
8185
|
-
validFileFormats: "",
|
|
8186
|
-
audioFile: "",
|
|
8187
|
-
audioSource: "",
|
|
8188
|
-
mediaRecorder: {},
|
|
8189
|
-
isRecording: false
|
|
8170
|
+
isRecording: false,
|
|
8171
|
+
mediaRecorder: {}
|
|
8190
8172
|
};
|
|
8191
8173
|
},
|
|
8192
|
-
created: function created() {
|
|
8193
|
-
this.$root.$refs["tf-".concat(this.textId)] = this;
|
|
8194
|
-
},
|
|
8195
|
-
mounted: function mounted() {
|
|
8196
|
-
var _this = this;
|
|
8197
|
-
|
|
8198
|
-
setResizeListeners(this.$el, ".js-autoresize", ".js-parentresize");
|
|
8199
|
-
this.$root.$on("drop-file", function (file, type) {
|
|
8200
|
-
if (_this.buttons.hasFiles) _this.fileUpload(file, type, true);
|
|
8201
|
-
});
|
|
8202
|
-
this.$root.$on("toggle-msg-formatada", function () {
|
|
8203
|
-
_this.toggleHSM();
|
|
8204
|
-
});
|
|
8205
|
-
this.$root.$on("textarea-focus", function () {
|
|
8206
|
-
_this.focusTextarea();
|
|
8207
|
-
});
|
|
8208
|
-
this.$root.$on("resize-footer-template", function () {
|
|
8209
|
-
_this.adjustChatHeight();
|
|
8210
|
-
});
|
|
8211
|
-
this.$root.$on("clear-footer-message", function () {
|
|
8212
|
-
_this.message = "";
|
|
8213
|
-
});
|
|
8214
|
-
if (this.cssStyle.outsideButtons) if (this.$root.$refs.chatCorpo) this.$root.$refs.chatCorpo.setOutsideButtons(this.cssStyle.outsideButtons);
|
|
8215
|
-
},
|
|
8216
8174
|
methods: {
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
console.error(e);
|
|
8223
|
-
}
|
|
8224
|
-
},
|
|
8225
|
-
away: function away() {
|
|
8226
|
-
this.openFiles = false;
|
|
8227
|
-
},
|
|
8228
|
-
setDefaultMessage: function setDefaultMessage(msg) {
|
|
8229
|
-
this.message = msg;
|
|
8230
|
-
this.sendFinalMessage();
|
|
8175
|
+
toggleAudioRecorder: function toggleAudioRecorder() {
|
|
8176
|
+
if (!this.mediaRecorder.state) return this.initAudioRecorder();
|
|
8177
|
+
this.isRecording = !this.isRecording;
|
|
8178
|
+
if (this.isRecording) return this.mediaRecorder.start();
|
|
8179
|
+
return this.mediaRecorder.stop();
|
|
8231
8180
|
},
|
|
8232
|
-
|
|
8233
|
-
var
|
|
8181
|
+
initAudioRecorder: function initAudioRecorder() {
|
|
8182
|
+
var _this = this;
|
|
8234
8183
|
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
|
|
8240
|
-
this.sendFinalMessage();
|
|
8241
|
-
}
|
|
8242
|
-
},
|
|
8243
|
-
verifyMessage: function verifyMessage() {
|
|
8244
|
-
if (this.textareaSettings.maxCharacters && this.message) {
|
|
8245
|
-
if (this.message.length > this.textareaSettings.maxCharacters) {
|
|
8246
|
-
if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.limiteCaracter();
|
|
8247
|
-
return false;
|
|
8248
|
-
}
|
|
8249
|
-
}
|
|
8184
|
+
navigator.mediaDevices.getUserMedia({
|
|
8185
|
+
audio: true
|
|
8186
|
+
}).then(function (stream) {
|
|
8187
|
+
_this.mediaRecorder = new MediaRecorder(stream);
|
|
8188
|
+
var audioChunks = [];
|
|
8250
8189
|
|
|
8251
|
-
|
|
8252
|
-
|
|
8190
|
+
_this.mediaRecorder.ondataavailable = function (eventData) {
|
|
8191
|
+
audioChunks.push(eventData.data);
|
|
8192
|
+
};
|
|
8253
8193
|
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8194
|
+
_this.mediaRecorder.onstop = function () {
|
|
8195
|
+
var blob = new Blob(audioChunks, {
|
|
8196
|
+
type: "audio/mpeg"
|
|
8197
|
+
});
|
|
8198
|
+
blob.lastModifiedDate = new Date();
|
|
8199
|
+
blob.name = "im-audio-file-".concat(parseInt(Math.random() * 50000));
|
|
8200
|
+
var reader = new FileReader();
|
|
8201
|
+
reader.readAsDataURL(blob);
|
|
8258
8202
|
|
|
8259
|
-
|
|
8203
|
+
reader.onloadend = function () {
|
|
8204
|
+
_this.$emit("set-audio", {
|
|
8205
|
+
audioFile: new File([blob], "".concat(blob.name, ".mpeg"), {
|
|
8206
|
+
type: blob.type
|
|
8207
|
+
}),
|
|
8208
|
+
audioSource: reader.result
|
|
8209
|
+
});
|
|
8210
|
+
};
|
|
8211
|
+
|
|
8212
|
+
stream.getTracks().forEach(function (track) {
|
|
8213
|
+
return track.stop();
|
|
8214
|
+
});
|
|
8215
|
+
};
|
|
8216
|
+
|
|
8217
|
+
_this.toggleAudioRecorder();
|
|
8218
|
+
}, function (error) {
|
|
8219
|
+
_this.$toasted.global.defaultError({
|
|
8220
|
+
msg: _this.dictionary.msg_permitir_audio
|
|
8221
|
+
});
|
|
8222
|
+
|
|
8223
|
+
console.error("error audio recorder: ", error);
|
|
8224
|
+
});
|
|
8260
8225
|
},
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8226
|
+
deleteMediaRecorder: function deleteMediaRecorder() {
|
|
8227
|
+
this.mediaRecorder = {};
|
|
8228
|
+
}
|
|
8229
|
+
}
|
|
8230
|
+
};/* script */
|
|
8231
|
+
var __vue_script__$6 = script$6;
|
|
8232
|
+
/* template */
|
|
8233
|
+
|
|
8234
|
+
var __vue_render__$6 = function __vue_render__() {
|
|
8235
|
+
var _vm = this;
|
|
8236
|
+
|
|
8237
|
+
var _h = _vm.$createElement;
|
|
8238
|
+
|
|
8239
|
+
var _c = _vm._self._c || _h;
|
|
8240
|
+
|
|
8241
|
+
return _c('span', {
|
|
8242
|
+
staticClass: "text-footer-actions--btn",
|
|
8243
|
+
class: {
|
|
8244
|
+
'audio-activated': _vm.isRecording
|
|
8245
|
+
},
|
|
8246
|
+
on: {
|
|
8247
|
+
"click": _vm.toggleAudioRecorder
|
|
8248
|
+
}
|
|
8249
|
+
}, [_c('fa-icon', {
|
|
8250
|
+
attrs: {
|
|
8251
|
+
"icon": ['fas', 'microphone']
|
|
8252
|
+
}
|
|
8253
|
+
})], 1);
|
|
8254
|
+
};
|
|
8255
|
+
|
|
8256
|
+
var __vue_staticRenderFns__$6 = [];
|
|
8257
|
+
/* style */
|
|
8258
|
+
|
|
8259
|
+
var __vue_inject_styles__$6 = undefined;
|
|
8260
|
+
/* scoped */
|
|
8261
|
+
|
|
8262
|
+
var __vue_scope_id__$6 = undefined;
|
|
8263
|
+
/* module identifier */
|
|
8264
|
+
|
|
8265
|
+
var __vue_module_identifier__$6 = "data-v-291765d5";
|
|
8266
|
+
/* functional template */
|
|
8267
|
+
|
|
8268
|
+
var __vue_is_functional_template__$6 = false;
|
|
8269
|
+
/* style inject */
|
|
8270
|
+
|
|
8271
|
+
/* style inject SSR */
|
|
8272
|
+
|
|
8273
|
+
/* style inject shadow dom */
|
|
8274
|
+
|
|
8275
|
+
var __vue_component__$7 = /*#__PURE__*/normalizeComponent({
|
|
8276
|
+
render: __vue_render__$6,
|
|
8277
|
+
staticRenderFns: __vue_staticRenderFns__$6
|
|
8278
|
+
}, __vue_inject_styles__$6, __vue_script__$6, __vue_scope_id__$6, __vue_is_functional_template__$6, __vue_module_identifier__$6, false, undefined, undefined, undefined);
|
|
8279
|
+
|
|
8280
|
+
var BtnMic = __vue_component__$7;//
|
|
8281
|
+
//
|
|
8282
|
+
//
|
|
8283
|
+
//
|
|
8284
|
+
//
|
|
8285
|
+
//
|
|
8286
|
+
//
|
|
8287
|
+
//
|
|
8288
|
+
//
|
|
8289
|
+
//
|
|
8290
|
+
//
|
|
8291
|
+
//
|
|
8292
|
+
//
|
|
8293
|
+
//
|
|
8294
|
+
//
|
|
8295
|
+
//
|
|
8296
|
+
//
|
|
8297
|
+
//
|
|
8298
|
+
//
|
|
8299
|
+
//
|
|
8300
|
+
//
|
|
8301
|
+
//
|
|
8302
|
+
var script$5 = {
|
|
8303
|
+
props: {
|
|
8304
|
+
dictionary: {
|
|
8305
|
+
type: Object,
|
|
8306
|
+
required: true
|
|
8307
|
+
},
|
|
8308
|
+
file: {
|
|
8309
|
+
type: File,
|
|
8310
|
+
required: true
|
|
8311
|
+
},
|
|
8312
|
+
isDoc: {
|
|
8313
|
+
type: Boolean,
|
|
8314
|
+
required: false
|
|
8315
|
+
},
|
|
8316
|
+
fileFormatError: {
|
|
8317
|
+
type: Boolean,
|
|
8318
|
+
required: false
|
|
8319
|
+
},
|
|
8320
|
+
validFileFormats: {
|
|
8321
|
+
type: String,
|
|
8322
|
+
required: false,
|
|
8323
|
+
default: ""
|
|
8324
|
+
},
|
|
8325
|
+
imagePreview: {
|
|
8326
|
+
type: String,
|
|
8327
|
+
required: false
|
|
8328
|
+
}
|
|
8329
|
+
},
|
|
8330
|
+
methods: {
|
|
8331
|
+
deleteFile: function deleteFile() {
|
|
8332
|
+
this.$emit("delete-file");
|
|
8333
|
+
},
|
|
8334
|
+
openImage: function openImage() {
|
|
8335
|
+
this.$emit("open-image");
|
|
8336
|
+
}
|
|
8337
|
+
}
|
|
8338
|
+
};/* script */
|
|
8339
|
+
var __vue_script__$5 = script$5;
|
|
8340
|
+
/* template */
|
|
8341
|
+
|
|
8342
|
+
var __vue_render__$5 = function __vue_render__() {
|
|
8343
|
+
var _vm = this;
|
|
8344
|
+
|
|
8345
|
+
var _h = _vm.$createElement;
|
|
8346
|
+
|
|
8347
|
+
var _c = _vm._self._c || _h;
|
|
8348
|
+
|
|
8349
|
+
return _c('div', {
|
|
8350
|
+
staticClass: "single-file-preview"
|
|
8351
|
+
}, [_vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.dictionary.msg_cancelar_anexo) + " class=\"text-footer-exclude-file\">", "</span>", [_c('fa-icon', {
|
|
8352
|
+
attrs: {
|
|
8353
|
+
"icon": ['fas', 'times-circle']
|
|
8354
|
+
}
|
|
8355
|
+
})], 1), _vm._ssrNode(" "), _vm.fileFormatError ? _vm._ssrNode("<div class=\"text-footer-invalid-format\">", "</div>", [_vm._ssrNode("<h3>" + _vm._ssrEscape(_vm._s(_vm.dictionary.titulo_msg_formato_invalido)) + "</h3> <h4>" + _vm._ssrEscape(_vm._s(_vm.validFileFormats)) + "</h4>")], 2) : [_vm.file.name ? _vm._ssrNode("<h3 class=\"text-footer-preview-title\">", "</h3>", [_vm.isDoc ? _c('fa-icon', {
|
|
8356
|
+
attrs: {
|
|
8357
|
+
"icon": ['fas', 'file-alt']
|
|
8358
|
+
}
|
|
8359
|
+
}) : _c('fa-icon', {
|
|
8360
|
+
attrs: {
|
|
8361
|
+
"icon": ['fas', 'image']
|
|
8362
|
+
}
|
|
8363
|
+
}), _vm._ssrNode(_vm._ssrEscape("\n " + _vm._s(_vm.file.name) + "\n "))], 2) : _vm._e(), _vm._ssrNode(" " + (_vm.imagePreview ? "<div class=\"text-footer-image-preview\"><img" + _vm._ssrAttr("src", _vm.imagePreview) + _vm._ssrAttr("alt", _vm.dictionary.alt_previa_img) + "></div>" : "<!---->"))]], 2);
|
|
8364
|
+
};
|
|
8365
|
+
|
|
8366
|
+
var __vue_staticRenderFns__$5 = [];
|
|
8367
|
+
/* style */
|
|
8368
|
+
|
|
8369
|
+
var __vue_inject_styles__$5 = undefined;
|
|
8370
|
+
/* scoped */
|
|
8371
|
+
|
|
8372
|
+
var __vue_scope_id__$5 = undefined;
|
|
8373
|
+
/* module identifier */
|
|
8374
|
+
|
|
8375
|
+
var __vue_module_identifier__$5 = "data-v-24daf98e";
|
|
8376
|
+
/* functional template */
|
|
8377
|
+
|
|
8378
|
+
var __vue_is_functional_template__$5 = false;
|
|
8379
|
+
/* style inject */
|
|
8380
|
+
|
|
8381
|
+
/* style inject SSR */
|
|
8382
|
+
|
|
8383
|
+
/* style inject shadow dom */
|
|
8384
|
+
|
|
8385
|
+
var __vue_component__$6 = /*#__PURE__*/normalizeComponent({
|
|
8386
|
+
render: __vue_render__$5,
|
|
8387
|
+
staticRenderFns: __vue_staticRenderFns__$5
|
|
8388
|
+
}, __vue_inject_styles__$5, __vue_script__$5, __vue_scope_id__$5, __vue_is_functional_template__$5, __vue_module_identifier__$5, false, undefined, undefined, undefined);
|
|
8389
|
+
|
|
8390
|
+
var SingleFilePreview = __vue_component__$6;//
|
|
8391
|
+
var script$4 = {
|
|
8392
|
+
components: {
|
|
8393
|
+
Loader: Loader
|
|
8394
|
+
},
|
|
8395
|
+
data: function data() {
|
|
8396
|
+
return {
|
|
8397
|
+
loading: true,
|
|
8398
|
+
loadingTimeout: 0,
|
|
8399
|
+
ignoreNextUpdate: false
|
|
8400
|
+
};
|
|
8401
|
+
},
|
|
8402
|
+
mounted: function mounted() {
|
|
8403
|
+
var _this = this;
|
|
8404
|
+
|
|
8405
|
+
setTimeout(function () {
|
|
8406
|
+
_this.loading = false;
|
|
8407
|
+
}, 500);
|
|
8408
|
+
},
|
|
8409
|
+
watch: {
|
|
8410
|
+
file: function file() {
|
|
8411
|
+
var _this2 = this;
|
|
8412
|
+
|
|
8413
|
+
if (!this.ignoreNextUpdate) {
|
|
8414
|
+
if (this.loadingTimeout) clearTimeout(this.loadingTimeout);
|
|
8415
|
+
this.loading = true;
|
|
8416
|
+
this.loadingTimeout = setTimeout(function () {
|
|
8417
|
+
_this2.loading = false;
|
|
8418
|
+
}, 500);
|
|
8419
|
+
this.ignoreNextUpdate = true;
|
|
8420
|
+
}
|
|
8421
|
+
|
|
8422
|
+
this.ignoreNextUpdate = false;
|
|
8423
|
+
}
|
|
8424
|
+
},
|
|
8425
|
+
props: {
|
|
8426
|
+
dictionary: {
|
|
8427
|
+
type: Object,
|
|
8428
|
+
required: true
|
|
8429
|
+
},
|
|
8430
|
+
file: {
|
|
8431
|
+
type: Array,
|
|
8432
|
+
required: true
|
|
8433
|
+
},
|
|
8434
|
+
fileFormatError: {
|
|
8435
|
+
type: Boolean,
|
|
8436
|
+
required: false
|
|
8437
|
+
},
|
|
8438
|
+
validFileFormats: {
|
|
8439
|
+
type: String,
|
|
8440
|
+
required: false,
|
|
8441
|
+
default: ""
|
|
8442
|
+
}
|
|
8443
|
+
},
|
|
8444
|
+
methods: {
|
|
8445
|
+
deleteFile: function deleteFile() {
|
|
8446
|
+
this.$emit("delete-file");
|
|
8447
|
+
},
|
|
8448
|
+
deleteSpecificFile: function deleteSpecificFile(fileName, index) {
|
|
8449
|
+
this.ignoreNextUpdate = true;
|
|
8450
|
+
this.$emit("delete-specific-file", {
|
|
8451
|
+
fileName: fileName,
|
|
8452
|
+
index: index
|
|
8453
|
+
});
|
|
8454
|
+
},
|
|
8455
|
+
openImage: function openImage(image) {
|
|
8456
|
+
this.$emit("open-image", image);
|
|
8457
|
+
},
|
|
8458
|
+
icon: function icon(imgOrDoc) {
|
|
8459
|
+
if (!imgOrDoc) return ['fas', 'times-circle'];
|
|
8460
|
+
return imgOrDoc == 'doc' ? ['fas', 'file-alt'] : ['fas', 'image'];
|
|
8461
|
+
},
|
|
8462
|
+
isPdf: function isPdf(type) {
|
|
8463
|
+
return type === "application/pdf" ? true : false;
|
|
8464
|
+
}
|
|
8465
|
+
}
|
|
8466
|
+
};/* script */
|
|
8467
|
+
var __vue_script__$4 = script$4;
|
|
8468
|
+
/* template */
|
|
8469
|
+
|
|
8470
|
+
var __vue_render__$4 = function __vue_render__() {
|
|
8471
|
+
var _vm = this;
|
|
8472
|
+
|
|
8473
|
+
var _h = _vm.$createElement;
|
|
8474
|
+
|
|
8475
|
+
var _c = _vm._self._c || _h;
|
|
8476
|
+
|
|
8477
|
+
return _c('div', {
|
|
8478
|
+
staticClass: "multiple-file-preview"
|
|
8479
|
+
}, [_c('transition-group', {
|
|
8480
|
+
attrs: {
|
|
8481
|
+
"name": "fade"
|
|
8482
|
+
}
|
|
8483
|
+
}, [_vm.loading ? _c('Loader', {
|
|
8484
|
+
key: "mfp-loader"
|
|
8485
|
+
}) : _vm.fileFormatError ? [_c('span', {
|
|
8486
|
+
key: "mfp-exlude-file",
|
|
8487
|
+
staticClass: "text-footer-exclude-file",
|
|
8488
|
+
attrs: {
|
|
8489
|
+
"title": _vm.dictionary.msg_cancelar_anexo
|
|
8490
|
+
},
|
|
8491
|
+
on: {
|
|
8492
|
+
"click": _vm.deleteFile
|
|
8493
|
+
}
|
|
8494
|
+
}, [_c('fa-icon', {
|
|
8495
|
+
attrs: {
|
|
8496
|
+
"icon": ['fas', 'times-circle']
|
|
8497
|
+
}
|
|
8498
|
+
})], 1), _vm._v(" "), _vm.fileFormatError ? _c('div', {
|
|
8499
|
+
key: "mfp-invalid-format",
|
|
8500
|
+
staticClass: "text-footer-invalid-format"
|
|
8501
|
+
}, [_c('h3', {
|
|
8502
|
+
domProps: {
|
|
8503
|
+
"textContent": _vm._s(_vm.dictionary.titulo_msg_formato_invalido)
|
|
8504
|
+
}
|
|
8505
|
+
}), _vm._v(" "), _c('h4', {
|
|
8506
|
+
domProps: {
|
|
8507
|
+
"textContent": _vm._s(_vm.validFileFormats)
|
|
8508
|
+
}
|
|
8509
|
+
})]) : _vm._e()] : _vm._l(_vm.file, function (singleFile, index) {
|
|
8510
|
+
return _c('div', {
|
|
8511
|
+
key: index,
|
|
8512
|
+
staticClass: "file-preview"
|
|
8513
|
+
}, [_c('p', {
|
|
8514
|
+
staticClass: "file-title"
|
|
8515
|
+
}, [_c('fa-icon', {
|
|
8516
|
+
attrs: {
|
|
8517
|
+
"icon": _vm.icon(singleFile.imgOrDoc)
|
|
8518
|
+
}
|
|
8519
|
+
}), _vm._v("\n " + _vm._s(singleFile.name) + "\n ")], 1), _vm._v(" "), singleFile.invalid ? _c('p', {
|
|
8520
|
+
staticClass: "file-title red"
|
|
8521
|
+
}, [_vm._v("\n " + _vm._s(_vm.dictionary.titulo_msg_formato_invalido ? _vm.dictionary.titulo_msg_formato_invalido : "Arquivo invalido") + "\n ")]) : _vm._e(), _vm._v(" "), _c('div', {
|
|
8522
|
+
staticClass: "small-img"
|
|
8523
|
+
}, [singleFile.imgOrDoc === 'img' ? _c('span', {
|
|
8524
|
+
staticClass: "img-container"
|
|
8525
|
+
}, [_c('img', {
|
|
8526
|
+
attrs: {
|
|
8527
|
+
"src": singleFile.src,
|
|
8528
|
+
"alt": _vm.dictionary.alt_previa_img
|
|
8529
|
+
},
|
|
8530
|
+
on: {
|
|
8531
|
+
"click": function click($event) {
|
|
8532
|
+
return _vm.openImage(singleFile.src);
|
|
8533
|
+
}
|
|
8534
|
+
}
|
|
8535
|
+
})]) : _vm.isPdf(singleFile.type) ? _c('span', {
|
|
8536
|
+
staticClass: "pdf"
|
|
8537
|
+
}, [_c('fa-icon', {
|
|
8538
|
+
attrs: {
|
|
8539
|
+
"icon": ['fas', 'file-pdf']
|
|
8540
|
+
}
|
|
8541
|
+
})], 1) : _vm._e()]), _vm._v(" "), _c('span', {
|
|
8542
|
+
staticClass: "delete-file",
|
|
8543
|
+
attrs: {
|
|
8544
|
+
"title": _vm.dictionary.msg_excluir_anexo
|
|
8545
|
+
},
|
|
8546
|
+
on: {
|
|
8547
|
+
"click": function click($event) {
|
|
8548
|
+
return _vm.deleteSpecificFile(singleFile.name, index);
|
|
8549
|
+
}
|
|
8550
|
+
}
|
|
8551
|
+
}, [_c('fa-icon', {
|
|
8552
|
+
attrs: {
|
|
8553
|
+
"icon": ['fas', 'times-circle']
|
|
8554
|
+
}
|
|
8555
|
+
})], 1)]);
|
|
8556
|
+
})], 2)], 1);
|
|
8557
|
+
};
|
|
8558
|
+
|
|
8559
|
+
var __vue_staticRenderFns__$4 = [];
|
|
8560
|
+
/* style */
|
|
8561
|
+
|
|
8562
|
+
var __vue_inject_styles__$4 = function __vue_inject_styles__(inject) {
|
|
8563
|
+
if (!inject) return;
|
|
8564
|
+
inject("data-v-1ab24e70_0", {
|
|
8565
|
+
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}.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:rgba(255,255,255,.8);border-radius:30px}.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}",
|
|
8566
|
+
map: undefined,
|
|
8567
|
+
media: undefined
|
|
8568
|
+
});
|
|
8569
|
+
};
|
|
8570
|
+
/* scoped */
|
|
8571
|
+
|
|
8572
|
+
|
|
8573
|
+
var __vue_scope_id__$4 = undefined;
|
|
8574
|
+
/* module identifier */
|
|
8575
|
+
|
|
8576
|
+
var __vue_module_identifier__$4 = "data-v-1ab24e70";
|
|
8577
|
+
/* functional template */
|
|
8578
|
+
|
|
8579
|
+
var __vue_is_functional_template__$4 = false;
|
|
8580
|
+
/* style inject shadow dom */
|
|
8581
|
+
|
|
8582
|
+
var __vue_component__$5 = /*#__PURE__*/normalizeComponent({
|
|
8583
|
+
render: __vue_render__$4,
|
|
8584
|
+
staticRenderFns: __vue_staticRenderFns__$4
|
|
8585
|
+
}, __vue_inject_styles__$4, __vue_script__$4, __vue_scope_id__$4, __vue_is_functional_template__$4, __vue_module_identifier__$4, false, undefined, createInjectorSSR, undefined);
|
|
8586
|
+
|
|
8587
|
+
var MultipleFilePreview = __vue_component__$5;//
|
|
8588
|
+
var script$3 = {
|
|
8589
|
+
components: {
|
|
8590
|
+
SingleFilePreview: SingleFilePreview,
|
|
8591
|
+
MultipleFilePreview: MultipleFilePreview
|
|
8592
|
+
},
|
|
8593
|
+
props: {
|
|
8594
|
+
textId: {
|
|
8595
|
+
type: String,
|
|
8596
|
+
required: true
|
|
8597
|
+
},
|
|
8598
|
+
dictionary: {
|
|
8599
|
+
type: Object,
|
|
8600
|
+
required: true
|
|
8601
|
+
},
|
|
8602
|
+
fileSettings: {
|
|
8603
|
+
type: Object,
|
|
8604
|
+
required: false
|
|
8605
|
+
},
|
|
8606
|
+
cssStyle: {
|
|
8607
|
+
type: Object,
|
|
8608
|
+
required: false
|
|
8609
|
+
}
|
|
8610
|
+
},
|
|
8611
|
+
data: function data() {
|
|
8612
|
+
return {
|
|
8613
|
+
file: [],
|
|
8614
|
+
openFiles: false,
|
|
8615
|
+
showFilePreview: false,
|
|
8616
|
+
imagePreview: "",
|
|
8617
|
+
isDoc: false,
|
|
8618
|
+
fileFormatError: false,
|
|
8619
|
+
validFileFormats: ""
|
|
8620
|
+
};
|
|
8621
|
+
},
|
|
8622
|
+
computed: {
|
|
8623
|
+
previewContainerClass: function previewContainerClass() {
|
|
8624
|
+
if (this.fileFormatError) return "isError";
|
|
8625
|
+
if (this.fileSettings.multiple) return "isMultiple";
|
|
8626
|
+
if (this.isDoc) return "isDoc";
|
|
8627
|
+
return "isMsg";
|
|
8628
|
+
}
|
|
8629
|
+
},
|
|
8630
|
+
methods: {
|
|
8631
|
+
toggleFiles: function toggleFiles() {
|
|
8632
|
+
this.openFiles = !this.openFiles;
|
|
8633
|
+
},
|
|
8634
|
+
openSelectFileHandler: function openSelectFileHandler(type) {
|
|
8635
|
+
var fileInput = document.querySelector("#".concat(type, "-").concat(this.textId));
|
|
8636
|
+
if (fileInput) fileInput.click();
|
|
8637
|
+
if (!fileInput) if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError();
|
|
8638
|
+
},
|
|
8639
|
+
isFileValid: function isFileValid(type, fileName) {
|
|
8640
|
+
var extensions = type === "img" ? this.fileSettings.imagesExtensions : this.fileSettings.docsExtensions;
|
|
8641
|
+
var regex = new RegExp("(" + extensions + ")", "i");
|
|
8642
|
+
if (regex.test(fileName)) return true;
|
|
8643
|
+
this.showToastedValidFormats();
|
|
8644
|
+
return false;
|
|
8645
|
+
},
|
|
8646
|
+
showToastedValidFormats: function showToastedValidFormats() {
|
|
8647
|
+
if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({
|
|
8648
|
+
msg: this.dictionary.msg_formato_invalido
|
|
8649
|
+
});
|
|
8650
|
+
var str = {
|
|
8651
|
+
img: this.fileSettings.imagesExtensions.split("|").join(", "),
|
|
8652
|
+
doc: this.fileSettings.docsExtensions.split("|").join(", ")
|
|
8653
|
+
};
|
|
8654
|
+
if (!document.querySelector(".toasted.toasted-primary.info")) this.$toasted.global.showValidFormats({
|
|
8655
|
+
msg: "Imagens: ".concat(str.img, " - Documentos: ").concat(str.doc, " ").concat(this.dictionary.msg_extensoes_aceitas)
|
|
8656
|
+
});
|
|
8657
|
+
},
|
|
8658
|
+
fileUpload: function fileUpload(event, type, externalCall) {
|
|
8659
|
+
try {
|
|
8660
|
+
this.openFiles = false;
|
|
8661
|
+
var filesAux = !externalCall ? event.target.files ? event.target.files : event.dataTransfer.files : event;
|
|
8662
|
+
this.file = filesAux.length ? filesAux : this.file;
|
|
8663
|
+
if (!this.file.length) return;
|
|
8664
|
+
|
|
8665
|
+
if (!this.fileSettings.multiple) {
|
|
8666
|
+
this.file = this.file[0];
|
|
8667
|
+
this.singleFileUpload(type, this.file.name);
|
|
8668
|
+
} else {
|
|
8669
|
+
this.multipleFileUpload();
|
|
8670
|
+
}
|
|
8671
|
+
} catch (e) {
|
|
8672
|
+
console.error("Error file upload");
|
|
8673
|
+
console.error(e);
|
|
8674
|
+
}
|
|
8675
|
+
},
|
|
8676
|
+
returnFileType: function returnFileType(file) {
|
|
8677
|
+
var imgRegex = new RegExp("\.(" + this.fileSettings.imagesExtensions + ")", "i");
|
|
8678
|
+
if (imgRegex.test(file.name)) return "img";
|
|
8679
|
+
var docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
|
|
8680
|
+
if (docRegex.test(file.name)) return "doc";
|
|
8681
|
+
return "";
|
|
8682
|
+
},
|
|
8683
|
+
multipleFileUpload: function multipleFileUpload() {
|
|
8684
|
+
var _this = this;
|
|
8685
|
+
|
|
8686
|
+
var waitForImageLoad = false;
|
|
8687
|
+
this.file = Array.from(this.file);
|
|
8688
|
+
this.file.forEach(function (file) {
|
|
8689
|
+
var fileReader = new FileReader();
|
|
8690
|
+
|
|
8691
|
+
var singleFileType = _this.returnFileType(file);
|
|
8692
|
+
|
|
8693
|
+
if (!singleFileType) file.invalid = true;
|
|
8694
|
+
file.imgOrDoc = singleFileType ? singleFileType : "";
|
|
8695
|
+
if (file.imgOrDoc === "doc") _this.isDoc = true;
|
|
8696
|
+
|
|
8697
|
+
if (file.imgOrDoc === "img") {
|
|
8698
|
+
waitForImageLoad = true;
|
|
8699
|
+
|
|
8700
|
+
fileReader.onload = function () {
|
|
8701
|
+
return file.src = fileReader.result;
|
|
8702
|
+
};
|
|
8703
|
+
|
|
8704
|
+
fileReader.onloadend = function () {
|
|
8705
|
+
return _this.emitFileVars(true);
|
|
8706
|
+
};
|
|
8707
|
+
}
|
|
8708
|
+
|
|
8709
|
+
if (_this.isFileValid(file.imgOrDoc, file.name)) {
|
|
8710
|
+
if (file.imgOrDoc === "img") fileReader.readAsDataURL(file);
|
|
8711
|
+
} else {
|
|
8712
|
+
file.invalid = true;
|
|
8713
|
+
_this.fileFormatError = true;
|
|
8714
|
+
_this.validFileFormats = "".concat(file.imgOrDoc === "img" ? _this.fileSettings.imagesExtensions.split("|").join(", ") : _this.fileSettings.docsExtensions.split("|").join(", "), " ").concat(_this.dictionary.msg_extensoes_aceitas);
|
|
8715
|
+
}
|
|
8716
|
+
});
|
|
8717
|
+
if (this.isDoc && !waitForImageLoad) this.emitFileVars();
|
|
8718
|
+
},
|
|
8719
|
+
singleFileUpload: function singleFileUpload(type, fileName) {
|
|
8720
|
+
var _this2 = this;
|
|
8721
|
+
|
|
8722
|
+
var fileReader = new FileReader();
|
|
8723
|
+
|
|
8724
|
+
if (type === "img") {
|
|
8725
|
+
fileReader.onload = function () {
|
|
8726
|
+
return _this2.imagePreview = fileReader.result;
|
|
8727
|
+
};
|
|
8728
|
+
|
|
8729
|
+
fileReader.onloadend = function () {
|
|
8730
|
+
return _this2.emitFileVars();
|
|
8731
|
+
};
|
|
8732
|
+
}
|
|
8733
|
+
|
|
8734
|
+
if (this.isFileValid(type, fileName)) {
|
|
8735
|
+
if (type === "img") fileReader.readAsDataURL(this.file);
|
|
8736
|
+
if (type === "doc") this.isDoc = true;
|
|
8737
|
+
this.fileFormatError = false;
|
|
8738
|
+
} else {
|
|
8739
|
+
this.fileFormatError = true;
|
|
8740
|
+
this.validFileFormats = "".concat(type === "img" ? this.fileSettings.imagesExtensions.split("|").join(", ") : this.fileSettings.docsExtensions.split("|").join(", "), " ").concat(this.dictionary.msg_extensoes_aceitas);
|
|
8741
|
+
}
|
|
8742
|
+
|
|
8743
|
+
if (this.isDoc) this.emitFileVars();
|
|
8744
|
+
},
|
|
8745
|
+
toggleFilePreview: function toggleFilePreview() {
|
|
8746
|
+
this.showFilePreview = !this.showFilePreview;
|
|
8747
|
+
},
|
|
8748
|
+
emitFileVars: function emitFileVars() {
|
|
8749
|
+
var vars = {
|
|
8750
|
+
file: this.file,
|
|
8751
|
+
isDoc: this.isDoc,
|
|
8752
|
+
showFilePreview: this.showFilePreview,
|
|
8753
|
+
imagePreview: this.imagePreview,
|
|
8754
|
+
fileFormatError: this.fileFormatError
|
|
8755
|
+
};
|
|
8756
|
+
this.$emit("set-file-vars", vars);
|
|
8757
|
+
this.$parent.focusTextarea();
|
|
8758
|
+
},
|
|
8759
|
+
deleteSpecificFile: function deleteSpecificFile(obj) {
|
|
8760
|
+
var fileName = obj.fileName;
|
|
8761
|
+
this.file = this.file.filter(function (file) {
|
|
8762
|
+
return file.name != fileName;
|
|
8763
|
+
});
|
|
8764
|
+
this.file.length ? this.emitFileVars(true) : this.deleteFile();
|
|
8765
|
+
},
|
|
8766
|
+
deleteFile: function deleteFile() {
|
|
8767
|
+
this.$emit("set-file-vars", {
|
|
8768
|
+
file: [],
|
|
8769
|
+
isDoc: false,
|
|
8770
|
+
showFilePreview: false,
|
|
8771
|
+
imagePreview: "",
|
|
8772
|
+
fileFormatError: false
|
|
8773
|
+
});
|
|
8774
|
+
this.file = [];
|
|
8775
|
+
this.isDoc = false;
|
|
8776
|
+
this.showFilePreview = false;
|
|
8777
|
+
this.imagePreview = "";
|
|
8778
|
+
this.fileFormatError = false;
|
|
8779
|
+
this.validFileFormats = "";
|
|
8780
|
+
},
|
|
8781
|
+
openImage: function openImage(imagePreview) {
|
|
8782
|
+
this.$emit("open-image", !imagePreview ? this.imagePreview : imagePreview);
|
|
8783
|
+
}
|
|
8784
|
+
}
|
|
8785
|
+
};/* script */
|
|
8786
|
+
var __vue_script__$3 = script$3;
|
|
8787
|
+
/* template */
|
|
8788
|
+
|
|
8789
|
+
var __vue_render__$3 = function __vue_render__() {
|
|
8790
|
+
var _vm = this;
|
|
8791
|
+
|
|
8792
|
+
var _h = _vm.$createElement;
|
|
8793
|
+
|
|
8794
|
+
var _c = _vm._self._c || _h;
|
|
8795
|
+
|
|
8796
|
+
return _c('span', {
|
|
8797
|
+
staticClass: "text-footer-actions--btn",
|
|
8798
|
+
class: {
|
|
8799
|
+
'files-activated': _vm.openFiles || _vm.file.length
|
|
8800
|
+
},
|
|
8801
|
+
on: {
|
|
8802
|
+
"click": function click($event) {
|
|
8803
|
+
_vm.fileSettings.multiple ? _vm.openSelectFileHandler('both') : _vm.toggleFiles;
|
|
8804
|
+
}
|
|
8805
|
+
}
|
|
8806
|
+
}, [_c('transition', {
|
|
8807
|
+
attrs: {
|
|
8808
|
+
"name": "fade"
|
|
8809
|
+
}
|
|
8810
|
+
}, [_vm.file.length ? _c('span', {
|
|
8811
|
+
staticClass: "files-counter",
|
|
8812
|
+
attrs: {
|
|
8813
|
+
"title": _vm.dictionary.msg_abrir_anexos
|
|
8814
|
+
},
|
|
8815
|
+
domProps: {
|
|
8816
|
+
"textContent": _vm._s(_vm.file.length)
|
|
8817
|
+
},
|
|
8818
|
+
on: {
|
|
8819
|
+
"click": function click($event) {
|
|
8820
|
+
$event.stopPropagation();
|
|
8821
|
+
return _vm.toggleFilePreview.apply(null, arguments);
|
|
8822
|
+
}
|
|
8823
|
+
}
|
|
8824
|
+
}) : _vm._e()]), _vm._ssrNode(" "), _c('fa-icon', {
|
|
8825
|
+
attrs: {
|
|
8826
|
+
"icon": ['fas', 'paperclip'],
|
|
8827
|
+
"title": _vm.dictionary.title_selecionar_anexo
|
|
8828
|
+
}
|
|
8829
|
+
}), _vm._ssrNode(" "), _c('transition', {
|
|
8830
|
+
attrs: {
|
|
8831
|
+
"name": "show"
|
|
8832
|
+
}
|
|
8833
|
+
}, [_vm.openFiles ? _c('div', {
|
|
8834
|
+
staticClass: "text-footer-files-container",
|
|
8835
|
+
class: {
|
|
8836
|
+
'horizontal': _vm.cssStyle.outsideButtons
|
|
8837
|
+
}
|
|
8838
|
+
}, [_c('div', {
|
|
8839
|
+
staticClass: "files-btn images",
|
|
8840
|
+
class: {
|
|
8841
|
+
'margin-bottom': _vm.cssStyle.outsideButtons
|
|
8842
|
+
},
|
|
8843
|
+
attrs: {
|
|
8844
|
+
"title": _vm.dictionary.title_anexo_img
|
|
8845
|
+
},
|
|
8846
|
+
on: {
|
|
8847
|
+
"click": function click($event) {
|
|
8848
|
+
return _vm.openSelectFileHandler('img');
|
|
8849
|
+
}
|
|
8850
|
+
}
|
|
8851
|
+
}, [_c('fa-icon', {
|
|
8852
|
+
attrs: {
|
|
8853
|
+
"icon": ['fas', 'image']
|
|
8854
|
+
}
|
|
8855
|
+
})], 1), _vm._v(" "), _c('div', {
|
|
8856
|
+
staticClass: "files-btn docs",
|
|
8857
|
+
attrs: {
|
|
8858
|
+
"title": _vm.dictionary.title_anexo_doc
|
|
8859
|
+
},
|
|
8860
|
+
on: {
|
|
8861
|
+
"click": function click($event) {
|
|
8862
|
+
return _vm.openSelectFileHandler('doc');
|
|
8863
|
+
}
|
|
8864
|
+
}
|
|
8865
|
+
}, [_c('fa-icon', {
|
|
8866
|
+
attrs: {
|
|
8867
|
+
"icon": ['fas', 'file-alt']
|
|
8868
|
+
}
|
|
8869
|
+
})], 1)]) : _vm._e()]), _vm._ssrNode(" <div class=\"files-pointers d-none\">" + (_vm.fileSettings.multiple ? "<input type=\"file\"" + _vm._ssrAttr("id", "both-" + _vm.textId) + " accept=\"image/*,application/*\" multiple=\"multiple\">" : "<!---->") + " " + (!_vm.fileSettings.multiple ? "<input type=\"file\"" + _vm._ssrAttr("id", "img-" + _vm.textId) + " accept=\"image/*\">" : "<!---->") + " " + (!_vm.fileSettings.multiple ? "<input type=\"file\"" + _vm._ssrAttr("id", "doc-" + _vm.textId) + " accept=\"application/*\">" : "<!---->") + "</div> "), _c('transition', {
|
|
8870
|
+
attrs: {
|
|
8871
|
+
"name": "fade"
|
|
8872
|
+
}
|
|
8873
|
+
}, [_c('div', {
|
|
8874
|
+
directives: [{
|
|
8875
|
+
name: "show",
|
|
8876
|
+
rawName: "v-show",
|
|
8877
|
+
value: _vm.showFilePreview,
|
|
8878
|
+
expression: "showFilePreview"
|
|
8879
|
+
}],
|
|
8880
|
+
staticClass: "text-footer-preview-container",
|
|
8881
|
+
class: [_vm.previewContainerClass],
|
|
8882
|
+
on: {
|
|
8883
|
+
"click": function click($event) {
|
|
8884
|
+
$event.stopPropagation();
|
|
8885
|
+
}
|
|
8886
|
+
}
|
|
8887
|
+
}, [!_vm.fileSettings.multiple ? _c('SingleFilePreview', {
|
|
8888
|
+
attrs: {
|
|
8889
|
+
"dictionary": _vm.dictionary,
|
|
8890
|
+
"file": _vm.file,
|
|
8891
|
+
"isDoc": _vm.isDoc,
|
|
8892
|
+
"fileFormatError": _vm.fileFormatError,
|
|
8893
|
+
"validFileFormats": _vm.validFileFormats,
|
|
8894
|
+
"imagePreview": _vm.imagePreview
|
|
8895
|
+
},
|
|
8896
|
+
on: {
|
|
8897
|
+
"delete-file": _vm.deleteFile,
|
|
8898
|
+
"open-image": _vm.openImage
|
|
8899
|
+
}
|
|
8900
|
+
}) : _c('MultipleFilePreview', {
|
|
8901
|
+
attrs: {
|
|
8902
|
+
"dictionary": _vm.dictionary,
|
|
8903
|
+
"file": _vm.file,
|
|
8904
|
+
"fileFormatError": _vm.fileFormatError,
|
|
8905
|
+
"validFileFormats": _vm.validFileFormats
|
|
8906
|
+
},
|
|
8907
|
+
on: {
|
|
8908
|
+
"delete-file": _vm.deleteFile,
|
|
8909
|
+
"delete-specific-file": _vm.deleteSpecificFile,
|
|
8910
|
+
"open-image": _vm.openImage
|
|
8911
|
+
}
|
|
8912
|
+
})], 1)])], 2);
|
|
8913
|
+
};
|
|
8914
|
+
|
|
8915
|
+
var __vue_staticRenderFns__$3 = [];
|
|
8916
|
+
/* style */
|
|
8917
|
+
|
|
8918
|
+
var __vue_inject_styles__$3 = function __vue_inject_styles__(inject) {
|
|
8919
|
+
if (!inject) return;
|
|
8920
|
+
inject("data-v-ba3fe4c6_0", {
|
|
8921
|
+
source: ".fade-enter-active,.fade-leave-active{transition:opacity .3s}.fade-enter,.fade-leave-to{opacity:0}.files-counter{position:absolute;top:0;z-index:1;right:0;font-size:.5rem;width:15px;height:15px;border-radius:50%;background:#a4ac86;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}",
|
|
8922
|
+
map: undefined,
|
|
8923
|
+
media: undefined
|
|
8924
|
+
});
|
|
8925
|
+
};
|
|
8926
|
+
/* scoped */
|
|
8927
|
+
|
|
8928
|
+
|
|
8929
|
+
var __vue_scope_id__$3 = undefined;
|
|
8930
|
+
/* module identifier */
|
|
8931
|
+
|
|
8932
|
+
var __vue_module_identifier__$3 = "data-v-ba3fe4c6";
|
|
8933
|
+
/* functional template */
|
|
8934
|
+
|
|
8935
|
+
var __vue_is_functional_template__$3 = false;
|
|
8936
|
+
/* style inject shadow dom */
|
|
8937
|
+
|
|
8938
|
+
var __vue_component__$4 = /*#__PURE__*/normalizeComponent({
|
|
8939
|
+
render: __vue_render__$3,
|
|
8940
|
+
staticRenderFns: __vue_staticRenderFns__$3
|
|
8941
|
+
}, __vue_inject_styles__$3, __vue_script__$3, __vue_scope_id__$3, __vue_is_functional_template__$3, __vue_module_identifier__$3, false, undefined, createInjectorSSR, undefined);
|
|
8942
|
+
|
|
8943
|
+
var BtnFiles = __vue_component__$4;//
|
|
8944
|
+
var script$2 = {
|
|
8945
|
+
components: {
|
|
8946
|
+
EmojisTextFooter: EmojisTextFooter,
|
|
8947
|
+
Loader: Loader,
|
|
8948
|
+
BtnMic: BtnMic,
|
|
8949
|
+
BtnFiles: BtnFiles,
|
|
8950
|
+
RemainingCharacters: RemainingCharacters
|
|
8951
|
+
},
|
|
8952
|
+
mixins: [mixin_1],
|
|
8953
|
+
props: {
|
|
8954
|
+
buttons: {
|
|
8955
|
+
type: Object,
|
|
8956
|
+
default: function _default() {
|
|
8957
|
+
return {
|
|
8958
|
+
hasEmojis: false,
|
|
8959
|
+
hasSendButton: false,
|
|
8960
|
+
hasFiles: false,
|
|
8961
|
+
hasAudio: false
|
|
8962
|
+
};
|
|
8963
|
+
},
|
|
8964
|
+
required: false
|
|
8965
|
+
},
|
|
8966
|
+
cssStyle: {
|
|
8967
|
+
type: Object,
|
|
8968
|
+
default: function _default() {
|
|
8969
|
+
return {
|
|
8970
|
+
width: "full",
|
|
8971
|
+
backgroundColor: "#FFF",
|
|
8972
|
+
outsideButtons: false
|
|
8973
|
+
};
|
|
8974
|
+
},
|
|
8975
|
+
required: false
|
|
8976
|
+
},
|
|
8977
|
+
textareaSettings: {
|
|
8978
|
+
type: Object,
|
|
8979
|
+
default: function _default() {
|
|
8980
|
+
return {
|
|
8981
|
+
placeholderMessage: "",
|
|
8982
|
+
maxCharacters: 0,
|
|
8983
|
+
sendOnEnter: false,
|
|
8984
|
+
disabled: false
|
|
8985
|
+
};
|
|
8986
|
+
},
|
|
8987
|
+
required: false
|
|
8988
|
+
},
|
|
8989
|
+
emojiSettings: {
|
|
8990
|
+
type: Object,
|
|
8991
|
+
default: function _default() {
|
|
8992
|
+
return {
|
|
8993
|
+
openEmojisFrom: "top",
|
|
8994
|
+
smallEmojis: false
|
|
8995
|
+
};
|
|
8996
|
+
},
|
|
8997
|
+
required: false
|
|
8998
|
+
},
|
|
8999
|
+
formattedMessageSettings: {
|
|
9000
|
+
type: Object,
|
|
9001
|
+
default: function _default() {
|
|
9002
|
+
return {
|
|
9003
|
+
hasHsm: false,
|
|
9004
|
+
msgType: 0
|
|
9005
|
+
};
|
|
9006
|
+
},
|
|
9007
|
+
required: false
|
|
9008
|
+
},
|
|
9009
|
+
fileSettings: {
|
|
9010
|
+
type: Object,
|
|
9011
|
+
default: function _default() {
|
|
9012
|
+
return {
|
|
9013
|
+
docsExtensions: "",
|
|
9014
|
+
imagesExtensions: "",
|
|
9015
|
+
multiple: false
|
|
9016
|
+
};
|
|
9017
|
+
},
|
|
9018
|
+
required: false
|
|
9019
|
+
},
|
|
9020
|
+
textId: {
|
|
9021
|
+
type: String,
|
|
9022
|
+
required: true
|
|
9023
|
+
},
|
|
9024
|
+
isMainChat: {
|
|
9025
|
+
type: Boolean,
|
|
9026
|
+
default: false,
|
|
9027
|
+
required: false
|
|
9028
|
+
},
|
|
9029
|
+
isSending: {
|
|
9030
|
+
type: Boolean,
|
|
9031
|
+
default: false,
|
|
9032
|
+
required: false
|
|
9033
|
+
},
|
|
9034
|
+
dictionary: {
|
|
9035
|
+
type: Object,
|
|
9036
|
+
required: true
|
|
9037
|
+
}
|
|
9038
|
+
},
|
|
9039
|
+
data: function data() {
|
|
9040
|
+
return {
|
|
9041
|
+
message: "",
|
|
9042
|
+
openFiles: false,
|
|
9043
|
+
file: [],
|
|
9044
|
+
showFilePreview: false,
|
|
9045
|
+
imagePreview: "",
|
|
9046
|
+
isDoc: false,
|
|
9047
|
+
fileFormatError: false,
|
|
9048
|
+
audioFile: "",
|
|
9049
|
+
audioSource: ""
|
|
9050
|
+
};
|
|
9051
|
+
},
|
|
9052
|
+
created: function created() {
|
|
9053
|
+
this.$root.$refs["tf-".concat(this.textId)] = this;
|
|
9054
|
+
},
|
|
9055
|
+
mounted: function mounted() {
|
|
9056
|
+
setResizeListeners(this.$el, ".js-autoresize", ".js-parentresize"); // this.$root.$on("drop-file", (file, type) => { if(this.buttons.hasFiles) this.fileUpload(file, type, true) })
|
|
9057
|
+
// this.$root.$on("toggle-msg-formatada", () => { this.toggleHSM() })
|
|
9058
|
+
// this.$root.$on("textarea-focus", () => { this.focusTextarea() })
|
|
9059
|
+
// this.$root.$on("resize-footer-template", () => { this.adjustChatHeight() })
|
|
9060
|
+
// this.$root.$on("clear-footer-message", () => { this.message = "" })
|
|
9061
|
+
// if(this.cssStyle.outsideButtons) if(this.$root.$refs.chatCorpo) this.$root.$refs.chatCorpo.setOutsideButtons(this.cssStyle.outsideButtons)
|
|
9062
|
+
},
|
|
9063
|
+
methods: {
|
|
9064
|
+
closeEmojis: function closeEmojis() {
|
|
9065
|
+
try {
|
|
9066
|
+
this.$root.$refs["etf-".concat(this.textId)].showEmojis ? this.$root.$refs["etf-".concat(this.textId)].away() : '';
|
|
9067
|
+
} catch (e) {
|
|
9068
|
+
console.error("Nao foi possivel fechar os emojis");
|
|
9069
|
+
console.error(e);
|
|
9070
|
+
}
|
|
9071
|
+
},
|
|
9072
|
+
away: function away() {
|
|
9073
|
+
if (this.$refs["".concat(this.textId, "-file")]) this.$refs["".concat(this.textId, "-file")].openFiles = false;
|
|
9074
|
+
},
|
|
9075
|
+
setDefaultMessage: function setDefaultMessage(msg) {
|
|
9076
|
+
this.message = msg;
|
|
9077
|
+
this.sendFinalMessage();
|
|
9078
|
+
},
|
|
9079
|
+
insertEmoji: function insertEmoji(emoji) {
|
|
9080
|
+
var textarea = document.querySelector("#text-footer-".concat(this.textId));
|
|
9081
|
+
|
|
9082
|
+
if (textarea) {
|
|
9083
|
+
this.focusTextarea();
|
|
9084
|
+
var cursorStart = textarea.selectionStart;
|
|
9085
|
+
var cursorEnd = textarea.selectionEnd;
|
|
9086
|
+
this.message = this.message.slice(0, cursorStart) + emoji.native + this.message.slice(cursorEnd);
|
|
9087
|
+
this.sendFinalMessage();
|
|
9088
|
+
}
|
|
9089
|
+
},
|
|
9090
|
+
verifyMessage: function verifyMessage() {
|
|
9091
|
+
if (this.textareaSettings.maxCharacters && this.message) {
|
|
9092
|
+
if (this.message.length > this.textareaSettings.maxCharacters) {
|
|
9093
|
+
if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.limiteCaracter();
|
|
9094
|
+
return false;
|
|
9095
|
+
}
|
|
9096
|
+
}
|
|
9097
|
+
|
|
9098
|
+
if ((!this.message || !this.message.trim()) && !this.showFilePreview && !this.audioFile) return false;
|
|
9099
|
+
if (this.textareaSettings.disabled) return false;
|
|
9100
|
+
|
|
9101
|
+
if (this.fileFormatError) {
|
|
9102
|
+
this.$toasted.global.defaultError({
|
|
9103
|
+
msg: this.dictionary.msg_formato_invalido
|
|
9104
|
+
});
|
|
9105
|
+
var str = {
|
|
9106
|
+
img: this.fileSettings.imagesExtensions.split("|").join(", "),
|
|
9107
|
+
doc: this.fileSettings.docsExtensions.split("|").join(", ")
|
|
9108
|
+
};
|
|
9109
|
+
this.$toasted.global.showValidFormats({
|
|
9110
|
+
msg: "Imagens: ".concat(str.img, " - Documentos: ").concat(str.doc, " ").concat(this.dictionary.msg_extensoes_aceitas)
|
|
9111
|
+
});
|
|
9112
|
+
return false;
|
|
9113
|
+
}
|
|
9114
|
+
|
|
9115
|
+
return true;
|
|
9116
|
+
},
|
|
9117
|
+
removeHTMLElementsFromMessage: function removeHTMLElementsFromMessage(message) {
|
|
9118
|
+
var regexTags = /<\/?[\d\w\s=\-:./'";]+>/gi;
|
|
9119
|
+
if (message.match(regexTags)) message = message.replace(regexTags, ' ');
|
|
8264
9120
|
return message;
|
|
8265
9121
|
},
|
|
8266
9122
|
formatMessage: function formatMessage(message) {
|
|
@@ -8311,7 +9167,7 @@ var script$2 = {
|
|
|
8311
9167
|
},
|
|
8312
9168
|
resetFooterData: function resetFooterData() {
|
|
8313
9169
|
if (this.audioFile) this.deleteAudio();
|
|
8314
|
-
if (this.showFilePreview) this.deleteFile();
|
|
9170
|
+
if (this.showFilePreview) this.$refs["".concat(this.textId, "-file")].deleteFile();
|
|
8315
9171
|
this.message = "";
|
|
8316
9172
|
this.sendFinalMessage();
|
|
8317
9173
|
resetTargets(this.$el, ".js-autoresize", ".js-parentresize", "38px");
|
|
@@ -8322,164 +9178,124 @@ var script$2 = {
|
|
|
8322
9178
|
message: message,
|
|
8323
9179
|
attachment: this.showFilePreview ? this.file : false,
|
|
8324
9180
|
isDoc: this.isDoc,
|
|
8325
|
-
|
|
9181
|
+
imagePreview: this.imagePreview,
|
|
8326
9182
|
isAudio: this.audioFile ? true : false,
|
|
8327
9183
|
audioAttachment: this.audioSource
|
|
8328
9184
|
};
|
|
8329
9185
|
},
|
|
8330
|
-
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
9186
|
+
setFileVars: function setFileVars(fileObj) {
|
|
9187
|
+
var file = fileObj.file,
|
|
9188
|
+
showFilePreview = fileObj.showFilePreview,
|
|
9189
|
+
imagePreview = fileObj.imagePreview,
|
|
9190
|
+
isDoc = fileObj.isDoc,
|
|
9191
|
+
fileFormatError = fileObj.fileFormatError;
|
|
9192
|
+
this.file = file;
|
|
9193
|
+
this.showFilePreview = showFilePreview;
|
|
9194
|
+
this.imagePreview = imagePreview ? imagePreview : "";
|
|
9195
|
+
this.isDoc = isDoc;
|
|
9196
|
+
this.fileFormatError = fileFormatError;
|
|
9197
|
+
},
|
|
9198
|
+
openImage: function openImage(imagePreview) {
|
|
9199
|
+
this.$emit("open-image", imagePreview);
|
|
9200
|
+
},
|
|
9201
|
+
setAudio: function setAudio(audioObj) {
|
|
9202
|
+
var audioFile = audioObj.audioFile,
|
|
9203
|
+
audioSource = audioObj.audioSource;
|
|
9204
|
+
this.audioFile = audioFile;
|
|
9205
|
+
this.audioSource = audioSource;
|
|
8342
9206
|
},
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
9207
|
+
deleteAudio: function deleteAudio() {
|
|
9208
|
+
this.$refs["".concat(this.textId, "-mic")].deleteMediaRecorder();
|
|
9209
|
+
this.audioFile = "";
|
|
9210
|
+
this.audioSource = "";
|
|
9211
|
+
},
|
|
9212
|
+
returnFileType: function returnFileType(file, stopAlert) {
|
|
9213
|
+
var imgRegex = new RegExp("\.(" + this.fileSettings.imagesExtensions + ")", "i");
|
|
9214
|
+
if (imgRegex.test(file.name)) return "img";
|
|
9215
|
+
var docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
|
|
9216
|
+
if (docRegex.test(file.name)) return "doc";
|
|
9217
|
+
if (!stopAlert) return;
|
|
9218
|
+
if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({
|
|
9219
|
+
msg: this.dictionary.msg_formato_invalido
|
|
9220
|
+
});
|
|
9221
|
+
var str = {
|
|
9222
|
+
img: this.fileSettings.imagesExtensions.split("|").join(", "),
|
|
9223
|
+
doc: this.fileSettings.docsExtensions.split("|").join(", ")
|
|
9224
|
+
};
|
|
9225
|
+
this.$toasted.global.showValidFormats({
|
|
9226
|
+
msg: "Imagens: ".concat(str.img, " - Documentos: ").concat(str.doc, " ").concat(this.dictionary.msg_extensoes_aceitas)
|
|
9227
|
+
});
|
|
8348
9228
|
return false;
|
|
8349
9229
|
},
|
|
8350
|
-
|
|
8351
|
-
var
|
|
8352
|
-
|
|
8353
|
-
this.openFiles = false;
|
|
8354
|
-
if (this.showFilePreview) this.deleteFile();
|
|
8355
|
-
var fileReader = new FileReader();
|
|
8356
|
-
this.file = !externalCall ? event.target.files || event.dataTransfer.files : event;
|
|
8357
|
-
|
|
8358
|
-
if (!this.file.length) {
|
|
8359
|
-
this.file = [];
|
|
8360
|
-
return;
|
|
8361
|
-
}
|
|
9230
|
+
filesHandler: function filesHandler(files) {
|
|
9231
|
+
var _this = this;
|
|
8362
9232
|
|
|
8363
|
-
|
|
9233
|
+
var fileType = this.returnFileType(files[0], true);
|
|
9234
|
+
var invalidFile = false;
|
|
8364
9235
|
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
}
|
|
9236
|
+
try {
|
|
9237
|
+
files.forEach(function (file) {
|
|
9238
|
+
var singleFileType = _this.returnFileType(file, true);
|
|
8369
9239
|
|
|
8370
|
-
|
|
9240
|
+
if (!singleFileType) {
|
|
9241
|
+
invalidFile = true;
|
|
9242
|
+
file.invalid = true;
|
|
9243
|
+
}
|
|
8371
9244
|
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
9245
|
+
file.imgOrDoc = singleFileType ? singleFileType : "";
|
|
9246
|
+
});
|
|
9247
|
+
} catch (e) {
|
|
9248
|
+
console.error("Erro ao tentar percorrer os arquivos");
|
|
9249
|
+
console.error(e);
|
|
9250
|
+
invalidFile = true;
|
|
8376
9251
|
}
|
|
8377
9252
|
|
|
8378
|
-
if (
|
|
8379
|
-
|
|
8380
|
-
if (type === "doc") this.isDoc = true;
|
|
8381
|
-
this.focusTextarea();
|
|
8382
|
-
this.fileFormatError = false;
|
|
9253
|
+
if (!invalidFile) {
|
|
9254
|
+
this.$refs["".concat(this.textId, "-file")].fileUpload(files, fileType, true);
|
|
8383
9255
|
} else {
|
|
8384
|
-
this.
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
this.isDoc = false;
|
|
8391
|
-
this.showFilePreview = false;
|
|
8392
|
-
this.imagePreview = "";
|
|
8393
|
-
this.fileFormatError = false;
|
|
8394
|
-
this.validFileFormats = "";
|
|
8395
|
-
},
|
|
8396
|
-
openImage: function openImage() {
|
|
8397
|
-
this.$store.dispatch("toggleBlocker", {
|
|
8398
|
-
state: true,
|
|
8399
|
-
origin: "visualizar-imagem"
|
|
8400
|
-
});
|
|
8401
|
-
this.$store.dispatch("setLinkImagem", this.imagePreview);
|
|
8402
|
-
},
|
|
8403
|
-
initAudioRecorder: function initAudioRecorder() {
|
|
8404
|
-
var _this3 = this;
|
|
8405
|
-
|
|
8406
|
-
navigator.mediaDevices.getUserMedia({
|
|
8407
|
-
audio: true
|
|
8408
|
-
}).then(function (stream) {
|
|
8409
|
-
_this3.mediaRecorder = new MediaRecorder(stream);
|
|
8410
|
-
var audioChunks = [];
|
|
8411
|
-
|
|
8412
|
-
_this3.mediaRecorder.ondataavailable = function (eventData) {
|
|
8413
|
-
audioChunks.push(eventData.data);
|
|
8414
|
-
};
|
|
8415
|
-
|
|
8416
|
-
_this3.mediaRecorder.onstop = function () {
|
|
8417
|
-
var blob = new Blob(audioChunks, {
|
|
8418
|
-
type: "audio/mpeg"
|
|
8419
|
-
});
|
|
8420
|
-
blob.lastModifiedDate = new Date();
|
|
8421
|
-
blob.name = "im-audio-file-".concat(parseInt(Math.random() * 5000));
|
|
8422
|
-
var reader = new FileReader();
|
|
8423
|
-
reader.readAsDataURL(blob);
|
|
8424
|
-
|
|
8425
|
-
reader.onloadend = function () {
|
|
8426
|
-
_this3.audioFile = new File([blob], "".concat(blob.name, ".mpeg"), {
|
|
8427
|
-
type: blob.type
|
|
8428
|
-
});
|
|
8429
|
-
_this3.audioSource = reader.result;
|
|
8430
|
-
};
|
|
8431
|
-
|
|
8432
|
-
stream.getTracks().forEach(function (track) {
|
|
8433
|
-
return track.stop();
|
|
8434
|
-
});
|
|
9256
|
+
this.$toasted.global.defaultError({
|
|
9257
|
+
msg: this.dictionary.msg_formato_invalido
|
|
9258
|
+
});
|
|
9259
|
+
var str = {
|
|
9260
|
+
img: this.fileSettings.imagesExtensions.split("|").join(", "),
|
|
9261
|
+
doc: this.fileSettings.docsExtensions.split("|").join(", ")
|
|
8435
9262
|
};
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
}, function (error) {
|
|
8439
|
-
_this3.$toasted.global.defaultError({
|
|
8440
|
-
msg: _this3.dictionary.msg_permitir_audio
|
|
9263
|
+
this.$toasted.global.showValidFormats({
|
|
9264
|
+
msg: "Imagens: ".concat(str.img, " - Documentos: ").concat(str.doc, " ").concat(this.dictionary.msg_extensoes_aceitas)
|
|
8441
9265
|
});
|
|
8442
|
-
|
|
8443
|
-
console.error("error audio recorder: ", error);
|
|
8444
|
-
});
|
|
8445
|
-
},
|
|
8446
|
-
toggleAudioRecorder: function toggleAudioRecorder() {
|
|
8447
|
-
if (!this.mediaRecorder.state) return this.initAudioRecorder();
|
|
8448
|
-
this.isRecording = !this.isRecording;
|
|
8449
|
-
if (this.isRecording) return this.mediaRecorder.start();
|
|
8450
|
-
return this.mediaRecorder.stop();
|
|
9266
|
+
}
|
|
8451
9267
|
},
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
9268
|
+
dropFile: function dropFile(e) {
|
|
9269
|
+
try {
|
|
9270
|
+
e.stopPropagation();
|
|
9271
|
+
e.preventDefault();
|
|
9272
|
+
var files = e.dataTransfer.files.length ? e.dataTransfer.files : "";
|
|
9273
|
+
this.filesHandler(files);
|
|
9274
|
+
} catch (e) {
|
|
9275
|
+
console.error("Erro drop file");
|
|
9276
|
+
console.error(e);
|
|
9277
|
+
}
|
|
8455
9278
|
},
|
|
8456
9279
|
pasteImage: function pasteImage(e) {
|
|
8457
|
-
|
|
8458
|
-
e.
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
if (imgRegex.test(file[0].name)) fileType = "img";
|
|
8465
|
-
var docRegex = new RegExp("(" + this.fileSettings.docsExtensions + ")", "i");
|
|
8466
|
-
if (docRegex.test(file[0].name)) fileType = "doc";
|
|
8467
|
-
|
|
8468
|
-
if (fileType) {
|
|
8469
|
-
this.fileUpload(file, fileType, true);
|
|
8470
|
-
} else {
|
|
8471
|
-
this.$toasted.global.formatoInvalido();
|
|
8472
|
-
this.$toasted.global.formatosValidos();
|
|
9280
|
+
try {
|
|
9281
|
+
if (e.clipboardData.files.length && !this.buttons.hasFiles) {
|
|
9282
|
+
e.preventDefault();
|
|
9283
|
+
return;
|
|
9284
|
+
} else if (e.clipboardData.files.length && this.buttons.hasFiles) {
|
|
9285
|
+
var files = e.clipboardData.files;
|
|
9286
|
+
this.filesHandler(files);
|
|
8473
9287
|
}
|
|
9288
|
+
} catch (e) {
|
|
9289
|
+
console.error("Nao foi possivel colar a/o imagem/documento");
|
|
9290
|
+
console.error(e);
|
|
8474
9291
|
}
|
|
8475
9292
|
}
|
|
8476
9293
|
},
|
|
8477
|
-
destroyed: function destroyed() {
|
|
8478
|
-
this.$root.$off("
|
|
8479
|
-
this.$root.$off("
|
|
8480
|
-
this.$root.$off("
|
|
8481
|
-
this.$root.$off("
|
|
8482
|
-
this.$root.$off("resize-footer-template");
|
|
9294
|
+
destroyed: function destroyed() {// this.$root.$off("drop-file")
|
|
9295
|
+
// this.$root.$off("toggle-msg-formatada")
|
|
9296
|
+
// this.$root.$off("textarea-focus")
|
|
9297
|
+
// this.$root.$off("clear-footer-message")
|
|
9298
|
+
// this.$root.$off("resize-footer-template")
|
|
8483
9299
|
}
|
|
8484
9300
|
};/* script */
|
|
8485
9301
|
var __vue_script__$2 = script$2;
|
|
@@ -8499,8 +9315,26 @@ var __vue_render__$2 = function __vue_render__() {
|
|
|
8499
9315
|
value: _vm.away,
|
|
8500
9316
|
expression: "away"
|
|
8501
9317
|
}],
|
|
8502
|
-
staticClass: "text-footer-container"
|
|
8503
|
-
|
|
9318
|
+
staticClass: "text-footer-container",
|
|
9319
|
+
on: {
|
|
9320
|
+
"drop": function drop($event) {
|
|
9321
|
+
$event.stopPropagation();
|
|
9322
|
+
return _vm.dropFile.apply(null, arguments);
|
|
9323
|
+
},
|
|
9324
|
+
"dragenter": function dragenter($event) {
|
|
9325
|
+
$event.preventDefault();
|
|
9326
|
+
},
|
|
9327
|
+
"dragover": function dragover($event) {
|
|
9328
|
+
$event.preventDefault();
|
|
9329
|
+
}
|
|
9330
|
+
}
|
|
9331
|
+
}, [_vm._ssrNode("<div" + _vm._ssrClass("text-footer", _vm.cssStyle.width ? _vm.cssStyle.width : '') + _vm._ssrStyle(null, "background-color: " + _vm.cssStyle.backgroundColor, null) + ">", "</div>", [_c('EmojisTextFooter', {
|
|
9332
|
+
directives: [{
|
|
9333
|
+
name: "show",
|
|
9334
|
+
rawName: "v-show",
|
|
9335
|
+
value: _vm.buttons.hasEmojis && !_vm.audioFile,
|
|
9336
|
+
expression: "buttons.hasEmojis && !audioFile"
|
|
9337
|
+
}],
|
|
8504
9338
|
ref: "" + this.textId,
|
|
8505
9339
|
attrs: {
|
|
8506
9340
|
"emojiId": "" + this.textId,
|
|
@@ -8510,148 +9344,60 @@ var __vue_render__$2 = function __vue_render__() {
|
|
|
8510
9344
|
on: {
|
|
8511
9345
|
"insert-emoji": _vm.insertEmoji
|
|
8512
9346
|
}
|
|
8513
|
-
})
|
|
9347
|
+
}), _vm._ssrNode(" "), _c('transition', {
|
|
8514
9348
|
attrs: {
|
|
8515
9349
|
"name": "fade"
|
|
8516
9350
|
}
|
|
8517
|
-
}, [_vm.isSending ? _c('
|
|
9351
|
+
}, [_vm.isSending ? _c('Loader') : _vm._e()], 1), _vm._ssrNode(" "), !_vm.audioFile ? _vm._ssrNode("<textarea" + _vm._ssrAttr("id", "text-footer-" + this.textId) + _vm._ssrAttr("disabled", _vm.textareaSettings.disabled) + _vm._ssrAttr("placeholder", _vm.textareaSettings.placeholderMessage) + " class=\"js-autoresize\">", "</textarea>") : _vm._ssrNode("<div class=\"text-footer-audio\">", "</div>", [_vm._ssrNode("<audio" + _vm._ssrAttr("src", _vm.audioSource) + " controls=\"controls\"></audio> "), _vm._ssrNode("<span title=\"Cancelar\" class=\"delete-audio\">", "</span>", [_c('fa-icon', {
|
|
8518
9352
|
attrs: {
|
|
8519
9353
|
"icon": ['fas', 'times']
|
|
8520
9354
|
}
|
|
8521
|
-
})], 1)], 2), _vm._ssrNode(" "
|
|
8522
|
-
'd-none': _vm.audioFile
|
|
8523
|
-
}) + ">" + _vm._ssrEscape(_vm._s("(" + this.remainingCharacters + ")")) + "</span>" : "<!---->") + " "), _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', {
|
|
8524
|
-
attrs: {
|
|
8525
|
-
"icon": ['fas', 'paper-plane']
|
|
8526
|
-
}
|
|
8527
|
-
})], 1)]) : _vm._e(), _vm._ssrNode(" "), _vm.buttons.hasFiles || _vm.buttons.hasAudio ? _vm._ssrNode("<div" + _vm._ssrClass("text-footer-actions", {
|
|
8528
|
-
'outside-buttons': _vm.cssStyle.outsideButtons && !_vm.audioFile
|
|
8529
|
-
}) + ">", "</div>", [_vm.buttons.hasAudio && !_vm.audioFile ? _vm._ssrNode("<span" + _vm._ssrClass("text-footer-actions--btn", {
|
|
8530
|
-
'audio-activated': _vm.isRecording
|
|
8531
|
-
}) + ">", "</span>", [_c('fa-icon', {
|
|
8532
|
-
attrs: {
|
|
8533
|
-
"icon": ['fas', 'microphone']
|
|
8534
|
-
}
|
|
8535
|
-
})], 1) : _vm._e(), _vm._ssrNode(" "), _vm.buttons.hasFiles && !_vm.audioFile ? _vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.dictionary.title_selecionar_anexo) + _vm._ssrClass("text-footer-actions--btn", {
|
|
8536
|
-
'files-activated': _vm.openFiles
|
|
8537
|
-
}) + ">", "</span>", [_c('fa-icon', {
|
|
8538
|
-
attrs: {
|
|
8539
|
-
"icon": ['fas', 'paperclip']
|
|
8540
|
-
}
|
|
8541
|
-
})], 1) : _vm._e()], 2) : _vm._e()], 2), _vm._ssrNode(" "), _c('transition', {
|
|
8542
|
-
attrs: {
|
|
8543
|
-
"name": "show"
|
|
8544
|
-
}
|
|
8545
|
-
}, [_vm.buttons.hasFiles && _vm.openFiles ? _c('div', {
|
|
8546
|
-
staticClass: "text-footer-files-container",
|
|
8547
|
-
class: {
|
|
8548
|
-
'horizontal': _vm.cssStyle.outsideButtons
|
|
8549
|
-
}
|
|
8550
|
-
}, [_c('div', {
|
|
8551
|
-
staticClass: "files-btn images",
|
|
9355
|
+
})], 1)], 2), _vm._ssrNode(" "), _c('RemainingCharacters', {
|
|
8552
9356
|
class: {
|
|
8553
|
-
'
|
|
8554
|
-
},
|
|
8555
|
-
attrs: {
|
|
8556
|
-
"title": _vm.dictionary.title_anexo_img
|
|
8557
|
-
},
|
|
8558
|
-
on: {
|
|
8559
|
-
"click": _vm.selectImage
|
|
8560
|
-
}
|
|
8561
|
-
}, [_c('fa-icon', {
|
|
8562
|
-
attrs: {
|
|
8563
|
-
"icon": ['fas', 'image']
|
|
8564
|
-
}
|
|
8565
|
-
})], 1), _vm._v(" "), _c('div', {
|
|
8566
|
-
staticClass: "files-btn docs",
|
|
8567
|
-
attrs: {
|
|
8568
|
-
"title": _vm.dictionary.title_anexo_doc
|
|
8569
|
-
},
|
|
8570
|
-
on: {
|
|
8571
|
-
"click": _vm.selectDoc
|
|
8572
|
-
}
|
|
8573
|
-
}, [_c('fa-icon', {
|
|
8574
|
-
attrs: {
|
|
8575
|
-
"icon": ['fas', 'file-alt']
|
|
8576
|
-
}
|
|
8577
|
-
})], 1), _vm._v(" "), _c('div', {
|
|
8578
|
-
staticClass: "files-pointers d-none"
|
|
8579
|
-
}, [_c('input', {
|
|
8580
|
-
attrs: {
|
|
8581
|
-
"type": "file",
|
|
8582
|
-
"id": "file-" + _vm.textId,
|
|
8583
|
-
"accept": "image/*"
|
|
9357
|
+
'd-none': _vm.audioFile
|
|
8584
9358
|
},
|
|
8585
|
-
on: {
|
|
8586
|
-
"change": function change($event) {
|
|
8587
|
-
return _vm.fileUpload($event, 'img');
|
|
8588
|
-
}
|
|
8589
|
-
}
|
|
8590
|
-
}), _vm._v(" "), _c('input', {
|
|
8591
9359
|
attrs: {
|
|
8592
|
-
"
|
|
8593
|
-
"
|
|
8594
|
-
"accept": "application/*"
|
|
8595
|
-
},
|
|
8596
|
-
on: {
|
|
8597
|
-
"change": function change($event) {
|
|
8598
|
-
return _vm.fileUpload($event, 'doc');
|
|
8599
|
-
}
|
|
9360
|
+
"message": _vm.message,
|
|
9361
|
+
"maxCharacters": _vm.textareaSettings.maxCharacters
|
|
8600
9362
|
}
|
|
8601
|
-
})
|
|
9363
|
+
}), _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', {
|
|
8602
9364
|
attrs: {
|
|
8603
|
-
"
|
|
8604
|
-
}
|
|
8605
|
-
}, [_vm.showFilePreview ? _c('div', {
|
|
8606
|
-
staticClass: "text-footer-preview-container",
|
|
8607
|
-
class: {
|
|
8608
|
-
'isDoc': _vm.isDoc && !_vm.fileFormatError,
|
|
8609
|
-
'isImg': !_vm.isDoc && !_vm.fileFormatError,
|
|
8610
|
-
'isError': _vm.fileFormatError
|
|
9365
|
+
"icon": ['fas', 'paper-plane']
|
|
8611
9366
|
}
|
|
8612
|
-
},
|
|
8613
|
-
|
|
9367
|
+
})], 1)]) : _vm._e(), _vm._ssrNode(" "), _vm.buttons.hasFiles || _vm.buttons.hasAudio ? _vm._ssrNode("<div" + _vm._ssrClass("text-footer-actions", {
|
|
9368
|
+
'outside-buttons': _vm.cssStyle.outsideButtons && !_vm.audioFile
|
|
9369
|
+
}) + ">", "</div>", [_c('BtnMic', {
|
|
9370
|
+
directives: [{
|
|
9371
|
+
name: "show",
|
|
9372
|
+
rawName: "v-show",
|
|
9373
|
+
value: _vm.buttons.hasAudio && !_vm.audioFile,
|
|
9374
|
+
expression: "buttons.hasAudio && !audioFile"
|
|
9375
|
+
}],
|
|
9376
|
+
ref: _vm.textId + "-mic",
|
|
8614
9377
|
attrs: {
|
|
8615
|
-
"
|
|
9378
|
+
"dictionary": _vm.dictionary
|
|
8616
9379
|
},
|
|
8617
9380
|
on: {
|
|
8618
|
-
"
|
|
8619
|
-
}
|
|
8620
|
-
}, [_c('fa-icon', {
|
|
8621
|
-
attrs: {
|
|
8622
|
-
"icon": ['fas', 'times-circle']
|
|
8623
|
-
}
|
|
8624
|
-
})], 1), _vm._v(" "), _vm.file.name ? _c('h3', {
|
|
8625
|
-
staticClass: "text-footer-preview-title"
|
|
8626
|
-
}, [_vm.isDoc ? _c('fa-icon', {
|
|
8627
|
-
attrs: {
|
|
8628
|
-
"icon": ['fas', 'file-alt']
|
|
8629
|
-
}
|
|
8630
|
-
}) : _c('fa-icon', {
|
|
8631
|
-
attrs: {
|
|
8632
|
-
"icon": ['fas', 'image']
|
|
9381
|
+
"set-audio": _vm.setAudio
|
|
8633
9382
|
}
|
|
8634
|
-
}), _vm.
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
"textContent": _vm._s(_vm.validFileFormats)
|
|
8643
|
-
}
|
|
8644
|
-
})]) : _vm._e(), _vm._v(" "), _vm.imagePreview ? _c('div', {
|
|
8645
|
-
staticClass: "text-footer-image-preview"
|
|
8646
|
-
}, [_c('img', {
|
|
9383
|
+
}), _vm._ssrNode(" "), _c('BtnFiles', {
|
|
9384
|
+
directives: [{
|
|
9385
|
+
name: "show",
|
|
9386
|
+
rawName: "v-show",
|
|
9387
|
+
value: _vm.buttons.hasFiles && !_vm.audioFile,
|
|
9388
|
+
expression: "buttons.hasFiles && !audioFile"
|
|
9389
|
+
}],
|
|
9390
|
+
ref: _vm.textId + "-file",
|
|
8647
9391
|
attrs: {
|
|
8648
|
-
"
|
|
8649
|
-
"
|
|
9392
|
+
"textId": _vm.textId,
|
|
9393
|
+
"dictionary": _vm.dictionary,
|
|
9394
|
+
"fileSettings": _vm.fileSettings,
|
|
9395
|
+
"cssStyle": _vm.cssStyle
|
|
8650
9396
|
},
|
|
8651
9397
|
on: {
|
|
8652
|
-
"
|
|
9398
|
+
"set-file-vars": _vm.setFileVars
|
|
8653
9399
|
}
|
|
8654
|
-
})]
|
|
9400
|
+
})], 2) : _vm._e()], 2)]) : _vm._e();
|
|
8655
9401
|
};
|
|
8656
9402
|
|
|
8657
9403
|
var __vue_staticRenderFns__$2 = [];
|
|
@@ -8659,8 +9405,8 @@ var __vue_staticRenderFns__$2 = [];
|
|
|
8659
9405
|
|
|
8660
9406
|
var __vue_inject_styles__$2 = function __vue_inject_styles__(inject) {
|
|
8661
9407
|
if (!inject) return;
|
|
8662
|
-
inject("data-v-
|
|
8663
|
-
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:
|
|
9408
|
+
inject("data-v-e42cf7de_0", {
|
|
9409
|
+
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 4px 5px -2px rgba(0,0,0,.25);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 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 .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:5px}.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}.text-footer-container .text-footer-preview-container{cursor:default;position:absolute;left:0;background-color:#e1e1e1;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-preview-container .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-container .text-footer-preview-container .text-footer-exclude-file svg{transition:color .2s;color:#e9594a}.text-footer-container .text-footer-preview-container .text-footer-exclude-file svg:hover{color:#e74c3c}.text-footer-container .text-footer-preview-container .text-footer-preview-title{font-size:1rem;padding:10px 0 0 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-footer-container .text-footer-preview-container .text-footer-image-preview{display:flex;justify-content:center;align-items:center;width:100%}.text-footer-container .text-footer-preview-container .text-footer-image-preview img{cursor:pointer;max-width:98%;max-height:98%;padding:2%}.text-footer-container .text-footer-preview-container .text-footer-invalid-format{color:#222;padding:10px}.text-footer-container .text-footer-preview-container .text-footer-invalid-format h3{font-weight:500}.text-footer-container .text-footer-preview-container .text-footer-invalid-format h4{font-size:.9rem}.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-text-container{position:relative}.emoji-text-container .emoji-text-btn{font-size:1.2rem;cursor:pointer}.emoji-mart-anchor,.emoji-mart-emoji span{cursor:pointer!important}.emoji-mart{z-index:2!important}.emoji-mart-scroll{overflow-x:hidden}",
|
|
8664
9410
|
map: undefined,
|
|
8665
9411
|
media: undefined
|
|
8666
9412
|
});
|
|
@@ -8671,7 +9417,7 @@ var __vue_inject_styles__$2 = function __vue_inject_styles__(inject) {
|
|
|
8671
9417
|
var __vue_scope_id__$2 = undefined;
|
|
8672
9418
|
/* module identifier */
|
|
8673
9419
|
|
|
8674
|
-
var __vue_module_identifier__$2 = "data-v-
|
|
9420
|
+
var __vue_module_identifier__$2 = "data-v-e42cf7de";
|
|
8675
9421
|
/* functional template */
|
|
8676
9422
|
|
|
8677
9423
|
var __vue_is_functional_template__$2 = false;
|
|
@@ -8724,11 +9470,6 @@ var script$1 = {
|
|
|
8724
9470
|
elem.classList.toggle("active");
|
|
8725
9471
|
}
|
|
8726
9472
|
}
|
|
8727
|
-
},
|
|
8728
|
-
isValid: function isValid(textValue) {
|
|
8729
|
-
var regex = /^[ ?????�����??��?���?��??????�������?���?��???��??\w?-�\r\n()[\]{}.,:;@??�????!&?�`�=%^*+\-$|/]+$/;
|
|
8730
|
-
var value = textValue ? textValue.trim("") : "";
|
|
8731
|
-
return regex.test(value);
|
|
8732
9473
|
}
|
|
8733
9474
|
}
|
|
8734
9475
|
};/* script */
|
|
@@ -8777,7 +9518,7 @@ var __vue_inject_styles__$1 = undefined;
|
|
|
8777
9518
|
var __vue_scope_id__$1 = undefined;
|
|
8778
9519
|
/* module identifier */
|
|
8779
9520
|
|
|
8780
|
-
var __vue_module_identifier__$1 = "data-v-
|
|
9521
|
+
var __vue_module_identifier__$1 = "data-v-4d24e86b";
|
|
8781
9522
|
/* functional template */
|
|
8782
9523
|
|
|
8783
9524
|
var __vue_is_functional_template__$1 = false;
|
|
@@ -9078,8 +9819,7 @@ var __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
|
9078
9819
|
staticRenderFns: __vue_staticRenderFns__
|
|
9079
9820
|
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, createInjectorSSR, undefined);
|
|
9080
9821
|
|
|
9081
|
-
var __vue_component__$1 = __vue_component__
|
|
9082
|
-
var components$1=/*#__PURE__*/Object.freeze({__proto__:null,TemplateGenerator: __vue_component__$1,TextFooter: TextFooter});var install = function installVueIntergrallPlugins(Vue) {
|
|
9822
|
+
var __vue_component__$1 = __vue_component__;var components$1=/*#__PURE__*/Object.freeze({__proto__:null,TemplateGenerator: __vue_component__$1,TextFooter: TextFooter});var install = function installVueIntergrallPlugins(Vue) {
|
|
9083
9823
|
Object.entries(components$1).forEach(function (_ref) {
|
|
9084
9824
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
9085
9825
|
componentName = _ref2[0],
|