vue-intergrall-plugins 1.1.90 → 1.2.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 +220 -220
- package/dist/dist/vue-intergrall-plugins.css +1 -1
- package/dist/vue-intergrall-plugins.esm.js +193 -78
- package/dist/vue-intergrall-plugins.min.js +7 -7
- package/dist/vue-intergrall-plugins.ssr.js +245 -136
- package/package.json +61 -61
- package/src/lib-components/Buttons/IconButton.vue +27 -27
- package/src/lib-components/Buttons/SimpleButton.vue +140 -140
- package/src/lib-components/Cards/Card.vue +490 -490
- package/src/lib-components/Cards/CardCheck.vue +35 -35
- package/src/lib-components/Cards/CardFile.vue +163 -163
- package/src/lib-components/Chat/BtnDownloadAllFiles.vue +36 -36
- package/src/lib-components/Chat/BtnEmojis.vue +118 -118
- package/src/lib-components/Chat/BtnExpand.vue +17 -17
- package/src/lib-components/Chat/BtnFiles.vue +486 -486
- package/src/lib-components/Chat/BtnMic.vue +60 -60
- package/src/lib-components/Chat/BtnScreenShare.vue +31 -31
- package/src/lib-components/Chat/BtnStandardMessages.vue +17 -17
- package/src/lib-components/Chat/ExpandTextarea.vue +427 -427
- package/src/lib-components/Chat/MultipleFilePreview.vue +291 -291
- package/src/lib-components/Chat/Picker.vue +525 -525
- package/src/lib-components/Chat/RemainingCharacters.vue +28 -28
- package/src/lib-components/Chat/SingleFilePreview.vue +94 -94
- package/src/lib-components/Chat/SkeletonPicker.vue +110 -110
- package/src/lib-components/Chat/StandardMessages.vue +252 -252
- package/src/lib-components/Chat/TextFooter.vue +1007 -1007
- package/src/lib-components/Email/EmailExpanded.vue +270 -270
- package/src/lib-components/Email/EmailFile.vue +192 -192
- package/src/lib-components/Email/EmailFrom.vue +66 -66
- package/src/lib-components/Email/EmailItem.vue +867 -850
- package/src/lib-components/Email/EmailTo.vue +64 -64
- package/src/lib-components/Loader/Loader.vue +78 -78
- package/src/lib-components/Messages/AnexoMensagem.vue +534 -497
- package/src/lib-components/Messages/CardAttachment.vue +61 -61
- package/src/lib-components/Messages/CardMessages.vue +687 -687
- package/src/lib-components/Messages/InteratividadeBotoes.vue +197 -197
- package/src/lib-components/Messages/InteratividadeContato.vue +32 -32
- package/src/lib-components/Messages/InteratividadeContatoItem.vue +235 -235
- package/src/lib-components/Messages/InteratividadeFormulario.vue +334 -334
- package/src/lib-components/Messages/InteratividadePopup.vue +95 -95
- package/src/lib-components/Messages/LinkPreview.vue +176 -176
- package/src/lib-components/Scroll/ScrollContent.vue +166 -166
- package/src/lib-components/Templates/TemplateGenerator.vue +640 -640
- package/src/lib-components/Templates/TemplateMessage.vue +83 -83
- package/src/lib-components/Templates/TemplateSingle.vue +478 -478
|
@@ -1,166 +1,166 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<transition name="fade">
|
|
3
|
-
<div
|
|
4
|
-
class="btn-rolagem"
|
|
5
|
-
:class="{ higher: classeCustomizada }"
|
|
6
|
-
v-show="visibilidade"
|
|
7
|
-
@click="rolar()"
|
|
8
|
-
>
|
|
9
|
-
<div class="sinalizar-msg-nova" :title="tituloSinalizador" v-show="sinalizar"></div>
|
|
10
|
-
<fa-icon :icon="['fas', 'arrow-circle-down']" />
|
|
11
|
-
</div>
|
|
12
|
-
</transition>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<style>
|
|
16
|
-
.fade-enter-active,
|
|
17
|
-
.fade-leave-active {
|
|
18
|
-
transition: opacity 0.3s;
|
|
19
|
-
}
|
|
20
|
-
.fade-enter,
|
|
21
|
-
.fade-leave-to {
|
|
22
|
-
opacity: 0;
|
|
23
|
-
}
|
|
24
|
-
</style>
|
|
25
|
-
|
|
26
|
-
<script>
|
|
27
|
-
export default {
|
|
28
|
-
props: {
|
|
29
|
-
identificador: {
|
|
30
|
-
type: String,
|
|
31
|
-
required: true,
|
|
32
|
-
},
|
|
33
|
-
containerSelector: {
|
|
34
|
-
type: String,
|
|
35
|
-
required: true,
|
|
36
|
-
},
|
|
37
|
-
classeCustomizada: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
required: false,
|
|
40
|
-
},
|
|
41
|
-
sinalizar: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
required: false,
|
|
44
|
-
},
|
|
45
|
-
tituloSinalizador: {
|
|
46
|
-
type: String,
|
|
47
|
-
required: false,
|
|
48
|
-
},
|
|
49
|
-
rolarParaMsg: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
required: false,
|
|
52
|
-
},
|
|
53
|
-
callbackFn: {
|
|
54
|
-
type: Function,
|
|
55
|
-
required: false,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
created() {
|
|
59
|
-
this.$root.$refs[`rc-${this.identificador}`] = this;
|
|
60
|
-
},
|
|
61
|
-
data() {
|
|
62
|
-
return {
|
|
63
|
-
visibilidade: false,
|
|
64
|
-
container: "",
|
|
65
|
-
};
|
|
66
|
-
},
|
|
67
|
-
methods: {
|
|
68
|
-
getContainer() {
|
|
69
|
-
this.container = document.querySelector(this.containerSelector);
|
|
70
|
-
},
|
|
71
|
-
rolar(paraCima) {
|
|
72
|
-
try {
|
|
73
|
-
this.getContainer();
|
|
74
|
-
if (this.sinalizar && this.callbackFn) this.callbackFn();
|
|
75
|
-
let alturaFinal = this.container.scrollHeight;
|
|
76
|
-
if (this.rolarParaMsg) {
|
|
77
|
-
let ultimaMsgContainer = this.container.children[
|
|
78
|
-
this.container.children.length - 2
|
|
79
|
-
];
|
|
80
|
-
!ultimaMsgContainer.children.length
|
|
81
|
-
? (ultimaMsgContainer = this.container.children[
|
|
82
|
-
this.container.children.length - 3
|
|
83
|
-
])
|
|
84
|
-
: "";
|
|
85
|
-
const ultimaMsg = ultimaMsgContainer.lastElementChild.offsetHeight + 10;
|
|
86
|
-
alturaFinal -= ultimaMsg;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
this.container.scroll(0, paraCima ? 0 : alturaFinal);
|
|
90
|
-
} catch (e) {
|
|
91
|
-
console.error("Nao foi possivel rolar o container");
|
|
92
|
-
console.error(e);
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
verifyScrollbar() {
|
|
96
|
-
try {
|
|
97
|
-
this.getContainer();
|
|
98
|
-
|
|
99
|
-
this.visibilidade = true;
|
|
100
|
-
|
|
101
|
-
const posicaoDaBarra = this.container.scrollTop,
|
|
102
|
-
tamanhoContainer = this.container.offsetHeight,
|
|
103
|
-
tamanhoBarra = this.container.scrollHeight;
|
|
104
|
-
|
|
105
|
-
if (posicaoDaBarra == tamanhoBarra - tamanhoContainer) {
|
|
106
|
-
if (this.sinalizar) this.$emit("updateKey");
|
|
107
|
-
this.visibilidade = false;
|
|
108
|
-
} else if (
|
|
109
|
-
parseInt(posicaoDaBarra) + tamanhoContainer == tamanhoBarra ||
|
|
110
|
-
parseInt(posicaoDaBarra) + tamanhoContainer == tamanhoBarra + 1 ||
|
|
111
|
-
parseInt(posicaoDaBarra) + tamanhoContainer == tamanhoBarra - 1
|
|
112
|
-
) {
|
|
113
|
-
this.visibilidade = false;
|
|
114
|
-
}
|
|
115
|
-
} catch (e) {
|
|
116
|
-
console.error("Ignorando botao de rolagem devido a erro");
|
|
117
|
-
console.error(e);
|
|
118
|
-
this.visibilidade = false;
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
};
|
|
123
|
-
</script>
|
|
124
|
-
<style>
|
|
125
|
-
.btn-rolagem {
|
|
126
|
-
position: absolute;
|
|
127
|
-
bottom: 10px;
|
|
128
|
-
right: 20px;
|
|
129
|
-
}
|
|
130
|
-
.btn-rolagem.higher {
|
|
131
|
-
bottom: 36px;
|
|
132
|
-
}
|
|
133
|
-
.btn-rolagem svg {
|
|
134
|
-
font-size: 38.4px;
|
|
135
|
-
color: #757575;
|
|
136
|
-
transition-duration: 300ms;
|
|
137
|
-
transition-property: opacity;
|
|
138
|
-
opacity: 0.8;
|
|
139
|
-
cursor: pointer;
|
|
140
|
-
}
|
|
141
|
-
.btn-rolagem svg:hover {
|
|
142
|
-
opacity: 1;
|
|
143
|
-
}
|
|
144
|
-
.sinalizar-msg-nova {
|
|
145
|
-
position: absolute;
|
|
146
|
-
top: -10px;
|
|
147
|
-
left: -10px;
|
|
148
|
-
background-color: #4f772d;
|
|
149
|
-
width: 12.5px;
|
|
150
|
-
height: 12.5px;
|
|
151
|
-
border-radius: 50%;
|
|
152
|
-
animation-name: blink;
|
|
153
|
-
animation-duration: 1000ms;
|
|
154
|
-
animation-direction: alternate;
|
|
155
|
-
animation-iteration-count: infinite;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
@keyframes blink {
|
|
159
|
-
from {
|
|
160
|
-
opacity: 0.8 - 0.1;
|
|
161
|
-
}
|
|
162
|
-
to {
|
|
163
|
-
opacity: 1;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<transition name="fade">
|
|
3
|
+
<div
|
|
4
|
+
class="btn-rolagem"
|
|
5
|
+
:class="{ higher: classeCustomizada }"
|
|
6
|
+
v-show="visibilidade"
|
|
7
|
+
@click="rolar()"
|
|
8
|
+
>
|
|
9
|
+
<div class="sinalizar-msg-nova" :title="tituloSinalizador" v-show="sinalizar"></div>
|
|
10
|
+
<fa-icon :icon="['fas', 'arrow-circle-down']" />
|
|
11
|
+
</div>
|
|
12
|
+
</transition>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<style>
|
|
16
|
+
.fade-enter-active,
|
|
17
|
+
.fade-leave-active {
|
|
18
|
+
transition: opacity 0.3s;
|
|
19
|
+
}
|
|
20
|
+
.fade-enter,
|
|
21
|
+
.fade-leave-to {
|
|
22
|
+
opacity: 0;
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
export default {
|
|
28
|
+
props: {
|
|
29
|
+
identificador: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
containerSelector: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
classeCustomizada: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
required: false,
|
|
40
|
+
},
|
|
41
|
+
sinalizar: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
required: false,
|
|
44
|
+
},
|
|
45
|
+
tituloSinalizador: {
|
|
46
|
+
type: String,
|
|
47
|
+
required: false,
|
|
48
|
+
},
|
|
49
|
+
rolarParaMsg: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
required: false,
|
|
52
|
+
},
|
|
53
|
+
callbackFn: {
|
|
54
|
+
type: Function,
|
|
55
|
+
required: false,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
created() {
|
|
59
|
+
this.$root.$refs[`rc-${this.identificador}`] = this;
|
|
60
|
+
},
|
|
61
|
+
data() {
|
|
62
|
+
return {
|
|
63
|
+
visibilidade: false,
|
|
64
|
+
container: "",
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
getContainer() {
|
|
69
|
+
this.container = document.querySelector(this.containerSelector);
|
|
70
|
+
},
|
|
71
|
+
rolar(paraCima) {
|
|
72
|
+
try {
|
|
73
|
+
this.getContainer();
|
|
74
|
+
if (this.sinalizar && this.callbackFn) this.callbackFn();
|
|
75
|
+
let alturaFinal = this.container.scrollHeight;
|
|
76
|
+
if (this.rolarParaMsg) {
|
|
77
|
+
let ultimaMsgContainer = this.container.children[
|
|
78
|
+
this.container.children.length - 2
|
|
79
|
+
];
|
|
80
|
+
!ultimaMsgContainer.children.length
|
|
81
|
+
? (ultimaMsgContainer = this.container.children[
|
|
82
|
+
this.container.children.length - 3
|
|
83
|
+
])
|
|
84
|
+
: "";
|
|
85
|
+
const ultimaMsg = ultimaMsgContainer.lastElementChild.offsetHeight + 10;
|
|
86
|
+
alturaFinal -= ultimaMsg;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
this.container.scroll(0, paraCima ? 0 : alturaFinal);
|
|
90
|
+
} catch (e) {
|
|
91
|
+
console.error("Nao foi possivel rolar o container");
|
|
92
|
+
console.error(e);
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
verifyScrollbar() {
|
|
96
|
+
try {
|
|
97
|
+
this.getContainer();
|
|
98
|
+
|
|
99
|
+
this.visibilidade = true;
|
|
100
|
+
|
|
101
|
+
const posicaoDaBarra = this.container.scrollTop,
|
|
102
|
+
tamanhoContainer = this.container.offsetHeight,
|
|
103
|
+
tamanhoBarra = this.container.scrollHeight;
|
|
104
|
+
|
|
105
|
+
if (posicaoDaBarra == tamanhoBarra - tamanhoContainer) {
|
|
106
|
+
if (this.sinalizar) this.$emit("updateKey");
|
|
107
|
+
this.visibilidade = false;
|
|
108
|
+
} else if (
|
|
109
|
+
parseInt(posicaoDaBarra) + tamanhoContainer == tamanhoBarra ||
|
|
110
|
+
parseInt(posicaoDaBarra) + tamanhoContainer == tamanhoBarra + 1 ||
|
|
111
|
+
parseInt(posicaoDaBarra) + tamanhoContainer == tamanhoBarra - 1
|
|
112
|
+
) {
|
|
113
|
+
this.visibilidade = false;
|
|
114
|
+
}
|
|
115
|
+
} catch (e) {
|
|
116
|
+
console.error("Ignorando botao de rolagem devido a erro");
|
|
117
|
+
console.error(e);
|
|
118
|
+
this.visibilidade = false;
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
</script>
|
|
124
|
+
<style>
|
|
125
|
+
.btn-rolagem {
|
|
126
|
+
position: absolute;
|
|
127
|
+
bottom: 10px;
|
|
128
|
+
right: 20px;
|
|
129
|
+
}
|
|
130
|
+
.btn-rolagem.higher {
|
|
131
|
+
bottom: 36px;
|
|
132
|
+
}
|
|
133
|
+
.btn-rolagem svg {
|
|
134
|
+
font-size: 38.4px;
|
|
135
|
+
color: #757575;
|
|
136
|
+
transition-duration: 300ms;
|
|
137
|
+
transition-property: opacity;
|
|
138
|
+
opacity: 0.8;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
}
|
|
141
|
+
.btn-rolagem svg:hover {
|
|
142
|
+
opacity: 1;
|
|
143
|
+
}
|
|
144
|
+
.sinalizar-msg-nova {
|
|
145
|
+
position: absolute;
|
|
146
|
+
top: -10px;
|
|
147
|
+
left: -10px;
|
|
148
|
+
background-color: #4f772d;
|
|
149
|
+
width: 12.5px;
|
|
150
|
+
height: 12.5px;
|
|
151
|
+
border-radius: 50%;
|
|
152
|
+
animation-name: blink;
|
|
153
|
+
animation-duration: 1000ms;
|
|
154
|
+
animation-direction: alternate;
|
|
155
|
+
animation-iteration-count: infinite;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@keyframes blink {
|
|
159
|
+
from {
|
|
160
|
+
opacity: 0.8 - 0.1;
|
|
161
|
+
}
|
|
162
|
+
to {
|
|
163
|
+
opacity: 1;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
</style>
|