vue-intergrall-plugins 0.0.504 → 0.0.510

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.
Files changed (41) hide show
  1. package/README.md +185 -185
  2. package/dist/vue-intergrall-plugins.esm.js +596 -513
  3. package/dist/vue-intergrall-plugins.min.js +1 -1
  4. package/dist/vue-intergrall-plugins.ssr.js +607 -541
  5. package/package.json +67 -66
  6. package/src/lib-components/Buttons/IconButton.vue +27 -27
  7. package/src/lib-components/Buttons/SimpleButton.vue +140 -140
  8. package/src/lib-components/Cards/Card.vue +429 -429
  9. package/src/lib-components/Cards/CardCheck.vue +35 -35
  10. package/src/lib-components/Cards/CardFile.vue +157 -157
  11. package/src/lib-components/Chat/BtnDownloadAllFiles.vue +36 -36
  12. package/src/lib-components/Chat/BtnEmojis.vue +131 -131
  13. package/src/lib-components/Chat/BtnExpand.vue +17 -17
  14. package/src/lib-components/Chat/BtnFiles.vue +541 -541
  15. package/src/lib-components/Chat/BtnMic.vue +60 -60
  16. package/src/lib-components/Chat/BtnScreenShare.vue +36 -36
  17. package/src/lib-components/Chat/BtnStandardMessages.vue +17 -17
  18. package/src/lib-components/Chat/ExpandTextarea.vue +410 -410
  19. package/src/lib-components/Chat/MultipleFilePreview.vue +266 -266
  20. package/src/lib-components/Chat/Picker.vue +405 -405
  21. package/src/lib-components/Chat/RemainingCharacters.vue +28 -28
  22. package/src/lib-components/Chat/SingleFilePreview.vue +94 -94
  23. package/src/lib-components/Chat/SkeletonPicker.vue +110 -110
  24. package/src/lib-components/Chat/StandardMessages.vue +245 -245
  25. package/src/lib-components/Chat/TextFooter.vue +1030 -1030
  26. package/src/lib-components/Email/EmailFile.vue +125 -125
  27. package/src/lib-components/Email/EmailItem.vue +185 -185
  28. package/src/lib-components/Loader/Loader.vue +78 -78
  29. package/src/lib-components/Messages/AnexoMensagem.vue +442 -442
  30. package/src/lib-components/Messages/CardAttachment.vue +61 -61
  31. package/src/lib-components/Messages/CardMessages.vue +666 -666
  32. package/src/lib-components/Messages/ChatMessages.vue +1082 -1077
  33. package/src/lib-components/Messages/InteratividadeBotoes.vue +165 -165
  34. package/src/lib-components/Messages/InteratividadeFormulario.vue +392 -392
  35. package/src/lib-components/Messages/InteratividadePopup.vue +88 -88
  36. package/src/lib-components/Messages/LinkPreview.vue +163 -163
  37. package/src/lib-components/Midea/Player.vue +25 -0
  38. package/src/lib-components/Scroll/ScrollContent.vue +166 -166
  39. package/src/lib-components/Templates/TemplateGenerator.vue +576 -576
  40. package/src/lib-components/Templates/TemplateMessage.vue +83 -83
  41. package/src/lib-components/Templates/TemplateSingle.vue +481 -481
@@ -1,245 +1,245 @@
1
- <template>
2
- <div class="text-footer-hsm-container" v-if="hasStandardMessages">
3
- <div class="transition-selects">
4
- <transition name="fade" mode="out-in">
5
- <div v-if="formatted_messages_2.length && key_1">
6
- <v-select
7
- :style="`background-color: ${backgroundColor}`"
8
- appendToBody
9
- :calculatePosition="calculateSelectPosition"
10
- class="text-footer-v-select"
11
- :options="formatted_messages_2"
12
- label="value"
13
- v-model="key_2"
14
- :reduce="formatted_messages_2 => formatted_messages_2.cod"
15
- @input="inputSelectKey2"
16
- >
17
- <div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
18
- </v-select>
19
- </div>
20
- <div class="loader-select" v-else-if="key_1 && loadingReq">
21
- <VueLoader />
22
- </div>
23
- </transition>
24
- <transition name="fade" mode="out-in">
25
- <div class="text-footer-select-03" v-if="formatted_messages_3.length && key_2 && formatted_messages_2.length && key_1">
26
- <v-select
27
- :style="`background-color: ${backgroundColor}`"
28
- appendToBody
29
- :calculatePosition="calculateSelectPosition"
30
- class="text-footer-v-select"
31
- :options="formatted_messages_3"
32
- :reduce="formatted_messages_3 => formatted_messages_3.cod"
33
- label="value"
34
- :clearable="false"
35
- @input="openMsg()"
36
- v-model="key_3"
37
- >
38
- <div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
39
- </v-select>
40
- </div>
41
- <div class="loader-select" v-else-if="key_2 && loadingReq">
42
- <VueLoader />
43
- </div>
44
- </transition>
45
- </div>
46
- </div>
47
- </template>
48
-
49
- <style>
50
- .transition-selects {
51
- min-height: 80px;display: flex; flex-direction: column; width: 100%;
52
- }
53
- .loader-select {
54
- position: relative; min-height: 35px;background: #FFF;width: 100%; border: 1px solid #ccc;border-radius: 5px;z-index: 1;
55
- }
56
- .loading-message {
57
- background-color: #555!important;
58
- }
59
- </style>
60
-
61
- <script>
62
-
63
- import { createPopper } from "@popperjs/core"
64
- import { standardMessages } from "../../services/standardMessages"
65
-
66
- export default {
67
- mixins: [standardMessages],
68
- props: {
69
- hasStandardMessages: {
70
- type: Boolean,
71
- default: false
72
- },
73
- dictionary: {
74
- type: Object,
75
- default: {},
76
- required: false
77
- },
78
- backgroundColor: {
79
- type: String,
80
- default: '#fff',
81
- required: false
82
- },
83
- token_cliente: {
84
- type: String,
85
- default: '',
86
- required: false
87
- },
88
- message: {
89
- type: String,
90
- default: '',
91
- required: false
92
- },
93
- messageType: {
94
- type: [Number, String],
95
- default: 1,
96
- required: false
97
- }
98
- },
99
- data() {
100
- return {
101
- placement: "top",
102
- formatted_messages_1: [{ cod: "T", value: "Todos" }],
103
- key_1: "T",
104
- formatted_messages_2: [],
105
- key_2: "",
106
- formatted_messages_3: [],
107
- key_3: "",
108
- loadingReq: true
109
- }
110
- },
111
- mounted() {
112
- this.receiveValueFormattedMessage(this.key_1, 2)
113
- },
114
- methods: {
115
- calculateSelectPosition(dropdownList, component, sizes) {
116
- dropdownList.style.width = sizes.width
117
- const popper = createPopper(component.$refs.toggle, dropdownList, {
118
- placement: this.placement
119
- })
120
- return () => popper.destroy()
121
- },
122
- inputSelectKey1() {
123
- if(!this.key_1) {
124
- if(this.formatted_messages_2.length) this.formatted_messages_2 = []
125
- if(this.key_2) this.key_2 = ""
126
- return
127
- }
128
- this.receiveValueFormattedMessage(this.key_1, 2)
129
- },
130
- inputSelectKey2() {
131
- if(!this.key_2) {
132
- if(this.formatted_messages_3.length) this.formatted_messages_3 = []
133
- if(this.key_3) this.key_3 = ""
134
- return
135
- }
136
- if(this.formatted_messages_3.length) this.formatted_messages_3 = []
137
- if(this.key_3) this.key_3 = ""
138
- this.receiveValueFormattedMessage(`T/${this.key_2}`, 3)
139
- },
140
- receiveValueFormattedMessage(cod, selectionIndex) {
141
- try {
142
- if(!this.token_cliente) throw new Error("Informe token_cliente como chave na propriedade formattedMessageSettings que ocorre na chamada componente TextFooter ")
143
- this.loadingReq = true
144
- this.getStandardMessages(cod, this.token_cliente).then((data) => {
145
- this.loadingReq = false
146
- if(data) {
147
- if(data.msg_ret) return this.$toasted.global.defaultInfo({ msg: data.msg_ret })
148
- if(data) return this.showFormattedMessage(data, selectionIndex)
149
- }
150
- this.$toasted.global.defaultError()
151
- this.$emit("error-standard-message")
152
- }).catch(e => {
153
- this.loadingReq = false
154
- this.$toasted.global.defaultError({ msg: e && e.message ? e.message : e })
155
- this.closeStandardMessages()
156
- this.$emit("error-standard-message")
157
- console.error("Error in getStandardMessages: ", e)
158
- })
159
- }catch(e) {
160
- this.loadingReq = false
161
- console.error("Error in receiveValueFormattedMessage: ", e)
162
- }
163
- },
164
- showFormattedMessage(messageData, selectionIndex) {
165
- try {
166
- let success = false
167
- if(Array.isArray(messageData)) success = true
168
- if(!success && selectionIndex != 4) this.$toasted.global.defaultInfo({ msg: messageData ? messageData.msg : "Nao foi possível obter mensagens" })
169
-
170
- switch (selectionIndex) {
171
- case 2:
172
- if(!success){
173
- this.formatted_messages_2.push(messageData)
174
- this.key_2 = this.formatted_messages_2[0]
175
- }else{
176
- this.formatted_messages_2 = messageData
177
- if(this.formatted_messages_2.length == 1) {
178
- if(this.formatted_messages_2[0].cod) {
179
- this.key_2 = this.formatted_messages_2[0].cod
180
- this.receiveValueFormattedMessage(`T/${this.key_2}`, 3)
181
- }
182
- }
183
- }
184
- break
185
- case 3:
186
- if(!success) {
187
- this.formatted_messages_3.push(messageData)
188
- this.$toasted.global.defaultInfo({msg: this.dictionary.msg_erro_sem_msg_formatada})
189
- this.$emit("close-blocker-standard-message")
190
- }else{
191
- if(messageData.length){
192
- this.formatted_messages_3 = messageData
193
- if(this.formatted_messages_3.length == 1 && this.formatted_messages_3[0].cod) {
194
- this.key_3 = this.formatted_messages_3[0].cod
195
- this.openMsg()
196
- }
197
- }
198
- }
199
- break
200
- case 4:
201
- const finalMessage = `${this.message}${this.message && !this.message.endsWith(" ") ? ` ${messageData}` : messageData}`
202
- this.$emit("add-standard-message", finalMessage)
203
- this.$parent.focusTextarea()
204
- // return this.closeStandardMessages()
205
- break
206
- default:
207
- console.error("Error in showFormattedMessage: selectionIndex not found")
208
- break
209
- }
210
-
211
- }catch(e) {
212
- console.error("Error in showFormattedMessage: ", e)
213
- }
214
- },
215
- closeStandardMessages() {
216
- this.$emit("close-standard-messages")
217
- },
218
- openMsg() {
219
- try {
220
- this.messageType == 1 ? this.insertFormattedMessage(this.key_3) : this.openFormattedMsgType2(this.key_3)
221
- }catch(e) {
222
- console.error("Error in openMsg: ", e)
223
- }
224
- },
225
- openFormattedMsgType2(key) {
226
- try {
227
- if(!key || !this.key_2) return
228
- this.$emit("open-blocker-standard-message")
229
- key = key.cod
230
- this.$emit("set-standard-infos", { category: this.key_2, subject: key })
231
- }catch(e) {
232
- console.error("Error in openFormattedMsgType2: ", e)
233
- }
234
- },
235
- insertFormattedMessage() {
236
- try {
237
- if(!this.key_3) return this.$toasted.global.defaultError({msg: 'Selecione uma mensagem'})
238
- this.receiveValueFormattedMessage(`T/${this.key_2}/${this.key_3}`, 4)
239
- }catch(e) {
240
- console.error("Erro ao inserir mensagem formatada: ", e)
241
- }
242
- }
243
- }
244
- }
245
- </script>
1
+ <template>
2
+ <div class="text-footer-hsm-container" v-if="hasStandardMessages">
3
+ <div class="transition-selects">
4
+ <transition name="fade" mode="out-in">
5
+ <div v-if="formatted_messages_2.length && key_1">
6
+ <v-select
7
+ :style="`background-color: ${backgroundColor}`"
8
+ appendToBody
9
+ :calculatePosition="calculateSelectPosition"
10
+ class="text-footer-v-select"
11
+ :options="formatted_messages_2"
12
+ label="value"
13
+ v-model="key_2"
14
+ :reduce="formatted_messages_2 => formatted_messages_2.cod"
15
+ @input="inputSelectKey2"
16
+ >
17
+ <div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
18
+ </v-select>
19
+ </div>
20
+ <div class="loader-select" v-else-if="key_1 && loadingReq">
21
+ <VueLoader />
22
+ </div>
23
+ </transition>
24
+ <transition name="fade" mode="out-in">
25
+ <div class="text-footer-select-03" v-if="formatted_messages_3.length && key_2 && formatted_messages_2.length && key_1">
26
+ <v-select
27
+ :style="`background-color: ${backgroundColor}`"
28
+ appendToBody
29
+ :calculatePosition="calculateSelectPosition"
30
+ class="text-footer-v-select"
31
+ :options="formatted_messages_3"
32
+ :reduce="formatted_messages_3 => formatted_messages_3.cod"
33
+ label="value"
34
+ :clearable="false"
35
+ @input="openMsg()"
36
+ v-model="key_3"
37
+ >
38
+ <div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
39
+ </v-select>
40
+ </div>
41
+ <div class="loader-select" v-else-if="key_2 && loadingReq">
42
+ <VueLoader />
43
+ </div>
44
+ </transition>
45
+ </div>
46
+ </div>
47
+ </template>
48
+
49
+ <style>
50
+ .transition-selects {
51
+ min-height: 80px;display: flex; flex-direction: column; width: 100%;
52
+ }
53
+ .loader-select {
54
+ position: relative; min-height: 35px;background: #FFF;width: 100%; border: 1px solid #ccc;border-radius: 5px;z-index: 1;
55
+ }
56
+ .loading-message {
57
+ background-color: #555!important;
58
+ }
59
+ </style>
60
+
61
+ <script>
62
+
63
+ import { createPopper } from "@popperjs/core"
64
+ import { standardMessages } from "../../services/standardMessages"
65
+
66
+ export default {
67
+ mixins: [standardMessages],
68
+ props: {
69
+ hasStandardMessages: {
70
+ type: Boolean,
71
+ default: false
72
+ },
73
+ dictionary: {
74
+ type: Object,
75
+ default: {},
76
+ required: false
77
+ },
78
+ backgroundColor: {
79
+ type: String,
80
+ default: '#fff',
81
+ required: false
82
+ },
83
+ token_cliente: {
84
+ type: String,
85
+ default: '',
86
+ required: false
87
+ },
88
+ message: {
89
+ type: String,
90
+ default: '',
91
+ required: false
92
+ },
93
+ messageType: {
94
+ type: [Number, String],
95
+ default: 1,
96
+ required: false
97
+ }
98
+ },
99
+ data() {
100
+ return {
101
+ placement: "top",
102
+ formatted_messages_1: [{ cod: "T", value: "Todos" }],
103
+ key_1: "T",
104
+ formatted_messages_2: [],
105
+ key_2: "",
106
+ formatted_messages_3: [],
107
+ key_3: "",
108
+ loadingReq: true
109
+ }
110
+ },
111
+ mounted() {
112
+ this.receiveValueFormattedMessage(this.key_1, 2)
113
+ },
114
+ methods: {
115
+ calculateSelectPosition(dropdownList, component, sizes) {
116
+ dropdownList.style.width = sizes.width
117
+ const popper = createPopper(component.$refs.toggle, dropdownList, {
118
+ placement: this.placement
119
+ })
120
+ return () => popper.destroy()
121
+ },
122
+ inputSelectKey1() {
123
+ if(!this.key_1) {
124
+ if(this.formatted_messages_2.length) this.formatted_messages_2 = []
125
+ if(this.key_2) this.key_2 = ""
126
+ return
127
+ }
128
+ this.receiveValueFormattedMessage(this.key_1, 2)
129
+ },
130
+ inputSelectKey2() {
131
+ if(!this.key_2) {
132
+ if(this.formatted_messages_3.length) this.formatted_messages_3 = []
133
+ if(this.key_3) this.key_3 = ""
134
+ return
135
+ }
136
+ if(this.formatted_messages_3.length) this.formatted_messages_3 = []
137
+ if(this.key_3) this.key_3 = ""
138
+ this.receiveValueFormattedMessage(`T/${this.key_2}`, 3)
139
+ },
140
+ receiveValueFormattedMessage(cod, selectionIndex) {
141
+ try {
142
+ if(!this.token_cliente) throw new Error("Informe token_cliente como chave na propriedade formattedMessageSettings que ocorre na chamada componente TextFooter ")
143
+ this.loadingReq = true
144
+ this.getStandardMessages(cod, this.token_cliente).then((data) => {
145
+ this.loadingReq = false
146
+ if(data) {
147
+ if(data.msg_ret) return this.$toasted.global.defaultInfo({ msg: data.msg_ret })
148
+ if(data) return this.showFormattedMessage(data, selectionIndex)
149
+ }
150
+ this.$toasted.global.defaultError()
151
+ this.$emit("error-standard-message")
152
+ }).catch(e => {
153
+ this.loadingReq = false
154
+ this.$toasted.global.defaultError({ msg: e && e.message ? e.message : e })
155
+ this.closeStandardMessages()
156
+ this.$emit("error-standard-message")
157
+ console.error("Error in getStandardMessages: ", e)
158
+ })
159
+ }catch(e) {
160
+ this.loadingReq = false
161
+ console.error("Error in receiveValueFormattedMessage: ", e)
162
+ }
163
+ },
164
+ showFormattedMessage(messageData, selectionIndex) {
165
+ try {
166
+ let success = false
167
+ if(Array.isArray(messageData)) success = true
168
+ if(!success && selectionIndex != 4) this.$toasted.global.defaultInfo({ msg: messageData ? messageData.msg : "Nao foi possível obter mensagens" })
169
+
170
+ switch (selectionIndex) {
171
+ case 2:
172
+ if(!success){
173
+ this.formatted_messages_2.push(messageData)
174
+ this.key_2 = this.formatted_messages_2[0]
175
+ }else{
176
+ this.formatted_messages_2 = messageData
177
+ if(this.formatted_messages_2.length == 1) {
178
+ if(this.formatted_messages_2[0].cod) {
179
+ this.key_2 = this.formatted_messages_2[0].cod
180
+ this.receiveValueFormattedMessage(`T/${this.key_2}`, 3)
181
+ }
182
+ }
183
+ }
184
+ break
185
+ case 3:
186
+ if(!success) {
187
+ this.formatted_messages_3.push(messageData)
188
+ this.$toasted.global.defaultInfo({msg: this.dictionary.msg_erro_sem_msg_formatada})
189
+ this.$emit("close-blocker-standard-message")
190
+ }else{
191
+ if(messageData.length){
192
+ this.formatted_messages_3 = messageData
193
+ if(this.formatted_messages_3.length == 1 && this.formatted_messages_3[0].cod) {
194
+ this.key_3 = this.formatted_messages_3[0].cod
195
+ this.openMsg()
196
+ }
197
+ }
198
+ }
199
+ break
200
+ case 4:
201
+ const finalMessage = `${this.message}${this.message && !this.message.endsWith(" ") ? ` ${messageData}` : messageData}`
202
+ this.$emit("add-standard-message", finalMessage)
203
+ this.$parent.focusTextarea()
204
+ // return this.closeStandardMessages()
205
+ break
206
+ default:
207
+ console.error("Error in showFormattedMessage: selectionIndex not found")
208
+ break
209
+ }
210
+
211
+ }catch(e) {
212
+ console.error("Error in showFormattedMessage: ", e)
213
+ }
214
+ },
215
+ closeStandardMessages() {
216
+ this.$emit("close-standard-messages")
217
+ },
218
+ openMsg() {
219
+ try {
220
+ this.messageType == 1 ? this.insertFormattedMessage(this.key_3) : this.openFormattedMsgType2(this.key_3)
221
+ }catch(e) {
222
+ console.error("Error in openMsg: ", e)
223
+ }
224
+ },
225
+ openFormattedMsgType2(key) {
226
+ try {
227
+ if(!key || !this.key_2) return
228
+ this.$emit("open-blocker-standard-message")
229
+ key = key.cod
230
+ this.$emit("set-standard-infos", { category: this.key_2, subject: key })
231
+ }catch(e) {
232
+ console.error("Error in openFormattedMsgType2: ", e)
233
+ }
234
+ },
235
+ insertFormattedMessage() {
236
+ try {
237
+ if(!this.key_3) return this.$toasted.global.defaultError({msg: 'Selecione uma mensagem'})
238
+ this.receiveValueFormattedMessage(`T/${this.key_2}/${this.key_3}`, 4)
239
+ }catch(e) {
240
+ console.error("Erro ao inserir mensagem formatada: ", e)
241
+ }
242
+ }
243
+ }
244
+ }
245
+ </script>