vue-intergrall-plugins 0.0.504 → 0.0.510

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 (41) hide show
  1. package/README.md +185 -185
  2. package/dist/vue-intergrall-plugins.esm.js +596 -513
  3. package/dist/vue-intergrall-plugins.min.js +1 -1
  4. package/dist/vue-intergrall-plugins.ssr.js +607 -541
  5. package/package.json +67 -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 +429 -429
  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 +36 -36
  12. package/src/lib-components/Chat/BtnEmojis.vue +131 -131
  13. package/src/lib-components/Chat/BtnExpand.vue +17 -17
  14. package/src/lib-components/Chat/BtnFiles.vue +541 -541
  15. package/src/lib-components/Chat/BtnMic.vue +60 -60
  16. package/src/lib-components/Chat/BtnScreenShare.vue +36 -36
  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 +405 -405
  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 +1030 -1030
  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 +442 -442
  30. package/src/lib-components/Messages/CardAttachment.vue +61 -61
  31. package/src/lib-components/Messages/CardMessages.vue +666 -666
  32. package/src/lib-components/Messages/ChatMessages.vue +1082 -1077
  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/Midea/Player.vue +25 -0
  38. package/src/lib-components/Scroll/ScrollContent.vue +166 -166
  39. package/src/lib-components/Templates/TemplateGenerator.vue +576 -576
  40. package/src/lib-components/Templates/TemplateMessage.vue +83 -83
  41. package/src/lib-components/Templates/TemplateSingle.vue +481 -481
@@ -1,1077 +1,1082 @@
1
- <template>
2
- <div
3
- :class="'mensagem__' + origem"
4
- v-if="origem && !erro"
5
- :id="`a${messageIndex ? messageIndex : randomizeValue}`"
6
- >
7
- <InteratividadeFormulario
8
- v-if="interatividade && validateInterativity()"
9
- :interatividade="interatividade"
10
- :dominio="dominio"
11
- :infoCanal="infoCanalTeste"
12
- :anexos="anexos"
13
- :dictionary="dictionary"
14
- />
15
- <div
16
- v-else
17
- class="mensagem"
18
- :class="{ mapa, 'hist-msg': histMsg, 'max-w-60': link && !mapa }"
19
- >
20
- <!-- Estilo da mensagem do tipo reply (que foi respondida) -->
21
- <div
22
- v-if="isReply && replyMessage"
23
- class="mensagem-reply"
24
- :class="`message-reply-${origem}`"
25
- >
26
- <p v-if="replyMessage" v-html="replyMessage"></p>
27
- <span v-else class="mensagem-reply-vazia">
28
- <fa-icon :icon="['fas', 'times']" v-if="showReplyIcon" />
29
- {{
30
- defaultReplyMessage ? defaultReplyMessage : dictionary.mensagem_reply_padrao
31
- }}
32
- </span>
33
- </div>
34
- <!-- Anexos -->
35
- <template v-if="anexos && anexos.length">
36
- <div class="mensagem-anexo" v-for="(anexo, index) in anexos" :key="index">
37
- <AnexoMensagem
38
- :showControlFiles="showControlFiles"
39
- :referenceSelector="referenceSelector"
40
- :dictionary="dictionary"
41
- :anexo="anexo"
42
- :origemExterna="origemExterna"
43
- :dominio="dominio"
44
- @abrir-imagem="abrirImagem"
45
- @download-all="$emit('download-all')"
46
- />
47
- </div>
48
- </template>
49
- <!-- sticker -->
50
- <img
51
- class="default-stick-size"
52
- v-if="urlSticker"
53
- :src="urlSticker"
54
- :title="urlFileName"
55
- />
56
- <!-- Mapa -->
57
- <div v-if="mapa" class="mensagem-div-mapa">
58
- <GmapMap
59
- :id="`mapa_${seq}`"
60
- class="msg-mapa"
61
- :center="center"
62
- :zoom="17"
63
- :options="mapOptions"
64
- >
65
- <GmapMarker :position="marker" />
66
- </GmapMap>
67
- <ul class="info-mapa" v-if="infos.length">
68
- <li v-for="(info, index) in infos" :key="index" :class="info.classe">
69
- <template v-if="!info.link"> {{ info.value }} </template>
70
- <a v-else :href="info.value" @click.prevent="abrirPopup(info.value)">
71
- {{ info.textLink }} <fa-icon :icon="['fas', 'map-marker-alt']" />
72
- </a>
73
- </li>
74
- </ul>
75
- </div>
76
- <!-- Preview do link -->
77
- <LinkPreview v-if="link && !mapa && status != 'O'" :message="message" />
78
- <!-- Mensagem -->
79
- <p v-html="validateInterativity() ? '' : formatMsg(message)"></p>
80
- <!-- Botoes da interatividade -->
81
- <InteratividadeBotoes v-if="interatividade" :interatividade="interatividade" />
82
- <!-- Horario da mensagem -->
83
- <span class="horario-envio" v-text="horario"></span>
84
- <!-- Reenviar mensagem -->
85
- <transition name="fade" mode="out-in">
86
- <span
87
- :class="reply"
88
- v-if="hasReply && (status == 'C' || status == 'T' || status == 'ERRO')"
89
- v-tippy
90
- :content="msgReply ? msgReply : 'Fazer reenvio da mensagem'"
91
- @click="$emit('replyMsg')"
92
- >
93
- <fa-icon :icon="['fas', 'reply']" />
94
- </span>
95
- </transition>
96
- <!-- ?? -->
97
- <transition name="fade" mode="out-in" v-if="validadeSeq">
98
- <span
99
- class="star dourado"
100
- v-if="iniDialogo > 0"
101
- :content="contentTooltipStar"
102
- v-tippy
103
- key="star-padrao-dourado"
104
- >
105
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
106
- <path
107
- fill="#FFD700"
108
- 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"
109
- />
110
- </svg>
111
- </span>
112
- <span
113
- class="star cinza"
114
- v-if="iniDialogo == 0"
115
- :content="contentTooltipStar"
116
- v-tippy
117
- key="star-padrao-cinza"
118
- >
119
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
120
- <path
121
- fill="#808080"
122
- 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"
123
- />
124
- </svg>
125
- </span>
126
- </transition>
127
- <!-- Status da mensagem -->
128
- <transition name="fade" mode="out-in">
129
- <span
130
- class="check"
131
- v-if="status == 'D'"
132
- :content="contentTooltip"
133
- v-tippy
134
- key="check-padrao"
135
- >
136
- <fa-icon :icon="['fas', 'check']" />
137
- </span>
138
- <span
139
- class="check cinza"
140
- v-else-if="status == 'Q'"
141
- :content="contentTooltip"
142
- v-tippy
143
- key="check-cinza"
144
- >
145
- <fa-icon :icon="['fas', 'check']" />
146
- </span>
147
- <span
148
- class="check preto"
149
- v-else-if="status == 'G'"
150
- :content="contentTooltip"
151
- v-tippy
152
- key="check-preto"
153
- >
154
- <fa-icon :icon="['fas', 'check']" />
155
- </span>
156
- <span
157
- class="check preto"
158
- v-else-if="status == 'E'"
159
- :content="contentTooltip"
160
- v-tippy
161
- key="double-check-preto"
162
- >
163
- <fa-icon :icon="['fas', 'check-double']" />
164
- </span>
165
- <span
166
- class="check visualizado"
167
- v-else-if="status == 'L'"
168
- :content="contentTooltip"
169
- v-tippy
170
- key="double-check-visualizado"
171
- >
172
- <fa-icon :icon="['fas', 'check-double']" />
173
- </span>
174
- <!-- Status finalizador -->
175
- <span
176
- class="check vermelho"
177
- v-else-if="status == 'C' || status == 'ERRO'"
178
- :content="contentTooltip"
179
- v-tippy
180
- key="times-circle"
181
- >
182
- <fa-icon :icon="['fas', 'times-circle']" />
183
- </span>
184
- <!-- Status finalizador -->
185
- <span
186
- class="check vermelho"
187
- v-else-if="status == 'T'"
188
- :content="contentTooltip"
189
- v-tippy
190
- key="hourglass"
191
- >
192
- <fa-icon :icon="['fas', 'hourglass']" />
193
- </span>
194
- <!-- Status finalizador -->
195
- <span
196
- class="check vermelho"
197
- v-else-if="status == 'O'"
198
- :content="contentTooltip"
199
- v-tippy
200
- key="deleted"
201
- >
202
- <fa-icon :icon="['fas', 'times']" />
203
- </span>
204
- <!-- Status de mensagem deletada -->
205
- </transition>
206
- <!-- Autor da mensagem -->
207
- <span class="autor-mensagem" v-html="autor" :title="autor"></span>
208
- <!-- Menu de opcoes da mensagem -->
209
- <div class="menu-primario" :class="origem" v-if="hasAnyMenu">
210
- <!-- <span class="menu-mensagem" @click="toggleIsMenuOpen" v-tippy :content="dictionary.tit_mais_msg">
211
- <fa-icon :icon="['fas', 'chevron-down']" />
212
- </span> -->
213
- <span
214
- class="menu-mensagem"
215
- @click="responderMensagemHandler"
216
- v-tippy
217
- :content="dictionary.tit_responder_msg"
218
- v-if="showMenu.reply"
219
- >
220
- <fa-icon :icon="['fas', 'reply']" />
221
- </span>
222
- <span
223
- class="menu-mensagem"
224
- @click="reagirMensagemHandler"
225
- v-tippy
226
- :content="dictionary.tit_reagir_msg"
227
- v-if="showMenu.reaction"
228
- >
229
- <fa-icon :icon="['fas', 'smile']" />
230
- </span>
231
- </div>
232
- <div
233
- class="emoji-message-container"
234
- v-if="isEmojisOpen"
235
- v-on-clickaway="closeEmojis"
236
- >
237
- <Picker @insert-emoji="addReaction" />
238
- </div>
239
- <transition name="fade" mode="out-in" v-if="isMenuOpen">
240
- <ul class="menu-flutuante" :class="origem" v-on-clickaway="closeMenu">
241
- <li @click="responderMensagemHandler" v-if="showMenu.reply">
242
- <span> {{ dictionary.tit_responder_msg }} </span>
243
- </li>
244
- <li @click="reagirMensagemHandler" v-if="showMenu.reaction">
245
- <span> {{ dictionary.tit_reagir_msg }} </span>
246
- </li>
247
- </ul>
248
- </transition>
249
- <transition name="fade" mode="out-in" v-if="messageReaction">
250
- <span
251
- class="reaction"
252
- v-tippy
253
- :content="`${dictionary.tit_mensagem_reagida} ${messageReaction.finalEmoji}`"
254
- >
255
- <span v-html="messageReaction.finalEmoji"></span>
256
- </span>
257
- </transition>
258
- </div>
259
- </div>
260
- </template>
261
-
262
- <script>
263
- import AnexoMensagem from "./AnexoMensagem";
264
- import InteratividadeBotoes from "./InteratividadeBotoes";
265
- import InteratividadeFormulario from "./InteratividadeFormulario";
266
- import Picker from "../Chat/Picker";
267
- import { formataTimezoneData } from "../../services/textFormatting";
268
- import LinkPreview from "./LinkPreview";
269
- import { mixin as clickaway } from "vue-clickaway";
270
-
271
- export default {
272
- components: {
273
- AnexoMensagem,
274
- InteratividadeBotoes,
275
- InteratividadeFormulario,
276
- LinkPreview,
277
- Picker,
278
- },
279
- props: [
280
- "smartchannel",
281
- "messageIndex",
282
- "dictionary",
283
- "autor",
284
- "origem",
285
- "msg",
286
- "link",
287
- "anexo",
288
- "imgAnexo",
289
- "tipoDoc",
290
- "docAnexo",
291
- "nomeArquivo",
292
- "audio",
293
- "video",
294
- "horario",
295
- "status",
296
- "logo",
297
- "msgTooltip",
298
- "seq",
299
- "mapa",
300
- "histMsg",
301
- "erro",
302
- "msgErro",
303
- "origemExterna",
304
- "anexos",
305
- "dominio",
306
- "corMsg",
307
- "interatividade",
308
- "msgReply",
309
- "hasReply",
310
- "iniDialogo",
311
- "dialogoId",
312
- "dialogoOrigem",
313
- "expSessao",
314
- "referenceSelector",
315
- "replyMessage",
316
- "isReply",
317
- "defaultReplyMessage",
318
- "showReplyIcon",
319
- "showControlFiles",
320
- "showMenu",
321
- "id_ext_msg",
322
- "tipo_origem",
323
- ],
324
- created() {
325
- if (!this.$root.$refs.chatMessages) this.$root.$refs.chatMessages = this;
326
- },
327
- mixins: [clickaway],
328
- data() {
329
- return {
330
- strTooltipAux: "",
331
- linkAux: "",
332
- urlSticker: "",
333
- urlFileName: "",
334
- message: "",
335
- reply: "reply",
336
- center: {},
337
- marker: {},
338
- infos: [],
339
- infoCanalTeste: {
340
- PRAZO: "2022-05-05",
341
- SITUACAO: { cod: "3", desc: "Em analise pelo fornecedor", cor: "#03A64A" },
342
- DATA_ABERTURA: "2022-05-03 09:43:43",
343
- },
344
- mapOptions: {
345
- zoomControl: true,
346
- mapTypeControl: false,
347
- scaleControl: false,
348
- streetViewControl: false,
349
- rotateControl: false,
350
- fullscreenControl: false,
351
- disableDefaultUI: false,
352
- },
353
- isMenuOpen: false,
354
- showMenuOptions: false,
355
- isEmojisOpen: false,
356
- messageReaction: "",
357
- };
358
- },
359
- computed: {
360
- hrefAnexo() {
361
- if (this.docAnexo) {
362
- if (this.tipoDoc == "erro") {
363
- return (this.hrefAnexo = "#");
364
- } else {
365
- return this.docAnexo;
366
- }
367
- }
368
- },
369
- randomizeValue() {
370
- return `${Math.floor(Math.random() * 7770)}${Date.now()}`;
371
- },
372
- contentTooltip: {
373
- get() {
374
- if (this.status && !this.msgTooltip) {
375
- const msgStatus = "msg_status_" + this.status;
376
- return (this.strTooltipAux = this.dictionary[msgStatus]);
377
- } else if (this.status && this.msgTooltip) {
378
- return (this.strTooltipAux = this.msgTooltip);
379
- }
380
- },
381
- set(msg) {
382
- return (this.contentTooltip = msg);
383
- },
384
- },
385
- contentTooltipStar() {
386
- let tooltipStar = "";
387
- if (this.iniDialogo == 1) {
388
- tooltipStar += this.dictionary["ini_sessao"] + "<br/>";
389
- } else {
390
- tooltipStar += this.dictionary["ini_sessao_padrao"] + "<br/>";
391
- }
392
- tooltipStar += this.dialogoId
393
- ? this.dictionary["id_conversa"] + " - " + this.dialogoId + "<br/>"
394
- : "";
395
- tooltipStar += this.dialogoOrigem
396
- ? this.dictionary["origem_conversa"] + " - " + this.dialogoOrigem + "<br/>"
397
- : "";
398
- tooltipStar += this.expSessao
399
- ? this.dictionary["expiracao_sessao"] +
400
- " - " +
401
- formataTimezoneData(this.expSessao) +
402
- "<br/>"
403
- : "";
404
-
405
- if (this.tipo_origem) {
406
- tooltipStar += `${this.dictionary["tipo_origem"]}: ${
407
- this.dictionary[`tipo_origem_${this.tipo_origem}`]
408
- ? this.dictionary[`tipo_origem_${this.tipo_origem}`]
409
- : this.tipo_origem
410
- }<br/>`;
411
- }
412
-
413
- return tooltipStar;
414
- },
415
- validadeSeq() {
416
- if (this.seq && this.seq.substring(0, 2) == "HW") return true;
417
- this.reply = "reply reply-with-2-icons";
418
- return false;
419
- },
420
- hasAnyMenu() {
421
- if (!this.showMenu || typeof this.showMenu !== "object") return false;
422
- for (let key in this.showMenu) {
423
- if (this.showMenu.hasOwnProperty(key) && this.showMenu[key] === true) return true;
424
- }
425
- return false;
426
- },
427
- },
428
- mounted() {
429
- if (this.mapa) this.setMap();
430
- if (this.corMsg) this.setCorMsg();
431
- this.validadeUrlToMsg();
432
- },
433
- methods: {
434
- closeMenu() {
435
- this.isMenuOpen = false;
436
- },
437
- toggleIsMenuOpen() {
438
- this.isMenuOpen = !this.isMenuOpen;
439
- },
440
- responderMensagemHandler() {
441
- if (this.isMenuOpen) this.closeMenu();
442
- this.$emit("responder-mensagem", {
443
- messageIndex: this.messageIndex,
444
- autor: this.autor,
445
- origem: this.origem,
446
- msg: this.msg,
447
- anexo: this.anexo,
448
- imgAnexo: this.imgAnexo,
449
- tipoDoc: this.tipoDoc,
450
- docAnexo: this.docAnexo,
451
- nomeArquivo: this.nomeArquivo,
452
- audio: this.audio,
453
- video: this.video,
454
- seq: this.seq,
455
- mapa: this.mapa,
456
- anexos: this.anexos,
457
- interatividade: this.interatividade,
458
- referenceSelector: this.referenceSelector,
459
- id_ext_msg: this.id_ext_msg,
460
- });
461
- },
462
- reagirMensagemHandler() {
463
- if (this.isMenuOpen) this.closeMenu();
464
- this.isEmojisOpen = !this.isEmojisOpen;
465
- },
466
- addReaction(emoji) {
467
- this.messageReaction =
468
- this.messageReaction && this.messageReaction.hexa === emoji.hexa
469
- ? ""
470
- : { hexa: emoji.hexa, finalEmoji: emoji.finalEmoji };
471
- this.isEmojisOpen = false;
472
- this.$emit("reagir-mensagem", {
473
- emoji,
474
- seq: this.seq,
475
- id_ext_msg: this.id_ext_msg,
476
- hasEmojiReaction: this.messageReaction ? true : false,
477
- });
478
- },
479
- closeEmojis() {
480
- this.isEmojisOpen = false;
481
- },
482
- validateInterativity() {
483
- try {
484
- if (
485
- (this.interatividade &&
486
- this.interatividade.formulario &&
487
- this.interatividade.formulario.length) ||
488
- (this.interatividade.list && this.interatividade.tipo == "listItem")
489
- ) {
490
- return true;
491
- }
492
- return false;
493
- } catch (error) {
494
- return false;
495
- }
496
- },
497
- validadeUrlToMsg() {
498
- try {
499
- this.message = this.msg;
500
- if (this.validadeIfExistsSticker()) {
501
- this.urlSticker = this.getUrlSticker();
502
- this.urlFileName = this.getUrlFileName();
503
- this.message = this.removeUrlStickerByString(this.urlSticker);
504
- }
505
- } catch (error) {
506
- console.error("Error validating url to msg: ", error);
507
- }
508
- },
509
- getUrlFileName() {
510
- let urlRegex = /(?<=\/)[^\/\?#]+(?=[^\/]*$)/;
511
- let urlName = this.urlSticker.match(urlRegex)[0];
512
- return urlName;
513
- },
514
- removeUrlStickerByString(url) {
515
- let msg = this.message.replace(`KSTICKERK ${url}`, "");
516
- return msg;
517
- },
518
- getUrlSticker() {
519
- let urlRegex = /(https?:\/\/[^ ]*)/;
520
- let url = this.message.match(urlRegex)[1];
521
- return url;
522
- },
523
- validadeIfExistsSticker() {
524
- if (this.message && this.message.indexOf("KSTICKERK https://") === 0) return true;
525
- return false;
526
- },
527
- setCorMsg() {
528
- try {
529
- const root = document.documentElement;
530
- root.style.setProperty("--message-color", this.corMsg);
531
- this.adjustFontColor(this.corMsg);
532
- } catch (e) {
533
- console.error("Erro ao atribuir a cor as mensagens");
534
- console.error(e);
535
- }
536
- },
537
- setMap() {
538
- let objMapa =
539
- typeof this.mapa === "string" ? JSON.parse(`${this.mapa}`) : this.mapa;
540
- if (objMapa.latitude && objMapa.longitude) {
541
- objMapa.latitude = parseFloat(objMapa.latitude);
542
- objMapa.longitude = parseFloat(objMapa.longitude);
543
-
544
- this.center.lat = objMapa.latitude;
545
- this.center.lng = objMapa.longitude;
546
-
547
- this.marker.lat = objMapa.latitude;
548
- this.marker.lng = objMapa.longitude;
549
-
550
- this.infos.push(
551
- { classe: "title", value: objMapa.name },
552
- { classe: "address", value: objMapa.address },
553
- {
554
- classe: "url",
555
- value: `https://www.google.com/maps/search/?api=1&query=${this.marker.lat},${this.marker.lng}`,
556
- link: true,
557
- textLink: this.dictionary.abrir_mapa,
558
- }
559
- );
560
- }
561
- },
562
- abrirPopup(url) {
563
- window.open(url, "map-popup", "width=auto,height=auto");
564
- },
565
- abrirImagem(imagem) {
566
- this.$emit("abrir-imagem", imagem);
567
- },
568
- adjustFontColor(cor) {
569
- try {
570
- var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(cor);
571
-
572
- if (!result) return;
573
-
574
- var r = parseInt(result[1], 16);
575
- var g = parseInt(result[2], 16);
576
- var b = parseInt(result[3], 16);
577
-
578
- (r /= 255), (g /= 255), (b /= 255);
579
- var max = Math.max(r, g, b),
580
- min = Math.min(r, g, b);
581
- var h,
582
- s,
583
- l = (max + min) / 2;
584
-
585
- if (max == min) {
586
- h = s = 0; // achromatic
587
- } else {
588
- var d = max - min;
589
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
590
- switch (max) {
591
- case r:
592
- h = (g - b) / d + (g < b ? 6 : 0);
593
- break;
594
- case g:
595
- h = (b - r) / d + 2;
596
- break;
597
- case b:
598
- h = (r - g) / d + 4;
599
- break;
600
- }
601
- h /= 6;
602
- }
603
-
604
- s = s * 100;
605
- s = Math.round(s);
606
- l = l * 100;
607
- l = Math.round(l);
608
- h = Math.round(360 * h);
609
-
610
- const root = document.documentElement;
611
- root.style.setProperty("--text-color", l <= 50 ? "#FFF" : "#111B21");
612
- root.style.setProperty(
613
- "--files-bg",
614
- l <= 50 ? "rgba(255, 255, 255, 0.1)" : "rgba(100, 100, 100, 0.1)"
615
- );
616
- root.style.setProperty(
617
- "--files-bg-hover",
618
- l <= 50 ? "rgba(255, 255, 255, 0.3)" : "rgba(100, 100, 100, 0.3)"
619
- );
620
- } catch (e) {
621
- console.error("Erro ao ajustar a cor da mensagem: ", e);
622
- }
623
- },
624
- formatMsg(msg) {
625
- if (this.status == "O")
626
- return this.dictionary.msg_excluida
627
- ? this.dictionary.msg_excluida
628
- : "MENSAGEM DELETADA";
629
- const regex = /(\n|&nbsp;)/g;
630
- if (regex.test(msg)) msg = msg.replace(regex, "<br>");
631
- return msg;
632
- },
633
- },
634
- };
635
- </script>
636
-
637
- <style>
638
- :root {
639
- --message-color: #373737;
640
- --text-color: #fff;
641
- --files-bg: rgba(255, 255, 255, 0.1);
642
- --files-bg-hover: rgba(255, 255, 255, 0.1);
643
-
644
- --light: 80;
645
- --threshold: 60;
646
- }
647
-
648
- .fade-enter-active,
649
- .fade-leave-active {
650
- transition: opacity 0.5s;
651
- }
652
- .fade-enter,
653
- .fade-leave-to {
654
- opacity: 0;
655
- }
656
-
657
- .mensagem-reply {
658
- padding: 5px 10px;
659
- font-size: 12px;
660
- color: #666;
661
- transition: background-color 150ms ease-in-out;
662
- border-radius: 5px;
663
- margin: 5px 0;
664
- overflow: hidden;
665
- max-width: 100%;
666
- }
667
- .mensagem-reply p {
668
- overflow: hidden;
669
- text-overflow: ellipsis;
670
- white-space: nowrap;
671
- }
672
-
673
- .message-reply-principal {
674
- border-left: 3px solid transparent;
675
- background-color: rgba(100, 100, 100, 0.1);
676
- }
677
- .message-reply-principal:hover {
678
- background-color: rgba(100, 100, 100, 0.2);
679
- }
680
-
681
- .message-reply-outros {
682
- background-color: rgb(245, 245, 245);
683
- border-left: 3px solid var(--message-color);
684
- }
685
- .message-reply-outros:hover {
686
- background-color: rgb(235, 235, 235);
687
- }
688
-
689
- .mensagem-reply-vazia {
690
- display: flex;
691
- align-items: center;
692
- }
693
- .mensagem-reply-vazia svg {
694
- margin-right: 5px;
695
- color: #ba181b;
696
- }
697
-
698
- .mensagem {
699
- padding: 20px 7px 14px 7px;
700
- border-radius: 5px;
701
- min-width: 150px;
702
- min-height: 60px;
703
- width: -webkit-fit-content;
704
- width: -moz-fit-content;
705
- width: fit-content;
706
- position: relative;
707
- max-width: 80%;
708
- margin-bottom: 10px;
709
- font-size: 12px;
710
- word-break: break-word;
711
-
712
- -webkit-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
713
- 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
714
- -moz-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
715
- 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
716
- box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
717
- 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
718
- }
719
- .mensagem.max-w-60 {
720
- max-width: 60%;
721
- }
722
- .mensagem.mapa {
723
- width: 100%;
724
- }
725
- .mensagem.hist-msg {
726
- animation: show 1s;
727
- }
728
- .mensagem a {
729
- margin-right: 5px;
730
- font-weight: 550;
731
- color: inherit;
732
- text-decoration: none;
733
- }
734
- .mensagem a:hover {
735
- text-decoration: underline;
736
- }
737
- .message p {
738
- white-space: pre-wrap;
739
- }
740
- .mensagem:hover .menu-primario {
741
- visibility: visible;
742
- opacity: 1;
743
- }
744
-
745
- .mensagem-anexo a,
746
- .mensagem-div-mapa a {
747
- white-space: nowrap;
748
- text-overflow: ellipsis;
749
- overflow: hidden;
750
- }
751
-
752
- .reply {
753
- cursor: pointer;
754
- position: absolute;
755
- right: 53px;
756
- bottom: 5px;
757
- font-size: 9.6px;
758
- color: #67a332;
759
- width: 14.4px;
760
- height: 14.4px;
761
- display: flex;
762
- justify-content: center;
763
- align-items: center;
764
- border-radius: 50%;
765
- background-color: #fff;
766
- }
767
- .reply svg {
768
- margin-top: -1px;
769
- margin-right: -1px;
770
- }
771
- .reply-with-2-icons {
772
- right: 30px;
773
- }
774
-
775
- .check {
776
- cursor: pointer;
777
- position: absolute;
778
- right: 10px;
779
- bottom: 2px;
780
- font-size: 11.2px;
781
- }
782
- .check.visualizado,
783
- .check.visualizado svg {
784
- color: #006daa;
785
- }
786
- .check.verde,
787
- .check.verde svg {
788
- color: #4f772d;
789
- }
790
- .check.vermelho,
791
- .check.vermelho svg {
792
- color: #ba181b;
793
- }
794
- .check.cinza,
795
- .check.cinza svg {
796
- color: #999;
797
- }
798
- .check.preto,
799
- .check.preto svg {
800
- color: #666;
801
- }
802
- .star {
803
- cursor: pointer;
804
- position: absolute;
805
- right: 30px;
806
- bottom: 2px;
807
- font-size: 6.4px;
808
- width: 11.2px;
809
- }
810
- .default-stick-size {
811
- width: 180px;
812
- height: auto;
813
- }
814
- .horario-envio {
815
- margin-right: 15px;
816
- font-size: 11.2px;
817
- position: absolute;
818
- left: 10px;
819
- bottom: 2px;
820
- }
821
-
822
- .autor-mensagem {
823
- position: absolute;
824
- font-size: 9.6px;
825
- white-space: nowrap;
826
- text-overflow: ellipsis;
827
- overflow: hidden;
828
- max-width: 90%;
829
- font-weight: bold;
830
- top: 2px;
831
- }
832
-
833
- .menu-primario {
834
- visibility: hidden;
835
- opacity: 0;
836
- transition: opacity 150ms ease-in-out;
837
- position: absolute;
838
- font-size: 11.2px;
839
- top: 3px;
840
- display: flex;
841
- gap: 5px;
842
- padding: 2px 4px;
843
- }
844
- .menu-primario.principal {
845
- left: 4px;
846
- color: var(--text-color);
847
- background-color: var(--message-color);
848
- }
849
- .menu-primario.outros {
850
- right: 4px;
851
- color: var(--text-color);
852
- background-color: #fff;
853
- }
854
-
855
- .menu-primario.outros > span:nth-child(1) {
856
- order: 10;
857
- }
858
-
859
- .menu-mensagem {
860
- cursor: pointer;
861
- padding: 1px;
862
- }
863
-
864
- .menu-flutuante {
865
- background-color: #fff;
866
- -webkit-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
867
- 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
868
- -moz-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
869
- 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
870
- box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
871
- 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
872
- border-radius: 10px;
873
- position: absolute;
874
- top: 20px;
875
- width: 120px;
876
- min-height: 50px;
877
- height: 50px;
878
- max-height: 50px;
879
- overflow-x: hidden;
880
- overflow-y: auto;
881
- margin: 0;
882
- padding: 0;
883
- display: flex;
884
- flex-direction: column;
885
- z-index: 1;
886
- }
887
-
888
- .menu-flutuante.principal {
889
- left: 3px;
890
- }
891
-
892
- .menu-flutuante.outros {
893
- right: 3px;
894
- }
895
-
896
- .menu-flutuante li {
897
- transition: background-color 300ms ease-in-out;
898
- width: 100%;
899
- cursor: pointer;
900
- padding: 5px 10px;
901
- display: flex;
902
- align-items: center;
903
- }
904
-
905
- .menu-flutuante li:hover {
906
- background-color: #e9e9e9;
907
- }
908
-
909
- /* Principal */
910
- .mensagem__principal {
911
- width: 100%;
912
- display: flex;
913
- justify-content: flex-end;
914
- }
915
- .mensagem__principal > .mensagem::after {
916
- content: "";
917
- width: 0;
918
- height: 0;
919
- position: absolute;
920
- border-left: 10px solid transparent;
921
- border-right: 10px solid transparent;
922
- border-top: 10px solid var(--message-color);
923
- bottom: 5px;
924
- right: -10px;
925
- transform: rotate(-90deg);
926
- }
927
- .mensagem__principal > .mensagem {
928
- background-color: var(--message-color);
929
- color: var(--text-color);
930
- }
931
-
932
- .mensagem__principal > .mensagem .horario-envio {
933
- color: var(--text-color);
934
- }
935
- .mensagem__principal > .mensagem .autor-mensagem {
936
- right: 5px;
937
- color: var(--text-color);
938
- }
939
- /* Outros */
940
- .mensagem__outros {
941
- width: 100%;
942
- display: flex;
943
- }
944
- .mensagem__outros > .mensagem {
945
- background-color: #fff;
946
- color: #333;
947
- }
948
- .mensagem__outros > .mensagem::after {
949
- content: "";
950
- width: 0;
951
- height: 0;
952
- position: absolute;
953
- border-left: 10px solid transparent;
954
- border-right: 10px solid transparent;
955
- border-top: 10px solid #fff;
956
- bottom: 5px;
957
- left: -10px;
958
- transform: rotate(90deg);
959
- }
960
- /* .mensagem__outros .check{
961
- display: none
962
- } */
963
- .mensagem__outros > .autor-mensagem {
964
- left: 5px;
965
- color: #333;
966
- }
967
- /* Mapa */
968
- .mensagem-div-mapa {
969
- width: 100%;
970
- display: flex;
971
- justify-content: center;
972
- align-items: center;
973
- flex-direction: column;
974
- margin-bottom: 5px;
975
- }
976
-
977
- .msg-mapa {
978
- width: 100%;
979
- min-height: 225px;
980
- height: 100%;
981
- box-sizing: initial;
982
- }
983
- .msg-mapa img {
984
- max-width: none !important;
985
- }
986
-
987
- .info-mapa {
988
- list-style-type: none;
989
- }
990
- .info-mapa li.title {
991
- font-size: 0.85em;
992
- }
993
- .info-mapa li.address,
994
- .info-mapa li.url {
995
- font-size: 0.85em;
996
- }
997
- .info-mapa li.url {
998
- font-size: 0.85em;
999
- }
1000
-
1001
- .tooltip-list {
1002
- margin: 0;
1003
- padding: 0;
1004
- display: flex;
1005
- flex-direction: column;
1006
- justify-content: center;
1007
- align-items: flex-start;
1008
- }
1009
-
1010
- .emoji-message-container {
1011
- position: absolute;
1012
- top: 0;
1013
- z-index: 1;
1014
- width: 300px;
1015
- height: 250px;
1016
- }
1017
- /* .emoji-message-container {
1018
- z-index: 1;
1019
- overflow: hidden;
1020
- width: 300px;
1021
- height: 250px;
1022
-
1023
- >.sm-emoji-picker {
1024
- position: relative;
1025
- width: 300px;
1026
- height: 250px;
1027
- }
1028
- }
1029
-
1030
- .mensagem .reaction {
1031
- $size: 1.8em;
1032
- width: $size;
1033
- height: $size;
1034
- min-width: $size;
1035
- min-height: $size;
1036
- max-width: $size;
1037
- max-height: $size;
1038
- } */
1039
-
1040
- .emoji-message-container .sm-emoji-picker {
1041
- width: 300px;
1042
- height: 250px;
1043
- }
1044
- .emoji-message-container .sm-emoji-picker .sm-emoji-header {
1045
- overflow-x: auto;
1046
- overflow-y: hidden;
1047
- }
1048
-
1049
- .reaction {
1050
- position: absolute;
1051
- bottom: 0;
1052
- border-radius: 50%;
1053
- display: flex;
1054
- justify-content: center;
1055
- align-items: center;
1056
- background-color: rgba(100, 100, 100, 0.4);
1057
- padding: 5px;
1058
- font-size: 1.3em;
1059
- min-width: 1.8em;
1060
- min-height: 1.8em;
1061
- max-width: 1.8em;
1062
- max-height: 1.8em;
1063
- }
1064
-
1065
- .reaction > span {
1066
- display: block;
1067
- transform: translateY(-1px);
1068
- }
1069
-
1070
- .mensagem__outros .reaction {
1071
- right: -30px;
1072
- }
1073
-
1074
- .mensagem__principal .reaction {
1075
- left: -30px;
1076
- }
1077
- </style>
1
+ <template>
2
+ <div
3
+ :class="'mensagem__' + origem"
4
+ v-if="origem && !erro"
5
+ :id="`a${messageIndex ? messageIndex : randomizeValue}`"
6
+ >
7
+ <InteratividadeFormulario
8
+ v-if="interatividade && validateInterativity()"
9
+ :interatividade="interatividade"
10
+ :dominio="dominio"
11
+ :infoCanal="infoCanalTeste"
12
+ :anexos="anexos"
13
+ :dictionary="dictionary"
14
+ />
15
+ <div
16
+ v-else
17
+ class="mensagem"
18
+ :class="{ mapa, 'hist-msg': histMsg, 'max-w-60': link && !mapa }"
19
+ >
20
+ <!-- Estilo da mensagem do tipo reply (que foi respondida) -->
21
+ <div
22
+ v-if="isReply && replyMessage"
23
+ class="mensagem-reply"
24
+ :class="`message-reply-${origem}`"
25
+ >
26
+ <p v-if="replyMessage" v-html="replyMessage"></p>
27
+ <span v-else class="mensagem-reply-vazia">
28
+ <fa-icon :icon="['fas', 'times']" v-if="showReplyIcon" />
29
+ {{
30
+ defaultReplyMessage ? defaultReplyMessage : dictionary.mensagem_reply_padrao
31
+ }}
32
+ </span>
33
+ </div>
34
+ <!-- Anexos -->
35
+ <template v-if="anexos && anexos.length">
36
+ <div class="mensagem-anexo" v-for="(anexo, index) in anexos" :key="index">
37
+ <AnexoMensagem
38
+ :showControlFiles="showControlFiles"
39
+ :referenceSelector="referenceSelector"
40
+ :dictionary="dictionary"
41
+ :anexo="anexo"
42
+ :origemExterna="origemExterna"
43
+ :dominio="dominio"
44
+ @abrir-imagem="abrirImagem"
45
+ @download-all="$emit('download-all')"
46
+ />
47
+ </div>
48
+ </template>
49
+ <!-- sticker -->
50
+ <img
51
+ class="default-stick-size"
52
+ v-if="urlSticker"
53
+ :src="urlSticker"
54
+ :title="urlFileName"
55
+ />
56
+ <!-- Mapa -->
57
+ <div v-if="mapa" class="mensagem-div-mapa">
58
+ <GmapMap
59
+ :id="`mapa_${seq}`"
60
+ class="msg-mapa"
61
+ :center="center"
62
+ :zoom="17"
63
+ :options="mapOptions"
64
+ >
65
+ <GmapMarker :position="marker" />
66
+ </GmapMap>
67
+ <ul class="info-mapa" v-if="infos.length">
68
+ <li v-for="(info, index) in infos" :key="index" :class="info.classe">
69
+ <template v-if="!info.link"> {{ info.value }} </template>
70
+ <a v-else :href="info.value" @click.prevent="abrirPopup(info.value)">
71
+ {{ info.textLink }} <fa-icon :icon="['fas', 'map-marker-alt']" />
72
+ </a>
73
+ </li>
74
+ </ul>
75
+ </div>
76
+ <!-- Preview do link -->
77
+ <LinkPreview v-if="link && !mapa && status != 'O'" :message="message" />
78
+ <!-- Mensagem -->
79
+ <p v-html="validateInterativity() ? '' : formatMsg(message)"></p>
80
+ <!-- Botoes da interatividade -->
81
+ <InteratividadeBotoes v-if="interatividade" :interatividade="interatividade" />
82
+ <!-- Horario da mensagem -->
83
+ <span class="horario-envio" v-text="horario"></span>
84
+ <!-- Reenviar mensagem -->
85
+ <transition name="fade" mode="out-in">
86
+ <span
87
+ :class="reply"
88
+ v-if="hasReply && (status == 'C' || status == 'T' || status == 'ERRO')"
89
+ v-tippy
90
+ :content="msgReply ? msgReply : 'Fazer reenvio da mensagem'"
91
+ @click="$emit('replyMsg')"
92
+ >
93
+ <fa-icon :icon="['fas', 'reply']" />
94
+ </span>
95
+ </transition>
96
+ <!-- ?? -->
97
+ <transition name="fade" mode="out-in" v-if="validadeSeq">
98
+ <span
99
+ class="star dourado"
100
+ v-if="iniDialogo > 0"
101
+ :content="contentTooltipStar"
102
+ v-tippy
103
+ key="star-padrao-dourado"
104
+ >
105
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
106
+ <path
107
+ fill="#FFD700"
108
+ 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"
109
+ />
110
+ </svg>
111
+ </span>
112
+ <span
113
+ class="star cinza"
114
+ v-if="iniDialogo == 0"
115
+ :content="contentTooltipStar"
116
+ v-tippy
117
+ key="star-padrao-cinza"
118
+ >
119
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
120
+ <path
121
+ fill="#808080"
122
+ 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"
123
+ />
124
+ </svg>
125
+ </span>
126
+ </transition>
127
+ <!-- Status da mensagem -->
128
+ <transition name="fade" mode="out-in">
129
+ <span
130
+ class="check"
131
+ v-if="status == 'D'"
132
+ :content="contentTooltip"
133
+ v-tippy
134
+ key="check-padrao"
135
+ >
136
+ <fa-icon :icon="['fas', 'check']" />
137
+ </span>
138
+ <span
139
+ class="check cinza"
140
+ v-else-if="status == 'Q'"
141
+ :content="contentTooltip"
142
+ v-tippy
143
+ key="check-cinza"
144
+ >
145
+ <fa-icon :icon="['fas', 'check']" />
146
+ </span>
147
+ <span
148
+ class="check preto"
149
+ v-else-if="status == 'G'"
150
+ :content="contentTooltip"
151
+ v-tippy
152
+ key="check-preto"
153
+ >
154
+ <fa-icon :icon="['fas', 'check']" />
155
+ </span>
156
+ <span
157
+ class="check preto"
158
+ v-else-if="status == 'E'"
159
+ :content="contentTooltip"
160
+ v-tippy
161
+ key="double-check-preto"
162
+ >
163
+ <fa-icon :icon="['fas', 'check-double']" />
164
+ </span>
165
+ <span
166
+ class="check visualizado"
167
+ v-else-if="status == 'L'"
168
+ :content="contentTooltip"
169
+ v-tippy
170
+ key="double-check-visualizado"
171
+ >
172
+ <fa-icon :icon="['fas', 'check-double']" />
173
+ </span>
174
+ <!-- Status finalizador -->
175
+ <span
176
+ class="check vermelho"
177
+ v-else-if="status == 'C' || status == 'ERRO'"
178
+ :content="contentTooltip"
179
+ v-tippy
180
+ key="times-circle"
181
+ >
182
+ <fa-icon :icon="['fas', 'times-circle']" />
183
+ </span>
184
+ <!-- Status finalizador -->
185
+ <span
186
+ class="check vermelho"
187
+ v-else-if="status == 'T'"
188
+ :content="contentTooltip"
189
+ v-tippy
190
+ key="hourglass"
191
+ >
192
+ <fa-icon :icon="['fas', 'hourglass']" />
193
+ </span>
194
+ <!-- Status finalizador -->
195
+ <span
196
+ class="check vermelho"
197
+ v-else-if="status == 'O'"
198
+ :content="contentTooltip"
199
+ v-tippy
200
+ key="deleted"
201
+ >
202
+ <fa-icon :icon="['fas', 'times']" />
203
+ </span>
204
+ <!-- Status de mensagem deletada -->
205
+ </transition>
206
+ <!-- Autor da mensagem -->
207
+ <span class="autor-mensagem" v-html="autor" :title="autor"></span>
208
+ <!-- Menu de opcoes da mensagem -->
209
+ <div class="menu-primario" :class="origem" v-if="hasAnyMenu">
210
+ <!-- <span class="menu-mensagem" @click="toggleIsMenuOpen" v-tippy :content="dictionary.tit_mais_msg">
211
+ <fa-icon :icon="['fas', 'chevron-down']" />
212
+ </span> -->
213
+ <span
214
+ class="menu-mensagem"
215
+ @click="responderMensagemHandler"
216
+ v-tippy
217
+ :content="dictionary.tit_responder_msg"
218
+ v-if="showMenu.reply"
219
+ >
220
+ <fa-icon :icon="['fas', 'reply']" />
221
+ </span>
222
+ <span
223
+ class="menu-mensagem"
224
+ @click="reagirMensagemHandler"
225
+ v-tippy
226
+ :content="dictionary.tit_reagir_msg"
227
+ v-if="showMenu.reaction"
228
+ >
229
+ <fa-icon :icon="['fas', 'smile']" />
230
+ </span>
231
+ </div>
232
+ <div
233
+ class="emoji-message-container"
234
+ v-if="isEmojisOpen"
235
+ v-on-clickaway="closeEmojis"
236
+ >
237
+ <fa-icon
238
+ :icon="['fas', 'times-circle']"
239
+ class="sc-icone-fechar sc-icone-fechar--externo"
240
+ @click="closeEmojis"
241
+ />
242
+ <Picker @insert-emoji="addReaction" />
243
+ </div>
244
+ <transition name="fade" mode="out-in" v-if="isMenuOpen">
245
+ <ul class="menu-flutuante" :class="origem" v-on-clickaway="closeMenu">
246
+ <li @click="responderMensagemHandler" v-if="showMenu.reply">
247
+ <span> {{ dictionary.tit_responder_msg }} </span>
248
+ </li>
249
+ <li @click="reagirMensagemHandler" v-if="showMenu.reaction">
250
+ <span> {{ dictionary.tit_reagir_msg }} </span>
251
+ </li>
252
+ </ul>
253
+ </transition>
254
+ <transition name="fade" mode="out-in" v-if="messageReaction">
255
+ <span
256
+ class="reaction"
257
+ v-tippy
258
+ :content="`${dictionary.tit_mensagem_reagida} ${messageReaction.finalEmoji}`"
259
+ >
260
+ <span v-html="messageReaction.finalEmoji"></span>
261
+ </span>
262
+ </transition>
263
+ </div>
264
+ </div>
265
+ </template>
266
+
267
+ <script>
268
+ import AnexoMensagem from "./AnexoMensagem";
269
+ import InteratividadeBotoes from "./InteratividadeBotoes";
270
+ import InteratividadeFormulario from "./InteratividadeFormulario";
271
+ import Picker from "../Chat/Picker";
272
+ import { formataTimezoneData } from "../../services/textFormatting";
273
+ import LinkPreview from "./LinkPreview";
274
+ import { mixin as clickaway } from "vue-clickaway";
275
+
276
+ export default {
277
+ components: {
278
+ AnexoMensagem,
279
+ InteratividadeBotoes,
280
+ InteratividadeFormulario,
281
+ LinkPreview,
282
+ Picker,
283
+ },
284
+ props: [
285
+ "smartchannel",
286
+ "messageIndex",
287
+ "dictionary",
288
+ "autor",
289
+ "origem",
290
+ "msg",
291
+ "link",
292
+ "anexo",
293
+ "imgAnexo",
294
+ "tipoDoc",
295
+ "docAnexo",
296
+ "nomeArquivo",
297
+ "audio",
298
+ "video",
299
+ "horario",
300
+ "status",
301
+ "logo",
302
+ "msgTooltip",
303
+ "seq",
304
+ "mapa",
305
+ "histMsg",
306
+ "erro",
307
+ "msgErro",
308
+ "origemExterna",
309
+ "anexos",
310
+ "dominio",
311
+ "corMsg",
312
+ "interatividade",
313
+ "msgReply",
314
+ "hasReply",
315
+ "iniDialogo",
316
+ "dialogoId",
317
+ "dialogoOrigem",
318
+ "expSessao",
319
+ "referenceSelector",
320
+ "replyMessage",
321
+ "isReply",
322
+ "defaultReplyMessage",
323
+ "showReplyIcon",
324
+ "showControlFiles",
325
+ "showMenu",
326
+ "id_ext_msg",
327
+ "tipo_origem",
328
+ ],
329
+ created() {
330
+ if (!this.$root.$refs.chatMessages) this.$root.$refs.chatMessages = this;
331
+ },
332
+ mixins: [clickaway],
333
+ data() {
334
+ return {
335
+ strTooltipAux: "",
336
+ linkAux: "",
337
+ urlSticker: "",
338
+ urlFileName: "",
339
+ message: "",
340
+ reply: "reply",
341
+ center: {},
342
+ marker: {},
343
+ infos: [],
344
+ infoCanalTeste: {
345
+ PRAZO: "2022-05-05",
346
+ SITUACAO: { cod: "3", desc: "Em analise pelo fornecedor", cor: "#03A64A" },
347
+ DATA_ABERTURA: "2022-05-03 09:43:43",
348
+ },
349
+ mapOptions: {
350
+ zoomControl: true,
351
+ mapTypeControl: false,
352
+ scaleControl: false,
353
+ streetViewControl: false,
354
+ rotateControl: false,
355
+ fullscreenControl: false,
356
+ disableDefaultUI: false,
357
+ },
358
+ isMenuOpen: false,
359
+ showMenuOptions: false,
360
+ isEmojisOpen: false,
361
+ messageReaction: "",
362
+ };
363
+ },
364
+ computed: {
365
+ hrefAnexo() {
366
+ if (this.docAnexo) {
367
+ if (this.tipoDoc == "erro") {
368
+ return (this.hrefAnexo = "#");
369
+ } else {
370
+ return this.docAnexo;
371
+ }
372
+ }
373
+ },
374
+ randomizeValue() {
375
+ return `${Math.floor(Math.random() * 7770)}${Date.now()}`;
376
+ },
377
+ contentTooltip: {
378
+ get() {
379
+ if (this.status && !this.msgTooltip) {
380
+ const msgStatus = "msg_status_" + this.status;
381
+ return (this.strTooltipAux = this.dictionary[msgStatus]);
382
+ } else if (this.status && this.msgTooltip) {
383
+ return (this.strTooltipAux = this.msgTooltip);
384
+ }
385
+ },
386
+ set(msg) {
387
+ return (this.contentTooltip = msg);
388
+ },
389
+ },
390
+ contentTooltipStar() {
391
+ let tooltipStar = "";
392
+ if (this.iniDialogo == 1) {
393
+ tooltipStar += this.dictionary["ini_sessao"] + "<br/>";
394
+ } else {
395
+ tooltipStar += this.dictionary["ini_sessao_padrao"] + "<br/>";
396
+ }
397
+ tooltipStar += this.dialogoId
398
+ ? this.dictionary["id_conversa"] + " - " + this.dialogoId + "<br/>"
399
+ : "";
400
+ tooltipStar += this.dialogoOrigem
401
+ ? this.dictionary["origem_conversa"] + " - " + this.dialogoOrigem + "<br/>"
402
+ : "";
403
+ tooltipStar += this.expSessao
404
+ ? this.dictionary["expiracao_sessao"] +
405
+ " - " +
406
+ formataTimezoneData(this.expSessao) +
407
+ "<br/>"
408
+ : "";
409
+
410
+ if (this.tipo_origem) {
411
+ tooltipStar += `${this.dictionary["tipo_origem"]}: ${
412
+ this.dictionary[`tipo_origem_${this.tipo_origem}`]
413
+ ? this.dictionary[`tipo_origem_${this.tipo_origem}`]
414
+ : this.tipo_origem
415
+ }<br/>`;
416
+ }
417
+
418
+ return tooltipStar;
419
+ },
420
+ validadeSeq() {
421
+ if (this.seq && this.seq.substring(0, 2) == "HW") return true;
422
+ this.reply = "reply reply-with-2-icons";
423
+ return false;
424
+ },
425
+ hasAnyMenu() {
426
+ if (!this.showMenu || typeof this.showMenu !== "object") return false;
427
+ for (let key in this.showMenu) {
428
+ if (this.showMenu.hasOwnProperty(key) && this.showMenu[key] === true) return true;
429
+ }
430
+ return false;
431
+ },
432
+ },
433
+ mounted() {
434
+ if (this.mapa) this.setMap();
435
+ if (this.corMsg) this.setCorMsg();
436
+ this.validadeUrlToMsg();
437
+ },
438
+ methods: {
439
+ closeMenu() {
440
+ this.isMenuOpen = false;
441
+ },
442
+ toggleIsMenuOpen() {
443
+ this.isMenuOpen = !this.isMenuOpen;
444
+ },
445
+ responderMensagemHandler() {
446
+ if (this.isMenuOpen) this.closeMenu();
447
+ this.$emit("responder-mensagem", {
448
+ messageIndex: this.messageIndex,
449
+ autor: this.autor,
450
+ origem: this.origem,
451
+ msg: this.msg,
452
+ anexo: this.anexo,
453
+ imgAnexo: this.imgAnexo,
454
+ tipoDoc: this.tipoDoc,
455
+ docAnexo: this.docAnexo,
456
+ nomeArquivo: this.nomeArquivo,
457
+ audio: this.audio,
458
+ video: this.video,
459
+ seq: this.seq,
460
+ mapa: this.mapa,
461
+ anexos: this.anexos,
462
+ interatividade: this.interatividade,
463
+ referenceSelector: this.referenceSelector,
464
+ id_ext_msg: this.id_ext_msg,
465
+ });
466
+ },
467
+ reagirMensagemHandler() {
468
+ if (this.isMenuOpen) this.closeMenu();
469
+ this.isEmojisOpen = !this.isEmojisOpen;
470
+ },
471
+ addReaction(emoji) {
472
+ this.messageReaction =
473
+ this.messageReaction && this.messageReaction.hexa === emoji.hexa
474
+ ? ""
475
+ : { hexa: emoji.hexa, finalEmoji: emoji.finalEmoji };
476
+ this.isEmojisOpen = false;
477
+ this.$emit("reagir-mensagem", {
478
+ emoji,
479
+ seq: this.seq,
480
+ id_ext_msg: this.id_ext_msg,
481
+ hasEmojiReaction: this.messageReaction ? true : false,
482
+ });
483
+ },
484
+ closeEmojis() {
485
+ this.isEmojisOpen = false;
486
+ },
487
+ validateInterativity() {
488
+ try {
489
+ if (
490
+ (this.interatividade &&
491
+ this.interatividade.formulario &&
492
+ this.interatividade.formulario.length) ||
493
+ (this.interatividade.list && this.interatividade.tipo == "listItem")
494
+ ) {
495
+ return true;
496
+ }
497
+ return false;
498
+ } catch (error) {
499
+ return false;
500
+ }
501
+ },
502
+ validadeUrlToMsg() {
503
+ try {
504
+ this.message = this.msg;
505
+ if (this.validadeIfExistsSticker()) {
506
+ this.urlSticker = this.getUrlSticker();
507
+ this.urlFileName = this.getUrlFileName();
508
+ this.message = this.removeUrlStickerByString(this.urlSticker);
509
+ }
510
+ } catch (error) {
511
+ console.error("Error validating url to msg: ", error);
512
+ }
513
+ },
514
+ getUrlFileName() {
515
+ let urlRegex = /(?<=\/)[^\/\?#]+(?=[^\/]*$)/;
516
+ let urlName = this.urlSticker.match(urlRegex)[0];
517
+ return urlName;
518
+ },
519
+ removeUrlStickerByString(url) {
520
+ let msg = this.message.replace(`KSTICKERK ${url}`, "");
521
+ return msg;
522
+ },
523
+ getUrlSticker() {
524
+ let urlRegex = /(https?:\/\/[^ ]*)/;
525
+ let url = this.message.match(urlRegex)[1];
526
+ return url;
527
+ },
528
+ validadeIfExistsSticker() {
529
+ if (this.message && this.message.indexOf("KSTICKERK https://") === 0) return true;
530
+ return false;
531
+ },
532
+ setCorMsg() {
533
+ try {
534
+ const root = document.documentElement;
535
+ root.style.setProperty("--message-color", this.corMsg);
536
+ this.adjustFontColor(this.corMsg);
537
+ } catch (e) {
538
+ console.error("Erro ao atribuir a cor as mensagens");
539
+ console.error(e);
540
+ }
541
+ },
542
+ setMap() {
543
+ let objMapa =
544
+ typeof this.mapa === "string" ? JSON.parse(`${this.mapa}`) : this.mapa;
545
+ if (objMapa.latitude && objMapa.longitude) {
546
+ objMapa.latitude = parseFloat(objMapa.latitude);
547
+ objMapa.longitude = parseFloat(objMapa.longitude);
548
+
549
+ this.center.lat = objMapa.latitude;
550
+ this.center.lng = objMapa.longitude;
551
+
552
+ this.marker.lat = objMapa.latitude;
553
+ this.marker.lng = objMapa.longitude;
554
+
555
+ this.infos.push(
556
+ { classe: "title", value: objMapa.name },
557
+ { classe: "address", value: objMapa.address },
558
+ {
559
+ classe: "url",
560
+ value: `https://www.google.com/maps/search/?api=1&query=${this.marker.lat},${this.marker.lng}`,
561
+ link: true,
562
+ textLink: this.dictionary.abrir_mapa,
563
+ }
564
+ );
565
+ }
566
+ },
567
+ abrirPopup(url) {
568
+ window.open(url, "map-popup", "width=auto,height=auto");
569
+ },
570
+ abrirImagem(imagem) {
571
+ this.$emit("abrir-imagem", imagem);
572
+ },
573
+ adjustFontColor(cor) {
574
+ try {
575
+ var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(cor);
576
+
577
+ if (!result) return;
578
+
579
+ var r = parseInt(result[1], 16);
580
+ var g = parseInt(result[2], 16);
581
+ var b = parseInt(result[3], 16);
582
+
583
+ (r /= 255), (g /= 255), (b /= 255);
584
+ var max = Math.max(r, g, b),
585
+ min = Math.min(r, g, b);
586
+ var h,
587
+ s,
588
+ l = (max + min) / 2;
589
+
590
+ if (max == min) {
591
+ h = s = 0; // achromatic
592
+ } else {
593
+ var d = max - min;
594
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
595
+ switch (max) {
596
+ case r:
597
+ h = (g - b) / d + (g < b ? 6 : 0);
598
+ break;
599
+ case g:
600
+ h = (b - r) / d + 2;
601
+ break;
602
+ case b:
603
+ h = (r - g) / d + 4;
604
+ break;
605
+ }
606
+ h /= 6;
607
+ }
608
+
609
+ s = s * 100;
610
+ s = Math.round(s);
611
+ l = l * 100;
612
+ l = Math.round(l);
613
+ h = Math.round(360 * h);
614
+
615
+ const root = document.documentElement;
616
+ root.style.setProperty("--text-color", l <= 50 ? "#FFF" : "#111B21");
617
+ root.style.setProperty(
618
+ "--files-bg",
619
+ l <= 50 ? "rgba(255, 255, 255, 0.1)" : "rgba(100, 100, 100, 0.1)"
620
+ );
621
+ root.style.setProperty(
622
+ "--files-bg-hover",
623
+ l <= 50 ? "rgba(255, 255, 255, 0.3)" : "rgba(100, 100, 100, 0.3)"
624
+ );
625
+ } catch (e) {
626
+ console.error("Erro ao ajustar a cor da mensagem: ", e);
627
+ }
628
+ },
629
+ formatMsg(msg) {
630
+ if (this.status == "O")
631
+ return this.dictionary.msg_excluida
632
+ ? this.dictionary.msg_excluida
633
+ : "MENSAGEM DELETADA";
634
+ const regex = /(\n|&nbsp;)/g;
635
+ if (regex.test(msg)) msg = msg.replace(regex, "<br>");
636
+ return msg;
637
+ },
638
+ },
639
+ };
640
+ </script>
641
+
642
+ <style>
643
+ :root {
644
+ --message-color: #373737;
645
+ --text-color: #fff;
646
+ --files-bg: rgba(255, 255, 255, 0.1);
647
+ --files-bg-hover: rgba(255, 255, 255, 0.1);
648
+
649
+ --light: 80;
650
+ --threshold: 60;
651
+ }
652
+
653
+ .fade-enter-active,
654
+ .fade-leave-active {
655
+ transition: opacity 0.5s;
656
+ }
657
+ .fade-enter,
658
+ .fade-leave-to {
659
+ opacity: 0;
660
+ }
661
+
662
+ .mensagem-reply {
663
+ padding: 5px 10px;
664
+ font-size: 12px;
665
+ color: #666;
666
+ transition: background-color 150ms ease-in-out;
667
+ border-radius: 5px;
668
+ margin: 5px 0;
669
+ overflow: hidden;
670
+ max-width: 100%;
671
+ }
672
+ .mensagem-reply p {
673
+ overflow: hidden;
674
+ text-overflow: ellipsis;
675
+ white-space: nowrap;
676
+ }
677
+
678
+ .message-reply-principal {
679
+ border-left: 3px solid transparent;
680
+ background-color: rgba(100, 100, 100, 0.1);
681
+ }
682
+ .message-reply-principal:hover {
683
+ background-color: rgba(100, 100, 100, 0.2);
684
+ }
685
+
686
+ .message-reply-outros {
687
+ background-color: rgb(245, 245, 245);
688
+ border-left: 3px solid var(--message-color);
689
+ }
690
+ .message-reply-outros:hover {
691
+ background-color: rgb(235, 235, 235);
692
+ }
693
+
694
+ .mensagem-reply-vazia {
695
+ display: flex;
696
+ align-items: center;
697
+ }
698
+ .mensagem-reply-vazia svg {
699
+ margin-right: 5px;
700
+ color: #ba181b;
701
+ }
702
+
703
+ .mensagem {
704
+ padding: 20px 7px 14px 7px;
705
+ border-radius: 5px;
706
+ min-width: 150px;
707
+ min-height: 60px;
708
+ width: -webkit-fit-content;
709
+ width: -moz-fit-content;
710
+ width: fit-content;
711
+ position: relative;
712
+ max-width: 80%;
713
+ margin-bottom: 10px;
714
+ font-size: 12px;
715
+ word-break: break-word;
716
+
717
+ -webkit-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
718
+ 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
719
+ -moz-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
720
+ 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
721
+ box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
722
+ 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
723
+ }
724
+ .mensagem.max-w-60 {
725
+ max-width: 60%;
726
+ }
727
+ .mensagem.mapa {
728
+ width: 100%;
729
+ }
730
+ .mensagem.hist-msg {
731
+ animation: show 1s;
732
+ }
733
+ .mensagem a {
734
+ margin-right: 5px;
735
+ font-weight: 550;
736
+ color: inherit;
737
+ text-decoration: none;
738
+ }
739
+ .mensagem a:hover {
740
+ text-decoration: underline;
741
+ }
742
+ .message p {
743
+ white-space: pre-wrap;
744
+ }
745
+ .mensagem:hover .menu-primario {
746
+ visibility: visible;
747
+ opacity: 1;
748
+ }
749
+
750
+ .mensagem-anexo a,
751
+ .mensagem-div-mapa a {
752
+ white-space: nowrap;
753
+ text-overflow: ellipsis;
754
+ overflow: hidden;
755
+ }
756
+
757
+ .reply {
758
+ cursor: pointer;
759
+ position: absolute;
760
+ right: 53px;
761
+ bottom: 5px;
762
+ font-size: 9.6px;
763
+ color: #67a332;
764
+ width: 14.4px;
765
+ height: 14.4px;
766
+ display: flex;
767
+ justify-content: center;
768
+ align-items: center;
769
+ border-radius: 50%;
770
+ background-color: #fff;
771
+ }
772
+ .reply svg {
773
+ margin-top: -1px;
774
+ margin-right: -1px;
775
+ }
776
+ .reply-with-2-icons {
777
+ right: 30px;
778
+ }
779
+
780
+ .check {
781
+ cursor: pointer;
782
+ position: absolute;
783
+ right: 10px;
784
+ bottom: 2px;
785
+ font-size: 11.2px;
786
+ }
787
+ .check.visualizado,
788
+ .check.visualizado svg {
789
+ color: #006daa;
790
+ }
791
+ .check.verde,
792
+ .check.verde svg {
793
+ color: #4f772d;
794
+ }
795
+ .check.vermelho,
796
+ .check.vermelho svg {
797
+ color: #ba181b;
798
+ }
799
+ .check.cinza,
800
+ .check.cinza svg {
801
+ color: #999;
802
+ }
803
+ .check.preto,
804
+ .check.preto svg {
805
+ color: #666;
806
+ }
807
+ .star {
808
+ cursor: pointer;
809
+ position: absolute;
810
+ right: 30px;
811
+ bottom: 2px;
812
+ font-size: 6.4px;
813
+ width: 11.2px;
814
+ }
815
+ .default-stick-size {
816
+ width: 180px;
817
+ height: auto;
818
+ }
819
+ .horario-envio {
820
+ margin-right: 15px;
821
+ font-size: 11.2px;
822
+ position: absolute;
823
+ left: 10px;
824
+ bottom: 2px;
825
+ }
826
+
827
+ .autor-mensagem {
828
+ position: absolute;
829
+ font-size: 9.6px;
830
+ white-space: nowrap;
831
+ text-overflow: ellipsis;
832
+ overflow: hidden;
833
+ max-width: 90%;
834
+ font-weight: bold;
835
+ top: 2px;
836
+ }
837
+
838
+ .menu-primario {
839
+ visibility: hidden;
840
+ opacity: 0;
841
+ transition: opacity 150ms ease-in-out;
842
+ position: absolute;
843
+ font-size: 11.2px;
844
+ top: 3px;
845
+ display: flex;
846
+ gap: 5px;
847
+ padding: 2px 4px;
848
+ }
849
+ .menu-primario.principal {
850
+ left: 4px;
851
+ color: var(--text-color);
852
+ background-color: var(--message-color);
853
+ }
854
+ .menu-primario.outros {
855
+ right: 4px;
856
+ color: var(--text-color);
857
+ background-color: #fff;
858
+ }
859
+
860
+ .menu-primario.outros > span:nth-child(1) {
861
+ order: 10;
862
+ }
863
+
864
+ .menu-mensagem {
865
+ cursor: pointer;
866
+ padding: 1px;
867
+ }
868
+
869
+ .menu-flutuante {
870
+ background-color: #fff;
871
+ -webkit-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
872
+ 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
873
+ -moz-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
874
+ 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
875
+ box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
876
+ 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
877
+ border-radius: 10px;
878
+ position: absolute;
879
+ top: 20px;
880
+ width: 120px;
881
+ min-height: 50px;
882
+ height: 50px;
883
+ max-height: 50px;
884
+ overflow-x: hidden;
885
+ overflow-y: auto;
886
+ margin: 0;
887
+ padding: 0;
888
+ display: flex;
889
+ flex-direction: column;
890
+ z-index: 1;
891
+ }
892
+
893
+ .menu-flutuante.principal {
894
+ left: 3px;
895
+ }
896
+
897
+ .menu-flutuante.outros {
898
+ right: 3px;
899
+ }
900
+
901
+ .menu-flutuante li {
902
+ transition: background-color 300ms ease-in-out;
903
+ width: 100%;
904
+ cursor: pointer;
905
+ padding: 5px 10px;
906
+ display: flex;
907
+ align-items: center;
908
+ }
909
+
910
+ .menu-flutuante li:hover {
911
+ background-color: #e9e9e9;
912
+ }
913
+
914
+ /* Principal */
915
+ .mensagem__principal {
916
+ width: 100%;
917
+ display: flex;
918
+ justify-content: flex-end;
919
+ }
920
+ .mensagem__principal > .mensagem::after {
921
+ content: "";
922
+ width: 0;
923
+ height: 0;
924
+ position: absolute;
925
+ border-left: 10px solid transparent;
926
+ border-right: 10px solid transparent;
927
+ border-top: 10px solid var(--message-color);
928
+ bottom: 5px;
929
+ right: -10px;
930
+ transform: rotate(-90deg);
931
+ }
932
+ .mensagem__principal > .mensagem {
933
+ background-color: var(--message-color);
934
+ color: var(--text-color);
935
+ }
936
+
937
+ .mensagem__principal > .mensagem .horario-envio {
938
+ color: var(--text-color);
939
+ }
940
+ .mensagem__principal > .mensagem .autor-mensagem {
941
+ right: 5px;
942
+ color: var(--text-color);
943
+ }
944
+ /* Outros */
945
+ .mensagem__outros {
946
+ width: 100%;
947
+ display: flex;
948
+ }
949
+ .mensagem__outros > .mensagem {
950
+ background-color: #fff;
951
+ color: #333;
952
+ }
953
+ .mensagem__outros > .mensagem::after {
954
+ content: "";
955
+ width: 0;
956
+ height: 0;
957
+ position: absolute;
958
+ border-left: 10px solid transparent;
959
+ border-right: 10px solid transparent;
960
+ border-top: 10px solid #fff;
961
+ bottom: 5px;
962
+ left: -10px;
963
+ transform: rotate(90deg);
964
+ }
965
+ /* .mensagem__outros .check{
966
+ display: none
967
+ } */
968
+ .mensagem__outros > .autor-mensagem {
969
+ left: 5px;
970
+ color: #333;
971
+ }
972
+ /* Mapa */
973
+ .mensagem-div-mapa {
974
+ width: 100%;
975
+ display: flex;
976
+ justify-content: center;
977
+ align-items: center;
978
+ flex-direction: column;
979
+ margin-bottom: 5px;
980
+ }
981
+
982
+ .msg-mapa {
983
+ width: 100%;
984
+ min-height: 225px;
985
+ height: 100%;
986
+ box-sizing: initial;
987
+ }
988
+ .msg-mapa img {
989
+ max-width: none !important;
990
+ }
991
+
992
+ .info-mapa {
993
+ list-style-type: none;
994
+ }
995
+ .info-mapa li.title {
996
+ font-size: 0.85em;
997
+ }
998
+ .info-mapa li.address,
999
+ .info-mapa li.url {
1000
+ font-size: 0.85em;
1001
+ }
1002
+ .info-mapa li.url {
1003
+ font-size: 0.85em;
1004
+ }
1005
+
1006
+ .tooltip-list {
1007
+ margin: 0;
1008
+ padding: 0;
1009
+ display: flex;
1010
+ flex-direction: column;
1011
+ justify-content: center;
1012
+ align-items: flex-start;
1013
+ }
1014
+
1015
+ .emoji-message-container {
1016
+ position: absolute;
1017
+ top: 0;
1018
+ z-index: 1;
1019
+ width: 300px;
1020
+ height: 250px;
1021
+ }
1022
+ /* .emoji-message-container {
1023
+ z-index: 1;
1024
+ overflow: hidden;
1025
+ width: 300px;
1026
+ height: 250px;
1027
+
1028
+ >.sm-emoji-picker {
1029
+ position: relative;
1030
+ width: 300px;
1031
+ height: 250px;
1032
+ }
1033
+ }
1034
+
1035
+ .mensagem .reaction {
1036
+ $size: 1.8em;
1037
+ width: $size;
1038
+ height: $size;
1039
+ min-width: $size;
1040
+ min-height: $size;
1041
+ max-width: $size;
1042
+ max-height: $size;
1043
+ } */
1044
+
1045
+ .emoji-message-container .sm-emoji-picker {
1046
+ width: 300px;
1047
+ height: 250px;
1048
+ }
1049
+ .emoji-message-container .sm-emoji-picker .sm-emoji-header {
1050
+ overflow-x: auto;
1051
+ overflow-y: hidden;
1052
+ }
1053
+
1054
+ .reaction {
1055
+ position: absolute;
1056
+ bottom: 0;
1057
+ border-radius: 50%;
1058
+ display: flex;
1059
+ justify-content: center;
1060
+ align-items: center;
1061
+ background-color: rgba(100, 100, 100, 0.4);
1062
+ padding: 5px;
1063
+ font-size: 1.3em;
1064
+ min-width: 1.8em;
1065
+ min-height: 1.8em;
1066
+ max-width: 1.8em;
1067
+ max-height: 1.8em;
1068
+ }
1069
+
1070
+ .reaction > span {
1071
+ display: block;
1072
+ transform: translateY(-1px);
1073
+ }
1074
+
1075
+ .mensagem__outros .reaction {
1076
+ right: -30px;
1077
+ }
1078
+
1079
+ .mensagem__principal .reaction {
1080
+ left: -30px;
1081
+ }
1082
+ </style>