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.
- package/README.md +13 -5
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/package.json +70 -62
- package/src/lib-components/Buttons/IconButton.vue +27 -0
- package/src/lib-components/Buttons/SimpleButton.vue +140 -0
- package/src/lib-components/Cards/Card.vue +429 -0
- package/src/lib-components/Cards/CardCheck.vue +35 -0
- package/src/lib-components/Cards/CardFile.vue +157 -0
- package/src/lib-components/Chat/AudioSpeedControl.vue +60 -0
- package/src/lib-components/Chat/BtnDownloadAllFiles.vue +36 -0
- package/src/lib-components/Chat/BtnEmojis.vue +51 -45
- package/src/lib-components/Chat/BtnFiles.vue +408 -131
- package/src/lib-components/Chat/BtnScreenShare.vue +36 -0
- package/src/lib-components/Chat/BtnStandardMessages.vue +17 -0
- package/src/lib-components/Chat/ExpandTextarea.vue +5 -6
- package/src/lib-components/Chat/MultipleFilePreview.vue +40 -22
- package/src/lib-components/Chat/Picker.vue +185 -149
- package/src/lib-components/Chat/SingleFilePreview.vue +28 -7
- package/src/lib-components/Chat/StandardMessages.vue +245 -0
- package/src/lib-components/Chat/TextFooter.vue +791 -451
- package/src/lib-components/Email/EmailFile.vue +126 -0
- package/src/lib-components/Email/EmailItem.vue +186 -0
- package/src/lib-components/Loader/Loader.vue +6 -1
- package/src/lib-components/Messages/AnexoMensagem.vue +442 -0
- package/src/lib-components/Messages/CardAttachment.vue +61 -0
- package/src/lib-components/Messages/CardMessages.vue +666 -0
- package/src/lib-components/Messages/ChatMessages.vue +1082 -0
- package/src/lib-components/Messages/InteratividadeBotoes.vue +165 -0
- package/src/lib-components/Messages/InteratividadeFormulario.vue +392 -0
- package/src/lib-components/Messages/InteratividadePopup.vue +89 -0
- package/src/lib-components/Messages/LinkPreview.vue +189 -0
- package/src/lib-components/Scroll/ScrollContent.vue +166 -0
- package/src/lib-components/Templates/TemplateGenerator.vue +187 -50
- package/src/lib-components/Templates/TemplateMessage.vue +12 -1
- package/src/lib-components/Templates/TemplateSingle.vue +232 -13
- package/dist/vue-intergrall-plugins.esm.js +0 -5693
- package/dist/vue-intergrall-plugins.ssr.js +0 -5033
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="origin"
|
|
4
|
+
:class="[currentClasses]"
|
|
5
|
+
:id="`card-${messageIndex ? messageIndex : randomizeValue}`"
|
|
6
|
+
>
|
|
7
|
+
<transition name="fade">
|
|
8
|
+
<span v-if="newMessage" class="new-messages" v-text="`Nova mensagem`"></span>
|
|
9
|
+
</transition>
|
|
10
|
+
<div class="card box-shadow">
|
|
11
|
+
<div class="card-header" :style="resizeHeaderCard">
|
|
12
|
+
<div class="card-author">
|
|
13
|
+
<fa-icon :icon="currentIcon" />
|
|
14
|
+
<p
|
|
15
|
+
v-if="author"
|
|
16
|
+
class="text-bold"
|
|
17
|
+
v-text="`${tratarTextoLongo(author)}`"
|
|
18
|
+
:title="author"
|
|
19
|
+
></p>
|
|
20
|
+
<p
|
|
21
|
+
v-if="origin === 'principal' && login"
|
|
22
|
+
v-text="`| ${login}`"
|
|
23
|
+
:title="login"
|
|
24
|
+
></p>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="card-right">
|
|
27
|
+
<div class="card-dates">
|
|
28
|
+
<div
|
|
29
|
+
v-if="date"
|
|
30
|
+
class="card-date"
|
|
31
|
+
:title="`${dictionary.data_criacao}: ${
|
|
32
|
+
origin === 'outros'
|
|
33
|
+
? formataTimezoneData(date)
|
|
34
|
+
: returnFormataDataHora(date)
|
|
35
|
+
}`"
|
|
36
|
+
>
|
|
37
|
+
<span
|
|
38
|
+
v-text="
|
|
39
|
+
origin === 'outros'
|
|
40
|
+
? formataTimezoneData(date)
|
|
41
|
+
: returnFormataDataHora(date)
|
|
42
|
+
"
|
|
43
|
+
></span>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div v-if="hasExpand" class="card-expand" @click="cardExpand()">
|
|
47
|
+
<fa-icon :icon="['fas', 'expand-alt']" />
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<p
|
|
52
|
+
v-if="chipInfos.cod && chipInfos.desc"
|
|
53
|
+
class="card-chip"
|
|
54
|
+
:class="[chipInfosClasses]"
|
|
55
|
+
v-text="`${chipInfos.desc} (${chipInfos.cod})`"
|
|
56
|
+
:title="`${chipInfos.desc} (${chipInfos.cod})`"
|
|
57
|
+
></p>
|
|
58
|
+
<p class="card-message" v-html="formattedMessage"></p>
|
|
59
|
+
<div class="card-footer">
|
|
60
|
+
<template v-if="files && files.length">
|
|
61
|
+
<div class="card-file" v-for="(file, index) in files" :key="`${index}`">
|
|
62
|
+
<CardFile :file="file" :dictionary="dictionary" :domain="domain" />
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
65
|
+
<CardCheck
|
|
66
|
+
v-if="messageStatus"
|
|
67
|
+
:messageStatus="messageStatus"
|
|
68
|
+
:hasReply="hasReply"
|
|
69
|
+
:replyMessage="replyMessage"
|
|
70
|
+
:tooltipContent="tooltipContent"
|
|
71
|
+
@reply-msg="$emit('reply-msg')"
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
|
|
78
|
+
<script>
|
|
79
|
+
import { textoLongo } from "@/mixins/formatarTexto";
|
|
80
|
+
import { formataTimezoneData, formataDataHora } from "../../services/textFormatting";
|
|
81
|
+
import CardFile from "./CardFile";
|
|
82
|
+
import CardCheck from "./CardCheck";
|
|
83
|
+
|
|
84
|
+
export default {
|
|
85
|
+
components: { CardFile, CardCheck },
|
|
86
|
+
props: {
|
|
87
|
+
dictionary: {
|
|
88
|
+
type: Object,
|
|
89
|
+
required: true,
|
|
90
|
+
},
|
|
91
|
+
messageIndex: {
|
|
92
|
+
type: [Number, String],
|
|
93
|
+
required: true,
|
|
94
|
+
},
|
|
95
|
+
domain: {
|
|
96
|
+
type: String,
|
|
97
|
+
required: true,
|
|
98
|
+
},
|
|
99
|
+
hasExpand: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
required: false,
|
|
102
|
+
default: true,
|
|
103
|
+
},
|
|
104
|
+
origin: {
|
|
105
|
+
type: String,
|
|
106
|
+
required: true,
|
|
107
|
+
},
|
|
108
|
+
author: {
|
|
109
|
+
type: String,
|
|
110
|
+
},
|
|
111
|
+
login: {
|
|
112
|
+
type: String,
|
|
113
|
+
},
|
|
114
|
+
message: {
|
|
115
|
+
type: String,
|
|
116
|
+
},
|
|
117
|
+
files: {
|
|
118
|
+
type: Array,
|
|
119
|
+
},
|
|
120
|
+
date: {
|
|
121
|
+
type: String,
|
|
122
|
+
},
|
|
123
|
+
chipInfos: {
|
|
124
|
+
type: Object,
|
|
125
|
+
},
|
|
126
|
+
newMessage: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
},
|
|
129
|
+
hasReply: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
},
|
|
132
|
+
replyMessage: {
|
|
133
|
+
type: String,
|
|
134
|
+
},
|
|
135
|
+
messageStatus: {
|
|
136
|
+
type: String,
|
|
137
|
+
},
|
|
138
|
+
tooltipContent: {
|
|
139
|
+
type: String,
|
|
140
|
+
},
|
|
141
|
+
resizeCard: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
required: false,
|
|
144
|
+
default: false,
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
data() {
|
|
148
|
+
return {
|
|
149
|
+
styleCard: "",
|
|
150
|
+
};
|
|
151
|
+
},
|
|
152
|
+
mixins: [textoLongo],
|
|
153
|
+
computed: {
|
|
154
|
+
randomizeValue() {
|
|
155
|
+
return `${Math.floor(Math.random() * 7770)}${Date.now()}`;
|
|
156
|
+
},
|
|
157
|
+
formattedMessage() {
|
|
158
|
+
if (this.message) {
|
|
159
|
+
const regex = /(\n|\r| )/g;
|
|
160
|
+
if (regex.test(this.message)) return this.message.replace(regex, "<br>");
|
|
161
|
+
}
|
|
162
|
+
return this.message;
|
|
163
|
+
},
|
|
164
|
+
currentIcon() {
|
|
165
|
+
return this.origin === "outros" ? ["fas", "user"] : ["fas", "headset"];
|
|
166
|
+
},
|
|
167
|
+
currentClasses() {
|
|
168
|
+
return `${this.origin === "outros" ? "card-cli" : "card-ope"} ${
|
|
169
|
+
this.newMessage ? "newMessage" : ""
|
|
170
|
+
}`;
|
|
171
|
+
},
|
|
172
|
+
chipInfosClasses() {
|
|
173
|
+
if (!this.chipInfos || !this.chipInfos.cod) return "";
|
|
174
|
+
const { cod } = this.chipInfos;
|
|
175
|
+
switch (cod) {
|
|
176
|
+
case 9:
|
|
177
|
+
case "9":
|
|
178
|
+
case 8:
|
|
179
|
+
case "8":
|
|
180
|
+
return "red";
|
|
181
|
+
case 3:
|
|
182
|
+
case "3":
|
|
183
|
+
case 6:
|
|
184
|
+
case "6":
|
|
185
|
+
return "yellow";
|
|
186
|
+
default:
|
|
187
|
+
return "";
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
resizeHeaderCard() {
|
|
191
|
+
if (this.resizeCard) {
|
|
192
|
+
this.styleCard = "flex-direction: column;";
|
|
193
|
+
} else {
|
|
194
|
+
this.styleCard = "flex-direction: row;";
|
|
195
|
+
}
|
|
196
|
+
return this.styleCard;
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
methods: {
|
|
200
|
+
formataTimezoneData(timezoneData) {
|
|
201
|
+
return formataTimezoneData(timezoneData);
|
|
202
|
+
},
|
|
203
|
+
returnFormataDataHora(dataHora) {
|
|
204
|
+
return formataDataHora(dataHora, false, false, this.dictionary);
|
|
205
|
+
},
|
|
206
|
+
cardExpand() {
|
|
207
|
+
this.$emit("card-expand", this.$props);
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
};
|
|
211
|
+
</script>
|
|
212
|
+
|
|
213
|
+
<style>
|
|
214
|
+
.fade-enter-active,
|
|
215
|
+
.fade-leave-active {
|
|
216
|
+
transition: opacity 200ms;
|
|
217
|
+
}
|
|
218
|
+
.fade-enter,
|
|
219
|
+
.fade-leave-to {
|
|
220
|
+
opacity: 0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.card-cli,
|
|
224
|
+
.card-ope {
|
|
225
|
+
display: flex;
|
|
226
|
+
width: 95%;
|
|
227
|
+
margin: 5px 0;
|
|
228
|
+
position: relative;
|
|
229
|
+
}
|
|
230
|
+
.card-cli.newMessage,
|
|
231
|
+
.card-ope.newMessage {
|
|
232
|
+
margin-top: 30px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.new-messages {
|
|
236
|
+
position: absolute;
|
|
237
|
+
top: -30px;
|
|
238
|
+
width: 100%;
|
|
239
|
+
display: flex;
|
|
240
|
+
justify-content: center;
|
|
241
|
+
align-items: center;
|
|
242
|
+
margin: 2.5px 0;
|
|
243
|
+
background-color: lighten(#fff249, 15);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.card-cli .card {
|
|
247
|
+
border-left: 3px solid #90b823;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.card-ope {
|
|
251
|
+
align-self: flex-end;
|
|
252
|
+
background-color: lighten(#007535, 72);
|
|
253
|
+
}
|
|
254
|
+
.card-ope .card {
|
|
255
|
+
border-right: 3px solid #007535;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.card {
|
|
259
|
+
background-color: rgba(255, 255, 255, 0.9);
|
|
260
|
+
overflow: hidden;
|
|
261
|
+
width: 100%;
|
|
262
|
+
padding: 2.5px 5px;
|
|
263
|
+
}
|
|
264
|
+
.card p {
|
|
265
|
+
word-break: break-all;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.card-header {
|
|
269
|
+
width: 100%;
|
|
270
|
+
border-bottom: 1px solid #ddd;
|
|
271
|
+
margin-bottom: 5px;
|
|
272
|
+
display: flex;
|
|
273
|
+
justify-content: space-between;
|
|
274
|
+
}
|
|
275
|
+
.card-header svg {
|
|
276
|
+
font-size: 16px;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.card-author {
|
|
280
|
+
display: flex;
|
|
281
|
+
align-items: center;
|
|
282
|
+
}
|
|
283
|
+
.card-author svg {
|
|
284
|
+
margin-right: 5px;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.card-canal {
|
|
288
|
+
flex: 1;
|
|
289
|
+
margin-right: 10px;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.card-dates {
|
|
293
|
+
display: flex;
|
|
294
|
+
flex-direction: column;
|
|
295
|
+
margin-right: 10px;
|
|
296
|
+
font-size: 14.4px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.card-date {
|
|
300
|
+
overflow: hidden;
|
|
301
|
+
display: flex;
|
|
302
|
+
align-content: center;
|
|
303
|
+
}
|
|
304
|
+
.card-date span {
|
|
305
|
+
white-space: nowrap;
|
|
306
|
+
text-overflow: ellipsis;
|
|
307
|
+
overflow: hidden;
|
|
308
|
+
}
|
|
309
|
+
.card-date svg {
|
|
310
|
+
margin-right: 5px;
|
|
311
|
+
color: #232323;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.card-expand {
|
|
315
|
+
display: flex;
|
|
316
|
+
justify-content: center;
|
|
317
|
+
align-items: center;
|
|
318
|
+
margin: 2.5px;
|
|
319
|
+
cursor: pointer;
|
|
320
|
+
opacity: 0.8;
|
|
321
|
+
transition: opacity 150ms;
|
|
322
|
+
}
|
|
323
|
+
.card-expand:hover {
|
|
324
|
+
opacity: 1;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.card-footer {
|
|
328
|
+
margin-top: 5px;
|
|
329
|
+
border-top: 1px solid #ddd;
|
|
330
|
+
display: flex;
|
|
331
|
+
flex-wrap: wrap;
|
|
332
|
+
min-height: 25px;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.card-chip {
|
|
336
|
+
font-size: 12.8px;
|
|
337
|
+
width: fit-content;
|
|
338
|
+
border-radius: 15px;
|
|
339
|
+
transition: all 150ms ease-in-out;
|
|
340
|
+
padding: 2.5px 7px;
|
|
341
|
+
color: rgb(31, 105, 193);
|
|
342
|
+
background-color: rgba(207, 216, 244, 0.6);
|
|
343
|
+
margin-bottom: 5px;
|
|
344
|
+
}
|
|
345
|
+
.card-chip:hover {
|
|
346
|
+
background-color: rgba(207, 216, 244, 1);
|
|
347
|
+
}
|
|
348
|
+
.card-chip.orange {
|
|
349
|
+
color: #e14924;
|
|
350
|
+
background-color: rgba(228, 92, 58, 0.15);
|
|
351
|
+
}
|
|
352
|
+
.card-chip.orange:hover {
|
|
353
|
+
background-color: rgba(228, 92, 58, 0.2);
|
|
354
|
+
}
|
|
355
|
+
.card-chip.yellow {
|
|
356
|
+
color: #f4a304;
|
|
357
|
+
background-color: rgba(252, 191, 73, 0.15);
|
|
358
|
+
}
|
|
359
|
+
.card-chip.yellow:hover {
|
|
360
|
+
background-color: rgba(252, 191, 73, 0.2);
|
|
361
|
+
}
|
|
362
|
+
.card-chip.red {
|
|
363
|
+
color: rgb(231, 76, 60);
|
|
364
|
+
background-color: rgba(231, 76, 60, 0.2);
|
|
365
|
+
}
|
|
366
|
+
.card-chip.red:hover {
|
|
367
|
+
background-color: rgba(231, 76, 60, 0.25);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.card-file {
|
|
371
|
+
width: 60px;
|
|
372
|
+
height: 50px;
|
|
373
|
+
margin-right: 5px;
|
|
374
|
+
display: flex;
|
|
375
|
+
justify-content: center;
|
|
376
|
+
align-items: center;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.card-reply {
|
|
380
|
+
cursor: pointer;
|
|
381
|
+
position: absolute;
|
|
382
|
+
right: 30px;
|
|
383
|
+
bottom: 5px;
|
|
384
|
+
font-size: 9.6px;
|
|
385
|
+
color: #67a332;
|
|
386
|
+
width: 14.4px;
|
|
387
|
+
height: 14.4px;
|
|
388
|
+
display: flex;
|
|
389
|
+
justify-content: center;
|
|
390
|
+
align-items: center;
|
|
391
|
+
border-radius: 50%;
|
|
392
|
+
background-color: #fff;
|
|
393
|
+
}
|
|
394
|
+
.card-reply svg {
|
|
395
|
+
margin-top: -1px;
|
|
396
|
+
margin-right: -1px;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.card-check {
|
|
400
|
+
position: absolute;
|
|
401
|
+
bottom: 5px;
|
|
402
|
+
right: 5px;
|
|
403
|
+
cursor: pointer;
|
|
404
|
+
font-size: 11.2px;
|
|
405
|
+
}
|
|
406
|
+
.card-check svg {
|
|
407
|
+
font-size: 12.8px;
|
|
408
|
+
}
|
|
409
|
+
.card-check.seen,
|
|
410
|
+
.card-check.seen svg {
|
|
411
|
+
color: #006daa;
|
|
412
|
+
}
|
|
413
|
+
.card-check.green,
|
|
414
|
+
.card-check.green svg {
|
|
415
|
+
color: #4f772d;
|
|
416
|
+
}
|
|
417
|
+
.card-check.red,
|
|
418
|
+
.card-check.red svg {
|
|
419
|
+
color: #ba181b;
|
|
420
|
+
}
|
|
421
|
+
.card-check.gray,
|
|
422
|
+
.card-check.gray svg {
|
|
423
|
+
color: #999;
|
|
424
|
+
}
|
|
425
|
+
.card-check.black,
|
|
426
|
+
.card-check.black svg {
|
|
427
|
+
color: #666;
|
|
428
|
+
}
|
|
429
|
+
</style>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<transition name="fade" mode="out-in">
|
|
4
|
+
<span class="card-reply" v-if="hasReply && (messageStatus == 'C' || messageStatus == 'T')" v-tippy :content="replyMessage ? replyMessage : 'Fazer reenvio da mensagem'" @click="$emit('reply-msg')"> <fa-icon :icon="['fas', 'reply']" /> </span>
|
|
5
|
+
</transition>
|
|
6
|
+
<transition name="fade" mode="out-in">
|
|
7
|
+
<span class="card-check" v-if="messageStatus == 'D'" :content="tooltipContent" v-tippy key="check-padrao"> <fa-icon :icon="['fas', 'check']" /> </span>
|
|
8
|
+
<span class="card-check gray" v-else-if="messageStatus == 'Q'" :content="tooltipContent" v-tippy key="check-gray"> <fa-icon :icon="['fas', 'check']" /> </span>
|
|
9
|
+
<span class="card-check black" v-else-if="messageStatus == 'G'" :content="tooltipContent" v-tippy key="check-black"> <fa-icon :icon="['fas', 'check']" /> </span>
|
|
10
|
+
<span class="card-check black" v-else-if="messageStatus == 'E'" :content="tooltipContent" v-tippy key="double-check-black"> <fa-icon :icon="['fas', 'check-double']" /> </span>
|
|
11
|
+
<span class="card-check seen" v-else-if="messageStatus == 'L'" :content="tooltipContent" v-tippy key="double-check-seen"> <fa-icon :icon="['fas', 'check-double']" /> </span> <!-- messageStatus finalizador -->
|
|
12
|
+
<span class="card-check red" v-else-if="messageStatus == 'C'" :content="tooltipContent" v-tippy key="times-circle"> <fa-icon :icon="['fas', 'times-circle']" /> </span> <!-- messageStatus finalizador -->
|
|
13
|
+
<span class="card-check red" v-else-if="messageStatus == 'T'" :content="tooltipContent" v-tippy key="hourglass"> <fa-icon :icon="['fas', 'hourglass']" /> </span> <!-- Status finalizador -->
|
|
14
|
+
</transition>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
export default {
|
|
20
|
+
props: {
|
|
21
|
+
hasReply: {
|
|
22
|
+
type: Boolean
|
|
23
|
+
},
|
|
24
|
+
messageStatus: {
|
|
25
|
+
type: String
|
|
26
|
+
},
|
|
27
|
+
replyMessage: {
|
|
28
|
+
type: String
|
|
29
|
+
},
|
|
30
|
+
tooltipContent: {
|
|
31
|
+
type: String
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
</script>
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span class="file-item">
|
|
3
|
+
<transition-group name="fade" mode="out-in" class="file-item-transition">
|
|
4
|
+
<div v-if="isLoading" :small="true" key="card-file-loader" class="req-loader slow"></div>
|
|
5
|
+
<template v-else>
|
|
6
|
+
<span v-if="imageURL" class="file-img box-shadow" @click="openWindowFromURL(imageURL, true)" key="card-file-img" :title="filename">
|
|
7
|
+
<img :src="`${imageURL}`" :alt="filename" />
|
|
8
|
+
</span>
|
|
9
|
+
<span
|
|
10
|
+
v-else
|
|
11
|
+
class="file-icon"
|
|
12
|
+
key="card-file-doc"
|
|
13
|
+
:class="[iconClass]"
|
|
14
|
+
@click="openWindowFromURL(docURL, false)"
|
|
15
|
+
:title="filename"
|
|
16
|
+
target="_blank"
|
|
17
|
+
rel="noreferrer noopener"
|
|
18
|
+
>
|
|
19
|
+
<fa-icon :icon="icon" />
|
|
20
|
+
</span>
|
|
21
|
+
<a :href="imageURL ? imageURL : docURL" :download="`${filename}`" target="_blank" rel="noreferrer noopener" key="card-file-download-icon" :title="`Download ${filename}`">
|
|
22
|
+
<fa-icon :icon="['fas', 'download']" />
|
|
23
|
+
</a>
|
|
24
|
+
</template>
|
|
25
|
+
</transition-group>
|
|
26
|
+
</span>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<style scoped>
|
|
30
|
+
.fade-enter-active, .fade-leave-active {
|
|
31
|
+
transition: opacity .5s;
|
|
32
|
+
}
|
|
33
|
+
.fade-enter, .fade-leave-to {
|
|
34
|
+
opacity: 0;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
37
|
+
|
|
38
|
+
<script>
|
|
39
|
+
import { fileHandler } from "../../mixins/fileHandler"
|
|
40
|
+
|
|
41
|
+
export default {
|
|
42
|
+
mixins: [fileHandler],
|
|
43
|
+
props: {
|
|
44
|
+
file: {
|
|
45
|
+
type: Object,
|
|
46
|
+
required: true
|
|
47
|
+
},
|
|
48
|
+
dictionary: {
|
|
49
|
+
type: Object,
|
|
50
|
+
required: true
|
|
51
|
+
},
|
|
52
|
+
domain: {
|
|
53
|
+
type: String,
|
|
54
|
+
required: true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
mounted(){
|
|
58
|
+
this.setFileVars(this.file, { dominio: this.domain })
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<style>
|
|
64
|
+
.file-item {
|
|
65
|
+
width: 100%;
|
|
66
|
+
height: 100%;
|
|
67
|
+
display: flex;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
align-items: center;
|
|
70
|
+
position: relative;
|
|
71
|
+
}
|
|
72
|
+
.file-item-transition {
|
|
73
|
+
max-width: 100%;
|
|
74
|
+
max-height: 100%;
|
|
75
|
+
display: flex;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
align-items: center;
|
|
78
|
+
position: relative;
|
|
79
|
+
}
|
|
80
|
+
.file-item .req-loader {
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: calc(50% - 12.5px);
|
|
83
|
+
right: calc(50% - 12.5px);
|
|
84
|
+
}
|
|
85
|
+
.file-item-transition img {
|
|
86
|
+
max-width: 45px;
|
|
87
|
+
max-height: 45px;
|
|
88
|
+
}
|
|
89
|
+
.file-item a {
|
|
90
|
+
margin-left: 5px;
|
|
91
|
+
text-decoration: none;
|
|
92
|
+
color: #333;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.file-icon {
|
|
96
|
+
display: flex;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
align-items: center;
|
|
99
|
+
font-size: 30px;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
}
|
|
102
|
+
.file-icon:hover {
|
|
103
|
+
opacity: 1
|
|
104
|
+
}
|
|
105
|
+
.file-icon:visited {
|
|
106
|
+
color: inherit;
|
|
107
|
+
}
|
|
108
|
+
svg {
|
|
109
|
+
font-size: 30px;
|
|
110
|
+
z-index: 1;
|
|
111
|
+
}
|
|
112
|
+
.file-icon.pdf {
|
|
113
|
+
position: relative;
|
|
114
|
+
}
|
|
115
|
+
.file-icon.pdf svg {
|
|
116
|
+
color: rgb(231, 76, 60);
|
|
117
|
+
}
|
|
118
|
+
.file-icon.pdf::after {
|
|
119
|
+
content: "";
|
|
120
|
+
position: absolute;
|
|
121
|
+
bottom: 2px;
|
|
122
|
+
transform: translateY(2px);
|
|
123
|
+
width: 20px;
|
|
124
|
+
height: 20px;
|
|
125
|
+
background-color: #FFF;
|
|
126
|
+
}
|
|
127
|
+
.file-icon.doc {
|
|
128
|
+
color: #15517F;
|
|
129
|
+
}
|
|
130
|
+
.file-icon.doc::after {
|
|
131
|
+
content: "";
|
|
132
|
+
position: absolute;
|
|
133
|
+
width: 20px;
|
|
134
|
+
height: 20px;
|
|
135
|
+
background-color: #FFF;
|
|
136
|
+
}
|
|
137
|
+
.file-img {
|
|
138
|
+
display: flex;
|
|
139
|
+
justify-content: center;
|
|
140
|
+
align-items: center;
|
|
141
|
+
width: 100%;
|
|
142
|
+
height: 100%;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
background-color: rgba(0, 0, 0, .2);
|
|
145
|
+
border-radius: 2.5px;
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
opacity: .9;
|
|
148
|
+
transition: opacity 150ms;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.file-img:hover {
|
|
152
|
+
opacity: 1;
|
|
153
|
+
}
|
|
154
|
+
.file-img img {
|
|
155
|
+
width: 95%;
|
|
156
|
+
}
|
|
157
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="audio-speed-control" @click="toggleSpeed">
|
|
3
|
+
<div class="speed-circle" :class="{ 'active': audioSpeed !== 1 }">
|
|
4
|
+
{{ audioSpeed === 1 ? '1x' : audioSpeed + 'x' }}
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
data() {
|
|
12
|
+
return {
|
|
13
|
+
audioSpeed: 1.0, // Velocidade padrão
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
methods: {
|
|
17
|
+
toggleSpeed() {
|
|
18
|
+
if (this.audioSpeed === 1) {
|
|
19
|
+
this.audioSpeed = 1.5;
|
|
20
|
+
} else if (this.audioSpeed === 1.5) {
|
|
21
|
+
this.audioSpeed = 2;
|
|
22
|
+
} else {
|
|
23
|
+
this.audioSpeed = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Emita o evento sempre que a velocidade for alterada
|
|
27
|
+
this.$emit("change-speed", this.audioSpeed);
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style scoped>
|
|
34
|
+
.audio-speed-control {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
margin-left: 10px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.speed-circle {
|
|
42
|
+
width: 40px;
|
|
43
|
+
height: 40px;
|
|
44
|
+
background-color: #f1f3f4; /* Cor do círculo */
|
|
45
|
+
border: solid black 1px;
|
|
46
|
+
color: black;
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
align-items: center;
|
|
50
|
+
border-radius: 50%;
|
|
51
|
+
font-weight: bold;
|
|
52
|
+
transition: background-color 0.3s;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.speed-circle.active {
|
|
56
|
+
background-color: #f1f3f4; /* Cor quando ativo */
|
|
57
|
+
border: solid blue 1px;
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="text-footer-actions--btn"
|
|
4
|
+
@click="$emit('click-trigger')"
|
|
5
|
+
:title="dictionary.msg_baixar_todos_anexos"
|
|
6
|
+
>
|
|
7
|
+
<span class="multiplos">
|
|
8
|
+
<fa-icon :icon="['fas', 'download']" />
|
|
9
|
+
<fa-icon :icon="['fas', 'paperclip']" class="small" />
|
|
10
|
+
</span>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<style scoped>
|
|
15
|
+
.multiplos {
|
|
16
|
+
display: flex;
|
|
17
|
+
}
|
|
18
|
+
.multiplos svg {
|
|
19
|
+
font-size: 15.2px;
|
|
20
|
+
}
|
|
21
|
+
.multiplos svg.small {
|
|
22
|
+
font-size: 11.2px !important;
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
export default {
|
|
28
|
+
props: {
|
|
29
|
+
dictionary: {
|
|
30
|
+
type: Object,
|
|
31
|
+
default: {},
|
|
32
|
+
required: false,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
</script>
|