vue-intergrall-plugins 0.0.139 → 0.0.143
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/dist/vue-intergrall-plugins.esm.js +536 -220
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +523 -225
- package/package.json +63 -63
- package/src/lib-components/Cards/Card.vue +73 -80
- package/src/lib-components/Cards/CardCheck.vue +35 -0
- package/src/lib-components/Cards/CardFile.vue +96 -0
- package/src/lib-components/Messages/ChatMessages.vue +76 -5
package/package.json
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vue-intergrall-plugins",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dist/vue-intergrall-plugins.ssr.js",
|
|
6
|
-
"browser": "dist/vue-intergrall-plugins.esm.js",
|
|
7
|
-
"module": "dist/vue-intergrall-plugins.esm.js",
|
|
8
|
-
"unpkg": "dist/vue-intergrall-plugins.min.js",
|
|
9
|
-
"files": [
|
|
10
|
-
"dist/*",
|
|
11
|
-
"src/**/*.vue"
|
|
12
|
-
],
|
|
13
|
-
"sideEffects": false,
|
|
14
|
-
"scripts": {
|
|
15
|
-
"serve": "vue-cli-service serve dev/serve.js",
|
|
16
|
-
"prebuild": "rimraf ./dist",
|
|
17
|
-
"build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js",
|
|
18
|
-
"build:ssr": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs",
|
|
19
|
-
"build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es",
|
|
20
|
-
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife"
|
|
21
|
-
},
|
|
22
|
-
"dependencies": {},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@babel/core": "^7.15.5",
|
|
25
|
-
"@babel/preset-env": "^7.15.6",
|
|
26
|
-
"@rollup/plugin-alias": "^3.1.2",
|
|
27
|
-
"@rollup/plugin-babel": "^5.3.0",
|
|
28
|
-
"@rollup/plugin-commonjs": "^14.0.0",
|
|
29
|
-
"@rollup/plugin-json": "^4.1.0",
|
|
30
|
-
"@rollup/plugin-node-resolve": "^9.0.0",
|
|
31
|
-
"@rollup/plugin-replace": "^2.4.2",
|
|
32
|
-
"@vue/cli-plugin-babel": "^4.5.13",
|
|
33
|
-
"@vue/cli-service": "^4.5.13",
|
|
34
|
-
"autoprefixer": "^10.3.6",
|
|
35
|
-
"cross-env": "^7.0.3",
|
|
36
|
-
"cssnano": "^5.0.8",
|
|
37
|
-
"minimist": "^1.2.5",
|
|
38
|
-
"rimraf": "^3.0.2",
|
|
39
|
-
"rollup": "^2.58.0",
|
|
40
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
41
|
-
"rollup-plugin-vue": "^5.1.9",
|
|
42
|
-
"vue": "^2.6.14",
|
|
43
|
-
"vue-template-compiler": "^2.6.14"
|
|
44
|
-
},
|
|
45
|
-
"peerDependencies": {
|
|
46
|
-
"vue": "^2.6.14",
|
|
47
|
-
"@fortawesome/fontawesome-free": "^5.15.4",
|
|
48
|
-
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
|
49
|
-
"@fortawesome/free-solid-svg-icons": "^5.15.4",
|
|
50
|
-
"@fortawesome/vue-fontawesome": "^2.0.2",
|
|
51
|
-
"@popperjs/core": "^2.10.2",
|
|
52
|
-
"core-js": "^3.18.1",
|
|
53
|
-
"postcss": "^8.3.8",
|
|
54
|
-
"vue-clickaway": "^2.2.2",
|
|
55
|
-
"vue-select": "^3.13.0",
|
|
56
|
-
"vue-tippy": "^4.12.0",
|
|
57
|
-
"vue-toasted": "^1.1.28",
|
|
58
|
-
"vue2-google-maps": "^0.10.7"
|
|
59
|
-
},
|
|
60
|
-
"engines": {
|
|
61
|
-
"node": ">=12"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vue-intergrall-plugins",
|
|
3
|
+
"version": "0.0.143",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/vue-intergrall-plugins.ssr.js",
|
|
6
|
+
"browser": "dist/vue-intergrall-plugins.esm.js",
|
|
7
|
+
"module": "dist/vue-intergrall-plugins.esm.js",
|
|
8
|
+
"unpkg": "dist/vue-intergrall-plugins.min.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/*",
|
|
11
|
+
"src/**/*.vue"
|
|
12
|
+
],
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"scripts": {
|
|
15
|
+
"serve": "vue-cli-service serve dev/serve.js",
|
|
16
|
+
"prebuild": "rimraf ./dist",
|
|
17
|
+
"build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js",
|
|
18
|
+
"build:ssr": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs",
|
|
19
|
+
"build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es",
|
|
20
|
+
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@babel/core": "^7.15.5",
|
|
25
|
+
"@babel/preset-env": "^7.15.6",
|
|
26
|
+
"@rollup/plugin-alias": "^3.1.2",
|
|
27
|
+
"@rollup/plugin-babel": "^5.3.0",
|
|
28
|
+
"@rollup/plugin-commonjs": "^14.0.0",
|
|
29
|
+
"@rollup/plugin-json": "^4.1.0",
|
|
30
|
+
"@rollup/plugin-node-resolve": "^9.0.0",
|
|
31
|
+
"@rollup/plugin-replace": "^2.4.2",
|
|
32
|
+
"@vue/cli-plugin-babel": "^4.5.13",
|
|
33
|
+
"@vue/cli-service": "^4.5.13",
|
|
34
|
+
"autoprefixer": "^10.3.6",
|
|
35
|
+
"cross-env": "^7.0.3",
|
|
36
|
+
"cssnano": "^5.0.8",
|
|
37
|
+
"minimist": "^1.2.5",
|
|
38
|
+
"rimraf": "^3.0.2",
|
|
39
|
+
"rollup": "^2.58.0",
|
|
40
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
41
|
+
"rollup-plugin-vue": "^5.1.9",
|
|
42
|
+
"vue": "^2.6.14",
|
|
43
|
+
"vue-template-compiler": "^2.6.14"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"vue": "^2.6.14",
|
|
47
|
+
"@fortawesome/fontawesome-free": "^5.15.4",
|
|
48
|
+
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
|
49
|
+
"@fortawesome/free-solid-svg-icons": "^5.15.4",
|
|
50
|
+
"@fortawesome/vue-fontawesome": "^2.0.2",
|
|
51
|
+
"@popperjs/core": "^2.10.2",
|
|
52
|
+
"core-js": "^3.18.1",
|
|
53
|
+
"postcss": "^8.3.8",
|
|
54
|
+
"vue-clickaway": "^2.2.2",
|
|
55
|
+
"vue-select": "^3.13.0",
|
|
56
|
+
"vue-tippy": "^4.12.0",
|
|
57
|
+
"vue-toasted": "^1.1.28",
|
|
58
|
+
"vue2-google-maps": "^0.10.7"
|
|
59
|
+
},
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=12"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -45,10 +45,20 @@
|
|
|
45
45
|
v-text="`${chipInfos.desc} (${chipInfos.cod})`" :title="`${chipInfos.desc} (${chipInfos.cod})`">
|
|
46
46
|
</p>
|
|
47
47
|
<p class="card-message" v-html="formattedMessage"></p>
|
|
48
|
-
<div class="card-footer"
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
|
|
48
|
+
<div class="card-footer">
|
|
49
|
+
<template v-if="files && files.length">
|
|
50
|
+
<div class="card-file" v-for="(file, index) in files" :key="`${index}`">
|
|
51
|
+
<CardFile :file="file" :dictionary="dictionary" :domain="domain" />
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
<CardCheck
|
|
55
|
+
v-if="messageStatus"
|
|
56
|
+
:messageStatus="messageStatus"
|
|
57
|
+
:hasReply="hasReply"
|
|
58
|
+
:replyMessage="replyMessage"
|
|
59
|
+
:tooltipContent="tooltipContent"
|
|
60
|
+
@reply-msg="$emit('reply-msg')"
|
|
61
|
+
/>
|
|
52
62
|
</div>
|
|
53
63
|
</div>
|
|
54
64
|
</div>
|
|
@@ -58,9 +68,10 @@
|
|
|
58
68
|
import { textoLongo } from "@/mixins/formatarTexto"
|
|
59
69
|
import { formataTimezoneData, formataDataHora } from "../../services/textFormatting"
|
|
60
70
|
import CardFile from "./CardFile"
|
|
71
|
+
import CardCheck from "./CardCheck"
|
|
61
72
|
|
|
62
73
|
export default {
|
|
63
|
-
components: { CardFile },
|
|
74
|
+
components: { CardFile, CardCheck },
|
|
64
75
|
props: {
|
|
65
76
|
dictionary: {
|
|
66
77
|
type: Object,
|
|
@@ -103,6 +114,18 @@ export default {
|
|
|
103
114
|
},
|
|
104
115
|
newMessage: {
|
|
105
116
|
type: Boolean
|
|
117
|
+
},
|
|
118
|
+
hasReply: {
|
|
119
|
+
type: Boolean
|
|
120
|
+
},
|
|
121
|
+
replyMessage: {
|
|
122
|
+
type: String
|
|
123
|
+
},
|
|
124
|
+
messageStatus: {
|
|
125
|
+
type: String
|
|
126
|
+
},
|
|
127
|
+
tooltipContent: {
|
|
128
|
+
type: String
|
|
106
129
|
}
|
|
107
130
|
},
|
|
108
131
|
mixins: [textoLongo],
|
|
@@ -156,7 +179,7 @@ export default {
|
|
|
156
179
|
}
|
|
157
180
|
</script>
|
|
158
181
|
|
|
159
|
-
<style
|
|
182
|
+
<style>
|
|
160
183
|
.fade-enter-active,
|
|
161
184
|
.fade-leave-active {
|
|
162
185
|
transition: opacity 200ms;
|
|
@@ -221,6 +244,14 @@ export default {
|
|
|
221
244
|
font-size: 1rem
|
|
222
245
|
}
|
|
223
246
|
|
|
247
|
+
.card-author {
|
|
248
|
+
display: flex;
|
|
249
|
+
align-items: center;
|
|
250
|
+
}
|
|
251
|
+
.card-author svg {
|
|
252
|
+
margin-right: 5px;
|
|
253
|
+
}
|
|
254
|
+
|
|
224
255
|
.card-canal {
|
|
225
256
|
flex: 1;
|
|
226
257
|
margin-right: 10px;
|
|
@@ -230,6 +261,7 @@ export default {
|
|
|
230
261
|
display: flex;
|
|
231
262
|
flex-direction: column;
|
|
232
263
|
margin-right: 10px;
|
|
264
|
+
font-size: .9rem
|
|
233
265
|
}
|
|
234
266
|
|
|
235
267
|
.card-date {
|
|
@@ -265,6 +297,7 @@ export default {
|
|
|
265
297
|
border-top: 1px solid #ddd;
|
|
266
298
|
display: flex;
|
|
267
299
|
flex-wrap: wrap;
|
|
300
|
+
min-height: 25px;
|
|
268
301
|
}
|
|
269
302
|
|
|
270
303
|
|
|
@@ -304,98 +337,58 @@ export default {
|
|
|
304
337
|
}
|
|
305
338
|
|
|
306
339
|
.card-file {
|
|
307
|
-
width:
|
|
340
|
+
width: 60px;
|
|
308
341
|
height: 50px;
|
|
309
342
|
margin-right: 5px;
|
|
310
343
|
display: flex;
|
|
311
344
|
justify-content: center;
|
|
312
345
|
align-items: center;
|
|
313
346
|
}
|
|
314
|
-
.file-item {
|
|
315
|
-
width: 100%;
|
|
316
|
-
height: 100%;
|
|
317
|
-
display: flex;
|
|
318
|
-
justify-content: center;
|
|
319
|
-
align-items: center;
|
|
320
|
-
position: relative;
|
|
321
|
-
}
|
|
322
|
-
.file-item .file-item-transition {
|
|
323
|
-
max-width: 100%;
|
|
324
|
-
max-height: 100%;
|
|
325
|
-
}
|
|
326
|
-
.file-item .req-loader {
|
|
327
|
-
position: absolute;
|
|
328
|
-
top: calc(50% - 12.5px);
|
|
329
|
-
right: calc(50% - 12.5px);
|
|
330
|
-
}
|
|
331
|
-
.file-item .file-item-transition img {
|
|
332
|
-
max-width: 45px;
|
|
333
|
-
max-height: 45px;
|
|
334
|
-
}
|
|
335
347
|
|
|
336
|
-
.
|
|
337
|
-
opacity: .9;
|
|
338
|
-
transition: opacity 200ms;
|
|
339
|
-
color: #222;
|
|
348
|
+
.card-reply {
|
|
340
349
|
cursor: pointer;
|
|
350
|
+
position: absolute;
|
|
351
|
+
right: 30px;
|
|
352
|
+
bottom: 5px;
|
|
353
|
+
font-size: .6rem;
|
|
354
|
+
color: #67a332;
|
|
355
|
+
width: .9rem;
|
|
356
|
+
height: .9rem;
|
|
341
357
|
display: flex;
|
|
342
358
|
justify-content: center;
|
|
343
359
|
align-items: center;
|
|
360
|
+
border-radius: 50%;
|
|
361
|
+
background-color: #FFF;
|
|
344
362
|
}
|
|
345
|
-
.
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
svg {
|
|
352
|
-
font-size: 30px;
|
|
353
|
-
z-index: 1;
|
|
354
|
-
}
|
|
355
|
-
.file-icon.pdf {
|
|
356
|
-
position: relative;
|
|
357
|
-
}
|
|
358
|
-
.file-icon.pdf svg {
|
|
359
|
-
color: rgb(231, 76, 60);
|
|
360
|
-
}
|
|
361
|
-
.file-icon.pdf::after {
|
|
362
|
-
content: "";
|
|
363
|
+
.card-reply svg {
|
|
364
|
+
margin-top: -1px;
|
|
365
|
+
margin-right: -1px;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.card-check{
|
|
363
369
|
position: absolute;
|
|
364
|
-
bottom:
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
background-color: #FFF;
|
|
370
|
+
bottom: 5px;
|
|
371
|
+
right: 5px;
|
|
372
|
+
cursor: pointer;
|
|
373
|
+
font-size: 0.7rem;
|
|
369
374
|
}
|
|
370
|
-
.
|
|
371
|
-
|
|
375
|
+
.card-check svg {
|
|
376
|
+
font-size: 0.8rem;
|
|
372
377
|
}
|
|
373
|
-
.
|
|
374
|
-
|
|
375
|
-
position: absolute;
|
|
376
|
-
width: 20px;
|
|
377
|
-
height: 20px;
|
|
378
|
-
background-color: #FFF;
|
|
378
|
+
.card-check.seen, .card-check.seen svg{
|
|
379
|
+
color: #006DAA
|
|
379
380
|
}
|
|
380
|
-
.
|
|
381
|
-
|
|
382
|
-
justify-content: center;
|
|
383
|
-
align-items: center;
|
|
384
|
-
width: 100%;
|
|
385
|
-
height: 100%;
|
|
386
|
-
overflow: hidden;
|
|
387
|
-
background-color: rgba(0, 0, 0, .2);
|
|
388
|
-
border-radius: 2.5px;
|
|
389
|
-
cursor: pointer;
|
|
390
|
-
opacity: .9;
|
|
391
|
-
transition: opacity 150ms;
|
|
381
|
+
.card-check.green, .card-check.green svg{
|
|
382
|
+
color: #4f772d
|
|
392
383
|
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
opacity: 1;
|
|
384
|
+
.card-check.red, .card-check.red svg{
|
|
385
|
+
color: #ba181b
|
|
396
386
|
}
|
|
397
|
-
.
|
|
398
|
-
|
|
387
|
+
.card-check.gray, .card-check.gray svg{
|
|
388
|
+
color: #999
|
|
389
|
+
}
|
|
390
|
+
.card-check.black, .card-check.black svg{
|
|
391
|
+
color: #666
|
|
399
392
|
}
|
|
400
393
|
|
|
401
394
|
</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>
|
|
@@ -115,3 +115,99 @@ export default {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
</script>
|
|
118
|
+
|
|
119
|
+
<style>
|
|
120
|
+
.file-item {
|
|
121
|
+
width: 100%;
|
|
122
|
+
height: 100%;
|
|
123
|
+
display: flex;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
align-items: center;
|
|
126
|
+
position: relative;
|
|
127
|
+
}
|
|
128
|
+
.file-item-transition {
|
|
129
|
+
max-width: 100%;
|
|
130
|
+
max-height: 100%;
|
|
131
|
+
display: flex;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
align-items: center;
|
|
134
|
+
position: relative;
|
|
135
|
+
}
|
|
136
|
+
.file-item .req-loader {
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: calc(50% - 12.5px);
|
|
139
|
+
right: calc(50% - 12.5px);
|
|
140
|
+
}
|
|
141
|
+
.file-item-transition img {
|
|
142
|
+
max-width: 45px;
|
|
143
|
+
max-height: 45px;
|
|
144
|
+
}
|
|
145
|
+
.file-item a {
|
|
146
|
+
margin-left: 5px;
|
|
147
|
+
text-decoration: none;
|
|
148
|
+
color: #333;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.file-icon {
|
|
152
|
+
display: flex;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
align-items: center;
|
|
155
|
+
font-size: 30px;
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
}
|
|
158
|
+
.file-icon:hover {
|
|
159
|
+
opacity: 1
|
|
160
|
+
}
|
|
161
|
+
.file-icon:visited {
|
|
162
|
+
color: inherit;
|
|
163
|
+
}
|
|
164
|
+
svg {
|
|
165
|
+
font-size: 30px;
|
|
166
|
+
z-index: 1;
|
|
167
|
+
}
|
|
168
|
+
.file-icon.pdf {
|
|
169
|
+
position: relative;
|
|
170
|
+
}
|
|
171
|
+
.file-icon.pdf svg {
|
|
172
|
+
color: rgb(231, 76, 60);
|
|
173
|
+
}
|
|
174
|
+
.file-icon.pdf::after {
|
|
175
|
+
content: "";
|
|
176
|
+
position: absolute;
|
|
177
|
+
bottom: 2px;
|
|
178
|
+
transform: translateY(2px);
|
|
179
|
+
width: 20px;
|
|
180
|
+
height: 20px;
|
|
181
|
+
background-color: #FFF;
|
|
182
|
+
}
|
|
183
|
+
.file-icon.doc {
|
|
184
|
+
color: #15517F;
|
|
185
|
+
}
|
|
186
|
+
.file-icon.doc::after {
|
|
187
|
+
content: "";
|
|
188
|
+
position: absolute;
|
|
189
|
+
width: 20px;
|
|
190
|
+
height: 20px;
|
|
191
|
+
background-color: #FFF;
|
|
192
|
+
}
|
|
193
|
+
.file-img {
|
|
194
|
+
display: flex;
|
|
195
|
+
justify-content: center;
|
|
196
|
+
align-items: center;
|
|
197
|
+
width: 100%;
|
|
198
|
+
height: 100%;
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
background-color: rgba(0, 0, 0, .2);
|
|
201
|
+
border-radius: 2.5px;
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
opacity: .9;
|
|
204
|
+
transition: opacity 150ms;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.file-img:hover {
|
|
208
|
+
opacity: 1;
|
|
209
|
+
}
|
|
210
|
+
.file-img img {
|
|
211
|
+
width: 95%;
|
|
212
|
+
}
|
|
213
|
+
</style>
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
<AnexoMensagem :dictionary="dictionary" :anexo="anexo" :origemExterna="origemExterna" :dominio="dominio" @abrir-imagem="abrirImagem"/>
|
|
7
7
|
</div>
|
|
8
8
|
</template>
|
|
9
|
+
<img class="default-stick-size" v-if="urlSticker" :src="urlSticker" :title="urlFileName">
|
|
9
10
|
<div v-if="mapa" class="mensagem-div-mapa">
|
|
10
11
|
<GmapMap
|
|
11
12
|
:id="`mapa_${seq}`"
|
|
@@ -23,14 +24,17 @@
|
|
|
23
24
|
</li>
|
|
24
25
|
</ul>
|
|
25
26
|
</div>
|
|
26
|
-
<p v-html="formatMsg(
|
|
27
|
+
<p v-html="formatMsg(message)"></p>
|
|
27
28
|
<InteratividadeBotoes
|
|
28
29
|
v-if="interatividade"
|
|
29
30
|
:interatividade="interatividade"
|
|
30
31
|
/>
|
|
31
32
|
<span class="horario-envio" v-text="horario"></span>
|
|
32
33
|
<transition name="fade" mode="out-in">
|
|
33
|
-
<span class="reply" v-if="hasReply && (status == 'C' || status == 'T')" v-tippy :content="msgReply ? msgReply : 'Fazer reenvio da mensagem'" @click="$emit('replyMsg')"> <fa-icon :icon="['fas', 'reply']" /> </span>
|
|
34
|
+
<span :class="reply" v-if="hasReply && (status == 'C' || status == 'T')" v-tippy :content="msgReply ? msgReply : 'Fazer reenvio da mensagem'" @click="$emit('replyMsg')"> <fa-icon :icon="['fas', 'reply']" /> </span>
|
|
35
|
+
</transition>
|
|
36
|
+
<transition name="fade" mode="out-in">
|
|
37
|
+
<span class="star dourado" v-if="iniDialogo == 1" :content="contentTooltipStar" v-tippy key="star-padrao"> <fa-icon :icon="['fas', 'star']" /> </span>
|
|
34
38
|
</transition>
|
|
35
39
|
<transition name="fade" mode="out-in">
|
|
36
40
|
<span class="check" v-if="status == 'D'" :content="contentTooltip" v-tippy key="check-padrao"> <fa-icon :icon="['fas', 'check']" /> </span>
|
|
@@ -50,14 +54,19 @@
|
|
|
50
54
|
<script>
|
|
51
55
|
import AnexoMensagem from "./AnexoMensagem"
|
|
52
56
|
import InteratividadeBotoes from "./InteratividadeBotoes"
|
|
57
|
+
import { formataTimezoneData } from "../../services/textFormatting"
|
|
53
58
|
|
|
54
59
|
export default {
|
|
55
60
|
components: { AnexoMensagem, InteratividadeBotoes },
|
|
56
|
-
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"],
|
|
61
|
+
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"],
|
|
57
62
|
data(){
|
|
58
63
|
return{
|
|
59
64
|
strTooltipAux: "",
|
|
60
65
|
linkAux: "",
|
|
66
|
+
urlSticker: "",
|
|
67
|
+
urlFileName: "",
|
|
68
|
+
message: "",
|
|
69
|
+
reply: "reply",
|
|
61
70
|
center: {},
|
|
62
71
|
marker: {},
|
|
63
72
|
infos: [],
|
|
@@ -97,13 +106,59 @@ export default {
|
|
|
97
106
|
set(msg){
|
|
98
107
|
return this.contentTooltip = msg
|
|
99
108
|
}
|
|
109
|
+
},
|
|
110
|
+
contentTooltipStar() {
|
|
111
|
+
let tooltipStar = "";
|
|
112
|
+
if(this.iniDialogo == 1){
|
|
113
|
+
tooltipStar += this.dictionary['ini_sessao']+"<br/>"
|
|
114
|
+
tooltipStar += this.dictionary['id_conversa']+" - "+this.dialogoId+"<br/>"
|
|
115
|
+
tooltipStar += this.dictionary['origem_conversa']+" - "+this.dialogoOrigem+"<br/>"
|
|
116
|
+
tooltipStar += this.dictionary['expiracao_sessao']+" - "+formataTimezoneData(this.expSessao)+"<br/>"
|
|
117
|
+
return tooltipStar
|
|
118
|
+
}
|
|
119
|
+
return tooltipStar
|
|
100
120
|
}
|
|
101
121
|
},
|
|
102
122
|
mounted() {
|
|
103
123
|
if(this.mapa) this.setMap()
|
|
104
124
|
if(this.corMsg) this.setCorMsg()
|
|
125
|
+
this.setClasses()
|
|
126
|
+
this.validadeUrlToMsg()
|
|
105
127
|
},
|
|
106
128
|
methods: {
|
|
129
|
+
validadeUrlToMsg(){
|
|
130
|
+
this.message = this.msg
|
|
131
|
+
if(this.validadeIfExistsSticker()){
|
|
132
|
+
this.urlSticker = this.getUrlSticker()
|
|
133
|
+
this.urlFileName = this.getUrlFileName()
|
|
134
|
+
this.message = this.removeUrlStickerByString(this.urlSticker)
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
getUrlFileName(){
|
|
138
|
+
let urlRegex = /(?<=\/)[^\/\?#]+(?=[^\/]*$)/;
|
|
139
|
+
let urlName = this.urlSticker.match(urlRegex)[0];
|
|
140
|
+
return urlName;
|
|
141
|
+
},
|
|
142
|
+
removeUrlStickerByString(url){
|
|
143
|
+
let msg = this.message.replace(`STICKER ${url}`, '')
|
|
144
|
+
return msg;
|
|
145
|
+
},
|
|
146
|
+
getUrlSticker(){
|
|
147
|
+
let urlRegex = /(https?:\/\/[^ ]*)/;
|
|
148
|
+
let url = this.message.match(urlRegex)[1];
|
|
149
|
+
return url;
|
|
150
|
+
},
|
|
151
|
+
validadeIfExistsSticker(){
|
|
152
|
+
if(this.message && this.message.includes("STICKER https://smarters")){
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
return false;
|
|
156
|
+
},
|
|
157
|
+
setClasses(){
|
|
158
|
+
if(this.hasReply && (this.status == "C" || this.status == "T") && this.iniDialogo == 0){
|
|
159
|
+
this.reply = "reply reply-with-2-icons"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
107
162
|
setCorMsg() {
|
|
108
163
|
try {
|
|
109
164
|
const root = document.documentElement
|
|
@@ -201,7 +256,7 @@ export default {
|
|
|
201
256
|
.reply {
|
|
202
257
|
cursor: pointer;
|
|
203
258
|
position: absolute;
|
|
204
|
-
right:
|
|
259
|
+
right: 53px;
|
|
205
260
|
bottom: 5px;
|
|
206
261
|
font-size: .6rem;
|
|
207
262
|
color: #67a332;
|
|
@@ -217,6 +272,9 @@ export default {
|
|
|
217
272
|
margin-top: -1px;
|
|
218
273
|
margin-right: -1px;
|
|
219
274
|
}
|
|
275
|
+
.reply-with-2-icons{
|
|
276
|
+
right: 30px;
|
|
277
|
+
}
|
|
220
278
|
|
|
221
279
|
.check{
|
|
222
280
|
cursor: pointer;
|
|
@@ -240,7 +298,20 @@ export default {
|
|
|
240
298
|
.check.preto, .check.preto svg{
|
|
241
299
|
color: #666
|
|
242
300
|
}
|
|
243
|
-
|
|
301
|
+
.star{
|
|
302
|
+
cursor: pointer;
|
|
303
|
+
position: absolute;
|
|
304
|
+
right: 30px;
|
|
305
|
+
bottom: 3px;
|
|
306
|
+
font-size: 0.7rem;
|
|
307
|
+
}
|
|
308
|
+
.star.dourado svg{
|
|
309
|
+
color: gold
|
|
310
|
+
}
|
|
311
|
+
.default-stick-size{
|
|
312
|
+
width: 250px;
|
|
313
|
+
height: auto;
|
|
314
|
+
}
|
|
244
315
|
.horario-envio {
|
|
245
316
|
margin-right: 15px;
|
|
246
317
|
font-size: 0.7rem;
|