vue-intergrall-plugins 0.0.1075 → 1.0.0

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 (37) hide show
  1. package/README.md +13 -5
  2. package/dist/vue-intergrall-plugins.min.js +1 -1
  3. package/package.json +70 -62
  4. package/src/lib-components/Buttons/IconButton.vue +27 -0
  5. package/src/lib-components/Buttons/SimpleButton.vue +140 -0
  6. package/src/lib-components/Cards/Card.vue +429 -0
  7. package/src/lib-components/Cards/CardCheck.vue +35 -0
  8. package/src/lib-components/Cards/CardFile.vue +157 -0
  9. package/src/lib-components/Chat/AudioSpeedControl.vue +60 -0
  10. package/src/lib-components/Chat/BtnDownloadAllFiles.vue +36 -0
  11. package/src/lib-components/Chat/BtnEmojis.vue +51 -45
  12. package/src/lib-components/Chat/BtnFiles.vue +408 -131
  13. package/src/lib-components/Chat/BtnScreenShare.vue +36 -0
  14. package/src/lib-components/Chat/BtnStandardMessages.vue +17 -0
  15. package/src/lib-components/Chat/ExpandTextarea.vue +5 -6
  16. package/src/lib-components/Chat/MultipleFilePreview.vue +40 -22
  17. package/src/lib-components/Chat/Picker.vue +185 -149
  18. package/src/lib-components/Chat/SingleFilePreview.vue +28 -7
  19. package/src/lib-components/Chat/StandardMessages.vue +245 -0
  20. package/src/lib-components/Chat/TextFooter.vue +791 -451
  21. package/src/lib-components/Email/EmailFile.vue +126 -0
  22. package/src/lib-components/Email/EmailItem.vue +186 -0
  23. package/src/lib-components/Loader/Loader.vue +6 -1
  24. package/src/lib-components/Messages/AnexoMensagem.vue +442 -0
  25. package/src/lib-components/Messages/CardAttachment.vue +61 -0
  26. package/src/lib-components/Messages/CardMessages.vue +666 -0
  27. package/src/lib-components/Messages/ChatMessages.vue +1082 -0
  28. package/src/lib-components/Messages/InteratividadeBotoes.vue +165 -0
  29. package/src/lib-components/Messages/InteratividadeFormulario.vue +392 -0
  30. package/src/lib-components/Messages/InteratividadePopup.vue +89 -0
  31. package/src/lib-components/Messages/LinkPreview.vue +189 -0
  32. package/src/lib-components/Scroll/ScrollContent.vue +166 -0
  33. package/src/lib-components/Templates/TemplateGenerator.vue +187 -50
  34. package/src/lib-components/Templates/TemplateMessage.vue +12 -1
  35. package/src/lib-components/Templates/TemplateSingle.vue +232 -13
  36. package/dist/vue-intergrall-plugins.esm.js +0 -5693
  37. package/dist/vue-intergrall-plugins.ssr.js +0 -5033
@@ -1,7 +1,19 @@
1
1
  <template>
2
- <div class="text-footer-container" :class="{'bigger' : cssStyle.height}" v-on-clickaway="away" v-if="textId" @drop.stop="dropFile" @dragenter.prevent @dragover.prevent>
3
- <div class="text-footer" :class="cssStyle.width ? cssStyle.width: ''" :style="`background-color: ${cssStyle.backgroundColor}`">
4
- <BtnEmojis
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
5
17
  v-show="buttons.hasEmojis && !audioFile"
6
18
  :ref="`${this.textId}`"
7
19
  :emojiId="`${this.textId}`"
@@ -13,7 +25,7 @@
13
25
  <transition name="fade">
14
26
  <Loader v-if="isSending" />
15
27
  </transition>
16
- <textarea
28
+ <textarea
17
29
  class="js-autoresize"
18
30
  v-if="!audioFile"
19
31
  v-model="message"
@@ -21,119 +33,249 @@
21
33
  :disabled="textareaSettings.disabled"
22
34
  :placeholder="textareaSettings.placeholderMessage"
23
35
  @input="sendFinalMessage"
24
- @keydown.up="toggleHSM"
25
- @keydown.down="toggleHSM"
36
+ @keydown.up="toggleStandardMessages"
37
+ @keydown.down="toggleStandardMessages"
26
38
  @keydown.esc="closeEmojis"
27
39
  @keydown.enter="sendMessageHandler"
28
40
  @paste="pasteImage"
29
41
  ></textarea>
30
42
  <div class="text-footer-audio" v-else>
31
- <audio :src="audioSource" controls="controls"></audio>
43
+ <div>
44
+ <audio :src="audioSource" controls="controls"></audio>
45
+ </div>
46
+
32
47
  <span class="delete-audio" title="Cancelar" @click="deleteAudio">
33
48
  <fa-icon :icon="['fas', 'times']" />
34
49
  </span>
35
50
  </div>
36
- <RemainingCharacters
37
- :class="{'d-none' : audioFile}"
51
+ <RemainingCharacters
52
+ :class="{ 'd-none': audioFile }"
38
53
  :message="message"
39
54
  :maxCharacters="textareaSettings.maxCharacters"
40
55
  />
41
- <div class="text-footer-actions" v-if="buttons.hasSendButton">
42
- <span class="text-footer-actions--btn" :title="dictionary.title_enviar_msg" @click="sendMessageHandler">
43
- <fa-icon :icon="['fas', 'paper-plane']" />
44
- </span>
45
- </div>
46
- <div v-if="buttons.hasFiles || buttons.hasAudio" class="text-footer-actions" :class="{'outside-buttons' : cssStyle.outsideButtons && !audioFile}">
47
- <BtnMic
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
48
81
  v-show="buttons.hasAudio && !audioFile"
49
82
  :dictionary="dictionary"
50
83
  @set-audio="setAudio"
51
- :ref="`${textId}-mic`"
84
+ :ref="`${textId}-mic`"
52
85
  />
53
- <BtnFiles
54
- v-show="buttons.hasFiles && !audioFile"
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"
55
94
  :textId="textId"
56
95
  :dictionary="dictionary"
57
96
  :fileSettings="fileSettings"
58
97
  :cssStyle="cssStyle"
59
98
  :ref="`${textId}-file`"
99
+ :hasButtonFiles="hasButtonFiles"
100
+ :externalFiles="externalFiles"
60
101
  @set-file-vars="setFileVars"
61
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')"
62
107
  />
63
- <BtnExpand
108
+ <BtnExpand
64
109
  v-show="buttons.hasExpand && !audioFile"
110
+ :ref="`${textId}-expand`"
65
111
  @expand-textarea="$emit('expand-textarea')"
66
112
  :dictionary="dictionary"
67
113
  />
68
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>
69
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>
70
150
  </div>
71
151
  </template>
72
152
 
73
153
  <script>
74
- import { setResizeListeners, resetTargets } from "@/services/autoResize"
75
- import { mixin as clickaway } from "vue-clickaway"
76
- import { returnMessageWithHexa } from "@/services/textFormatting"
154
+ import { setResizeListeners, resetTargets } from "../../services/autoResize";
155
+ import { mixin as clickaway } from "vue-clickaway";
156
+ import { returnMessageWithHexa } from "../../services/textFormatting";
77
157
 
78
- import BtnEmojis from "./BtnEmojis"
79
- import Loader from "../Loader/Loader"
80
- import RemainingCharacters from "./RemainingCharacters"
81
- import BtnMic from "./BtnMic"
82
- import BtnFiles from "./BtnFiles"
83
- import BtnExpand from "./BtnExpand"
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";
84
168
 
85
169
  export default {
86
- components: { BtnEmojis, Loader, BtnMic, BtnFiles, BtnExpand, RemainingCharacters },
87
- mixins: [ clickaway ],
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],
88
183
  props: {
89
184
  buttons: {
90
185
  type: Object,
91
- default: () => { return { hasEmojis: false, hasSendButton: false, hasFiles: false, hasAudio: false, hasExpand: false } },
92
- required: false
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,
93
197
  },
94
198
  cssStyle: {
95
199
  type: Object,
96
- default: () => { return { height: false, width: "full", backgroundColor: "#FFF", outsideButtons: false } },
97
- required: false
200
+ default: () => {
201
+ return {
202
+ height: false,
203
+ width: "full",
204
+ backgroundColor: "#FFF",
205
+ outsideButtons: false,
206
+ };
207
+ },
208
+ required: false,
98
209
  },
99
210
  textareaSettings: {
100
211
  type: Object,
101
- default: () => { return { placeholderMessage: "", maxCharacters: 0, sendOnEnter: false, disabled: false } },
102
- required: false
212
+ default: () => {
213
+ return {
214
+ placeholderMessage: "",
215
+ maxCharacters: 0,
216
+ sendOnEnter: false,
217
+ disabled: false,
218
+ };
219
+ },
220
+ required: false,
103
221
  },
104
222
  emojiSettings: {
105
223
  type: Object,
106
- default: () => { return { openEmojisFrom: "top", smallEmojis: false } },
107
- required: false
224
+ default: () => {
225
+ return { openEmojisFrom: "top", smallEmojis: false };
226
+ },
227
+ required: false,
108
228
  },
109
229
  formattedMessageSettings: {
110
230
  type: Object,
111
- default: () => { return { hasHsm: false, msgType: 0 } },
112
- required: false
231
+ default: () => {
232
+ return { hasStandardMessages: false, msgType: 0, token_cliente: "" };
233
+ },
234
+ required: false,
113
235
  },
114
236
  fileSettings: {
115
237
  type: Object,
116
- default: () => { return { docsExtensions: "", imagesExtensions: "", multiple: false } },
117
- required: false
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,
118
252
  },
119
253
  textId: {
120
254
  type: String,
121
- required: true
255
+ required: true,
122
256
  },
123
257
  isMainChat: {
124
258
  type: Boolean,
125
259
  default: false,
126
- required: false
260
+ required: false,
127
261
  },
128
262
  isSending: {
129
263
  type: Boolean,
130
264
  default: false,
131
- required: false
265
+ required: false,
132
266
  },
133
267
  dictionary: {
134
268
  type: Object,
135
- required: true
136
- }
269
+ required: true,
270
+ },
271
+ hasButtonFiles: {
272
+ type: Boolean,
273
+ required: false,
274
+ },
275
+ externalFiles: {
276
+ type: Array,
277
+ required: false,
278
+ },
137
279
  },
138
280
  data() {
139
281
  return {
@@ -145,255 +287,347 @@ export default {
145
287
  isDoc: false,
146
288
  fileFormatError: false,
147
289
  audioFile: "",
148
- audioSource: ""
149
- }
290
+ audioSource: "",
291
+ showStandardMessages: false,
292
+ messageType: 1,
293
+ };
150
294
  },
151
295
  created() {
152
- this.$root.$refs[`tf-${this.textId}`] = this
296
+ this.$root.$refs[`tf-${this.textId}`] = this;
153
297
  },
154
298
  mounted() {
155
- setResizeListeners(this.$el, ".js-autoresize", ".js-parentresize")
299
+ setResizeListeners(this.$el, ".js-autoresize", ".js-parentresize");
300
+ window.addEventListener("message", this.listenerPostMessage, false);
156
301
 
157
302
  // this.$root.$on("drop-file", (file, type) => { if(this.buttons.hasFiles) this.fileUpload(file, type, true) })
158
- // this.$root.$on("toggle-msg-formatada", () => { this.toggleHSM() })
303
+ // this.$root.$on("toggle-msg-formatada", () => { this.toggleStandardMessages() })
159
304
  // this.$root.$on("textarea-focus", () => { this.focusTextarea() })
160
305
  // this.$root.$on("resize-footer-template", () => { this.adjustChatHeight() })
161
306
  // this.$root.$on("clear-footer-message", () => { this.message = "" })
162
307
  // if(this.cssStyle.outsideButtons) if(this.$root.$refs.chatCorpo) this.$root.$refs.chatCorpo.setOutsideButtons(this.cssStyle.outsideButtons)
163
308
  },
164
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
+ },
165
339
  closeEmojis() {
166
340
  try {
167
- this.$root.$refs[`etf-${this.textId}`].showEmojis ? this.$root.$refs[`etf-${this.textId}`].away() : ''
168
- }catch(e) {
169
- console.error("Nao foi possivel fechar os emojis")
170
- console.error(e)
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);
171
347
  }
172
348
  },
173
349
  away() {
174
- if(this.$refs[`${this.textId}-file`]) this.$refs[`${this.textId}-file`].openFiles = false
350
+ if (this.$refs[`${this.textId}-file`])
351
+ this.$refs[`${this.textId}-file`].openFiles = false;
175
352
  },
176
353
  setDefaultMessage(msg) {
177
- this.message = msg
178
- this.sendFinalMessage()
354
+ this.message = msg;
355
+ this.sendFinalMessage();
179
356
  },
180
357
  insertEmoji(emoji) {
181
358
  try {
182
- const textarea = document.querySelector(`#text-footer-${this.textId}`)
183
- console.log("emoji: ", emoji)
184
- console.log(textarea)
359
+ if (!emoji) return;
360
+ const textarea = document.querySelector(`#text-footer-${this.textId}`);
185
361
  if (document.activeElement === textarea) {
186
- const cursorStart = textarea.selectionStart
187
- const cursorEnd = textarea.selectionEnd
362
+ const cursorStart = textarea.selectionStart;
363
+ const cursorEnd = textarea.selectionEnd;
188
364
  if (cursorEnd == textarea.value.length) {
189
- this.message += emoji.finalEmoji
365
+ this.message += emoji.finalEmoji;
190
366
  textarea.setSelectionRange(textarea.value.length, textarea.value.length);
191
367
  } else {
192
368
  const initValue = textarea.value.slice(0, cursorStart) + emoji.finalEmoji;
193
- const endValue = textarea.value.slice(cursorEnd)
194
- this.message = initValue + endValue
369
+ const endValue = textarea.value.slice(cursorEnd);
370
+ this.message = initValue + endValue;
195
371
  textarea.setSelectionRange(initValue.length, initValue.length);
196
372
  }
197
373
  } else {
198
- this.message += emoji.finalEmoji
374
+ this.message += emoji.finalEmoji;
199
375
  }
200
- this.sendFinalMessage()
201
- }catch(e) {
202
- console.error("Erro ao inserir emoji")
203
- console.error(e)
376
+ this.sendFinalMessage();
377
+ } catch (e) {
378
+ console.error("Erro ao inserir emoji");
379
+ console.error(e);
204
380
  }
205
381
  },
206
382
  verifyMessage() {
207
- if(this.textareaSettings.maxCharacters && this.message) {
208
- if(this.message.length > this.textareaSettings.maxCharacters) {
209
- if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.limiteCaracter()
210
- return false
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;
211
388
  }
212
389
  }
213
390
 
214
- if((!this.message || !this.message.trim()) && !this.hasAnyFile && !this.audioFile) return false
391
+ if ((!this.message || !this.message.trim()) && !this.hasAnyFile && !this.audioFile)
392
+ return false;
215
393
 
216
- if(this.textareaSettings.disabled) return false
394
+ if (this.textareaSettings.disabled) return false;
217
395
 
218
- if(this.fileFormatError) {
219
- if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({ msg: this.dictionary.msg_formato_invalido })
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
+ });
220
401
  const str = {
221
402
  img: this.fileSettings.imagesExtensions.split("|").join(", "),
222
- doc: this.fileSettings.docsExtensions.split("|").join(", ")
223
- }
224
- if (!document.querySelector(".toasted.toasted-primary.info")) this.$toasted.global.showValidFormats({ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}` })
225
- return false
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;
226
410
  }
227
411
 
228
- return true
412
+ return true;
229
413
  },
230
414
  removeHTMLElementsFromMessage(message) {
231
- const regexTags = /<\/?[\d\w\s=\-:./'";]+>/gi
232
- if(message.match(regexTags)) message = message.replace(regexTags, ' ')
233
- return message
415
+ const regexTags = /<\/?[\d\w\s=\-:./'";]+>/gi;
416
+ if (message.match(regexTags)) message = message.replace(regexTags, " ");
417
+ return message;
234
418
  },
235
419
  formatMessage(message) {
236
- if(!message) return ""
237
- message = message.trim()
238
- message = message.replace(/\n$/, "", message)
239
- message = returnMessageWithHexa(message)
240
- message = this.removeHTMLElementsFromMessage(message)
241
- return 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;
242
426
  },
243
427
  sendFinalMessage() {
244
- const messageAux = this.formatMessage(this.message)
245
- this.$emit("final-message", messageAux)
428
+ const messageAux = this.formatMessage(this.message);
429
+ this.$emit("final-message", messageAux);
246
430
  },
247
431
  sendMessageHandler(event) {
248
- this.sendMessage(event)
432
+ this.sendMessage(event);
249
433
  },
250
434
  sendMessage(event) {
251
- if(this.isSending) return
435
+ if (this.isSending) return;
252
436
 
253
- if(this.isMainChat && event){
254
- if(this.textareaSettings.sendOnEnter){
255
- if(event.keyCode == 13 && !event.shiftKey) event.preventDefault()
256
- if(event.shiftKey) return
257
- }else{
258
- if(event.keyCode == 13) {
259
- if(!event.shiftKey) return
260
- event.preventDefault()
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();
261
445
  }
262
446
  }
263
447
  }
264
448
 
265
- if(!this.buttons.hasSendButton) return
449
+ if (!this.buttons.hasSendButton) return;
266
450
 
267
- const messageAux = this.formatMessage(this.message)
268
- if(this.verifyMessage()){
269
- if(messageAux || this.hasAnyFile || this.audioFile) {
270
- this.$emit("send-message", messageAux)
271
- const objMessage = this.returnObjectMessage(messageAux)
272
- this.$emit("obj-message", objMessage)
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);
273
457
 
274
- if(this.$refs[`emoji-text-${this.textId}`] && this.$refs[`emoji-text-${this.textId}`].showEmojis) this.$refs[`emoji-text-${this.textId}`].toggleEmojiSelection()
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();
275
463
 
276
- this.resetFooterData()
464
+ this.resetFooterData();
277
465
  }
278
466
  }
279
467
  },
280
468
  focusTextarea() {
281
- const textarea = document.querySelector(`#text-footer-${this.textId}`)
282
- if(textarea) textarea.focus()
469
+ const textarea = document.querySelector(`#text-footer-${this.textId}`);
470
+ if (textarea) textarea.focus();
283
471
  },
284
472
  resetFooterData() {
285
- if(this.audioFile) this.deleteAudio()
286
- if(this.hasAnyFile) this.$refs[`${this.textId}-file`].deleteFile()
287
- this.message = ""
288
- this.sendFinalMessage()
289
- resetTargets(this.$el, ".js-autoresize", ".js-parentresize", "38px")
290
- this.focusTextarea()
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();
291
479
  },
292
480
  returnObjectMessage(message) {
293
481
  return {
294
482
  message,
295
- attachment: this.hasAnyFile ? this.file : false,
483
+ attachment: this.hasAnyFile ? this.file : false,
296
484
  isDoc: this.isDoc,
297
485
  imagePreview: this.imagePreview,
298
486
  isAudio: this.audioFile ? true : false,
299
- audioAttachment: this.audioSource
300
- }
487
+ audioAttachment: this.audioSource,
488
+ };
301
489
  },
302
490
  setFileVars(fileObj) {
303
491
  const { file, imagePreview, isDoc, fileFormatError, hasAnyFile } = fileObj;
304
492
 
305
- this.file = file
306
- this.imagePreview = imagePreview ? imagePreview : ""
307
- this.isDoc = isDoc
308
- this.fileFormatError = fileFormatError
309
- this.hasAnyFile = hasAnyFile
493
+ this.file = file;
494
+ this.imagePreview = imagePreview ? imagePreview : "";
495
+ this.isDoc = isDoc;
496
+ this.fileFormatError = fileFormatError;
497
+ this.hasAnyFile = hasAnyFile;
310
498
 
311
- this.$emit("set-file-vars", fileObj)
499
+ this.$emit("set-file-vars", fileObj);
312
500
  },
313
501
  openImage(imagePreview) {
314
- this.$emit("open-image", 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");
315
509
  },
316
510
  setAudio(audioObj) {
317
- const { audioFile, audioSource } = audioObj
318
- this.audioFile = audioFile
319
- this.audioSource = audioSource
511
+ const { audioFile, audioSource } = audioObj;
512
+ this.audioFile = audioFile;
513
+ this.audioSource = audioSource;
320
514
  },
321
515
  deleteAudio() {
322
- this.$refs[`${this.textId}-mic`].deleteMediaRecorder()
323
- this.audioFile = ""
324
- this.audioSource = ""
516
+ this.$refs[`${this.textId}-mic`].deleteMediaRecorder();
517
+ this.audioFile = "";
518
+ this.audioSource = "";
325
519
  },
326
520
  returnFileType(file, stopAlert) {
327
- const imgRegex = new RegExp("\.("+this.fileSettings.imagesExtensions+")", "i")
328
- if(imgRegex.test(file.name)) return "img"
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";
329
525
 
330
- const docRegex = new RegExp("\.("+this.fileSettings.docsExtensions+")", "i")
331
- if(docRegex.test(file.name)) return "doc"
526
+ const docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
527
+ if (docRegex.test(file.name)) return "doc";
332
528
 
333
- if(!stopAlert) return
334
- if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({ msg: this.dictionary.msg_formato_invalido })
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
+ });
335
534
  const str = {
336
535
  img: this.fileSettings.imagesExtensions.split("|").join(", "),
337
- doc: this.fileSettings.docsExtensions.split("|").join(", ")
338
- }
339
- if (!document.querySelector(".toasted.toasted-primary.info")) this.$toasted.global.showValidFormats({ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}` })
340
- return false
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;
341
543
  },
342
544
  filesHandler(files) {
343
- if(!Array.isArray(files)) files = Array.from(files)
344
- const fileType = this.returnFileType(files[0], true)
345
- let invalidFile = false
545
+ if (!Array.isArray(files)) files = Array.from(files);
546
+ const fileType = this.returnFileType(files[0], true);
547
+ let invalidFile = false;
346
548
  try {
347
- files.forEach(file => {
348
- const singleFileType = this.returnFileType(file, true)
349
- if(!singleFileType) {
350
- invalidFile = true
351
- file.invalid = true
549
+ files.forEach((file) => {
550
+ const singleFileType = this.returnFileType(file, true);
551
+ if (!singleFileType) {
552
+ invalidFile = true;
553
+ file.invalid = true;
352
554
  }
353
- file.imgOrDoc = singleFileType ? singleFileType : ""
354
- })
355
- }catch(e) {
356
- console.error("Erro ao tentar percorrer os arquivos")
357
- console.error(e)
358
- invalidFile = true
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;
359
561
  }
360
562
 
361
- if(!invalidFile) {
362
- this.$refs[`${this.textId}-file`].fileUpload(files, fileType, true)
363
- }else {
364
- if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({ msg: this.dictionary.msg_formato_invalido })
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
+ });
365
570
  const str = {
366
571
  img: this.fileSettings.imagesExtensions.split("|").join(", "),
367
- doc: this.fileSettings.docsExtensions.split("|").join(", ")
368
- }
369
- if (!document.querySelector(".toasted.toasted-primary.info")) this.$toasted.global.showValidFormats({ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}` })
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
+ });
370
578
  }
371
579
  },
372
580
  dropFile(e) {
373
581
  try {
374
- e.stopPropagation()
375
- e.preventDefault()
376
- const files = e.dataTransfer.files.length ? e.dataTransfer.files : ""
377
- this.filesHandler(files)
378
- }catch(e) {
379
- console.error("Erro drop file")
380
- console.error(e)
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);
381
590
  }
382
591
  },
383
592
  pasteImage(e) {
384
593
  try {
385
- if(e.clipboardData.files.length && !this.buttons.hasFiles) {
386
- e.preventDefault()
387
- return
388
- }else if(e.clipboardData.files.length && this.buttons.hasFiles) {
389
- const files = e.clipboardData.files
390
- this.filesHandler(files)
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);
391
600
  }
392
- }catch(e) {
393
- console.error("Nao foi possivel colar a/o imagem/documento")
394
- console.error(e)
601
+ } catch (e) {
602
+ console.error("Nao foi possivel colar a/o imagem/documento");
603
+ console.error(e);
395
604
  }
396
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
+ },
397
631
  },
398
632
  destroyed() {
399
633
  // this.$root.$off("drop-file")
@@ -401,19 +635,24 @@ export default {
401
635
  // this.$root.$off("textarea-focus")
402
636
  // this.$root.$off("clear-footer-message")
403
637
  // this.$root.$off("resize-footer-template")
404
- }
405
- }
638
+
639
+ window.removeEventListener("message", this.listenerPostMessage);
640
+ },
641
+ };
406
642
  </script>
407
643
 
408
644
  <style>
409
645
  .toasted svg {
410
- margin-right: 10px; }
646
+ margin-right: 10px;
647
+ }
411
648
 
412
649
  .d-none {
413
- display: none; }
650
+ display: none;
651
+ }
414
652
 
415
653
  ul {
416
- list-style-type: none; }
654
+ list-style-type: none;
655
+ }
417
656
 
418
657
  .text-footer-container {
419
658
  display: flex;
@@ -421,270 +660,371 @@ ul {
421
660
  align-items: center;
422
661
  flex-direction: column;
423
662
  width: 100%;
424
- position: relative; }
425
- .text-footer-container .text-footer {
426
- min-height: 48px;
427
- box-shadow: 0px 3px 7px -2px rgba(0, 0, 0, 0.45);
428
- position: relative;
429
- display: flex;
430
- justify-content: center;
431
- align-items: center;
432
- border: 1px solid #ccc;
433
- padding: 5px 2px 5px 5px;
434
- border-radius: 5px; }
435
- .text-footer-container .text-footer.full {
436
- width: 100%; }
437
- .text-footer-container .text-footer.almostFull {
438
- width: 95%; }
439
- .text-footer-container .text-footer.medium {
440
- width: 75%; }
441
- .text-footer-container.bigger .text-footer {
442
- height: 80px;
443
- }
444
- .text-footer-container.bigger .text-footer > textarea {
445
- font-size: .875rem;
446
- height: 75px;
447
- max-height: 75px;
448
- min-height: 75px;
449
- }
450
- .text-footer-container textarea {
451
- margin: 0 5px;
452
- border: unset;
453
- flex: 1;
454
- resize: none;
455
- min-height: 30px;
456
- max-height: 60px;
457
- font-size: .875rem;
458
- font-family: inherit;
459
- background: inherit; }
460
- .text-footer-container textarea:focus {
461
- outline: unset; }
462
- .text-footer-container textarea::placeholder {
463
- font-size: .75rem;
464
- }
465
- .text-footer-container .text-footer-audio {
466
- flex: 1;
467
- display: flex;
468
- justify-content: center;
469
- align-items: center; }
470
- .text-footer-container audio {
471
- flex: 1;
472
- outline: unset;
473
- width: auto;
474
- height: 38px; }
475
- .text-footer-container .delete-audio {
476
- display: flex;
477
- justify-content: center;
478
- align-items: center;
479
- color: #E74C3C;
480
- transition: background 300ms;
481
- border-radius: 50%;
482
- font-size: 1rem;
483
- padding: 10px;
484
- cursor: pointer;
485
- margin: 0 5px;
486
- width: 31px;
487
- height: 31px; }
488
- .text-footer-container .delete-audio:hover {
489
- background-color: rgba(208, 0, 0, 0.2); }
490
- .text-footer-container .max-characters {
491
- font-size: .575rem;
492
- z-index: 1;
493
- color: #444;
494
- position: relative;
495
- top: 30px;
496
- left: -30px; }
497
- .text-footer-container .max-characters.no-width {
498
- width: 0; }
499
- .text-footer-container .text-footer-actions {
500
- display: flex; }
501
- .text-footer-container .text-footer-actions.outside-buttons {
502
- display: flex;
503
- align-items: center;
504
- justify-content: flex-end;
505
- position: absolute;
506
- top: -42px;
507
- right: 2px;
508
- background-color: #DDD;
509
- box-shadow: inset 0px -10px 5px -11px rgba(0, 0, 0, 0.5); }
510
- .text-footer-container .text-footer-actions .text-footer-actions--btn {
511
- display: flex;
512
- justify-content: center;
513
- align-items: center;
514
- color: #777;
515
- border-radius: 50%;
516
- transition: background 300ms;
517
- padding: 10px;
518
- font-size: 1rem;
519
- width: 36px;
520
- height: 36px;
521
- cursor: pointer;
522
- margin-right: 2.5px; }
523
- .text-footer-container .text-footer-actions .text-footer-actions--btn:last-child {
524
- margin-right: unset; }
525
- .text-footer-container .text-footer-actions .text-footer-actions--btn:hover {
526
- background-color: rgba(0, 0, 0, 0.1); }
527
- .text-footer-container .text-footer-actions .text-footer-actions--btn.files-activated {
528
- background-color: rgba(0, 0, 0, 0.1); }
529
- .text-footer-container .text-footer-actions .text-footer-actions--btn.audio-activated {
530
- background-color: rgba(208, 0, 0, 0.7);
531
- color: #fff; }
532
- .text-footer-container .text-footer-actions .text-footer-actions--btn.left-button {
533
- position: absolute;
534
- left: 0; }
535
- .text-footer-container .text-footer-hsm-container {
536
- margin: 12px 0 7px 0; }
537
- .text-footer-container .text-footer-hsm-container.full {
538
- width: 100%; }
539
- .text-footer-container .text-footer-hsm-container.almostFull {
540
- width: 95%; }
541
- .text-footer-container .text-footer-hsm-container.medium {
542
- width: 75%; }
543
- .text-footer-container .text-footer-hsm-container .text-footer-v-select {
544
- border-radius: 5px;
545
- margin-bottom: 5px; }
546
- .text-footer-container .text-footer-hsm-container .text-footer-select-03 {
547
- display: flex;
548
- align-items: center;
549
- flex: 1;
550
- width: 100%; }
551
- .text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer-v-select {
552
- flex: 1; }
553
- .text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03 {
554
- transition-duration: 300ms;
555
- user-select: none;
556
- cursor: pointer;
557
- box-shadow: inset 0 -3px rgba(0, 0, 0, 0.2);
558
- opacity: 0.9;
559
- border-radius: 2.5px;
560
- display: flex;
561
- justify-content: center;
562
- align-items: center;
563
- margin-left: 5px;
564
- margin-bottom: 5px;
565
- background-color: #F7FE72;
566
- width: 32px;
567
- height: 32px; }
568
- .text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:hover {
569
- opacity: 1; }
570
- .text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:active {
571
- opacity: 1;
572
- box-shadow: inset 0 -1px rgba(0, 0, 0, 0.2);
573
- -webkit-transform: translateY(1px);
574
- -moz-transform: translateY(1px);
575
- -o-transform: translateY(1px);
576
- -ms-transform: translateY(1px);
577
- transform: translateY(1px); }
578
- .text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03 svg {
579
- font-size: 1rem; }
580
- .text-footer-container .text-footer-files-container {
581
- position: absolute;
582
- right: 0;
583
- top: -55px;
584
- padding: 5px;
585
- background-color: rgba(0, 0, 0, 0.4);
586
- border-radius: 5px;
587
- display: flex;
588
- align-items: center;
589
- justify-content: space-between;
590
- z-index: 1; }
591
- .text-footer-container .text-footer-files-container.horizontal {
592
- right: -55px;
593
- flex-direction: column; }
594
- .text-footer-container .text-footer-files-container .files-btn {
595
- transition-duration: 300ms;
596
- transition-property: opacity;
597
- opacity: .8;
598
- cursor: pointer;
599
- display: flex;
600
- justify-content: center;
601
- align-items: center;
602
- border-radius: 10px;
603
- padding: 3px;
604
- width: 40px;
605
- height: 40px;
606
- font-size: 1rem;
607
- color: #FFF; }
608
- .text-footer-container .text-footer-files-container .files-btn:hover {
609
- opacity: 1; }
610
- .text-footer-container .text-footer-files-container .files-btn svg {
611
- color: #FFF; }
612
- .text-footer-container .text-footer-files-container .files-btn.images {
613
- background-color: #9575cd;
614
- margin-right: 5px; }
615
- .text-footer-container .text-footer-files-container .files-btn.images.margin-bottom {
616
- margin-right: unset;
617
- margin-bottom: 5px; }
618
- .text-footer-container .text-footer-files-container .files-btn.docs {
619
- background-color: #7986cb; }
620
- .text-footer-container .text-footer-preview-container {
621
- cursor: default;
622
- position: absolute;
623
- left: 0;
624
- background-color: #F1f1f1;
625
- border: 2px solid #CCC;
626
- border-bottom: unset;
627
- border-top-left-radius: 2.5px;
628
- border-top-right-radius: 2.5px; }
629
- .text-footer-container .text-footer-preview-container.isDoc {
630
- top: -50px;
631
- width: 100%;
632
- height: 45px; }
633
- .text-footer-container .text-footer-preview-container.isImg, .text-footer-container .text-footer-preview-container.isMultiple {
634
- top: -205px;
635
- width: 100%;
636
- height: 200px; }
637
- .text-footer-container .text-footer-preview-container.isImg .text-footer-image-preview {
638
- height: 170px; }
639
- .text-footer-container .text-footer-preview-container.isError {
640
- top: -80px;
641
- width: 100%;
642
- height: 75px; }
643
-
644
- .text-footer-container .text-footer-alt {
645
- margin-top: -12px;
646
- width: 100%;
647
- padding: 0 10px; }
648
- .text-footer-container .text-footer-alt .text-footer-out-session {
649
- margin-top: 12px; }
650
- .text-footer-container .text-footer-alt .text-footer-sem-24h {
651
- font-size: .8rem;
652
- text-align: right;
653
- font-weight: 600;
654
- letter-spacing: -0.5px;
655
- color: #dd7f0c;
656
- margin-top: 5px;
657
- position: absolute;
658
- right: 0; }
659
- .text-footer-container .text-footer-alt .sem-templates {
660
- margin-top: 10px;
661
- font-size: .8rem;
662
- text-align: right;
663
- font-weight: 600;
664
- letter-spacing: -0.5px;
665
- color: #921e12; }
666
- .text-footer-container .text-footer-alt .text-footer-templates {
667
- position: relative;
668
- width: 100%; }
669
- .text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection {
670
- width: 100%;
671
- display: flex;
672
- align-items: center; }
673
- .text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection h4 {
674
- margin-right: 5px; }
675
- .text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection .sm__select {
676
- flex: 1; }
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
+ }
677
1013
 
678
1014
  .vs__dropdown-menu {
679
- font-size: 0.85rem !important; }
1015
+ font-size: 13.6px !important;
1016
+ }
680
1017
 
681
- .emoji-mart-anchor, .emoji-mart-emoji span {
682
- cursor: pointer !important; }
1018
+ .emoji-mart-anchor,
1019
+ .emoji-mart-emoji span {
1020
+ cursor: pointer !important;
1021
+ }
683
1022
 
684
1023
  .emoji-mart {
685
- z-index: 2 !important; }
1024
+ z-index: 2 !important;
1025
+ }
686
1026
 
687
1027
  .emoji-mart-scroll {
688
- overflow-x: hidden; }
689
-
1028
+ overflow-x: hidden;
1029
+ }
690
1030
  </style>