vue-intergrall-plugins 0.0.134 → 0.0.138
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 +441 -263
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +372 -263
- package/package.json +1 -1
- package/src/lib-components/Buttons/SimpleButton.vue +1 -1
- package/src/lib-components/Chat/ExpandTextarea.vue +0 -2
- package/src/lib-components/Chat/Picker.vue +0 -1
- package/src/lib-components/Chat/TextFooter.vue +0 -2
- package/src/lib-components/Messages/AnexoMensagem.vue +5 -5
- package/src/lib-components/Messages/CardAttachment.vue +3 -2
- package/src/lib-components/Messages/InteratividadeBotoes.vue +94 -4
- package/src/lib-components/Messages/InteratividadePopup.vue +78 -0
package/package.json
CHANGED
|
@@ -245,8 +245,6 @@ export default {
|
|
|
245
245
|
insertEmoji(emoji) {
|
|
246
246
|
try {
|
|
247
247
|
const textarea = this.$refs[`${this.identifier}`]
|
|
248
|
-
console.log("emoji: ", emoji)
|
|
249
|
-
console.log(textarea)
|
|
250
248
|
if (document.activeElement === textarea) {
|
|
251
249
|
const cursorStart = textarea.selectionStart
|
|
252
250
|
const cursorEnd = textarea.selectionEnd
|
|
@@ -180,8 +180,6 @@ export default {
|
|
|
180
180
|
insertEmoji(emoji) {
|
|
181
181
|
try {
|
|
182
182
|
const textarea = document.querySelector(`#text-footer-${this.textId}`)
|
|
183
|
-
console.log("emoji: ", emoji)
|
|
184
|
-
console.log(textarea)
|
|
185
183
|
if (document.activeElement === textarea) {
|
|
186
184
|
const cursorStart = textarea.selectionStart
|
|
187
185
|
const cursorEnd = textarea.selectionEnd
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
<div v-else-if="docAnexo" class="anexo-container">
|
|
12
12
|
<template v-if="audio || video">
|
|
13
13
|
<audio v-if="audio" :src="docAnexo" controls :title="`${tipoDoc} - ${nomeArquivo}`">
|
|
14
|
-
<p> {{ dictionary.msg_erro_audio }} <a :href="docAnexo" target="_blank"> {{ dictionary.msg_abrir_audio }} </a> </p>
|
|
14
|
+
<p> {{ dictionary.msg_erro_audio }} <a :href="docAnexo" target="_blank" rel="noreferrer noopener"> {{ dictionary.msg_abrir_audio }} </a> </p>
|
|
15
15
|
</audio>
|
|
16
16
|
<video v-if="video" :src="docAnexo" controls :title="`${tipoDoc} - ${nomeArquivo}`">
|
|
17
|
-
<p> {{ dictionary.msg_erro_video }} <a v-if="tipoDoc != 'erro'" :href="docAnexo" target="_blank"> {{ dictionary.msg_abrir_video }} </a> </p>
|
|
17
|
+
<p> {{ dictionary.msg_erro_video }} <a v-if="tipoDoc != 'erro'" :href="docAnexo" target="_blank" rel="noreferrer noopener"> {{ dictionary.msg_abrir_video }} </a> </p>
|
|
18
18
|
</video>
|
|
19
19
|
</template>
|
|
20
20
|
<template v-else>
|
|
21
|
-
<a v-if="tipoDoc != 'erro'" :href="docAnexo" target="_blank" :title="`${tipoDoc} - ${nomeArquivo}`">
|
|
21
|
+
<a v-if="tipoDoc != 'erro'" :href="docAnexo" target="_blank" rel="noreferrer noopener" :title="`${tipoDoc} - ${nomeArquivo}`">
|
|
22
22
|
<fa-icon :icon="this.icone" />
|
|
23
23
|
<p v-text="nomeArquivo"></p>
|
|
24
24
|
</a>
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
</p>
|
|
29
29
|
</template>
|
|
30
30
|
</div>
|
|
31
|
-
<a v-if="imgAnexo" :href="imgAnexo" :download="`${nomeArquivo}`" target="_blank"> {{ dictionary.titulo_baixar_img }} <fa-icon :icon="['fas', 'download']" /> </a>
|
|
32
|
-
<a v-if="docAnexo" :href="docAnexo" :download="`${nomeArquivo}`" target="_blank"> {{ dictionary.titulo_baixar_doc }} <fa-icon :icon="['fas', 'download']" /> </a>
|
|
31
|
+
<a v-if="imgAnexo" :href="imgAnexo" :download="`${nomeArquivo}`" target="_blank" rel="noreferrer noopener"> {{ dictionary.titulo_baixar_img }} <fa-icon :icon="['fas', 'download']" /> </a>
|
|
32
|
+
<a v-if="docAnexo" :href="docAnexo" :download="`${nomeArquivo}`" target="_blank" rel="noreferrer noopener"> {{ dictionary.titulo_baixar_doc }} <fa-icon :icon="['fas', 'download']" /> </a>
|
|
33
33
|
</div>
|
|
34
34
|
</transition-group>
|
|
35
35
|
</div>
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
:class="[iconeClass]"
|
|
14
14
|
@click="abrirAnexo(docAnexo, false)"
|
|
15
15
|
:title="nomeArquivo"
|
|
16
|
-
target="_blank"
|
|
16
|
+
target="_blank"
|
|
17
|
+
rel="noreferrer noopener"
|
|
17
18
|
>
|
|
18
19
|
<fa-icon :icon="icone" />
|
|
19
20
|
</span>
|
|
20
|
-
<a :href="imgAnexo ? imgAnexo : docAnexo" :download="`${nomeArquivo}`" target="_blank" key="ra-download-icon" :title="`Download ${nomeArquivo}`">
|
|
21
|
+
<a :href="imgAnexo ? imgAnexo : docAnexo" :download="`${nomeArquivo}`" target="_blank" rel="noreferrer noopener" key="ra-download-icon" :title="`Download ${nomeArquivo}`">
|
|
21
22
|
<fa-icon :icon="['fas', 'download']" />
|
|
22
23
|
</a>
|
|
23
24
|
</template>
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="interatividade">
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
</
|
|
3
|
+
<transition name="show-x">
|
|
4
|
+
<InteratividadePopup v-if="listaEstaAberta" :lista="listaExpandida" :titulo="objItens.list.title" @close="listaEstaAberta = false" />
|
|
5
|
+
</transition>
|
|
6
|
+
<template v-if="arrBotoes.length">
|
|
7
|
+
<div v-for="(btn, index) in arrBotoes" :key="index" :title="btn.titulo" class="interatividade-btn">
|
|
8
|
+
<p v-text="btn.titulo" class="interatividade-titulo"></p>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
<template v-else-if="Object.keys(objItens).length">
|
|
12
|
+
<div class="interatividade-lista">
|
|
13
|
+
<div class="interatividade-lista-conteudo">
|
|
14
|
+
<p v-if="objItens.header.text" v-text="objItens.header.text" class="interatividade-lista-titulo"></p>
|
|
15
|
+
<p v-if="objItens.body.text" v-text="objItens.body.text" class="interatividade-lista-corpo"></p>
|
|
16
|
+
<p v-if="objItens.footer.text" v-text="objItens.footer.text" class="interatividade-lista-rodape"></p>
|
|
17
|
+
</div>
|
|
18
|
+
<p v-if="objItens.list.title" v-text="objItens.list.title" @click="expandirLista" class="interatividade-lista-link"></p>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
6
21
|
</div>
|
|
7
22
|
</template>
|
|
8
23
|
|
|
9
24
|
<script>
|
|
25
|
+
import InteratividadePopup from './InteratividadePopup'
|
|
26
|
+
|
|
10
27
|
export default {
|
|
28
|
+
components: {InteratividadePopup},
|
|
29
|
+
data() {
|
|
30
|
+
return {
|
|
31
|
+
listaEstaAberta: false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
11
34
|
props: {
|
|
12
35
|
interatividade: {
|
|
13
36
|
type: Object,
|
|
@@ -19,13 +42,46 @@ export default {
|
|
|
19
42
|
return this.interatividade.tipo
|
|
20
43
|
},
|
|
21
44
|
arrBotoes() {
|
|
22
|
-
|
|
45
|
+
const { botoes } = this.interatividade
|
|
46
|
+
return botoes ? botoes : []
|
|
47
|
+
},
|
|
48
|
+
objItens() {
|
|
49
|
+
const { itens } = this.interatividade
|
|
50
|
+
return itens ? itens : {}
|
|
51
|
+
},
|
|
52
|
+
listaExpandida() {
|
|
53
|
+
try {
|
|
54
|
+
const { list } = this.objItens
|
|
55
|
+
const { sections } = list
|
|
56
|
+
return sections ? sections : []
|
|
57
|
+
}catch(e) {
|
|
58
|
+
console.error("Erro ao definir a lista a ser expandida")
|
|
59
|
+
console.error(e)
|
|
60
|
+
return []
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
expandirLista() {
|
|
66
|
+
this.listaEstaAberta = !this.listaEstaAberta
|
|
23
67
|
}
|
|
24
68
|
}
|
|
25
69
|
}
|
|
26
70
|
</script>
|
|
27
71
|
|
|
28
72
|
<style>
|
|
73
|
+
.show-x-enter-active,
|
|
74
|
+
.show-x-leave-enter {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
transform: translateX(0);
|
|
77
|
+
transition: all 200ms linear;
|
|
78
|
+
}
|
|
79
|
+
.show-x-enter,
|
|
80
|
+
.show-x-leave-to {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
transform: translateX(5%);
|
|
83
|
+
}
|
|
84
|
+
|
|
29
85
|
.interatividade-btn {
|
|
30
86
|
width: 100%;
|
|
31
87
|
display: flex;
|
|
@@ -48,4 +104,38 @@ export default {
|
|
|
48
104
|
margin: 0;
|
|
49
105
|
padding: 0;
|
|
50
106
|
}
|
|
107
|
+
|
|
108
|
+
.interatividade-lista {
|
|
109
|
+
width: 100%;
|
|
110
|
+
min-width: 200px;
|
|
111
|
+
border-radius: 15px;
|
|
112
|
+
background-color: #FFF;
|
|
113
|
+
color: #333;
|
|
114
|
+
margin: 10px 0;
|
|
115
|
+
}
|
|
116
|
+
.interatividade-lista-conteudo {
|
|
117
|
+
padding: 10px;
|
|
118
|
+
border-bottom: 1px solid #D7D7D7;
|
|
119
|
+
}
|
|
120
|
+
.interatividade-lista-titulo {
|
|
121
|
+
font-weight: bold;
|
|
122
|
+
font-size: 1.2em;
|
|
123
|
+
margin-bottom: 10px;
|
|
124
|
+
}
|
|
125
|
+
.interatividade-lista-rodape {
|
|
126
|
+
color: #818181;
|
|
127
|
+
margin-top: 5px;
|
|
128
|
+
}
|
|
129
|
+
.interatividade-lista-link {
|
|
130
|
+
width: 100%;
|
|
131
|
+
text-align: center;
|
|
132
|
+
padding: 10px;
|
|
133
|
+
color: rgb(0, 110, 255);
|
|
134
|
+
cursor: pointer;
|
|
135
|
+
transition: color 200ms ease-in-out;
|
|
136
|
+
}
|
|
137
|
+
.interatividade-lista-link:hover {
|
|
138
|
+
color: rgb(0, 98, 143);
|
|
139
|
+
}
|
|
140
|
+
|
|
51
141
|
</style>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="interatividade-popup box-shadow" v-on-clickaway="away">
|
|
3
|
+
<div class="interatividade-popup-titulo" v-if="titulo">
|
|
4
|
+
<h1 v-text="titulo"></h1>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="interatividade-popup-conteudo" v-for="(objItem, index) in lista" :key="index">
|
|
7
|
+
<template v-if="objItem.items && objItem.items.length">
|
|
8
|
+
<div class="interatividade-popup-item" v-for="(item, indexItem) in objItem.items" :key="`${index}${indexItem}`">
|
|
9
|
+
<p v-if="item.title" v-text="item.title" class="interatividade-popup-item-titulo"></p>
|
|
10
|
+
<p v-if="item.description" v-text="item.description" class="interatividade-popup-item-desc"></p>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import { mixin as clickaway } from 'vue-clickaway'
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
mixins: [ clickaway ],
|
|
22
|
+
props: {
|
|
23
|
+
lista: {
|
|
24
|
+
type: [Array, Object],
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
titulo: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: false
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
methods: {
|
|
33
|
+
away() {
|
|
34
|
+
this.$emit("close")
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<style>
|
|
41
|
+
.box-shadow {
|
|
42
|
+
-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);
|
|
43
|
+
-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);
|
|
44
|
+
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);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.interatividade-popup {
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: -55px;
|
|
50
|
+
left: -265px;
|
|
51
|
+
width: 250px;
|
|
52
|
+
height: auto;
|
|
53
|
+
max-height: 300px;
|
|
54
|
+
overflow-y: auto;
|
|
55
|
+
overflow-x: hidden;
|
|
56
|
+
background-color: #FFF;
|
|
57
|
+
border-radius: 15px;
|
|
58
|
+
color: #333;
|
|
59
|
+
font-size: .875rem;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.interatividade-popup-titulo h1 {
|
|
63
|
+
padding: 4px 10px;
|
|
64
|
+
background-color: #333;
|
|
65
|
+
color: #FFF;
|
|
66
|
+
font-size: 1.2em;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.interatividade-popup-item {
|
|
70
|
+
padding: 10px;
|
|
71
|
+
border-bottom: 1px solid #D7D7D7;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.interatividade-popup-item-desc {
|
|
75
|
+
font-size: .9em;
|
|
76
|
+
color: #767676;
|
|
77
|
+
}
|
|
78
|
+
</style>
|