@mobilon-dev/chotto 0.3.97 → 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.
Files changed (211) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js +29 -4
  3. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +42 -61
  4. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue.js +47 -4
  5. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +55 -82
  6. package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +86 -51
  7. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue.js +32 -4
  8. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue2.js +7 -28
  9. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +22 -38
  10. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +33 -2
  11. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue.js +37 -4
  12. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue2.js +7 -21
  13. package/dist/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.js +30 -19
  14. package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +70 -4
  15. package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +76 -108
  16. package/dist/components/1_icons/AvatarIcon.vue.js +8 -8
  17. package/dist/components/1_icons/CheckIcon.vue.js +26 -13
  18. package/dist/components/1_icons/CloseButtonIcon.vue.js +16 -10
  19. package/dist/components/1_icons/CloseIcon.vue.js +16 -10
  20. package/dist/components/1_icons/ContactCRMIcon.vue.js +16 -10
  21. package/dist/components/1_icons/MenuIcon.vue.js +16 -10
  22. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue.js +23 -3
  23. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue2.js +12 -21
  24. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue.js +36 -4
  25. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue2.js +11 -26
  26. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue.js +23 -3
  27. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue2.js +12 -21
  28. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js +23 -3
  29. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue2.js +11 -20
  30. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue.js +33 -4
  31. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue2.js +11 -23
  32. package/dist/components/1_icons/SearchIcon.vue.js +29 -17
  33. package/dist/components/1_icons/SettingsIcon.vue.js +8 -8
  34. package/dist/components/1_icons/TelegramIcon.vue.js +32 -20
  35. package/dist/components/1_icons/WhatsAppIcon.vue.js +32 -20
  36. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +546 -396
  37. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.js +101 -58
  38. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +14 -8
  39. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.vue.js +7 -7
  40. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelMaxIcon.vue.js +7 -7
  41. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelPhoneIcon.vue.js +19 -13
  42. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSMSIcon.vue.js +16 -10
  43. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuMaxIcon.vue.js +35 -23
  44. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuPhoneIcon.vue.js +32 -20
  45. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuSMSIcon.vue.js +17 -11
  46. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuTelegramIcon.vue.js +8 -8
  47. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js +32 -20
  48. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelTelegramIcon.vue.js +33 -21
  49. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelUnconfirmedIcon.vue.js +7 -7
  50. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelWhatsAppIcon.vue.js +8 -8
  51. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +74 -4
  52. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +8 -42
  53. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js +62 -4
  54. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue2.js +15 -36
  55. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue.js +49 -4
  56. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +22 -45
  57. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue.js +36 -4
  58. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +19 -37
  59. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +61 -4
  60. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +79 -96
  61. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +31 -27
  62. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue2.js +13 -2
  63. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +72 -4
  64. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +47 -83
  65. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +19 -21
  66. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue2.js +13 -2
  67. package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +80 -51
  68. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +182 -4
  69. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +25 -135
  70. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +78 -4
  71. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +73 -95
  72. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +15 -17
  73. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue2.js +13 -2
  74. package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js +39 -33
  75. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +220 -4
  76. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +146 -256
  77. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue.js +39 -41
  78. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue2.js +13 -2
  79. package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +233 -163
  80. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js +164 -4
  81. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +87 -175
  82. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js +73 -4
  83. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +34 -60
  84. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js +47 -4
  85. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js +10 -23
  86. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js +52 -4
  87. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue2.js +8 -26
  88. package/dist/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js +299 -220
  89. package/dist/components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js +39 -33
  90. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +306 -4
  91. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +134 -311
  92. package/dist/components/2_chatlist_elements/ChatItem/icons/AudioIcon.vue.js +18 -12
  93. package/dist/components/2_chatlist_elements/ChatItem/icons/FileIcon.vue.js +23 -11
  94. package/dist/components/2_chatlist_elements/ChatItem/icons/ImageIcon.vue.js +7 -7
  95. package/dist/components/2_chatlist_elements/ChatItem/icons/MissedCallIcon.vue.js +34 -22
  96. package/dist/components/2_chatlist_elements/ChatItem/icons/StickerIcon.vue.js +15 -9
  97. package/dist/components/2_chatlist_elements/ChatItem/icons/VideoIcon.vue.js +26 -14
  98. package/dist/components/2_chatlist_elements/ChatItem/icons/VoiceIcon.vue.js +7 -7
  99. package/dist/components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js +52 -24
  100. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +84 -4
  101. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +35 -67
  102. package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +72 -38
  103. package/dist/components/2_elements/ChatInfo/ChatInfo.vue.js +76 -57
  104. package/dist/components/2_elements/ChatPanel/ChatPanel.vue.js +41 -29
  105. package/dist/components/2_elements/ContactInfo/ContactInfo.vue.js +176 -115
  106. package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +48 -27
  107. package/dist/components/2_elements/UserProfile/UserProfile.vue.js +58 -28
  108. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +54 -4
  109. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +19 -39
  110. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +458 -4
  111. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +160 -471
  112. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js +19 -4
  113. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue2.js +12 -22
  114. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +26 -4
  115. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +26 -39
  116. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +482 -4
  117. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +148 -448
  118. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue.js +17 -19
  119. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue2.js +13 -2
  120. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue.js +17 -19
  121. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue2.js +13 -2
  122. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue.js +17 -4
  123. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue2.js +7 -7
  124. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js +16 -3
  125. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue2.js +7 -7
  126. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +67 -4
  127. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +11 -43
  128. package/dist/components/2_feed_elements/DeletedMessageContent/icons/DeletedMessageIcon.vue.js +16 -10
  129. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js +60 -4
  130. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue2.js +36 -53
  131. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js +22 -4
  132. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue2.js +8 -15
  133. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js +43 -4
  134. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue2.js +10 -25
  135. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +250 -4
  136. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +67 -233
  137. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +315 -4
  138. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +98 -319
  139. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js +39 -4
  140. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +12 -22
  141. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +155 -4
  142. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +110 -212
  143. package/dist/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.js +32 -20
  144. package/dist/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.js +32 -20
  145. package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +17 -11
  146. package/dist/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.js +16 -10
  147. package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +17 -11
  148. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue.js +22 -4
  149. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue2.js +17 -23
  150. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +28 -4
  151. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +27 -29
  152. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +142 -4
  153. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +33 -121
  154. package/dist/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.js +34 -22
  155. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +55 -4
  156. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +8 -30
  157. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +47 -4
  158. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +9 -25
  159. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +56 -4
  160. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +8 -37
  161. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +72 -4
  162. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +10 -59
  163. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +142 -4
  164. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +36 -120
  165. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +49 -4
  166. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +15 -53
  167. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +75 -4
  168. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +10 -63
  169. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue.js +18 -4
  170. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue2.js +9 -17
  171. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +346 -4
  172. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +73 -307
  173. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue.js +17 -4
  174. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue2.js +7 -7
  175. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +307 -4
  176. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +65 -269
  177. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue.js +37 -4
  178. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue2.js +7 -21
  179. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +307 -4
  180. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +76 -298
  181. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.js +64 -4
  182. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue3.js +10 -45
  183. package/dist/components/2_modals/CreateChat/CreateChat.vue.js +35 -18
  184. package/dist/components/2_modals/CreateChat2/CreateChat2.vue.js +140 -92
  185. package/dist/components/2_modals/CreateDialog/CreateDialog.vue.js +96 -49
  186. package/dist/components/2_modals/Modal/Modal.vue.js +59 -50
  187. package/dist/components/2_modals/ModalFullscreen/ModalFullscreen.vue.js +51 -38
  188. package/dist/components/2_modals/ModalNoFooter/ModalNoFooter.vue.js +39 -30
  189. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +155 -4
  190. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js +49 -121
  191. package/dist/components/2_modals/SelectUser/SelectUser.vue.js +60 -43
  192. package/dist/components/2_modals/SelectUser2/SelectUser2.vue.js +41 -24
  193. package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +85 -4
  194. package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +149 -210
  195. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue.js +25 -21
  196. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue2.js +13 -2
  197. package/dist/components/3_compounds/ChatList/ChatList.vue.js +253 -163
  198. package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +50 -32
  199. package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +6 -6
  200. package/dist/components/3_compounds/Feed/Feed.vue.js +172 -4
  201. package/dist/components/3_compounds/Feed/Feed.vue2.js +126 -257
  202. package/dist/components/3_compounds/SideBar/SideBar.vue.js +279 -202
  203. package/dist/components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js +43 -36
  204. package/dist/components/4_layouts/BaseLayout/BaseLayout.vue.js +5 -5
  205. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue.js +32 -4
  206. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue2.js +7 -29
  207. package/dist/components/4_layouts/ExtendedLayout/ExtendedLayout.vue.js +7 -7
  208. package/dist/components/4_layouts/FeedLayout/FeedLayout.vue.js +8 -8
  209. package/dist/components/5_containers/BaseContainer/BaseContainer.vue.js +31 -18
  210. package/dist/components/5_containers/FloatContainer/FloatContainer.vue.js +85 -56
  211. package/package.json +1 -1
@@ -1,7 +1,88 @@
1
- import t from "./ChatInput.vue2.js";
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 o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-9ff21b69"]]);
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
- a as default
87
+ R as default
7
88
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as be, inject as we, watch as d, ref as E, computed as _, nextTick as S, unref as u, onMounted as Ce, onUnmounted as Ae, createElementBlock as k, openBlock as F, createElementVNode as h, createVNode as O, normalizeClass as z, createBlock as Ee, createCommentVNode as U, renderSlot as Y, toDisplayString as Fe, withDirectives as Me, withKeys as Re, vModelText as He } from "vue";
2
- import { useImmediateDebouncedRef as ke } from "../../../hooks/useImmediateDebouncedRef.js";
3
- import { useMessageDraft as Le, commitChatDraftToList as De } from "../../../hooks/useMessageDraft.js";
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 Pe } from "../../../hooks/useEmojiNative.js";
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 We, textContainsEmoji as qe, previousGraphemeIndex as V, nextGraphemeIndex as $, snapIndexToGrapheme as J } from "../../../functions/renderAppleEmojis.js";
15
- import { hideEditPreview as Be } from "../../../hooks/messages/useStartEdit.js";
16
- import ze from "./icons/SendIcon.vue.js";
17
- import Ke from "../../2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js";
18
- import je from "../../2_chatinput_elements/FilePreview/FilePreview.vue.js";
19
- const Ne = { class: "chat-input__container" }, Ge = ["id"], Oe = ["id"], Ue = { class: "chat-input__inline-buttons" }, Ye = {
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(T, { emit: Q }) {
55
- const L = Q, b = we("chatAppId"), { resetMessage: X, getMessage: l, setMessageText: M, setForceSendMessage: Z, resetEdit: ee, resetMessageFile: te } = Le(b), { isNative: ne } = Pe(b);
56
- let j = l().id;
57
- d(
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
- j = e;
55
+ R = e;
61
56
  }
62
57
  );
63
- const n = E(), m = E(), v = E(null), w = E(!1), ie = ke("", 2e3), D = _(() => {
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
- }), oe = _(
67
- () => We(l().text || "", v.value)
68
- ), g = _(
69
- () => !ne.value && qe(l().text || "")
70
- ), c = () => {
71
- if (!m.value || !n.value) return;
72
- const e = n.value, t = m.value, o = Math.max(0, e.offsetWidth - e.clientWidth);
73
- t.style.right = o > 0 ? `${o}px` : "", t.scrollTop = e.scrollTop;
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 y = 0;
76
- function P() {
77
- v.value = null;
70
+ let c = 0;
71
+ function D() {
72
+ d.value = null;
78
73
  }
79
- function le(e = "nearest") {
74
+ function K(e = "nearest") {
80
75
  const t = n.value;
81
- if (!t || !g.value) return;
82
- const o = t.value, i = J(o, t.selectionStart, e), r = J(o, t.selectionEnd, e);
83
- (i !== t.selectionStart || r !== t.selectionEnd) && t.setSelectionRange(i, r);
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 W() {
86
- le("nearest"), f();
80
+ function O() {
81
+ K("nearest"), p();
87
82
  }
88
- function se(e) {
89
- if (!g.value || e.key !== "ArrowLeft" && e.key !== "ArrowRight" || e.altKey || e.metaKey || e.ctrlKey) return;
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 o = t.value, i = t.selectionStart !== t.selectionEnd;
87
+ const i = t.value, o = t.selectionStart !== t.selectionEnd;
93
88
  if (e.shiftKey) {
94
- requestAnimationFrame(() => W());
89
+ requestAnimationFrame(() => O());
95
90
  return;
96
91
  }
97
- if (i) {
92
+ if (o) {
98
93
  e.preventDefault();
99
- const x = e.key === "ArrowLeft" ? t.selectionStart : t.selectionEnd, A = e.key === "ArrowLeft" ? V(o, x) : $(o, x);
100
- t.setSelectionRange(A, A), f();
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 r = t.selectionStart, p = e.key === "ArrowLeft" ? V(o, r) : $(o, r);
105
- t.setSelectionRange(p, p), f();
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 f() {
108
- if (!g.value) {
109
- P();
102
+ function p() {
103
+ if (!w.value) {
104
+ D();
110
105
  return;
111
106
  }
112
- y && cancelAnimationFrame(y), y = requestAnimationFrame(() => {
113
- var p;
114
- y = 0;
107
+ c && cancelAnimationFrame(c), c = requestAnimationFrame(() => {
108
+ var m;
109
+ c = 0;
115
110
  const e = n.value;
116
111
  if (!e) {
117
- P();
112
+ D();
118
113
  return;
119
114
  }
120
- const t = e.selectionStart, o = e.selectionEnd;
121
- if (t === o) {
122
- v.value !== null && (v.value = null, S(c));
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 i = v.value;
126
- if (i && i.start === t && i.end === o) return;
127
- const r = ((p = m.value) == null ? void 0 : p.scrollTop) ?? 0;
128
- v.value = { start: t, end: o }, S(() => {
129
- m.value && (m.value.scrollTop = r), c();
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 ae(e) {
134
- e.buttons && f();
128
+ function ie(e) {
129
+ e.buttons && p();
135
130
  }
136
- function N() {
137
- document.activeElement === n.value && f();
131
+ function L() {
132
+ document.activeElement === n.value && p();
138
133
  }
139
- const a = T, re = _(() => !!(a.state == "disabled" || l().text == "" && !l().file || l().isRecording)), ue = _(() => {
134
+ const s = X, le = x(() => !!(s.state == "disabled" || l().text == "" && !l().file || l().isRecording)), re = x(() => {
140
135
  var t;
141
- if (a.inputButtonColor)
142
- return a.inputButtonColor;
143
- if (!((t = a.selectedChannel) != null && t.channelId))
136
+ if (s.inputButtonColor)
137
+ return s.inputButtonColor;
138
+ if (!((t = s.selectedChannel) != null && t.channelId))
144
139
  return "#25D366";
145
- const e = a.selectedChannel.channelId.toLowerCase();
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
- }), ce = _(() => {
142
+ }), se = x(() => {
148
143
  var t;
149
- if (!((t = a.selectedChannel) != null && t.channelId))
144
+ if (!((t = s.selectedChannel) != null && t.channelId))
150
145
  return I("component.ChatInput.InputPlaceholder");
151
- const e = a.selectedChannel.channelId.toLowerCase();
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
- d(
155
- () => ie.value,
149
+ f(
150
+ () => B.value,
156
151
  () => {
157
- L("typing");
152
+ b("typing");
158
153
  }
159
- ), d(
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 && (w.value = !0, S(() => {
166
- if (!w.value) return;
167
- const o = n.value;
168
- o && (C(o), w.value = !1, H(o), requestAnimationFrame(() => H(o)));
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
- ), d(
172
- () => a.focusOnInputArea,
166
+ ), f(
167
+ () => s.focusOnInputArea,
173
168
  () => {
174
- a.focusOnInputArea && S(() => {
175
- const e = u(n);
169
+ s.focusOnInputArea && S(() => {
170
+ const e = Se(n);
176
171
  e == null || e.focus();
177
172
  });
178
173
  },
179
174
  { immediate: !0 }
180
- ), d(
175
+ ), f(
181
176
  () => l().text,
182
177
  () => {
183
178
  const e = n.value;
184
- e && (C(e), w.value && (w.value = !1, H(e), requestAnimationFrame(() => H(e))));
179
+ e && (g(e), v.value && (v.value = !1, A(e), requestAnimationFrame(() => A(e))));
185
180
  },
186
181
  { immediate: !0, flush: "post" }
187
- ), d(
182
+ ), f(
188
183
  () => l().id,
189
184
  () => {
190
185
  const e = n.value;
191
- e && (R(e), requestAnimationFrame(() => {
186
+ e && (C(e), requestAnimationFrame(() => {
192
187
  const t = n.value;
193
- t && C(t);
188
+ t && g(t);
194
189
  }));
195
190
  }
196
- ), d(g, (e) => {
191
+ ), f(w, (e) => {
197
192
  e && S(() => {
198
193
  const t = n.value;
199
194
  if (!t) return;
200
- const o = t.scrollTop;
201
- C(t), t.scrollTop = o, c(), requestAnimationFrame(c);
195
+ const i = t.scrollTop;
196
+ g(t), t.scrollTop = i, u(), requestAnimationFrame(u);
202
197
  });
203
198
  });
204
- function R(e) {
199
+ function C(e) {
205
200
  const t = l().inputHeight;
206
- e.style.height = (t || K) + "px", (!t || t <= K) && (e.style.overflowY = "hidden");
201
+ e.style.height = (t || H) + "px", (!t || t <= H) && (e.style.overflowY = "hidden");
207
202
  }
208
- function de(e) {
203
+ function G(e) {
209
204
  const t = parseFloat(e.style.height);
210
205
  Number.isFinite(t) && (l().inputHeight = t);
211
206
  }
212
- function C(e) {
207
+ function g(e) {
213
208
  const t = l().text || "";
214
209
  if (e.value !== t || e.clientWidth === 0) {
215
- R(e);
210
+ C(e);
216
211
  return;
217
212
  }
218
- const o = e.scrollTop;
213
+ const i = e.scrollTop;
219
214
  e.style.height = "auto";
220
- const i = getComputedStyle(e), r = parseFloat(i.fontSize) || 16, p = parseFloat(i.lineHeight) || r * 1.4, x = K, A = p * 11, B = e.scrollHeight, ye = t.split(`
221
- `).length > 1, s = document.createElement("div");
222
- s.style.position = "absolute", s.style.visibility = "hidden", s.style.whiteSpace = "nowrap", s.style.font = i.font, s.style.fontSize = i.fontSize, s.style.fontFamily = i.fontFamily, s.style.fontWeight = i.fontWeight, s.style.letterSpacing = i.letterSpacing, s.textContent = t, document.body.appendChild(s);
223
- const xe = s.offsetWidth;
224
- document.body.removeChild(s);
225
- const _e = parseFloat(i.paddingLeft) || 0, Se = parseFloat(i.paddingRight) || 0, Ie = e.clientWidth - _e - Se, Te = xe > Ie, G = ye || Te;
226
- if (G && B <= x + 1) {
227
- R(e);
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() && G ? B <= A ? (e.style.height = B + "px", e.style.overflowY = "hidden") : (e.style.height = A + "px", e.style.overflowY = "auto", e.scrollTop = o) : (e.style.height = x + "px", e.style.overflowY = "hidden"), de(e), c(), requestAnimationFrame(c);
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 H(e) {
233
- if (a.state === "disabled" || l().isRecording) return;
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, c();
230
+ e.focus(), e.setSelectionRange(t, t), e.scrollTop = e.scrollHeight, u();
236
231
  }
237
- d(
232
+ f(
238
233
  () => l().forceSend,
239
234
  () => {
240
- l().forceSend && (q(), Z(!1));
235
+ l().forceSend && (P(), q(!1));
241
236
  }
242
237
  );
243
- const fe = (e) => {
238
+ const ae = (e) => {
244
239
  const t = e.target;
245
- L("typing", t.value), f();
240
+ b("typing", t.value), p();
246
241
  };
247
- Ce(() => {
242
+ Ie(() => {
248
243
  const e = n.value;
249
- e && (R(e), C(e)), document.addEventListener("selectionchange", N);
250
- }), Ae(() => {
251
- De(j), document.removeEventListener("selectionchange", N), y && cancelAnimationFrame(y);
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 pe = (e) => {
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"), M(n.value.value));
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"), M(n.value.value));
260
+ `, t, t, "end"), T(n.value.value));
266
261
  }
267
262
  e.preventDefault();
268
263
  } else
269
- e.preventDefault(), q();
270
- }, he = (e) => {
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 o = e.newText.length - (t.length - (e.end - e.start)), i = e.start + o;
275
- M(e.newText), S(() => {
276
- n.value && (n.value.setSelectionRange(i, i), n.value.focus());
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 me() {
281
- te();
275
+ function fe() {
276
+ z();
282
277
  }
283
- function ve() {
284
- ee(), M(""), Be(b), n.value && n.value.focus();
278
+ function N() {
279
+ j(), T(""), Me(M), n.value && n.value.focus();
285
280
  }
286
- function ge() {
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 q = () => {
291
- var t, o;
292
- const e = E(l());
293
- if (e.value.edit && ge()) {
294
- ve();
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 i = {
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 ? (i.type = "message." + e.value.file.type, i.url = e.value.file.url, i.filename = e.value.file.name, i.size = (t = e.value.file.size) == null ? void 0 : t.toString(), i.text = (o = e == null ? void 0 : e.value) == null ? void 0 : o.text.trim()) : (i.type = "message.text", i.text = e.value.text.trim()), e.value.reply && (i.reply = e.value.reply), e.value.edit && (i.edit = e.value.edit), L("send", i), X(), n.value && n.value.focus();
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
- return (e, t) => (F(), k("div", Ne, [
310
- h("div", {
311
- id: "chat-input-reply-line-" + u(b),
312
- class: "chat-input__reply-line"
313
- }, null, 8, Ge),
314
- h("div", {
315
- id: "chat-input-file-line-" + u(b),
316
- class: z(["chat-input__file-line", { "chat-input__file-line--visible": !!D.value }])
317
- }, [
318
- D.value ? (F(), Ee(je, {
319
- key: 0,
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
- xt as default
318
+ Xe as default
380
319
  };