vue-intergrall-plugins 0.0.287 → 0.0.289

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +185 -185
  2. package/dist/vue-intergrall-plugins.esm.js +60 -60
  3. package/dist/vue-intergrall-plugins.min.js +1 -1
  4. package/dist/vue-intergrall-plugins.ssr.js +128 -128
  5. package/package.json +65 -65
  6. package/src/lib-components/Buttons/IconButton.vue +27 -27
  7. package/src/lib-components/Buttons/SimpleButton.vue +140 -140
  8. package/src/lib-components/Cards/Card.vue +412 -412
  9. package/src/lib-components/Cards/CardCheck.vue +35 -35
  10. package/src/lib-components/Cards/CardFile.vue +157 -157
  11. package/src/lib-components/Chat/BtnDownloadAllFiles.vue +32 -32
  12. package/src/lib-components/Chat/BtnEmojis.vue +124 -124
  13. package/src/lib-components/Chat/BtnExpand.vue +17 -17
  14. package/src/lib-components/Chat/BtnFiles.vue +415 -415
  15. package/src/lib-components/Chat/BtnMic.vue +60 -60
  16. package/src/lib-components/Chat/BtnScreenShare.vue +32 -32
  17. package/src/lib-components/Chat/BtnStandardMessages.vue +17 -17
  18. package/src/lib-components/Chat/ExpandTextarea.vue +410 -410
  19. package/src/lib-components/Chat/MultipleFilePreview.vue +266 -266
  20. package/src/lib-components/Chat/Picker.vue +368 -368
  21. package/src/lib-components/Chat/RemainingCharacters.vue +28 -28
  22. package/src/lib-components/Chat/SingleFilePreview.vue +94 -94
  23. package/src/lib-components/Chat/SkeletonPicker.vue +110 -110
  24. package/src/lib-components/Chat/StandardMessages.vue +245 -245
  25. package/src/lib-components/Chat/TextFooter.vue +1075 -1075
  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 +458 -459
  30. package/src/lib-components/Messages/CardAttachment.vue +61 -61
  31. package/src/lib-components/Messages/CardMessages.vue +460 -460
  32. package/src/lib-components/Messages/ChatMessages.vue +716 -715
  33. package/src/lib-components/Messages/InteratividadeBotoes.vue +165 -165
  34. package/src/lib-components/Messages/InteratividadeFormulario.vue +392 -392
  35. package/src/lib-components/Messages/InteratividadePopup.vue +88 -88
  36. package/src/lib-components/Messages/LinkPreview.vue +163 -163
  37. package/src/lib-components/Scroll/ScrollContent.vue +150 -150
  38. package/src/lib-components/Templates/TemplateGenerator.vue +576 -576
  39. package/src/lib-components/Templates/TemplateMessage.vue +83 -83
  40. package/src/lib-components/Templates/TemplateSingle.vue +481 -481
@@ -1,1075 +1,1075 @@
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 (
332
- typeof event.data === "string" &&
333
- this.showStandardMessages
334
- ) {
335
- this.message = event.data;
336
- this.focusTextarea();
337
- this.closeBlockerStandardMessage();
338
- this.toggleStandardMessages();
339
- }
340
- }
341
- },
342
- closeEmojis() {
343
- try {
344
- this.$root.$refs[`etf-${this.textId}`].showEmojis
345
- ? this.$root.$refs[`etf-${this.textId}`].away()
346
- : "";
347
- } catch (e) {
348
- console.error("Nao foi possivel fechar os emojis");
349
- console.error(e);
350
- }
351
- },
352
- away() {
353
- if (this.$refs[`${this.textId}-file`])
354
- this.$refs[`${this.textId}-file`].openFiles = false;
355
- },
356
- setDefaultMessage(msg) {
357
- this.message = msg;
358
- this.sendFinalMessage();
359
- },
360
- insertEmoji(emoji) {
361
- try {
362
- if (!emoji) return;
363
- const textarea = document.querySelector(`#text-footer-${this.textId}`);
364
- if (document.activeElement === textarea) {
365
- const cursorStart = textarea.selectionStart;
366
- const cursorEnd = textarea.selectionEnd;
367
- if (cursorEnd == textarea.value.length) {
368
- this.message += emoji.finalEmoji;
369
- textarea.setSelectionRange(
370
- textarea.value.length,
371
- textarea.value.length
372
- );
373
- } else {
374
- const initValue =
375
- textarea.value.slice(0, cursorStart) + emoji.finalEmoji;
376
- const endValue = textarea.value.slice(cursorEnd);
377
- this.message = initValue + endValue;
378
- textarea.setSelectionRange(initValue.length, initValue.length);
379
- }
380
- } else {
381
- this.message += emoji.finalEmoji;
382
- }
383
- this.sendFinalMessage();
384
- } catch (e) {
385
- console.error("Erro ao inserir emoji");
386
- console.error(e);
387
- }
388
- },
389
- verifyMessage() {
390
- if (this.textareaSettings.maxCharacters && this.message) {
391
- if (this.message.length > this.textareaSettings.maxCharacters) {
392
- if (!document.querySelector(".toasted.toasted-primary.error"))
393
- this.$toasted.global.limiteCaracter();
394
- return false;
395
- }
396
- }
397
-
398
- if (
399
- (!this.message || !this.message.trim()) &&
400
- !this.hasAnyFile &&
401
- !this.audioFile
402
- )
403
- return false;
404
-
405
- if (this.textareaSettings.disabled) return false;
406
-
407
- if (this.fileFormatError && this.hasAnyFile) {
408
- if (!document.querySelector(".toasted.toasted-primary.error"))
409
- this.$toasted.global.defaultError({
410
- msg: this.dictionary.msg_formato_invalido,
411
- });
412
- const str = {
413
- img: this.fileSettings.imagesExtensions.split("|").join(", "),
414
- doc: this.fileSettings.docsExtensions.split("|").join(", "),
415
- };
416
- if (!document.querySelector(".toasted.toasted-primary.info"))
417
- this.$toasted.global.showValidFormats({
418
- msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
419
- });
420
- return false;
421
- }
422
-
423
- return true;
424
- },
425
- removeHTMLElementsFromMessage(message) {
426
- const regexTags = /<\/?[\d\w\s=\-:./'";]+>/gi;
427
- if (message.match(regexTags)) message = message.replace(regexTags, " ");
428
- return message;
429
- },
430
- formatMessage(message) {
431
- if (!message) return "";
432
- message = message.trim();
433
- message = message.replace(/\n$/, "", message);
434
- message = returnMessageWithHexa(message);
435
- message = this.removeHTMLElementsFromMessage(message);
436
- return message;
437
- },
438
- sendFinalMessage() {
439
- const messageAux = this.formatMessage(this.message);
440
- this.$emit("final-message", messageAux);
441
- },
442
- sendMessageHandler(event) {
443
- this.sendMessage(event);
444
- },
445
- sendMessage(event) {
446
- if (this.isSending) return;
447
-
448
- if (this.isMainChat && event) {
449
- if (this.textareaSettings.sendOnEnter) {
450
- if (event.keyCode == 13 && !event.shiftKey) event.preventDefault();
451
- if (event.shiftKey) return;
452
- } else {
453
- if (event.keyCode == 13) {
454
- if (!event.shiftKey) return;
455
- event.preventDefault();
456
- }
457
- }
458
- }
459
-
460
- if (!this.buttons.hasSendButton) return;
461
-
462
- const messageAux = this.formatMessage(this.message);
463
- if (this.verifyMessage()) {
464
- if (messageAux || this.hasAnyFile || this.audioFile) {
465
- this.$emit("send-message", messageAux);
466
- const objMessage = this.returnObjectMessage(messageAux);
467
- this.$emit("obj-message", objMessage);
468
-
469
- if (
470
- this.$refs[`emoji-text-${this.textId}`] &&
471
- this.$refs[`emoji-text-${this.textId}`].showEmojis
472
- )
473
- this.$refs[`emoji-text-${this.textId}`].toggleEmojiSelection();
474
-
475
- this.resetFooterData();
476
- }
477
- }
478
- },
479
- focusTextarea() {
480
- const textarea = document.querySelector(`#text-footer-${this.textId}`);
481
- if (textarea) textarea.focus();
482
- },
483
- resetFooterData() {
484
- if (this.audioFile) this.deleteAudio();
485
- if (this.hasAnyFile) this.$refs[`${this.textId}-file`].deleteFile();
486
- this.message = "";
487
- this.sendFinalMessage();
488
- resetTargets(this.$el, ".js-autoresize", ".js-parentresize", "38px");
489
- this.focusTextarea();
490
- },
491
- returnObjectMessage(message) {
492
- return {
493
- message,
494
- attachment: this.hasAnyFile ? this.file : false,
495
- isDoc: this.isDoc,
496
- imagePreview: this.imagePreview,
497
- isAudio: this.audioFile ? true : false,
498
- audioAttachment: this.audioSource,
499
- };
500
- },
501
- setFileVars(fileObj) {
502
- const {
503
- file,
504
- imagePreview,
505
- isDoc,
506
- fileFormatError,
507
- hasAnyFile,
508
- } = fileObj;
509
-
510
- this.file = file;
511
- this.imagePreview = imagePreview ? imagePreview : "";
512
- this.isDoc = isDoc;
513
- this.fileFormatError = fileFormatError;
514
- this.hasAnyFile = hasAnyFile;
515
-
516
- this.$emit("set-file-vars", fileObj);
517
- },
518
- openImage(imagePreview) {
519
- this.$emit("open-image", imagePreview);
520
- },
521
- openFileSystem() {
522
- this.$emit("open-file-system");
523
- },
524
- resetFileSystem() {
525
- this.$emit("reset-file-system");
526
- },
527
- setAudio(audioObj) {
528
- const { audioFile, audioSource } = audioObj;
529
- this.audioFile = audioFile;
530
- this.audioSource = audioSource;
531
- },
532
- deleteAudio() {
533
- this.$refs[`${this.textId}-mic`].deleteMediaRecorder();
534
- this.audioFile = "";
535
- this.audioSource = "";
536
- },
537
- returnFileType(file, stopAlert) {
538
- if (
539
- !this.fileSettings.imagesExtensions &&
540
- !this.fileSettings.docsExtensions
541
- )
542
- return false;
543
- const imgRegex = new RegExp(
544
- "\.(" + this.fileSettings.imagesExtensions + ")",
545
- "i"
546
- );
547
- if (imgRegex.test(file.name)) return "img";
548
-
549
- const docRegex = new RegExp(
550
- "\.(" + this.fileSettings.docsExtensions + ")",
551
- "i"
552
- );
553
- if (docRegex.test(file.name)) return "doc";
554
-
555
- if (!stopAlert) return false;
556
- if (!document.querySelector(".toasted.toasted-primary.error"))
557
- this.$toasted.global.defaultError({
558
- msg: this.dictionary.msg_formato_invalido,
559
- });
560
- const str = {
561
- img: this.fileSettings.imagesExtensions.split("|").join(", "),
562
- doc: this.fileSettings.docsExtensions.split("|").join(", "),
563
- };
564
- if (!document.querySelector(".toasted.toasted-primary.info"))
565
- this.$toasted.global.showValidFormats({
566
- msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
567
- });
568
- return false;
569
- },
570
- filesHandler(files) {
571
- if (!Array.isArray(files)) files = Array.from(files);
572
- const fileType = this.returnFileType(files[0], true);
573
- let invalidFile = false;
574
- try {
575
- files.forEach((file) => {
576
- const singleFileType = this.returnFileType(file, true);
577
- if (!singleFileType) {
578
- invalidFile = true;
579
- file.invalid = true;
580
- }
581
- file.imgOrDoc = singleFileType ? singleFileType : "";
582
- });
583
- } catch (e) {
584
- console.error("Erro ao tentar percorrer os arquivos");
585
- console.error(e);
586
- invalidFile = true;
587
- }
588
-
589
- if (!invalidFile) {
590
- this.$refs[`${this.textId}-file`].fileUpload(files, fileType, true);
591
- } else {
592
- if (!document.querySelector(".toasted.toasted-primary.error"))
593
- this.$toasted.global.defaultError({
594
- msg: this.dictionary.msg_formato_invalido,
595
- });
596
- const str = {
597
- img: this.fileSettings.imagesExtensions.split("|").join(", "),
598
- doc: this.fileSettings.docsExtensions.split("|").join(", "),
599
- };
600
- if (!document.querySelector(".toasted.toasted-primary.info"))
601
- this.$toasted.global.showValidFormats({
602
- msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
603
- });
604
- }
605
- },
606
- dropFile(e) {
607
- try {
608
- e.stopPropagation();
609
- e.preventDefault();
610
- if (!this.buttons.hasFiles || this.fileSettings.handleFileClick)
611
- return false;
612
- const files = e.dataTransfer.files.length ? e.dataTransfer.files : "";
613
- this.filesHandler(files);
614
- } catch (e) {
615
- console.error("Erro drop file");
616
- console.error(e);
617
- }
618
- },
619
- pasteImage(e) {
620
- try {
621
- if (e.clipboardData.files.length && !this.buttons.hasFiles) {
622
- e.preventDefault();
623
- return;
624
- } else if (e.clipboardData.files.length && this.buttons.hasFiles) {
625
- const files = e.clipboardData.files;
626
- this.filesHandler(files);
627
- }
628
- } catch (e) {
629
- console.error("Nao foi possivel colar a/o imagem/documento");
630
- console.error(e);
631
- }
632
- },
633
- handleScreenShare() {
634
- this.$emit("handle-screen-share");
635
- },
636
- toggleStandardMessages() {
637
- this.showStandardMessages = !this.showStandardMessages;
638
- },
639
- openBlockerStandardMessage() {
640
- this.$emit("open-blocker-standard-message");
641
- },
642
- closeBlockerStandardMessage() {
643
- this.$emit("close-blocker-standard-message");
644
- },
645
- setMessageType(type) {
646
- this.messageType = type;
647
- },
648
- setStandardInfos(infos) {
649
- this.$emit("set-standard-infos", infos);
650
- },
651
- addStandardMessage(message) {
652
- this.message = message;
653
- this.sendFinalMessage();
654
- },
655
- closeStandardMessages() {
656
- this.showStandardMessages = false;
657
- },
658
- },
659
- destroyed() {
660
- // this.$root.$off("drop-file")
661
- // this.$root.$off("toggle-msg-formatada")
662
- // this.$root.$off("textarea-focus")
663
- // this.$root.$off("clear-footer-message")
664
- // this.$root.$off("resize-footer-template")
665
-
666
- window.removeEventListener("message", this.listenerPostMessage);
667
- },
668
- };
669
- </script>
670
-
671
- <style>
672
- .toasted svg {
673
- margin-right: 10px;
674
- }
675
-
676
- .d-none {
677
- display: none;
678
- }
679
-
680
- ul {
681
- list-style-type: none;
682
- }
683
-
684
- .text-footer-container {
685
- display: flex;
686
- justify-content: center;
687
- align-items: center;
688
- flex-direction: column;
689
- width: 100%;
690
- position: relative;
691
- }
692
- .text-footer-container .text-footer {
693
- min-height: 48px;
694
- box-shadow: 0px 3px 7px -2px rgba(0, 0, 0, 0.45);
695
- position: relative;
696
- display: flex;
697
- justify-content: center;
698
- align-items: center;
699
- border: 1px solid #ccc;
700
- padding: 5px 2px 5px 5px;
701
- border-radius: 5px;
702
- }
703
- .text-footer-container .text-footer.full {
704
- width: 100%;
705
- }
706
- .text-footer-container .text-footer.almostFull {
707
- width: 95%;
708
- }
709
- .text-footer-container .text-footer.medium {
710
- width: 75%;
711
- }
712
- .text-footer-container.bigger .text-footer {
713
- height: 80px;
714
- }
715
- .text-footer-container.bigger .text-footer > textarea {
716
- font-size: 0.875rem;
717
- height: 75px;
718
- max-height: 75px;
719
- min-height: 75px;
720
- }
721
- .text-footer-container textarea {
722
- margin: 0 5px;
723
- border: unset;
724
- flex: 1;
725
- resize: none;
726
- min-height: 30px;
727
- max-height: 60px;
728
- font-size: 0.875rem;
729
- font-family: inherit;
730
- background: inherit;
731
- }
732
- .text-footer-container textarea:focus {
733
- outline: unset;
734
- }
735
- .text-footer-container textarea::placeholder {
736
- font-size: 0.75rem;
737
- }
738
- .text-footer-container .text-footer-audio {
739
- flex: 1;
740
- display: flex;
741
- justify-content: center;
742
- align-items: center;
743
- }
744
- .text-footer-container audio {
745
- flex: 1;
746
- outline: unset;
747
- width: auto;
748
- height: 38px;
749
- }
750
- .text-footer-container .delete-audio {
751
- display: flex;
752
- justify-content: center;
753
- align-items: center;
754
- color: #e74c3c;
755
- transition: background 300ms;
756
- border-radius: 50%;
757
- font-size: 1rem;
758
- padding: 10px;
759
- cursor: pointer;
760
- margin: 0 5px;
761
- width: 31px;
762
- height: 31px;
763
- }
764
- .text-footer-container .delete-audio:hover {
765
- background-color: rgba(208, 0, 0, 0.2);
766
- }
767
- .text-footer-container .max-characters {
768
- font-size: 0.575rem;
769
- z-index: 1;
770
- color: #444;
771
- position: relative;
772
- top: 30px;
773
- left: -30px;
774
- }
775
- .text-footer-container .max-characters.no-width {
776
- width: 0;
777
- }
778
- .text-footer-container .text-footer-actions {
779
- display: flex;
780
- }
781
- .text-footer-container .text-footer-actions.outside-buttons {
782
- display: flex;
783
- align-items: center;
784
- justify-content: flex-end;
785
- position: absolute;
786
- top: -30px;
787
- right: 35px;
788
- background-color: #fafafa;
789
- }
790
- .text-footer-container .text-footer-actions .text-footer-actions--btn {
791
- display: flex;
792
- justify-content: center;
793
- align-items: center;
794
- color: #777;
795
- border-radius: 50%;
796
- transition: background 300ms;
797
- padding: 10px;
798
- font-size: 1rem;
799
- width: 36px;
800
- height: 36px;
801
- cursor: pointer;
802
- margin-right: 2.5px;
803
- }
804
- .text-footer-container
805
- .text-footer-actions
806
- .text-footer-actions--btn:last-child {
807
- margin-right: unset;
808
- }
809
- .text-footer-container .text-footer-actions .text-footer-actions--btn:hover {
810
- background-color: rgba(0, 0, 0, 0.1);
811
- }
812
- .text-footer-container
813
- .text-footer-actions
814
- .text-footer-actions--btn.files-activated {
815
- background-color: rgba(0, 0, 0, 0.1);
816
- }
817
- .text-footer-container
818
- .text-footer-actions
819
- .text-footer-actions--btn.audio-activated {
820
- background-color: rgba(208, 0, 0, 0.7);
821
- color: #fff;
822
- }
823
- .text-footer-container
824
- .text-footer-actions
825
- .text-footer-actions--btn.left-button {
826
- position: absolute;
827
- left: 0;
828
- }
829
- .text-footer-container .text-footer-hsm-container {
830
- margin: 12px 0 7px 0;
831
- }
832
- .text-footer-container .text-footer-hsm-container.full {
833
- width: 100%;
834
- }
835
- .text-footer-container .text-footer-hsm-container.almostFull {
836
- width: 95%;
837
- }
838
- .text-footer-container .text-footer-hsm-container.medium {
839
- width: 75%;
840
- }
841
- .text-footer-container .text-footer-hsm-container .text-footer-v-select {
842
- border-radius: 5px;
843
- margin-bottom: 5px;
844
- }
845
- .text-footer-container .text-footer-hsm-container .text-footer-select-03 {
846
- display: flex;
847
- align-items: center;
848
- flex: 1;
849
- width: 100%;
850
- }
851
- .text-footer-container
852
- .text-footer-hsm-container
853
- .text-footer-select-03
854
- .text-footer-v-select {
855
- flex: 1;
856
- }
857
- .text-footer-container
858
- .text-footer-hsm-container
859
- .text-footer-select-03
860
- .text-footer--btn-select-03 {
861
- transition-duration: 300ms;
862
- user-select: none;
863
- cursor: pointer;
864
- box-shadow: inset 0 -3px rgba(0, 0, 0, 0.2);
865
- opacity: 0.9;
866
- border-radius: 2.5px;
867
- display: flex;
868
- justify-content: center;
869
- align-items: center;
870
- margin-left: 5px;
871
- margin-bottom: 5px;
872
- background-color: #f7fe72;
873
- width: 32px;
874
- height: 32px;
875
- }
876
- .text-footer-container
877
- .text-footer-hsm-container
878
- .text-footer-select-03
879
- .text-footer--btn-select-03:hover {
880
- opacity: 1;
881
- }
882
- .text-footer-container
883
- .text-footer-hsm-container
884
- .text-footer-select-03
885
- .text-footer--btn-select-03:active {
886
- opacity: 1;
887
- box-shadow: inset 0 -1px rgba(0, 0, 0, 0.2);
888
- -webkit-transform: translateY(1px);
889
- -moz-transform: translateY(1px);
890
- -o-transform: translateY(1px);
891
- -ms-transform: translateY(1px);
892
- transform: translateY(1px);
893
- }
894
- .text-footer-container
895
- .text-footer-hsm-container
896
- .text-footer-select-03
897
- .text-footer--btn-select-03
898
- svg {
899
- font-size: 1rem;
900
- }
901
- .text-footer-container .text-footer-files-container {
902
- position: absolute;
903
- right: 0;
904
- top: -55px;
905
- padding: 5px;
906
- background-color: rgba(0, 0, 0, 0.4);
907
- border-radius: 5px;
908
- display: flex;
909
- align-items: center;
910
- justify-content: space-between;
911
- z-index: 1;
912
- }
913
- .text-footer-container .text-footer-files-container.horizontal {
914
- right: -55px;
915
- flex-direction: column;
916
- }
917
- .text-footer-container .text-footer-files-container .files-btn {
918
- transition-duration: 300ms;
919
- transition-property: opacity;
920
- opacity: 0.8;
921
- cursor: pointer;
922
- display: flex;
923
- justify-content: center;
924
- align-items: center;
925
- border-radius: 10px;
926
- padding: 3px;
927
- width: 40px;
928
- height: 40px;
929
- font-size: 1rem;
930
- color: #fff;
931
- }
932
- .text-footer-container .text-footer-files-container .files-btn:hover {
933
- opacity: 1;
934
- }
935
- .text-footer-container .text-footer-files-container .files-btn svg {
936
- color: #fff;
937
- }
938
- .text-footer-container .text-footer-files-container .files-btn.images {
939
- background-color: #9575cd;
940
- margin-right: 5px;
941
- }
942
- .text-footer-container
943
- .text-footer-files-container
944
- .files-btn.images.margin-bottom {
945
- margin-right: unset;
946
- margin-bottom: 5px;
947
- }
948
- .text-footer-container .text-footer-files-container .files-btn.docs {
949
- background-color: #7986cb;
950
- }
951
- .text-footer-container .text-footer-files-container .files-btn.system {
952
- background-color: #49a349;
953
- margin-left: 5px;
954
- }
955
- .text-footer-container .text-footer-files-container .files-btn.both {
956
- font-size: 0.95rem;
957
- background-color: rgb(85, 85, 236);
958
- flex-direction: column;
959
- }
960
- .text-footer-container
961
- .text-footer-files-container
962
- .files-btn.both
963
- svg:nth-child(1) {
964
- transform: translateX(5px);
965
- }
966
- .text-footer-container
967
- .text-footer-files-container
968
- .files-btn.both
969
- svg:nth-child(2) {
970
- transform: translateX(-5px);
971
- }
972
-
973
- .text-footer-container .text-footer-preview-container {
974
- width: 100%;
975
- cursor: default;
976
- position: absolute;
977
- left: 0;
978
- background-color: #f1f1f1;
979
- border: 2px solid #ccc;
980
- border-bottom: unset;
981
- border-top-left-radius: 2.5px;
982
- border-top-right-radius: 2.5px;
983
- }
984
- .text-footer-container .text-footer-preview-container.isDoc {
985
- top: -50px;
986
- width: 100%;
987
- height: 45px;
988
- }
989
- .text-footer-container .text-footer-preview-container.isImg,
990
- .text-footer-container .text-footer-preview-container.isMultiple {
991
- top: -205px;
992
- width: 100%;
993
- height: 200px;
994
- }
995
- .text-footer-container
996
- .text-footer-preview-container.isImg
997
- .text-footer-image-preview {
998
- height: 170px;
999
- }
1000
- .text-footer-container .text-footer-preview-container.isError {
1001
- top: -80px;
1002
- width: 100%;
1003
- height: 75px;
1004
- }
1005
-
1006
- .text-footer-container .text-footer-alt {
1007
- margin-top: -12px;
1008
- width: 100%;
1009
- padding: 0 10px;
1010
- }
1011
- .text-footer-container .text-footer-alt .text-footer-out-session {
1012
- margin-top: 12px;
1013
- }
1014
- .text-footer-container .text-footer-alt .text-footer-sem-24h {
1015
- font-size: 0.8rem;
1016
- text-align: right;
1017
- font-weight: 600;
1018
- letter-spacing: -0.5px;
1019
- color: #dd7f0c;
1020
- margin-top: 5px;
1021
- position: absolute;
1022
- right: 0;
1023
- }
1024
- .text-footer-container .text-footer-alt .sem-templates {
1025
- margin-top: 10px;
1026
- font-size: 0.8rem;
1027
- text-align: right;
1028
- font-weight: 600;
1029
- letter-spacing: -0.5px;
1030
- color: #921e12;
1031
- }
1032
- .text-footer-container .text-footer-alt .text-footer-templates {
1033
- position: relative;
1034
- width: 100%;
1035
- }
1036
- .text-footer-container
1037
- .text-footer-alt
1038
- .text-footer-templates
1039
- .text-footer-group-selection {
1040
- width: 100%;
1041
- display: flex;
1042
- align-items: center;
1043
- }
1044
- .text-footer-container
1045
- .text-footer-alt
1046
- .text-footer-templates
1047
- .text-footer-group-selection
1048
- h4 {
1049
- margin-right: 5px;
1050
- }
1051
- .text-footer-container
1052
- .text-footer-alt
1053
- .text-footer-templates
1054
- .text-footer-group-selection
1055
- .sm__select {
1056
- flex: 1;
1057
- }
1058
-
1059
- .vs__dropdown-menu {
1060
- font-size: 0.85rem !important;
1061
- }
1062
-
1063
- .emoji-mart-anchor,
1064
- .emoji-mart-emoji span {
1065
- cursor: pointer !important;
1066
- }
1067
-
1068
- .emoji-mart {
1069
- z-index: 2 !important;
1070
- }
1071
-
1072
- .emoji-mart-scroll {
1073
- overflow-x: hidden;
1074
- }
1075
- </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 (
332
+ typeof event.data === "string" &&
333
+ this.showStandardMessages
334
+ ) {
335
+ this.message = event.data;
336
+ this.focusTextarea();
337
+ this.closeBlockerStandardMessage();
338
+ this.toggleStandardMessages();
339
+ }
340
+ }
341
+ },
342
+ closeEmojis() {
343
+ try {
344
+ this.$root.$refs[`etf-${this.textId}`].showEmojis
345
+ ? this.$root.$refs[`etf-${this.textId}`].away()
346
+ : "";
347
+ } catch (e) {
348
+ console.error("Nao foi possivel fechar os emojis");
349
+ console.error(e);
350
+ }
351
+ },
352
+ away() {
353
+ if (this.$refs[`${this.textId}-file`])
354
+ this.$refs[`${this.textId}-file`].openFiles = false;
355
+ },
356
+ setDefaultMessage(msg) {
357
+ this.message = msg;
358
+ this.sendFinalMessage();
359
+ },
360
+ insertEmoji(emoji) {
361
+ try {
362
+ if (!emoji) return;
363
+ const textarea = document.querySelector(`#text-footer-${this.textId}`);
364
+ if (document.activeElement === textarea) {
365
+ const cursorStart = textarea.selectionStart;
366
+ const cursorEnd = textarea.selectionEnd;
367
+ if (cursorEnd == textarea.value.length) {
368
+ this.message += emoji.finalEmoji;
369
+ textarea.setSelectionRange(
370
+ textarea.value.length,
371
+ textarea.value.length
372
+ );
373
+ } else {
374
+ const initValue =
375
+ textarea.value.slice(0, cursorStart) + emoji.finalEmoji;
376
+ const endValue = textarea.value.slice(cursorEnd);
377
+ this.message = initValue + endValue;
378
+ textarea.setSelectionRange(initValue.length, initValue.length);
379
+ }
380
+ } else {
381
+ this.message += emoji.finalEmoji;
382
+ }
383
+ this.sendFinalMessage();
384
+ } catch (e) {
385
+ console.error("Erro ao inserir emoji");
386
+ console.error(e);
387
+ }
388
+ },
389
+ verifyMessage() {
390
+ if (this.textareaSettings.maxCharacters && this.message) {
391
+ if (this.message.length > this.textareaSettings.maxCharacters) {
392
+ if (!document.querySelector(".toasted.toasted-primary.error"))
393
+ this.$toasted.global.limiteCaracter();
394
+ return false;
395
+ }
396
+ }
397
+
398
+ if (
399
+ (!this.message || !this.message.trim()) &&
400
+ !this.hasAnyFile &&
401
+ !this.audioFile
402
+ )
403
+ return false;
404
+
405
+ if (this.textareaSettings.disabled) return false;
406
+
407
+ if (this.fileFormatError && this.hasAnyFile) {
408
+ if (!document.querySelector(".toasted.toasted-primary.error"))
409
+ this.$toasted.global.defaultError({
410
+ msg: this.dictionary.msg_formato_invalido,
411
+ });
412
+ const str = {
413
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
414
+ doc: this.fileSettings.docsExtensions.split("|").join(", "),
415
+ };
416
+ if (!document.querySelector(".toasted.toasted-primary.info"))
417
+ this.$toasted.global.showValidFormats({
418
+ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
419
+ });
420
+ return false;
421
+ }
422
+
423
+ return true;
424
+ },
425
+ removeHTMLElementsFromMessage(message) {
426
+ const regexTags = /<\/?[\d\w\s=\-:./'";]+>/gi;
427
+ if (message.match(regexTags)) message = message.replace(regexTags, " ");
428
+ return message;
429
+ },
430
+ formatMessage(message) {
431
+ if (!message) return "";
432
+ message = message.trim();
433
+ message = message.replace(/\n$/, "", message);
434
+ message = returnMessageWithHexa(message);
435
+ message = this.removeHTMLElementsFromMessage(message);
436
+ return message;
437
+ },
438
+ sendFinalMessage() {
439
+ const messageAux = this.formatMessage(this.message);
440
+ this.$emit("final-message", messageAux);
441
+ },
442
+ sendMessageHandler(event) {
443
+ this.sendMessage(event);
444
+ },
445
+ sendMessage(event) {
446
+ if (this.isSending) return;
447
+
448
+ if (this.isMainChat && event) {
449
+ if (this.textareaSettings.sendOnEnter) {
450
+ if (event.keyCode == 13 && !event.shiftKey) event.preventDefault();
451
+ if (event.shiftKey) return;
452
+ } else {
453
+ if (event.keyCode == 13) {
454
+ if (!event.shiftKey) return;
455
+ event.preventDefault();
456
+ }
457
+ }
458
+ }
459
+
460
+ if (!this.buttons.hasSendButton) return;
461
+
462
+ const messageAux = this.formatMessage(this.message);
463
+ if (this.verifyMessage()) {
464
+ if (messageAux || this.hasAnyFile || this.audioFile) {
465
+ this.$emit("send-message", messageAux);
466
+ const objMessage = this.returnObjectMessage(messageAux);
467
+ this.$emit("obj-message", objMessage);
468
+
469
+ if (
470
+ this.$refs[`emoji-text-${this.textId}`] &&
471
+ this.$refs[`emoji-text-${this.textId}`].showEmojis
472
+ )
473
+ this.$refs[`emoji-text-${this.textId}`].toggleEmojiSelection();
474
+
475
+ this.resetFooterData();
476
+ }
477
+ }
478
+ },
479
+ focusTextarea() {
480
+ const textarea = document.querySelector(`#text-footer-${this.textId}`);
481
+ if (textarea) textarea.focus();
482
+ },
483
+ resetFooterData() {
484
+ if (this.audioFile) this.deleteAudio();
485
+ if (this.hasAnyFile) this.$refs[`${this.textId}-file`].deleteFile();
486
+ this.message = "";
487
+ this.sendFinalMessage();
488
+ resetTargets(this.$el, ".js-autoresize", ".js-parentresize", "38px");
489
+ this.focusTextarea();
490
+ },
491
+ returnObjectMessage(message) {
492
+ return {
493
+ message,
494
+ attachment: this.hasAnyFile ? this.file : false,
495
+ isDoc: this.isDoc,
496
+ imagePreview: this.imagePreview,
497
+ isAudio: this.audioFile ? true : false,
498
+ audioAttachment: this.audioSource,
499
+ };
500
+ },
501
+ setFileVars(fileObj) {
502
+ const {
503
+ file,
504
+ imagePreview,
505
+ isDoc,
506
+ fileFormatError,
507
+ hasAnyFile,
508
+ } = fileObj;
509
+
510
+ this.file = file;
511
+ this.imagePreview = imagePreview ? imagePreview : "";
512
+ this.isDoc = isDoc;
513
+ this.fileFormatError = fileFormatError;
514
+ this.hasAnyFile = hasAnyFile;
515
+
516
+ this.$emit("set-file-vars", fileObj);
517
+ },
518
+ openImage(imagePreview) {
519
+ this.$emit("open-image", imagePreview);
520
+ },
521
+ openFileSystem() {
522
+ this.$emit("open-file-system");
523
+ },
524
+ resetFileSystem() {
525
+ this.$emit("reset-file-system");
526
+ },
527
+ setAudio(audioObj) {
528
+ const { audioFile, audioSource } = audioObj;
529
+ this.audioFile = audioFile;
530
+ this.audioSource = audioSource;
531
+ },
532
+ deleteAudio() {
533
+ this.$refs[`${this.textId}-mic`].deleteMediaRecorder();
534
+ this.audioFile = "";
535
+ this.audioSource = "";
536
+ },
537
+ returnFileType(file, stopAlert) {
538
+ if (
539
+ !this.fileSettings.imagesExtensions &&
540
+ !this.fileSettings.docsExtensions
541
+ )
542
+ return false;
543
+ const imgRegex = new RegExp(
544
+ "\.(" + this.fileSettings.imagesExtensions + ")",
545
+ "i"
546
+ );
547
+ if (imgRegex.test(file.name)) return "img";
548
+
549
+ const docRegex = new RegExp(
550
+ "\.(" + this.fileSettings.docsExtensions + ")",
551
+ "i"
552
+ );
553
+ if (docRegex.test(file.name)) return "doc";
554
+
555
+ if (!stopAlert) return false;
556
+ if (!document.querySelector(".toasted.toasted-primary.error"))
557
+ this.$toasted.global.defaultError({
558
+ msg: this.dictionary.msg_formato_invalido,
559
+ });
560
+ const str = {
561
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
562
+ doc: this.fileSettings.docsExtensions.split("|").join(", "),
563
+ };
564
+ if (!document.querySelector(".toasted.toasted-primary.info"))
565
+ this.$toasted.global.showValidFormats({
566
+ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
567
+ });
568
+ return false;
569
+ },
570
+ filesHandler(files) {
571
+ if (!Array.isArray(files)) files = Array.from(files);
572
+ const fileType = this.returnFileType(files[0], true);
573
+ let invalidFile = false;
574
+ try {
575
+ files.forEach((file) => {
576
+ const singleFileType = this.returnFileType(file, true);
577
+ if (!singleFileType) {
578
+ invalidFile = true;
579
+ file.invalid = true;
580
+ }
581
+ file.imgOrDoc = singleFileType ? singleFileType : "";
582
+ });
583
+ } catch (e) {
584
+ console.error("Erro ao tentar percorrer os arquivos");
585
+ console.error(e);
586
+ invalidFile = true;
587
+ }
588
+
589
+ if (!invalidFile) {
590
+ this.$refs[`${this.textId}-file`].fileUpload(files, fileType, true);
591
+ } else {
592
+ if (!document.querySelector(".toasted.toasted-primary.error"))
593
+ this.$toasted.global.defaultError({
594
+ msg: this.dictionary.msg_formato_invalido,
595
+ });
596
+ const str = {
597
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
598
+ doc: this.fileSettings.docsExtensions.split("|").join(", "),
599
+ };
600
+ if (!document.querySelector(".toasted.toasted-primary.info"))
601
+ this.$toasted.global.showValidFormats({
602
+ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
603
+ });
604
+ }
605
+ },
606
+ dropFile(e) {
607
+ try {
608
+ e.stopPropagation();
609
+ e.preventDefault();
610
+ if (!this.buttons.hasFiles || this.fileSettings.handleFileClick)
611
+ return false;
612
+ const files = e.dataTransfer.files.length ? e.dataTransfer.files : "";
613
+ this.filesHandler(files);
614
+ } catch (e) {
615
+ console.error("Erro drop file");
616
+ console.error(e);
617
+ }
618
+ },
619
+ pasteImage(e) {
620
+ try {
621
+ if (e.clipboardData.files.length && !this.buttons.hasFiles) {
622
+ e.preventDefault();
623
+ return;
624
+ } else if (e.clipboardData.files.length && this.buttons.hasFiles) {
625
+ const files = e.clipboardData.files;
626
+ this.filesHandler(files);
627
+ }
628
+ } catch (e) {
629
+ console.error("Nao foi possivel colar a/o imagem/documento");
630
+ console.error(e);
631
+ }
632
+ },
633
+ handleScreenShare() {
634
+ this.$emit("handle-screen-share");
635
+ },
636
+ toggleStandardMessages() {
637
+ this.showStandardMessages = !this.showStandardMessages;
638
+ },
639
+ openBlockerStandardMessage() {
640
+ this.$emit("open-blocker-standard-message");
641
+ },
642
+ closeBlockerStandardMessage() {
643
+ this.$emit("close-blocker-standard-message");
644
+ },
645
+ setMessageType(type) {
646
+ this.messageType = type;
647
+ },
648
+ setStandardInfos(infos) {
649
+ this.$emit("set-standard-infos", infos);
650
+ },
651
+ addStandardMessage(message) {
652
+ this.message = message;
653
+ this.sendFinalMessage();
654
+ },
655
+ closeStandardMessages() {
656
+ this.showStandardMessages = false;
657
+ },
658
+ },
659
+ destroyed() {
660
+ // this.$root.$off("drop-file")
661
+ // this.$root.$off("toggle-msg-formatada")
662
+ // this.$root.$off("textarea-focus")
663
+ // this.$root.$off("clear-footer-message")
664
+ // this.$root.$off("resize-footer-template")
665
+
666
+ window.removeEventListener("message", this.listenerPostMessage);
667
+ },
668
+ };
669
+ </script>
670
+
671
+ <style>
672
+ .toasted svg {
673
+ margin-right: 10px;
674
+ }
675
+
676
+ .d-none {
677
+ display: none;
678
+ }
679
+
680
+ ul {
681
+ list-style-type: none;
682
+ }
683
+
684
+ .text-footer-container {
685
+ display: flex;
686
+ justify-content: center;
687
+ align-items: center;
688
+ flex-direction: column;
689
+ width: 100%;
690
+ position: relative;
691
+ }
692
+ .text-footer-container .text-footer {
693
+ min-height: 48px;
694
+ box-shadow: 0px 3px 7px -2px rgba(0, 0, 0, 0.45);
695
+ position: relative;
696
+ display: flex;
697
+ justify-content: center;
698
+ align-items: center;
699
+ border: 1px solid #ccc;
700
+ padding: 5px 2px 5px 5px;
701
+ border-radius: 5px;
702
+ }
703
+ .text-footer-container .text-footer.full {
704
+ width: 100%;
705
+ }
706
+ .text-footer-container .text-footer.almostFull {
707
+ width: 95%;
708
+ }
709
+ .text-footer-container .text-footer.medium {
710
+ width: 75%;
711
+ }
712
+ .text-footer-container.bigger .text-footer {
713
+ height: 80px;
714
+ }
715
+ .text-footer-container.bigger .text-footer > textarea {
716
+ font-size: 0.875rem;
717
+ height: 75px;
718
+ max-height: 75px;
719
+ min-height: 75px;
720
+ }
721
+ .text-footer-container textarea {
722
+ margin: 0 5px;
723
+ border: unset;
724
+ flex: 1;
725
+ resize: none;
726
+ min-height: 30px;
727
+ max-height: 60px;
728
+ font-size: 0.875rem;
729
+ font-family: inherit;
730
+ background: inherit;
731
+ }
732
+ .text-footer-container textarea:focus {
733
+ outline: unset;
734
+ }
735
+ .text-footer-container textarea::placeholder {
736
+ font-size: 0.75rem;
737
+ }
738
+ .text-footer-container .text-footer-audio {
739
+ flex: 1;
740
+ display: flex;
741
+ justify-content: center;
742
+ align-items: center;
743
+ }
744
+ .text-footer-container audio {
745
+ flex: 1;
746
+ outline: unset;
747
+ width: auto;
748
+ height: 38px;
749
+ }
750
+ .text-footer-container .delete-audio {
751
+ display: flex;
752
+ justify-content: center;
753
+ align-items: center;
754
+ color: #e74c3c;
755
+ transition: background 300ms;
756
+ border-radius: 50%;
757
+ font-size: 1rem;
758
+ padding: 10px;
759
+ cursor: pointer;
760
+ margin: 0 5px;
761
+ width: 31px;
762
+ height: 31px;
763
+ }
764
+ .text-footer-container .delete-audio:hover {
765
+ background-color: rgba(208, 0, 0, 0.2);
766
+ }
767
+ .text-footer-container .max-characters {
768
+ font-size: 0.575rem;
769
+ z-index: 1;
770
+ color: #444;
771
+ position: relative;
772
+ top: 30px;
773
+ left: -30px;
774
+ }
775
+ .text-footer-container .max-characters.no-width {
776
+ width: 0;
777
+ }
778
+ .text-footer-container .text-footer-actions {
779
+ display: flex;
780
+ }
781
+ .text-footer-container .text-footer-actions.outside-buttons {
782
+ display: flex;
783
+ align-items: center;
784
+ justify-content: flex-end;
785
+ position: absolute;
786
+ top: -30px;
787
+ right: 35px;
788
+ background-color: #fafafa;
789
+ }
790
+ .text-footer-container .text-footer-actions .text-footer-actions--btn {
791
+ display: flex;
792
+ justify-content: center;
793
+ align-items: center;
794
+ color: #777;
795
+ border-radius: 50%;
796
+ transition: background 300ms;
797
+ padding: 10px;
798
+ font-size: 1rem;
799
+ width: 36px;
800
+ height: 36px;
801
+ cursor: pointer;
802
+ margin-right: 2.5px;
803
+ }
804
+ .text-footer-container
805
+ .text-footer-actions
806
+ .text-footer-actions--btn:last-child {
807
+ margin-right: unset;
808
+ }
809
+ .text-footer-container .text-footer-actions .text-footer-actions--btn:hover {
810
+ background-color: rgba(0, 0, 0, 0.1);
811
+ }
812
+ .text-footer-container
813
+ .text-footer-actions
814
+ .text-footer-actions--btn.files-activated {
815
+ background-color: rgba(0, 0, 0, 0.1);
816
+ }
817
+ .text-footer-container
818
+ .text-footer-actions
819
+ .text-footer-actions--btn.audio-activated {
820
+ background-color: rgba(208, 0, 0, 0.7);
821
+ color: #fff;
822
+ }
823
+ .text-footer-container
824
+ .text-footer-actions
825
+ .text-footer-actions--btn.left-button {
826
+ position: absolute;
827
+ left: 0;
828
+ }
829
+ .text-footer-container .text-footer-hsm-container {
830
+ margin: 12px 0 7px 0;
831
+ }
832
+ .text-footer-container .text-footer-hsm-container.full {
833
+ width: 100%;
834
+ }
835
+ .text-footer-container .text-footer-hsm-container.almostFull {
836
+ width: 95%;
837
+ }
838
+ .text-footer-container .text-footer-hsm-container.medium {
839
+ width: 75%;
840
+ }
841
+ .text-footer-container .text-footer-hsm-container .text-footer-v-select {
842
+ border-radius: 5px;
843
+ margin-bottom: 5px;
844
+ }
845
+ .text-footer-container .text-footer-hsm-container .text-footer-select-03 {
846
+ display: flex;
847
+ align-items: center;
848
+ flex: 1;
849
+ width: 100%;
850
+ }
851
+ .text-footer-container
852
+ .text-footer-hsm-container
853
+ .text-footer-select-03
854
+ .text-footer-v-select {
855
+ flex: 1;
856
+ }
857
+ .text-footer-container
858
+ .text-footer-hsm-container
859
+ .text-footer-select-03
860
+ .text-footer--btn-select-03 {
861
+ transition-duration: 300ms;
862
+ user-select: none;
863
+ cursor: pointer;
864
+ box-shadow: inset 0 -3px rgba(0, 0, 0, 0.2);
865
+ opacity: 0.9;
866
+ border-radius: 2.5px;
867
+ display: flex;
868
+ justify-content: center;
869
+ align-items: center;
870
+ margin-left: 5px;
871
+ margin-bottom: 5px;
872
+ background-color: #f7fe72;
873
+ width: 32px;
874
+ height: 32px;
875
+ }
876
+ .text-footer-container
877
+ .text-footer-hsm-container
878
+ .text-footer-select-03
879
+ .text-footer--btn-select-03:hover {
880
+ opacity: 1;
881
+ }
882
+ .text-footer-container
883
+ .text-footer-hsm-container
884
+ .text-footer-select-03
885
+ .text-footer--btn-select-03:active {
886
+ opacity: 1;
887
+ box-shadow: inset 0 -1px rgba(0, 0, 0, 0.2);
888
+ -webkit-transform: translateY(1px);
889
+ -moz-transform: translateY(1px);
890
+ -o-transform: translateY(1px);
891
+ -ms-transform: translateY(1px);
892
+ transform: translateY(1px);
893
+ }
894
+ .text-footer-container
895
+ .text-footer-hsm-container
896
+ .text-footer-select-03
897
+ .text-footer--btn-select-03
898
+ svg {
899
+ font-size: 1rem;
900
+ }
901
+ .text-footer-container .text-footer-files-container {
902
+ position: absolute;
903
+ right: 0;
904
+ top: -55px;
905
+ padding: 5px;
906
+ background-color: rgba(0, 0, 0, 0.4);
907
+ border-radius: 5px;
908
+ display: flex;
909
+ align-items: center;
910
+ justify-content: space-between;
911
+ z-index: 1;
912
+ }
913
+ .text-footer-container .text-footer-files-container.horizontal {
914
+ right: -55px;
915
+ flex-direction: column;
916
+ }
917
+ .text-footer-container .text-footer-files-container .files-btn {
918
+ transition-duration: 300ms;
919
+ transition-property: opacity;
920
+ opacity: 0.8;
921
+ cursor: pointer;
922
+ display: flex;
923
+ justify-content: center;
924
+ align-items: center;
925
+ border-radius: 10px;
926
+ padding: 3px;
927
+ width: 40px;
928
+ height: 40px;
929
+ font-size: 1rem;
930
+ color: #fff;
931
+ }
932
+ .text-footer-container .text-footer-files-container .files-btn:hover {
933
+ opacity: 1;
934
+ }
935
+ .text-footer-container .text-footer-files-container .files-btn svg {
936
+ color: #fff;
937
+ }
938
+ .text-footer-container .text-footer-files-container .files-btn.images {
939
+ background-color: #9575cd;
940
+ margin-right: 5px;
941
+ }
942
+ .text-footer-container
943
+ .text-footer-files-container
944
+ .files-btn.images.margin-bottom {
945
+ margin-right: unset;
946
+ margin-bottom: 5px;
947
+ }
948
+ .text-footer-container .text-footer-files-container .files-btn.docs {
949
+ background-color: #7986cb;
950
+ }
951
+ .text-footer-container .text-footer-files-container .files-btn.system {
952
+ background-color: #49a349;
953
+ margin-left: 5px;
954
+ }
955
+ .text-footer-container .text-footer-files-container .files-btn.both {
956
+ font-size: 0.95rem;
957
+ background-color: rgb(85, 85, 236);
958
+ flex-direction: column;
959
+ }
960
+ .text-footer-container
961
+ .text-footer-files-container
962
+ .files-btn.both
963
+ svg:nth-child(1) {
964
+ transform: translateX(5px);
965
+ }
966
+ .text-footer-container
967
+ .text-footer-files-container
968
+ .files-btn.both
969
+ svg:nth-child(2) {
970
+ transform: translateX(-5px);
971
+ }
972
+
973
+ .text-footer-container .text-footer-preview-container {
974
+ width: 100%;
975
+ cursor: default;
976
+ position: absolute;
977
+ left: 0;
978
+ background-color: #f1f1f1;
979
+ border: 2px solid #ccc;
980
+ border-bottom: unset;
981
+ border-top-left-radius: 2.5px;
982
+ border-top-right-radius: 2.5px;
983
+ }
984
+ .text-footer-container .text-footer-preview-container.isDoc {
985
+ top: -50px;
986
+ width: 100%;
987
+ height: 45px;
988
+ }
989
+ .text-footer-container .text-footer-preview-container.isImg,
990
+ .text-footer-container .text-footer-preview-container.isMultiple {
991
+ top: -205px;
992
+ width: 100%;
993
+ height: 200px;
994
+ }
995
+ .text-footer-container
996
+ .text-footer-preview-container.isImg
997
+ .text-footer-image-preview {
998
+ height: 170px;
999
+ }
1000
+ .text-footer-container .text-footer-preview-container.isError {
1001
+ top: -80px;
1002
+ width: 100%;
1003
+ height: 75px;
1004
+ }
1005
+
1006
+ .text-footer-container .text-footer-alt {
1007
+ margin-top: -12px;
1008
+ width: 100%;
1009
+ padding: 0 10px;
1010
+ }
1011
+ .text-footer-container .text-footer-alt .text-footer-out-session {
1012
+ margin-top: 12px;
1013
+ }
1014
+ .text-footer-container .text-footer-alt .text-footer-sem-24h {
1015
+ font-size: 0.8rem;
1016
+ text-align: right;
1017
+ font-weight: 600;
1018
+ letter-spacing: -0.5px;
1019
+ color: #dd7f0c;
1020
+ margin-top: 5px;
1021
+ position: absolute;
1022
+ right: 0;
1023
+ }
1024
+ .text-footer-container .text-footer-alt .sem-templates {
1025
+ margin-top: 10px;
1026
+ font-size: 0.8rem;
1027
+ text-align: right;
1028
+ font-weight: 600;
1029
+ letter-spacing: -0.5px;
1030
+ color: #921e12;
1031
+ }
1032
+ .text-footer-container .text-footer-alt .text-footer-templates {
1033
+ position: relative;
1034
+ width: 100%;
1035
+ }
1036
+ .text-footer-container
1037
+ .text-footer-alt
1038
+ .text-footer-templates
1039
+ .text-footer-group-selection {
1040
+ width: 100%;
1041
+ display: flex;
1042
+ align-items: center;
1043
+ }
1044
+ .text-footer-container
1045
+ .text-footer-alt
1046
+ .text-footer-templates
1047
+ .text-footer-group-selection
1048
+ h4 {
1049
+ margin-right: 5px;
1050
+ }
1051
+ .text-footer-container
1052
+ .text-footer-alt
1053
+ .text-footer-templates
1054
+ .text-footer-group-selection
1055
+ .sm__select {
1056
+ flex: 1;
1057
+ }
1058
+
1059
+ .vs__dropdown-menu {
1060
+ font-size: 0.85rem !important;
1061
+ }
1062
+
1063
+ .emoji-mart-anchor,
1064
+ .emoji-mart-emoji span {
1065
+ cursor: pointer !important;
1066
+ }
1067
+
1068
+ .emoji-mart {
1069
+ z-index: 2 !important;
1070
+ }
1071
+
1072
+ .emoji-mart-scroll {
1073
+ overflow-x: hidden;
1074
+ }
1075
+ </style>