vue-intergrall-plugins 0.0.216 → 0.0.219
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 +773 -411
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +711 -419
- package/package.json +1 -1
- package/src/lib-components/Chat/BtnFiles.vue +14 -3
- package/src/lib-components/Chat/TextFooter.vue +4 -0
- package/src/lib-components/Email/EmailFile.vue +131 -0
- package/src/lib-components/Email/EmailItem.vue +186 -0
package/package.json
CHANGED
|
@@ -137,7 +137,8 @@ export default {
|
|
|
137
137
|
isDoc: false,
|
|
138
138
|
fileFormatError: false,
|
|
139
139
|
validFileFormats: "",
|
|
140
|
-
hasAnyFile: false
|
|
140
|
+
hasAnyFile: false,
|
|
141
|
+
externalFilesAux: [],
|
|
141
142
|
}
|
|
142
143
|
},
|
|
143
144
|
computed: {
|
|
@@ -150,8 +151,18 @@ export default {
|
|
|
150
151
|
},
|
|
151
152
|
watch: {
|
|
152
153
|
externalFiles() {
|
|
153
|
-
this.
|
|
154
|
-
|
|
154
|
+
if(!this.externalFiles.length){
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if(this.externalFiles.length + this.file.length > this.fileSettings.max) {
|
|
158
|
+
this.$emit("reset-file-system")
|
|
159
|
+
return this.$toasted.global.defaultInfo({ msg: `Limite de ${this.fileSettings.max} arquivos` })
|
|
160
|
+
}
|
|
161
|
+
this.externalFilesAux = Array.from(this.externalFiles)
|
|
162
|
+
this.externalFilesAux.forEach(files => {
|
|
163
|
+
this.file.push(files)
|
|
164
|
+
});
|
|
165
|
+
this.fileSize = this.externalFilesAux.length + this.file.length
|
|
155
166
|
this.multipleFileUpload()
|
|
156
167
|
}
|
|
157
168
|
},
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
@set-file-vars="setFileVars"
|
|
69
69
|
@open-image="openImage"
|
|
70
70
|
@open-file-system="openFileSystem"
|
|
71
|
+
@reset-file-system="resetFileSystem"
|
|
71
72
|
/>
|
|
72
73
|
<BtnExpand
|
|
73
74
|
v-show="buttons.hasExpand && !audioFile"
|
|
@@ -372,6 +373,9 @@ export default {
|
|
|
372
373
|
openFileSystem() {
|
|
373
374
|
this.$emit("open-file-system")
|
|
374
375
|
},
|
|
376
|
+
resetFileSystem() {
|
|
377
|
+
this.$emit("reset-file-system")
|
|
378
|
+
},
|
|
375
379
|
setAudio(audioObj) {
|
|
376
380
|
const { audioFile, audioSource } = audioObj
|
|
377
381
|
this.audioFile = audioFile
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<transition-group name="fade" mode="out-in">
|
|
3
|
+
<VueLoader v-if="isLoading" key="file-loader" />
|
|
4
|
+
<div v-else key="file-container" class="mb-5 mx-5 d-flex flex-wrap align-items-end">
|
|
5
|
+
<span v-if="imageURL" class="anexo-img box-shadow" @click="openWindowFromURL(imageURL, true)" :title="`Visualizar ${filename}`">
|
|
6
|
+
<img :src="`${imageURL}`" :alt="filename" />
|
|
7
|
+
</span>
|
|
8
|
+
<span
|
|
9
|
+
v-else
|
|
10
|
+
class="anexo-icone"
|
|
11
|
+
:class="[iconeClass]"
|
|
12
|
+
@click="openWindowFromURL(docURL, false)"
|
|
13
|
+
:title="`Visualizar ${filename}`"
|
|
14
|
+
target="_blank"
|
|
15
|
+
>
|
|
16
|
+
<fa-icon :icon="icon" />
|
|
17
|
+
</span>
|
|
18
|
+
<a :href="imageURL ? imageURL : docURL" :download="`${filename}`" target="_blank" :title="`Download ${filename}`">
|
|
19
|
+
<fa-icon :icon="['fas', 'download']" />
|
|
20
|
+
</a>
|
|
21
|
+
</div>
|
|
22
|
+
</transition-group>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import { fileHandler } from "@/mixins/fileHandler"
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
mixins: [fileHandler],
|
|
30
|
+
props: {
|
|
31
|
+
anexo: {
|
|
32
|
+
type: [Object, String],
|
|
33
|
+
default: () => { return {} }
|
|
34
|
+
},
|
|
35
|
+
dominio: {
|
|
36
|
+
type: String,
|
|
37
|
+
required: true
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
mounted() {
|
|
41
|
+
this.setFileVars(this.anexo, { dominio: this.dominio })
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
<style scoped>
|
|
46
|
+
.anexo-img {
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
align-items: center;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
background-color: rgba(0, 0, 0, .2);
|
|
54
|
+
border-radius: 2.5px;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
opacity: .9;
|
|
57
|
+
transition: opacity 150ms;
|
|
58
|
+
}
|
|
59
|
+
.anexo-img:hover {
|
|
60
|
+
opacity: 1;
|
|
61
|
+
}
|
|
62
|
+
.anexo-img img {
|
|
63
|
+
width: 95%;
|
|
64
|
+
max-height: 50px;
|
|
65
|
+
}
|
|
66
|
+
.box-shadow {
|
|
67
|
+
-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);
|
|
68
|
+
-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);
|
|
69
|
+
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);
|
|
70
|
+
}
|
|
71
|
+
.anexo-icone:hover {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
}
|
|
74
|
+
.anexo-icone:visited {
|
|
75
|
+
color: inherit;
|
|
76
|
+
}
|
|
77
|
+
.anexo-icone svg {
|
|
78
|
+
font-size: 30px;
|
|
79
|
+
z-index: 1;
|
|
80
|
+
}
|
|
81
|
+
.anexo-icone.pdf {
|
|
82
|
+
position: relative;
|
|
83
|
+
}
|
|
84
|
+
.anexo-icone.pdf svg{
|
|
85
|
+
color: #E74C3C;
|
|
86
|
+
}
|
|
87
|
+
.anexo-icone.pdf::after {
|
|
88
|
+
content: "";
|
|
89
|
+
position: absolute;
|
|
90
|
+
bottom: 2px;
|
|
91
|
+
transform: translateY(2px);
|
|
92
|
+
width: 20px;
|
|
93
|
+
height: 20px;
|
|
94
|
+
background-color: #FFF;
|
|
95
|
+
}
|
|
96
|
+
.anexo-icone.doc {
|
|
97
|
+
color: #15517F;
|
|
98
|
+
}
|
|
99
|
+
.anexo-icone.doc::after {
|
|
100
|
+
content: "";
|
|
101
|
+
position: absolute;
|
|
102
|
+
width: 20px;
|
|
103
|
+
height: 20px;
|
|
104
|
+
background-color: #FFF;
|
|
105
|
+
}
|
|
106
|
+
.anexo-icone {
|
|
107
|
+
opacity: .9;
|
|
108
|
+
transition: opacity 200ms;
|
|
109
|
+
color: #222;
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
display: flex;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
align-items: center;
|
|
114
|
+
}
|
|
115
|
+
.align-items-end {
|
|
116
|
+
align-items: flex-end;
|
|
117
|
+
}
|
|
118
|
+
.flex-wrap {
|
|
119
|
+
flex-wrap: wrap;
|
|
120
|
+
}
|
|
121
|
+
.d-flex {
|
|
122
|
+
display: flex;
|
|
123
|
+
}
|
|
124
|
+
.mb-5 {
|
|
125
|
+
margin-bottom: 5px;
|
|
126
|
+
}
|
|
127
|
+
.mx-5 {
|
|
128
|
+
margin-left: 5px;
|
|
129
|
+
margin-right: 5px;
|
|
130
|
+
}
|
|
131
|
+
</style>
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="w-100 text-dark min-h-60 d-flex flex-wrap px-35 border-bottom-1 border-color-gray transition-150">
|
|
3
|
+
<div class="w-100 d-flex d-flex align-items-center justify-content-between cursor-pointer" @click="toggleEstado()">
|
|
4
|
+
<div class="d-flex-center m-10">
|
|
5
|
+
<span class="align-self-start border-radius-round d-flex-center w-36px h-36px border-color-gray border-1 mr-10" v-text="siglaNome"></span>
|
|
6
|
+
<div class="d-flex flex-column">
|
|
7
|
+
<p class="text-bold fs-_9" v-text="de" :title="de"></p>
|
|
8
|
+
<p v-if="estado != 0" class="text-gray fs-_8" v-text="para" :title="para"></p>
|
|
9
|
+
<p class="text-gray fs-_8" v-text="tratarTextoLongo(assunto, 30)" :title="assunto"></p>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<span class="fs-_8 mr-10 text-ellipsis" :title="formataDataHora(dataHora)">
|
|
13
|
+
<fa-icon :icon="['fas', 'calendar']" />
|
|
14
|
+
{{ formataDataHora(dataHora) }}
|
|
15
|
+
</span>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="d-flex-center w-100 p-15" v-if="estado != 0">
|
|
18
|
+
<section v-html="html"></section>
|
|
19
|
+
</div>
|
|
20
|
+
<template v-if="anexos && anexos.length">
|
|
21
|
+
<EmailFile
|
|
22
|
+
class="d-flex flex-wrap align-items-center"
|
|
23
|
+
v-for="(anexo, index) in anexos" :key="index"
|
|
24
|
+
:anexo="anexo"
|
|
25
|
+
:dominio="dominio"
|
|
26
|
+
/>
|
|
27
|
+
</template>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
import EmailFile from "./EmailFile.vue"
|
|
33
|
+
import { textoLongo } from "@/mixins/formatarTexto"
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
mixins: [textoLongo],
|
|
37
|
+
components: { EmailFile },
|
|
38
|
+
props: {
|
|
39
|
+
dominio: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true
|
|
42
|
+
},
|
|
43
|
+
dicionario: {
|
|
44
|
+
type: Object,
|
|
45
|
+
required: true
|
|
46
|
+
},
|
|
47
|
+
de: {
|
|
48
|
+
type: String,
|
|
49
|
+
required: false,
|
|
50
|
+
default: ""
|
|
51
|
+
},
|
|
52
|
+
para: {
|
|
53
|
+
type: String,
|
|
54
|
+
required: false,
|
|
55
|
+
default: ""
|
|
56
|
+
},
|
|
57
|
+
html: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: false,
|
|
60
|
+
default: ""
|
|
61
|
+
},
|
|
62
|
+
assunto: {
|
|
63
|
+
type: String,
|
|
64
|
+
required: false,
|
|
65
|
+
default: ""
|
|
66
|
+
},
|
|
67
|
+
dataHora: {
|
|
68
|
+
type: String,
|
|
69
|
+
required: false,
|
|
70
|
+
default: ""
|
|
71
|
+
},
|
|
72
|
+
mensagem: {
|
|
73
|
+
type: String,
|
|
74
|
+
required: false,
|
|
75
|
+
default: ""
|
|
76
|
+
},
|
|
77
|
+
anexos: {
|
|
78
|
+
type: [Array, String],
|
|
79
|
+
required: false,
|
|
80
|
+
default: () => { return [] }
|
|
81
|
+
},
|
|
82
|
+
iniciarAberto: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
required: false,
|
|
85
|
+
default: false
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
data() {
|
|
89
|
+
return {
|
|
90
|
+
estado: 0
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
computed: {
|
|
94
|
+
siglaNome() {
|
|
95
|
+
return this.de[0] ? this.de[0].toUpperCase() : ""
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
methods: {
|
|
99
|
+
toggleEstado() {
|
|
100
|
+
this.estado = this.estado == 0 ? 1 : 0
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
</script>
|
|
105
|
+
<style scoped>
|
|
106
|
+
.w-100 {
|
|
107
|
+
width: 100%;
|
|
108
|
+
}
|
|
109
|
+
.text-dark {
|
|
110
|
+
color: #333
|
|
111
|
+
}
|
|
112
|
+
.min-h-60 {
|
|
113
|
+
min-height: 60px;
|
|
114
|
+
}
|
|
115
|
+
.d-flex {
|
|
116
|
+
display: flex;
|
|
117
|
+
}
|
|
118
|
+
.flex-wrap {
|
|
119
|
+
flex-wrap: wrap;
|
|
120
|
+
}
|
|
121
|
+
.border-bottom-1 {
|
|
122
|
+
border-bottom: 1px solid;
|
|
123
|
+
}
|
|
124
|
+
.border-color-gray {
|
|
125
|
+
border-color: #CCC
|
|
126
|
+
}
|
|
127
|
+
.transition-150 {
|
|
128
|
+
transition: all 150ms ease-in-out;
|
|
129
|
+
}
|
|
130
|
+
.cursor-pointer {
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
}
|
|
133
|
+
.justify-content-between {
|
|
134
|
+
justify-content: space-between;
|
|
135
|
+
}
|
|
136
|
+
.align-items-center {
|
|
137
|
+
align-items: center;
|
|
138
|
+
}
|
|
139
|
+
.align-self-start {
|
|
140
|
+
align-self: flex-start;
|
|
141
|
+
}
|
|
142
|
+
.border-radius-round {
|
|
143
|
+
border-radius: 50%!important;
|
|
144
|
+
}
|
|
145
|
+
.w-36px {
|
|
146
|
+
width: 36px;
|
|
147
|
+
}
|
|
148
|
+
.h-36px {
|
|
149
|
+
height: 36px;
|
|
150
|
+
}
|
|
151
|
+
.border-1 {
|
|
152
|
+
border: 1px solid;
|
|
153
|
+
}
|
|
154
|
+
.mr-10 {
|
|
155
|
+
margin-right: 10px;
|
|
156
|
+
}
|
|
157
|
+
.flex-column {
|
|
158
|
+
display: flex;
|
|
159
|
+
flex-direction: column
|
|
160
|
+
}
|
|
161
|
+
.text-bold {
|
|
162
|
+
font-weight: bold;
|
|
163
|
+
}
|
|
164
|
+
.fs-_9 {
|
|
165
|
+
font-size: .9rem;
|
|
166
|
+
}
|
|
167
|
+
.fs-_8 {
|
|
168
|
+
font-size: .8rem;
|
|
169
|
+
}
|
|
170
|
+
.text-gray {
|
|
171
|
+
color: gray;
|
|
172
|
+
}
|
|
173
|
+
.p-15 {
|
|
174
|
+
padding: 15px;
|
|
175
|
+
}
|
|
176
|
+
.text-ellipsis{
|
|
177
|
+
white-space: nowrap;
|
|
178
|
+
text-overflow: ellipsis;
|
|
179
|
+
overflow: hidden
|
|
180
|
+
}
|
|
181
|
+
.d-flex-center{
|
|
182
|
+
display: flex;
|
|
183
|
+
justify-content: center;
|
|
184
|
+
align-items: center
|
|
185
|
+
}
|
|
186
|
+
</style>
|