vue-intergrall-plugins 0.0.160 → 0.0.161
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 +4231 -282
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +4170 -293
- package/package.json +1 -1
- package/src/lib-components/Chat/BtnFiles.vue +1 -1
- package/src/lib-components/Chat/StandardMessages.vue +69 -38
- package/src/lib-components/Chat/TextFooter.vue +2 -2
package/package.json
CHANGED
|
@@ -149,7 +149,7 @@ export default {
|
|
|
149
149
|
this.openFiles = !this.openFiles
|
|
150
150
|
},
|
|
151
151
|
openSelectFileHandler(type) {
|
|
152
|
-
if(type == "system")
|
|
152
|
+
if(type == "system") return this.$emit("open-file-system")
|
|
153
153
|
if(this.fileSettings.multiple){ type = 'both' }
|
|
154
154
|
const fileInput = document.querySelector(`#${type}-${this.textId}`)
|
|
155
155
|
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
|
},
|
|
@@ -345,8 +345,8 @@ export default {
|
|
|
345
345
|
openImage(imagePreview) {
|
|
346
346
|
this.$emit("open-image", imagePreview)
|
|
347
347
|
},
|
|
348
|
-
openFileSystem(
|
|
349
|
-
this.$emit("open-file-system"
|
|
348
|
+
openFileSystem() {
|
|
349
|
+
this.$emit("open-file-system")
|
|
350
350
|
},
|
|
351
351
|
setAudio(audioObj) {
|
|
352
352
|
const { audioFile, audioSource } = audioObj
|