vue-intergrall-plugins 1.0.0 → 1.0.2
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.css +3419 -0
- package/dist/vue-intergrall-plugins.esm.js +16017 -0
- package/dist/vue-intergrall-plugins.min.js +1 -1
- package/dist/vue-intergrall-plugins.ssr.js +16219 -0
- package/package.json +12 -15
- package/src/lib-components/Buttons/IconButton.vue +1 -1
- package/src/lib-components/Buttons/SimpleButton.vue +1 -1
- package/src/lib-components/Cards/Card.vue +1 -1
- package/src/lib-components/Cards/CardFile.vue +1 -1
- package/src/lib-components/Chat/BtnEmojis.vue +1 -13
- package/src/lib-components/Chat/BtnFiles.vue +1 -1
- package/src/lib-components/Chat/ExpandTextarea.vue +297 -270
- package/src/lib-components/Chat/MultipleFilePreview.vue +1 -1
- package/src/lib-components/Chat/Picker.vue +1 -1
- package/src/lib-components/Chat/SingleFilePreview.vue +1 -1
- package/src/lib-components/Chat/SkeletonPicker.vue +1 -1
- package/src/lib-components/Chat/StandardMessages.vue +1 -1
- package/src/lib-components/Chat/TextFooter.vue +1 -13
- package/src/lib-components/Loader/Loader.vue +1 -1
- package/src/lib-components/Messages/AnexoMensagem.vue +1 -1
- package/src/lib-components/Messages/ChatMessages.vue +1 -1
- package/src/lib-components/Messages/InteratividadeBotoes.vue +120 -122
- package/src/lib-components/Messages/InteratividadeFormulario.vue +291 -276
- package/src/lib-components/Messages/InteratividadePopup.vue +1 -1
- package/src/lib-components/Scroll/ScrollContent.vue +1 -1
- package/src/lib-components/Templates/TemplateGenerator.vue +299 -259
|
@@ -1,28 +1,38 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
2
|
+
<div
|
|
3
|
+
class="expand-textarea"
|
|
4
|
+
@drop.stop="dropFile"
|
|
5
|
+
@dragenter.prevent
|
|
6
|
+
@dragover.prevent
|
|
7
|
+
v-on-clickaway="away"
|
|
8
|
+
>
|
|
9
|
+
<fa-icon
|
|
10
|
+
:icon="['fas', 'times-circle']"
|
|
11
|
+
class="sc-icone-fechar sc-icone-fechar--externo"
|
|
12
|
+
@click="$emit('fechar-expand')"
|
|
13
|
+
/>
|
|
4
14
|
<div class="expand-textarea-content">
|
|
5
15
|
<h1 class="expand-textarea-title" v-text="textareaSettings.title"></h1>
|
|
6
|
-
<textarea
|
|
16
|
+
<textarea
|
|
7
17
|
:ref="identifier"
|
|
8
|
-
:placeholder="textareaSettings.placeholderMessage"
|
|
18
|
+
:placeholder="textareaSettings.placeholderMessage"
|
|
9
19
|
v-model="message"
|
|
10
20
|
@input="sendFinalMessage"
|
|
11
21
|
@paste="pasteImage"
|
|
12
22
|
>
|
|
13
23
|
</textarea>
|
|
14
24
|
<div class="expand-textarea-footer">
|
|
15
|
-
<BtnEmojis
|
|
25
|
+
<BtnEmojis
|
|
16
26
|
v-show="buttons.hasEmojis"
|
|
17
27
|
:ref="`${identifier}-emojis`"
|
|
18
28
|
:emojiId="`${identifier}-em`"
|
|
19
29
|
:left="false"
|
|
20
30
|
@insert-emoji="insertEmoji"
|
|
21
31
|
/>
|
|
22
|
-
<BtnFiles
|
|
32
|
+
<BtnFiles
|
|
23
33
|
v-if="buttons.hasFiles"
|
|
24
|
-
:textId="identifier"
|
|
25
|
-
:dictionary="dictionary"
|
|
34
|
+
:textId="identifier"
|
|
35
|
+
:dictionary="dictionary"
|
|
26
36
|
:fileSettings="fileSettings"
|
|
27
37
|
:ref="`${identifier}-file`"
|
|
28
38
|
@set-file-vars="setFileVars"
|
|
@@ -37,42 +47,48 @@
|
|
|
37
47
|
</template>
|
|
38
48
|
|
|
39
49
|
<script>
|
|
40
|
-
import { mixin as clickaway } from "vue-clickaway"
|
|
41
|
-
import BtnEmojis from "./BtnEmojis"
|
|
42
|
-
import BtnFiles from "./BtnFiles"
|
|
43
|
-
import { returnMessageWithHexa } from "../../services/textFormatting"
|
|
50
|
+
import { mixin as clickaway } from "vue-clickaway";
|
|
51
|
+
import BtnEmojis from "./BtnEmojis";
|
|
52
|
+
import BtnFiles from "./BtnFiles";
|
|
53
|
+
import { returnMessageWithHexa } from "../../services/textFormatting";
|
|
44
54
|
|
|
45
55
|
export default {
|
|
46
56
|
components: { BtnEmojis, BtnFiles },
|
|
47
|
-
mixins: [
|
|
57
|
+
mixins: [clickaway],
|
|
48
58
|
props: {
|
|
49
59
|
identifier: {
|
|
50
60
|
type: String,
|
|
51
|
-
required: true
|
|
61
|
+
required: true,
|
|
52
62
|
},
|
|
53
63
|
dictionary: {
|
|
54
64
|
type: Object,
|
|
55
|
-
required: true
|
|
65
|
+
required: true,
|
|
56
66
|
},
|
|
57
67
|
envioEmAndamento: {
|
|
58
68
|
type: Boolean,
|
|
59
|
-
required: false
|
|
69
|
+
required: false,
|
|
60
70
|
},
|
|
61
71
|
buttons: {
|
|
62
72
|
type: Object,
|
|
63
|
-
default: () => {
|
|
64
|
-
|
|
73
|
+
default: () => {
|
|
74
|
+
return { hasEmojis: false, hasSendButton: true, hasFiles: true };
|
|
75
|
+
},
|
|
76
|
+
required: false,
|
|
65
77
|
},
|
|
66
78
|
fileSettings: {
|
|
67
79
|
type: Object,
|
|
68
|
-
default: () => {
|
|
69
|
-
|
|
80
|
+
default: () => {
|
|
81
|
+
return { docsExtensions: "", imagesExtensions: "", multiple: false };
|
|
82
|
+
},
|
|
83
|
+
required: false,
|
|
70
84
|
},
|
|
71
85
|
textareaSettings: {
|
|
72
86
|
type: Object,
|
|
73
|
-
default: () => {
|
|
74
|
-
|
|
75
|
-
|
|
87
|
+
default: () => {
|
|
88
|
+
return { placeholderMessage: "", title: "Nova mensagem" };
|
|
89
|
+
},
|
|
90
|
+
required: false,
|
|
91
|
+
},
|
|
76
92
|
},
|
|
77
93
|
data() {
|
|
78
94
|
return {
|
|
@@ -81,331 +97,342 @@ export default {
|
|
|
81
97
|
hasAnyFile: false,
|
|
82
98
|
imagePreview: "",
|
|
83
99
|
isDoc: false,
|
|
84
|
-
fileFormatError: false
|
|
85
|
-
}
|
|
100
|
+
fileFormatError: false,
|
|
101
|
+
};
|
|
86
102
|
},
|
|
87
103
|
methods: {
|
|
88
104
|
away() {
|
|
89
|
-
if(this.$refs[`${this.identifier}-file`])
|
|
105
|
+
if (this.$refs[`${this.identifier}-file`])
|
|
106
|
+
this.$refs[`${this.identifier}-file`].openFiles = false;
|
|
90
107
|
},
|
|
91
108
|
removeHTMLElementsFromMessage(message) {
|
|
92
|
-
const regexTags = /<\/?[\d\w\s=\-:./'";]+>/gi
|
|
93
|
-
if(message.match(regexTags)) message = message.replace(regexTags,
|
|
94
|
-
return message
|
|
109
|
+
const regexTags = /<\/?[\d\w\s=\-:./'";]+>/gi;
|
|
110
|
+
if (message.match(regexTags)) message = message.replace(regexTags, " ");
|
|
111
|
+
return message;
|
|
95
112
|
},
|
|
96
113
|
formatMessage(message) {
|
|
97
|
-
if(!message) return ""
|
|
98
|
-
message = message.trim()
|
|
99
|
-
message = message.replace(/\n$/, "", message)
|
|
100
|
-
message = returnMessageWithHexa(message)
|
|
101
|
-
message = this.removeHTMLElementsFromMessage(message)
|
|
102
|
-
return message
|
|
114
|
+
if (!message) return "";
|
|
115
|
+
message = message.trim();
|
|
116
|
+
message = message.replace(/\n$/, "", message);
|
|
117
|
+
message = returnMessageWithHexa(message);
|
|
118
|
+
message = this.removeHTMLElementsFromMessage(message);
|
|
119
|
+
return message;
|
|
103
120
|
},
|
|
104
121
|
sendFinalMessage() {
|
|
105
|
-
const messageAux = this.formatMessage(this.message)
|
|
106
|
-
this.$emit("final-message", messageAux)
|
|
107
|
-
},
|
|
122
|
+
const messageAux = this.formatMessage(this.message);
|
|
123
|
+
this.$emit("final-message", messageAux);
|
|
124
|
+
},
|
|
108
125
|
emitirEnvio() {
|
|
109
|
-
if(this.envioEmAndamento) return
|
|
110
|
-
if(!this.buttons.hasSendButton) return
|
|
126
|
+
if (this.envioEmAndamento) return;
|
|
127
|
+
if (!this.buttons.hasSendButton) return;
|
|
111
128
|
try {
|
|
112
|
-
if(this.verifyMessage()) {
|
|
113
|
-
const messageAux = this.formatMessage(this.message)
|
|
114
|
-
if(messageAux || this.hasAnyFile) {
|
|
115
|
-
const objMessage = this.returnObjectMessage(messageAux)
|
|
116
|
-
this.$emit("send-message", messageAux)
|
|
117
|
-
this.$emit("obj-message", objMessage)
|
|
118
|
-
|
|
129
|
+
if (this.verifyMessage()) {
|
|
130
|
+
const messageAux = this.formatMessage(this.message);
|
|
131
|
+
if (messageAux || this.hasAnyFile) {
|
|
132
|
+
const objMessage = this.returnObjectMessage(messageAux);
|
|
133
|
+
this.$emit("send-message", messageAux);
|
|
134
|
+
this.$emit("obj-message", objMessage);
|
|
135
|
+
|
|
119
136
|
// this.reset() // Deve ser chamada de fora do plugin
|
|
120
137
|
}
|
|
121
138
|
}
|
|
122
|
-
}catch(e) {
|
|
123
|
-
console.error("Erro ao emitir envio da mensagem")
|
|
124
|
-
console.error(e)
|
|
139
|
+
} catch (e) {
|
|
140
|
+
console.error("Erro ao emitir envio da mensagem");
|
|
141
|
+
console.error(e);
|
|
125
142
|
}
|
|
126
143
|
},
|
|
127
144
|
verifyMessage() {
|
|
128
|
-
if((!this.message || !this.message.trim()) && !this.hasAnyFile) return false
|
|
145
|
+
if ((!this.message || !this.message.trim()) && !this.hasAnyFile) return false;
|
|
129
146
|
|
|
130
|
-
if(this.fileFormatError) {
|
|
131
|
-
if (!document.querySelector(".toasted.toasted-primary.error"))
|
|
147
|
+
if (this.fileFormatError) {
|
|
148
|
+
if (!document.querySelector(".toasted.toasted-primary.error"))
|
|
149
|
+
this.$toasted.global.defaultError({
|
|
150
|
+
msg: this.dictionary.msg_formato_invalido,
|
|
151
|
+
});
|
|
132
152
|
const str = {
|
|
133
153
|
img: this.fileSettings.imagesExtensions.split("|").join(", "),
|
|
134
|
-
doc: this.fileSettings.docsExtensions.split("|").join(", ")
|
|
135
|
-
}
|
|
136
|
-
if (!document.querySelector(".toasted.toasted-primary.info"))
|
|
137
|
-
|
|
154
|
+
doc: this.fileSettings.docsExtensions.split("|").join(", "),
|
|
155
|
+
};
|
|
156
|
+
if (!document.querySelector(".toasted.toasted-primary.info"))
|
|
157
|
+
this.$toasted.global.showValidFormats({
|
|
158
|
+
msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
|
|
159
|
+
});
|
|
160
|
+
return false;
|
|
138
161
|
}
|
|
139
162
|
|
|
140
|
-
return true
|
|
163
|
+
return true;
|
|
141
164
|
},
|
|
142
165
|
returnObjectMessage(message) {
|
|
143
166
|
return {
|
|
144
167
|
message,
|
|
145
|
-
attachment: this.hasAnyFile ? this.file
|
|
168
|
+
attachment: this.hasAnyFile ? this.file : false,
|
|
146
169
|
isDoc: this.isDoc,
|
|
147
|
-
imagePreview: this.imagePreview
|
|
148
|
-
}
|
|
170
|
+
imagePreview: this.imagePreview,
|
|
171
|
+
};
|
|
149
172
|
},
|
|
150
173
|
reset() {
|
|
151
|
-
if
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
174
|
+
if (
|
|
175
|
+
this.buttons.hasEmojis &&
|
|
176
|
+
this.$refs[`emoji-text-${this.identifier}-emoji`].showEmojis
|
|
177
|
+
)
|
|
178
|
+
this.$refs[`emoji-text-${this.identifier}-emoji`].toggleEmojiSelection();
|
|
179
|
+
if (this.hasAnyFile) this.$refs[`${this.identifier}-file`].deleteFile();
|
|
180
|
+
this.message = "";
|
|
181
|
+
this.sendFinalMessage();
|
|
182
|
+
this.focusTextarea();
|
|
156
183
|
},
|
|
157
184
|
dropFile(e) {
|
|
158
185
|
try {
|
|
159
|
-
e.stopPropagation()
|
|
160
|
-
e.preventDefault()
|
|
161
|
-
const files = e.dataTransfer.files.length ? e.dataTransfer.files : ""
|
|
162
|
-
this.filesHandler(files)
|
|
163
|
-
}catch(e) {
|
|
164
|
-
console.error("Erro drop file")
|
|
165
|
-
console.error(e)
|
|
186
|
+
e.stopPropagation();
|
|
187
|
+
e.preventDefault();
|
|
188
|
+
const files = e.dataTransfer.files.length ? e.dataTransfer.files : "";
|
|
189
|
+
this.filesHandler(files);
|
|
190
|
+
} catch (e) {
|
|
191
|
+
console.error("Erro drop file");
|
|
192
|
+
console.error(e);
|
|
166
193
|
}
|
|
167
194
|
},
|
|
168
195
|
returnFileType(file, stopAlert) {
|
|
169
|
-
const imgRegex = new RegExp("\.("+this.fileSettings.imagesExtensions+")", "i")
|
|
170
|
-
if(imgRegex.test(file.name)) return "img"
|
|
196
|
+
const imgRegex = new RegExp("\.(" + this.fileSettings.imagesExtensions + ")", "i");
|
|
197
|
+
if (imgRegex.test(file.name)) return "img";
|
|
171
198
|
|
|
172
|
-
const docRegex = new RegExp("\.("+this.fileSettings.docsExtensions+")", "i")
|
|
173
|
-
if(docRegex.test(file.name)) return "doc"
|
|
199
|
+
const docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
|
|
200
|
+
if (docRegex.test(file.name)) return "doc";
|
|
174
201
|
|
|
175
|
-
if(!stopAlert) return
|
|
176
|
-
if (!document.querySelector(".toasted.toasted-primary.error"))
|
|
202
|
+
if (!stopAlert) return;
|
|
203
|
+
if (!document.querySelector(".toasted.toasted-primary.error"))
|
|
204
|
+
this.$toasted.global.defaultError({ msg: this.dictionary.msg_formato_invalido });
|
|
177
205
|
const str = {
|
|
178
206
|
img: this.fileSettings.imagesExtensions.split("|").join(", "),
|
|
179
|
-
doc: this.fileSettings.docsExtensions.split("|").join(", ")
|
|
180
|
-
}
|
|
181
|
-
if (!document.querySelector(".toasted.toasted-primary.info"))
|
|
182
|
-
|
|
207
|
+
doc: this.fileSettings.docsExtensions.split("|").join(", "),
|
|
208
|
+
};
|
|
209
|
+
if (!document.querySelector(".toasted.toasted-primary.info"))
|
|
210
|
+
this.$toasted.global.showValidFormats({
|
|
211
|
+
msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
|
|
212
|
+
});
|
|
213
|
+
return false;
|
|
183
214
|
},
|
|
184
215
|
filesHandler(files) {
|
|
185
|
-
if(!Array.isArray(files)) files = Array.from(files)
|
|
186
|
-
const fileType = this.returnFileType(files[0], true)
|
|
187
|
-
let invalidFile = false
|
|
216
|
+
if (!Array.isArray(files)) files = Array.from(files);
|
|
217
|
+
const fileType = this.returnFileType(files[0], true);
|
|
218
|
+
let invalidFile = false;
|
|
188
219
|
try {
|
|
189
|
-
files.forEach(file => {
|
|
190
|
-
const singleFileType = this.returnFileType(file, true)
|
|
191
|
-
if(!singleFileType) {
|
|
192
|
-
invalidFile = true
|
|
193
|
-
file.invalid = true
|
|
220
|
+
files.forEach((file) => {
|
|
221
|
+
const singleFileType = this.returnFileType(file, true);
|
|
222
|
+
if (!singleFileType) {
|
|
223
|
+
invalidFile = true;
|
|
224
|
+
file.invalid = true;
|
|
194
225
|
}
|
|
195
|
-
file.imgOrDoc = singleFileType ? singleFileType : ""
|
|
196
|
-
})
|
|
197
|
-
}catch(e) {
|
|
198
|
-
console.error("Erro ao tentar percorrer os arquivos")
|
|
199
|
-
console.error(e)
|
|
200
|
-
invalidFile = true
|
|
226
|
+
file.imgOrDoc = singleFileType ? singleFileType : "";
|
|
227
|
+
});
|
|
228
|
+
} catch (e) {
|
|
229
|
+
console.error("Erro ao tentar percorrer os arquivos");
|
|
230
|
+
console.error(e);
|
|
231
|
+
invalidFile = true;
|
|
201
232
|
}
|
|
202
233
|
|
|
203
|
-
if(!invalidFile) {
|
|
204
|
-
this.$refs[`${this.identifier}-file`].fileUpload(files, fileType, true)
|
|
205
|
-
}else {
|
|
206
|
-
if (!document.querySelector(".toasted.toasted-primary.error"))
|
|
234
|
+
if (!invalidFile) {
|
|
235
|
+
this.$refs[`${this.identifier}-file`].fileUpload(files, fileType, true);
|
|
236
|
+
} else {
|
|
237
|
+
if (!document.querySelector(".toasted.toasted-primary.error"))
|
|
238
|
+
this.$toasted.global.defaultError({
|
|
239
|
+
msg: this.dictionary.msg_formato_invalido,
|
|
240
|
+
});
|
|
207
241
|
const str = {
|
|
208
242
|
img: this.fileSettings.imagesExtensions.split("|").join(", "),
|
|
209
|
-
doc: this.fileSettings.docsExtensions.split("|").join(", ")
|
|
210
|
-
}
|
|
211
|
-
if (!document.querySelector(".toasted.toasted-primary.info"))
|
|
243
|
+
doc: this.fileSettings.docsExtensions.split("|").join(", "),
|
|
244
|
+
};
|
|
245
|
+
if (!document.querySelector(".toasted.toasted-primary.info"))
|
|
246
|
+
this.$toasted.global.showValidFormats({
|
|
247
|
+
msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`,
|
|
248
|
+
});
|
|
212
249
|
}
|
|
213
250
|
},
|
|
214
251
|
focusTextarea() {
|
|
215
|
-
this.$refs[`${this.identifier}`].focus()
|
|
252
|
+
this.$refs[`${this.identifier}`].focus();
|
|
216
253
|
},
|
|
217
254
|
setFileVars(fileObj) {
|
|
218
255
|
const { file, imagePreview, isDoc, fileFormatError, hasAnyFile } = fileObj;
|
|
219
256
|
|
|
220
|
-
this.file = file
|
|
221
|
-
this.imagePreview = imagePreview ? imagePreview : ""
|
|
222
|
-
this.isDoc = isDoc
|
|
223
|
-
this.fileFormatError = fileFormatError
|
|
224
|
-
this.hasAnyFile = hasAnyFile
|
|
257
|
+
this.file = file;
|
|
258
|
+
this.imagePreview = imagePreview ? imagePreview : "";
|
|
259
|
+
this.isDoc = isDoc;
|
|
260
|
+
this.fileFormatError = fileFormatError;
|
|
261
|
+
this.hasAnyFile = hasAnyFile;
|
|
225
262
|
|
|
226
|
-
this.$emit("set-file-vars", fileObj)
|
|
263
|
+
this.$emit("set-file-vars", fileObj);
|
|
227
264
|
},
|
|
228
265
|
openImage(imagePreview) {
|
|
229
|
-
this.$emit("open-image", imagePreview)
|
|
266
|
+
this.$emit("open-image", imagePreview);
|
|
230
267
|
},
|
|
231
268
|
pasteImage(e) {
|
|
232
269
|
try {
|
|
233
|
-
if(e.clipboardData.files.length && !this.buttons.hasFiles) {
|
|
234
|
-
e.preventDefault()
|
|
235
|
-
return
|
|
236
|
-
}else if(e.clipboardData.files.length && this.buttons.hasFiles) {
|
|
237
|
-
const files = e.clipboardData.files
|
|
238
|
-
this.filesHandler(files)
|
|
270
|
+
if (e.clipboardData.files.length && !this.buttons.hasFiles) {
|
|
271
|
+
e.preventDefault();
|
|
272
|
+
return;
|
|
273
|
+
} else if (e.clipboardData.files.length && this.buttons.hasFiles) {
|
|
274
|
+
const files = e.clipboardData.files;
|
|
275
|
+
this.filesHandler(files);
|
|
239
276
|
}
|
|
240
|
-
}catch(e) {
|
|
241
|
-
console.error("Nao foi possivel colar a/o imagem/documento")
|
|
242
|
-
console.error(e)
|
|
277
|
+
} catch (e) {
|
|
278
|
+
console.error("Nao foi possivel colar a/o imagem/documento");
|
|
279
|
+
console.error(e);
|
|
243
280
|
}
|
|
244
281
|
},
|
|
245
282
|
insertEmoji(emoji) {
|
|
246
283
|
try {
|
|
247
|
-
if(!emoji) return
|
|
248
|
-
const textarea = this.$refs[`${this.identifier}`]
|
|
284
|
+
if (!emoji) return;
|
|
285
|
+
const textarea = this.$refs[`${this.identifier}`];
|
|
249
286
|
if (document.activeElement === textarea) {
|
|
250
|
-
const cursorStart = textarea.selectionStart
|
|
251
|
-
const cursorEnd = textarea.selectionEnd
|
|
287
|
+
const cursorStart = textarea.selectionStart;
|
|
288
|
+
const cursorEnd = textarea.selectionEnd;
|
|
252
289
|
if (cursorEnd == textarea.value.length) {
|
|
253
|
-
this.message += emoji.finalEmoji
|
|
290
|
+
this.message += emoji.finalEmoji;
|
|
254
291
|
textarea.setSelectionRange(textarea.value.length, textarea.value.length);
|
|
255
292
|
} else {
|
|
256
293
|
const initValue = textarea.value.slice(0, cursorStart) + emoji.finalEmoji;
|
|
257
|
-
const endValue = textarea.value.slice(cursorEnd)
|
|
258
|
-
this.message = initValue + endValue
|
|
294
|
+
const endValue = textarea.value.slice(cursorEnd);
|
|
295
|
+
this.message = initValue + endValue;
|
|
259
296
|
textarea.setSelectionRange(initValue.length, initValue.length);
|
|
260
297
|
}
|
|
261
298
|
} else {
|
|
262
|
-
this.message += emoji.finalEmoji
|
|
299
|
+
this.message += emoji.finalEmoji;
|
|
263
300
|
}
|
|
264
|
-
this.sendFinalMessage()
|
|
265
|
-
}catch(e) {
|
|
266
|
-
console.error("Erro ao inserir emoji")
|
|
267
|
-
console.error(e)
|
|
301
|
+
this.sendFinalMessage();
|
|
302
|
+
} catch (e) {
|
|
303
|
+
console.error("Erro ao inserir emoji");
|
|
304
|
+
console.error(e);
|
|
268
305
|
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
};
|
|
272
309
|
</script>
|
|
273
310
|
|
|
274
|
-
<style>
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
.sc-icone-fechar.sc-icone-fechar--interno {
|
|
291
|
-
top: 10px;
|
|
292
|
-
right: 10px;
|
|
293
|
-
}
|
|
311
|
+
<style scoped>
|
|
312
|
+
.sc-icone-fechar.sc-icone-fechar--externo {
|
|
313
|
+
top: -10px;
|
|
314
|
+
right: -10px;
|
|
315
|
+
}
|
|
316
|
+
.sc-icone-fechar.sc-icone-fechar--interno {
|
|
317
|
+
top: 10px;
|
|
318
|
+
right: 10px;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.expand-textarea {
|
|
322
|
+
position: relative;
|
|
323
|
+
width: 90%;
|
|
324
|
+
height: 90%;
|
|
325
|
+
z-index: 1;
|
|
326
|
+
}
|
|
294
327
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
328
|
+
.expand-textarea-content {
|
|
329
|
+
overflow-x: hidden;
|
|
330
|
+
overflow-y: auto;
|
|
331
|
+
background-color: #fff;
|
|
332
|
+
width: 100%;
|
|
333
|
+
height: 100%;
|
|
334
|
+
display: flex;
|
|
335
|
+
flex-direction: column;
|
|
336
|
+
}
|
|
337
|
+
.expand-textarea-title {
|
|
338
|
+
padding: 2.5px 8px;
|
|
339
|
+
min-height: 38px;
|
|
340
|
+
display: flex;
|
|
341
|
+
align-items: center;
|
|
342
|
+
width: 100%;
|
|
343
|
+
font-size: 20.8px;
|
|
344
|
+
background-color: #222;
|
|
345
|
+
color: #fff;
|
|
346
|
+
}
|
|
347
|
+
.expand-textarea-content textarea {
|
|
348
|
+
padding: 10px;
|
|
349
|
+
flex: 1;
|
|
350
|
+
width: 100%;
|
|
351
|
+
border: unset;
|
|
352
|
+
resize: none;
|
|
353
|
+
outline: none;
|
|
354
|
+
overflow-x: hidden;
|
|
355
|
+
}
|
|
356
|
+
.expand-textarea-content textarea:hover,
|
|
357
|
+
.expand-textarea-content textarea:active {
|
|
358
|
+
outline: none;
|
|
359
|
+
}
|
|
360
|
+
.expand-textarea-footer {
|
|
361
|
+
display: flex;
|
|
362
|
+
justify-content: flex-end;
|
|
363
|
+
align-items: center;
|
|
364
|
+
padding: 10px;
|
|
365
|
+
background-color: #f7f7f7;
|
|
366
|
+
position: relative;
|
|
367
|
+
}
|
|
368
|
+
.expand-textarea-footer .text-footer-preview-container {
|
|
369
|
+
position: absolute;
|
|
370
|
+
top: -200px;
|
|
371
|
+
right: 145px;
|
|
372
|
+
height: 200px;
|
|
373
|
+
background: #f7f7f7;
|
|
374
|
+
}
|
|
375
|
+
.expand-textarea-footer .text-footer-actions--btn {
|
|
376
|
+
width: 36px;
|
|
377
|
+
height: 36px;
|
|
378
|
+
border-radius: 50%;
|
|
379
|
+
background-color: rgba(255, 255, 255, 0);
|
|
380
|
+
color: #333;
|
|
381
|
+
padding: 2.5px;
|
|
382
|
+
margin: 0 15px 0 10px;
|
|
383
|
+
display: flex;
|
|
384
|
+
justify-content: center;
|
|
385
|
+
align-items: center;
|
|
386
|
+
font-size: 20.8px;
|
|
387
|
+
cursor: pointer;
|
|
388
|
+
opacity: 0.9;
|
|
389
|
+
transition: all 300ms;
|
|
390
|
+
}
|
|
391
|
+
.expand-textarea-footer .text-footer-actions--btn:hover {
|
|
392
|
+
opacity: 1;
|
|
393
|
+
background-color: rgba(30, 30, 30, 0.1);
|
|
394
|
+
}
|
|
301
395
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
display: flex;
|
|
309
|
-
flex-direction: column;
|
|
310
|
-
}
|
|
311
|
-
.expand-textarea-title {
|
|
312
|
-
padding: 2.5px 8px;
|
|
313
|
-
min-height: 38px;
|
|
314
|
-
display: flex;
|
|
315
|
-
align-items: center;
|
|
316
|
-
width: 100%;
|
|
317
|
-
font-size: 20.8px;
|
|
318
|
-
background-color: #222;
|
|
319
|
-
color: #FFF;
|
|
320
|
-
}
|
|
321
|
-
.expand-textarea-content textarea{
|
|
322
|
-
padding: 10px;
|
|
323
|
-
flex: 1;
|
|
324
|
-
width: 100%;
|
|
325
|
-
border: unset;
|
|
326
|
-
resize: none;
|
|
327
|
-
outline: none;
|
|
328
|
-
overflow-x: hidden;
|
|
329
|
-
}
|
|
330
|
-
.expand-textarea-content textarea:hover, .expand-textarea-content textarea:active {
|
|
331
|
-
outline: none;
|
|
332
|
-
}
|
|
333
|
-
.expand-textarea-footer {
|
|
334
|
-
display: flex;
|
|
335
|
-
justify-content: flex-end;
|
|
336
|
-
align-items: center;
|
|
337
|
-
padding: 10px;
|
|
338
|
-
background-color: #F7F7F7;
|
|
339
|
-
position: relative;
|
|
340
|
-
}
|
|
341
|
-
.expand-textarea-footer .text-footer-preview-container {
|
|
342
|
-
position: absolute;
|
|
343
|
-
top: -200px;
|
|
344
|
-
right: 145px;
|
|
345
|
-
height: 200px;
|
|
346
|
-
background: #F7F7F7;
|
|
347
|
-
}
|
|
348
|
-
.expand-textarea-footer .text-footer-actions--btn {
|
|
349
|
-
width: 36px;
|
|
350
|
-
height: 36px;
|
|
351
|
-
border-radius: 50%;
|
|
352
|
-
background-color: rgba(255, 255, 255, 0);
|
|
353
|
-
color: #333;
|
|
354
|
-
padding: 2.5px;
|
|
355
|
-
margin: 0 15px 0 10px;
|
|
356
|
-
display: flex;
|
|
357
|
-
justify-content: center;
|
|
358
|
-
align-items: center;
|
|
359
|
-
font-size: 20.8px;
|
|
360
|
-
cursor: pointer;
|
|
361
|
-
opacity: .9;
|
|
362
|
-
transition: all 300ms;
|
|
363
|
-
}
|
|
364
|
-
.expand-textarea-footer .text-footer-actions--btn:hover {
|
|
365
|
-
opacity: 1;
|
|
366
|
-
background-color: rgba(30, 30, 30, .1);
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.expand-textarea-button {
|
|
370
|
-
width: 125px;
|
|
371
|
-
height: 30px;
|
|
372
|
-
display: flex;
|
|
373
|
-
justify-content: center;
|
|
374
|
-
align-items: center;
|
|
396
|
+
.expand-textarea-button {
|
|
397
|
+
width: 125px;
|
|
398
|
+
height: 30px;
|
|
399
|
+
display: flex;
|
|
400
|
+
justify-content: center;
|
|
401
|
+
align-items: center;
|
|
375
402
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
403
|
+
transition-duration: 300ms;
|
|
404
|
+
user-select: none;
|
|
405
|
+
cursor: pointer;
|
|
406
|
+
box-shadow: inset 0 -2px rgba(0, 0, 0, 0.2);
|
|
407
|
+
opacity: 0.9;
|
|
408
|
+
border-radius: 5px;
|
|
382
409
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
</style>
|
|
410
|
+
padding: 5px 10px;
|
|
411
|
+
border-radius: 2.5px;
|
|
412
|
+
position: relative;
|
|
413
|
+
}
|
|
414
|
+
.expand-textarea-button.green {
|
|
415
|
+
background-color: #2a963a;
|
|
416
|
+
color: #fff;
|
|
417
|
+
margin-right: 10px;
|
|
418
|
+
}
|
|
419
|
+
.expand-textarea-button.red {
|
|
420
|
+
background-color: #e74c3c;
|
|
421
|
+
color: #fff;
|
|
422
|
+
}
|
|
423
|
+
.expand-textarea-button:hover {
|
|
424
|
+
opacity: 1;
|
|
425
|
+
}
|
|
426
|
+
.expand-textarea-button:active {
|
|
427
|
+
opacity: 1;
|
|
428
|
+
box-shadow: inset 0 -1px rgba(0, 0, 0, 0.2);
|
|
429
|
+
-webkit-transform: translateY(1px);
|
|
430
|
+
-moz-transform: translateY(1px);
|
|
431
|
+
-o-transform: translateY(1px);
|
|
432
|
+
-ms-transform: translateY(1px);
|
|
433
|
+
transform: translateY(1px);
|
|
434
|
+
}
|
|
435
|
+
.expand-textarea-button.carregando {
|
|
436
|
+
background-color: #777;
|
|
437
|
+
}
|
|
438
|
+
</style>
|