vue-intergrall-plugins 0.0.138 → 0.0.142
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 +1084 -372
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +818 -203
- package/package.json +63 -63
- package/src/lib-components/Cards/Card.vue +394 -0
- package/src/lib-components/Cards/CardCheck.vue +35 -0
- package/src/lib-components/Cards/CardFile.vue +213 -0
- package/src/lib-components/Messages/ChatMessages.vue +38 -4
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.142",
|
|
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
|
+
}
|
|
@@ -0,0 +1,394 @@
|
|
|
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">
|
|
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}: ${origin === 'outros' ? formataTimezoneData(date) : returnFormataDataHora(date)}`"
|
|
32
|
+
>
|
|
33
|
+
<span v-text="origin === 'outros' ? formataTimezoneData(date) : returnFormataDataHora(date)"></span>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div v-if="hasExpand" class="card-expand" @click="cardExpand()">
|
|
37
|
+
<fa-icon :icon="['fas', 'expand-alt']" />
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<p
|
|
42
|
+
v-if="chipInfos.cod && chipInfos.desc"
|
|
43
|
+
class="card-chip"
|
|
44
|
+
:class="[chipInfosClasses]"
|
|
45
|
+
v-text="`${chipInfos.desc} (${chipInfos.cod})`" :title="`${chipInfos.desc} (${chipInfos.cod})`">
|
|
46
|
+
</p>
|
|
47
|
+
<p class="card-message" v-html="formattedMessage"></p>
|
|
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
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<script>
|
|
68
|
+
import { textoLongo } from "@/mixins/formatarTexto"
|
|
69
|
+
import { formataTimezoneData, formataDataHora } from "../../services/textFormatting"
|
|
70
|
+
import CardFile from "./CardFile"
|
|
71
|
+
import CardCheck from "./CardCheck"
|
|
72
|
+
|
|
73
|
+
export default {
|
|
74
|
+
components: { CardFile, CardCheck },
|
|
75
|
+
props: {
|
|
76
|
+
dictionary: {
|
|
77
|
+
type: Object,
|
|
78
|
+
required: true
|
|
79
|
+
},
|
|
80
|
+
messageIndex: {
|
|
81
|
+
type: [Number, String],
|
|
82
|
+
required: true
|
|
83
|
+
},
|
|
84
|
+
domain: {
|
|
85
|
+
type: String,
|
|
86
|
+
required: true
|
|
87
|
+
},
|
|
88
|
+
hasExpand: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
required: false,
|
|
91
|
+
default: true
|
|
92
|
+
},
|
|
93
|
+
origin: {
|
|
94
|
+
type: String,
|
|
95
|
+
required: true
|
|
96
|
+
},
|
|
97
|
+
author: {
|
|
98
|
+
type: String
|
|
99
|
+
},
|
|
100
|
+
login: {
|
|
101
|
+
type: String
|
|
102
|
+
},
|
|
103
|
+
message: {
|
|
104
|
+
type: String
|
|
105
|
+
},
|
|
106
|
+
files: {
|
|
107
|
+
type: Array
|
|
108
|
+
},
|
|
109
|
+
date: {
|
|
110
|
+
type: String
|
|
111
|
+
},
|
|
112
|
+
chipInfos: {
|
|
113
|
+
type: Object
|
|
114
|
+
},
|
|
115
|
+
newMessage: {
|
|
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
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
mixins: [textoLongo],
|
|
132
|
+
computed: {
|
|
133
|
+
randomizeValue() {
|
|
134
|
+
return `${(Math.floor(Math.random() * 7770))}${Date.now()}`
|
|
135
|
+
},
|
|
136
|
+
formattedMessage() {
|
|
137
|
+
if(this.message) {
|
|
138
|
+
const regex = /(\n|\r| )/g
|
|
139
|
+
if(regex.test(this.message)) return this.message.replace(regex, "<br>")
|
|
140
|
+
}
|
|
141
|
+
return this.message
|
|
142
|
+
},
|
|
143
|
+
currentIcon() {
|
|
144
|
+
return this.origin === "outros" ? ['fas', 'user'] : ['fas', 'headset']
|
|
145
|
+
},
|
|
146
|
+
currentClasses() {
|
|
147
|
+
return `${this.origin === "outros" ? "card-cli" : "card-ope"} ${this.newMessage ? "newMessage" : ""}`
|
|
148
|
+
},
|
|
149
|
+
chipInfosClasses() {
|
|
150
|
+
if(!this.chipInfos || !this.chipInfos.cod) return ""
|
|
151
|
+
const { cod } = this.chipInfos
|
|
152
|
+
switch(cod) {
|
|
153
|
+
case 9:
|
|
154
|
+
case "9":
|
|
155
|
+
case 8:
|
|
156
|
+
case "8":
|
|
157
|
+
return "red"
|
|
158
|
+
case 3:
|
|
159
|
+
case "3":
|
|
160
|
+
case 6:
|
|
161
|
+
case "6":
|
|
162
|
+
return "yellow"
|
|
163
|
+
default:
|
|
164
|
+
return ""
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
methods: {
|
|
169
|
+
formataTimezoneData(timezoneData) {
|
|
170
|
+
return formataTimezoneData(timezoneData)
|
|
171
|
+
},
|
|
172
|
+
returnFormataDataHora(dataHora) {
|
|
173
|
+
return formataDataHora(dataHora, false, false, this.dictionary)
|
|
174
|
+
},
|
|
175
|
+
cardExpand() {
|
|
176
|
+
this.$emit("card-expand", this.$props)
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
</script>
|
|
181
|
+
|
|
182
|
+
<style>
|
|
183
|
+
.fade-enter-active,
|
|
184
|
+
.fade-leave-active {
|
|
185
|
+
transition: opacity 200ms;
|
|
186
|
+
}
|
|
187
|
+
.fade-enter,
|
|
188
|
+
.fade-leave-to {
|
|
189
|
+
opacity: 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.card-cli, .card-ope {
|
|
193
|
+
display: flex;
|
|
194
|
+
width: 95%;
|
|
195
|
+
margin: 5px 0;
|
|
196
|
+
position: relative;
|
|
197
|
+
}
|
|
198
|
+
.card-cli.newMessage, .card-ope.newMessage {
|
|
199
|
+
margin-top: 30px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.new-messages {
|
|
203
|
+
position: absolute;
|
|
204
|
+
top: -30px;
|
|
205
|
+
width: 100%;
|
|
206
|
+
display: flex;
|
|
207
|
+
justify-content: center;
|
|
208
|
+
align-items: center;
|
|
209
|
+
margin: 2.5px 0;
|
|
210
|
+
background-color: lighten(#FFF249, 15)
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.card-cli .card {
|
|
214
|
+
border-left: 3px solid #90B823;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
.card-ope {
|
|
219
|
+
align-self: flex-end;
|
|
220
|
+
background-color: lighten(#007535, 72);
|
|
221
|
+
}
|
|
222
|
+
.card-ope .card {
|
|
223
|
+
border-right: 3px solid #007535;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.card {
|
|
227
|
+
background-color: rgba(255, 255, 255, .9);
|
|
228
|
+
overflow: hidden;
|
|
229
|
+
width: 100%;
|
|
230
|
+
padding: 2.5px 5px;
|
|
231
|
+
}
|
|
232
|
+
.card p {
|
|
233
|
+
word-break: break-all;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.card-header {
|
|
237
|
+
width: 100%;
|
|
238
|
+
border-bottom: 1px solid #ddd;
|
|
239
|
+
margin-bottom: 5px;
|
|
240
|
+
display: flex;
|
|
241
|
+
justify-content: space-between;
|
|
242
|
+
}
|
|
243
|
+
.card-header svg {
|
|
244
|
+
font-size: 1rem
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.card-author {
|
|
248
|
+
display: flex;
|
|
249
|
+
align-items: center;
|
|
250
|
+
}
|
|
251
|
+
.card-author svg {
|
|
252
|
+
margin-right: 5px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.card-canal {
|
|
256
|
+
flex: 1;
|
|
257
|
+
margin-right: 10px;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.card-dates {
|
|
261
|
+
display: flex;
|
|
262
|
+
flex-direction: column;
|
|
263
|
+
margin-right: 10px;
|
|
264
|
+
font-size: .9rem
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.card-date {
|
|
268
|
+
overflow: hidden;
|
|
269
|
+
display: flex;
|
|
270
|
+
align-content: center;
|
|
271
|
+
}
|
|
272
|
+
.card-date span {
|
|
273
|
+
white-space: nowrap;
|
|
274
|
+
text-overflow: ellipsis;
|
|
275
|
+
overflow: hidden;
|
|
276
|
+
}
|
|
277
|
+
.card-date svg {
|
|
278
|
+
margin-right: 5px;
|
|
279
|
+
color: #232323;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.card-expand {
|
|
283
|
+
display: flex;
|
|
284
|
+
justify-content: center;
|
|
285
|
+
align-items: center;
|
|
286
|
+
margin: 2.5px;
|
|
287
|
+
cursor: pointer;
|
|
288
|
+
opacity: .8;
|
|
289
|
+
transition: opacity 150ms;
|
|
290
|
+
}
|
|
291
|
+
.card-expand:hover {
|
|
292
|
+
opacity: 1;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.card-footer {
|
|
296
|
+
margin-top: 5px;
|
|
297
|
+
border-top: 1px solid #ddd;
|
|
298
|
+
display: flex;
|
|
299
|
+
flex-wrap: wrap;
|
|
300
|
+
min-height: 25px;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
.card-chip {
|
|
305
|
+
font-size: .8rem;
|
|
306
|
+
width: fit-content;
|
|
307
|
+
border-radius: 15px;
|
|
308
|
+
transition: all 150ms ease-in-out;
|
|
309
|
+
padding: 2.5px 7px;
|
|
310
|
+
color: rgb(31, 105, 193);
|
|
311
|
+
background-color: rgba(207, 216, 244, .6);
|
|
312
|
+
margin-bottom: 5px;
|
|
313
|
+
}
|
|
314
|
+
.card-chip:hover {
|
|
315
|
+
background-color: rgba(207, 216, 244, 1);
|
|
316
|
+
}
|
|
317
|
+
.card-chip.orange {
|
|
318
|
+
color: #e14924;
|
|
319
|
+
background-color: rgba(228, 92, 58, .15);
|
|
320
|
+
}
|
|
321
|
+
.card-chip.orange:hover {
|
|
322
|
+
background-color: rgba(228, 92, 58, .2);
|
|
323
|
+
}
|
|
324
|
+
.card-chip.yellow {
|
|
325
|
+
color: #f4a304;
|
|
326
|
+
background-color: rgba(252, 191, 73, .15);
|
|
327
|
+
}
|
|
328
|
+
.card-chip.yellow:hover {
|
|
329
|
+
background-color: rgba(252, 191, 73, .2);
|
|
330
|
+
}
|
|
331
|
+
.card-chip.red {
|
|
332
|
+
color: rgb(231, 76, 60);
|
|
333
|
+
background-color: rgba(231, 76, 60, .2);
|
|
334
|
+
}
|
|
335
|
+
.card-chip.red:hover {
|
|
336
|
+
background-color: rgba(231, 76, 60, .25);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.card-file {
|
|
340
|
+
width: 60px;
|
|
341
|
+
height: 50px;
|
|
342
|
+
margin-right: 5px;
|
|
343
|
+
display: flex;
|
|
344
|
+
justify-content: center;
|
|
345
|
+
align-items: center;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.card-reply {
|
|
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;
|
|
357
|
+
display: flex;
|
|
358
|
+
justify-content: center;
|
|
359
|
+
align-items: center;
|
|
360
|
+
border-radius: 50%;
|
|
361
|
+
background-color: #FFF;
|
|
362
|
+
}
|
|
363
|
+
.card-reply svg {
|
|
364
|
+
margin-top: -1px;
|
|
365
|
+
margin-right: -1px;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.card-check{
|
|
369
|
+
position: absolute;
|
|
370
|
+
bottom: 5px;
|
|
371
|
+
right: 5px;
|
|
372
|
+
cursor: pointer;
|
|
373
|
+
font-size: 0.7rem;
|
|
374
|
+
}
|
|
375
|
+
.card-check svg {
|
|
376
|
+
font-size: 0.8rem;
|
|
377
|
+
}
|
|
378
|
+
.card-check.seen, .card-check.seen svg{
|
|
379
|
+
color: #006DAA
|
|
380
|
+
}
|
|
381
|
+
.card-check.green, .card-check.green svg{
|
|
382
|
+
color: #4f772d
|
|
383
|
+
}
|
|
384
|
+
.card-check.red, .card-check.red svg{
|
|
385
|
+
color: #ba181b
|
|
386
|
+
}
|
|
387
|
+
.card-check.gray, .card-check.gray svg{
|
|
388
|
+
color: #999
|
|
389
|
+
}
|
|
390
|
+
.card-check.black, .card-check.black svg{
|
|
391
|
+
color: #666
|
|
392
|
+
}
|
|
393
|
+
|
|
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>
|