vue-intergrall-plugins 0.0.245 → 0.0.248
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 +162 -97
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +139 -137
- package/package.json +1 -1
- package/src/lib-components/Messages/AnexoMensagem.vue +110 -40
- package/src/lib-components/Messages/ChatMessages.vue +5 -2
- package/src/lib-components/Templates/TemplateGenerator.vue +4 -3
- package/src/lib-components/Templates/TemplateSingle.vue +18 -2
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<div v-else class="mensagem" :class="{mapa, 'hist-msg' : histMsg, 'max-w-60' : link && !mapa}">
|
|
12
12
|
<template v-if="anexos && anexos.length">
|
|
13
13
|
<div class="mensagem-anexo" v-for="(anexo, index) in anexos" :key="index">
|
|
14
|
-
<AnexoMensagem :dictionary="dictionary" :anexo="anexo" :origemExterna="origemExterna" :dominio="dominio" @abrir-imagem="abrirImagem"/>
|
|
14
|
+
<AnexoMensagem :dictionary="dictionary" :anexo="anexo" :origemExterna="origemExterna" :dominio="dominio" @abrir-imagem="abrirImagem" @download-all="$emit('download-all')"/>
|
|
15
15
|
</div>
|
|
16
16
|
</template>
|
|
17
17
|
<img class="default-stick-size" v-if="urlSticker" :src="urlSticker" :title="urlFileName">
|
|
@@ -78,7 +78,10 @@ import LinkPreview from './LinkPreview'
|
|
|
78
78
|
|
|
79
79
|
export default {
|
|
80
80
|
components: { AnexoMensagem, InteratividadeBotoes, InteratividadeFormulario, LinkPreview },
|
|
81
|
-
props: ["smartchannel", "messageIndex", "dictionary", "autor", "origem", "msg", "link", "anexo", "imgAnexo", "tipoDoc", "docAnexo", "nomeArquivo", "audio", "video", "horario", "status", "logo", "msgTooltip", "seq", "mapa", "histMsg", "erro", "msgErro", "origemExterna", "anexos", "dominio", "corMsg", "interatividade", "msgReply", "hasReply", "iniDialogo", "dialogoId", "dialogoOrigem", "expSessao"],
|
|
81
|
+
props: ["smartchannel", "messageIndex", "dictionary", "autor", "origem", "msg", "link", "anexo", "imgAnexo", "tipoDoc", "docAnexo", "nomeArquivo", "audio", "video", "horario", "status", "logo", "msgTooltip", "seq", "mapa", "histMsg", "erro", "msgErro", "origemExterna", "anexos", "dominio", "corMsg", "interatividade", "msgReply", "hasReply", "iniDialogo", "dialogoId", "dialogoOrigem", "expSessao", "referenceSelector"],
|
|
82
|
+
created() {
|
|
83
|
+
if(!this.$root.$refs.chatMessages) this.$root.$refs.chatMessages = this
|
|
84
|
+
},
|
|
82
85
|
data(){
|
|
83
86
|
return{
|
|
84
87
|
strTooltipAux: "",
|
|
@@ -141,6 +141,9 @@
|
|
|
141
141
|
}
|
|
142
142
|
this.adjustOnSelect()
|
|
143
143
|
},
|
|
144
|
+
focusSelect() {
|
|
145
|
+
if(this.$refs["template-v-select"] && this.$refs["template-v-select"].$el) this.$refs["template-v-select"].$el.querySelector("input").focus()
|
|
146
|
+
},
|
|
144
147
|
selectIfIsUnique() {
|
|
145
148
|
if(Object.keys(this.templates).length === 1) {
|
|
146
149
|
for(let key in this.templates) {
|
|
@@ -150,9 +153,7 @@
|
|
|
150
153
|
this.adjustOnSelect()
|
|
151
154
|
}
|
|
152
155
|
}
|
|
153
|
-
if(!this.codTemplate
|
|
154
|
-
this.$refs["template-v-select"].$el.querySelector("input").focus()
|
|
155
|
-
}
|
|
156
|
+
if(!this.codTemplate) this.focusSelect()
|
|
156
157
|
},
|
|
157
158
|
selectIfHasContact24h() {
|
|
158
159
|
if(this.templates['envio_msg']) {
|
|
@@ -171,6 +171,8 @@ export default {
|
|
|
171
171
|
setEvent(input) {
|
|
172
172
|
const varList = input.nextSibling
|
|
173
173
|
|
|
174
|
+
const currentInstance = this
|
|
175
|
+
|
|
174
176
|
input.setAttribute("placeholder", `{{var_${this.lastVar}}}`);
|
|
175
177
|
input.setAttribute("id", `{{var_${this.lastVar}}}`);
|
|
176
178
|
input.addEventListener("input", (event) => {
|
|
@@ -181,11 +183,26 @@ export default {
|
|
|
181
183
|
input.classList.remove("invalid");
|
|
182
184
|
input.classList.add("active");
|
|
183
185
|
if(varList) {
|
|
186
|
+
const handleNextFocus = () => {
|
|
187
|
+
const allInputs = document.querySelectorAll(`.input-var-${currentInstance.identifier}`)
|
|
188
|
+
let stop = false
|
|
189
|
+
if(allInputs.length) {
|
|
190
|
+
allInputs.forEach(elem => {
|
|
191
|
+
if(!elem.value && !stop) {
|
|
192
|
+
stop = true
|
|
193
|
+
elem.focus()
|
|
194
|
+
}
|
|
195
|
+
})
|
|
196
|
+
}
|
|
197
|
+
if(!stop && this.$refs["template-single-button"]) this.$refs["template-single-button"].focus()
|
|
198
|
+
}
|
|
199
|
+
|
|
184
200
|
for(let i = 0; i < varList.children.length; i++) {
|
|
185
201
|
varList.children[i].addEventListener("click", function() {
|
|
186
202
|
input.value = `[${this.innerText}]`
|
|
187
203
|
input.classList.add("active")
|
|
188
204
|
input.dispatchEvent(new Event('input'))
|
|
205
|
+
handleNextFocus()
|
|
189
206
|
})
|
|
190
207
|
}
|
|
191
208
|
|
|
@@ -213,8 +230,7 @@ export default {
|
|
|
213
230
|
if(varList) varList.classList.remove("visible")
|
|
214
231
|
});
|
|
215
232
|
input.addEventListener("keydown", (event) => {
|
|
216
|
-
if (event.keyCode == 13 && this.hasButton)
|
|
217
|
-
this.$emit("click-trigger");
|
|
233
|
+
if (event.keyCode == 13 && this.hasButton) this.$emit("click-trigger");
|
|
218
234
|
});
|
|
219
235
|
this.lastVar += 1;
|
|
220
236
|
},
|