@mobilon-dev/chotto 0.3.121 → 0.3.124

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 (227) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js +4 -29
  3. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +59 -40
  4. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue.js +4 -47
  5. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +82 -55
  6. package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +51 -86
  7. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue.js +4 -32
  8. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue2.js +28 -7
  9. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +35 -22
  10. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +2 -30
  11. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue.js +4 -37
  12. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue2.js +21 -7
  13. package/dist/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.js +19 -30
  14. package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +4 -70
  15. package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +108 -76
  16. package/dist/components/1_icons/AvatarIcon.vue.js +8 -8
  17. package/dist/components/1_icons/CheckIcon.vue.js +13 -26
  18. package/dist/components/1_icons/CloseButtonIcon.vue.js +10 -16
  19. package/dist/components/1_icons/CloseIcon.vue.js +10 -16
  20. package/dist/components/1_icons/ContactCRMIcon.vue.js +10 -16
  21. package/dist/components/1_icons/DeletedMessageIcon.vue.js +11 -17
  22. package/dist/components/1_icons/MenuIcon.vue.js +10 -16
  23. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue.js +3 -23
  24. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue2.js +21 -12
  25. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue.js +4 -36
  26. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue2.js +26 -11
  27. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue.js +3 -23
  28. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue2.js +21 -12
  29. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js +3 -23
  30. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue2.js +20 -11
  31. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue.js +4 -33
  32. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue2.js +23 -11
  33. package/dist/components/1_icons/SearchIcon.vue.js +17 -29
  34. package/dist/components/1_icons/SettingsIcon.vue.js +8 -8
  35. package/dist/components/1_icons/TelegramIcon.vue.js +20 -32
  36. package/dist/components/1_icons/VerifiedBadge.vue.js +19 -25
  37. package/dist/components/1_icons/WhatsAppIcon.vue.js +20 -32
  38. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +402 -552
  39. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.js +58 -101
  40. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +8 -14
  41. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.vue.js +7 -7
  42. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelMaxIcon.vue.js +7 -7
  43. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelPhoneIcon.vue.js +13 -19
  44. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSMSIcon.vue.js +10 -16
  45. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuMaxIcon.vue.js +23 -35
  46. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuPhoneIcon.vue.js +20 -32
  47. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuSMSIcon.vue.js +11 -17
  48. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuTelegramIcon.vue.js +8 -8
  49. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js +20 -32
  50. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelTelegramIcon.vue.js +21 -33
  51. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelUnconfirmedIcon.vue.js +7 -7
  52. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelWhatsAppIcon.vue.js +8 -8
  53. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +4 -74
  54. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +46 -12
  55. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js +4 -62
  56. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue2.js +36 -15
  57. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue.js +4 -49
  58. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +45 -22
  59. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue.js +4 -36
  60. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +37 -19
  61. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +4 -62
  62. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +98 -80
  63. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +27 -31
  64. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue2.js +2 -13
  65. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +4 -72
  66. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +83 -47
  67. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +21 -19
  68. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue2.js +2 -13
  69. package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +45 -76
  70. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +4 -100
  71. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +91 -16
  72. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +4 -79
  73. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +111 -88
  74. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +17 -15
  75. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue2.js +2 -13
  76. package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js +33 -39
  77. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +4 -220
  78. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +256 -146
  79. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue.js +41 -39
  80. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue2.js +2 -13
  81. package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +163 -233
  82. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js +4 -164
  83. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +175 -87
  84. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js +4 -73
  85. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +58 -32
  86. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js +4 -47
  87. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js +23 -10
  88. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js +4 -52
  89. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue2.js +26 -8
  90. package/dist/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js +220 -299
  91. package/dist/components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js +35 -41
  92. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +4 -306
  93. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +314 -131
  94. package/dist/components/2_chatlist_elements/ChatItem/icons/AudioIcon.vue.js +12 -18
  95. package/dist/components/2_chatlist_elements/ChatItem/icons/FileIcon.vue.js +11 -23
  96. package/dist/components/2_chatlist_elements/ChatItem/icons/ImageIcon.vue.js +7 -7
  97. package/dist/components/2_chatlist_elements/ChatItem/icons/MissedCallIcon.vue.js +22 -34
  98. package/dist/components/2_chatlist_elements/ChatItem/icons/StickerIcon.vue.js +9 -15
  99. package/dist/components/2_chatlist_elements/ChatItem/icons/VideoIcon.vue.js +14 -26
  100. package/dist/components/2_chatlist_elements/ChatItem/icons/VoiceIcon.vue.js +7 -7
  101. package/dist/components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js +24 -52
  102. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +4 -84
  103. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +68 -36
  104. package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +37 -71
  105. package/dist/components/2_elements/ChatInfo/ChatInfo.vue.js +62 -83
  106. package/dist/components/2_elements/ChatPanel/ChatPanel.vue.js +29 -41
  107. package/dist/components/2_elements/ContactInfo/ContactInfo.vue.js +115 -176
  108. package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +27 -48
  109. package/dist/components/2_elements/UserProfile/UserProfile.vue.js +28 -58
  110. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +4 -54
  111. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +42 -22
  112. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +4 -460
  113. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +499 -181
  114. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js +4 -19
  115. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue2.js +22 -12
  116. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +4 -26
  117. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +39 -26
  118. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +4 -482
  119. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +448 -148
  120. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue.js +19 -17
  121. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue2.js +2 -13
  122. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue.js +19 -17
  123. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue2.js +2 -13
  124. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue.js +4 -17
  125. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue2.js +7 -7
  126. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js +3 -16
  127. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue2.js +7 -7
  128. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +4 -67
  129. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +43 -11
  130. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js +4 -47
  131. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue2.js +46 -37
  132. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js +4 -22
  133. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue2.js +15 -8
  134. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js +4 -43
  135. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue2.js +25 -10
  136. package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue.js +4 -52
  137. package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue2.js +39 -16
  138. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +4 -270
  139. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +274 -95
  140. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +4 -409
  141. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +422 -143
  142. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js +4 -39
  143. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +22 -12
  144. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +4 -57
  145. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +69 -41
  146. package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue.js +4 -97
  147. package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue2.js +173 -102
  148. package/dist/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.js +20 -32
  149. package/dist/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.js +20 -32
  150. package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +11 -17
  151. package/dist/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.js +10 -16
  152. package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +11 -17
  153. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue.js +4 -22
  154. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue2.js +23 -17
  155. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +4 -28
  156. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +29 -27
  157. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +4 -142
  158. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +121 -33
  159. package/dist/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.js +22 -34
  160. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +4 -55
  161. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +30 -8
  162. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +4 -47
  163. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +25 -9
  164. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +4 -56
  165. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +37 -8
  166. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +4 -72
  167. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +59 -10
  168. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +4 -142
  169. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +118 -34
  170. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +4 -49
  171. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +53 -15
  172. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +4 -94
  173. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +76 -10
  174. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue.js +4 -18
  175. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue2.js +17 -9
  176. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +4 -348
  177. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +339 -97
  178. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue.js +4 -17
  179. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue2.js +7 -7
  180. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +4 -308
  181. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +299 -89
  182. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue.js +4 -37
  183. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue2.js +21 -7
  184. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +4 -321
  185. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +338 -96
  186. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.js +4 -64
  187. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue3.js +45 -10
  188. package/dist/components/2_modals/CreateChat/CreateChat.vue.js +19 -36
  189. package/dist/components/2_modals/CreateChat2/CreateChat2.vue.js +92 -140
  190. package/dist/components/2_modals/CreateDialog/CreateDialog.vue.js +49 -96
  191. package/dist/components/2_modals/Modal/Modal.vue.js +50 -59
  192. package/dist/components/2_modals/ModalFullscreen/ModalFullscreen.vue.js +38 -51
  193. package/dist/components/2_modals/ModalNoFooter/ModalNoFooter.vue.js +30 -39
  194. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +4 -155
  195. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js +121 -49
  196. package/dist/components/2_modals/SelectUser/SelectUser.vue.js +43 -60
  197. package/dist/components/2_modals/SelectUser2/SelectUser2.vue.js +24 -41
  198. package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +4 -170
  199. package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +336 -239
  200. package/dist/components/3_compounds/ChatInput/icons/ArrowIcon.vue.js +25 -43
  201. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue.js +21 -25
  202. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue2.js +2 -13
  203. package/dist/components/3_compounds/ChatList/ChatList.vue.js +166 -256
  204. package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +39 -57
  205. package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +6 -6
  206. package/dist/components/3_compounds/Feed/Feed.vue.js +4 -185
  207. package/dist/components/3_compounds/Feed/Feed.vue2.js +314 -161
  208. package/dist/components/3_compounds/Feed/composables/useFeedScroll.js +19 -17
  209. package/dist/components/3_compounds/SideBar/SideBar.vue.js +202 -279
  210. package/dist/components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js +36 -43
  211. package/dist/components/4_layouts/BaseLayout/BaseLayout.vue.js +5 -5
  212. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue.js +4 -32
  213. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue2.js +29 -7
  214. package/dist/components/4_layouts/ExtendedLayout/ExtendedLayout.vue.js +7 -7
  215. package/dist/components/4_layouts/FeedLayout/FeedLayout.vue.js +8 -8
  216. package/dist/components/5_containers/BaseContainer/BaseContainer.vue.js +18 -33
  217. package/dist/components/5_containers/FloatContainer/FloatContainer.vue.js +59 -90
  218. package/dist/themes/dark.css +1 -1
  219. package/dist/themes/default.css +1 -1
  220. package/dist/themes/glass.css +1 -1
  221. package/dist/themes/green.css +1 -1
  222. package/dist/themes/mobilon1.css +1 -1
  223. package/dist/types/src/apps/data/chats.d.ts +48 -4
  224. package/dist/types/src/apps/data/messages.d.ts +366 -282
  225. package/dist/types/src/components/2_chatlist_elements/ChatTabs/styles/types.d.ts +2 -0
  226. package/dist/types/src/components/3_compounds/Feed/composables/useFeedScroll.d.ts +2 -0
  227. package/package.json +1 -1
@@ -1,194 +1,377 @@
1
- import { defineComponent as At, inject as Lt, useId as Mt, ref as y, computed as r, watch as _t, onMounted as Vt, nextTick as H, onUnmounted as bt } from "vue";
2
- import { getStatus as Bt, statuses as Dt } from "../../../functions/getStatusMessage.js";
1
+ import { defineComponent as Ft, inject as Pt, useId as Rt, ref as E, computed as l, watch as Wt, onMounted as $t, nextTick as P, onUnmounted as jt, createElementBlock as a, openBlock as o, createElementVNode as m, createCommentVNode as c, withModifiers as Xt, normalizeClass as R, normalizeStyle as ot, createVNode as W, createBlock as d, renderSlot as Yt, withCtx as $, toDisplayString as f, resolveDynamicComponent as at, unref as h, Teleport as Ot, Fragment as zt, renderList as qt } from "vue";
2
+ import { getStatus as Gt, statuses as Jt } from "../../../functions/getStatusMessage.js";
3
3
  import "../../../functions/parseMarkdown.js";
4
- import { t as x } from "../../../locale/useLocale.js";
5
- import { resolveMessageDraftStore as Nt } from "../../../hooks/useMessageDraft.js";
6
- import { useTheme as Pt } from "../../../hooks/useTheme.js";
7
- import { useEmojiNative as Ht } from "../../../hooks/useEmojiNative.js";
4
+ import { t as S } from "../../../locale/useLocale.js";
5
+ import { resolveMessageDraftStore as Kt } from "../../../hooks/useMessageDraft.js";
6
+ import { useTheme as Qt } from "../../../hooks/useTheme.js";
7
+ import { useEmojiNative as Zt } from "../../../hooks/useEmojiNative.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import "../../../node_modules/linkifyjs/dist/linkify.js";
12
12
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
13
- import { textToAppleEmojiHtml as j, textContainsEmoji as z } from "../../../functions/renderAppleEmojis.js";
14
- import jt from "../../1_atoms/Tooltip/Tooltip.vue.js";
15
- import Rt from "../../1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
16
- import Ut from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
17
- import Wt from "../../1_icons/AvatarIcon.vue.js";
18
- import Ft from "../../1_icons/VerifiedBadge.vue.js";
19
- import Ot from "../../1_icons/MessageStatus/ErrorStatusIcon.vue.js";
20
- import Xt from "../../1_icons/MessageStatus/PendingStatusIcon.vue.js";
21
- import Yt from "../../1_icons/MessageStatus/ReadStatusIcon.vue.js";
22
- import qt from "../../1_icons/MessageStatus/ReceivedStatusIcon.vue.js";
23
- import $t from "../../1_icons/MessageStatus/SentStatusIcon.vue.js";
24
- import G from "./icons/AudioIcon.vue.js";
25
- import R from "./icons/FileIcon.vue.js";
26
- import J from "./icons/ImageIcon.vue.js";
27
- import zt from "./icons/MissedCallIcon.vue.js";
28
- import U from "./icons/StickerIcon.vue.js";
29
- import K from "./icons/VideoIcon.vue.js";
30
- import Q from "./icons/VoiceIcon.vue.js";
31
- import Gt from "../../1_icons/DeletedMessageIcon.vue.js";
32
- const Ae = /* @__PURE__ */ At({
13
+ import { textToAppleEmojiHtml as j, textContainsEmoji as st } from "../../../functions/renderAppleEmojis.js";
14
+ import ct from "../../1_atoms/Tooltip/Tooltip.vue.js";
15
+ import te from "../../1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
16
+ import ee from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
17
+ import ne from "../../1_icons/AvatarIcon.vue.js";
18
+ import ie from "../../1_icons/VerifiedBadge.vue.js";
19
+ import oe from "../../1_icons/MessageStatus/ErrorStatusIcon.vue.js";
20
+ import ae from "../../1_icons/MessageStatus/PendingStatusIcon.vue.js";
21
+ import se from "../../1_icons/MessageStatus/ReadStatusIcon.vue.js";
22
+ import ce from "../../1_icons/MessageStatus/ReceivedStatusIcon.vue.js";
23
+ import re from "../../1_icons/MessageStatus/SentStatusIcon.vue.js";
24
+ import rt from "./icons/AudioIcon.vue.js";
25
+ import X from "./icons/FileIcon.vue.js";
26
+ import lt from "./icons/ImageIcon.vue.js";
27
+ import le from "./icons/MissedCallIcon.vue.js";
28
+ import Y from "./icons/StickerIcon.vue.js";
29
+ import ut from "./icons/VideoIcon.vue.js";
30
+ import mt from "./icons/VoiceIcon.vue.js";
31
+ import ue from "../../1_icons/DeletedMessageIcon.vue.js";
32
+ const me = ["data-chat-id"], de = { class: "chat-item__avatar-container" }, he = ["src"], fe = {
33
+ key: 1,
34
+ class: "chat-item__avatar-placeholder"
35
+ }, ve = { class: "chat-item__info-container" }, ge = { class: "chat-item__title-row" }, ye = ["innerHTML"], pe = {
36
+ key: 1,
37
+ class: "chat-item__name"
38
+ }, _e = {
39
+ key: 0,
40
+ class: "chat-item__last-message"
41
+ }, xe = {
42
+ key: 1,
43
+ class: "chat-item__last-message-text chat-item__last-message-text--draft"
44
+ }, ke = { class: "chat-item__draft-label" }, we = ["innerHTML"], Ce = {
45
+ key: 2,
46
+ class: "chat-item__draft-text"
47
+ }, Ie = ["innerHTML"], Te = {
48
+ key: 3,
49
+ class: "chat-item__last-message-text"
50
+ }, Me = { class: "chat-item__details-container" }, Ee = {
51
+ key: 0,
52
+ class: "chat-item__time"
53
+ }, Se = { class: "chat-item__status-unread-container" }, Le = {
54
+ key: 1,
55
+ class: "chat-item__unread"
56
+ }, be = {
57
+ key: 2,
58
+ class: "chat-item__status-chat-container"
59
+ }, Ae = {
60
+ key: 0,
61
+ class: "chat-item__fixed pi pi-thumbtack"
62
+ }, Be = {
63
+ key: 0,
64
+ id: "noSelectButton",
65
+ class: "chat-item__menu-button"
66
+ }, De = {
67
+ key: 1,
68
+ id: "noSelectButton",
69
+ class: "chat-item__menu-button"
70
+ }, Ve = {
71
+ key: 0,
72
+ class: "dialog__container"
73
+ }, He = ["onClick"], Ne = ["src"], Ue = {
74
+ key: 1,
75
+ class: "dialog__icon pi pi-user"
76
+ }, Fe = { class: "dialog__text-container" }, Pe = { class: "dialog__name" }, Re = { class: "dialog__time" }, _n = /* @__PURE__ */ Ft({
33
77
  __name: "ChatItem",
34
78
  props: {
35
- chat: { type: Object, required: !0 },
36
- showDialogs: { type: Boolean, required: !1, default: !0 },
37
- contextMenuTrigger: { type: String, required: !1, default: "hover" }
79
+ chat: {},
80
+ showDialogs: { type: Boolean, default: !0 },
81
+ contextMenuTrigger: { default: "hover" }
38
82
  },
39
83
  emits: ["select", "action", "expand"],
40
- setup(Z, { expose: tt, emit: et }) {
41
- tt();
42
- const m = Lt("chatAppId"), { getTheme: nt } = Pt(m), { isNative: A, emojiSrc: I } = Ht(m), W = Nt(String(m ?? "")), e = Z, w = et, a = Mt(), C = y(!1), f = y(!1), S = y(!1), it = y(null), L = r(
84
+ setup(s, { emit: dt }) {
85
+ const L = Pt("chatAppId"), { getTheme: O } = Qt(L), { isNative: z, emojiSrc: B } = Zt(L), ht = Kt(String(L ?? "")), e = s, b = dt, y = Rt(), p = E(!1), x = E(!1), D = E(!1), ft = E(null), k = l(
43
86
  () => {
44
87
  var t;
45
88
  return (((t = e.chat.actions) == null ? void 0 : t.length) ?? 0) > 0;
46
89
  }
47
- ), ot = () => {
48
- S.value = !0;
49
- }, rt = (t) => {
50
- S.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" && w("select", { chat: e.chat, dialog: null }), S.value = !1;
51
- }, ct = (t) => {
52
- w("select", { chat: e.chat, dialog: t });
53
- }, st = () => e.chat.isSelected ? "chat-item__selected" : "", ut = (t) => t.isSelected ? "dialog__selected" : "", at = (t) => {
54
- e.contextMenuTrigger === "rightClick" && T(), w("action", { chat: e.chat, ...t });
55
- }, T = () => {
56
- const t = document.getElementById("context-menu-rightclick-" + a);
57
- t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none"), f.value = !1;
58
- }, F = () => {
90
+ ), vt = () => {
91
+ D.value = !0;
92
+ }, gt = (t) => {
93
+ D.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" && b("select", { chat: e.chat, dialog: null }), D.value = !1;
94
+ }, yt = (t) => {
95
+ b("select", { chat: e.chat, dialog: t });
96
+ }, pt = () => e.chat.isSelected ? "chat-item__selected" : "", _t = (t) => t.isSelected ? "dialog__selected" : "", q = (t) => {
97
+ e.contextMenuTrigger === "rightClick" && V(), b("action", { chat: e.chat, ...t });
98
+ }, V = () => {
99
+ const t = document.getElementById("context-menu-rightclick-" + y);
100
+ t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none"), x.value = !1;
101
+ }, xt = () => {
59
102
  document.querySelectorAll('[id^="context-menu-rightclick-"]').forEach((n) => {
60
103
  const i = n;
61
- i.id !== "context-menu-rightclick-" + a && (i.style.top = "0", i.style.left = "0", i.style.opacity = "0", i.style.display = "none");
104
+ i.id !== "context-menu-rightclick-" + y && (i.style.top = "0", i.style.left = "0", i.style.opacity = "0", i.style.display = "none");
62
105
  });
63
- }, lt = () => e.chat.dialogs ? [...e.chat.dialogs].sort((t, n) => Number(t["lastActivity.timestamp"]) > Number(n["lastActivity.timestamp"]) ? -1 : Number(t["lastActivity.timestamp"]) < Number(n["lastActivity.timestamp"]) ? 1 : (Number(t["lastActivity.timestamp"]) == Number(n["lastActivity.timestamp"]), 0)) : [], mt = r(() => Bt(e.chat["lastMessage.status"])), ft = r(() => e.chat.showEmptyIndicator || e.chat.countUnread > 0), dt = r(() => e.chat.countUnread > 0 ? e.chat.countUnread > 99 ? "99+" : e.chat.countUnread : e.chat.showEmptyIndicator ? "" : void 0);
64
- let l;
65
- const u = y(0), M = [x("component.ChatItem.typing") + ".", x("component.ChatItem.typing") + "..", x("component.ChatItem.typing") + "..."], O = x("component.DeletedMessageContent.text"), E = (t) => typeof t != "string" && (t == null ? void 0 : t.deleted) === !0, _ = (t) => {
66
- var c, o, s;
106
+ }, kt = () => e.chat.dialogs ? [...e.chat.dialogs].sort((t, n) => Number(t["lastActivity.timestamp"]) > Number(n["lastActivity.timestamp"]) ? -1 : Number(t["lastActivity.timestamp"]) < Number(n["lastActivity.timestamp"]) ? 1 : (Number(t["lastActivity.timestamp"]) == Number(n["lastActivity.timestamp"]), 0)) : [], wt = l(() => Gt(e.chat["lastMessage.status"])), Ct = l(() => e.chat.showEmptyIndicator || e.chat.countUnread > 0), It = l(() => e.chat.countUnread > 0 ? e.chat.countUnread > 99 ? "99+" : e.chat.countUnread : e.chat.showEmptyIndicator ? "" : void 0);
107
+ let A;
108
+ const _ = E(0), G = [S("component.ChatItem.typing") + ".", S("component.ChatItem.typing") + "..", S("component.ChatItem.typing") + "..."], Tt = S("component.DeletedMessageContent.text"), H = (t) => typeof t != "string" && (t == null ? void 0 : t.deleted) === !0, J = (t) => {
109
+ var u, r, v;
67
110
  if (typeof t == "string")
68
111
  return t;
69
112
  if ((t == null ? void 0 : t.type) === "message.sticker")
70
113
  return "Стикер";
71
114
  if ((t == null ? void 0 : t.type) === "message.audio")
72
- return (t.isVoiceMessage || ((c = t == null ? void 0 : t.data) == null ? void 0 : c.isVoiceMessage)) === !0 ? "Голосовое сообщение" : "Аудиофайл";
115
+ return (t.isVoiceMessage || ((u = t == null ? void 0 : t.data) == null ? void 0 : u.isVoiceMessage)) === !0 ? "Голосовое сообщение" : "Аудиофайл";
73
116
  if ((t == null ? void 0 : t.type) === "message.missedCall")
74
117
  return "Пропущенный звонок";
75
- const n = (o = t == null ? void 0 : t.data) == null ? void 0 : o.text;
118
+ const n = (r = t == null ? void 0 : t.data) == null ? void 0 : r.text;
76
119
  if (n)
77
120
  return n;
78
- const i = (s = t == null ? void 0 : t.data) == null ? void 0 : s.filename;
121
+ const i = (v = t == null ? void 0 : t.data) == null ? void 0 : v.filename;
79
122
  return i || "";
80
- }, V = (t) => E(t) ? O : _(t), X = (t) => typeof t == "string" ? null : (t == null ? void 0 : t.type) || null, b = x("component.ChatItem.draft"), k = r(() => {
123
+ }, K = (t) => H(t) ? Tt : J(t), Mt = (t) => typeof t == "string" ? null : (t == null ? void 0 : t.type) || null, N = S("component.ChatItem.draft"), U = l(() => {
81
124
  var n;
82
- const t = W.getChatDraft(String(m ?? ""), e.chat.chatId);
125
+ const t = ht.getChatDraft(String(L ?? ""), e.chat.chatId);
83
126
  if (!(!t || t.edit) && !(!t.listPreviewText && !t.listPreviewFile) && !(!(t.text || "").trim() && !t.file && !((n = t.files) != null && n.length)))
84
127
  return t;
85
- }), B = r(() => !!k.value), d = r(() => {
128
+ }), w = l(() => !!U.value), g = l(() => {
86
129
  var n;
87
- const t = k.value;
130
+ const t = U.value;
88
131
  return t ? t.file ? (((n = t.listPreviewFile) == null ? void 0 : n.name) || t.file.name || "").trim() : (t.listPreviewText || "").trim() : "";
89
- }), pt = r(() => {
90
- const t = k.value;
132
+ }), Q = l(() => {
133
+ const t = U.value;
91
134
  if (!(t != null && t.file)) return null;
92
- const n = t.listPreviewFile, i = ((n == null ? void 0 : n.type) || t.file.type || "").toLowerCase(), c = ((n == null ? void 0 : n.name) || t.file.name || "").toLowerCase();
93
- return i === "sticker" || c.endsWith(".tgs") || c.endsWith(".webp") ? U : i === "image" || i.includes("image") ? J : i === "video" || i.includes("video") ? K : i === "audio" || i.includes("audio") ? c.includes("voice") || c.includes("голос") ? Q : G : i === "file" || c ? R : R;
94
- }), ht = r(() => j(d.value || "", null, I.value)), gt = r(() => {
95
- var n, i, c;
96
- if (e.chat.typing || B.value)
135
+ const n = t.listPreviewFile, i = ((n == null ? void 0 : n.type) || t.file.type || "").toLowerCase(), u = ((n == null ? void 0 : n.name) || t.file.name || "").toLowerCase();
136
+ return i === "sticker" || u.endsWith(".tgs") || u.endsWith(".webp") ? Y : i === "image" || i.includes("image") ? lt : i === "video" || i.includes("video") ? ut : i === "audio" || i.includes("audio") ? u.includes("voice") || u.includes("голос") ? mt : rt : i === "file" || u ? X : X;
137
+ }), Et = l(() => j(g.value || "", null, B.value)), Z = l(() => {
138
+ var n, i, u;
139
+ if (e.chat.typing || w.value)
97
140
  return null;
98
- if (E(e.chat.lastMessage))
99
- return Gt;
100
- const t = X(e.chat.lastMessage);
141
+ if (H(e.chat.lastMessage))
142
+ return ue;
143
+ const t = Mt(e.chat.lastMessage);
101
144
  if (!t)
102
145
  return null;
103
146
  if (t === "message.sticker")
104
- return U;
147
+ return Y;
105
148
  if (t === "message.image")
106
- return J;
149
+ return lt;
107
150
  if (t === "message.video")
108
- return K;
151
+ return ut;
109
152
  if (t === "message.audio") {
110
- const o = e.chat.lastMessage;
111
- return (o.isVoiceMessage || ((n = o == null ? void 0 : o.data) == null ? void 0 : n.isVoiceMessage)) === !0 ? Q : G;
153
+ const r = e.chat.lastMessage;
154
+ return (r.isVoiceMessage || ((n = r == null ? void 0 : r.data) == null ? void 0 : n.isVoiceMessage)) === !0 ? mt : rt;
112
155
  }
113
156
  if (t === "message.missedCall")
114
- return zt;
157
+ return le;
115
158
  if (t === "message.file") {
116
- const o = e.chat.lastMessage, s = ((c = (i = o == null ? void 0 : o.data) == null ? void 0 : i.filename) == null ? void 0 : c.toLowerCase()) || "";
117
- return s.endsWith(".tgs") || s.endsWith(".webp") ? U : R;
159
+ const r = e.chat.lastMessage, v = ((u = (i = r == null ? void 0 : r.data) == null ? void 0 : i.filename) == null ? void 0 : u.toLowerCase()) || "";
160
+ return v.endsWith(".tgs") || v.endsWith(".webp") ? Y : X;
118
161
  }
119
162
  return null;
120
- }), vt = r(() => e.chat.typing ? M[u.value] : B.value ? d.value ? `${b} ${d.value}` : b : E(e.chat.lastMessage) ? _(e.chat.lastMessage) : V(e.chat.lastMessage)), D = r(() => e.chat.typing ? M[u.value] : V(e.chat.lastMessage)), yt = r(
121
- () => !A.value && z(d.value || D.value || "")
122
- ), xt = r(
123
- () => !A.value && z(e.chat.name || "")
124
- ), It = r(() => j(D.value || "", null, I.value)), wt = r(() => j(e.chat.name || "", null, I.value));
125
- _t(
163
+ }), St = l(() => e.chat.typing ? G[_.value] : w.value ? g.value ? `${N} ${g.value}` : N : H(e.chat.lastMessage) ? J(e.chat.lastMessage) : K(e.chat.lastMessage)), F = l(() => e.chat.typing ? G[_.value] : K(e.chat.lastMessage)), tt = l(
164
+ () => !z.value && st(g.value || F.value || "")
165
+ ), Lt = l(
166
+ () => !z.value && st(e.chat.name || "")
167
+ ), bt = l(() => j(F.value || "", null, B.value)), At = l(() => j(e.chat.name || "", null, B.value));
168
+ Wt(
126
169
  () => e.chat.typing,
127
170
  () => {
128
- e.chat.typing ? l = setInterval(() => {
129
- u.value < 2 ? u.value += 1 : u.value = 0;
130
- }, 1e3) : (u.value = 0, l && (clearInterval(l), l = void 0));
171
+ e.chat.typing ? A = setInterval(() => {
172
+ _.value < 2 ? _.value += 1 : _.value = 0;
173
+ }, 1e3) : (_.value = 0, A && (clearInterval(A), A = void 0));
131
174
  },
132
175
  { immediate: !0 }
133
176
  );
134
- const Ct = () => {
135
- e.contextMenuTrigger === "hover" && L.value && (C.value = !0);
136
- }, St = (t) => {
137
- e.contextMenuTrigger === "hover" && (t.relatedTarget instanceof HTMLElement && t.relatedTarget.className == "context-menu__list" ? C.value = !0 : C.value = !1);
138
- }, Tt = (t) => {
139
- e.contextMenuTrigger === "rightClick" && L.value && Y(t);
140
- }, Y = (t) => {
141
- F(), f.value = !0, H(() => {
142
- const n = document.getElementById("context-menu-rightclick-" + a);
177
+ const Bt = () => {
178
+ e.contextMenuTrigger === "hover" && k.value && (p.value = !0);
179
+ }, Dt = (t) => {
180
+ e.contextMenuTrigger === "hover" && (t.relatedTarget instanceof HTMLElement && t.relatedTarget.className == "context-menu__list" ? p.value = !0 : p.value = !1);
181
+ }, Vt = (t) => {
182
+ e.contextMenuTrigger === "rightClick" && k.value && Ht(t);
183
+ }, Ht = (t) => {
184
+ xt(), x.value = !0, P(() => {
185
+ const n = document.getElementById("context-menu-rightclick-" + y);
143
186
  if (n) {
144
- const i = t.clientX, c = t.clientY;
187
+ const i = t.clientX, u = t.clientY;
145
188
  n.style.display = "inherit";
146
- const o = n.getBoundingClientRect();
147
- n.style.display = "none", H(() => {
148
- const s = window.innerWidth, $ = window.innerHeight, p = window.scrollX || window.pageXOffset, h = window.scrollY || window.pageYOffset;
149
- let g = i + p, v = c + h;
150
- g + o.width > s + p && (g = i + p - o.width), v + o.height > $ + h && (v = c + h - o.height), g < p && (g = p), v < h && (v = h), n.style.top = v + "px", n.style.left = g + "px", n.style.opacity = "1", n.style.display = "inherit";
189
+ const r = n.getBoundingClientRect();
190
+ n.style.display = "none", P(() => {
191
+ const v = window.innerWidth, it = window.innerHeight, C = window.scrollX || window.pageXOffset, I = window.scrollY || window.pageYOffset;
192
+ let T = i + C, M = u + I;
193
+ T + r.width > v + C && (T = i + C - r.width), M + r.height > it + I && (M = u + I - r.height), T < C && (T = C), M < I && (M = I), n.style.top = M + "px", n.style.left = T + "px", n.style.opacity = "1", n.style.display = "inherit";
151
194
  });
152
195
  }
153
196
  });
154
- }, Et = () => {
155
- }, kt = () => {
156
- }, N = (t) => {
157
- if (e.contextMenuTrigger === "rightClick" && f.value) {
158
- const n = t.target, i = document.getElementById("context-menu-rightclick-" + a);
159
- (!i || !i.contains(n)) && T();
197
+ }, Nt = () => {
198
+ }, Ut = () => {
199
+ }, et = (t) => {
200
+ if (e.contextMenuTrigger === "rightClick" && x.value) {
201
+ const n = t.target, i = document.getElementById("context-menu-rightclick-" + y);
202
+ (!i || !i.contains(n)) && V();
160
203
  }
161
- }, P = () => {
162
- e.contextMenuTrigger === "rightClick" && f.value && T();
204
+ }, nt = () => {
205
+ e.contextMenuTrigger === "rightClick" && x.value && V();
163
206
  };
164
- Vt(() => {
165
- e.contextMenuTrigger === "rightClick" && (document.addEventListener("click", N), window.addEventListener("scroll", P, !0), H(() => {
166
- const t = document.getElementById("context-menu-rightclick-" + a);
207
+ return $t(() => {
208
+ e.contextMenuTrigger === "rightClick" && (document.addEventListener("click", et), window.addEventListener("scroll", nt, !0), P(() => {
209
+ const t = document.getElementById("context-menu-rightclick-" + y);
167
210
  t && (t.style.display = "none", t.style.opacity = "0");
168
211
  }));
169
- }), bt(() => {
170
- document.removeEventListener("click", N), window.removeEventListener("scroll", P, !0);
171
- });
172
- const q = { chatAppId: m, getTheme: nt, isNative: A, emojiSrc: I, messageDraftStore: W, props: e, emit: w, contextMenuId: a, buttonMenuVisible: C, contextMenuVisible: f, preventEmit: S, containerRef: it, hasChatActions: L, BCMclick: ot, selectChat: rt, selectDialog: ct, getClass: st, getDialogClass: ut, clickAction: at, hideContextMenu: T, closeAllOtherContextMenus: F, getSortedDialogs: lt, status: mt, showChatUnread: ft, chatUnreadText: dt, get timer() {
173
- return l;
174
- }, set timer(t) {
175
- l = t;
176
- }, typingIndex: u, typingText: M, deletedMessageLabel: O, isLastMessageDeleted: E, getLastMessageOriginalText: _, getLastMessageText: V, getMessageType: X, draftLabel: b, draftSnapshot: k, hasDraftPreview: B, draftPreview: d, draftFileIcon: pt, draftTextHtml: ht, messageIcon: gt, lastMessageTooltipText: vt, showText: D, useAppleEmojisInLastMessage: yt, useAppleEmojisInName: xt, lastMessageHtml: It, nameHtml: wt, onMouseEnter: Ct, onMouseLeave: St, onRightClick: Tt, showContextMenu: Y, onContextMenuMouseEnter: Et, onContextMenuMouseLeave: kt, handleClickOutside: N, handleScroll: P, get statuses() {
177
- return Dt;
178
- }, Tooltip: jt, ButtonContextMenu: Rt, ContextMenu: Ut, AvatarIcon: Wt, VerifiedBadge: Ft, get ErrorStatusIcon() {
179
- return Ot;
180
- }, get PendingStatusIcon() {
181
- return Xt;
182
- }, get ReadStatusIcon() {
183
- return Yt;
184
- }, get ReceivedStatusIcon() {
185
- return qt;
186
- }, get SentStatusIcon() {
187
- return $t;
188
- } };
189
- return Object.defineProperty(q, "__isScriptSetup", { enumerable: !1, value: !0 }), q;
212
+ }), jt(() => {
213
+ document.removeEventListener("click", et), window.removeEventListener("scroll", nt, !0);
214
+ }), (t, n) => (o(), a("div", null, [
215
+ m("div", {
216
+ ref_key: "containerRef",
217
+ ref: ft,
218
+ class: R(["chat-item__container", pt()]),
219
+ "data-testid": "chat-item",
220
+ "data-chat-id": e.chat.chatId,
221
+ onMouseenter: Bt,
222
+ onMouseleave: Dt,
223
+ onClick: gt,
224
+ onContextmenu: Xt(Vt, ["prevent"])
225
+ }, [
226
+ m("div", de, [
227
+ m("span", {
228
+ class: "chat-item__status-user",
229
+ style: ot({ backgroundColor: e.chat.status })
230
+ }, null, 4),
231
+ e.chat.avatar ? (o(), a("img", {
232
+ key: 0,
233
+ src: e.chat.avatar,
234
+ height: "48",
235
+ width: "48"
236
+ }, null, 8, he)) : (o(), a("div", fe, [
237
+ W(ne)
238
+ ]))
239
+ ]),
240
+ m("div", ve, [
241
+ m("div", ge, [
242
+ W(ct, {
243
+ text: s.chat.name,
244
+ position: "bottom"
245
+ }, {
246
+ default: $(() => [
247
+ Lt.value ? (o(), a("div", {
248
+ key: 0,
249
+ class: "chat-item__name",
250
+ innerHTML: At.value
251
+ }, null, 8, ye)) : (o(), a("div", pe, f(s.chat.name), 1))
252
+ ]),
253
+ _: 1
254
+ }, 8, ["text"]),
255
+ s.chat.verified ? (o(), d(ie, { key: 0 })) : c("", !0),
256
+ Yt(t.$slots, "name-suffix", {}, void 0, !0)
257
+ ]),
258
+ W(ct, {
259
+ text: St.value,
260
+ position: "bottom"
261
+ }, {
262
+ default: $(() => [
263
+ s.chat.lastMessage || s.chat.typing || w.value ? (o(), a("div", _e, [
264
+ Z.value && !w.value ? (o(), d(at(Z.value), {
265
+ key: 0,
266
+ class: "chat-item__message-icon"
267
+ })) : c("", !0),
268
+ w.value ? (o(), a("span", xe, [
269
+ m("span", ke, f(h(N)), 1),
270
+ Q.value ? (o(), d(at(Q.value), {
271
+ key: 0,
272
+ class: "chat-item__message-icon"
273
+ })) : c("", !0),
274
+ g.value && tt.value ? (o(), a("span", {
275
+ key: 1,
276
+ class: "chat-item__draft-text",
277
+ innerHTML: Et.value
278
+ }, null, 8, we)) : g.value ? (o(), a("span", Ce, f(g.value), 1)) : c("", !0)
279
+ ])) : tt.value ? (o(), a("span", {
280
+ key: 2,
281
+ class: "chat-item__last-message-text",
282
+ innerHTML: bt.value
283
+ }, null, 8, Ie)) : (o(), a("span", Te, f(F.value), 1))
284
+ ])) : c("", !0)
285
+ ]),
286
+ _: 1
287
+ }, 8, ["text"])
288
+ ]),
289
+ m("div", Me, [
290
+ s.chat["lastActivity.time"] && (!k.value || !p.value) ? (o(), a("div", Ee, f(s.chat["lastActivity.time"]), 1)) : c("", !0),
291
+ p.value && k.value && s.contextMenuTrigger === "hover" ? (o(), d(te, {
292
+ key: 1,
293
+ mode: "click",
294
+ "menu-side": "bottom-right",
295
+ actions: s.chat.actions,
296
+ onClick: q,
297
+ onButtonClick: vt,
298
+ onMenuMouseLeave: n[0] || (n[0] = (i) => p.value = !1)
299
+ }, {
300
+ default: $(() => [...n[2] || (n[2] = [
301
+ m("span", { class: "pi pi-ellipsis-h chat-item__actions-trigger" }, null, -1)
302
+ ])]),
303
+ _: 1
304
+ }, 8, ["actions"])) : c("", !0),
305
+ (o(), d(Ot, { to: "body" }, [
306
+ s.contextMenuTrigger === "rightClick" && k.value && x.value ? (o(), d(ee, {
307
+ key: 0,
308
+ id: "context-menu-rightclick-" + h(y),
309
+ actions: s.chat.actions,
310
+ "data-theme": h(O)().theme ? h(O)().theme : "light",
311
+ onClick: q,
312
+ onMouseenter: Nt,
313
+ onMouseleave: Ut
314
+ }, null, 8, ["id", "actions", "data-theme"])) : c("", !0)
315
+ ])),
316
+ m("div", Se, [
317
+ h(Jt).includes(s.chat["lastMessage.status"]) ? (o(), a("div", {
318
+ key: 0,
319
+ class: R(["chat-item__status-message", wt.value])
320
+ }, [
321
+ s.chat["lastMessage.status"] === "pending" ? (o(), d(h(ae), { key: 0 })) : s.chat["lastMessage.status"] === "error" ? (o(), d(h(oe), { key: 1 })) : s.chat["lastMessage.status"] === "read" ? (o(), d(h(se), { key: 2 })) : s.chat["lastMessage.status"] === "received" ? (o(), d(h(ce), { key: 3 })) : (o(), d(h(re), { key: 4 }))
322
+ ], 2)) : c("", !0),
323
+ Ct.value ? (o(), a("div", Le, f(It.value), 1)) : c("", !0)
324
+ ]),
325
+ s.chat.countUnread < 1 ? (o(), a("div", be, [
326
+ s.chat.isFixedTop || s.chat.isFixedBottom ? (o(), a("span", Ae)) : c("", !0)
327
+ ])) : c("", !0)
328
+ ]),
329
+ e.showDialogs && s.chat.dialogs ? (o(), a("div", {
330
+ key: 0,
331
+ class: "chat-item__dialog-buttons",
332
+ onClick: n[1] || (n[1] = (i) => b("expand", e.chat))
333
+ }, [
334
+ e.showDialogs && !s.chat.dialogsExpanded ? (o(), a("button", Be, [...n[3] || (n[3] = [
335
+ m("span", {
336
+ id: "noSelectButton",
337
+ class: "pi pi-angle-down"
338
+ }, null, -1)
339
+ ])])) : c("", !0),
340
+ e.showDialogs && s.chat.dialogsExpanded ? (o(), a("button", De, [...n[4] || (n[4] = [
341
+ m("span", {
342
+ id: "noSelectButton",
343
+ class: "pi pi-angle-up"
344
+ }, null, -1)
345
+ ])])) : c("", !0)
346
+ ])) : c("", !0)
347
+ ], 42, me),
348
+ e.showDialogs && s.chat.dialogsExpanded ? (o(), a("div", Ve, [
349
+ (o(!0), a(zt, null, qt(kt(), (i) => (o(), a("div", {
350
+ key: i.dialogId,
351
+ class: R(["dialog__item", _t(i)]),
352
+ onClick: (u) => yt(i)
353
+ }, [
354
+ i.icon ? (o(), a("img", {
355
+ key: 0,
356
+ class: "dialog__icon",
357
+ src: i.icon,
358
+ height: "16",
359
+ width: "16"
360
+ }, null, 8, Ne)) : (o(), a("span", Ue)),
361
+ m("div", Fe, [
362
+ m("div", Pe, f(i.name), 1),
363
+ m("div", Re, f(i["lastActivity.time"]), 1)
364
+ ]),
365
+ i.countUnread > 0 ? (o(), a("div", {
366
+ key: 2,
367
+ class: "chat-item__unread",
368
+ style: ot(i.colorUnread ? { backgroundColor: i.colorUnread } : {})
369
+ }, f(i.countUnread > 99 ? "99+" : i.countUnread), 5)) : c("", !0)
370
+ ], 10, He))), 128))
371
+ ])) : c("", !0)
372
+ ]));
190
373
  }
191
374
  });
192
375
  export {
193
- Ae as default
376
+ _n as default
194
377
  };
@@ -1,30 +1,24 @@
1
1
  import { createElementBlock as e, openBlock as t, createElementVNode as r } from "vue";
2
2
  import n from "../../../../_virtual/_plugin-vue_export-helper.js";
3
- const s = {}, c = {
3
+ const s = {}, i = {
4
4
  width: "800px",
5
5
  height: "800px",
6
6
  viewBox: "0 0 24 24",
7
7
  fill: "none",
8
8
  xmlns: "http://www.w3.org/2000/svg"
9
9
  };
10
- function i(l, o) {
11
- return t(), e("svg", c, [...o[0] || (o[0] = [
12
- r(
13
- "path",
14
- {
15
- d: "M9 19C9 20.1046 7.65685 21 6 21C4.34315 21 3 20.1046 3 19C3 17.8954 4.34315 17 6 17C7.65685 17 9 17.8954 9 19ZM9 19V5L21 3V17M21 17C21 18.1046 19.6569 19 18 19C16.3431 19 15 18.1046 15 17C15 15.8954 16.3431 15 18 15C19.6569 15 21 15.8954 21 17ZM9 9L21 7",
16
- stroke: "currentColor",
17
- "stroke-width": "2",
18
- "stroke-linecap": "round",
19
- "stroke-linejoin": "round"
20
- },
21
- null,
22
- -1
23
- /* CACHED */
24
- )
10
+ function c(l, o) {
11
+ return t(), e("svg", i, [...o[0] || (o[0] = [
12
+ r("path", {
13
+ d: "M9 19C9 20.1046 7.65685 21 6 21C4.34315 21 3 20.1046 3 19C3 17.8954 4.34315 17 6 17C7.65685 17 9 17.8954 9 19ZM9 19V5L21 3V17M21 17C21 18.1046 19.6569 19 18 19C16.3431 19 15 18.1046 15 17C15 15.8954 16.3431 15 18 15C19.6569 15 21 15.8954 21 17ZM9 9L21 7",
14
+ stroke: "currentColor",
15
+ "stroke-width": "2",
16
+ "stroke-linecap": "round",
17
+ "stroke-linejoin": "round"
18
+ }, null, -1)
25
19
  ])]);
26
20
  }
27
- const _ = /* @__PURE__ */ n(s, [["render", i], ["__file", "/var/store/dev-space/repos-projects/chotto/chotto/src/components/2_chatlist_elements/ChatItem/icons/AudioIcon.vue"]]);
21
+ const C = /* @__PURE__ */ n(s, [["render", c]]);
28
22
  export {
29
- _ as default
23
+ C as default
30
24
  };
@@ -7,31 +7,19 @@ const n = {}, l = {
7
7
  fill: "none",
8
8
  xmlns: "http://www.w3.org/2000/svg"
9
9
  };
10
- function c(s, C) {
10
+ function c(i, C) {
11
11
  return o(), t("svg", l, [...C[0] || (C[0] = [
12
- e(
13
- "path",
14
- {
15
- d: "M5.5 7C5.36739 7 5.24021 7.05268 5.14645 7.14645C5.05268 7.24021 5 7.36739 5 7.5C5 7.63261 5.05268 7.75979 5.14645 7.85355C5.24021 7.94732 5.36739 8 5.5 8H10.5C10.6326 8 10.7598 7.94732 10.8536 7.85355C10.9473 7.75979 11 7.63261 11 7.5C11 7.36739 10.9473 7.24021 10.8536 7.14645C10.7598 7.05268 10.6326 7 10.5 7H5.5ZM5 9.5C5 9.36739 5.05268 9.24021 5.14645 9.14645C5.24021 9.05268 5.36739 9 5.5 9H10.5C10.6326 9 10.7598 9.05268 10.8536 9.14645C10.9473 9.24021 11 9.36739 11 9.5C11 9.63261 10.9473 9.75979 10.8536 9.85355C10.7598 9.94732 10.6326 10 10.5 10H5.5C5.36739 10 5.24021 9.94732 5.14645 9.85355C5.05268 9.75979 5 9.63261 5 9.5ZM5 11.5C5 11.3674 5.05268 11.2402 5.14645 11.1464C5.24021 11.0527 5.36739 11 5.5 11H7.5C7.63261 11 7.75979 11.0527 7.85355 11.1464C7.94732 11.2402 8 11.3674 8 11.5C8 11.6326 7.94732 11.7598 7.85355 11.8536C7.75979 11.9473 7.63261 12 7.5 12H5.5C5.36739 12 5.24021 11.9473 5.14645 11.8536C5.05268 11.7598 5 11.6326 5 11.5Z",
16
- fill: "currentColor"
17
- },
18
- null,
19
- -1
20
- /* CACHED */
21
- ),
22
- e(
23
- "path",
24
- {
25
- d: "M9.5 0H4C3.46957 0 2.96086 0.210714 2.58579 0.585786C2.21071 0.960859 2 1.46957 2 2V14C2 14.5304 2.21071 15.0391 2.58579 15.4142C2.96086 15.7893 3.46957 16 4 16H12C12.5304 16 13.0391 15.7893 13.4142 15.4142C13.7893 15.0391 14 14.5304 14 14V4.5L9.5 0ZM9.5 1V3C9.5 3.39782 9.65804 3.77936 9.93934 4.06066C10.2206 4.34196 10.6022 4.5 11 4.5H13V14C13 14.2652 12.8946 14.5196 12.7071 14.7071C12.5196 14.8946 12.2652 15 12 15H4C3.73478 15 3.48043 14.8946 3.29289 14.7071C3.10536 14.5196 3 14.2652 3 14V2C3 1.73478 3.10536 1.48043 3.29289 1.29289C3.48043 1.10536 3.73478 1 4 1H9.5Z",
26
- fill: "currentColor"
27
- },
28
- null,
29
- -1
30
- /* CACHED */
31
- )
12
+ e("path", {
13
+ d: "M5.5 7C5.36739 7 5.24021 7.05268 5.14645 7.14645C5.05268 7.24021 5 7.36739 5 7.5C5 7.63261 5.05268 7.75979 5.14645 7.85355C5.24021 7.94732 5.36739 8 5.5 8H10.5C10.6326 8 10.7598 7.94732 10.8536 7.85355C10.9473 7.75979 11 7.63261 11 7.5C11 7.36739 10.9473 7.24021 10.8536 7.14645C10.7598 7.05268 10.6326 7 10.5 7H5.5ZM5 9.5C5 9.36739 5.05268 9.24021 5.14645 9.14645C5.24021 9.05268 5.36739 9 5.5 9H10.5C10.6326 9 10.7598 9.05268 10.8536 9.14645C10.9473 9.24021 11 9.36739 11 9.5C11 9.63261 10.9473 9.75979 10.8536 9.85355C10.7598 9.94732 10.6326 10 10.5 10H5.5C5.36739 10 5.24021 9.94732 5.14645 9.85355C5.05268 9.75979 5 9.63261 5 9.5ZM5 11.5C5 11.3674 5.05268 11.2402 5.14645 11.1464C5.24021 11.0527 5.36739 11 5.5 11H7.5C7.63261 11 7.75979 11.0527 7.85355 11.1464C7.94732 11.2402 8 11.3674 8 11.5C8 11.6326 7.94732 11.7598 7.85355 11.8536C7.75979 11.9473 7.63261 12 7.5 12H5.5C5.36739 12 5.24021 11.9473 5.14645 11.8536C5.05268 11.7598 5 11.6326 5 11.5Z",
14
+ fill: "currentColor"
15
+ }, null, -1),
16
+ e("path", {
17
+ d: "M9.5 0H4C3.46957 0 2.96086 0.210714 2.58579 0.585786C2.21071 0.960859 2 1.46957 2 2V14C2 14.5304 2.21071 15.0391 2.58579 15.4142C2.96086 15.7893 3.46957 16 4 16H12C12.5304 16 13.0391 15.7893 13.4142 15.4142C13.7893 15.0391 14 14.5304 14 14V4.5L9.5 0ZM9.5 1V3C9.5 3.39782 9.65804 3.77936 9.93934 4.06066C10.2206 4.34196 10.6022 4.5 11 4.5H13V14C13 14.2652 12.8946 14.5196 12.7071 14.7071C12.5196 14.8946 12.2652 15 12 15H4C3.73478 15 3.48043 14.8946 3.29289 14.7071C3.10536 14.5196 3 14.2652 3 14V2C3 1.73478 3.10536 1.48043 3.29289 1.29289C3.48043 1.10536 3.73478 1 4 1H9.5Z",
18
+ fill: "currentColor"
19
+ }, null, -1)
32
20
  ])]);
33
21
  }
34
- const _ = /* @__PURE__ */ r(n, [["render", c], ["__file", "/var/store/dev-space/repos-projects/chotto/chotto/src/components/2_chatlist_elements/ChatItem/icons/FileIcon.vue"]]);
22
+ const f = /* @__PURE__ */ r(n, [["render", c]]);
35
23
  export {
36
- _ as default
24
+ f as default
37
25
  };