vue-intergrall-plugins 0.0.275 → 0.0.281

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.
@@ -19,24 +19,23 @@
19
19
  <p v-text="filename" :title="filename"></p>
20
20
  </span>
21
21
  <!-- Acoes -->
22
- <div class="file-actions">
22
+ <div v-if="showControlFiles" class="file-actions">
23
23
  <span v-if="imageURL" class="file-action-button" @click="showImage(imageURL)">
24
24
  <fa-icon :icon="['fas', 'search-plus']" v-tippy :content="`${dictionary.titulo_visualizar_img}`" />
25
25
  </span>
26
- <span v-if="docURL" @click="openWindowFromURL(docURL)" v-tippy :content="`Visualizar anexo`" class="file-action-button">
26
+ <span v-if="docURL" @click="openWindowFromURL(docURL)" v-tippy :content="`Visualizar anexo`"
27
+ class="file-action-button">
27
28
  <fa-icon :icon="['fas', 'search-plus']" />
28
29
  </span>
29
- <a v-if="imageURL || docURL" :href="imageURL ? imageURL : docURL" :download="`${filename}`" target="_blank" rel="noreferrer noopener" v-tippy :content="`Fazer o download do anexo`" class="file-action-button">
30
+ <a v-if="imageURL || docURL" :href="imageURL ? imageURL : docURL" :download="`${filename}`" target="_blank"
31
+ rel="noreferrer noopener" v-tippy :content="`Fazer o download do anexo`" class="file-action-button">
30
32
  <fa-icon :icon="['fas', 'download']" />
31
33
  </a>
32
34
  <template v-if="imageURL || docURL">
33
- <tippy
34
- interactive
35
- theme="light"
36
- trigger="click"
37
- >
35
+ <tippy interactive theme="light" trigger="click">
38
36
  <template v-slot:trigger>
39
- <span class="file-action-button" ref="download-multiple-trigger" v-tippy :content="`Fazer o download de todos anexos da conversa`">
37
+ <span class="file-action-button" ref="download-multiple-trigger" v-tippy
38
+ :content="`Fazer o download de todos anexos da conversa`">
40
39
  <fa-icon :icon="['fas', 'download']" />
41
40
  <fa-icon :icon="['fas', 'download']" />
42
41
  <fa-icon :icon="['fas', 'download']" />
@@ -57,36 +56,41 @@
57
56
  </template>
58
57
 
59
58
  <style>
60
- .tippy-tooltip.light-theme .tippy-backdrop {
61
- background-color: #FFF;
62
- }
63
- .tippy-tooltip.light-theme {
59
+ .tippy-tooltip.light-theme .tippy-backdrop {
60
+ background-color: #FFF;
61
+ }
62
+
63
+ .tippy-tooltip.light-theme {
64
64
  /* .tippy-box[data-theme~='light'] { */
65
- background-color: #FFF;
66
- border: 1px solid #CCC;
67
- color: #333;
68
- -webkit-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
69
- -moz-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
70
- box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
71
- }
72
- .tippy-confirmation p {
73
- margin-bottom: 3px;
74
- }
75
- .tippy-confirmation button {
76
- border: unset;
77
- background-color: #F1F1F1;
78
- border-radius: 3px;
79
- padding: 5px 8px;
80
- cursor: pointer;
81
- font-size: .75rem;
82
- }
83
- .tippy-confirmation button.cancel {
84
- border-bottom: 2px solid red;
85
- margin-right: 15px;
86
- }
87
- .tippy-confirmation button.confirm {
88
- border-bottom: 2px solid green;
89
- }
65
+ background-color: #FFF;
66
+ border: 1px solid #CCC;
67
+ color: #333;
68
+ -webkit-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
69
+ -moz-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
70
+ box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
71
+ }
72
+
73
+ .tippy-confirmation p {
74
+ margin-bottom: 3px;
75
+ }
76
+
77
+ .tippy-confirmation button {
78
+ border: unset;
79
+ background-color: #F1F1F1;
80
+ border-radius: 3px;
81
+ padding: 5px 8px;
82
+ cursor: pointer;
83
+ font-size: .75rem;
84
+ }
85
+
86
+ .tippy-confirmation button.cancel {
87
+ border-bottom: 2px solid red;
88
+ margin-right: 15px;
89
+ }
90
+
91
+ .tippy-confirmation button.confirm {
92
+ border-bottom: 2px solid green;
93
+ }
90
94
  </style>
91
95
 
92
96
  <script>
@@ -116,7 +120,8 @@ export default {
116
120
  referenceSelector: {
117
121
  type: String,
118
122
  required: true
119
- }
123
+ },
124
+ showControlFiles: { type: Boolean }
120
125
  },
121
126
  data() {
122
127
  return {
@@ -125,28 +130,28 @@ export default {
125
130
  }
126
131
  },
127
132
  mounted() {
128
- if(this.validarAnexo()){
133
+ if (this.validarAnexo()) {
129
134
  this.setFileVars(this.anexo, { dominio: this.dominio })
130
135
  }
131
136
  },
132
137
  methods: {
133
- validarAnexo(){
138
+ validarAnexo() {
134
139
  let status = true
135
140
  //caso for audio ou documento ignorar
136
- if(this.anexo.docURL || this.anexo.audio) return true
137
- if(!this.anexo.name){
141
+ if (this.anexo.docURL || this.anexo.audio) return true
142
+ if (!this.anexo.name) {
138
143
  this.imgMsgErro = this.dictionary.img_com_erro_nome
139
144
  status = false
140
145
  }
141
- if(!this.anexo.nomeGravacao){
146
+ if (!this.anexo.nomeGravacao) {
142
147
  this.imgMsgErro = this.dictionary.img_com_erro_nome_gravacao
143
148
  status = false
144
149
  }
145
- if(!this.anexo.type){
150
+ if (!this.anexo.type) {
146
151
  this.imgMsgErro = this.dictionary.img_com_erro_tipo
147
152
  status = false
148
153
  }
149
- if(status == false){
154
+ if (status == false) {
150
155
  this.imgErro = true
151
156
  this.isLoading = false
152
157
  }
@@ -160,207 +165,221 @@ export default {
160
165
  </script>
161
166
 
162
167
  <style scoped>
163
- .mensagem__principal .default-doc {
164
- background-color: var(--files-bg);
165
- }
168
+ .mensagem__principal .default-doc {
169
+ background-color: var(--files-bg);
170
+ }
166
171
 
167
- .mensagem__principal .default-doc:hover {
168
- background-color: var(--files-bg-hover);
169
- }
172
+ .mensagem__principal .default-doc:hover {
173
+ background-color: var(--files-bg-hover);
174
+ }
170
175
 
171
- .mensagem__outros .default-doc {
172
- background-color: rgba(100, 100, 100, 0.1);
173
- }
176
+ .mensagem__outros .default-doc {
177
+ background-color: rgba(100, 100, 100, 0.1);
178
+ }
174
179
 
175
- .mensagem__outros .default-doc:hover {
176
- background-color: rgba(100, 100, 100, 0.3);
177
- }
180
+ .mensagem__outros .default-doc:hover {
181
+ background-color: rgba(100, 100, 100, 0.3);
182
+ }
178
183
 
179
- .default-doc:hover p {
180
- text-decoration: underline;
181
- }
184
+ .default-doc:hover p {
185
+ text-decoration: underline;
186
+ }
182
187
 
183
- .default-doc {
184
- display: flex;
185
- align-items: center;
186
- padding: 10px;
187
- border-radius: 5px;
188
- width: 100%;
189
- max-width: 100%;
190
- cursor: pointer;
191
- transition: background-color 150ms ease-in-out;
192
- }
193
- .default-doc svg {
194
- font-size: 1.2rem;
195
- margin-right: 5px;
196
- }
197
- .default-doc p {
198
- overflow: hidden;
199
- text-overflow: ellipsis;
200
- white-space: nowrap;
201
- }
188
+ .default-doc {
189
+ display: flex;
190
+ align-items: center;
191
+ padding: 10px;
192
+ border-radius: 5px;
193
+ width: 100%;
194
+ max-width: 100%;
195
+ cursor: pointer;
196
+ transition: background-color 150ms ease-in-out;
197
+ }
202
198
 
203
- .file-actions {
204
- display: flex;
205
- justify-content: flex-end;
206
- width: 100%;
207
- padding: 5px;
208
- }
209
- .file-actions a {
210
- margin-right: 0;
211
- }
199
+ .default-doc svg {
200
+ font-size: 1.2rem;
201
+ margin-right: 5px;
202
+ }
212
203
 
213
- .mensagem__principal .file-action-button {
214
- background-color: var(--files-bg);
215
- }
204
+ .default-doc p {
205
+ overflow: hidden;
206
+ text-overflow: ellipsis;
207
+ white-space: nowrap;
208
+ }
216
209
 
217
- .mensagem__outros .file-action-button {
218
- background-color: rgba(100, 100, 100, 0.1);
219
- }
210
+ .file-actions {
211
+ display: flex;
212
+ justify-content: flex-end;
213
+ width: 100%;
214
+ padding: 5px;
215
+ }
220
216
 
221
- .mensagem__principal .file-action-button:hover {
222
- background-color: var(--files-bg-hover);
223
- }
217
+ .file-actions a {
218
+ margin-right: 0;
219
+ }
224
220
 
225
- .mensagem__outros .file-action-button:hover {
226
- background-color: rgba(100, 100, 100, 0.3);
227
- }
221
+ .mensagem__principal .file-action-button {
222
+ background-color: var(--files-bg);
223
+ }
228
224
 
229
- .file-action-button {
230
- display: flex;
231
- justify-content: center;
232
- align-items: center;
233
- margin-left: 12px;
234
- cursor: pointer;
235
- padding: 5px;
236
- border-radius: 5px;
237
- transition: background-color 150ms ease-in-out;
238
- }
225
+ .mensagem__outros .file-action-button {
226
+ background-color: rgba(100, 100, 100, 0.1);
227
+ }
239
228
 
240
- .file-action-button a {
241
- margin: 0
242
- }
229
+ .mensagem__principal .file-action-button:hover {
230
+ background-color: var(--files-bg-hover);
231
+ }
243
232
 
244
- .fade-enter-active, .fade-leave-active {
245
- transition: opacity .5s;
246
- }
247
- .fade-enter, .fade-leave-to {
248
- opacity: 0;
249
- }
250
- .mensagem-div-anexo{
251
- width: 100%;
252
- display: flex;
253
- justify-content: center;
254
- align-items: center;
255
- flex-direction: column;
256
- overflow: hidden;
257
- }
233
+ .mensagem__outros .file-action-button:hover {
234
+ background-color: rgba(100, 100, 100, 0.3);
235
+ }
258
236
 
259
- .anexo-container{
260
- width: 100%;
261
- margin-top: 5px;
262
- overflow: hidden;
263
- display: flex;
264
- max-height: 300px;
265
- }
266
- .anexo-container a, .anexo-container .arquivo-erro{
267
- padding: 10px 15px 15px 15px;
268
- display: flex;
269
- justify-content: center;
270
- align-items: center;
271
- }
272
- .anexo-container p {
273
- text-overflow: ellipsis;
274
- overflow: hidden;
275
- }
276
- .anexo-container p, .anexo-container .arquivo-erro{
277
- margin: 0;
278
- margin-left: 15px;
279
- font-size: .9rem
280
- }
281
- .anexo-container svg{
282
- font-size: 2rem;
283
- }
284
-
285
- .anexo-mensagem audio{
286
- outline: none;
287
- width: 100%;
288
- margin-bottom: 5px;
289
- }
290
-
291
- .anexo-mensagem video{
292
- flex: 1;
293
- width: 100%;
294
- max-width: 350px;
295
- cursor: pointer;
296
- margin-bottom: 5px;
297
- }
237
+ .file-action-button {
238
+ display: flex;
239
+ justify-content: center;
240
+ align-items: center;
241
+ margin-left: 12px;
242
+ cursor: pointer;
243
+ padding: 5px;
244
+ border-radius: 5px;
245
+ transition: background-color 150ms ease-in-out;
246
+ }
298
247
 
299
- .anexos-links-container{
300
- width: 100%;
301
- display: flex;
302
- justify-content: center;
303
- align-items: center;
304
- }
305
- .anexos-links-container a {
306
- white-space: nowrap;
307
- text-overflow: ellipsis;
308
- overflow: hidden;
309
- margin-right: 5px;
310
- font-weight: 550;
311
- color: inherit;
312
- text-decoration: none;
313
- }
314
- .anexos-links-container svg {
315
- cursor: pointer;
316
- }
248
+ .file-action-button a {
249
+ margin: 0
250
+ }
317
251
 
318
- .mensagem-div-anexo img{
319
- cursor: pointer;
320
- margin: 10px 0;
321
- min-width: 35px;
322
- width: 100%;
323
- max-width: 250px;
324
- }
252
+ .fade-enter-active,
253
+ .fade-leave-active {
254
+ transition: opacity .5s;
255
+ }
325
256
 
326
- .anexo-transition {
327
- width: 100%;
328
- height: 100%;
329
- }
257
+ .fade-enter,
258
+ .fade-leave-to {
259
+ opacity: 0;
260
+ }
330
261
 
331
- .anexo-mensagem {
332
- display: flex;
333
- justify-content: center;
334
- align-items: center;
335
- flex-direction: column;
336
- width: 100%;
337
- }
338
-
339
- .alert-danger {
340
- color: #721c24;
341
- background-color: #f8d7da;
342
- border-color: #f5c6cb;
343
- }
262
+ .mensagem-div-anexo {
263
+ width: 100%;
264
+ display: flex;
265
+ justify-content: center;
266
+ align-items: center;
267
+ flex-direction: column;
268
+ overflow: hidden;
269
+ }
344
270
 
345
- .alert {
346
- position: relative;
347
- padding: 0.65rem 1.2rem;
348
- margin: 5px 0;
349
- border: 1px solid transparent;
350
- border-radius: 0.25rem;
351
- text-align: center;
352
- }
271
+ .anexo-container {
272
+ width: 100%;
273
+ margin-top: 5px;
274
+ overflow: hidden;
275
+ display: flex;
276
+ max-height: 300px;
277
+ }
353
278
 
354
- .alert svg {
355
- font-size: 1.025em;
356
- margin-right: 2px;
357
- }
279
+ .anexo-container a,
280
+ .anexo-container .arquivo-erro {
281
+ padding: 10px 15px 15px 15px;
282
+ display: flex;
283
+ justify-content: center;
284
+ align-items: center;
285
+ }
358
286
 
359
- .pdf {
360
- color: #E74C3C;
361
- }
287
+ .anexo-container p {
288
+ text-overflow: ellipsis;
289
+ overflow: hidden;
290
+ }
362
291
 
363
- .doc {
364
- color: #006bc9
365
- }
366
- </style>
292
+ .anexo-container p,
293
+ .anexo-container .arquivo-erro {
294
+ margin: 0;
295
+ margin-left: 15px;
296
+ font-size: .9rem
297
+ }
298
+
299
+ .anexo-container svg {
300
+ font-size: 2rem;
301
+ }
302
+
303
+ .anexo-mensagem audio {
304
+ outline: none;
305
+ width: 100%;
306
+ margin-bottom: 5px;
307
+ }
308
+
309
+ .anexo-mensagem video {
310
+ flex: 1;
311
+ width: 100%;
312
+ max-width: 350px;
313
+ cursor: pointer;
314
+ margin-bottom: 5px;
315
+ }
316
+
317
+ .anexos-links-container {
318
+ width: 100%;
319
+ display: flex;
320
+ justify-content: center;
321
+ align-items: center;
322
+ }
323
+
324
+ .anexos-links-container a {
325
+ white-space: nowrap;
326
+ text-overflow: ellipsis;
327
+ overflow: hidden;
328
+ margin-right: 5px;
329
+ font-weight: 550;
330
+ color: inherit;
331
+ text-decoration: none;
332
+ }
333
+
334
+ .anexos-links-container svg {
335
+ cursor: pointer;
336
+ }
337
+
338
+ .mensagem-div-anexo img {
339
+ cursor: pointer;
340
+ margin: 10px 0;
341
+ min-width: 35px;
342
+ width: 100%;
343
+ max-width: 250px;
344
+ }
345
+
346
+ .anexo-transition {
347
+ width: 100%;
348
+ height: 100%;
349
+ }
350
+
351
+ .anexo-mensagem {
352
+ display: flex;
353
+ justify-content: center;
354
+ align-items: center;
355
+ flex-direction: column;
356
+ width: 100%;
357
+ }
358
+
359
+ .alert-danger {
360
+ color: #721c24;
361
+ background-color: #f8d7da;
362
+ border-color: #f5c6cb;
363
+ }
364
+
365
+ .alert {
366
+ position: relative;
367
+ padding: 0.65rem 1.2rem;
368
+ margin: 5px 0;
369
+ border: 1px solid transparent;
370
+ border-radius: 0.25rem;
371
+ text-align: center;
372
+ }
373
+
374
+ .alert svg {
375
+ font-size: 1.025em;
376
+ margin-right: 2px;
377
+ }
378
+
379
+ .pdf {
380
+ color: #E74C3C;
381
+ }
382
+
383
+ .doc {
384
+ color: #006bc9
385
+ }</style>
@@ -26,7 +26,53 @@
26
26
  </div>
27
27
  </div>
28
28
  </div>
29
- <p class="card-chip" :class="[ticketClassCod]" v-if="ticket_id.cod && ticket_id.desc" v-text="`${ticket_id.desc} (${ticket_id.cod})`" :title="`${ticket_id.desc} (${ticket_id.cod})`"></p>
29
+ <div class="card-chip-container">
30
+ <p
31
+ class="card-chip"
32
+ :class="[ticketClassCod]"
33
+ v-if="ticket_id.cod && ticket_id.desc"
34
+ v-text="`${ticket_id.desc} (${ticket_id.cod})`"
35
+ :title="`${ticket_id.desc} (${ticket_id.cod})`"
36
+ ></p>
37
+ <p
38
+ v-if="ticket_id.hasOwnProperty('back_doing_business')"
39
+ :class="`${ticket_id.back_doing_business ? 'green' : 'red'} card-chip`"
40
+ :title="`${dictionary.title_voltaria_fazer_negocio} ${
41
+ ticket_id.back_doing_business
42
+ ? `${dictionary.title_sim}`
43
+ : `${dictionary.title_nao}`
44
+ }`"
45
+ v-text="
46
+ `${dictionary.title_voltaria_fazer_negocio} ${
47
+ ticket_id.back_doing_business
48
+ ? `${dictionary.title_sim}`
49
+ : `${dictionary.title_nao}`
50
+ }`
51
+ "
52
+ ></p>
53
+ <p
54
+ v-if="ticket_id.hasOwnProperty('rating')"
55
+ :class="`${isNumberBiggerThanSix ? 'green' : 'red'} card-chip`"
56
+ :title="`${dictionary.title_avaliacao} ${ticket_id.rating}`"
57
+ v-text="`${dictionary.title_avaliacao} ${ticket_id.rating}`"
58
+ ></p>
59
+ <p
60
+ v-if="ticket_id.hasOwnProperty('resolved_issue')"
61
+ :class="`${ticket_id.resolved_issue ? 'green' : 'red'} card-chip`"
62
+ :title="`${dictionary.title_problema_resolvido} ${
63
+ ticket_id.resolved_issue
64
+ ? `${dictionary.title_sim}`
65
+ : `${dictionary.title_nao}`
66
+ }`"
67
+ v-text="
68
+ `${dictionary.title_problema_resolvido} ${
69
+ ticket_id.resolved_issue
70
+ ? `${dictionary.title_sim}`
71
+ : `${dictionary.title_nao}`
72
+ }`
73
+ "
74
+ ></p>
75
+ </div>
30
76
  <p class="card-message" v-html="mensagemFormatada"></p>
31
77
  <div class="card-footer" v-if="anexos && anexos.length">
32
78
  <div class="card-anexo" v-for="(anexo, index) in anexos" :key="`${index}`">
@@ -260,6 +306,12 @@ export default {
260
306
  flex-wrap: wrap;
261
307
  }
262
308
 
309
+ .card-chip-container {
310
+ display: flex;
311
+ flex-wrap: wrap;
312
+ width: 100%;
313
+ gap: 5px;
314
+ }
263
315
 
264
316
  .card-chip {
265
317
  font-size: .8rem;
@@ -295,6 +347,13 @@ export default {
295
347
  .card-chip.red:hover {
296
348
  background-color: rgba(231, 76, 60, .25);
297
349
  }
350
+ .card-chip.green {
351
+ color: #0e3213;
352
+ background-color: rgba(15,177,39,0.3);
353
+ }
354
+ .card-chip.green:hover {
355
+ background-color: rgba(15, 177, 39, 0.4);
356
+ }
298
357
 
299
358
  .card-anexo {
300
359
  width: 50px;
@@ -18,7 +18,7 @@
18
18
  </div>
19
19
  <template v-if="anexos && anexos.length">
20
20
  <div class="mensagem-anexo" v-for="(anexo, index) in anexos" :key="index">
21
- <AnexoMensagem :referenceSelector="referenceSelector" :dictionary="dictionary" :anexo="anexo" :origemExterna="origemExterna" :dominio="dominio" @abrir-imagem="abrirImagem" @download-all="$emit('download-all')"/>
21
+ <AnexoMensagem :showControlFiles="showControlFiles" :referenceSelector="referenceSelector" :dictionary="dictionary" :anexo="anexo" :origemExterna="origemExterna" :dominio="dominio" @abrir-imagem="abrirImagem" @download-all="$emit('download-all')"/>
22
22
  </div>
23
23
  </template>
24
24
  <img class="default-stick-size" v-if="urlSticker" :src="urlSticker" :title="urlFileName">
@@ -86,7 +86,7 @@ import LinkPreview from './LinkPreview'
86
86
 
87
87
  export default {
88
88
  components: { AnexoMensagem, InteratividadeBotoes, InteratividadeFormulario, LinkPreview },
89
- props: ["smartchannel", "messageIndex", "dictionary", "autor", "origem", "msg", "link", "anexo", "imgAnexo", "tipoDoc", "docAnexo", "nomeArquivo", "audio", "video", "horario", "status", "logo", "msgTooltip", "seq", "mapa", "histMsg", "erro", "msgErro", "origemExterna", "anexos", "dominio", "corMsg", "interatividade", "msgReply", "hasReply", "iniDialogo", "dialogoId", "dialogoOrigem", "expSessao", "referenceSelector", "replyMessage", "isReply", "defaultReplyMessage", "showReplyIcon"],
89
+ props: ["smartchannel", "messageIndex", "dictionary", "autor", "origem", "msg", "link", "anexo", "imgAnexo", "tipoDoc", "docAnexo", "nomeArquivo", "audio", "video", "horario", "status", "logo", "msgTooltip", "seq", "mapa", "histMsg", "erro", "msgErro", "origemExterna", "anexos", "dominio", "corMsg", "interatividade", "msgReply", "hasReply", "iniDialogo", "dialogoId", "dialogoOrigem", "expSessao", "referenceSelector", "replyMessage", "isReply", "defaultReplyMessage", "showReplyIcon", "showControlFiles"],
90
90
  created() {
91
91
  if(!this.$root.$refs.chatMessages) this.$root.$refs.chatMessages = this
92
92
  },