vue-intergrall-plugins 1.0.26 → 1.0.28
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 +168 -28
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +164 -26
- package/package.json +1 -1
- package/src/lib-components/Cards/Card.vue +77 -50
- package/src/lib-components/Chat/TextFooter.vue +147 -170
- package/src/lib-components/Messages/CardMessages.vue +39 -1
- package/src/lib-components/Messages/ChatMessages.vue +94 -185
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-if="origin"
|
|
4
|
-
:class="[currentClasses]"
|
|
5
|
-
:id="`card-${messageIndex ? messageIndex : randomizeValue}`"
|
|
6
|
-
>
|
|
2
|
+
<div v-if="origin" :class="[currentClasses]" :id="`card-${messageIndex ? messageIndex : randomizeValue}`">
|
|
7
3
|
<transition name="fade">
|
|
8
4
|
<span v-if="newMessage" class="new-messages" v-text="`Nova mensagem`"></span>
|
|
9
5
|
</transition>
|
|
@@ -11,50 +7,35 @@
|
|
|
11
7
|
<div class="card-header" :style="resizeHeaderCard">
|
|
12
8
|
<div class="card-author">
|
|
13
9
|
<fa-icon :icon="currentIcon" />
|
|
14
|
-
<p
|
|
15
|
-
|
|
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>
|
|
10
|
+
<p v-if="author" class="text-bold" v-text="`${tratarTextoLongo(author)}`" :title="author"></p>
|
|
11
|
+
<p v-if="origin === 'principal' && login" v-text="`| ${login}`" :title="login"></p>
|
|
25
12
|
</div>
|
|
26
13
|
<div class="card-right">
|
|
27
14
|
<div class="card-dates">
|
|
28
|
-
<div
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
>
|
|
37
|
-
<span
|
|
38
|
-
v-text="
|
|
39
|
-
origin === 'outros'
|
|
40
|
-
? formataTimezoneData(date)
|
|
41
|
-
: returnFormataDataHora(date)
|
|
42
|
-
"
|
|
43
|
-
></span>
|
|
15
|
+
<div v-if="date" class="card-date" :title="`${dictionary.data_criacao}: ${origin === 'outros'
|
|
16
|
+
? formataTimezoneData(date)
|
|
17
|
+
: returnFormataDataHora(date)
|
|
18
|
+
}`">
|
|
19
|
+
<span v-text="origin === 'outros'
|
|
20
|
+
? formataTimezoneData(date)
|
|
21
|
+
: returnFormataDataHora(date)
|
|
22
|
+
"></span>
|
|
44
23
|
</div>
|
|
45
24
|
</div>
|
|
46
25
|
<div v-if="hasExpand" class="card-expand" @click="cardExpand()">
|
|
47
26
|
<fa-icon :icon="['fas', 'expand-alt']" />
|
|
48
27
|
</div>
|
|
28
|
+
<div class="card-actions" v-if="customButtons && customButtons.length">
|
|
29
|
+
<span v-for="(button, index) in customButtons" :key="button.id || index" v-show="button.use"
|
|
30
|
+
@click="button.callback(returnParams(button.params))" :class="`${button.customClass || 'menu-mensagem'}`"
|
|
31
|
+
v-tippy :content="button.tippyContent">
|
|
32
|
+
<fa-icon :icon="['fas', button.icon || 'question-circle']" />
|
|
33
|
+
</span>
|
|
34
|
+
</div>
|
|
49
35
|
</div>
|
|
50
36
|
</div>
|
|
51
|
-
<p
|
|
52
|
-
v-
|
|
53
|
-
class="card-chip"
|
|
54
|
-
:class="[chipInfosClasses]"
|
|
55
|
-
v-text="`${chipInfos.desc} (${chipInfos.cod})`"
|
|
56
|
-
:title="`${chipInfos.desc} (${chipInfos.cod})`"
|
|
57
|
-
></p>
|
|
37
|
+
<p v-if="chipInfos.cod && chipInfos.desc" class="card-chip" :class="[chipInfosClasses]"
|
|
38
|
+
v-text="`${chipInfos.desc} (${chipInfos.cod})`" :title="`${chipInfos.desc} (${chipInfos.cod})`"></p>
|
|
58
39
|
<p class="card-message" v-html="formattedMessage"></p>
|
|
59
40
|
<div class="card-footer">
|
|
60
41
|
<template v-if="files && files.length">
|
|
@@ -62,14 +43,8 @@
|
|
|
62
43
|
<CardFile :file="file" :dictionary="dictionary" :domain="domain" />
|
|
63
44
|
</div>
|
|
64
45
|
</template>
|
|
65
|
-
<CardCheck
|
|
66
|
-
|
|
67
|
-
:messageStatus="messageStatus"
|
|
68
|
-
:hasReply="hasReply"
|
|
69
|
-
:replyMessage="replyMessage"
|
|
70
|
-
:tooltipContent="tooltipContent"
|
|
71
|
-
@reply-msg="$emit('reply-msg')"
|
|
72
|
-
/>
|
|
46
|
+
<CardCheck v-if="messageStatus" :messageStatus="messageStatus" :hasReply="hasReply" :replyMessage="replyMessage"
|
|
47
|
+
:tooltipContent="tooltipContent" @reply-msg="$emit('reply-msg')" />
|
|
73
48
|
</div>
|
|
74
49
|
</div>
|
|
75
50
|
</div>
|
|
@@ -143,6 +118,9 @@ export default {
|
|
|
143
118
|
required: false,
|
|
144
119
|
default: false,
|
|
145
120
|
},
|
|
121
|
+
customButtons: {
|
|
122
|
+
type: Array
|
|
123
|
+
}
|
|
146
124
|
},
|
|
147
125
|
data() {
|
|
148
126
|
return {
|
|
@@ -165,9 +143,8 @@ export default {
|
|
|
165
143
|
return this.origin === "outros" ? ["fas", "user"] : ["fas", "headset"];
|
|
166
144
|
},
|
|
167
145
|
currentClasses() {
|
|
168
|
-
return `${this.origin === "outros" ? "card-cli" : "card-ope"} ${
|
|
169
|
-
|
|
170
|
-
}`;
|
|
146
|
+
return `${this.origin === "outros" ? "card-cli" : "card-ope"} ${this.newMessage ? "newMessage" : ""
|
|
147
|
+
}`;
|
|
171
148
|
},
|
|
172
149
|
chipInfosClasses() {
|
|
173
150
|
if (!this.chipInfos || !this.chipInfos.cod) return "";
|
|
@@ -206,6 +183,28 @@ export default {
|
|
|
206
183
|
cardExpand() {
|
|
207
184
|
this.$emit("card-expand", this.$props);
|
|
208
185
|
},
|
|
186
|
+
returnParams(params) {
|
|
187
|
+
const defaultParams = {
|
|
188
|
+
message: this.message,
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
if (!params) return defaultParams;
|
|
192
|
+
|
|
193
|
+
const keys = params.instanceKeys.split("|");
|
|
194
|
+
if (!keys || !keys.length)
|
|
195
|
+
return {
|
|
196
|
+
defaultParams,
|
|
197
|
+
...params.values,
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
const customParams = { ...params.values };
|
|
201
|
+
keys.forEach((key) => {
|
|
202
|
+
if (this[key]) customParams[key] = this[key];
|
|
203
|
+
else console.warn(`Cant find ${key} on 'this' instance`);
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
return Object.keys(customParams).length ? customParams : defaultParams;
|
|
207
|
+
}
|
|
209
208
|
},
|
|
210
209
|
};
|
|
211
210
|
</script>
|
|
@@ -215,6 +214,7 @@ export default {
|
|
|
215
214
|
.fade-leave-active {
|
|
216
215
|
transition: opacity 200ms;
|
|
217
216
|
}
|
|
217
|
+
|
|
218
218
|
.fade-enter,
|
|
219
219
|
.fade-leave-to {
|
|
220
220
|
opacity: 0;
|
|
@@ -227,6 +227,7 @@ export default {
|
|
|
227
227
|
margin: 5px 0;
|
|
228
228
|
position: relative;
|
|
229
229
|
}
|
|
230
|
+
|
|
230
231
|
.card-cli.newMessage,
|
|
231
232
|
.card-ope.newMessage {
|
|
232
233
|
margin-top: 30px;
|
|
@@ -251,6 +252,7 @@ export default {
|
|
|
251
252
|
align-self: flex-end;
|
|
252
253
|
background-color: lighten(#007535, 72);
|
|
253
254
|
}
|
|
255
|
+
|
|
254
256
|
.card-ope .card {
|
|
255
257
|
border-right: 3px solid #007535;
|
|
256
258
|
}
|
|
@@ -261,6 +263,7 @@ export default {
|
|
|
261
263
|
width: 100%;
|
|
262
264
|
padding: 2.5px 5px;
|
|
263
265
|
}
|
|
266
|
+
|
|
264
267
|
.card p {
|
|
265
268
|
word-break: break-all;
|
|
266
269
|
}
|
|
@@ -272,6 +275,7 @@ export default {
|
|
|
272
275
|
display: flex;
|
|
273
276
|
justify-content: space-between;
|
|
274
277
|
}
|
|
278
|
+
|
|
275
279
|
.card-header svg {
|
|
276
280
|
font-size: 16px;
|
|
277
281
|
}
|
|
@@ -280,10 +284,16 @@ export default {
|
|
|
280
284
|
display: flex;
|
|
281
285
|
align-items: center;
|
|
282
286
|
}
|
|
287
|
+
|
|
283
288
|
.card-author svg {
|
|
284
289
|
margin-right: 5px;
|
|
285
290
|
}
|
|
286
291
|
|
|
292
|
+
.card-actions {
|
|
293
|
+
display: flex;
|
|
294
|
+
gap: 7px;
|
|
295
|
+
}
|
|
296
|
+
|
|
287
297
|
.card-canal {
|
|
288
298
|
flex: 1;
|
|
289
299
|
margin-right: 10px;
|
|
@@ -301,11 +311,13 @@ export default {
|
|
|
301
311
|
display: flex;
|
|
302
312
|
align-content: center;
|
|
303
313
|
}
|
|
314
|
+
|
|
304
315
|
.card-date span {
|
|
305
316
|
white-space: nowrap;
|
|
306
317
|
text-overflow: ellipsis;
|
|
307
318
|
overflow: hidden;
|
|
308
319
|
}
|
|
320
|
+
|
|
309
321
|
.card-date svg {
|
|
310
322
|
margin-right: 5px;
|
|
311
323
|
color: #232323;
|
|
@@ -320,6 +332,7 @@ export default {
|
|
|
320
332
|
opacity: 0.8;
|
|
321
333
|
transition: opacity 150ms;
|
|
322
334
|
}
|
|
335
|
+
|
|
323
336
|
.card-expand:hover {
|
|
324
337
|
opacity: 1;
|
|
325
338
|
}
|
|
@@ -342,27 +355,34 @@ export default {
|
|
|
342
355
|
background-color: rgba(207, 216, 244, 0.6);
|
|
343
356
|
margin-bottom: 5px;
|
|
344
357
|
}
|
|
358
|
+
|
|
345
359
|
.card-chip:hover {
|
|
346
360
|
background-color: rgba(207, 216, 244, 1);
|
|
347
361
|
}
|
|
362
|
+
|
|
348
363
|
.card-chip.orange {
|
|
349
364
|
color: #e14924;
|
|
350
365
|
background-color: rgba(228, 92, 58, 0.15);
|
|
351
366
|
}
|
|
367
|
+
|
|
352
368
|
.card-chip.orange:hover {
|
|
353
369
|
background-color: rgba(228, 92, 58, 0.2);
|
|
354
370
|
}
|
|
371
|
+
|
|
355
372
|
.card-chip.yellow {
|
|
356
373
|
color: #f4a304;
|
|
357
374
|
background-color: rgba(252, 191, 73, 0.15);
|
|
358
375
|
}
|
|
376
|
+
|
|
359
377
|
.card-chip.yellow:hover {
|
|
360
378
|
background-color: rgba(252, 191, 73, 0.2);
|
|
361
379
|
}
|
|
380
|
+
|
|
362
381
|
.card-chip.red {
|
|
363
382
|
color: rgb(231, 76, 60);
|
|
364
383
|
background-color: rgba(231, 76, 60, 0.2);
|
|
365
384
|
}
|
|
385
|
+
|
|
366
386
|
.card-chip.red:hover {
|
|
367
387
|
background-color: rgba(231, 76, 60, 0.25);
|
|
368
388
|
}
|
|
@@ -391,6 +411,7 @@ export default {
|
|
|
391
411
|
border-radius: 50%;
|
|
392
412
|
background-color: #fff;
|
|
393
413
|
}
|
|
414
|
+
|
|
394
415
|
.card-reply svg {
|
|
395
416
|
margin-top: -1px;
|
|
396
417
|
margin-right: -1px;
|
|
@@ -403,25 +424,31 @@ export default {
|
|
|
403
424
|
cursor: pointer;
|
|
404
425
|
font-size: 11.2px;
|
|
405
426
|
}
|
|
427
|
+
|
|
406
428
|
.card-check svg {
|
|
407
429
|
font-size: 12.8px;
|
|
408
430
|
}
|
|
431
|
+
|
|
409
432
|
.card-check.seen,
|
|
410
433
|
.card-check.seen svg {
|
|
411
434
|
color: #006daa;
|
|
412
435
|
}
|
|
436
|
+
|
|
413
437
|
.card-check.green,
|
|
414
438
|
.card-check.green svg {
|
|
415
439
|
color: #4f772d;
|
|
416
440
|
}
|
|
441
|
+
|
|
417
442
|
.card-check.red,
|
|
418
443
|
.card-check.red svg {
|
|
419
444
|
color: #ba181b;
|
|
420
445
|
}
|
|
446
|
+
|
|
421
447
|
.card-check.gray,
|
|
422
448
|
.card-check.gray svg {
|
|
423
449
|
color: #999;
|
|
424
450
|
}
|
|
451
|
+
|
|
425
452
|
.card-check.black,
|
|
426
453
|
.card-check.black svg {
|
|
427
454
|
color: #666;
|