vue-intergrall-plugins 0.0.160 → 0.0.163
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 +4243 -277
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +4181 -288
- package/package.json +1 -1
- package/src/lib-components/Chat/BtnFiles.vue +12 -1
- package/src/lib-components/Chat/StandardMessages.vue +69 -38
- package/src/lib-components/Chat/TextFooter.vue +7 -2
package/package.json
CHANGED
|
@@ -112,6 +112,10 @@ export default {
|
|
|
112
112
|
hasButtonFiles: {
|
|
113
113
|
type: Boolean,
|
|
114
114
|
required: false
|
|
115
|
+
},
|
|
116
|
+
externalFiles: {
|
|
117
|
+
type: Array,
|
|
118
|
+
required: false
|
|
115
119
|
}
|
|
116
120
|
},
|
|
117
121
|
data() {
|
|
@@ -135,6 +139,13 @@ export default {
|
|
|
135
139
|
return "isMsg"
|
|
136
140
|
}
|
|
137
141
|
},
|
|
142
|
+
watch: {
|
|
143
|
+
externalFiles() {
|
|
144
|
+
this.file = this.externalFiles
|
|
145
|
+
this.fileSize = this.externalFiles.length
|
|
146
|
+
this.multipleFileUpload()
|
|
147
|
+
}
|
|
148
|
+
},
|
|
138
149
|
methods: {
|
|
139
150
|
openFilesByClip(){
|
|
140
151
|
if(this.fileSettings.multiple && !this.hasButtonFiles){
|
|
@@ -149,7 +160,7 @@ export default {
|
|
|
149
160
|
this.openFiles = !this.openFiles
|
|
150
161
|
},
|
|
151
162
|
openSelectFileHandler(type) {
|
|
152
|
-
if(type == "system")
|
|
163
|
+
if(type == "system") return this.$emit("open-file-system")
|
|
153
164
|
if(this.fileSettings.multiple){ type = 'both' }
|
|
154
165
|
const fileInput = document.querySelector(`#${type}-${this.textId}`)
|
|
155
166
|
if(fileInput) fileInput.click()
|
|
@@ -13,46 +13,68 @@
|
|
|
13
13
|
>
|
|
14
14
|
<div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
|
|
15
15
|
</v-select>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
16
|
+
<div class="transition-selects">
|
|
17
|
+
<transition name="fade" mode="out-in">
|
|
18
|
+
<div v-if="formatted_messages_2.length && key_1">
|
|
19
|
+
<v-select
|
|
20
|
+
:style="`background-color: ${backgroundColor}`"
|
|
21
|
+
appendToBody
|
|
22
|
+
:calculatePosition="calculateSelectPosition"
|
|
23
|
+
class="text-footer-v-select"
|
|
24
|
+
:options="formatted_messages_2"
|
|
25
|
+
label="value"
|
|
26
|
+
v-model="key_2"
|
|
27
|
+
:reduce="formatted_messages_2 => formatted_messages_2.cod"
|
|
28
|
+
@input="inputSelectKey2"
|
|
29
|
+
>
|
|
30
|
+
<div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
|
|
31
|
+
</v-select>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="loader-select" v-else-if="key_1 && loadingReq">
|
|
34
|
+
<VueLoader />
|
|
35
|
+
</div>
|
|
36
|
+
</transition>
|
|
37
|
+
<transition name="fade" mode="out-in">
|
|
38
|
+
<div class="text-footer-select-03" v-if="formatted_messages_3.length && key_2">
|
|
39
|
+
<v-select
|
|
40
|
+
:style="`background-color: ${backgroundColor}`"
|
|
41
|
+
appendToBody
|
|
42
|
+
:calculatePosition="calculateSelectPosition"
|
|
43
|
+
class="text-footer-v-select"
|
|
44
|
+
:options="formatted_messages_3"
|
|
45
|
+
label="value"
|
|
46
|
+
:clearable="false"
|
|
47
|
+
@input="openMsg()"
|
|
48
|
+
v-model="key_3"
|
|
49
|
+
>
|
|
50
|
+
<div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
|
|
51
|
+
</v-select>
|
|
52
|
+
<template v-if="key_3.cod">
|
|
53
|
+
<span class="text-footer--btn-select-03" v-if="messageType == 1" :title="dictionary.title_btn_preencher_msg_formatada" @click="insertFormattedMessage(key_3)">
|
|
54
|
+
<fa-icon :icon="['fas', 'level-up-alt']" />
|
|
55
|
+
</span>
|
|
56
|
+
<span class="text-footer--btn-select-03" v-else-if="messageType == 2" :title="dictionary.title_btn_abrir_msg_tipo_2" @click="openFormattedMsgType2(key_3)">
|
|
57
|
+
<fa-icon :icon="['fas', 'file-alt']" />
|
|
58
|
+
</span>
|
|
59
|
+
</template>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="loader-select" v-else-if="key_2 && loadingReq">
|
|
62
|
+
<VueLoader />
|
|
63
|
+
</div>
|
|
64
|
+
</transition>
|
|
52
65
|
</div>
|
|
53
66
|
</div>
|
|
54
67
|
</template>
|
|
55
68
|
|
|
69
|
+
<style>
|
|
70
|
+
.transition-selects {
|
|
71
|
+
min-height: 80px;display: flex; flex-direction: column; width: 100%;
|
|
72
|
+
}
|
|
73
|
+
.loader-select {
|
|
74
|
+
position: relative; min-height: 35px;background: #FFF;width: 100%; border: 1px solid #ccc;border-radius: 5px;z-index: 1;
|
|
75
|
+
}
|
|
76
|
+
</style>
|
|
77
|
+
|
|
56
78
|
<script>
|
|
57
79
|
|
|
58
80
|
import { createPopper } from "@popperjs/core"
|
|
@@ -95,7 +117,8 @@ export default {
|
|
|
95
117
|
formatted_messages_2: [],
|
|
96
118
|
key_2: "",
|
|
97
119
|
formatted_messages_3: [],
|
|
98
|
-
key_3: ""
|
|
120
|
+
key_3: "",
|
|
121
|
+
loadingReq: false
|
|
99
122
|
}
|
|
100
123
|
},
|
|
101
124
|
mounted() {
|
|
@@ -123,17 +146,25 @@ export default {
|
|
|
123
146
|
if(this.key_3) this.key_3 = ""
|
|
124
147
|
return
|
|
125
148
|
}
|
|
149
|
+
if(this.formatted_messages_3.length) this.formatted_messages_3 = []
|
|
150
|
+
if(this.key_3) this.key_3 = ""
|
|
126
151
|
this.receiveValueFormattedMessage(`T/${this.key_2}`, 3)
|
|
127
152
|
},
|
|
128
153
|
receiveValueFormattedMessage(cod, selectionIndex) {
|
|
129
154
|
try {
|
|
130
155
|
if(!this.token_cliente) throw new Error("Informe token_cliente como chave na propriedade formattedMessageSettings que ocorre na chamada componente TextFooter ")
|
|
156
|
+
this.loadingReq = true
|
|
131
157
|
this.getStandardMessages(cod, this.token_cliente).then((data) => {
|
|
158
|
+
this.loadingReq = false
|
|
132
159
|
if(data && typeof(data) == 'string') return this.$toasted.global.emConstrucao({msg: data})
|
|
133
160
|
if(data) return this.showFormattedMessage(data, selectionIndex)
|
|
134
161
|
this.$toasted.global.defaultError()
|
|
135
|
-
}).catch(e => {
|
|
162
|
+
}).catch(e => {
|
|
163
|
+
this.loadingReq = false
|
|
164
|
+
console.error("Error in getStandardMessages: ", e)
|
|
165
|
+
})
|
|
136
166
|
}catch(e) {
|
|
167
|
+
this.loadingReq = false
|
|
137
168
|
console.error("Error in receiveValueFormattedMessage: ", e)
|
|
138
169
|
}
|
|
139
170
|
},
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
:cssStyle="cssStyle"
|
|
65
65
|
:ref="`${textId}-file`"
|
|
66
66
|
:hasButtonFiles="hasButtonFiles"
|
|
67
|
+
:externalFiles="externalFiles"
|
|
67
68
|
@set-file-vars="setFileVars"
|
|
68
69
|
@open-image="openImage"
|
|
69
70
|
@open-file-system="openFileSystem"
|
|
@@ -165,6 +166,10 @@ export default {
|
|
|
165
166
|
hasButtonFiles: {
|
|
166
167
|
type: Boolean,
|
|
167
168
|
required: false
|
|
169
|
+
},
|
|
170
|
+
externalFiles: {
|
|
171
|
+
type: Array,
|
|
172
|
+
require: false
|
|
168
173
|
}
|
|
169
174
|
},
|
|
170
175
|
data() {
|
|
@@ -345,8 +350,8 @@ export default {
|
|
|
345
350
|
openImage(imagePreview) {
|
|
346
351
|
this.$emit("open-image", imagePreview)
|
|
347
352
|
},
|
|
348
|
-
openFileSystem(
|
|
349
|
-
this.$emit("open-file-system"
|
|
353
|
+
openFileSystem() {
|
|
354
|
+
this.$emit("open-file-system")
|
|
350
355
|
},
|
|
351
356
|
setAudio(audioObj) {
|
|
352
357
|
const { audioFile, audioSource } = audioObj
|