vue-intergrall-plugins 0.0.157 → 0.0.160
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 +225 -4129
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +273 -4089
- package/package.json +1 -1
- package/src/lib-components/Chat/BtnFiles.vue +5 -1
- package/src/lib-components/Chat/MultipleFilePreview.vue +1 -1
- package/src/lib-components/Chat/StandardMessages.vue +19 -8
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">
|
|
@@ -117,6 +117,7 @@ export default {
|
|
|
117
117
|
data() {
|
|
118
118
|
return {
|
|
119
119
|
file: [],
|
|
120
|
+
fileSize: 0,
|
|
120
121
|
openFiles: false,
|
|
121
122
|
showFilePreview: false,
|
|
122
123
|
imagePreview: "",
|
|
@@ -149,6 +150,7 @@ export default {
|
|
|
149
150
|
},
|
|
150
151
|
openSelectFileHandler(type) {
|
|
151
152
|
if(type == "system"){ this.$emit("open-file-system", true); return false }
|
|
153
|
+
if(this.fileSettings.multiple){ type = 'both' }
|
|
152
154
|
const fileInput = document.querySelector(`#${type}-${this.textId}`)
|
|
153
155
|
if(fileInput) fileInput.click()
|
|
154
156
|
if(!fileInput) if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError()
|
|
@@ -172,6 +174,7 @@ export default {
|
|
|
172
174
|
},
|
|
173
175
|
fileUpload(event, type, externalCall) {
|
|
174
176
|
try {
|
|
177
|
+
this.fileSize = 0
|
|
175
178
|
if(this.fileFormatError) this.file = []
|
|
176
179
|
this.openFiles = false
|
|
177
180
|
let filesAux = !externalCall ? event.target.files ? event.target.files : event.dataTransfer.files : event
|
|
@@ -179,6 +182,7 @@ export default {
|
|
|
179
182
|
|
|
180
183
|
if(!this.file.length) return
|
|
181
184
|
this.hasAnyFile = true
|
|
185
|
+
this.fileSize = this.file.length
|
|
182
186
|
if(!this.fileSettings.multiple) {
|
|
183
187
|
this.file = this.file[0]
|
|
184
188
|
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
|
},
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
label="value"
|
|
10
10
|
v-model="key_1"
|
|
11
11
|
:reduce="formatted_messages_1 => formatted_messages_1.cod"
|
|
12
|
-
@input="
|
|
12
|
+
@input="inputSelectKey1"
|
|
13
13
|
>
|
|
14
14
|
<div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
|
|
15
15
|
</v-select>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
label="value"
|
|
24
24
|
v-model="key_2"
|
|
25
25
|
:reduce="formatted_messages_2 => formatted_messages_2.cod"
|
|
26
|
-
@input="
|
|
26
|
+
@input="inputSelectKey2"
|
|
27
27
|
>
|
|
28
28
|
<div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
|
|
29
29
|
</v-select>
|
|
@@ -90,7 +90,6 @@ export default {
|
|
|
90
90
|
data() {
|
|
91
91
|
return {
|
|
92
92
|
placement: "top",
|
|
93
|
-
firstMount: true,
|
|
94
93
|
formatted_messages_1: [{ cod: "T", value: "Todos" }],
|
|
95
94
|
key_1: "T",
|
|
96
95
|
formatted_messages_2: [],
|
|
@@ -110,13 +109,25 @@ export default {
|
|
|
110
109
|
})
|
|
111
110
|
return () => popper.destroy()
|
|
112
111
|
},
|
|
112
|
+
inputSelectKey1() {
|
|
113
|
+
if(!this.key_1) {
|
|
114
|
+
if(this.formatted_messages_2.length) this.formatted_messages_2 = []
|
|
115
|
+
if(this.key_2) this.key_2 = ""
|
|
116
|
+
return
|
|
117
|
+
}
|
|
118
|
+
this.receiveValueFormattedMessage(this.key_1, 2)
|
|
119
|
+
},
|
|
120
|
+
inputSelectKey2() {
|
|
121
|
+
if(!this.key_2) {
|
|
122
|
+
if(this.formatted_messages_3.length) this.formatted_messages_3 = []
|
|
123
|
+
if(this.key_3) this.key_3 = ""
|
|
124
|
+
return
|
|
125
|
+
}
|
|
126
|
+
this.receiveValueFormattedMessage(`T/${this.key_2}`, 3)
|
|
127
|
+
},
|
|
113
128
|
receiveValueFormattedMessage(cod, selectionIndex) {
|
|
114
129
|
try {
|
|
115
130
|
if(!this.token_cliente) throw new Error("Informe token_cliente como chave na propriedade formattedMessageSettings que ocorre na chamada componente TextFooter ")
|
|
116
|
-
if(this.firstMount) {
|
|
117
|
-
cod = `${this.key_1}/${cod}`
|
|
118
|
-
this.firstMount = false
|
|
119
|
-
}
|
|
120
131
|
this.getStandardMessages(cod, this.token_cliente).then((data) => {
|
|
121
132
|
if(data && typeof(data) == 'string') return this.$toasted.global.emConstrucao({msg: data})
|
|
122
133
|
if(data) return this.showFormattedMessage(data, selectionIndex)
|
|
@@ -142,7 +153,7 @@ export default {
|
|
|
142
153
|
if(this.formatted_messages_2.length == 1) {
|
|
143
154
|
if(this.formatted_messages_2[0].cod) {
|
|
144
155
|
this.key_2 = this.formatted_messages_2[0].cod
|
|
145
|
-
this.receiveValueFormattedMessage(this.key_2
|
|
156
|
+
this.receiveValueFormattedMessage(`T/${this.key_2}`, 3)
|
|
146
157
|
}
|
|
147
158
|
}
|
|
148
159
|
}
|