vue-intergrall-plugins 0.0.280 → 0.0.281

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.
Files changed (40) hide show
  1. package/README.md +185 -185
  2. package/dist/vue-intergrall-plugins.esm.js +84 -58
  3. package/dist/vue-intergrall-plugins.min.js +1 -1
  4. package/dist/vue-intergrall-plugins.ssr.js +124 -124
  5. package/package.json +66 -66
  6. package/src/lib-components/Buttons/IconButton.vue +27 -27
  7. package/src/lib-components/Buttons/SimpleButton.vue +140 -140
  8. package/src/lib-components/Cards/Card.vue +412 -412
  9. package/src/lib-components/Cards/CardCheck.vue +35 -35
  10. package/src/lib-components/Cards/CardFile.vue +157 -157
  11. package/src/lib-components/Chat/BtnDownloadAllFiles.vue +32 -32
  12. package/src/lib-components/Chat/BtnEmojis.vue +124 -124
  13. package/src/lib-components/Chat/BtnExpand.vue +17 -17
  14. package/src/lib-components/Chat/BtnFiles.vue +415 -415
  15. package/src/lib-components/Chat/BtnMic.vue +60 -60
  16. package/src/lib-components/Chat/BtnScreenShare.vue +32 -32
  17. package/src/lib-components/Chat/BtnStandardMessages.vue +17 -17
  18. package/src/lib-components/Chat/ExpandTextarea.vue +410 -410
  19. package/src/lib-components/Chat/MultipleFilePreview.vue +266 -266
  20. package/src/lib-components/Chat/Picker.vue +368 -368
  21. package/src/lib-components/Chat/RemainingCharacters.vue +28 -28
  22. package/src/lib-components/Chat/SingleFilePreview.vue +94 -94
  23. package/src/lib-components/Chat/SkeletonPicker.vue +110 -110
  24. package/src/lib-components/Chat/StandardMessages.vue +245 -245
  25. package/src/lib-components/Chat/TextFooter.vue +817 -817
  26. package/src/lib-components/Email/EmailFile.vue +125 -125
  27. package/src/lib-components/Email/EmailItem.vue +185 -185
  28. package/src/lib-components/Loader/Loader.vue +78 -78
  29. package/src/lib-components/Messages/AnexoMensagem.vue +384 -384
  30. package/src/lib-components/Messages/CardAttachment.vue +61 -61
  31. package/src/lib-components/Messages/CardMessages.vue +452 -393
  32. package/src/lib-components/Messages/ChatMessages.vue +573 -573
  33. package/src/lib-components/Messages/InteratividadeBotoes.vue +165 -165
  34. package/src/lib-components/Messages/InteratividadeFormulario.vue +392 -392
  35. package/src/lib-components/Messages/InteratividadePopup.vue +88 -88
  36. package/src/lib-components/Messages/LinkPreview.vue +163 -163
  37. package/src/lib-components/Scroll/ScrollContent.vue +150 -150
  38. package/src/lib-components/Templates/TemplateGenerator.vue +576 -576
  39. package/src/lib-components/Templates/TemplateMessage.vue +83 -83
  40. package/src/lib-components/Templates/TemplateSingle.vue +481 -481
@@ -1,573 +1,573 @@
1
- <template>
2
- <div :class="'mensagem__'+origem" v-if="origem && !erro" :id="`a${messageIndex ? messageIndex : randomizeValue}`">
3
- <InteratividadeFormulario
4
- v-if="interatividade && validateInterativity()"
5
- :interatividade="interatividade"
6
- :dominio="dominio"
7
- :infoCanal="infoCanalTeste"
8
- :anexos="anexos"
9
- :dictionary="dictionary"
10
- />
11
- <div v-else class="mensagem" :class="{mapa, 'hist-msg' : histMsg, 'max-w-60' : link && !mapa}">
12
- <div v-if="isReply && replyMessage" class="mensagem-reply" :class="`message-reply-${origem}`">
13
- <p v-if="replyMessage" v-html="replyMessage"></p>
14
- <span v-else class="mensagem-reply-vazia">
15
- <fa-icon :icon="['fas', 'times']" v-if="showReplyIcon" />
16
- {{ defaultReplyMessage ? defaultReplyMessage : dictionary.mensagem_reply_padrao }}
17
- </span>
18
- </div>
19
- <template v-if="anexos && anexos.length">
20
- <div class="mensagem-anexo" v-for="(anexo, index) in anexos" :key="index">
21
- <AnexoMensagem :showControlFiles="showControlFiles" :referenceSelector="referenceSelector" :dictionary="dictionary" :anexo="anexo" :origemExterna="origemExterna" :dominio="dominio" @abrir-imagem="abrirImagem" @download-all="$emit('download-all')"/>
22
- </div>
23
- </template>
24
- <img class="default-stick-size" v-if="urlSticker" :src="urlSticker" :title="urlFileName">
25
- <div v-if="mapa" class="mensagem-div-mapa">
26
- <GmapMap
27
- :id="`mapa_${seq}`"
28
- class="msg-mapa"
29
- :center="center"
30
- :zoom="17"
31
- :options="mapOptions"
32
- >
33
- <GmapMarker :position="marker" />
34
- </GmapMap>
35
- <ul class="info-mapa" v-if="infos.length">
36
- <li v-for="(info, index) in infos" :key="index" :class="info.classe">
37
- <template v-if="!info.link"> {{ info.value }} </template>
38
- <a v-else :href="info.value" @click.prevent="abrirPopup(info.value)"> {{ info.textLink }} <fa-icon :icon="['fas', 'map-marker-alt']" /> </a>
39
- </li>
40
- </ul>
41
- </div>
42
- <LinkPreview v-if="link && !mapa && status != 'O'" :message="message" />
43
- <p v-html="validateInterativity() ? '' : formatMsg(message)"></p>
44
- <InteratividadeBotoes
45
- v-if="interatividade"
46
- :interatividade="interatividade"
47
- />
48
- <span class="horario-envio" v-text="horario"></span>
49
- <transition name="fade" mode="out-in">
50
- <span :class="reply" v-if="hasReply && (status == 'C' || status == 'T' || status == 'ERRO')" v-tippy :content="msgReply ? msgReply : 'Fazer reenvio da mensagem'" @click="$emit('replyMsg')"> <fa-icon :icon="['fas', 'reply']" /> </span>
51
- </transition>
52
- <transition name="fade" mode="out-in" v-if="validadeSeq">
53
- <span class="star dourado" v-if="iniDialogo > 0" :content="contentTooltipStar" v-tippy key="star-padrao-dourado">
54
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
55
- <path fill="#FFD700" d="M224 122.8c-72.7 0-131.8 59.1-131.9 131.8 0 24.9 7 49.2 20.2 70.1l3.1 5-13.3 48.6 49.9-13.1 4.8 2.9c20.2 12 43.4 18.4 67.1 18.4h.1c72.6 0 133.3-59.1 133.3-131.8 0-35.2-15.2-68.3-40.1-93.2-25-25-58-38.7-93.2-38.7zm77.5 188.4c-3.3 9.3-19.1 17.7-26.7 18.8-12.6 1.9-22.4.9-47.5-9.9-39.7-17.2-65.7-57.2-67.7-59.8-2-2.6-16.2-21.5-16.2-41s10.2-29.1 13.9-33.1c3.6-4 7.9-5 10.6-5 2.6 0 5.3 0 7.6.1 2.4.1 5.7-.9 8.9 6.8 3.3 7.9 11.2 27.4 12.2 29.4s1.7 4.3.3 6.9c-7.6 15.2-15.7 14.6-11.6 21.6 15.3 26.3 30.6 35.4 53.9 47.1 4 2 6.3 1.7 8.6-1 2.3-2.6 9.9-11.6 12.5-15.5 2.6-4 5.3-3.3 8.9-2 3.6 1.3 23.1 10.9 27.1 12.9s6.6 3 7.6 4.6c.9 1.9.9 9.9-2.4 19.1zM400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM223.9 413.2c-26.6 0-52.7-6.7-75.8-19.3L64 416l22.5-82.2c-13.9-24-21.2-51.3-21.2-79.3C65.4 167.1 136.5 96 223.9 96c42.4 0 82.2 16.5 112.2 46.5 29.9 30 47.9 69.8 47.9 112.2 0 87.4-72.7 158.5-160.1 158.5z"/>
56
- </svg>
57
- </span>
58
- <span class="star cinza" v-if="iniDialogo == 0" :content="contentTooltipStar" v-tippy key="star-padrao-cinza">
59
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
60
- <path fill="#808080" d="M224 122.8c-72.7 0-131.8 59.1-131.9 131.8 0 24.9 7 49.2 20.2 70.1l3.1 5-13.3 48.6 49.9-13.1 4.8 2.9c20.2 12 43.4 18.4 67.1 18.4h.1c72.6 0 133.3-59.1 133.3-131.8 0-35.2-15.2-68.3-40.1-93.2-25-25-58-38.7-93.2-38.7zm77.5 188.4c-3.3 9.3-19.1 17.7-26.7 18.8-12.6 1.9-22.4.9-47.5-9.9-39.7-17.2-65.7-57.2-67.7-59.8-2-2.6-16.2-21.5-16.2-41s10.2-29.1 13.9-33.1c3.6-4 7.9-5 10.6-5 2.6 0 5.3 0 7.6.1 2.4.1 5.7-.9 8.9 6.8 3.3 7.9 11.2 27.4 12.2 29.4s1.7 4.3.3 6.9c-7.6 15.2-15.7 14.6-11.6 21.6 15.3 26.3 30.6 35.4 53.9 47.1 4 2 6.3 1.7 8.6-1 2.3-2.6 9.9-11.6 12.5-15.5 2.6-4 5.3-3.3 8.9-2 3.6 1.3 23.1 10.9 27.1 12.9s6.6 3 7.6 4.6c.9 1.9.9 9.9-2.4 19.1zM400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM223.9 413.2c-26.6 0-52.7-6.7-75.8-19.3L64 416l22.5-82.2c-13.9-24-21.2-51.3-21.2-79.3C65.4 167.1 136.5 96 223.9 96c42.4 0 82.2 16.5 112.2 46.5 29.9 30 47.9 69.8 47.9 112.2 0 87.4-72.7 158.5-160.1 158.5z"/>
61
- </svg>
62
- </span>
63
- </transition>
64
- <transition name="fade" mode="out-in">
65
- <span class="check" v-if="status == 'D'" :content="contentTooltip" v-tippy key="check-padrao"> <fa-icon :icon="['fas', 'check']" /> </span>
66
- <span class="check cinza" v-else-if="status == 'Q'" :content="contentTooltip" v-tippy key="check-cinza"> <fa-icon :icon="['fas', 'check']" /> </span>
67
- <span class="check preto" v-else-if="status == 'G'" :content="contentTooltip" v-tippy key="check-preto"> <fa-icon :icon="['fas', 'check']" /> </span>
68
- <span class="check preto" v-else-if="status == 'E'" :content="contentTooltip" v-tippy key="double-check-preto"> <fa-icon :icon="['fas', 'check-double']" /> </span>
69
- <span class="check visualizado" v-else-if="status == 'L'" :content="contentTooltip" v-tippy key="double-check-visualizado"> <fa-icon :icon="['fas', 'check-double']" /> </span> <!-- Status finalizador -->
70
- <span class="check vermelho" v-else-if="status == 'C' || status == 'ERRO'" :content="contentTooltip" v-tippy key="times-circle"> <fa-icon :icon="['fas', 'times-circle']" /> </span> <!-- Status finalizador -->
71
- <span class="check vermelho" v-else-if="status == 'T'" :content="contentTooltip" v-tippy key="hourglass"> <fa-icon :icon="['fas', 'hourglass']" /> </span> <!-- Status finalizador -->
72
- <span class="check vermelho" v-else-if="status == 'O'" :content="contentTooltip" v-tippy key="deleted"> <fa-icon :icon="['fas', 'times']" /> </span> <!-- Status de mensagem deletada -->
73
- </transition>
74
-
75
- <span class="autor-mensagem" v-html="autor"></span>
76
- </div>
77
- </div>
78
- </template>
79
-
80
- <script>
81
- import AnexoMensagem from "./AnexoMensagem"
82
- import InteratividadeBotoes from "./InteratividadeBotoes"
83
- import InteratividadeFormulario from "./InteratividadeFormulario"
84
- import { formataTimezoneData } from "../../services/textFormatting"
85
- import LinkPreview from './LinkPreview'
86
-
87
- export default {
88
- components: { AnexoMensagem, InteratividadeBotoes, InteratividadeFormulario, LinkPreview },
89
- 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", "replyMessage", "isReply", "defaultReplyMessage", "showReplyIcon", "showControlFiles"],
90
- created() {
91
- if(!this.$root.$refs.chatMessages) this.$root.$refs.chatMessages = this
92
- },
93
- data(){
94
- return{
95
- strTooltipAux: "",
96
- linkAux: "",
97
- urlSticker: "",
98
- urlFileName: "",
99
- message: "",
100
- reply: "reply",
101
- center: {},
102
- marker: {},
103
- infos: [],
104
- infoCanalTeste: {PRAZO: "2022-05-05", SITUACAO: {cod: "3", desc: "Em analise pelo fornecedor", cor: "#03A64A"}, DATA_ABERTURA: "2022-05-03 09:43:43"},
105
- mapOptions: {
106
- zoomControl: true,
107
- mapTypeControl: false,
108
- scaleControl: false,
109
- streetViewControl: false,
110
- rotateControl: false,
111
- fullscreenControl: false,
112
- disableDefaultUI: false
113
- }
114
- }
115
- },
116
- computed: {
117
- hrefAnexo(){
118
- if(this.docAnexo){
119
- if(this.tipoDoc == "erro"){
120
- return this.hrefAnexo = "#"
121
- }else{
122
- return this.docAnexo
123
- }
124
- }
125
- },
126
- randomizeValue() {
127
- return `${(Math.floor(Math.random() * 7770))}${Date.now()}`
128
- },
129
- contentTooltip: {
130
- get(){
131
- if(this.status && !this.msgTooltip){
132
- const msgStatus = "msg_status_"+this.status
133
- return this.strTooltipAux = this.dictionary[msgStatus]
134
- }else if(this.status && this.msgTooltip){
135
- return this.strTooltipAux = this.msgTooltip
136
- }
137
- },
138
- set(msg){
139
- return this.contentTooltip = msg
140
- }
141
- },
142
- contentTooltipStar() {
143
- let tooltipStar = "";
144
- if(this.iniDialogo == 1){
145
- tooltipStar += this.dictionary['ini_sessao']+"<br/>"
146
- }
147
- else {
148
- tooltipStar += this.dictionary['ini_sessao_padrao']+"<br/>"
149
- }
150
- tooltipStar += this.dialogoId ? this.dictionary['id_conversa']+" - "+ this.dialogoId +"<br/>" : ""
151
- tooltipStar += this.dialogoOrigem ? this.dictionary['origem_conversa']+" - "+ this.dialogoOrigem +"<br/>" : ""
152
- tooltipStar += this.expSessao ? this.dictionary['expiracao_sessao']+" - "+ formataTimezoneData(this.expSessao) +"<br/>" : ""
153
- return tooltipStar
154
- },
155
- validadeSeq(){
156
- if(this.seq && this.seq.substring(0, 2) == "HW") return true
157
- this.reply = "reply reply-with-2-icons"
158
- return false;
159
- }
160
- },
161
- mounted() {
162
- if(this.mapa) this.setMap()
163
- if(this.corMsg) this.setCorMsg()
164
- this.validadeUrlToMsg()
165
- },
166
- methods: {
167
- validateInterativity(){
168
- try {
169
- if(this.interatividade && (this.interatividade.formulario && this.interatividade.formulario.length) || (this.interatividade.list && this.interatividade.tipo == 'listItem')){
170
- return true;
171
- }
172
- return false;
173
- } catch (error) {
174
- return false;
175
- }
176
- },
177
- validadeUrlToMsg(){
178
- try {
179
- this.message = this.msg
180
- if(this.validadeIfExistsSticker()){
181
- this.urlSticker = this.getUrlSticker()
182
- this.urlFileName = this.getUrlFileName()
183
- this.message = this.removeUrlStickerByString(this.urlSticker)
184
- }
185
- } catch (error) {
186
- console.error("Error validating url to msg: ", error)
187
- }
188
- },
189
- getUrlFileName(){
190
- let urlRegex = /(?<=\/)[^\/\?#]+(?=[^\/]*$)/;
191
- let urlName = this.urlSticker.match(urlRegex)[0];
192
- return urlName;
193
- },
194
- removeUrlStickerByString(url){
195
- let msg = this.message.replace(`KSTICKERK ${url}`, '')
196
- return msg;
197
- },
198
- getUrlSticker(){
199
- let urlRegex = /(https?:\/\/[^ ]*)/;
200
- let url = this.message.match(urlRegex)[1];
201
- return url;
202
- },
203
- validadeIfExistsSticker(){
204
- if(this.message && this.message.indexOf("KSTICKERK https://") === 0) return true
205
- return false
206
- },
207
- setCorMsg() {
208
- try {
209
- const root = document.documentElement
210
- root.style.setProperty('--message-color', this.corMsg)
211
- this.adjustFontColor(this.corMsg)
212
- }catch(e) {
213
- console.error("Erro ao atribuir a cor as mensagens")
214
- console.error(e)
215
- }
216
- },
217
- setMap() {
218
- let objMapa = typeof this.mapa === "string" ? JSON.parse(`${this.mapa}`) : this.mapa
219
- if(objMapa.latitude && objMapa.longitude) {
220
- objMapa.latitude = parseFloat(objMapa.latitude)
221
- objMapa.longitude = parseFloat(objMapa.longitude)
222
-
223
- this.center.lat = objMapa.latitude
224
- this.center.lng = objMapa.longitude
225
-
226
- this.marker.lat = objMapa.latitude
227
- this.marker.lng = objMapa.longitude
228
-
229
- this.infos.push(
230
- { classe: "title", value: objMapa.name },
231
- { classe: "address", value: objMapa.address },
232
- { classe: "url", value: `https://www.google.com/maps/search/?api=1&query=${this.marker.lat},${this.marker.lng}`, link: true, textLink: this.dictionary.abrir_mapa }
233
- )
234
- }
235
- },
236
- abrirPopup(url) {
237
- window.open(url, "map-popup", "width=auto,height=auto")
238
- },
239
- abrirImagem(imagem) {
240
- this.$emit("abrir-imagem", imagem)
241
- },
242
- adjustFontColor(cor) {
243
- try {
244
- var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(cor);
245
-
246
- if(!result) return
247
-
248
- var r = parseInt(result[1], 16);
249
- var g = parseInt(result[2], 16);
250
- var b = parseInt(result[3], 16);
251
-
252
- r /= 255, g /= 255, b /= 255;
253
- var max = Math.max(r, g, b), min = Math.min(r, g, b);
254
- var h, s, l = (max + min) / 2;
255
-
256
- if(max == min){
257
- h = s = 0; // achromatic
258
- } else {
259
- var d = max - min;
260
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
261
- switch(max) {
262
- case r: h = (g - b) / d + (g < b ? 6 : 0); break;
263
- case g: h = (b - r) / d + 2; break;
264
- case b: h = (r - g) / d + 4; break;
265
- }
266
- h /= 6;
267
- }
268
-
269
- s = s*100;
270
- s = Math.round(s);
271
- l = l*100;
272
- l = Math.round(l);
273
- h = Math.round(360*h);
274
-
275
- const root = document.documentElement
276
- root.style.setProperty('--text-color', l <= 50 ? "#FFF" : "#111B21")
277
- root.style.setProperty('--files-bg', l <= 50 ? "rgba(255, 255, 255, 0.1)" : "rgba(100, 100, 100, 0.1)")
278
- root.style.setProperty('--files-bg-hover', l <= 50 ? "rgba(255, 255, 255, 0.3)" : "rgba(100, 100, 100, 0.3)")
279
- }catch(e) {
280
- console.error("Erro ao ajustar a cor da mensagem: ", e)
281
- }
282
- },
283
- formatMsg(msg) {
284
- if(this.status == 'O') return this.dictionary.msg_excluida ? this.dictionary.msg_excluida : 'MENSAGEM DELETADA'
285
- const regex = /(\n|&nbsp;)/g
286
- if(regex.test(msg)) msg = msg.replace(regex, "<br>")
287
- return msg
288
- },
289
- }
290
- }
291
- </script>
292
-
293
- <style>
294
- :root {
295
- --message-color: #373737;
296
- --text-color: #FFF;
297
- --files-bg: rgba(255, 255, 255, 0.1);
298
- --files-bg-hover: rgba(255, 255, 255, 0.1);
299
-
300
- --light: 80;
301
- --threshold: 60;
302
- }
303
-
304
- .fade-enter-active, .fade-leave-active {
305
- transition: opacity .5s;
306
- }
307
- .fade-enter, .fade-leave-to {
308
- opacity: 0;
309
- }
310
-
311
- .mensagem-reply {
312
- padding: 5px 10px;
313
- font-size: .75rem;
314
- color: #666;
315
- transition: background-color 150ms ease-in-out;
316
- border-radius: 5px;
317
- margin: 5px 0;
318
- overflow: hidden;
319
- max-width: 100%;
320
- }
321
- .mensagem-reply p {
322
- overflow: hidden;
323
- text-overflow: ellipsis;
324
- white-space: nowrap;
325
- }
326
-
327
- .message-reply-principal {
328
- border-left: 3px solid transparent;
329
- background-color: rgba(100, 100, 100, 0.1)
330
- }
331
- .message-reply-principal:hover {
332
- background-color: rgba(100, 100, 100, 0.2);
333
- }
334
-
335
- .message-reply-outros {
336
- background-color: rgb(245, 245, 245);
337
- border-left: 3px solid var(--message-color);
338
- }
339
- .message-reply-outros:hover {
340
- background-color: rgb(235, 235, 235)
341
- }
342
-
343
- .mensagem-reply-vazia {
344
- display: flex;
345
- align-items: center;
346
- }
347
- .mensagem-reply-vazia svg {
348
- margin-right: 5px;
349
- color: #ba181b;
350
- }
351
-
352
- .mensagem {
353
- padding: 14px 7px;
354
- border-radius: 5px;
355
- min-width: 150px;
356
- min-height: 60px;
357
- width: -webkit-fit-content;
358
- width: -moz-fit-content;
359
- width: fit-content;
360
- position: relative;
361
- max-width: 80%;
362
- margin-bottom: 10px;
363
- font-size: .75rem;
364
- word-break: break-word;
365
-
366
- -webkit-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
367
- -moz-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
368
- box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
369
- }
370
- .mensagem.max-w-60 {
371
- max-width: 60%;
372
- }
373
- .mensagem.mapa {
374
- width: 100%
375
- }
376
- .mensagem.hist-msg {
377
- animation: show 1s;
378
- }
379
- .mensagem a {
380
- margin-right: 5px;
381
- font-weight: 550;
382
- color: inherit;
383
- text-decoration: none;
384
- }
385
- .mensagem a:hover {
386
- text-decoration: underline;
387
- }
388
- .message p {
389
- white-space: pre-wrap;
390
- }
391
-
392
- .mensagem-anexo a, .mensagem-div-mapa a {
393
- white-space: nowrap;
394
- text-overflow: ellipsis;
395
- overflow: hidden;
396
- }
397
-
398
- .reply {
399
- cursor: pointer;
400
- position: absolute;
401
- right: 53px;
402
- bottom: 5px;
403
- font-size: .6rem;
404
- color: #67a332;
405
- width: .9rem;
406
- height: .9rem;
407
- display: flex;
408
- justify-content: center;
409
- align-items: center;
410
- border-radius: 50%;
411
- background-color: #FFF;
412
- }
413
- .reply svg {
414
- margin-top: -1px;
415
- margin-right: -1px;
416
- }
417
- .reply-with-2-icons{
418
- right: 30px;
419
- }
420
-
421
- .check{
422
- cursor: pointer;
423
- position: absolute;
424
- right: 10px;
425
- bottom: 2px;
426
- font-size: 0.7rem;
427
- }
428
- .check.visualizado, .check.visualizado svg{
429
- color: #006DAA
430
- }
431
- .check.verde, .check.verde svg{
432
- color: #4f772d
433
- }
434
- .check.vermelho, .check.vermelho svg{
435
- color: #ba181b
436
- }
437
- .check.cinza, .check.cinza svg{
438
- color: #999
439
- }
440
- .check.preto, .check.preto svg{
441
- color: #666
442
- }
443
- .star{
444
- cursor: pointer;
445
- position: absolute;
446
- right: 30px;
447
- bottom: 2px;
448
- font-size: 0.4rem;
449
- width: 11.2px;
450
- }
451
- .default-stick-size{
452
- width: 180px;
453
- height: auto;
454
- }
455
- .horario-envio {
456
- margin-right: 15px;
457
- font-size: 0.7rem;
458
- position: absolute;
459
- left: 10px;
460
- bottom: 2px;
461
- }
462
-
463
- .autor-mensagem {
464
- position: absolute;
465
- font-size: 0.6rem;
466
- white-space: nowrap;
467
- text-overflow: ellipsis;
468
- overflow: hidden;
469
- max-width: 90%;
470
- font-weight: bold;
471
- top: 2px;
472
- }
473
- /* Principal */
474
- .mensagem__principal {
475
- width: 100%;
476
- display: flex;
477
- justify-content: flex-end;
478
- }
479
- .mensagem__principal > .mensagem::after {
480
- content: "";
481
- width: 0;
482
- height: 0;
483
- position: absolute;
484
- border-left: 10px solid transparent;
485
- border-right: 10px solid transparent;
486
- border-top: 10px solid var(--message-color);
487
- bottom: 5px;
488
- right: -10px;
489
- transform: rotate(-90deg);
490
- }
491
- .mensagem__principal > .mensagem {
492
- background-color: var(--message-color);
493
- color: var(--text-color);
494
- }
495
-
496
- .mensagem__principal > .mensagem .horario-envio {
497
- color: var(--text-color);
498
- }
499
- .mensagem__principal > .mensagem .autor-mensagem {
500
- right: 5px;
501
- color: var(--text-color);
502
- }
503
- /* Outros */
504
- .mensagem__outros {
505
- width: 100%;
506
- display: flex;
507
- }
508
- .mensagem__outros > .mensagem{
509
- background-color: #FFF;
510
- color: #333;
511
- }
512
- .mensagem__outros > .mensagem::after{
513
- content: "";
514
- width: 0;
515
- height: 0;
516
- position: absolute;
517
- border-left: 10px solid transparent;
518
- border-right: 10px solid transparent;
519
- border-top: 10px solid #FFF;
520
- bottom: 5px;
521
- left: -10px;
522
- transform: rotate(90deg);
523
- }
524
- /* .mensagem__outros .check{
525
- display: none
526
- } */
527
- .mensagem__outros > .autor-mensagem{
528
- left: 5px;
529
- color: #333;
530
- }
531
- /* Mapa */
532
- .mensagem-div-mapa {
533
- width: 100%;
534
- display: flex;
535
- justify-content: center;
536
- align-items: center;
537
- flex-direction: column;
538
- margin-bottom: 5px;
539
- }
540
-
541
- .msg-mapa {
542
- width: 100%;
543
- min-height: 225px;
544
- height: 100%;
545
- box-sizing: initial;
546
- }
547
- .msg-mapa img {
548
- max-width: none!important;
549
- }
550
-
551
- .info-mapa {
552
- list-style-type: none;
553
- }
554
- .info-mapa li.title {
555
- font-size: .85em
556
- }
557
- .info-mapa li.address, .info-mapa li.url {
558
- font-size: .85em
559
- }
560
- .info-mapa li.url {
561
- font-size: .85em
562
- }
563
-
564
- .tooltip-list {
565
- margin: 0;
566
- padding: 0;
567
- display: flex;
568
- flex-direction: column;
569
- justify-content: center;
570
- align-items: flex-start;
571
- }
572
-
573
- </style>
1
+ <template>
2
+ <div :class="'mensagem__'+origem" v-if="origem && !erro" :id="`a${messageIndex ? messageIndex : randomizeValue}`">
3
+ <InteratividadeFormulario
4
+ v-if="interatividade && validateInterativity()"
5
+ :interatividade="interatividade"
6
+ :dominio="dominio"
7
+ :infoCanal="infoCanalTeste"
8
+ :anexos="anexos"
9
+ :dictionary="dictionary"
10
+ />
11
+ <div v-else class="mensagem" :class="{mapa, 'hist-msg' : histMsg, 'max-w-60' : link && !mapa}">
12
+ <div v-if="isReply && replyMessage" class="mensagem-reply" :class="`message-reply-${origem}`">
13
+ <p v-if="replyMessage" v-html="replyMessage"></p>
14
+ <span v-else class="mensagem-reply-vazia">
15
+ <fa-icon :icon="['fas', 'times']" v-if="showReplyIcon" />
16
+ {{ defaultReplyMessage ? defaultReplyMessage : dictionary.mensagem_reply_padrao }}
17
+ </span>
18
+ </div>
19
+ <template v-if="anexos && anexos.length">
20
+ <div class="mensagem-anexo" v-for="(anexo, index) in anexos" :key="index">
21
+ <AnexoMensagem :showControlFiles="showControlFiles" :referenceSelector="referenceSelector" :dictionary="dictionary" :anexo="anexo" :origemExterna="origemExterna" :dominio="dominio" @abrir-imagem="abrirImagem" @download-all="$emit('download-all')"/>
22
+ </div>
23
+ </template>
24
+ <img class="default-stick-size" v-if="urlSticker" :src="urlSticker" :title="urlFileName">
25
+ <div v-if="mapa" class="mensagem-div-mapa">
26
+ <GmapMap
27
+ :id="`mapa_${seq}`"
28
+ class="msg-mapa"
29
+ :center="center"
30
+ :zoom="17"
31
+ :options="mapOptions"
32
+ >
33
+ <GmapMarker :position="marker" />
34
+ </GmapMap>
35
+ <ul class="info-mapa" v-if="infos.length">
36
+ <li v-for="(info, index) in infos" :key="index" :class="info.classe">
37
+ <template v-if="!info.link"> {{ info.value }} </template>
38
+ <a v-else :href="info.value" @click.prevent="abrirPopup(info.value)"> {{ info.textLink }} <fa-icon :icon="['fas', 'map-marker-alt']" /> </a>
39
+ </li>
40
+ </ul>
41
+ </div>
42
+ <LinkPreview v-if="link && !mapa && status != 'O'" :message="message" />
43
+ <p v-html="validateInterativity() ? '' : formatMsg(message)"></p>
44
+ <InteratividadeBotoes
45
+ v-if="interatividade"
46
+ :interatividade="interatividade"
47
+ />
48
+ <span class="horario-envio" v-text="horario"></span>
49
+ <transition name="fade" mode="out-in">
50
+ <span :class="reply" v-if="hasReply && (status == 'C' || status == 'T' || status == 'ERRO')" v-tippy :content="msgReply ? msgReply : 'Fazer reenvio da mensagem'" @click="$emit('replyMsg')"> <fa-icon :icon="['fas', 'reply']" /> </span>
51
+ </transition>
52
+ <transition name="fade" mode="out-in" v-if="validadeSeq">
53
+ <span class="star dourado" v-if="iniDialogo > 0" :content="contentTooltipStar" v-tippy key="star-padrao-dourado">
54
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
55
+ <path fill="#FFD700" d="M224 122.8c-72.7 0-131.8 59.1-131.9 131.8 0 24.9 7 49.2 20.2 70.1l3.1 5-13.3 48.6 49.9-13.1 4.8 2.9c20.2 12 43.4 18.4 67.1 18.4h.1c72.6 0 133.3-59.1 133.3-131.8 0-35.2-15.2-68.3-40.1-93.2-25-25-58-38.7-93.2-38.7zm77.5 188.4c-3.3 9.3-19.1 17.7-26.7 18.8-12.6 1.9-22.4.9-47.5-9.9-39.7-17.2-65.7-57.2-67.7-59.8-2-2.6-16.2-21.5-16.2-41s10.2-29.1 13.9-33.1c3.6-4 7.9-5 10.6-5 2.6 0 5.3 0 7.6.1 2.4.1 5.7-.9 8.9 6.8 3.3 7.9 11.2 27.4 12.2 29.4s1.7 4.3.3 6.9c-7.6 15.2-15.7 14.6-11.6 21.6 15.3 26.3 30.6 35.4 53.9 47.1 4 2 6.3 1.7 8.6-1 2.3-2.6 9.9-11.6 12.5-15.5 2.6-4 5.3-3.3 8.9-2 3.6 1.3 23.1 10.9 27.1 12.9s6.6 3 7.6 4.6c.9 1.9.9 9.9-2.4 19.1zM400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM223.9 413.2c-26.6 0-52.7-6.7-75.8-19.3L64 416l22.5-82.2c-13.9-24-21.2-51.3-21.2-79.3C65.4 167.1 136.5 96 223.9 96c42.4 0 82.2 16.5 112.2 46.5 29.9 30 47.9 69.8 47.9 112.2 0 87.4-72.7 158.5-160.1 158.5z"/>
56
+ </svg>
57
+ </span>
58
+ <span class="star cinza" v-if="iniDialogo == 0" :content="contentTooltipStar" v-tippy key="star-padrao-cinza">
59
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
60
+ <path fill="#808080" d="M224 122.8c-72.7 0-131.8 59.1-131.9 131.8 0 24.9 7 49.2 20.2 70.1l3.1 5-13.3 48.6 49.9-13.1 4.8 2.9c20.2 12 43.4 18.4 67.1 18.4h.1c72.6 0 133.3-59.1 133.3-131.8 0-35.2-15.2-68.3-40.1-93.2-25-25-58-38.7-93.2-38.7zm77.5 188.4c-3.3 9.3-19.1 17.7-26.7 18.8-12.6 1.9-22.4.9-47.5-9.9-39.7-17.2-65.7-57.2-67.7-59.8-2-2.6-16.2-21.5-16.2-41s10.2-29.1 13.9-33.1c3.6-4 7.9-5 10.6-5 2.6 0 5.3 0 7.6.1 2.4.1 5.7-.9 8.9 6.8 3.3 7.9 11.2 27.4 12.2 29.4s1.7 4.3.3 6.9c-7.6 15.2-15.7 14.6-11.6 21.6 15.3 26.3 30.6 35.4 53.9 47.1 4 2 6.3 1.7 8.6-1 2.3-2.6 9.9-11.6 12.5-15.5 2.6-4 5.3-3.3 8.9-2 3.6 1.3 23.1 10.9 27.1 12.9s6.6 3 7.6 4.6c.9 1.9.9 9.9-2.4 19.1zM400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM223.9 413.2c-26.6 0-52.7-6.7-75.8-19.3L64 416l22.5-82.2c-13.9-24-21.2-51.3-21.2-79.3C65.4 167.1 136.5 96 223.9 96c42.4 0 82.2 16.5 112.2 46.5 29.9 30 47.9 69.8 47.9 112.2 0 87.4-72.7 158.5-160.1 158.5z"/>
61
+ </svg>
62
+ </span>
63
+ </transition>
64
+ <transition name="fade" mode="out-in">
65
+ <span class="check" v-if="status == 'D'" :content="contentTooltip" v-tippy key="check-padrao"> <fa-icon :icon="['fas', 'check']" /> </span>
66
+ <span class="check cinza" v-else-if="status == 'Q'" :content="contentTooltip" v-tippy key="check-cinza"> <fa-icon :icon="['fas', 'check']" /> </span>
67
+ <span class="check preto" v-else-if="status == 'G'" :content="contentTooltip" v-tippy key="check-preto"> <fa-icon :icon="['fas', 'check']" /> </span>
68
+ <span class="check preto" v-else-if="status == 'E'" :content="contentTooltip" v-tippy key="double-check-preto"> <fa-icon :icon="['fas', 'check-double']" /> </span>
69
+ <span class="check visualizado" v-else-if="status == 'L'" :content="contentTooltip" v-tippy key="double-check-visualizado"> <fa-icon :icon="['fas', 'check-double']" /> </span> <!-- Status finalizador -->
70
+ <span class="check vermelho" v-else-if="status == 'C' || status == 'ERRO'" :content="contentTooltip" v-tippy key="times-circle"> <fa-icon :icon="['fas', 'times-circle']" /> </span> <!-- Status finalizador -->
71
+ <span class="check vermelho" v-else-if="status == 'T'" :content="contentTooltip" v-tippy key="hourglass"> <fa-icon :icon="['fas', 'hourglass']" /> </span> <!-- Status finalizador -->
72
+ <span class="check vermelho" v-else-if="status == 'O'" :content="contentTooltip" v-tippy key="deleted"> <fa-icon :icon="['fas', 'times']" /> </span> <!-- Status de mensagem deletada -->
73
+ </transition>
74
+
75
+ <span class="autor-mensagem" v-html="autor"></span>
76
+ </div>
77
+ </div>
78
+ </template>
79
+
80
+ <script>
81
+ import AnexoMensagem from "./AnexoMensagem"
82
+ import InteratividadeBotoes from "./InteratividadeBotoes"
83
+ import InteratividadeFormulario from "./InteratividadeFormulario"
84
+ import { formataTimezoneData } from "../../services/textFormatting"
85
+ import LinkPreview from './LinkPreview'
86
+
87
+ export default {
88
+ components: { AnexoMensagem, InteratividadeBotoes, InteratividadeFormulario, LinkPreview },
89
+ 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", "replyMessage", "isReply", "defaultReplyMessage", "showReplyIcon", "showControlFiles"],
90
+ created() {
91
+ if(!this.$root.$refs.chatMessages) this.$root.$refs.chatMessages = this
92
+ },
93
+ data(){
94
+ return{
95
+ strTooltipAux: "",
96
+ linkAux: "",
97
+ urlSticker: "",
98
+ urlFileName: "",
99
+ message: "",
100
+ reply: "reply",
101
+ center: {},
102
+ marker: {},
103
+ infos: [],
104
+ infoCanalTeste: {PRAZO: "2022-05-05", SITUACAO: {cod: "3", desc: "Em analise pelo fornecedor", cor: "#03A64A"}, DATA_ABERTURA: "2022-05-03 09:43:43"},
105
+ mapOptions: {
106
+ zoomControl: true,
107
+ mapTypeControl: false,
108
+ scaleControl: false,
109
+ streetViewControl: false,
110
+ rotateControl: false,
111
+ fullscreenControl: false,
112
+ disableDefaultUI: false
113
+ }
114
+ }
115
+ },
116
+ computed: {
117
+ hrefAnexo(){
118
+ if(this.docAnexo){
119
+ if(this.tipoDoc == "erro"){
120
+ return this.hrefAnexo = "#"
121
+ }else{
122
+ return this.docAnexo
123
+ }
124
+ }
125
+ },
126
+ randomizeValue() {
127
+ return `${(Math.floor(Math.random() * 7770))}${Date.now()}`
128
+ },
129
+ contentTooltip: {
130
+ get(){
131
+ if(this.status && !this.msgTooltip){
132
+ const msgStatus = "msg_status_"+this.status
133
+ return this.strTooltipAux = this.dictionary[msgStatus]
134
+ }else if(this.status && this.msgTooltip){
135
+ return this.strTooltipAux = this.msgTooltip
136
+ }
137
+ },
138
+ set(msg){
139
+ return this.contentTooltip = msg
140
+ }
141
+ },
142
+ contentTooltipStar() {
143
+ let tooltipStar = "";
144
+ if(this.iniDialogo == 1){
145
+ tooltipStar += this.dictionary['ini_sessao']+"<br/>"
146
+ }
147
+ else {
148
+ tooltipStar += this.dictionary['ini_sessao_padrao']+"<br/>"
149
+ }
150
+ tooltipStar += this.dialogoId ? this.dictionary['id_conversa']+" - "+ this.dialogoId +"<br/>" : ""
151
+ tooltipStar += this.dialogoOrigem ? this.dictionary['origem_conversa']+" - "+ this.dialogoOrigem +"<br/>" : ""
152
+ tooltipStar += this.expSessao ? this.dictionary['expiracao_sessao']+" - "+ formataTimezoneData(this.expSessao) +"<br/>" : ""
153
+ return tooltipStar
154
+ },
155
+ validadeSeq(){
156
+ if(this.seq && this.seq.substring(0, 2) == "HW") return true
157
+ this.reply = "reply reply-with-2-icons"
158
+ return false;
159
+ }
160
+ },
161
+ mounted() {
162
+ if(this.mapa) this.setMap()
163
+ if(this.corMsg) this.setCorMsg()
164
+ this.validadeUrlToMsg()
165
+ },
166
+ methods: {
167
+ validateInterativity(){
168
+ try {
169
+ if(this.interatividade && (this.interatividade.formulario && this.interatividade.formulario.length) || (this.interatividade.list && this.interatividade.tipo == 'listItem')){
170
+ return true;
171
+ }
172
+ return false;
173
+ } catch (error) {
174
+ return false;
175
+ }
176
+ },
177
+ validadeUrlToMsg(){
178
+ try {
179
+ this.message = this.msg
180
+ if(this.validadeIfExistsSticker()){
181
+ this.urlSticker = this.getUrlSticker()
182
+ this.urlFileName = this.getUrlFileName()
183
+ this.message = this.removeUrlStickerByString(this.urlSticker)
184
+ }
185
+ } catch (error) {
186
+ console.error("Error validating url to msg: ", error)
187
+ }
188
+ },
189
+ getUrlFileName(){
190
+ let urlRegex = /(?<=\/)[^\/\?#]+(?=[^\/]*$)/;
191
+ let urlName = this.urlSticker.match(urlRegex)[0];
192
+ return urlName;
193
+ },
194
+ removeUrlStickerByString(url){
195
+ let msg = this.message.replace(`KSTICKERK ${url}`, '')
196
+ return msg;
197
+ },
198
+ getUrlSticker(){
199
+ let urlRegex = /(https?:\/\/[^ ]*)/;
200
+ let url = this.message.match(urlRegex)[1];
201
+ return url;
202
+ },
203
+ validadeIfExistsSticker(){
204
+ if(this.message && this.message.indexOf("KSTICKERK https://") === 0) return true
205
+ return false
206
+ },
207
+ setCorMsg() {
208
+ try {
209
+ const root = document.documentElement
210
+ root.style.setProperty('--message-color', this.corMsg)
211
+ this.adjustFontColor(this.corMsg)
212
+ }catch(e) {
213
+ console.error("Erro ao atribuir a cor as mensagens")
214
+ console.error(e)
215
+ }
216
+ },
217
+ setMap() {
218
+ let objMapa = typeof this.mapa === "string" ? JSON.parse(`${this.mapa}`) : this.mapa
219
+ if(objMapa.latitude && objMapa.longitude) {
220
+ objMapa.latitude = parseFloat(objMapa.latitude)
221
+ objMapa.longitude = parseFloat(objMapa.longitude)
222
+
223
+ this.center.lat = objMapa.latitude
224
+ this.center.lng = objMapa.longitude
225
+
226
+ this.marker.lat = objMapa.latitude
227
+ this.marker.lng = objMapa.longitude
228
+
229
+ this.infos.push(
230
+ { classe: "title", value: objMapa.name },
231
+ { classe: "address", value: objMapa.address },
232
+ { classe: "url", value: `https://www.google.com/maps/search/?api=1&query=${this.marker.lat},${this.marker.lng}`, link: true, textLink: this.dictionary.abrir_mapa }
233
+ )
234
+ }
235
+ },
236
+ abrirPopup(url) {
237
+ window.open(url, "map-popup", "width=auto,height=auto")
238
+ },
239
+ abrirImagem(imagem) {
240
+ this.$emit("abrir-imagem", imagem)
241
+ },
242
+ adjustFontColor(cor) {
243
+ try {
244
+ var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(cor);
245
+
246
+ if(!result) return
247
+
248
+ var r = parseInt(result[1], 16);
249
+ var g = parseInt(result[2], 16);
250
+ var b = parseInt(result[3], 16);
251
+
252
+ r /= 255, g /= 255, b /= 255;
253
+ var max = Math.max(r, g, b), min = Math.min(r, g, b);
254
+ var h, s, l = (max + min) / 2;
255
+
256
+ if(max == min){
257
+ h = s = 0; // achromatic
258
+ } else {
259
+ var d = max - min;
260
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
261
+ switch(max) {
262
+ case r: h = (g - b) / d + (g < b ? 6 : 0); break;
263
+ case g: h = (b - r) / d + 2; break;
264
+ case b: h = (r - g) / d + 4; break;
265
+ }
266
+ h /= 6;
267
+ }
268
+
269
+ s = s*100;
270
+ s = Math.round(s);
271
+ l = l*100;
272
+ l = Math.round(l);
273
+ h = Math.round(360*h);
274
+
275
+ const root = document.documentElement
276
+ root.style.setProperty('--text-color', l <= 50 ? "#FFF" : "#111B21")
277
+ root.style.setProperty('--files-bg', l <= 50 ? "rgba(255, 255, 255, 0.1)" : "rgba(100, 100, 100, 0.1)")
278
+ root.style.setProperty('--files-bg-hover', l <= 50 ? "rgba(255, 255, 255, 0.3)" : "rgba(100, 100, 100, 0.3)")
279
+ }catch(e) {
280
+ console.error("Erro ao ajustar a cor da mensagem: ", e)
281
+ }
282
+ },
283
+ formatMsg(msg) {
284
+ if(this.status == 'O') return this.dictionary.msg_excluida ? this.dictionary.msg_excluida : 'MENSAGEM DELETADA'
285
+ const regex = /(\n|&nbsp;)/g
286
+ if(regex.test(msg)) msg = msg.replace(regex, "<br>")
287
+ return msg
288
+ },
289
+ }
290
+ }
291
+ </script>
292
+
293
+ <style>
294
+ :root {
295
+ --message-color: #373737;
296
+ --text-color: #FFF;
297
+ --files-bg: rgba(255, 255, 255, 0.1);
298
+ --files-bg-hover: rgba(255, 255, 255, 0.1);
299
+
300
+ --light: 80;
301
+ --threshold: 60;
302
+ }
303
+
304
+ .fade-enter-active, .fade-leave-active {
305
+ transition: opacity .5s;
306
+ }
307
+ .fade-enter, .fade-leave-to {
308
+ opacity: 0;
309
+ }
310
+
311
+ .mensagem-reply {
312
+ padding: 5px 10px;
313
+ font-size: .75rem;
314
+ color: #666;
315
+ transition: background-color 150ms ease-in-out;
316
+ border-radius: 5px;
317
+ margin: 5px 0;
318
+ overflow: hidden;
319
+ max-width: 100%;
320
+ }
321
+ .mensagem-reply p {
322
+ overflow: hidden;
323
+ text-overflow: ellipsis;
324
+ white-space: nowrap;
325
+ }
326
+
327
+ .message-reply-principal {
328
+ border-left: 3px solid transparent;
329
+ background-color: rgba(100, 100, 100, 0.1)
330
+ }
331
+ .message-reply-principal:hover {
332
+ background-color: rgba(100, 100, 100, 0.2);
333
+ }
334
+
335
+ .message-reply-outros {
336
+ background-color: rgb(245, 245, 245);
337
+ border-left: 3px solid var(--message-color);
338
+ }
339
+ .message-reply-outros:hover {
340
+ background-color: rgb(235, 235, 235)
341
+ }
342
+
343
+ .mensagem-reply-vazia {
344
+ display: flex;
345
+ align-items: center;
346
+ }
347
+ .mensagem-reply-vazia svg {
348
+ margin-right: 5px;
349
+ color: #ba181b;
350
+ }
351
+
352
+ .mensagem {
353
+ padding: 14px 7px;
354
+ border-radius: 5px;
355
+ min-width: 150px;
356
+ min-height: 60px;
357
+ width: -webkit-fit-content;
358
+ width: -moz-fit-content;
359
+ width: fit-content;
360
+ position: relative;
361
+ max-width: 80%;
362
+ margin-bottom: 10px;
363
+ font-size: .75rem;
364
+ word-break: break-word;
365
+
366
+ -webkit-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
367
+ -moz-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
368
+ box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
369
+ }
370
+ .mensagem.max-w-60 {
371
+ max-width: 60%;
372
+ }
373
+ .mensagem.mapa {
374
+ width: 100%
375
+ }
376
+ .mensagem.hist-msg {
377
+ animation: show 1s;
378
+ }
379
+ .mensagem a {
380
+ margin-right: 5px;
381
+ font-weight: 550;
382
+ color: inherit;
383
+ text-decoration: none;
384
+ }
385
+ .mensagem a:hover {
386
+ text-decoration: underline;
387
+ }
388
+ .message p {
389
+ white-space: pre-wrap;
390
+ }
391
+
392
+ .mensagem-anexo a, .mensagem-div-mapa a {
393
+ white-space: nowrap;
394
+ text-overflow: ellipsis;
395
+ overflow: hidden;
396
+ }
397
+
398
+ .reply {
399
+ cursor: pointer;
400
+ position: absolute;
401
+ right: 53px;
402
+ bottom: 5px;
403
+ font-size: .6rem;
404
+ color: #67a332;
405
+ width: .9rem;
406
+ height: .9rem;
407
+ display: flex;
408
+ justify-content: center;
409
+ align-items: center;
410
+ border-radius: 50%;
411
+ background-color: #FFF;
412
+ }
413
+ .reply svg {
414
+ margin-top: -1px;
415
+ margin-right: -1px;
416
+ }
417
+ .reply-with-2-icons{
418
+ right: 30px;
419
+ }
420
+
421
+ .check{
422
+ cursor: pointer;
423
+ position: absolute;
424
+ right: 10px;
425
+ bottom: 2px;
426
+ font-size: 0.7rem;
427
+ }
428
+ .check.visualizado, .check.visualizado svg{
429
+ color: #006DAA
430
+ }
431
+ .check.verde, .check.verde svg{
432
+ color: #4f772d
433
+ }
434
+ .check.vermelho, .check.vermelho svg{
435
+ color: #ba181b
436
+ }
437
+ .check.cinza, .check.cinza svg{
438
+ color: #999
439
+ }
440
+ .check.preto, .check.preto svg{
441
+ color: #666
442
+ }
443
+ .star{
444
+ cursor: pointer;
445
+ position: absolute;
446
+ right: 30px;
447
+ bottom: 2px;
448
+ font-size: 0.4rem;
449
+ width: 11.2px;
450
+ }
451
+ .default-stick-size{
452
+ width: 180px;
453
+ height: auto;
454
+ }
455
+ .horario-envio {
456
+ margin-right: 15px;
457
+ font-size: 0.7rem;
458
+ position: absolute;
459
+ left: 10px;
460
+ bottom: 2px;
461
+ }
462
+
463
+ .autor-mensagem {
464
+ position: absolute;
465
+ font-size: 0.6rem;
466
+ white-space: nowrap;
467
+ text-overflow: ellipsis;
468
+ overflow: hidden;
469
+ max-width: 90%;
470
+ font-weight: bold;
471
+ top: 2px;
472
+ }
473
+ /* Principal */
474
+ .mensagem__principal {
475
+ width: 100%;
476
+ display: flex;
477
+ justify-content: flex-end;
478
+ }
479
+ .mensagem__principal > .mensagem::after {
480
+ content: "";
481
+ width: 0;
482
+ height: 0;
483
+ position: absolute;
484
+ border-left: 10px solid transparent;
485
+ border-right: 10px solid transparent;
486
+ border-top: 10px solid var(--message-color);
487
+ bottom: 5px;
488
+ right: -10px;
489
+ transform: rotate(-90deg);
490
+ }
491
+ .mensagem__principal > .mensagem {
492
+ background-color: var(--message-color);
493
+ color: var(--text-color);
494
+ }
495
+
496
+ .mensagem__principal > .mensagem .horario-envio {
497
+ color: var(--text-color);
498
+ }
499
+ .mensagem__principal > .mensagem .autor-mensagem {
500
+ right: 5px;
501
+ color: var(--text-color);
502
+ }
503
+ /* Outros */
504
+ .mensagem__outros {
505
+ width: 100%;
506
+ display: flex;
507
+ }
508
+ .mensagem__outros > .mensagem{
509
+ background-color: #FFF;
510
+ color: #333;
511
+ }
512
+ .mensagem__outros > .mensagem::after{
513
+ content: "";
514
+ width: 0;
515
+ height: 0;
516
+ position: absolute;
517
+ border-left: 10px solid transparent;
518
+ border-right: 10px solid transparent;
519
+ border-top: 10px solid #FFF;
520
+ bottom: 5px;
521
+ left: -10px;
522
+ transform: rotate(90deg);
523
+ }
524
+ /* .mensagem__outros .check{
525
+ display: none
526
+ } */
527
+ .mensagem__outros > .autor-mensagem{
528
+ left: 5px;
529
+ color: #333;
530
+ }
531
+ /* Mapa */
532
+ .mensagem-div-mapa {
533
+ width: 100%;
534
+ display: flex;
535
+ justify-content: center;
536
+ align-items: center;
537
+ flex-direction: column;
538
+ margin-bottom: 5px;
539
+ }
540
+
541
+ .msg-mapa {
542
+ width: 100%;
543
+ min-height: 225px;
544
+ height: 100%;
545
+ box-sizing: initial;
546
+ }
547
+ .msg-mapa img {
548
+ max-width: none!important;
549
+ }
550
+
551
+ .info-mapa {
552
+ list-style-type: none;
553
+ }
554
+ .info-mapa li.title {
555
+ font-size: .85em
556
+ }
557
+ .info-mapa li.address, .info-mapa li.url {
558
+ font-size: .85em
559
+ }
560
+ .info-mapa li.url {
561
+ font-size: .85em
562
+ }
563
+
564
+ .tooltip-list {
565
+ margin: 0;
566
+ padding: 0;
567
+ display: flex;
568
+ flex-direction: column;
569
+ justify-content: center;
570
+ align-items: flex-start;
571
+ }
572
+
573
+ </style>