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,1030 +1,1030 @@
1
- <template>
2
- <div
3
- class="text-footer-container"
4
- :class="{ bigger: cssStyle.height }"
5
- v-on-clickaway="away"
6
- v-if="textId"
7
- @drop.stop="dropFile"
8
- @dragenter.prevent
9
- @dragover.prevent
10
- >
11
- <div
12
- class="text-footer"
13
- :class="cssStyle.width ? cssStyle.width : ''"
14
- :style="`background-color: ${cssStyle.backgroundColor}`"
15
- >
16
- <BtnEmojis
17
- v-show="buttons.hasEmojis && !audioFile"
18
- :ref="`${this.textId}`"
19
- :emojiId="`${this.textId}`"
20
- :down="emojiSettings.openEmojisFrom == 'top' ? false : true"
21
- :small="emojiSettings.smallEmojis"
22
- :biggerTextarea="cssStyle.height ? true : false"
23
- @insert-emoji="insertEmoji"
24
- />
25
- <transition name="fade">
26
- <Loader v-if="isSending" />
27
- </transition>
28
- <textarea
29
- class="js-autoresize"
30
- v-if="!audioFile"
31
- v-model="message"
32
- :id="`text-footer-${this.textId}`"
33
- :disabled="textareaSettings.disabled"
34
- :placeholder="textareaSettings.placeholderMessage"
35
- @input="sendFinalMessage"
36
- @keydown.up="toggleStandardMessages"
37
- @keydown.down="toggleStandardMessages"
38
- @keydown.esc="closeEmojis"
39
- @keydown.enter="sendMessageHandler"
40
- @paste="pasteImage"
41
- ></textarea>
42
- <div class="text-footer-audio" v-else>
43
- <div>
44
- <audio :src="audioSource" controls="controls"></audio>
45
- </div>
46
-
47
- <span class="delete-audio" title="Cancelar" @click="deleteAudio">
48
- <fa-icon :icon="['fas', 'times']" />
49
- </span>
50
- </div>
51
- <RemainingCharacters
52
- :class="{ 'd-none': audioFile }"
53
- :message="message"
54
- :maxCharacters="textareaSettings.maxCharacters"
55
- />
56
- <div
57
- v-if="
58
- buttons.hasFiles ||
59
- buttons.hasAudio ||
60
- buttons.hasExpand ||
61
- formattedMessageSettings.hasStandardMessages ||
62
- buttons.hasScreenShare ||
63
- buttons.hasDownloadAll
64
- "
65
- class="text-footer-actions"
66
- :class="{ 'outside-buttons': cssStyle.outsideButtons && !audioFile }"
67
- >
68
- <BtnDownloadAllFiles
69
- v-show="buttons.hasDownloadAll && !audioFile"
70
- @click-trigger="$emit('handle-download-files')"
71
- :dictionary="dictionary"
72
- :ref="`${textId}-download-files`"
73
- />
74
- <BtnScreenShare
75
- v-show="buttons.hasScreenShare && !audioFile"
76
- @handle-screen-share="handleScreenShare"
77
- :dictionary="dictionary"
78
- :ref="`${textId}-screen-share`"
79
- />
80
- <BtnMic
81
- v-show="buttons.hasAudio && !audioFile"
82
- :dictionary="dictionary"
83
- @set-audio="setAudio"
84
- :ref="`${textId}-mic`"
85
- />
86
- <BtnStandardMessages
87
- v-show="formattedMessageSettings.hasStandardMessages && !audioFile"
88
- :dictionary="dictionary"
89
- :ref="`${textId}-standard-messages`"
90
- @toggle-standard-messages="toggleStandardMessages"
91
- />
92
- <BtnFiles
93
- v-show="buttons.hasFiles && !audioFile"
94
- :textId="textId"
95
- :dictionary="dictionary"
96
- :fileSettings="fileSettings"
97
- :cssStyle="cssStyle"
98
- :ref="`${textId}-file`"
99
- :hasButtonFiles="hasButtonFiles"
100
- :externalFiles="externalFiles"
101
- @set-file-vars="setFileVars"
102
- @open-image="openImage"
103
- @open-file-system="openFileSystem"
104
- @reset-file-system="resetFileSystem"
105
- @handle-file-preview="$emit('handle-file-preview')"
106
- @handle-file-click="$emit('handle-file-click')"
107
- />
108
- <BtnExpand
109
- v-show="buttons.hasExpand && !audioFile"
110
- :ref="`${textId}-expand`"
111
- @expand-textarea="$emit('expand-textarea')"
112
- :dictionary="dictionary"
113
- />
114
- </div>
115
- <div class="text-footer-actions" v-if="buttons.hasSendButton">
116
- <span
117
- class="text-footer-actions--btn"
118
- :title="dictionary.title_enviar_msg"
119
- @click="sendMessageHandler"
120
- >
121
- <fa-icon :icon="['fas', 'paper-plane']" />
122
- </span>
123
- </div>
124
- </div>
125
- <transition name="fade">
126
- <StandardMessages
127
- v-if="showStandardMessages"
128
- :class="cssStyle.width ? cssStyle.width : ''"
129
- :dictionary="dictionary"
130
- :backgroundColor="cssStyle.backgroundColor"
131
- :token_cliente="
132
- formattedMessageSettings.token_cliente
133
- ? formattedMessageSettings.token_cliente
134
- : ''
135
- "
136
- :message="message"
137
- :messageType="messageType"
138
- :hasStandardMessages="
139
- formattedMessageSettings.hasStandardMessages && showStandardMessages
140
- "
141
- @close-standard-messages="closeStandardMessages"
142
- @open-blocker-standard-message="openBlockerStandardMessage"
143
- @close-blocker-standard-message="closeBlockerStandardMessage"
144
- @set-message-type="setMessageType"
145
- @set-standard-infos="setStandardInfos"
146
- @add-standard-message="addStandardMessage"
147
- @error-standard-message="$emit('error-standard-message')"
148
- />
149
- </transition>
150
- </div>
151
- </template>
152
-
153
- <script>
154
- import { setResizeListeners, resetTargets } from "../../services/autoResize";
155
- import { mixin as clickaway } from "vue-clickaway";
156
- import { returnMessageWithHexa } from "../../services/textFormatting";
157
-
158
- import BtnEmojis from "./BtnEmojis";
159
- import Loader from "../Loader/Loader";
160
- import RemainingCharacters from "./RemainingCharacters";
161
- import BtnMic from "./BtnMic";
162
- import BtnFiles from "./BtnFiles";
163
- import BtnExpand from "./BtnExpand";
164
- import BtnStandardMessages from "./BtnStandardMessages";
165
- import StandardMessages from "./StandardMessages";
166
- import BtnScreenShare from "./BtnScreenShare";
167
- import BtnDownloadAllFiles from "./BtnDownloadAllFiles";
168
-
169
- export default {
170
- components: {
171
- BtnEmojis,
172
- Loader,
173
- BtnMic,
174
- BtnFiles,
175
- BtnExpand,
176
- RemainingCharacters,
177
- BtnStandardMessages,
178
- StandardMessages,
179
- BtnScreenShare,
180
- BtnDownloadAllFiles,
181
- },
182
- mixins: [clickaway],
183
- props: {
184
- buttons: {
185
- type: Object,
186
- default: () => {
187
- return {
188
- hasEmojis: false,
189
- hasSendButton: false,
190
- hasFiles: false,
191
- hasAudio: false,
192
- hasExpand: false,
193
- hasScreenShare: false,
194
- };
195
- },
196
- required: false,
197
- },
198
- cssStyle: {
199
- type: Object,
200
- default: () => {
201
- return {
202
- height: false,
203
- width: "full",
204
- backgroundColor: "#FFF",
205
- outsideButtons: false,
206
- };
207
- },
208
- required: false,
209
- },
210
- textareaSettings: {
211
- type: Object,
212
- default: () => {
213
- return {
214
- placeholderMessage: "",
215
- maxCharacters: 0,
216
- sendOnEnter: false,
217
- disabled: false,
218
- };
219
- },
220
- required: false,
221
- },
222
- emojiSettings: {
223
- type: Object,
224
- default: () => {
225
- return { openEmojisFrom: "top", smallEmojis: false };
226
- },
227
- required: false,
228
- },
229
- formattedMessageSettings: {
230
- type: Object,
231
- default: () => {
232
- return { hasStandardMessages: false, msgType: 0, token_cliente: "" };
233
- },
234
- required: false,
235
- },
236
- fileSettings: {
237
- type: Object,
238
- default: () => {
239
- return {
240
- docsExtensions: "",
241
- imagesExtensions: "",
242
- multiple: false,
243
- systemButton: false,
244
- max: 3,
245
- handleFilePreview: false,
246
- filePreviewStyle: 1,
247
- stackFiles: false,
248
- handleFileClick: false,
249
- };
250
- },
251
- required: false,
252
- },
253
- textId: {
254
- type: String,
255
- required: true,
256
- },
257
- isMainChat: {
258
- type: Boolean,
259
- default: false,
260
- required: false,
261
- },
262
- isSending: {
263
- type: Boolean,
264
- default: false,
265
- required: false,
266
- },
267
- dictionary: {
268
- type: Object,
269
- required: true,
270
- },
271
- hasButtonFiles: {
272
- type: Boolean,
273
- required: false,
274
- },
275
- externalFiles: {
276
- type: Array,
277
- required: false,
278
- },
279
- },
280
- data() {
281
- return {
282
- message: "",
283
- openFiles: false,
284
- file: [],
285
- hasAnyFile: false,
286
- imagePreview: "",
287
- isDoc: false,
288
- fileFormatError: false,
289
- audioFile: "",
290
- audioSource: "",
291
- showStandardMessages: false,
292
- messageType: 1,
293
- };
294
- },
295
- created() {
296
- this.$root.$refs[`tf-${this.textId}`] = this;
297
- },
298
- mounted() {
299
- setResizeListeners(this.$el, ".js-autoresize", ".js-parentresize");
300
- window.addEventListener("message", this.listenerPostMessage, false);
301
-
302
- // this.$root.$on("drop-file", (file, type) => { if(this.buttons.hasFiles) this.fileUpload(file, type, true) })
303
- // this.$root.$on("toggle-msg-formatada", () => { this.toggleStandardMessages() })
304
- // this.$root.$on("textarea-focus", () => { this.focusTextarea() })
305
- // this.$root.$on("resize-footer-template", () => { this.adjustChatHeight() })
306
- // this.$root.$on("clear-footer-message", () => { this.message = "" })
307
- // if(this.cssStyle.outsideButtons) if(this.$root.$refs.chatCorpo) this.$root.$refs.chatCorpo.setOutsideButtons(this.cssStyle.outsideButtons)
308
- },
309
- methods: {
310
- listenerPostMessage(event) {
311
- const baseURL =
312
- window.location.hostname == "localhost"
313
- ? `https://linux07`
314
- : `https://${window.location.hostname}`;
315
- if (!this.formattedMessageSettings.hasStandardMessages) return;
316
- if (
317
- event.data.gerenciador ||
318
- event.data.abrirFishing ||
319
- event.data.multiplos_contatos ||
320
- event.data.inserir_cliente_omni ||
321
- event.data.multiple_contatos
322
- )
323
- return;
324
- if (event.origin == baseURL) {
325
- if (event.data == "" && this.showStandardMessages) {
326
- this.closeBlockerStandardMessage();
327
- this.toggleStandardMessages();
328
- this.$toasted.global.defaultInfo({
329
- msg: this.dictionary.msg_erro_sem_msg_formatada,
330
- });
331
- } else if (typeof event.data === "string" && this.showStandardMessages) {
332
- this.message = event.data;
333
- this.focusTextarea();
334
- this.closeBlockerStandardMessage();
335
- this.toggleStandardMessages();
336
- }
337
- }
338
- },
339
- closeEmojis() {
340
- try {
341
- this.$root.$refs[`etf-${this.textId}`].showEmojis
342
- ? this.$root.$refs[`etf-${this.textId}`].away()
343
- : "";
344
- } catch (e) {
345
- console.error("Nao foi possivel fechar os emojis");
346
- console.error(e);
347
- }
348
- },
349
- away() {
350
- if (this.$refs[`${this.textId}-file`])
351
- this.$refs[`${this.textId}-file`].openFiles = false;
352
- },
353
- setDefaultMessage(msg) {
354
- this.message = msg;
355
- this.sendFinalMessage();
356
- },
357
- insertEmoji(emoji) {
358
- try {
359
- if (!emoji) return;
360
- const textarea = document.querySelector(`#text-footer-${this.textId}`);
361
- if (document.activeElement === textarea) {
362
- const cursorStart = textarea.selectionStart;
363
- const cursorEnd = textarea.selectionEnd;
364
- if (cursorEnd == textarea.value.length) {
365
- this.message += emoji.finalEmoji;
366
- textarea.setSelectionRange(textarea.value.length, textarea.value.length);
367
- } else {
368
- const initValue = textarea.value.slice(0, cursorStart) + emoji.finalEmoji;
369
- const endValue = textarea.value.slice(cursorEnd);
370
- this.message = initValue + endValue;
371
- textarea.setSelectionRange(initValue.length, initValue.length);
372
- }
373
- } else {
374
- this.message += emoji.finalEmoji;
375
- }
376
- this.sendFinalMessage();
377
- } catch (e) {
378
- console.error("Erro ao inserir emoji");
379
- console.error(e);
380
- }
381
- },
382
- verifyMessage() {
383
- if (this.textareaSettings.maxCharacters && this.message) {
384
- if (this.message.length > this.textareaSettings.maxCharacters) {
385
- if (!document.querySelector(".toasted.toasted-primary.error"))
386
- this.$toasted.global.limiteCaracter();
387
- return false;
388
- }
389
- }
390
-
391
- if ((!this.message || !this.message.trim()) && !this.hasAnyFile && !this.audioFile)
392
- return false;
393
-
394
- if (this.textareaSettings.disabled) return false;
395
-
396
- if (this.fileFormatError && this.hasAnyFile) {
397
- if (!document.querySelector(".toasted.toasted-primary.error"))
398
- this.$toasted.global.defaultError({
399
- msg: this.dictionary.msg_formato_invalido,
400
- });
401
- const str = {
402
- img: this.fileSettings.imagesExtensions.split("|").join(", "),
403
- doc: this.fileSettings.docsExtensions.split("|").join(", "),
404
- };
405
- if (!document.querySelector(".toasted.toasted-primary.info"))
406
- this.$toasted.global.showValidFormats({
407
- msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
408
- });
409
- return false;
410
- }
411
-
412
- return true;
413
- },
414
- removeHTMLElementsFromMessage(message) {
415
- const regexTags = /<\/?[\d\w\s=\-:./'";]+>/gi;
416
- if (message.match(regexTags)) message = message.replace(regexTags, " ");
417
- return message;
418
- },
419
- formatMessage(message) {
420
- if (!message) return "";
421
- message = message.trim();
422
- message = message.replace(/\n$/, "", message);
423
- message = returnMessageWithHexa(message);
424
- message = this.removeHTMLElementsFromMessage(message);
425
- return message;
426
- },
427
- sendFinalMessage() {
428
- const messageAux = this.formatMessage(this.message);
429
- this.$emit("final-message", messageAux);
430
- },
431
- sendMessageHandler(event) {
432
- this.sendMessage(event);
433
- },
434
- sendMessage(event) {
435
- if (this.isSending) return;
436
-
437
- if (this.isMainChat && event) {
438
- if (this.textareaSettings.sendOnEnter) {
439
- if (event.keyCode == 13 && !event.shiftKey) event.preventDefault();
440
- if (event.shiftKey) return;
441
- } else {
442
- if (event.keyCode == 13) {
443
- if (!event.shiftKey) return;
444
- event.preventDefault();
445
- }
446
- }
447
- }
448
-
449
- if (!this.buttons.hasSendButton) return;
450
-
451
- const messageAux = this.formatMessage(this.message);
452
- if (this.verifyMessage()) {
453
- if (messageAux || this.hasAnyFile || this.audioFile) {
454
- this.$emit("send-message", messageAux);
455
- const objMessage = this.returnObjectMessage(messageAux);
456
- this.$emit("obj-message", objMessage);
457
-
458
- if (
459
- this.$refs[`emoji-text-${this.textId}`] &&
460
- this.$refs[`emoji-text-${this.textId}`].showEmojis
461
- )
462
- this.$refs[`emoji-text-${this.textId}`].toggleEmojiSelection();
463
-
464
- this.resetFooterData();
465
- }
466
- }
467
- },
468
- focusTextarea() {
469
- const textarea = document.querySelector(`#text-footer-${this.textId}`);
470
- if (textarea) textarea.focus();
471
- },
472
- resetFooterData() {
473
- if (this.audioFile) this.deleteAudio();
474
- if (this.hasAnyFile) this.$refs[`${this.textId}-file`].deleteFile();
475
- this.message = "";
476
- this.sendFinalMessage();
477
- resetTargets(this.$el, ".js-autoresize", ".js-parentresize", "38px");
478
- this.focusTextarea();
479
- },
480
- returnObjectMessage(message) {
481
- return {
482
- message,
483
- attachment: this.hasAnyFile ? this.file : false,
484
- isDoc: this.isDoc,
485
- imagePreview: this.imagePreview,
486
- isAudio: this.audioFile ? true : false,
487
- audioAttachment: this.audioSource,
488
- };
489
- },
490
- setFileVars(fileObj) {
491
- const { file, imagePreview, isDoc, fileFormatError, hasAnyFile } = fileObj;
492
-
493
- this.file = file;
494
- this.imagePreview = imagePreview ? imagePreview : "";
495
- this.isDoc = isDoc;
496
- this.fileFormatError = fileFormatError;
497
- this.hasAnyFile = hasAnyFile;
498
-
499
- this.$emit("set-file-vars", fileObj);
500
- },
501
- openImage(imagePreview) {
502
- this.$emit("open-image", imagePreview);
503
- },
504
- openFileSystem() {
505
- this.$emit("open-file-system");
506
- },
507
- resetFileSystem() {
508
- this.$emit("reset-file-system");
509
- },
510
- setAudio(audioObj) {
511
- const { audioFile, audioSource } = audioObj;
512
- this.audioFile = audioFile;
513
- this.audioSource = audioSource;
514
- },
515
- deleteAudio() {
516
- this.$refs[`${this.textId}-mic`].deleteMediaRecorder();
517
- this.audioFile = "";
518
- this.audioSource = "";
519
- },
520
- returnFileType(file, stopAlert) {
521
- if (!this.fileSettings.imagesExtensions && !this.fileSettings.docsExtensions)
522
- return false;
523
- const imgRegex = new RegExp("\.(" + this.fileSettings.imagesExtensions + ")", "i");
524
- if (imgRegex.test(file.name)) return "img";
525
-
526
- const docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
527
- if (docRegex.test(file.name)) return "doc";
528
-
529
- if (!stopAlert) return false;
530
- if (!document.querySelector(".toasted.toasted-primary.error"))
531
- this.$toasted.global.defaultError({
532
- msg: this.dictionary.msg_formato_invalido,
533
- });
534
- const str = {
535
- img: this.fileSettings.imagesExtensions.split("|").join(", "),
536
- doc: this.fileSettings.docsExtensions.split("|").join(", "),
537
- };
538
- if (!document.querySelector(".toasted.toasted-primary.info"))
539
- this.$toasted.global.showValidFormats({
540
- msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
541
- });
542
- return false;
543
- },
544
- filesHandler(files) {
545
- if (!Array.isArray(files)) files = Array.from(files);
546
- const fileType = this.returnFileType(files[0], true);
547
- let invalidFile = false;
548
- try {
549
- files.forEach((file) => {
550
- const singleFileType = this.returnFileType(file, true);
551
- if (!singleFileType) {
552
- invalidFile = true;
553
- file.invalid = true;
554
- }
555
- file.imgOrDoc = singleFileType ? singleFileType : "";
556
- });
557
- } catch (e) {
558
- console.error("Erro ao tentar percorrer os arquivos");
559
- console.error(e);
560
- invalidFile = true;
561
- }
562
-
563
- if (!invalidFile) {
564
- this.$refs[`${this.textId}-file`].fileUpload(files, fileType, true);
565
- } else {
566
- if (!document.querySelector(".toasted.toasted-primary.error"))
567
- this.$toasted.global.defaultError({
568
- msg: this.dictionary.msg_formato_invalido,
569
- });
570
- const str = {
571
- img: this.fileSettings.imagesExtensions.split("|").join(", "),
572
- doc: this.fileSettings.docsExtensions.split("|").join(", "),
573
- };
574
- if (!document.querySelector(".toasted.toasted-primary.info"))
575
- this.$toasted.global.showValidFormats({
576
- msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
577
- });
578
- }
579
- },
580
- dropFile(e) {
581
- try {
582
- e.stopPropagation();
583
- e.preventDefault();
584
- if (!this.buttons.hasFiles || this.fileSettings.handleFileClick) return false;
585
- const files = e.dataTransfer.files.length ? e.dataTransfer.files : "";
586
- this.filesHandler(files);
587
- } catch (e) {
588
- console.error("Erro drop file");
589
- console.error(e);
590
- }
591
- },
592
- pasteImage(e) {
593
- try {
594
- if (e.clipboardData.files.length && !this.buttons.hasFiles) {
595
- e.preventDefault();
596
- return;
597
- } else if (e.clipboardData.files.length && this.buttons.hasFiles) {
598
- const files = e.clipboardData.files;
599
- this.filesHandler(files);
600
- }
601
- } catch (e) {
602
- console.error("Nao foi possivel colar a/o imagem/documento");
603
- console.error(e);
604
- }
605
- },
606
- handleScreenShare() {
607
- this.$emit("handle-screen-share");
608
- },
609
- toggleStandardMessages() {
610
- this.showStandardMessages = !this.showStandardMessages;
611
- },
612
- openBlockerStandardMessage() {
613
- this.$emit("open-blocker-standard-message");
614
- },
615
- closeBlockerStandardMessage() {
616
- this.$emit("close-blocker-standard-message");
617
- },
618
- setMessageType(type) {
619
- this.messageType = type;
620
- },
621
- setStandardInfos(infos) {
622
- this.$emit("set-standard-infos", infos);
623
- },
624
- addStandardMessage(message) {
625
- this.message = message;
626
- this.sendFinalMessage();
627
- },
628
- closeStandardMessages() {
629
- this.showStandardMessages = false;
630
- },
631
- },
632
- destroyed() {
633
- // this.$root.$off("drop-file")
634
- // this.$root.$off("toggle-msg-formatada")
635
- // this.$root.$off("textarea-focus")
636
- // this.$root.$off("clear-footer-message")
637
- // this.$root.$off("resize-footer-template")
638
-
639
- window.removeEventListener("message", this.listenerPostMessage);
640
- },
641
- };
642
- </script>
643
-
644
- <style>
645
- .toasted svg {
646
- margin-right: 10px;
647
- }
648
-
649
- .d-none {
650
- display: none;
651
- }
652
-
653
- ul {
654
- list-style-type: none;
655
- }
656
-
657
- .text-footer-container {
658
- display: flex;
659
- justify-content: center;
660
- align-items: center;
661
- flex-direction: column;
662
- width: 100%;
663
- position: relative;
664
- }
665
- .text-footer-container .text-footer {
666
- min-height: 48px;
667
- box-shadow: 0px 3px 7px -2px rgba(0, 0, 0, 0.45);
668
- position: relative;
669
- display: flex;
670
- justify-content: center;
671
- align-items: center;
672
- border: 1px solid #ccc;
673
- padding: 5px 2px 5px 5px;
674
- border-radius: 5px;
675
- }
676
- .text-footer-container .text-footer.full {
677
- width: 100%;
678
- }
679
- .text-footer-container .text-footer.almostFull {
680
- width: 95%;
681
- }
682
- .text-footer-container .text-footer.medium {
683
- width: 75%;
684
- }
685
- .text-footer-container.bigger .text-footer {
686
- height: 80px;
687
- }
688
- .text-footer-container.bigger .text-footer > textarea {
689
- font-size: 14px;
690
- height: 75px;
691
- max-height: 75px;
692
- min-height: 75px;
693
- }
694
- .text-footer-container textarea {
695
- margin: 0 5px;
696
- border: unset;
697
- flex: 1;
698
- resize: none;
699
- min-height: 30px;
700
- max-height: 60px;
701
- font-size: 14px;
702
- font-family: inherit;
703
- background: inherit;
704
- }
705
- .text-footer-container textarea:focus {
706
- outline: unset;
707
- }
708
- .text-footer-container textarea::placeholder {
709
- font-size: 12px;
710
- }
711
- .text-footer-container .text-footer-audio {
712
- flex: 1;
713
- display: flex;
714
- justify-content: center;
715
- align-items: center;
716
- }
717
- .text-footer-container audio {
718
- flex: 1;
719
- outline: unset;
720
- width: auto;
721
- height: 38px;
722
- }
723
- .text-footer-container .delete-audio {
724
- display: flex;
725
- justify-content: center;
726
- align-items: center;
727
- color: #e74c3c;
728
- transition: background 300ms;
729
- border-radius: 50%;
730
- font-size: 16px;
731
- padding: 10px;
732
- cursor: pointer;
733
- margin: 0 5px;
734
- width: 31px;
735
- height: 31px;
736
- }
737
- .text-footer-container .delete-audio:hover {
738
- background-color: rgba(208, 0, 0, 0.2);
739
- }
740
- .text-footer-container .max-characters {
741
- font-size: 9.2px;
742
- z-index: 1;
743
- color: #444;
744
- position: relative;
745
- top: 30px;
746
- left: -30px;
747
- }
748
- .text-footer-container .max-characters.no-width {
749
- width: 0;
750
- }
751
- .text-footer-container .text-footer-actions {
752
- display: flex;
753
- }
754
- .text-footer-container .text-footer-actions.outside-buttons {
755
- display: flex;
756
- align-items: center;
757
- justify-content: flex-end;
758
- position: absolute;
759
- top: -30px;
760
- right: 35px;
761
- background-color: #fafafa;
762
- }
763
- .text-footer-container .text-footer-actions .text-footer-actions--btn {
764
- display: flex;
765
- justify-content: center;
766
- align-items: center;
767
- color: #777;
768
- border-radius: 50%;
769
- transition: background 300ms;
770
- padding: 10px;
771
- font-size: 16px;
772
- width: 36px;
773
- height: 36px;
774
- cursor: pointer;
775
- margin-right: 2.5px;
776
- }
777
- .text-footer-container .text-footer-actions .text-footer-actions--btn:last-child {
778
- margin-right: unset;
779
- }
780
- .text-footer-container .text-footer-actions .text-footer-actions--btn:hover {
781
- background-color: rgba(0, 0, 0, 0.1);
782
- }
783
- .text-footer-container .text-footer-actions .text-footer-actions--btn.files-activated {
784
- background-color: rgba(0, 0, 0, 0.1);
785
- }
786
- .text-footer-container .text-footer-actions .text-footer-actions--btn.audio-activated {
787
- background-color: rgba(208, 0, 0, 0.7);
788
- color: #fff;
789
- }
790
- .text-footer-container .text-footer-actions .text-footer-actions--btn.left-button {
791
- position: absolute;
792
- left: 0;
793
- }
794
- .text-footer-container .text-footer-hsm-container {
795
- margin: 12px 0 7px 0;
796
- }
797
- .text-footer-container .text-footer-hsm-container.full {
798
- width: 100%;
799
- }
800
- .text-footer-container .text-footer-hsm-container.almostFull {
801
- width: 95%;
802
- }
803
- .text-footer-container .text-footer-hsm-container.medium {
804
- width: 75%;
805
- }
806
- .text-footer-container .text-footer-hsm-container .text-footer-v-select {
807
- border-radius: 5px;
808
- margin-bottom: 5px;
809
- }
810
- .text-footer-container .text-footer-hsm-container .text-footer-select-03 {
811
- display: flex;
812
- align-items: center;
813
- flex: 1;
814
- width: 100%;
815
- }
816
- .text-footer-container
817
- .text-footer-hsm-container
818
- .text-footer-select-03
819
- .text-footer-v-select {
820
- flex: 1;
821
- }
822
- .text-footer-container
823
- .text-footer-hsm-container
824
- .text-footer-select-03
825
- .text-footer--btn-select-03 {
826
- transition-duration: 300ms;
827
- user-select: none;
828
- cursor: pointer;
829
- box-shadow: inset 0 -3px rgba(0, 0, 0, 0.2);
830
- opacity: 0.9;
831
- border-radius: 2.5px;
832
- display: flex;
833
- justify-content: center;
834
- align-items: center;
835
- margin-left: 5px;
836
- margin-bottom: 5px;
837
- background-color: #f7fe72;
838
- width: 32px;
839
- height: 32px;
840
- }
841
- .text-footer-container
842
- .text-footer-hsm-container
843
- .text-footer-select-03
844
- .text-footer--btn-select-03:hover {
845
- opacity: 1;
846
- }
847
- .text-footer-container
848
- .text-footer-hsm-container
849
- .text-footer-select-03
850
- .text-footer--btn-select-03:active {
851
- opacity: 1;
852
- box-shadow: inset 0 -1px rgba(0, 0, 0, 0.2);
853
- -webkit-transform: translateY(1px);
854
- -moz-transform: translateY(1px);
855
- -o-transform: translateY(1px);
856
- -ms-transform: translateY(1px);
857
- transform: translateY(1px);
858
- }
859
- .text-footer-container
860
- .text-footer-hsm-container
861
- .text-footer-select-03
862
- .text-footer--btn-select-03
863
- svg {
864
- font-size: 16px;
865
- }
866
- .text-footer-container .text-footer-files-container {
867
- position: absolute;
868
- right: 0;
869
- top: -55px;
870
- padding: 5px;
871
- background-color: rgba(0, 0, 0, 0.4);
872
- border-radius: 5px;
873
- display: flex;
874
- align-items: center;
875
- justify-content: space-between;
876
- z-index: 1;
877
- }
878
- .text-footer-container .text-footer-files-container.horizontal {
879
- right: -55px;
880
- flex-direction: column;
881
- }
882
- .text-footer-container .text-footer-files-container .files-btn {
883
- transition-duration: 300ms;
884
- transition-property: opacity;
885
- opacity: 0.8;
886
- cursor: pointer;
887
- display: flex;
888
- justify-content: center;
889
- align-items: center;
890
- border-radius: 10px;
891
- padding: 3px;
892
- width: 40px;
893
- height: 40px;
894
- font-size: 16px;
895
- color: #fff;
896
- }
897
- .text-footer-container .text-footer-files-container .files-btn:hover {
898
- opacity: 1;
899
- }
900
- .text-footer-container .text-footer-files-container .files-btn svg {
901
- color: #fff;
902
- }
903
- .text-footer-container .text-footer-files-container .files-btn.images {
904
- background-color: #9575cd;
905
- margin-right: 5px;
906
- }
907
- .text-footer-container .text-footer-files-container .files-btn.images.margin-bottom {
908
- margin-right: unset;
909
- margin-bottom: 5px;
910
- }
911
- .text-footer-container .text-footer-files-container .files-btn.docs {
912
- background-color: #7986cb;
913
- }
914
- .text-footer-container .text-footer-files-container .files-btn.system {
915
- background-color: #49a349;
916
- margin-left: 5px;
917
- }
918
- .text-footer-container .text-footer-files-container .files-btn.both {
919
- font-size: 15.2px;
920
- background-color: rgb(85, 85, 236);
921
- flex-direction: column;
922
- }
923
- .text-footer-container .text-footer-files-container .files-btn.both svg:nth-child(1) {
924
- transform: translateX(5px);
925
- }
926
- .text-footer-container .text-footer-files-container .files-btn.both svg:nth-child(2) {
927
- transform: translateX(-5px);
928
- }
929
-
930
- .text-footer-container .text-footer-preview-container {
931
- width: 100%;
932
- cursor: default;
933
- position: absolute;
934
- left: 0;
935
- background-color: #f1f1f1;
936
- border: 2px solid #ccc;
937
- border-bottom: unset;
938
- border-top-left-radius: 2.5px;
939
- border-top-right-radius: 2.5px;
940
- }
941
- .text-footer-container .text-footer-preview-container.isDoc {
942
- top: -50px;
943
- width: 100%;
944
- height: 45px;
945
- }
946
- .text-footer-container .text-footer-preview-container.isImg,
947
- .text-footer-container .text-footer-preview-container.isMultiple {
948
- top: -205px;
949
- width: 100%;
950
- height: 200px;
951
- }
952
- .text-footer-container .text-footer-preview-container.isImg .text-footer-image-preview {
953
- height: 170px;
954
- }
955
- .text-footer-container .text-footer-preview-container.isError {
956
- top: -80px;
957
- width: 100%;
958
- height: 75px;
959
- }
960
-
961
- .text-footer-container .text-footer-alt {
962
- margin-top: -12px;
963
- width: 100%;
964
- padding: 0 10px;
965
- }
966
- .text-footer-container .text-footer-alt .text-footer-out-session {
967
- margin-top: 12px;
968
- }
969
- .text-footer-container .text-footer-alt .text-footer-sem-24h {
970
- font-size: 12.8px;
971
- text-align: right;
972
- font-weight: 600;
973
- letter-spacing: -0.5px;
974
- color: #dd7f0c;
975
- margin-top: 5px;
976
- position: absolute;
977
- right: 0;
978
- }
979
- .text-footer-container .text-footer-alt .sem-templates {
980
- margin-top: 10px;
981
- font-size: 12.8px;
982
- text-align: right;
983
- font-weight: 600;
984
- letter-spacing: -0.5px;
985
- color: #921e12;
986
- }
987
- .text-footer-container .text-footer-alt .text-footer-templates {
988
- position: relative;
989
- width: 100%;
990
- }
991
- .text-footer-container
992
- .text-footer-alt
993
- .text-footer-templates
994
- .text-footer-group-selection {
995
- width: 100%;
996
- display: flex;
997
- align-items: center;
998
- }
999
- .text-footer-container
1000
- .text-footer-alt
1001
- .text-footer-templates
1002
- .text-footer-group-selection
1003
- h4 {
1004
- margin-right: 5px;
1005
- }
1006
- .text-footer-container
1007
- .text-footer-alt
1008
- .text-footer-templates
1009
- .text-footer-group-selection
1010
- .sm__select {
1011
- flex: 1;
1012
- }
1013
-
1014
- .vs__dropdown-menu {
1015
- font-size: 13.6px !important;
1016
- }
1017
-
1018
- .emoji-mart-anchor,
1019
- .emoji-mart-emoji span {
1020
- cursor: pointer !important;
1021
- }
1022
-
1023
- .emoji-mart {
1024
- z-index: 2 !important;
1025
- }
1026
-
1027
- .emoji-mart-scroll {
1028
- overflow-x: hidden;
1029
- }
1030
- </style>
1
+ <template>
2
+ <div
3
+ class="text-footer-container"
4
+ :class="{ bigger: cssStyle.height }"
5
+ v-on-clickaway="away"
6
+ v-if="textId"
7
+ @drop.stop="dropFile"
8
+ @dragenter.prevent
9
+ @dragover.prevent
10
+ >
11
+ <div
12
+ class="text-footer"
13
+ :class="cssStyle.width ? cssStyle.width : ''"
14
+ :style="`background-color: ${cssStyle.backgroundColor}`"
15
+ >
16
+ <BtnEmojis
17
+ v-show="buttons.hasEmojis && !audioFile"
18
+ :ref="`${this.textId}`"
19
+ :emojiId="`${this.textId}`"
20
+ :down="emojiSettings.openEmojisFrom == 'top' ? false : true"
21
+ :small="emojiSettings.smallEmojis"
22
+ :biggerTextarea="cssStyle.height ? true : false"
23
+ @insert-emoji="insertEmoji"
24
+ />
25
+ <transition name="fade">
26
+ <Loader v-if="isSending" />
27
+ </transition>
28
+ <textarea
29
+ class="js-autoresize"
30
+ v-if="!audioFile"
31
+ v-model="message"
32
+ :id="`text-footer-${this.textId}`"
33
+ :disabled="textareaSettings.disabled"
34
+ :placeholder="textareaSettings.placeholderMessage"
35
+ @input="sendFinalMessage"
36
+ @keydown.up="toggleStandardMessages"
37
+ @keydown.down="toggleStandardMessages"
38
+ @keydown.esc="closeEmojis"
39
+ @keydown.enter="sendMessageHandler"
40
+ @paste="pasteImage"
41
+ ></textarea>
42
+ <div class="text-footer-audio" v-else>
43
+ <div>
44
+ <audio :src="audioSource" controls="controls"></audio>
45
+ </div>
46
+
47
+ <span class="delete-audio" title="Cancelar" @click="deleteAudio">
48
+ <fa-icon :icon="['fas', 'times']" />
49
+ </span>
50
+ </div>
51
+ <RemainingCharacters
52
+ :class="{ 'd-none': audioFile }"
53
+ :message="message"
54
+ :maxCharacters="textareaSettings.maxCharacters"
55
+ />
56
+ <div
57
+ v-if="
58
+ buttons.hasFiles ||
59
+ buttons.hasAudio ||
60
+ buttons.hasExpand ||
61
+ formattedMessageSettings.hasStandardMessages ||
62
+ buttons.hasScreenShare ||
63
+ buttons.hasDownloadAll
64
+ "
65
+ class="text-footer-actions"
66
+ :class="{ 'outside-buttons': cssStyle.outsideButtons && !audioFile }"
67
+ >
68
+ <BtnDownloadAllFiles
69
+ v-show="buttons.hasDownloadAll && !audioFile"
70
+ @click-trigger="$emit('handle-download-files')"
71
+ :dictionary="dictionary"
72
+ :ref="`${textId}-download-files`"
73
+ />
74
+ <BtnScreenShare
75
+ v-show="buttons.hasScreenShare && !audioFile"
76
+ @handle-screen-share="handleScreenShare"
77
+ :dictionary="dictionary"
78
+ :ref="`${textId}-screen-share`"
79
+ />
80
+ <BtnMic
81
+ v-show="buttons.hasAudio && !audioFile"
82
+ :dictionary="dictionary"
83
+ @set-audio="setAudio"
84
+ :ref="`${textId}-mic`"
85
+ />
86
+ <BtnStandardMessages
87
+ v-show="formattedMessageSettings.hasStandardMessages && !audioFile"
88
+ :dictionary="dictionary"
89
+ :ref="`${textId}-standard-messages`"
90
+ @toggle-standard-messages="toggleStandardMessages"
91
+ />
92
+ <BtnFiles
93
+ v-show="buttons.hasFiles && !audioFile"
94
+ :textId="textId"
95
+ :dictionary="dictionary"
96
+ :fileSettings="fileSettings"
97
+ :cssStyle="cssStyle"
98
+ :ref="`${textId}-file`"
99
+ :hasButtonFiles="hasButtonFiles"
100
+ :externalFiles="externalFiles"
101
+ @set-file-vars="setFileVars"
102
+ @open-image="openImage"
103
+ @open-file-system="openFileSystem"
104
+ @reset-file-system="resetFileSystem"
105
+ @handle-file-preview="$emit('handle-file-preview')"
106
+ @handle-file-click="$emit('handle-file-click')"
107
+ />
108
+ <BtnExpand
109
+ v-show="buttons.hasExpand && !audioFile"
110
+ :ref="`${textId}-expand`"
111
+ @expand-textarea="$emit('expand-textarea')"
112
+ :dictionary="dictionary"
113
+ />
114
+ </div>
115
+ <div class="text-footer-actions" v-if="buttons.hasSendButton">
116
+ <span
117
+ class="text-footer-actions--btn"
118
+ :title="dictionary.title_enviar_msg"
119
+ @click="sendMessageHandler"
120
+ >
121
+ <fa-icon :icon="['fas', 'paper-plane']" />
122
+ </span>
123
+ </div>
124
+ </div>
125
+ <transition name="fade">
126
+ <StandardMessages
127
+ v-if="showStandardMessages"
128
+ :class="cssStyle.width ? cssStyle.width : ''"
129
+ :dictionary="dictionary"
130
+ :backgroundColor="cssStyle.backgroundColor"
131
+ :token_cliente="
132
+ formattedMessageSettings.token_cliente
133
+ ? formattedMessageSettings.token_cliente
134
+ : ''
135
+ "
136
+ :message="message"
137
+ :messageType="messageType"
138
+ :hasStandardMessages="
139
+ formattedMessageSettings.hasStandardMessages && showStandardMessages
140
+ "
141
+ @close-standard-messages="closeStandardMessages"
142
+ @open-blocker-standard-message="openBlockerStandardMessage"
143
+ @close-blocker-standard-message="closeBlockerStandardMessage"
144
+ @set-message-type="setMessageType"
145
+ @set-standard-infos="setStandardInfos"
146
+ @add-standard-message="addStandardMessage"
147
+ @error-standard-message="$emit('error-standard-message')"
148
+ />
149
+ </transition>
150
+ </div>
151
+ </template>
152
+
153
+ <script>
154
+ import { setResizeListeners, resetTargets } from "../../services/autoResize";
155
+ import { mixin as clickaway } from "vue-clickaway";
156
+ import { returnMessageWithHexa } from "../../services/textFormatting";
157
+
158
+ import BtnEmojis from "./BtnEmojis";
159
+ import Loader from "../Loader/Loader";
160
+ import RemainingCharacters from "./RemainingCharacters";
161
+ import BtnMic from "./BtnMic";
162
+ import BtnFiles from "./BtnFiles";
163
+ import BtnExpand from "./BtnExpand";
164
+ import BtnStandardMessages from "./BtnStandardMessages";
165
+ import StandardMessages from "./StandardMessages";
166
+ import BtnScreenShare from "./BtnScreenShare";
167
+ import BtnDownloadAllFiles from "./BtnDownloadAllFiles";
168
+
169
+ export default {
170
+ components: {
171
+ BtnEmojis,
172
+ Loader,
173
+ BtnMic,
174
+ BtnFiles,
175
+ BtnExpand,
176
+ RemainingCharacters,
177
+ BtnStandardMessages,
178
+ StandardMessages,
179
+ BtnScreenShare,
180
+ BtnDownloadAllFiles,
181
+ },
182
+ mixins: [clickaway],
183
+ props: {
184
+ buttons: {
185
+ type: Object,
186
+ default: () => {
187
+ return {
188
+ hasEmojis: false,
189
+ hasSendButton: false,
190
+ hasFiles: false,
191
+ hasAudio: false,
192
+ hasExpand: false,
193
+ hasScreenShare: false,
194
+ };
195
+ },
196
+ required: false,
197
+ },
198
+ cssStyle: {
199
+ type: Object,
200
+ default: () => {
201
+ return {
202
+ height: false,
203
+ width: "full",
204
+ backgroundColor: "#FFF",
205
+ outsideButtons: false,
206
+ };
207
+ },
208
+ required: false,
209
+ },
210
+ textareaSettings: {
211
+ type: Object,
212
+ default: () => {
213
+ return {
214
+ placeholderMessage: "",
215
+ maxCharacters: 0,
216
+ sendOnEnter: false,
217
+ disabled: false,
218
+ };
219
+ },
220
+ required: false,
221
+ },
222
+ emojiSettings: {
223
+ type: Object,
224
+ default: () => {
225
+ return { openEmojisFrom: "top", smallEmojis: false };
226
+ },
227
+ required: false,
228
+ },
229
+ formattedMessageSettings: {
230
+ type: Object,
231
+ default: () => {
232
+ return { hasStandardMessages: false, msgType: 0, token_cliente: "" };
233
+ },
234
+ required: false,
235
+ },
236
+ fileSettings: {
237
+ type: Object,
238
+ default: () => {
239
+ return {
240
+ docsExtensions: "",
241
+ imagesExtensions: "",
242
+ multiple: false,
243
+ systemButton: false,
244
+ max: 3,
245
+ handleFilePreview: false,
246
+ filePreviewStyle: 1,
247
+ stackFiles: false,
248
+ handleFileClick: false,
249
+ };
250
+ },
251
+ required: false,
252
+ },
253
+ textId: {
254
+ type: String,
255
+ required: true,
256
+ },
257
+ isMainChat: {
258
+ type: Boolean,
259
+ default: false,
260
+ required: false,
261
+ },
262
+ isSending: {
263
+ type: Boolean,
264
+ default: false,
265
+ required: false,
266
+ },
267
+ dictionary: {
268
+ type: Object,
269
+ required: true,
270
+ },
271
+ hasButtonFiles: {
272
+ type: Boolean,
273
+ required: false,
274
+ },
275
+ externalFiles: {
276
+ type: Array,
277
+ required: false,
278
+ },
279
+ },
280
+ data() {
281
+ return {
282
+ message: "",
283
+ openFiles: false,
284
+ file: [],
285
+ hasAnyFile: false,
286
+ imagePreview: "",
287
+ isDoc: false,
288
+ fileFormatError: false,
289
+ audioFile: "",
290
+ audioSource: "",
291
+ showStandardMessages: false,
292
+ messageType: 1,
293
+ };
294
+ },
295
+ created() {
296
+ this.$root.$refs[`tf-${this.textId}`] = this;
297
+ },
298
+ mounted() {
299
+ setResizeListeners(this.$el, ".js-autoresize", ".js-parentresize");
300
+ window.addEventListener("message", this.listenerPostMessage, false);
301
+
302
+ // this.$root.$on("drop-file", (file, type) => { if(this.buttons.hasFiles) this.fileUpload(file, type, true) })
303
+ // this.$root.$on("toggle-msg-formatada", () => { this.toggleStandardMessages() })
304
+ // this.$root.$on("textarea-focus", () => { this.focusTextarea() })
305
+ // this.$root.$on("resize-footer-template", () => { this.adjustChatHeight() })
306
+ // this.$root.$on("clear-footer-message", () => { this.message = "" })
307
+ // if(this.cssStyle.outsideButtons) if(this.$root.$refs.chatCorpo) this.$root.$refs.chatCorpo.setOutsideButtons(this.cssStyle.outsideButtons)
308
+ },
309
+ methods: {
310
+ listenerPostMessage(event) {
311
+ const baseURL =
312
+ window.location.hostname == "localhost"
313
+ ? `https://linux07`
314
+ : `https://${window.location.hostname}`;
315
+ if (!this.formattedMessageSettings.hasStandardMessages) return;
316
+ if (
317
+ event.data.gerenciador ||
318
+ event.data.abrirFishing ||
319
+ event.data.multiplos_contatos ||
320
+ event.data.inserir_cliente_omni ||
321
+ event.data.multiple_contatos
322
+ )
323
+ return;
324
+ if (event.origin == baseURL) {
325
+ if (event.data == "" && this.showStandardMessages) {
326
+ this.closeBlockerStandardMessage();
327
+ this.toggleStandardMessages();
328
+ this.$toasted.global.defaultInfo({
329
+ msg: this.dictionary.msg_erro_sem_msg_formatada,
330
+ });
331
+ } else if (typeof event.data === "string" && this.showStandardMessages) {
332
+ this.message = event.data;
333
+ this.focusTextarea();
334
+ this.closeBlockerStandardMessage();
335
+ this.toggleStandardMessages();
336
+ }
337
+ }
338
+ },
339
+ closeEmojis() {
340
+ try {
341
+ this.$root.$refs[`etf-${this.textId}`].showEmojis
342
+ ? this.$root.$refs[`etf-${this.textId}`].away()
343
+ : "";
344
+ } catch (e) {
345
+ console.error("Nao foi possivel fechar os emojis");
346
+ console.error(e);
347
+ }
348
+ },
349
+ away() {
350
+ if (this.$refs[`${this.textId}-file`])
351
+ this.$refs[`${this.textId}-file`].openFiles = false;
352
+ },
353
+ setDefaultMessage(msg) {
354
+ this.message = msg;
355
+ this.sendFinalMessage();
356
+ },
357
+ insertEmoji(emoji) {
358
+ try {
359
+ if (!emoji) return;
360
+ const textarea = document.querySelector(`#text-footer-${this.textId}`);
361
+ if (document.activeElement === textarea) {
362
+ const cursorStart = textarea.selectionStart;
363
+ const cursorEnd = textarea.selectionEnd;
364
+ if (cursorEnd == textarea.value.length) {
365
+ this.message += emoji.finalEmoji;
366
+ textarea.setSelectionRange(textarea.value.length, textarea.value.length);
367
+ } else {
368
+ const initValue = textarea.value.slice(0, cursorStart) + emoji.finalEmoji;
369
+ const endValue = textarea.value.slice(cursorEnd);
370
+ this.message = initValue + endValue;
371
+ textarea.setSelectionRange(initValue.length, initValue.length);
372
+ }
373
+ } else {
374
+ this.message += emoji.finalEmoji;
375
+ }
376
+ this.sendFinalMessage();
377
+ } catch (e) {
378
+ console.error("Erro ao inserir emoji");
379
+ console.error(e);
380
+ }
381
+ },
382
+ verifyMessage() {
383
+ if (this.textareaSettings.maxCharacters && this.message) {
384
+ if (this.message.length > this.textareaSettings.maxCharacters) {
385
+ if (!document.querySelector(".toasted.toasted-primary.error"))
386
+ this.$toasted.global.limiteCaracter();
387
+ return false;
388
+ }
389
+ }
390
+
391
+ if ((!this.message || !this.message.trim()) && !this.hasAnyFile && !this.audioFile)
392
+ return false;
393
+
394
+ if (this.textareaSettings.disabled) return false;
395
+
396
+ if (this.fileFormatError && this.hasAnyFile) {
397
+ if (!document.querySelector(".toasted.toasted-primary.error"))
398
+ this.$toasted.global.defaultError({
399
+ msg: this.dictionary.msg_formato_invalido,
400
+ });
401
+ const str = {
402
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
403
+ doc: this.fileSettings.docsExtensions.split("|").join(", "),
404
+ };
405
+ if (!document.querySelector(".toasted.toasted-primary.info"))
406
+ this.$toasted.global.showValidFormats({
407
+ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
408
+ });
409
+ return false;
410
+ }
411
+
412
+ return true;
413
+ },
414
+ removeHTMLElementsFromMessage(message) {
415
+ const regexTags = /<\/?[\d\w\s=\-:./'";]+>/gi;
416
+ if (message.match(regexTags)) message = message.replace(regexTags, " ");
417
+ return message;
418
+ },
419
+ formatMessage(message) {
420
+ if (!message) return "";
421
+ message = message.trim();
422
+ message = message.replace(/\n$/, "", message);
423
+ message = returnMessageWithHexa(message);
424
+ message = this.removeHTMLElementsFromMessage(message);
425
+ return message;
426
+ },
427
+ sendFinalMessage() {
428
+ const messageAux = this.formatMessage(this.message);
429
+ this.$emit("final-message", messageAux);
430
+ },
431
+ sendMessageHandler(event) {
432
+ this.sendMessage(event);
433
+ },
434
+ sendMessage(event) {
435
+ if (this.isSending) return;
436
+
437
+ if (this.isMainChat && event) {
438
+ if (this.textareaSettings.sendOnEnter) {
439
+ if (event.keyCode == 13 && !event.shiftKey) event.preventDefault();
440
+ if (event.shiftKey) return;
441
+ } else {
442
+ if (event.keyCode == 13) {
443
+ if (!event.shiftKey) return;
444
+ event.preventDefault();
445
+ }
446
+ }
447
+ }
448
+
449
+ if (!this.buttons.hasSendButton) return;
450
+
451
+ const messageAux = this.formatMessage(this.message);
452
+ if (this.verifyMessage()) {
453
+ if (messageAux || this.hasAnyFile || this.audioFile) {
454
+ this.$emit("send-message", messageAux);
455
+ const objMessage = this.returnObjectMessage(messageAux);
456
+ this.$emit("obj-message", objMessage);
457
+
458
+ if (
459
+ this.$refs[`emoji-text-${this.textId}`] &&
460
+ this.$refs[`emoji-text-${this.textId}`].showEmojis
461
+ )
462
+ this.$refs[`emoji-text-${this.textId}`].toggleEmojiSelection();
463
+
464
+ this.resetFooterData();
465
+ }
466
+ }
467
+ },
468
+ focusTextarea() {
469
+ const textarea = document.querySelector(`#text-footer-${this.textId}`);
470
+ if (textarea) textarea.focus();
471
+ },
472
+ resetFooterData() {
473
+ if (this.audioFile) this.deleteAudio();
474
+ if (this.hasAnyFile) this.$refs[`${this.textId}-file`].deleteFile();
475
+ this.message = "";
476
+ this.sendFinalMessage();
477
+ resetTargets(this.$el, ".js-autoresize", ".js-parentresize", "38px");
478
+ this.focusTextarea();
479
+ },
480
+ returnObjectMessage(message) {
481
+ return {
482
+ message,
483
+ attachment: this.hasAnyFile ? this.file : false,
484
+ isDoc: this.isDoc,
485
+ imagePreview: this.imagePreview,
486
+ isAudio: this.audioFile ? true : false,
487
+ audioAttachment: this.audioSource,
488
+ };
489
+ },
490
+ setFileVars(fileObj) {
491
+ const { file, imagePreview, isDoc, fileFormatError, hasAnyFile } = fileObj;
492
+
493
+ this.file = file;
494
+ this.imagePreview = imagePreview ? imagePreview : "";
495
+ this.isDoc = isDoc;
496
+ this.fileFormatError = fileFormatError;
497
+ this.hasAnyFile = hasAnyFile;
498
+
499
+ this.$emit("set-file-vars", fileObj);
500
+ },
501
+ openImage(imagePreview) {
502
+ this.$emit("open-image", imagePreview);
503
+ },
504
+ openFileSystem() {
505
+ this.$emit("open-file-system");
506
+ },
507
+ resetFileSystem() {
508
+ this.$emit("reset-file-system");
509
+ },
510
+ setAudio(audioObj) {
511
+ const { audioFile, audioSource } = audioObj;
512
+ this.audioFile = audioFile;
513
+ this.audioSource = audioSource;
514
+ },
515
+ deleteAudio() {
516
+ this.$refs[`${this.textId}-mic`].deleteMediaRecorder();
517
+ this.audioFile = "";
518
+ this.audioSource = "";
519
+ },
520
+ returnFileType(file, stopAlert) {
521
+ if (!this.fileSettings.imagesExtensions && !this.fileSettings.docsExtensions)
522
+ return false;
523
+ const imgRegex = new RegExp("\.(" + this.fileSettings.imagesExtensions + ")", "i");
524
+ if (imgRegex.test(file.name)) return "img";
525
+
526
+ const docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
527
+ if (docRegex.test(file.name)) return "doc";
528
+
529
+ if (!stopAlert) return false;
530
+ if (!document.querySelector(".toasted.toasted-primary.error"))
531
+ this.$toasted.global.defaultError({
532
+ msg: this.dictionary.msg_formato_invalido,
533
+ });
534
+ const str = {
535
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
536
+ doc: this.fileSettings.docsExtensions.split("|").join(", "),
537
+ };
538
+ if (!document.querySelector(".toasted.toasted-primary.info"))
539
+ this.$toasted.global.showValidFormats({
540
+ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
541
+ });
542
+ return false;
543
+ },
544
+ filesHandler(files) {
545
+ if (!Array.isArray(files)) files = Array.from(files);
546
+ const fileType = this.returnFileType(files[0], true);
547
+ let invalidFile = false;
548
+ try {
549
+ files.forEach((file) => {
550
+ const singleFileType = this.returnFileType(file, true);
551
+ if (!singleFileType) {
552
+ invalidFile = true;
553
+ file.invalid = true;
554
+ }
555
+ file.imgOrDoc = singleFileType ? singleFileType : "";
556
+ });
557
+ } catch (e) {
558
+ console.error("Erro ao tentar percorrer os arquivos");
559
+ console.error(e);
560
+ invalidFile = true;
561
+ }
562
+
563
+ if (!invalidFile) {
564
+ this.$refs[`${this.textId}-file`].fileUpload(files, fileType, true);
565
+ } else {
566
+ if (!document.querySelector(".toasted.toasted-primary.error"))
567
+ this.$toasted.global.defaultError({
568
+ msg: this.dictionary.msg_formato_invalido,
569
+ });
570
+ const str = {
571
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
572
+ doc: this.fileSettings.docsExtensions.split("|").join(", "),
573
+ };
574
+ if (!document.querySelector(".toasted.toasted-primary.info"))
575
+ this.$toasted.global.showValidFormats({
576
+ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
577
+ });
578
+ }
579
+ },
580
+ dropFile(e) {
581
+ try {
582
+ e.stopPropagation();
583
+ e.preventDefault();
584
+ if (!this.buttons.hasFiles || this.fileSettings.handleFileClick) return false;
585
+ const files = e.dataTransfer.files.length ? e.dataTransfer.files : "";
586
+ this.filesHandler(files);
587
+ } catch (e) {
588
+ console.error("Erro drop file");
589
+ console.error(e);
590
+ }
591
+ },
592
+ pasteImage(e) {
593
+ try {
594
+ if (e.clipboardData.files.length && !this.buttons.hasFiles) {
595
+ e.preventDefault();
596
+ return;
597
+ } else if (e.clipboardData.files.length && this.buttons.hasFiles) {
598
+ const files = e.clipboardData.files;
599
+ this.filesHandler(files);
600
+ }
601
+ } catch (e) {
602
+ console.error("Nao foi possivel colar a/o imagem/documento");
603
+ console.error(e);
604
+ }
605
+ },
606
+ handleScreenShare() {
607
+ this.$emit("handle-screen-share");
608
+ },
609
+ toggleStandardMessages() {
610
+ this.showStandardMessages = !this.showStandardMessages;
611
+ },
612
+ openBlockerStandardMessage() {
613
+ this.$emit("open-blocker-standard-message");
614
+ },
615
+ closeBlockerStandardMessage() {
616
+ this.$emit("close-blocker-standard-message");
617
+ },
618
+ setMessageType(type) {
619
+ this.messageType = type;
620
+ },
621
+ setStandardInfos(infos) {
622
+ this.$emit("set-standard-infos", infos);
623
+ },
624
+ addStandardMessage(message) {
625
+ this.message = message;
626
+ this.sendFinalMessage();
627
+ },
628
+ closeStandardMessages() {
629
+ this.showStandardMessages = false;
630
+ },
631
+ },
632
+ destroyed() {
633
+ // this.$root.$off("drop-file")
634
+ // this.$root.$off("toggle-msg-formatada")
635
+ // this.$root.$off("textarea-focus")
636
+ // this.$root.$off("clear-footer-message")
637
+ // this.$root.$off("resize-footer-template")
638
+
639
+ window.removeEventListener("message", this.listenerPostMessage);
640
+ },
641
+ };
642
+ </script>
643
+
644
+ <style>
645
+ .toasted svg {
646
+ margin-right: 10px;
647
+ }
648
+
649
+ .d-none {
650
+ display: none;
651
+ }
652
+
653
+ ul {
654
+ list-style-type: none;
655
+ }
656
+
657
+ .text-footer-container {
658
+ display: flex;
659
+ justify-content: center;
660
+ align-items: center;
661
+ flex-direction: column;
662
+ width: 100%;
663
+ position: relative;
664
+ }
665
+ .text-footer-container .text-footer {
666
+ min-height: 48px;
667
+ box-shadow: 0px 3px 7px -2px rgba(0, 0, 0, 0.45);
668
+ position: relative;
669
+ display: flex;
670
+ justify-content: center;
671
+ align-items: center;
672
+ border: 1px solid #ccc;
673
+ padding: 5px 2px 5px 5px;
674
+ border-radius: 5px;
675
+ }
676
+ .text-footer-container .text-footer.full {
677
+ width: 100%;
678
+ }
679
+ .text-footer-container .text-footer.almostFull {
680
+ width: 95%;
681
+ }
682
+ .text-footer-container .text-footer.medium {
683
+ width: 75%;
684
+ }
685
+ .text-footer-container.bigger .text-footer {
686
+ height: 80px;
687
+ }
688
+ .text-footer-container.bigger .text-footer > textarea {
689
+ font-size: 14px;
690
+ height: 75px;
691
+ max-height: 75px;
692
+ min-height: 75px;
693
+ }
694
+ .text-footer-container textarea {
695
+ margin: 0 5px;
696
+ border: unset;
697
+ flex: 1;
698
+ resize: none;
699
+ min-height: 30px;
700
+ max-height: 60px;
701
+ font-size: 14px;
702
+ font-family: inherit;
703
+ background: inherit;
704
+ }
705
+ .text-footer-container textarea:focus {
706
+ outline: unset;
707
+ }
708
+ .text-footer-container textarea::placeholder {
709
+ font-size: 12px;
710
+ }
711
+ .text-footer-container .text-footer-audio {
712
+ flex: 1;
713
+ display: flex;
714
+ justify-content: center;
715
+ align-items: center;
716
+ }
717
+ .text-footer-container audio {
718
+ flex: 1;
719
+ outline: unset;
720
+ width: auto;
721
+ height: 38px;
722
+ }
723
+ .text-footer-container .delete-audio {
724
+ display: flex;
725
+ justify-content: center;
726
+ align-items: center;
727
+ color: #e74c3c;
728
+ transition: background 300ms;
729
+ border-radius: 50%;
730
+ font-size: 16px;
731
+ padding: 10px;
732
+ cursor: pointer;
733
+ margin: 0 5px;
734
+ width: 31px;
735
+ height: 31px;
736
+ }
737
+ .text-footer-container .delete-audio:hover {
738
+ background-color: rgba(208, 0, 0, 0.2);
739
+ }
740
+ .text-footer-container .max-characters {
741
+ font-size: 9.2px;
742
+ z-index: 1;
743
+ color: #444;
744
+ position: relative;
745
+ top: 30px;
746
+ left: -30px;
747
+ }
748
+ .text-footer-container .max-characters.no-width {
749
+ width: 0;
750
+ }
751
+ .text-footer-container .text-footer-actions {
752
+ display: flex;
753
+ }
754
+ .text-footer-container .text-footer-actions.outside-buttons {
755
+ display: flex;
756
+ align-items: center;
757
+ justify-content: flex-end;
758
+ position: absolute;
759
+ top: -30px;
760
+ right: 35px;
761
+ background-color: #fafafa;
762
+ }
763
+ .text-footer-container .text-footer-actions .text-footer-actions--btn {
764
+ display: flex;
765
+ justify-content: center;
766
+ align-items: center;
767
+ color: #777;
768
+ border-radius: 50%;
769
+ transition: background 300ms;
770
+ padding: 10px;
771
+ font-size: 16px;
772
+ width: 36px;
773
+ height: 36px;
774
+ cursor: pointer;
775
+ margin-right: 2.5px;
776
+ }
777
+ .text-footer-container .text-footer-actions .text-footer-actions--btn:last-child {
778
+ margin-right: unset;
779
+ }
780
+ .text-footer-container .text-footer-actions .text-footer-actions--btn:hover {
781
+ background-color: rgba(0, 0, 0, 0.1);
782
+ }
783
+ .text-footer-container .text-footer-actions .text-footer-actions--btn.files-activated {
784
+ background-color: rgba(0, 0, 0, 0.1);
785
+ }
786
+ .text-footer-container .text-footer-actions .text-footer-actions--btn.audio-activated {
787
+ background-color: rgba(208, 0, 0, 0.7);
788
+ color: #fff;
789
+ }
790
+ .text-footer-container .text-footer-actions .text-footer-actions--btn.left-button {
791
+ position: absolute;
792
+ left: 0;
793
+ }
794
+ .text-footer-container .text-footer-hsm-container {
795
+ margin: 12px 0 7px 0;
796
+ }
797
+ .text-footer-container .text-footer-hsm-container.full {
798
+ width: 100%;
799
+ }
800
+ .text-footer-container .text-footer-hsm-container.almostFull {
801
+ width: 95%;
802
+ }
803
+ .text-footer-container .text-footer-hsm-container.medium {
804
+ width: 75%;
805
+ }
806
+ .text-footer-container .text-footer-hsm-container .text-footer-v-select {
807
+ border-radius: 5px;
808
+ margin-bottom: 5px;
809
+ }
810
+ .text-footer-container .text-footer-hsm-container .text-footer-select-03 {
811
+ display: flex;
812
+ align-items: center;
813
+ flex: 1;
814
+ width: 100%;
815
+ }
816
+ .text-footer-container
817
+ .text-footer-hsm-container
818
+ .text-footer-select-03
819
+ .text-footer-v-select {
820
+ flex: 1;
821
+ }
822
+ .text-footer-container
823
+ .text-footer-hsm-container
824
+ .text-footer-select-03
825
+ .text-footer--btn-select-03 {
826
+ transition-duration: 300ms;
827
+ user-select: none;
828
+ cursor: pointer;
829
+ box-shadow: inset 0 -3px rgba(0, 0, 0, 0.2);
830
+ opacity: 0.9;
831
+ border-radius: 2.5px;
832
+ display: flex;
833
+ justify-content: center;
834
+ align-items: center;
835
+ margin-left: 5px;
836
+ margin-bottom: 5px;
837
+ background-color: #f7fe72;
838
+ width: 32px;
839
+ height: 32px;
840
+ }
841
+ .text-footer-container
842
+ .text-footer-hsm-container
843
+ .text-footer-select-03
844
+ .text-footer--btn-select-03:hover {
845
+ opacity: 1;
846
+ }
847
+ .text-footer-container
848
+ .text-footer-hsm-container
849
+ .text-footer-select-03
850
+ .text-footer--btn-select-03:active {
851
+ opacity: 1;
852
+ box-shadow: inset 0 -1px rgba(0, 0, 0, 0.2);
853
+ -webkit-transform: translateY(1px);
854
+ -moz-transform: translateY(1px);
855
+ -o-transform: translateY(1px);
856
+ -ms-transform: translateY(1px);
857
+ transform: translateY(1px);
858
+ }
859
+ .text-footer-container
860
+ .text-footer-hsm-container
861
+ .text-footer-select-03
862
+ .text-footer--btn-select-03
863
+ svg {
864
+ font-size: 16px;
865
+ }
866
+ .text-footer-container .text-footer-files-container {
867
+ position: absolute;
868
+ right: 0;
869
+ top: -55px;
870
+ padding: 5px;
871
+ background-color: rgba(0, 0, 0, 0.4);
872
+ border-radius: 5px;
873
+ display: flex;
874
+ align-items: center;
875
+ justify-content: space-between;
876
+ z-index: 1;
877
+ }
878
+ .text-footer-container .text-footer-files-container.horizontal {
879
+ right: -55px;
880
+ flex-direction: column;
881
+ }
882
+ .text-footer-container .text-footer-files-container .files-btn {
883
+ transition-duration: 300ms;
884
+ transition-property: opacity;
885
+ opacity: 0.8;
886
+ cursor: pointer;
887
+ display: flex;
888
+ justify-content: center;
889
+ align-items: center;
890
+ border-radius: 10px;
891
+ padding: 3px;
892
+ width: 40px;
893
+ height: 40px;
894
+ font-size: 16px;
895
+ color: #fff;
896
+ }
897
+ .text-footer-container .text-footer-files-container .files-btn:hover {
898
+ opacity: 1;
899
+ }
900
+ .text-footer-container .text-footer-files-container .files-btn svg {
901
+ color: #fff;
902
+ }
903
+ .text-footer-container .text-footer-files-container .files-btn.images {
904
+ background-color: #9575cd;
905
+ margin-right: 5px;
906
+ }
907
+ .text-footer-container .text-footer-files-container .files-btn.images.margin-bottom {
908
+ margin-right: unset;
909
+ margin-bottom: 5px;
910
+ }
911
+ .text-footer-container .text-footer-files-container .files-btn.docs {
912
+ background-color: #7986cb;
913
+ }
914
+ .text-footer-container .text-footer-files-container .files-btn.system {
915
+ background-color: #49a349;
916
+ margin-left: 5px;
917
+ }
918
+ .text-footer-container .text-footer-files-container .files-btn.both {
919
+ font-size: 15.2px;
920
+ background-color: rgb(85, 85, 236);
921
+ flex-direction: column;
922
+ }
923
+ .text-footer-container .text-footer-files-container .files-btn.both svg:nth-child(1) {
924
+ transform: translateX(5px);
925
+ }
926
+ .text-footer-container .text-footer-files-container .files-btn.both svg:nth-child(2) {
927
+ transform: translateX(-5px);
928
+ }
929
+
930
+ .text-footer-container .text-footer-preview-container {
931
+ width: 100%;
932
+ cursor: default;
933
+ position: absolute;
934
+ left: 0;
935
+ background-color: #f1f1f1;
936
+ border: 2px solid #ccc;
937
+ border-bottom: unset;
938
+ border-top-left-radius: 2.5px;
939
+ border-top-right-radius: 2.5px;
940
+ }
941
+ .text-footer-container .text-footer-preview-container.isDoc {
942
+ top: -50px;
943
+ width: 100%;
944
+ height: 45px;
945
+ }
946
+ .text-footer-container .text-footer-preview-container.isImg,
947
+ .text-footer-container .text-footer-preview-container.isMultiple {
948
+ top: -205px;
949
+ width: 100%;
950
+ height: 200px;
951
+ }
952
+ .text-footer-container .text-footer-preview-container.isImg .text-footer-image-preview {
953
+ height: 170px;
954
+ }
955
+ .text-footer-container .text-footer-preview-container.isError {
956
+ top: -80px;
957
+ width: 100%;
958
+ height: 75px;
959
+ }
960
+
961
+ .text-footer-container .text-footer-alt {
962
+ margin-top: -12px;
963
+ width: 100%;
964
+ padding: 0 10px;
965
+ }
966
+ .text-footer-container .text-footer-alt .text-footer-out-session {
967
+ margin-top: 12px;
968
+ }
969
+ .text-footer-container .text-footer-alt .text-footer-sem-24h {
970
+ font-size: 12.8px;
971
+ text-align: right;
972
+ font-weight: 600;
973
+ letter-spacing: -0.5px;
974
+ color: #dd7f0c;
975
+ margin-top: 5px;
976
+ position: absolute;
977
+ right: 0;
978
+ }
979
+ .text-footer-container .text-footer-alt .sem-templates {
980
+ margin-top: 10px;
981
+ font-size: 12.8px;
982
+ text-align: right;
983
+ font-weight: 600;
984
+ letter-spacing: -0.5px;
985
+ color: #921e12;
986
+ }
987
+ .text-footer-container .text-footer-alt .text-footer-templates {
988
+ position: relative;
989
+ width: 100%;
990
+ }
991
+ .text-footer-container
992
+ .text-footer-alt
993
+ .text-footer-templates
994
+ .text-footer-group-selection {
995
+ width: 100%;
996
+ display: flex;
997
+ align-items: center;
998
+ }
999
+ .text-footer-container
1000
+ .text-footer-alt
1001
+ .text-footer-templates
1002
+ .text-footer-group-selection
1003
+ h4 {
1004
+ margin-right: 5px;
1005
+ }
1006
+ .text-footer-container
1007
+ .text-footer-alt
1008
+ .text-footer-templates
1009
+ .text-footer-group-selection
1010
+ .sm__select {
1011
+ flex: 1;
1012
+ }
1013
+
1014
+ .vs__dropdown-menu {
1015
+ font-size: 13.6px !important;
1016
+ }
1017
+
1018
+ .emoji-mart-anchor,
1019
+ .emoji-mart-emoji span {
1020
+ cursor: pointer !important;
1021
+ }
1022
+
1023
+ .emoji-mart {
1024
+ z-index: 2 !important;
1025
+ }
1026
+
1027
+ .emoji-mart-scroll {
1028
+ overflow-x: hidden;
1029
+ }
1030
+ </style>