vue-intergrall-plugins 1.0.30 → 1.0.32

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,9 +1,6 @@
1
1
  <template>
2
- <span
3
- class="text-footer-actions--btn"
4
- :class="{ 'files-activated': openFiles || file.name }"
5
- @click="openFilesByClip()"
6
- >
2
+ <span class="text-footer-actions--btn" :class="{ 'files-activated': openFiles || file.name }"
3
+ @click="openFilesByClip()">
7
4
  <!-- || file.length -->
8
5
  <!-- <transition name="fade">
9
6
  <span v-if="fileSize > 0" @click.stop="toggleFilePreview" v-tippy :content="`Visualizar ${fileSize} arquivo(s)`" class="files-counter">
@@ -12,19 +9,11 @@
12
9
  </transition> -->
13
10
  <fa-icon :icon="['fas', 'paperclip']" :title="dictionary.title_selecionar_anexo" />
14
11
  <transition name="fade">
15
- <span
16
- v-if="fileSize > 0"
17
- @click.stop="toggleFilePreview"
18
- v-tippy
19
- :content="
20
- !fileSettings.handleFilePreview
21
- ? dictionary.msg_abrir_anexos
22
- : `${file.length} anexo(s) selecionado(s)`
23
- "
24
- :class="`${
25
- fileSettings.filePreviewStyle == 2 ? 'files-counter-2' : 'files-counter'
26
- }`"
27
- >
12
+ <span v-if="fileSize > 0" @click.stop="toggleFilePreview" v-tippy :content="!fileSettings.handleFilePreview
13
+ ? dictionary.msg_abrir_anexos
14
+ : `${file.length} anexo(s) selecionado(s)`
15
+ " :class="`${fileSettings.filePreviewStyle == 2 ? 'files-counter-2' : 'files-counter'
16
+ }`">
28
17
  <template v-if="fileSettings.filePreviewStyle == 1">
29
18
  {{ fileSize }}
30
19
  </template>
@@ -34,103 +23,45 @@
34
23
  </span>
35
24
  </transition>
36
25
  <transition name="show">
37
- <div
38
- v-if="openFiles && hasButtonFiles"
39
- class="text-footer-files-container"
40
- :class="{ horizontal: cssStyle.outsideButtons }"
41
- >
26
+ <div v-if="openFiles && hasButtonFiles" class="text-footer-files-container"
27
+ :class="{ horizontal: cssStyle.outsideButtons }">
42
28
  <template v-if="!fileSettings.multiple">
43
- <div
44
- class="files-btn images"
45
- :class="{ 'margin-bottom': cssStyle.outsideButtons }"
46
- :title="dictionary.title_anexo_img"
47
- @click="openSelectFileHandler('img')"
48
- >
29
+ <div class="files-btn images" :class="{ 'margin-bottom': cssStyle.outsideButtons }"
30
+ :title="dictionary.title_anexo_img" @click="openSelectFileHandler('img')">
49
31
  <fa-icon :icon="['fas', 'image']" />
50
32
  </div>
51
- <div
52
- class="files-btn docs"
53
- :title="dictionary.title_anexo_doc"
54
- @click="openSelectFileHandler('doc')"
55
- >
33
+ <div class="files-btn docs" :title="dictionary.title_anexo_doc" @click="openSelectFileHandler('doc')">
56
34
  <fa-icon :icon="['fas', 'file-alt']" />
57
35
  </div>
58
36
  </template>
59
- <div
60
- v-else
61
- class="files-btn both"
62
- :title="dictionary.title_anexo_arq"
63
- @click="openSelectFileHandler('both')"
64
- >
37
+ <div v-else class="files-btn both" :title="dictionary.title_anexo_arq" @click="openSelectFileHandler('both')">
65
38
  <fa-icon :icon="['fas', 'image']" />
66
39
  <fa-icon :icon="['fas', 'file-alt']" />
67
40
  </div>
68
- <div
69
- v-if="fileSettings.systemButton"
70
- class="files-btn system"
71
- :title="dictionary.title_anexo_sistema"
72
- @click="openSelectFileHandler('system')"
73
- >
41
+ <div v-if="fileSettings.systemButton" class="files-btn system" :title="dictionary.title_anexo_sistema"
42
+ @click="openSelectFileHandler('system')">
74
43
  <fa-icon :icon="['fas', 'server']" />
75
44
  </div>
76
45
  </div>
77
46
  </transition>
78
47
  <div class="files-pointers d-none">
79
- <input
80
- v-if="fileSettings.multiple"
81
- type="file"
82
- :id="`both-${textId}`"
83
- :accept="acceptedExtensions"
84
- multiple
85
- @change="fileUpload($event, 'both')"
86
- />
87
- <input
88
- v-if="!fileSettings.multiple"
89
- type="file"
90
- :id="`img-${textId}`"
91
- :accept="acceptedExtensions"
92
- @change="fileUpload($event, 'img')"
93
- />
94
- <input
95
- v-if="!fileSettings.multiple"
96
- type="file"
97
- :id="`doc-${textId}`"
98
- :accept="acceptedExtensions"
99
- @change="fileUpload($event, 'doc')"
100
- />
48
+ <input v-if="fileSettings.multiple" type="file" :id="`both-${textId}`" :accept="acceptedExtensions" multiple
49
+ @change="fileUpload($event, 'both')" />
50
+ <input v-if="!fileSettings.multiple" type="file" :id="`img-${textId}`" :accept="acceptedExtensions"
51
+ @change="fileUpload($event, 'img')" />
52
+ <input v-if="!fileSettings.multiple" type="file" :id="`doc-${textId}`" :accept="acceptedExtensions"
53
+ @change="fileUpload($event, 'doc')" />
101
54
  </div>
102
55
  <transition name="fade">
103
- <div
104
- class="text-footer-preview-container"
105
- @click.stop
106
- v-show="showFilePreview"
107
- :class="[previewContainerClass]"
108
- v-on-clickaway="away"
109
- >
110
- <SingleFilePreview
111
- v-if="!fileSettings.multiple && showFilePreview"
112
- :dictionary="dictionary"
113
- :file="file"
114
- :isDoc="isDoc"
115
- :fileFormatError="fileFormatError"
116
- :validFileFormats="validFileFormats"
117
- :imagePreview="imagePreview"
118
- :textId="textId"
119
- @delete-file="deleteFile"
120
- @open-image="openImage"
121
- @close="away"
122
- />
123
- <MultipleFilePreview
124
- v-else-if="fileSettings.multiple && showFilePreview"
125
- :dictionary="dictionary"
126
- :file="file"
127
- :fileFormatError="fileFormatError"
128
- :validFileFormats="validFileFormats"
129
- @delete-file="deleteFile"
130
- @delete-specific-file="deleteSpecificFile"
131
- @open-image="openImage"
132
- @close="away"
133
- />
56
+ <div class="text-footer-preview-container" @click.stop v-show="showFilePreview" :class="[previewContainerClass]"
57
+ v-clickaway="away">
58
+ <SingleFilePreview v-if="!fileSettings.multiple && showFilePreview" :dictionary="dictionary" :file="file"
59
+ :isDoc="isDoc" :fileFormatError="fileFormatError" :validFileFormats="validFileFormats"
60
+ :imagePreview="imagePreview" :textId="textId" @delete-file="deleteFile" @open-image="openImage"
61
+ @close="away" />
62
+ <MultipleFilePreview v-else-if="fileSettings.multiple && showFilePreview" :dictionary="dictionary" :file="file"
63
+ :fileFormatError="fileFormatError" :validFileFormats="validFileFormats" @delete-file="deleteFile"
64
+ @delete-specific-file="deleteSpecificFile" @open-image="openImage" @close="away" />
134
65
  </div>
135
66
  </transition>
136
67
  </span>
@@ -141,6 +72,7 @@
141
72
  .fade-leave-active {
142
73
  transition: opacity 0.3s;
143
74
  }
75
+
144
76
  .fade-enter,
145
77
  .fade-leave-to {
146
78
  opacity: 0;
@@ -165,9 +97,11 @@
165
97
  color: #fff;
166
98
  font-weight: 900;
167
99
  }
100
+
168
101
  .files-counter:hover {
169
102
  opacity: 1;
170
103
  }
104
+
171
105
  .files-counter-2 {
172
106
  transform: translate(-15px, 28px);
173
107
  opacity: 0.9;
@@ -178,9 +112,11 @@
178
112
  color: #888;
179
113
  font-size: 12.8px;
180
114
  }
115
+
181
116
  .files-counter-2 svg {
182
117
  margin-left: 5px;
183
118
  }
119
+
184
120
  .files-counter-2:hover {
185
121
  opacity: 1;
186
122
  text-decoration: underline;
@@ -188,13 +124,15 @@
188
124
  </style>
189
125
 
190
126
  <script>
191
- import * as VueClickAway from "vue-clickaway";
127
+ import Clickaway from '@/directives/clickaway';
192
128
  import MultipleFilePreview from "./MultipleFilePreview";
193
129
  import SingleFilePreview from "./SingleFilePreview";
194
130
 
195
131
  export default {
196
132
  components: { SingleFilePreview, MultipleFilePreview },
197
- mixins: [VueClickAway.mixin],
133
+ directives: {
134
+ clickaway: Clickaway
135
+ },
198
136
  props: {
199
137
  textId: {
200
138
  type: String,
@@ -449,8 +387,8 @@ export default {
449
387
  this.validFileFormats = `Imagens: ${this.fileSettings.imagesExtensions
450
388
  .split("|")
451
389
  .join(", ")} - Documentos: ${this.fileSettings.docsExtensions
452
- .split("|")
453
- .join(", ")}`;
390
+ .split("|")
391
+ .join(", ")}`;
454
392
  }
455
393
  });
456
394
 
@@ -1,43 +1,17 @@
1
1
  <template>
2
- <div
3
- class="expand-textarea"
4
- @drop.stop="dropFile"
5
- @dragenter.prevent
6
- @dragover.prevent
7
- v-on-clickaway="away"
8
- >
9
- <fa-icon
10
- :icon="['fas', 'times-circle']"
11
- class="sc-icone-fechar sc-icone-fechar--externo"
12
- @click="$emit('fechar-expand')"
13
- />
2
+ <div class="expand-textarea" @drop.stop="dropFile" @dragenter.prevent @dragover.prevent v-clickaway="away">
3
+ <fa-icon :icon="['fas', 'times-circle']" class="sc-icone-fechar sc-icone-fechar--externo"
4
+ @click="$emit('fechar-expand')" />
14
5
  <div class="expand-textarea-content">
15
6
  <h1 class="expand-textarea-title" v-text="textareaSettings.title"></h1>
16
- <textarea
17
- :ref="identifier"
18
- :placeholder="textareaSettings.placeholderMessage"
19
- v-model="message"
20
- @input="sendFinalMessage"
21
- @paste="pasteImage"
22
- >
7
+ <textarea :ref="identifier" :placeholder="textareaSettings.placeholderMessage" v-model="message"
8
+ @input="sendFinalMessage" @paste="pasteImage">
23
9
  </textarea>
24
10
  <div class="expand-textarea-footer">
25
- <BtnEmojis
26
- v-show="buttons.hasEmojis"
27
- :ref="`${identifier}-emojis`"
28
- :emojiId="`${identifier}-em`"
29
- :left="false"
30
- @insert-emoji="insertEmoji"
31
- />
32
- <BtnFiles
33
- v-if="buttons.hasFiles"
34
- :textId="identifier"
35
- :dictionary="dictionary"
36
- :fileSettings="fileSettings"
37
- :ref="`${identifier}-file`"
38
- @set-file-vars="setFileVars"
39
- @open-image="openImage"
40
- />
11
+ <BtnEmojis v-show="buttons.hasEmojis" :ref="`${identifier}-emojis`" :emojiId="`${identifier}-em`" :left="false"
12
+ @insert-emoji="insertEmoji" />
13
+ <BtnFiles v-if="buttons.hasFiles" :textId="identifier" :dictionary="dictionary" :fileSettings="fileSettings"
14
+ :ref="`${identifier}-file`" @set-file-vars="setFileVars" @open-image="openImage" />
41
15
  <slot name="btn-1"></slot>
42
16
  <slot name="btn-2"></slot>
43
17
  <!-- "expand-textarea-button" -->
@@ -47,14 +21,16 @@
47
21
  </template>
48
22
 
49
23
  <script>
50
- import * as VueClickAway from "vue-clickaway";
24
+ import Clickaway from '@/directives/clickaway';
51
25
  import BtnEmojis from "./BtnEmojis";
52
26
  import BtnFiles from "./BtnFiles";
53
27
  import { returnMessageWithHexa } from "../../services/textFormatting";
54
28
 
55
29
  export default {
56
30
  components: { BtnEmojis, BtnFiles },
57
- mixins: [VueClickAway.mixin],
31
+ directives: {
32
+ clickaway: Clickaway
33
+ },
58
34
  props: {
59
35
  identifier: {
60
36
  type: String,
@@ -313,6 +289,7 @@ export default {
313
289
  top: -10px;
314
290
  right: -10px;
315
291
  }
292
+
316
293
  .sc-icone-fechar.sc-icone-fechar--interno {
317
294
  top: 10px;
318
295
  right: 10px;
@@ -334,6 +311,7 @@ export default {
334
311
  display: flex;
335
312
  flex-direction: column;
336
313
  }
314
+
337
315
  .expand-textarea-title {
338
316
  padding: 2.5px 8px;
339
317
  min-height: 38px;
@@ -344,6 +322,7 @@ export default {
344
322
  background-color: #222;
345
323
  color: #fff;
346
324
  }
325
+
347
326
  .expand-textarea-content textarea {
348
327
  padding: 10px;
349
328
  flex: 1;
@@ -353,10 +332,12 @@ export default {
353
332
  outline: none;
354
333
  overflow-x: hidden;
355
334
  }
335
+
356
336
  .expand-textarea-content textarea:hover,
357
337
  .expand-textarea-content textarea:active {
358
338
  outline: none;
359
339
  }
340
+
360
341
  .expand-textarea-footer {
361
342
  display: flex;
362
343
  justify-content: flex-end;
@@ -365,6 +346,7 @@ export default {
365
346
  background-color: #f7f7f7;
366
347
  position: relative;
367
348
  }
349
+
368
350
  .expand-textarea-footer .text-footer-preview-container {
369
351
  position: absolute;
370
352
  top: -200px;
@@ -372,6 +354,7 @@ export default {
372
354
  height: 200px;
373
355
  background: #f7f7f7;
374
356
  }
357
+
375
358
  .expand-textarea-footer .text-footer-actions--btn {
376
359
  width: 36px;
377
360
  height: 36px;
@@ -388,6 +371,7 @@ export default {
388
371
  opacity: 0.9;
389
372
  transition: all 300ms;
390
373
  }
374
+
391
375
  .expand-textarea-footer .text-footer-actions--btn:hover {
392
376
  opacity: 1;
393
377
  background-color: rgba(30, 30, 30, 0.1);
@@ -411,18 +395,22 @@ export default {
411
395
  border-radius: 2.5px;
412
396
  position: relative;
413
397
  }
398
+
414
399
  .expand-textarea-button.green {
415
400
  background-color: #2a963a;
416
401
  color: #fff;
417
402
  margin-right: 10px;
418
403
  }
404
+
419
405
  .expand-textarea-button.red {
420
406
  background-color: #e74c3c;
421
407
  color: #fff;
422
408
  }
409
+
423
410
  .expand-textarea-button:hover {
424
411
  opacity: 1;
425
412
  }
413
+
426
414
  .expand-textarea-button:active {
427
415
  opacity: 1;
428
416
  box-shadow: inset 0 -1px rgba(0, 0, 0, 0.2);
@@ -432,6 +420,7 @@ export default {
432
420
  -ms-transform: translateY(1px);
433
421
  transform: translateY(1px);
434
422
  }
423
+
435
424
  .expand-textarea-button.carregando {
436
425
  background-color: #777;
437
426
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="text-footer-container" :class="{ bigger: cssStyle.height }" v-on-clickaway="away" v-if="textId"
2
+ <div class="text-footer-container" :class="{ bigger: cssStyle.height }" v-clickaway="away" v-if="textId"
3
3
  @drop.stop="dropFile" @dragenter.prevent @dragover.prevent>
4
4
  <div class="text-footer" :class="cssStyle.width ? cssStyle.width : ''"
5
5
  :style="`background-color: ${cssStyle.backgroundColor}`">
@@ -79,7 +79,7 @@
79
79
  </template>
80
80
 
81
81
  <script>
82
- import * as VueClickAway from "vue-clickaway";
82
+ import Clickaway from '@/directives/clickaway';
83
83
  import { resetTargets, setResizeListeners } from "../../services/autoResize";
84
84
  import { returnMessageWithHexa } from "../../services/textFormatting";
85
85
 
@@ -107,7 +107,9 @@ export default {
107
107
  BtnScreenShare,
108
108
  BtnDownloadAllFiles,
109
109
  },
110
- mixins: [VueClickAway.mixin],
110
+ directives: {
111
+ clickaway: Clickaway
112
+ },
111
113
  props: {
112
114
  buttons: {
113
115
  type: Object,
@@ -28,7 +28,7 @@
28
28
  <span></span>
29
29
  <span></span>
30
30
  </span>
31
- <ul class="email-actions-list box-shadow" v-if="actionsOpen" v-on-clickaway="() => actionsOpen = false">
31
+ <ul class="email-actions-list box-shadow" v-if="actionsOpen" v-clickaway="() => actionsOpen = false">
32
32
  <li class="email-action" @click="toggleOpenMessage()"
33
33
  v-text="`${!openMessage ? 'Visualizar' : 'Esconder'} texto do e-mail`"></li>
34
34
  </ul>
@@ -43,15 +43,17 @@
43
43
  </template>
44
44
 
45
45
  <script>
46
- // import sanitizeHtml from 'sanitize-html'
47
46
  import EmailFile from "./EmailFile.vue"
48
47
  import EmailTo from "./EmailTo.vue"
49
48
  import EmailFrom from "./EmailFrom.vue"
50
49
  import { textoLongo } from "@/mixins/formatarTexto"
51
- import * as VueClickAway from "vue-clickaway";
50
+ import Clickaway from '@/directives/clickaway';
52
51
 
53
52
  export default {
54
- mixins: [textoLongo, VueClickAway.mixin],
53
+ mixins: [textoLongo],
54
+ directives: {
55
+ clickaway: Clickaway
56
+ },
55
57
  components: { EmailFile, EmailTo, EmailFrom },
56
58
  props: {
57
59
  dominio: {
@@ -125,13 +125,13 @@
125
125
  </span>
126
126
  </template>
127
127
  </div>
128
- <div class="emoji-message-container" v-if="isEmojisOpen" v-on-clickaway="closeEmojis">
128
+ <div class="emoji-message-container" v-if="isEmojisOpen" v-clickaway="closeEmojis">
129
129
  <fa-icon :icon="['fas', 'times-circle']" class="sc-icone-fechar sc-icone-fechar--externo"
130
130
  @click="closeEmojis" />
131
131
  <Picker @insert-emoji="addReaction" />
132
132
  </div>
133
133
  <transition name="fade" mode="out-in" v-if="isMenuOpen">
134
- <ul class="menu-flutuante" :class="origem" v-on-clickaway="closeMenu">
134
+ <ul class="menu-flutuante" :class="origem" v-clickaway="closeMenu">
135
135
  <li @click="responderMensagemHandler" v-if="showMenu.reply">
136
136
  <span> {{ dictionary.tit_responder_msg }} </span>
137
137
  </li>
@@ -156,7 +156,7 @@ import InteratividadeFormulario from "./InteratividadeFormulario";
156
156
  import Picker from "../Chat/Picker";
157
157
  import { formataTimezoneData } from "../../services/textFormatting";
158
158
  import LinkPreview from "./LinkPreview";
159
- import * as VueClickAway from "vue-clickaway";
159
+ import Clickaway from '@/directives/clickaway';
160
160
 
161
161
  export default {
162
162
  components: {
@@ -214,7 +214,9 @@ export default {
214
214
  created() {
215
215
  if (!this.$root.$refs.chatMessages) this.$root.$refs.chatMessages = this;
216
216
  },
217
- mixins: [VueClickAway.mixin],
217
+ directives: {
218
+ clickaway: Clickaway
219
+ },
218
220
  data() {
219
221
  return {
220
222
  strTooltipAux: "",
@@ -294,8 +296,8 @@ export default {
294
296
 
295
297
  if (this.tipo_origem) {
296
298
  tooltipStar += `${this.dictionary["tipo_origem"]}: ${this.dictionary[`tipo_origem_${this.tipo_origem}`]
297
- ? this.dictionary[`tipo_origem_${this.tipo_origem}`]
298
- : this.tipo_origem
299
+ ? this.dictionary[`tipo_origem_${this.tipo_origem}`]
300
+ : this.tipo_origem
299
301
  }<br/>`;
300
302
  }
301
303
 
@@ -1,32 +1,16 @@
1
1
  <template>
2
- <div class="interatividade-popup box-shadow" v-on-clickaway="away">
2
+ <div class="interatividade-popup box-shadow" v-clickaway="away">
3
3
  <div class="interatividade-popup-titulo" v-if="titulo">
4
4
  <h1>
5
5
  <span v-html="titulo"></span>
6
6
  <fa-icon :icon="['fas', 'times-circle']" @click="away" />
7
7
  </h1>
8
8
  </div>
9
- <div
10
- class="interatividade-popup-conteudo"
11
- v-for="(objItem, index) in lista"
12
- :key="index"
13
- >
9
+ <div class="interatividade-popup-conteudo" v-for="(objItem, index) in lista" :key="index">
14
10
  <template v-if="objItem.items && objItem.items.length">
15
- <div
16
- class="interatividade-popup-item"
17
- v-for="(item, indexItem) in objItem.items"
18
- :key="`${index}${indexItem}`"
19
- >
20
- <p
21
- v-if="item.title"
22
- v-html="item.title"
23
- class="interatividade-popup-item-titulo"
24
- ></p>
25
- <p
26
- v-if="item.description"
27
- v-html="item.description"
28
- class="interatividade-popup-item-desc"
29
- ></p>
11
+ <div class="interatividade-popup-item" v-for="(item, indexItem) in objItem.items" :key="`${index}${indexItem}`">
12
+ <p v-if="item.title" v-html="item.title" class="interatividade-popup-item-titulo"></p>
13
+ <p v-if="item.description" v-html="item.description" class="interatividade-popup-item-desc"></p>
30
14
  </div>
31
15
  </template>
32
16
  </div>
@@ -34,10 +18,12 @@
34
18
  </template>
35
19
 
36
20
  <script>
37
- import * as VueClickAway from "vue-clickaway";
21
+ import Clickaway from '@/directives/clickaway';
38
22
 
39
23
  export default {
40
- mixins: [VueClickAway.mixin],
24
+ directives: {
25
+ clickaway: Clickaway
26
+ },
41
27
  props: {
42
28
  lista: {
43
29
  type: [Array, Object],
@@ -90,6 +76,7 @@ export default {
90
76
  justify-content: space-between;
91
77
  align-items: center;
92
78
  }
79
+
93
80
  .interatividade-popup-titulo h1 svg {
94
81
  color: #e74c3c;
95
82
  cursor: pointer;