@mobilon-dev/chotto 0.3.96 → 0.3.98
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/chotto.css +1 -1
- package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js +29 -4
- package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +42 -61
- package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue.js +47 -4
- package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +55 -82
- package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +86 -51
- package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue.js +32 -4
- package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue2.js +7 -28
- package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +22 -38
- package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +33 -2
- package/dist/components/1_atoms/LinkPreview/LinkPreview.vue.js +37 -4
- package/dist/components/1_atoms/LinkPreview/LinkPreview.vue2.js +7 -21
- package/dist/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.js +30 -19
- package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +70 -4
- package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +76 -108
- package/dist/components/1_icons/AvatarIcon.vue.js +8 -8
- package/dist/components/1_icons/CheckIcon.vue.js +26 -13
- package/dist/components/1_icons/CloseButtonIcon.vue.js +16 -10
- package/dist/components/1_icons/CloseIcon.vue.js +16 -10
- package/dist/components/1_icons/ContactCRMIcon.vue.js +16 -10
- package/dist/components/1_icons/MenuIcon.vue.js +16 -10
- package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue.js +23 -3
- package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue2.js +12 -21
- package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue.js +36 -4
- package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue2.js +11 -26
- package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue.js +23 -3
- package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue2.js +12 -21
- package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js +23 -3
- package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue2.js +11 -20
- package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue.js +33 -4
- package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue2.js +11 -23
- package/dist/components/1_icons/SearchIcon.vue.js +29 -17
- package/dist/components/1_icons/SettingsIcon.vue.js +8 -8
- package/dist/components/1_icons/TelegramIcon.vue.js +32 -20
- package/dist/components/1_icons/WhatsAppIcon.vue.js +32 -20
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +546 -396
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.js +101 -58
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +14 -8
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.vue.js +7 -7
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelMaxIcon.vue.js +7 -7
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelPhoneIcon.vue.js +19 -13
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSMSIcon.vue.js +16 -10
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuMaxIcon.vue.js +35 -23
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuPhoneIcon.vue.js +32 -20
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuSMSIcon.vue.js +17 -11
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuTelegramIcon.vue.js +8 -8
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js +32 -20
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelTelegramIcon.vue.js +33 -21
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelUnconfirmedIcon.vue.js +7 -7
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelWhatsAppIcon.vue.js +8 -8
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +74 -4
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +8 -42
- package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js +62 -4
- package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue2.js +15 -36
- package/dist/components/2_blocks/FeedSearch/FeedSearch.vue.js +49 -4
- package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +22 -45
- package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue.js +36 -4
- package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +19 -37
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +61 -4
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +79 -96
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +31 -27
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue2.js +13 -2
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +72 -4
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +47 -83
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +19 -21
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue2.js +13 -2
- package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +80 -51
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +182 -4
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +25 -135
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +78 -4
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +73 -95
- package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +15 -17
- package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue2.js +13 -2
- package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js +39 -33
- package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +220 -4
- package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +146 -256
- package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue.js +39 -41
- package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue2.js +13 -2
- package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +233 -163
- package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js +164 -4
- package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +87 -175
- package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js +73 -4
- package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +34 -60
- package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js +47 -4
- package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js +10 -23
- package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js +52 -4
- package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue2.js +8 -26
- package/dist/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js +299 -220
- package/dist/components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js +39 -33
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +306 -4
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +134 -311
- package/dist/components/2_chatlist_elements/ChatItem/icons/AudioIcon.vue.js +18 -12
- package/dist/components/2_chatlist_elements/ChatItem/icons/FileIcon.vue.js +23 -11
- package/dist/components/2_chatlist_elements/ChatItem/icons/ImageIcon.vue.js +7 -7
- package/dist/components/2_chatlist_elements/ChatItem/icons/MissedCallIcon.vue.js +34 -22
- package/dist/components/2_chatlist_elements/ChatItem/icons/StickerIcon.vue.js +15 -9
- package/dist/components/2_chatlist_elements/ChatItem/icons/VideoIcon.vue.js +26 -14
- package/dist/components/2_chatlist_elements/ChatItem/icons/VoiceIcon.vue.js +7 -7
- package/dist/components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js +52 -24
- package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +84 -4
- package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +35 -67
- package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +72 -38
- package/dist/components/2_elements/ChatInfo/ChatInfo.vue.js +76 -57
- package/dist/components/2_elements/ChatPanel/ChatPanel.vue.js +41 -29
- package/dist/components/2_elements/ContactInfo/ContactInfo.vue.js +176 -115
- package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +48 -27
- package/dist/components/2_elements/UserProfile/UserProfile.vue.js +58 -28
- package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +54 -4
- package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +19 -39
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +458 -4
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +160 -471
- package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js +19 -4
- package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue2.js +12 -22
- package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +26 -4
- package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +26 -39
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +482 -4
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +148 -448
- package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue.js +17 -19
- package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue2.js +13 -2
- package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue.js +17 -19
- package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue2.js +13 -2
- package/dist/components/2_feed_elements/DateMessage/DateMessage.vue.js +17 -4
- package/dist/components/2_feed_elements/DateMessage/DateMessage.vue2.js +7 -7
- package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js +16 -3
- package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue2.js +7 -7
- package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +67 -4
- package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +11 -43
- package/dist/components/2_feed_elements/DeletedMessageContent/icons/DeletedMessageIcon.vue.js +16 -10
- package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js +60 -4
- package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue2.js +36 -53
- package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js +22 -4
- package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue2.js +8 -15
- package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js +43 -4
- package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue2.js +10 -25
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +250 -4
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +67 -233
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +315 -4
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +98 -319
- package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js +39 -4
- package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +12 -22
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +155 -4
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +110 -212
- package/dist/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.js +32 -20
- package/dist/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.js +32 -20
- package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +17 -11
- package/dist/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.js +16 -10
- package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +17 -11
- package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue.js +22 -4
- package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue2.js +17 -23
- package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +28 -4
- package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +27 -29
- package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +142 -4
- package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +33 -121
- package/dist/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.js +34 -22
- package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +55 -4
- package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +8 -30
- package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +47 -4
- package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +9 -25
- package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +56 -4
- package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +8 -37
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +72 -4
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +10 -59
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +142 -4
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +36 -120
- package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +49 -4
- package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +15 -53
- package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +75 -4
- package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +10 -63
- package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue.js +18 -4
- package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue2.js +9 -17
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +346 -4
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +73 -307
- package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue.js +17 -4
- package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue2.js +7 -7
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +307 -4
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +65 -269
- package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue.js +37 -4
- package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue2.js +7 -21
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +307 -4
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +76 -298
- package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.js +64 -4
- package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue3.js +10 -45
- package/dist/components/2_modals/CreateChat/CreateChat.vue.js +35 -18
- package/dist/components/2_modals/CreateChat2/CreateChat2.vue.js +140 -92
- package/dist/components/2_modals/CreateDialog/CreateDialog.vue.js +96 -49
- package/dist/components/2_modals/Modal/Modal.vue.js +59 -50
- package/dist/components/2_modals/ModalFullscreen/ModalFullscreen.vue.js +51 -38
- package/dist/components/2_modals/ModalNoFooter/ModalNoFooter.vue.js +39 -30
- package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +155 -4
- package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js +49 -121
- package/dist/components/2_modals/SelectUser/SelectUser.vue.js +60 -43
- package/dist/components/2_modals/SelectUser2/SelectUser2.vue.js +41 -24
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +85 -4
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +149 -210
- package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue.js +25 -21
- package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue2.js +13 -2
- package/dist/components/3_compounds/ChatList/ChatList.vue.js +253 -163
- package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +50 -32
- package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +6 -6
- package/dist/components/3_compounds/Feed/Feed.vue.js +172 -4
- package/dist/components/3_compounds/Feed/Feed.vue2.js +126 -257
- package/dist/components/3_compounds/SideBar/SideBar.vue.js +279 -202
- package/dist/components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js +43 -36
- package/dist/components/4_layouts/BaseLayout/BaseLayout.vue.js +5 -5
- package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue.js +32 -4
- package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue2.js +7 -29
- package/dist/components/4_layouts/ExtendedLayout/ExtendedLayout.vue.js +7 -7
- package/dist/components/4_layouts/FeedLayout/FeedLayout.vue.js +8 -8
- package/dist/components/5_containers/BaseContainer/BaseContainer.vue.js +31 -18
- package/dist/components/5_containers/FloatContainer/FloatContainer.vue.js +85 -56
- package/package.json +1 -1
|
@@ -1,7 +1,88 @@
|
|
|
1
|
-
import
|
|
1
|
+
import h from "./ChatInput.vue2.js";
|
|
2
|
+
import { createElementBlock as o, openBlock as i, createElementVNode as t, createVNode as d, normalizeClass as l, createBlock as p, createCommentVNode as c, renderSlot as s, toDisplayString as u, withDirectives as m, withKeys as f, vModelText as v } from "vue";
|
|
2
3
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
4
|
+
import b from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const g = { class: "chat-input__container" }, M = ["id"], y = ["id"], I = { class: "chat-input__inline-buttons" }, S = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "chat-input__input chat-input__disabled-placeholder"
|
|
8
|
+
}, w = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "chat-input__input-wrap"
|
|
11
|
+
}, k = ["innerHTML"], C = ["disabled", "placeholder"], x = ["disabled"], P = { class: "" }, A = { class: "chat-input__third-line" };
|
|
12
|
+
function T(a, r, n, e, j, B) {
|
|
13
|
+
return i(), o("div", g, [
|
|
14
|
+
t("div", {
|
|
15
|
+
id: "chat-input-reply-line-" + e.chatAppId,
|
|
16
|
+
class: "chat-input__reply-line"
|
|
17
|
+
}, null, 8, M),
|
|
18
|
+
t("div", {
|
|
19
|
+
id: "chat-input-file-line-" + e.chatAppId,
|
|
20
|
+
class: l(["chat-input__file-line", { "chat-input__file-line--visible": !!e.filePreview }])
|
|
21
|
+
}, [
|
|
22
|
+
e.filePreview ? (i(), p(e.FilePreview, {
|
|
23
|
+
key: 0,
|
|
24
|
+
"file-info": e.filePreview,
|
|
25
|
+
onReset: e.resetSelectedFile
|
|
26
|
+
}, null, 8, ["file-info"])) : c("v-if", !0)
|
|
27
|
+
], 10, y),
|
|
28
|
+
t("div", I, [
|
|
29
|
+
s(a.$slots, "inline-buttons", {}, void 0, !0)
|
|
30
|
+
]),
|
|
31
|
+
n.disabledPlaceholder && (n.state == "disabled" || e.getMessage().isRecording) ? (i(), o(
|
|
32
|
+
"div",
|
|
33
|
+
S,
|
|
34
|
+
u(n.disabledPlaceholder),
|
|
35
|
+
1
|
|
36
|
+
/* TEXT */
|
|
37
|
+
)) : (i(), o("div", w, [
|
|
38
|
+
e.useEmojiMirror ? (i(), o("div", {
|
|
39
|
+
key: 0,
|
|
40
|
+
ref: "refMirror",
|
|
41
|
+
class: "chat-input__input-mirror",
|
|
42
|
+
"aria-hidden": "true",
|
|
43
|
+
innerHTML: e.emojiMirrorHtml
|
|
44
|
+
}, null, 8, k)) : c("v-if", !0),
|
|
45
|
+
m(t("textarea", {
|
|
46
|
+
ref: "refInput",
|
|
47
|
+
"onUpdate:modelValue": r[0] || (r[0] = (_) => e.getMessage().text = _),
|
|
48
|
+
rows: "1",
|
|
49
|
+
disabled: n.state == "disabled" || e.getMessage().isRecording,
|
|
50
|
+
class: l(["chat-input__input", { "chat-input__input--emoji-images": e.useEmojiMirror }]),
|
|
51
|
+
placeholder: e.inputPlaceholder,
|
|
52
|
+
onKeydown: [
|
|
53
|
+
e.onInputKeydown,
|
|
54
|
+
f(e.keyEnter, ["enter"])
|
|
55
|
+
],
|
|
56
|
+
onInput: e.sendTyping,
|
|
57
|
+
onScroll: e.syncMirrorScroll,
|
|
58
|
+
onSelect: e.updateSelectionState,
|
|
59
|
+
onMouseup: e.snapCaretAndUpdateSelection,
|
|
60
|
+
onKeyup: e.snapCaretAndUpdateSelection,
|
|
61
|
+
onMousemove: e.onInputMouseMove,
|
|
62
|
+
onBlur: e.clearSelectionHighlight
|
|
63
|
+
}, null, 42, C), [
|
|
64
|
+
[v, e.getMessage().text]
|
|
65
|
+
])
|
|
66
|
+
])),
|
|
67
|
+
d(e.TextFormatToolbar, {
|
|
68
|
+
textarea: e.refInput,
|
|
69
|
+
onFormatApplied: e.handleFormatApplied
|
|
70
|
+
}, null, 8, ["textarea"]),
|
|
71
|
+
t("button", {
|
|
72
|
+
class: l(["chat-input__button", { "chat-input__button-disabled": e.disabledSendButton }]),
|
|
73
|
+
disabled: e.getMessage().isRecording,
|
|
74
|
+
onClick: e.sendMessage
|
|
75
|
+
}, [
|
|
76
|
+
t("span", P, [
|
|
77
|
+
d(e.SendIcon, { color: e.sendIconColor }, null, 8, ["color"])
|
|
78
|
+
])
|
|
79
|
+
], 10, x),
|
|
80
|
+
t("div", A, [
|
|
81
|
+
s(a.$slots, "buttons", {}, void 0, !0)
|
|
82
|
+
])
|
|
83
|
+
]);
|
|
84
|
+
}
|
|
85
|
+
const R = /* @__PURE__ */ b(h, [["render", T], ["__scopeId", "data-v-c1d61267"], ["__file", "/var/store/dev-space/repos-projects/chotto/chotto/src/components/3_compounds/ChatInput/ChatInput.vue"]]);
|
|
5
86
|
export {
|
|
6
|
-
|
|
87
|
+
R as default
|
|
7
88
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useImmediateDebouncedRef as
|
|
3
|
-
import { useMessageDraft as
|
|
1
|
+
import { defineComponent as ye, inject as xe, watch as f, ref as F, computed as x, nextTick as S, unref as Se, onMounted as Ie, onUnmounted as Te } from "vue";
|
|
2
|
+
import { useImmediateDebouncedRef as we } from "../../../hooks/useImmediateDebouncedRef.js";
|
|
3
|
+
import { useMessageDraft as Ce, commitChatDraftToList as Ae } from "../../../hooks/useMessageDraft.js";
|
|
4
4
|
import "../../../hooks/useSearchModel.js";
|
|
5
5
|
import "../../../hooks/useTheme.js";
|
|
6
|
-
import { useEmojiNative as
|
|
6
|
+
import { useEmojiNative as Ee } from "../../../hooks/useEmojiNative.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { t as I } from "../../../locale/useLocale.js";
|
|
@@ -11,18 +11,12 @@ import { t as I } from "../../../locale/useLocale.js";
|
|
|
11
11
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
12
12
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
13
13
|
import "../../../functions/parseMarkdown.js";
|
|
14
|
-
import { textToAppleEmojiHtml as
|
|
15
|
-
import { hideEditPreview as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
const
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "chat-input__input chat-input__disabled-placeholder"
|
|
22
|
-
}, Ve = {
|
|
23
|
-
key: 1,
|
|
24
|
-
class: "chat-input__input-wrap"
|
|
25
|
-
}, $e = ["innerHTML"], Je = ["disabled", "placeholder"], Qe = ["disabled"], Xe = { class: "" }, Ze = { class: "chat-input__third-line" }, K = 40, xt = /* @__PURE__ */ be({
|
|
14
|
+
import { textToAppleEmojiHtml as Fe, textContainsEmoji as be, snapIndexToGrapheme as J, previousGraphemeIndex as Q, nextGraphemeIndex as V } from "../../../functions/renderAppleEmojis.js";
|
|
15
|
+
import { hideEditPreview as Me } from "../../../hooks/messages/useStartEdit.js";
|
|
16
|
+
import Re from "./icons/SendIcon.vue.js";
|
|
17
|
+
import He from "../../2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js";
|
|
18
|
+
import De from "../../2_chatinput_elements/FilePreview/FilePreview.vue.js";
|
|
19
|
+
const H = 40, Xe = /* @__PURE__ */ ye({
|
|
26
20
|
__name: "ChatInput",
|
|
27
21
|
props: {
|
|
28
22
|
state: {
|
|
@@ -51,251 +45,252 @@ const Ne = { class: "chat-input__container" }, Ge = ["id"], Oe = ["id"], Ue = {
|
|
|
51
45
|
}
|
|
52
46
|
},
|
|
53
47
|
emits: ["send", "typing"],
|
|
54
|
-
setup(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
setup(X, { expose: Z, emit: ee }) {
|
|
49
|
+
Z();
|
|
50
|
+
const b = ee, M = xe("chatAppId"), { resetMessage: _, getMessage: l, setMessageText: T, setForceSendMessage: q, resetEdit: j, resetMessageFile: z } = Ce(M), { isNative: k } = Ee(M);
|
|
51
|
+
let R = l().id;
|
|
52
|
+
f(
|
|
58
53
|
() => l().id,
|
|
59
54
|
(e) => {
|
|
60
|
-
|
|
55
|
+
R = e;
|
|
61
56
|
}
|
|
62
57
|
);
|
|
63
|
-
const n =
|
|
58
|
+
const n = F(), h = F(), d = F(null), v = F(!1), B = we("", 2e3), te = x(() => {
|
|
64
59
|
var e;
|
|
65
60
|
return (e = l().file) == null ? void 0 : e.preview;
|
|
66
|
-
}),
|
|
67
|
-
() =>
|
|
68
|
-
),
|
|
69
|
-
() => !
|
|
70
|
-
),
|
|
71
|
-
if (!
|
|
72
|
-
const e = n.value, t =
|
|
73
|
-
t.style.right =
|
|
61
|
+
}), ne = x(
|
|
62
|
+
() => Fe(l().text || "", d.value)
|
|
63
|
+
), w = x(
|
|
64
|
+
() => !k.value && be(l().text || "")
|
|
65
|
+
), u = () => {
|
|
66
|
+
if (!h.value || !n.value) return;
|
|
67
|
+
const e = n.value, t = h.value, i = Math.max(0, e.offsetWidth - e.clientWidth);
|
|
68
|
+
t.style.right = i > 0 ? `${i}px` : "", t.scrollTop = e.scrollTop;
|
|
74
69
|
};
|
|
75
|
-
let
|
|
76
|
-
function
|
|
77
|
-
|
|
70
|
+
let c = 0;
|
|
71
|
+
function D() {
|
|
72
|
+
d.value = null;
|
|
78
73
|
}
|
|
79
|
-
function
|
|
74
|
+
function K(e = "nearest") {
|
|
80
75
|
const t = n.value;
|
|
81
|
-
if (!t || !
|
|
82
|
-
const
|
|
83
|
-
(
|
|
76
|
+
if (!t || !w.value) return;
|
|
77
|
+
const i = t.value, o = J(i, t.selectionStart, e), a = J(i, t.selectionEnd, e);
|
|
78
|
+
(o !== t.selectionStart || a !== t.selectionEnd) && t.setSelectionRange(o, a);
|
|
84
79
|
}
|
|
85
|
-
function
|
|
86
|
-
|
|
80
|
+
function O() {
|
|
81
|
+
K("nearest"), p();
|
|
87
82
|
}
|
|
88
|
-
function
|
|
89
|
-
if (!
|
|
83
|
+
function oe(e) {
|
|
84
|
+
if (!w.value || e.key !== "ArrowLeft" && e.key !== "ArrowRight" || e.altKey || e.metaKey || e.ctrlKey) return;
|
|
90
85
|
const t = n.value;
|
|
91
86
|
if (!t) return;
|
|
92
|
-
const
|
|
87
|
+
const i = t.value, o = t.selectionStart !== t.selectionEnd;
|
|
93
88
|
if (e.shiftKey) {
|
|
94
|
-
requestAnimationFrame(() =>
|
|
89
|
+
requestAnimationFrame(() => O());
|
|
95
90
|
return;
|
|
96
91
|
}
|
|
97
|
-
if (
|
|
92
|
+
if (o) {
|
|
98
93
|
e.preventDefault();
|
|
99
|
-
const
|
|
100
|
-
t.setSelectionRange(
|
|
94
|
+
const y = e.key === "ArrowLeft" ? t.selectionStart : t.selectionEnd, E = e.key === "ArrowLeft" ? Q(i, y) : V(i, y);
|
|
95
|
+
t.setSelectionRange(E, E), p();
|
|
101
96
|
return;
|
|
102
97
|
}
|
|
103
98
|
e.preventDefault();
|
|
104
|
-
const
|
|
105
|
-
t.setSelectionRange(
|
|
99
|
+
const a = t.selectionStart, m = e.key === "ArrowLeft" ? Q(i, a) : V(i, a);
|
|
100
|
+
t.setSelectionRange(m, m), p();
|
|
106
101
|
}
|
|
107
|
-
function
|
|
108
|
-
if (!
|
|
109
|
-
|
|
102
|
+
function p() {
|
|
103
|
+
if (!w.value) {
|
|
104
|
+
D();
|
|
110
105
|
return;
|
|
111
106
|
}
|
|
112
|
-
|
|
113
|
-
var
|
|
114
|
-
|
|
107
|
+
c && cancelAnimationFrame(c), c = requestAnimationFrame(() => {
|
|
108
|
+
var m;
|
|
109
|
+
c = 0;
|
|
115
110
|
const e = n.value;
|
|
116
111
|
if (!e) {
|
|
117
|
-
|
|
112
|
+
D();
|
|
118
113
|
return;
|
|
119
114
|
}
|
|
120
|
-
const t = e.selectionStart,
|
|
121
|
-
if (t ===
|
|
122
|
-
|
|
115
|
+
const t = e.selectionStart, i = e.selectionEnd;
|
|
116
|
+
if (t === i) {
|
|
117
|
+
d.value !== null && (d.value = null, S(u));
|
|
123
118
|
return;
|
|
124
119
|
}
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
const o = d.value;
|
|
121
|
+
if (o && o.start === t && o.end === i) return;
|
|
122
|
+
const a = ((m = h.value) == null ? void 0 : m.scrollTop) ?? 0;
|
|
123
|
+
d.value = { start: t, end: i }, S(() => {
|
|
124
|
+
h.value && (h.value.scrollTop = a), u();
|
|
130
125
|
});
|
|
131
126
|
});
|
|
132
127
|
}
|
|
133
|
-
function
|
|
134
|
-
e.buttons &&
|
|
128
|
+
function ie(e) {
|
|
129
|
+
e.buttons && p();
|
|
135
130
|
}
|
|
136
|
-
function
|
|
137
|
-
document.activeElement === n.value &&
|
|
131
|
+
function L() {
|
|
132
|
+
document.activeElement === n.value && p();
|
|
138
133
|
}
|
|
139
|
-
const
|
|
134
|
+
const s = X, le = x(() => !!(s.state == "disabled" || l().text == "" && !l().file || l().isRecording)), re = x(() => {
|
|
140
135
|
var t;
|
|
141
|
-
if (
|
|
142
|
-
return
|
|
143
|
-
if (!((t =
|
|
136
|
+
if (s.inputButtonColor)
|
|
137
|
+
return s.inputButtonColor;
|
|
138
|
+
if (!((t = s.selectedChannel) != null && t.channelId))
|
|
144
139
|
return "#25D366";
|
|
145
|
-
const e =
|
|
140
|
+
const e = s.selectedChannel.channelId.toLowerCase();
|
|
146
141
|
return e.includes("whatsapp") || e.includes("waba") ? "#25D366" : e.includes("telegram") ? "#37AFE2" : e.includes("sms") ? "#6C757D" : e.includes("max") ? "#4B0082" : "#25D366";
|
|
147
|
-
}),
|
|
142
|
+
}), se = x(() => {
|
|
148
143
|
var t;
|
|
149
|
-
if (!((t =
|
|
144
|
+
if (!((t = s.selectedChannel) != null && t.channelId))
|
|
150
145
|
return I("component.ChatInput.InputPlaceholder");
|
|
151
|
-
const e =
|
|
146
|
+
const e = s.selectedChannel.channelId.toLowerCase();
|
|
152
147
|
return e.includes("whatsapp") || e.includes("waba") ? I("component.ChatInput.WhatsappInputPlaceholder") : e.includes("telegram") ? I("component.ChatInput.TelegramInputPlaceholder") : e.includes("sms") ? I("component.ChatInput.SmsInputPlaceholder") : e.includes("max") ? I("component.ChatInput.MaxInputPlaceholder") : I("component.ChatInput.InputPlaceholder");
|
|
153
148
|
});
|
|
154
|
-
|
|
155
|
-
() =>
|
|
149
|
+
f(
|
|
150
|
+
() => B.value,
|
|
156
151
|
() => {
|
|
157
|
-
|
|
152
|
+
b("typing");
|
|
158
153
|
}
|
|
159
|
-
),
|
|
154
|
+
), f(
|
|
160
155
|
() => {
|
|
161
156
|
var e;
|
|
162
157
|
return (e = l().edit) == null ? void 0 : e.messageId;
|
|
163
158
|
},
|
|
164
159
|
(e, t) => {
|
|
165
|
-
e != null && e !== t && (
|
|
166
|
-
if (!
|
|
167
|
-
const
|
|
168
|
-
|
|
160
|
+
e != null && e !== t && (v.value = !0, S(() => {
|
|
161
|
+
if (!v.value) return;
|
|
162
|
+
const i = n.value;
|
|
163
|
+
i && (g(i), v.value = !1, A(i), requestAnimationFrame(() => A(i)));
|
|
169
164
|
}));
|
|
170
165
|
}
|
|
171
|
-
),
|
|
172
|
-
() =>
|
|
166
|
+
), f(
|
|
167
|
+
() => s.focusOnInputArea,
|
|
173
168
|
() => {
|
|
174
|
-
|
|
175
|
-
const e =
|
|
169
|
+
s.focusOnInputArea && S(() => {
|
|
170
|
+
const e = Se(n);
|
|
176
171
|
e == null || e.focus();
|
|
177
172
|
});
|
|
178
173
|
},
|
|
179
174
|
{ immediate: !0 }
|
|
180
|
-
),
|
|
175
|
+
), f(
|
|
181
176
|
() => l().text,
|
|
182
177
|
() => {
|
|
183
178
|
const e = n.value;
|
|
184
|
-
e && (
|
|
179
|
+
e && (g(e), v.value && (v.value = !1, A(e), requestAnimationFrame(() => A(e))));
|
|
185
180
|
},
|
|
186
181
|
{ immediate: !0, flush: "post" }
|
|
187
|
-
),
|
|
182
|
+
), f(
|
|
188
183
|
() => l().id,
|
|
189
184
|
() => {
|
|
190
185
|
const e = n.value;
|
|
191
|
-
e && (
|
|
186
|
+
e && (C(e), requestAnimationFrame(() => {
|
|
192
187
|
const t = n.value;
|
|
193
|
-
t &&
|
|
188
|
+
t && g(t);
|
|
194
189
|
}));
|
|
195
190
|
}
|
|
196
|
-
),
|
|
191
|
+
), f(w, (e) => {
|
|
197
192
|
e && S(() => {
|
|
198
193
|
const t = n.value;
|
|
199
194
|
if (!t) return;
|
|
200
|
-
const
|
|
201
|
-
|
|
195
|
+
const i = t.scrollTop;
|
|
196
|
+
g(t), t.scrollTop = i, u(), requestAnimationFrame(u);
|
|
202
197
|
});
|
|
203
198
|
});
|
|
204
|
-
function
|
|
199
|
+
function C(e) {
|
|
205
200
|
const t = l().inputHeight;
|
|
206
|
-
e.style.height = (t ||
|
|
201
|
+
e.style.height = (t || H) + "px", (!t || t <= H) && (e.style.overflowY = "hidden");
|
|
207
202
|
}
|
|
208
|
-
function
|
|
203
|
+
function G(e) {
|
|
209
204
|
const t = parseFloat(e.style.height);
|
|
210
205
|
Number.isFinite(t) && (l().inputHeight = t);
|
|
211
206
|
}
|
|
212
|
-
function
|
|
207
|
+
function g(e) {
|
|
213
208
|
const t = l().text || "";
|
|
214
209
|
if (e.value !== t || e.clientWidth === 0) {
|
|
215
|
-
|
|
210
|
+
C(e);
|
|
216
211
|
return;
|
|
217
212
|
}
|
|
218
|
-
const
|
|
213
|
+
const i = e.scrollTop;
|
|
219
214
|
e.style.height = "auto";
|
|
220
|
-
const
|
|
221
|
-
`).length > 1,
|
|
222
|
-
|
|
223
|
-
const
|
|
224
|
-
document.body.removeChild(
|
|
225
|
-
const
|
|
226
|
-
if (
|
|
227
|
-
|
|
215
|
+
const o = getComputedStyle(e), a = parseFloat(o.fontSize) || 16, m = parseFloat(o.lineHeight) || a * 1.4, y = H, E = m * 11, W = e.scrollHeight, de = t.split(`
|
|
216
|
+
`).length > 1, r = document.createElement("div");
|
|
217
|
+
r.style.position = "absolute", r.style.visibility = "hidden", r.style.whiteSpace = "nowrap", r.style.font = o.font, r.style.fontSize = o.fontSize, r.style.fontFamily = o.fontFamily, r.style.fontWeight = o.fontWeight, r.style.letterSpacing = o.letterSpacing, r.textContent = t, document.body.appendChild(r);
|
|
218
|
+
const pe = r.offsetWidth;
|
|
219
|
+
document.body.removeChild(r);
|
|
220
|
+
const me = parseFloat(o.paddingLeft) || 0, he = parseFloat(o.paddingRight) || 0, ve = e.clientWidth - me - he, ge = pe > ve, $ = de || ge;
|
|
221
|
+
if ($ && W <= y + 1) {
|
|
222
|
+
C(e);
|
|
228
223
|
return;
|
|
229
224
|
}
|
|
230
|
-
t.trim() &&
|
|
225
|
+
t.trim() && $ ? W <= E ? (e.style.height = W + "px", e.style.overflowY = "hidden") : (e.style.height = E + "px", e.style.overflowY = "auto", e.scrollTop = i) : (e.style.height = y + "px", e.style.overflowY = "hidden"), G(e), u(), requestAnimationFrame(u);
|
|
231
226
|
}
|
|
232
|
-
function
|
|
233
|
-
if (
|
|
227
|
+
function A(e) {
|
|
228
|
+
if (s.state === "disabled" || l().isRecording) return;
|
|
234
229
|
const t = e.value.length;
|
|
235
|
-
e.focus(), e.setSelectionRange(t, t), e.scrollTop = e.scrollHeight,
|
|
230
|
+
e.focus(), e.setSelectionRange(t, t), e.scrollTop = e.scrollHeight, u();
|
|
236
231
|
}
|
|
237
|
-
|
|
232
|
+
f(
|
|
238
233
|
() => l().forceSend,
|
|
239
234
|
() => {
|
|
240
|
-
l().forceSend && (
|
|
235
|
+
l().forceSend && (P(), q(!1));
|
|
241
236
|
}
|
|
242
237
|
);
|
|
243
|
-
const
|
|
238
|
+
const ae = (e) => {
|
|
244
239
|
const t = e.target;
|
|
245
|
-
|
|
240
|
+
b("typing", t.value), p();
|
|
246
241
|
};
|
|
247
|
-
|
|
242
|
+
Ie(() => {
|
|
248
243
|
const e = n.value;
|
|
249
|
-
e && (
|
|
250
|
-
}),
|
|
251
|
-
|
|
244
|
+
e && (C(e), g(e)), document.addEventListener("selectionchange", L);
|
|
245
|
+
}), Te(() => {
|
|
246
|
+
Ae(R), document.removeEventListener("selectionchange", L), c && cancelAnimationFrame(c);
|
|
252
247
|
});
|
|
253
|
-
const
|
|
248
|
+
const ue = (e) => {
|
|
254
249
|
if (e.shiftKey) {
|
|
255
250
|
if (n.value instanceof HTMLTextAreaElement) {
|
|
256
251
|
let t = n.value.selectionStart;
|
|
257
252
|
t && (n.value.setRangeText(`
|
|
258
|
-
`, t, t, "end"),
|
|
253
|
+
`, t, t, "end"), T(n.value.value));
|
|
259
254
|
}
|
|
260
255
|
e.preventDefault();
|
|
261
256
|
} else if (e.ctrlKey) {
|
|
262
257
|
if (n.value instanceof HTMLTextAreaElement) {
|
|
263
258
|
let t = n.value.selectionStart;
|
|
264
259
|
t && (n.value.setRangeText(`
|
|
265
|
-
`, t, t, "end"),
|
|
260
|
+
`, t, t, "end"), T(n.value.value));
|
|
266
261
|
}
|
|
267
262
|
e.preventDefault();
|
|
268
263
|
} else
|
|
269
|
-
e.preventDefault(),
|
|
270
|
-
},
|
|
264
|
+
e.preventDefault(), P();
|
|
265
|
+
}, ce = (e) => {
|
|
271
266
|
if (n.value) {
|
|
272
267
|
const t = n.value.value;
|
|
273
268
|
n.value.value = e.newText;
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
n.value && (n.value.setSelectionRange(
|
|
269
|
+
const i = e.newText.length - (t.length - (e.end - e.start)), o = e.start + i;
|
|
270
|
+
T(e.newText), S(() => {
|
|
271
|
+
n.value && (n.value.setSelectionRange(o, o), n.value.focus());
|
|
277
272
|
});
|
|
278
273
|
}
|
|
279
274
|
};
|
|
280
|
-
function
|
|
281
|
-
|
|
275
|
+
function fe() {
|
|
276
|
+
z();
|
|
282
277
|
}
|
|
283
|
-
function
|
|
284
|
-
|
|
278
|
+
function N() {
|
|
279
|
+
j(), T(""), Me(M), n.value && n.value.focus();
|
|
285
280
|
}
|
|
286
|
-
function
|
|
281
|
+
function Y() {
|
|
287
282
|
const e = l();
|
|
288
283
|
return e.edit ? (e.text ?? "").trim() === (e.edit.text ?? "").trim() : !1;
|
|
289
284
|
}
|
|
290
|
-
const
|
|
291
|
-
var t,
|
|
292
|
-
const e =
|
|
293
|
-
if (e.value.edit &&
|
|
294
|
-
|
|
285
|
+
const P = () => {
|
|
286
|
+
var t, i;
|
|
287
|
+
const e = F(l());
|
|
288
|
+
if (e.value.edit && Y()) {
|
|
289
|
+
N();
|
|
295
290
|
return;
|
|
296
291
|
}
|
|
297
292
|
if (e.value.text != "" || e.value.file) {
|
|
298
|
-
const
|
|
293
|
+
const o = {
|
|
299
294
|
type: "",
|
|
300
295
|
text: "",
|
|
301
296
|
url: "",
|
|
@@ -303,78 +298,22 @@ const Ne = { class: "chat-input__container" }, Ge = ["id"], Oe = ["id"], Ue = {
|
|
|
303
298
|
size: "",
|
|
304
299
|
reply: void 0
|
|
305
300
|
};
|
|
306
|
-
e.value.file ? (
|
|
301
|
+
e.value.file ? (o.type = "message." + e.value.file.type, o.url = e.value.file.url, o.filename = e.value.file.name, o.size = (t = e.value.file.size) == null ? void 0 : t.toString(), o.text = (i = e == null ? void 0 : e.value) == null ? void 0 : i.text.trim()) : (o.type = "message.text", o.text = e.value.text.trim()), e.value.reply && (o.reply = e.value.reply), e.value.edit && (o.edit = e.value.edit), b("send", o), _(), n.value && n.value.focus();
|
|
307
302
|
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
"file-info": D.value,
|
|
321
|
-
onReset: me
|
|
322
|
-
}, null, 8, ["file-info"])) : U("", !0)
|
|
323
|
-
], 10, Oe),
|
|
324
|
-
h("div", Ue, [
|
|
325
|
-
Y(e.$slots, "inline-buttons", {}, void 0, !0)
|
|
326
|
-
]),
|
|
327
|
-
T.disabledPlaceholder && (T.state == "disabled" || u(l)().isRecording) ? (F(), k("div", Ye, Fe(T.disabledPlaceholder), 1)) : (F(), k("div", Ve, [
|
|
328
|
-
g.value ? (F(), k("div", {
|
|
329
|
-
key: 0,
|
|
330
|
-
ref_key: "refMirror",
|
|
331
|
-
ref: m,
|
|
332
|
-
class: "chat-input__input-mirror",
|
|
333
|
-
"aria-hidden": "true",
|
|
334
|
-
innerHTML: oe.value
|
|
335
|
-
}, null, 8, $e)) : U("", !0),
|
|
336
|
-
Me(h("textarea", {
|
|
337
|
-
ref_key: "refInput",
|
|
338
|
-
ref: n,
|
|
339
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) => u(l)().text = o),
|
|
340
|
-
rows: "1",
|
|
341
|
-
disabled: T.state == "disabled" || u(l)().isRecording,
|
|
342
|
-
class: z(["chat-input__input", { "chat-input__input--emoji-images": g.value }]),
|
|
343
|
-
placeholder: ce.value,
|
|
344
|
-
onKeydown: [
|
|
345
|
-
se,
|
|
346
|
-
Re(pe, ["enter"])
|
|
347
|
-
],
|
|
348
|
-
onInput: fe,
|
|
349
|
-
onScroll: c,
|
|
350
|
-
onSelect: f,
|
|
351
|
-
onMouseup: W,
|
|
352
|
-
onKeyup: W,
|
|
353
|
-
onMousemove: ae,
|
|
354
|
-
onBlur: P
|
|
355
|
-
}, null, 42, Je), [
|
|
356
|
-
[He, u(l)().text]
|
|
357
|
-
])
|
|
358
|
-
])),
|
|
359
|
-
O(Ke, {
|
|
360
|
-
textarea: n.value,
|
|
361
|
-
onFormatApplied: he
|
|
362
|
-
}, null, 8, ["textarea"]),
|
|
363
|
-
h("button", {
|
|
364
|
-
class: z(["chat-input__button", { "chat-input__button-disabled": re.value }]),
|
|
365
|
-
disabled: u(l)().isRecording,
|
|
366
|
-
onClick: q
|
|
367
|
-
}, [
|
|
368
|
-
h("span", Xe, [
|
|
369
|
-
O(u(ze), { color: ue.value }, null, 8, ["color"])
|
|
370
|
-
])
|
|
371
|
-
], 10, Qe),
|
|
372
|
-
h("div", Ze, [
|
|
373
|
-
Y(e.$slots, "buttons", {}, void 0, !0)
|
|
374
|
-
])
|
|
375
|
-
]));
|
|
303
|
+
}, U = { emit: b, chatAppId: M, resetMessage: _, getMessage: l, setMessageText: T, setForceSendMessage: q, resetEdit: j, resetMessageFile: z, isNative: k, get ownedDraftId() {
|
|
304
|
+
return R;
|
|
305
|
+
}, set ownedDraftId(e) {
|
|
306
|
+
R = e;
|
|
307
|
+
}, refInput: n, refMirror: h, selectionRange: d, focusAtEndAfterResize: v, typing: B, filePreview: te, emojiMirrorHtml: ne, useEmojiMirror: w, syncMirrorScroll: u, get selectionSyncRaf() {
|
|
308
|
+
return c;
|
|
309
|
+
}, set selectionSyncRaf(e) {
|
|
310
|
+
c = e;
|
|
311
|
+
}, clearSelectionHighlight: D, snapTextareaCaret: K, snapCaretAndUpdateSelection: O, onInputKeydown: oe, updateSelectionState: p, onInputMouseMove: ie, onDocumentSelectionChange: L, props: s, disabledSendButton: le, sendIconColor: re, inputPlaceholder: se, INPUT_MIN_HEIGHT: H, applySavedInputHeight: C, persistInputHeight: G, resizeTextarea: g, applyFocusAtEnd: A, sendTyping: ae, keyEnter: ue, handleFormatApplied: ce, resetSelectedFile: fe, cancelEditMode: N, isEditTextUnchanged: Y, sendMessage: P, get SendIcon() {
|
|
312
|
+
return Re;
|
|
313
|
+
}, TextFormatToolbar: He, FilePreview: De };
|
|
314
|
+
return Object.defineProperty(U, "__isScriptSetup", { enumerable: !1, value: !0 }), U;
|
|
376
315
|
}
|
|
377
316
|
});
|
|
378
317
|
export {
|
|
379
|
-
|
|
318
|
+
Xe as default
|
|
380
319
|
};
|