vue-intergrall-plugins 0.0.97 → 0.0.103

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.
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="text-footer-container" v-on-clickaway="away" v-if="textId" @drop.stop="dropFile" @dragenter.prevent @dragover.prevent>
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
3
  <div class="text-footer" :class="cssStyle.width ? cssStyle.width: ''" :style="`background-color: ${cssStyle.backgroundColor}`">
4
4
  <EmojisTextFooter
5
5
  v-show="buttons.hasEmojis && !audioFile"
@@ -59,6 +59,11 @@
59
59
  @set-file-vars="setFileVars"
60
60
  @open-image="openImage"
61
61
  />
62
+ <BtnExpand
63
+ v-show="buttons.hasExpand && !audioFile"
64
+ @expand-textarea="$emit('expand-textarea')"
65
+ :dictionary="dictionary"
66
+ />
62
67
  </div>
63
68
  </div>
64
69
  </div>
@@ -74,19 +79,20 @@ import Loader from "../Loader/Loader"
74
79
  import RemainingCharacters from "./RemainingCharacters"
75
80
  import BtnMic from "./BtnMic"
76
81
  import BtnFiles from "./BtnFiles"
82
+ import BtnExpand from "./BtnExpand"
77
83
 
78
84
  export default {
79
- components: { EmojisTextFooter, Loader, BtnMic, BtnFiles, RemainingCharacters },
85
+ components: { EmojisTextFooter, Loader, BtnMic, BtnFiles, BtnExpand, RemainingCharacters },
80
86
  mixins: [ clickaway ],
81
87
  props: {
82
88
  buttons: {
83
89
  type: Object,
84
- default: () => { return { hasEmojis: false, hasSendButton: false, hasFiles: false, hasAudio: false } },
90
+ default: () => { return { hasEmojis: false, hasSendButton: false, hasFiles: false, hasAudio: false, hasExpand: false } },
85
91
  required: false
86
92
  },
87
93
  cssStyle: {
88
94
  type: Object,
89
- default: () => { return { width: "full", backgroundColor: "#FFF", outsideButtons: false } },
95
+ default: () => { return { height: false, width: "full", backgroundColor: "#FFF", outsideButtons: false } },
90
96
  required: false
91
97
  },
92
98
  textareaSettings: {
@@ -193,12 +199,12 @@ export default {
193
199
  if(this.textareaSettings.disabled) return false
194
200
 
195
201
  if(this.fileFormatError) {
196
- this.$toasted.global.defaultError({ msg: this.dictionary.msg_formato_invalido })
202
+ if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({ msg: this.dictionary.msg_formato_invalido })
197
203
  const str = {
198
204
  img: this.fileSettings.imagesExtensions.split("|").join(", "),
199
205
  doc: this.fileSettings.docsExtensions.split("|").join(", ")
200
206
  }
201
- this.$toasted.global.showValidFormats({ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}` })
207
+ if (!document.querySelector(".toasted.toasted-primary.info")) this.$toasted.global.showValidFormats({ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}` })
202
208
  return false
203
209
  }
204
210
 
@@ -211,6 +217,7 @@ export default {
211
217
  },
212
218
  formatMessage(message) {
213
219
  if(!message) return ""
220
+ message = message.trim()
214
221
  message = message.replace(/\n$/, "", message)
215
222
  message = returnMessageWithHexa(message)
216
223
  message = this.removeHTMLElementsFromMessage(message)
@@ -312,7 +319,7 @@ export default {
312
319
  img: this.fileSettings.imagesExtensions.split("|").join(", "),
313
320
  doc: this.fileSettings.docsExtensions.split("|").join(", ")
314
321
  }
315
- this.$toasted.global.showValidFormats({ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}` })
322
+ if (!document.querySelector(".toasted.toasted-primary.info")) this.$toasted.global.showValidFormats({ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}` })
316
323
  return false
317
324
  },
318
325
  filesHandler(files) {
@@ -337,12 +344,12 @@ export default {
337
344
  if(!invalidFile) {
338
345
  this.$refs[`${this.textId}-file`].fileUpload(files, fileType, true)
339
346
  }else {
340
- this.$toasted.global.defaultError({ msg: this.dictionary.msg_formato_invalido })
347
+ if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({ msg: this.dictionary.msg_formato_invalido })
341
348
  const str = {
342
349
  img: this.fileSettings.imagesExtensions.split("|").join(", "),
343
350
  doc: this.fileSettings.docsExtensions.split("|").join(", ")
344
351
  }
345
- this.$toasted.global.showValidFormats({ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}` })
352
+ if (!document.querySelector(".toasted.toasted-primary.info")) this.$toasted.global.showValidFormats({ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}` })
346
353
  }
347
354
  },
348
355
  dropFile(e) {
@@ -414,6 +421,15 @@ ul {
414
421
  width: 95%; }
415
422
  .text-footer-container .text-footer.medium {
416
423
  width: 75%; }
424
+ .text-footer-container.bigger .text-footer {
425
+ height: 80px;
426
+ }
427
+ .text-footer-container.bigger .text-footer > textarea {
428
+ font-size: .875rem;
429
+ height: 75px;
430
+ max-height: 75px;
431
+ min-height: 75px;
432
+ }
417
433
  .text-footer-container textarea {
418
434
  margin: 0 5px;
419
435
  border: unset;
@@ -460,7 +476,7 @@ ul {
460
476
  color: #444;
461
477
  position: relative;
462
478
  top: 30px;
463
- left: 5px; }
479
+ left: -30px; }
464
480
  .text-footer-container .max-characters.no-width {
465
481
  width: 0; }
466
482
  .text-footer-container .text-footer-actions {
@@ -589,7 +605,7 @@ ul {
589
605
  position: absolute;
590
606
  left: 0;
591
607
  background-color: #F1f1f1;
592
- border: 2px solid #222;
608
+ border: 2px solid #CCC;
593
609
  border-bottom: unset;
594
610
  border-top-left-radius: 2.5px;
595
611
  border-top-right-radius: 2.5px; }
@@ -607,47 +623,7 @@ ul {
607
623
  top: -80px;
608
624
  width: 100%;
609
625
  height: 75px; }
610
- .text-footer-container .text-footer-preview-container .text-footer-exclude-file {
611
- position: absolute;
612
- top: 5px;
613
- right: 5px;
614
- cursor: pointer;
615
- display: flex;
616
- justify-content: center;
617
- align-items: center;
618
- min-width: 1rem;
619
- min-height: 1rem;
620
- background-color: #FFF;
621
- border-radius: 50%;
622
- }
623
- .text-footer-container .text-footer-preview-container .text-footer-exclude-file svg {
624
- transition: color 200ms;
625
- color: #e9594a; }
626
- .text-footer-container .text-footer-preview-container .text-footer-exclude-file svg:hover {
627
- color: #E74C3C; }
628
- .text-footer-container .text-footer-preview-container .text-footer-preview-title {
629
- font-size: 1rem;
630
- padding: 10px 0 0 10px;
631
- white-space: nowrap;
632
- overflow: hidden;
633
- text-overflow: ellipsis; }
634
- .text-footer-container .text-footer-preview-container .text-footer-image-preview {
635
- display: flex;
636
- justify-content: center;
637
- align-items: center;
638
- width: 100%; }
639
- .text-footer-container .text-footer-preview-container .text-footer-image-preview img {
640
- cursor: pointer;
641
- max-width: 98%;
642
- max-height: 98%;
643
- padding: 2%; }
644
- .text-footer-container .text-footer-preview-container .text-footer-invalid-format {
645
- color: #222;
646
- padding: 10px; }
647
- .text-footer-container .text-footer-preview-container .text-footer-invalid-format h3 {
648
- font-weight: 500; }
649
- .text-footer-container .text-footer-preview-container .text-footer-invalid-format h4 {
650
- font-size: .9rem; }
626
+
651
627
  .text-footer-container .text-footer-alt {
652
628
  margin-top: -12px;
653
629
  width: 100%;
@@ -212,6 +212,7 @@ h1, h2, h3, h4, p { margin: 0; padding: 0 }
212
212
 
213
213
  .tg-container {
214
214
  width: 100%;
215
+ max-width: 800px;
215
216
  display: flex;
216
217
  flex-direction: column;
217
218
  overflow-x: hidden;
@@ -250,6 +251,9 @@ h1, h2, h3, h4, p { margin: 0; padding: 0 }
250
251
  text-overflow: ellipsis;
251
252
  flex: 1;
252
253
  }
254
+ .tg-select .vs__selected-options > input {
255
+ flex-grow: 0;
256
+ }
253
257
 
254
258
  .vs__dropdown-option {
255
259
  transition: background-color 150ms;