@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.
- package/dist/chotto.css +1 -1
- package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js +4 -29
- package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +59 -40
- package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue.js +4 -47
- package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +82 -55
- package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +51 -86
- package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue.js +4 -32
- package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue2.js +28 -7
- package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +35 -22
- package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +2 -30
- package/dist/components/1_atoms/LinkPreview/LinkPreview.vue.js +4 -37
- package/dist/components/1_atoms/LinkPreview/LinkPreview.vue2.js +21 -7
- package/dist/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.js +19 -30
- package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +4 -70
- package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +108 -76
- package/dist/components/1_icons/AvatarIcon.vue.js +8 -8
- package/dist/components/1_icons/CheckIcon.vue.js +13 -26
- package/dist/components/1_icons/CloseButtonIcon.vue.js +10 -16
- package/dist/components/1_icons/CloseIcon.vue.js +10 -16
- package/dist/components/1_icons/ContactCRMIcon.vue.js +10 -16
- package/dist/components/1_icons/DeletedMessageIcon.vue.js +11 -17
- package/dist/components/1_icons/MenuIcon.vue.js +10 -16
- package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue.js +3 -23
- package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue2.js +21 -12
- package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue.js +4 -36
- package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue2.js +26 -11
- package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue.js +3 -23
- package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue2.js +21 -12
- package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js +3 -23
- package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue2.js +20 -11
- package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue.js +4 -33
- package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue2.js +23 -11
- package/dist/components/1_icons/SearchIcon.vue.js +17 -29
- package/dist/components/1_icons/SettingsIcon.vue.js +8 -8
- package/dist/components/1_icons/TelegramIcon.vue.js +20 -32
- package/dist/components/1_icons/VerifiedBadge.vue.js +19 -25
- package/dist/components/1_icons/WhatsAppIcon.vue.js +20 -32
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +402 -552
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.js +58 -101
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +8 -14
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.vue.js +7 -7
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelMaxIcon.vue.js +7 -7
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelPhoneIcon.vue.js +13 -19
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSMSIcon.vue.js +10 -16
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuMaxIcon.vue.js +23 -35
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuPhoneIcon.vue.js +20 -32
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuSMSIcon.vue.js +11 -17
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuTelegramIcon.vue.js +8 -8
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js +20 -32
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelTelegramIcon.vue.js +21 -33
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelUnconfirmedIcon.vue.js +7 -7
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelWhatsAppIcon.vue.js +8 -8
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +4 -74
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +46 -12
- package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js +4 -62
- package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue2.js +36 -15
- package/dist/components/2_blocks/FeedSearch/FeedSearch.vue.js +4 -49
- package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +45 -22
- package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue.js +4 -36
- package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +37 -19
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +4 -62
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +98 -80
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +27 -31
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue2.js +2 -13
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +4 -72
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +83 -47
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +21 -19
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue2.js +2 -13
- package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +45 -76
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +4 -100
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +91 -16
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +4 -79
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +111 -88
- package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +17 -15
- package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue2.js +2 -13
- package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js +33 -39
- package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +4 -220
- package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +256 -146
- package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue.js +41 -39
- package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue2.js +2 -13
- package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +163 -233
- package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js +4 -164
- package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +175 -87
- package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js +4 -73
- package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +58 -32
- package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js +4 -47
- package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js +23 -10
- package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js +4 -52
- package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue2.js +26 -8
- package/dist/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js +220 -299
- package/dist/components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js +35 -41
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +4 -306
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +314 -131
- package/dist/components/2_chatlist_elements/ChatItem/icons/AudioIcon.vue.js +12 -18
- package/dist/components/2_chatlist_elements/ChatItem/icons/FileIcon.vue.js +11 -23
- package/dist/components/2_chatlist_elements/ChatItem/icons/ImageIcon.vue.js +7 -7
- package/dist/components/2_chatlist_elements/ChatItem/icons/MissedCallIcon.vue.js +22 -34
- package/dist/components/2_chatlist_elements/ChatItem/icons/StickerIcon.vue.js +9 -15
- package/dist/components/2_chatlist_elements/ChatItem/icons/VideoIcon.vue.js +14 -26
- package/dist/components/2_chatlist_elements/ChatItem/icons/VoiceIcon.vue.js +7 -7
- package/dist/components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js +24 -52
- package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +4 -84
- package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +68 -36
- package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +37 -71
- package/dist/components/2_elements/ChatInfo/ChatInfo.vue.js +62 -83
- package/dist/components/2_elements/ChatPanel/ChatPanel.vue.js +29 -41
- package/dist/components/2_elements/ContactInfo/ContactInfo.vue.js +115 -176
- package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +27 -48
- package/dist/components/2_elements/UserProfile/UserProfile.vue.js +28 -58
- package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +4 -54
- package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +42 -22
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +4 -460
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +499 -181
- package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js +4 -19
- package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue2.js +22 -12
- package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +4 -26
- package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +39 -26
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +4 -482
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +448 -148
- package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue.js +19 -17
- package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue2.js +2 -13
- package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue.js +19 -17
- package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue2.js +2 -13
- package/dist/components/2_feed_elements/DateMessage/DateMessage.vue.js +4 -17
- package/dist/components/2_feed_elements/DateMessage/DateMessage.vue2.js +7 -7
- package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js +3 -16
- package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue2.js +7 -7
- package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +4 -67
- package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +43 -11
- package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js +4 -47
- package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue2.js +46 -37
- package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js +4 -22
- package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue2.js +15 -8
- package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js +4 -43
- package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue2.js +25 -10
- package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue.js +4 -52
- package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue2.js +39 -16
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +4 -270
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +274 -95
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +4 -409
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +422 -143
- package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js +4 -39
- package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +22 -12
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +4 -57
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +69 -41
- package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue.js +4 -97
- package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue2.js +173 -102
- package/dist/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.js +20 -32
- package/dist/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.js +20 -32
- package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +11 -17
- package/dist/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.js +10 -16
- package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +11 -17
- package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue.js +4 -22
- package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue2.js +23 -17
- package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +4 -28
- package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +29 -27
- package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +4 -142
- package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +121 -33
- package/dist/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.js +22 -34
- package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +4 -55
- package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +30 -8
- package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +4 -47
- package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +25 -9
- package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +4 -56
- package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +37 -8
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +4 -72
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +59 -10
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +4 -142
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +118 -34
- package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +4 -49
- package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +53 -15
- package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +4 -94
- package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +76 -10
- package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue.js +4 -18
- package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue2.js +17 -9
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +4 -348
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +339 -97
- package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue.js +4 -17
- package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue2.js +7 -7
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +4 -308
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +299 -89
- package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue.js +4 -37
- package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue2.js +21 -7
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +4 -321
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +338 -96
- package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.js +4 -64
- package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue3.js +45 -10
- package/dist/components/2_modals/CreateChat/CreateChat.vue.js +19 -36
- package/dist/components/2_modals/CreateChat2/CreateChat2.vue.js +92 -140
- package/dist/components/2_modals/CreateDialog/CreateDialog.vue.js +49 -96
- package/dist/components/2_modals/Modal/Modal.vue.js +50 -59
- package/dist/components/2_modals/ModalFullscreen/ModalFullscreen.vue.js +38 -51
- package/dist/components/2_modals/ModalNoFooter/ModalNoFooter.vue.js +30 -39
- package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +4 -155
- package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js +121 -49
- package/dist/components/2_modals/SelectUser/SelectUser.vue.js +43 -60
- package/dist/components/2_modals/SelectUser2/SelectUser2.vue.js +24 -41
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +4 -170
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +336 -239
- package/dist/components/3_compounds/ChatInput/icons/ArrowIcon.vue.js +25 -43
- package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue.js +21 -25
- package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue2.js +2 -13
- package/dist/components/3_compounds/ChatList/ChatList.vue.js +166 -256
- package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +39 -57
- package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +6 -6
- package/dist/components/3_compounds/Feed/Feed.vue.js +4 -185
- package/dist/components/3_compounds/Feed/Feed.vue2.js +314 -161
- package/dist/components/3_compounds/Feed/composables/useFeedScroll.js +19 -17
- package/dist/components/3_compounds/SideBar/SideBar.vue.js +202 -279
- package/dist/components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js +36 -43
- package/dist/components/4_layouts/BaseLayout/BaseLayout.vue.js +5 -5
- package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue.js +4 -32
- package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue2.js +29 -7
- package/dist/components/4_layouts/ExtendedLayout/ExtendedLayout.vue.js +7 -7
- package/dist/components/4_layouts/FeedLayout/FeedLayout.vue.js +8 -8
- package/dist/components/5_containers/BaseContainer/BaseContainer.vue.js +18 -33
- package/dist/components/5_containers/FloatContainer/FloatContainer.vue.js +59 -90
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/glass.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/src/apps/data/chats.d.ts +48 -4
- package/dist/types/src/apps/data/messages.d.ts +366 -282
- package/dist/types/src/components/2_chatlist_elements/ChatTabs/styles/types.d.ts +2 -0
- package/dist/types/src/components/3_compounds/Feed/composables/useFeedScroll.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,30 +1,36 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useFeedButton as
|
|
11
|
-
import { useFeedComponents as
|
|
12
|
-
import { useFeedGrouping as
|
|
13
|
-
import { useFeedKeyboard as
|
|
14
|
-
import { useFeedLoadMore as
|
|
15
|
-
import { useFeedMessageVisibility as
|
|
16
|
-
import { useFeedProgressiveRender as
|
|
17
|
-
import { provideFeedReactionsOverlay as
|
|
18
|
-
import { useFeedReply as
|
|
19
|
-
import { useFeedScroll as
|
|
20
|
-
import { useFeedScrollTo as
|
|
21
|
-
import { useStickyDate as
|
|
22
|
-
import { throttle as
|
|
23
|
-
import { getDefaultMessageMenuActions as
|
|
24
|
-
import { isSmsFeedMessage as
|
|
1
|
+
import { defineComponent as Ke, ref as I, computed as l, provide as A, inject as H, unref as o, watch as B, nextTick as F, onMounted as xe, createElementBlock as y, openBlock as i, createVNode as p, createBlock as f, createCommentVNode as c, normalizeStyle as J, renderSlot as Q, withDirectives as Oe, createElementVNode as C, vShow as $e, Transition as T, withCtx as D, Fragment as Ne, renderList as Le, isMemoSame as Ue, resolveDynamicComponent as je, mergeProps as qe, toDisplayString as Ee, Teleport as X } from "vue";
|
|
2
|
+
import Pe from "../../2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js";
|
|
3
|
+
import Ve from "../../2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js";
|
|
4
|
+
import We from "../../2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js";
|
|
5
|
+
import ze from "../../2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js";
|
|
6
|
+
import Ge from "../../2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js";
|
|
7
|
+
import He from "../../2_feed_elements/TypingMessage/TypingMessage.vue.js";
|
|
8
|
+
import Je from "../../1_atoms/LoadingIndicator/LoadingIndicator.vue.js";
|
|
9
|
+
import Qe from "../../2_feed_elements/MessageReactions/MessageReactionsOverlay.vue.js";
|
|
10
|
+
import { useFeedButton as Xe } from "./composables/useFeedButton.js";
|
|
11
|
+
import { useFeedComponents as Ye } from "./composables/useFeedComponents.js";
|
|
12
|
+
import { useFeedGrouping as Ze } from "./composables/useFeedGrouping.js";
|
|
13
|
+
import { useFeedKeyboard as _e } from "./composables/useFeedKeyboard.js";
|
|
14
|
+
import { useFeedLoadMore as et } from "./composables/useFeedLoadMore.js";
|
|
15
|
+
import { useFeedMessageVisibility as tt } from "./composables/useFeedMessageVisibility.js";
|
|
16
|
+
import { useFeedProgressiveRender as st } from "./composables/useFeedProgressiveRender.js";
|
|
17
|
+
import { provideFeedReactionsOverlay as ot } from "./composables/useFeedReactionsOverlay.js";
|
|
18
|
+
import { useFeedReply as at } from "./composables/useFeedReply.js";
|
|
19
|
+
import { useFeedScroll as nt } from "./composables/useFeedScroll.js";
|
|
20
|
+
import { useFeedScrollTo as rt } from "./composables/useFeedScrollTo.js";
|
|
21
|
+
import { useStickyDate as it } from "./composables/useStickyDate.js";
|
|
22
|
+
import { throttle as lt } from "./functions/throttle.js";
|
|
23
|
+
import { getDefaultMessageMenuActions as dt } from "./utils/getDefaultMessageMenuActions.js";
|
|
24
|
+
import { isSmsFeedMessage as ct } from "../../../functions/isSmsChannel.js";
|
|
25
25
|
import "../../../functions/parseMarkdown.js";
|
|
26
|
-
import
|
|
27
|
-
const
|
|
26
|
+
import ut from "./assets/chat-background.svg.js";
|
|
27
|
+
const mt = {
|
|
28
|
+
class: "message-feed-wrapper",
|
|
29
|
+
"data-testid": "feed"
|
|
30
|
+
}, ft = ["id"], gt = { class: "message-feed__loading" }, yt = { style: { margin: "auto" } }, pt = {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: "message-feed__unread-amount"
|
|
33
|
+
}, Vt = /* @__PURE__ */ Ke({
|
|
28
34
|
__name: "Feed",
|
|
29
35
|
props: {
|
|
30
36
|
/**
|
|
@@ -63,7 +69,7 @@ const bt = /* @__PURE__ */ he({
|
|
|
63
69
|
keyboardAlign: {
|
|
64
70
|
type: String,
|
|
65
71
|
default: "right",
|
|
66
|
-
validator: (
|
|
72
|
+
validator: (a) => ["left", "center", "right"].includes(a)
|
|
67
73
|
},
|
|
68
74
|
feedKeyboards: {
|
|
69
75
|
type: Array,
|
|
@@ -73,7 +79,7 @@ const bt = /* @__PURE__ */ he({
|
|
|
73
79
|
feedKeyboardAlign: {
|
|
74
80
|
type: String,
|
|
75
81
|
default: "right",
|
|
76
|
-
validator: (
|
|
82
|
+
validator: (a) => ["left", "center", "right"].includes(a)
|
|
77
83
|
},
|
|
78
84
|
chatBackground: {
|
|
79
85
|
type: String,
|
|
@@ -90,7 +96,7 @@ const bt = /* @__PURE__ */ he({
|
|
|
90
96
|
reactionsMode: {
|
|
91
97
|
type: String,
|
|
92
98
|
default: "single",
|
|
93
|
-
validator: (
|
|
99
|
+
validator: (a) => ["single", "multi"].includes(a)
|
|
94
100
|
},
|
|
95
101
|
/** Id текущего пользователя — для расчёта «моих» реакций */
|
|
96
102
|
currentUserId: {
|
|
@@ -122,7 +128,7 @@ const bt = /* @__PURE__ */ he({
|
|
|
122
128
|
*/
|
|
123
129
|
messageMenuActions: {
|
|
124
130
|
type: Array,
|
|
125
|
-
default: () =>
|
|
131
|
+
default: () => dt()
|
|
126
132
|
}
|
|
127
133
|
},
|
|
128
134
|
emits: [
|
|
@@ -137,171 +143,318 @@ const bt = /* @__PURE__ */ he({
|
|
|
137
143
|
"smsInvite",
|
|
138
144
|
"delimiterRead"
|
|
139
145
|
],
|
|
140
|
-
setup(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
k("currentUserId", j), k("reactionUserNames", F), k(
|
|
146
|
+
setup(a, { emit: Y }) {
|
|
147
|
+
const n = a, v = I(), u = I(), w = I(), {
|
|
148
|
+
isShowButton: K,
|
|
149
|
+
isKeyboardPlace: Z,
|
|
150
|
+
checkButtonVisibility: _
|
|
151
|
+
} = Xe({
|
|
152
|
+
feedRef: u,
|
|
153
|
+
keyboardRef: w
|
|
154
|
+
}), { componentsMap: ee } = Ye(), x = l(() => n.reactionsEnabled);
|
|
155
|
+
ot();
|
|
156
|
+
const te = l(() => n.reactionsMode), O = l(() => n.currentUserId), $ = l(() => n.reactionUserNames);
|
|
157
|
+
A("currentUserId", O), A("reactionUserNames", $), A(
|
|
153
158
|
"messageMenuActions",
|
|
154
|
-
|
|
159
|
+
l(() => n.messageMenuActions)
|
|
155
160
|
);
|
|
156
|
-
const { seriesFlags:
|
|
157
|
-
objects:
|
|
161
|
+
const { seriesFlags: N } = Ze({
|
|
162
|
+
objects: l(() => n.objects)
|
|
158
163
|
}), {
|
|
159
|
-
visibleObjects:
|
|
160
|
-
renderStart:
|
|
161
|
-
isBackfilling:
|
|
162
|
-
revealThroughIndex:
|
|
163
|
-
accelerateBackfill:
|
|
164
|
-
} =
|
|
165
|
-
objectsRef:
|
|
166
|
-
feedRef:
|
|
167
|
-
}),
|
|
168
|
-
if (
|
|
169
|
-
return
|
|
164
|
+
visibleObjects: se,
|
|
165
|
+
renderStart: h,
|
|
166
|
+
isBackfilling: oe,
|
|
167
|
+
revealThroughIndex: ae,
|
|
168
|
+
accelerateBackfill: ne
|
|
169
|
+
} = st({
|
|
170
|
+
objectsRef: l(() => n.objects),
|
|
171
|
+
feedRef: u
|
|
172
|
+
}), b = H("chatAppId"), L = H("selectedChat", void 0), U = l(() => {
|
|
173
|
+
if (L)
|
|
174
|
+
return o(L);
|
|
170
175
|
});
|
|
171
|
-
function
|
|
172
|
-
return
|
|
176
|
+
function re(t) {
|
|
177
|
+
return t.timestamp;
|
|
173
178
|
}
|
|
174
|
-
function
|
|
175
|
-
return
|
|
179
|
+
function M(t, s) {
|
|
180
|
+
return t.messageId || `mid-${h.value + s}`;
|
|
176
181
|
}
|
|
177
|
-
function
|
|
178
|
-
var
|
|
179
|
-
const
|
|
180
|
-
return
|
|
182
|
+
function ie(t) {
|
|
183
|
+
var e;
|
|
184
|
+
const s = (e = t.reactions) == null ? void 0 : e.items;
|
|
185
|
+
return s != null && s.length ? s.map((r) => `${r.key}:${r.userId}`).join(",") : "";
|
|
181
186
|
}
|
|
182
|
-
function
|
|
183
|
-
var
|
|
184
|
-
const
|
|
185
|
-
if (
|
|
186
|
-
if (!
|
|
187
|
+
function j(t) {
|
|
188
|
+
var m, d, k;
|
|
189
|
+
const s = t, e = s.channelId || ((m = s.channel) == null ? void 0 : m.channelId) || ((d = s.meta) == null ? void 0 : d.channelId);
|
|
190
|
+
if (e) return String(e);
|
|
191
|
+
if (!s.dialogId || !((k = U.value) != null && k.dialogs))
|
|
187
192
|
return;
|
|
188
|
-
const
|
|
189
|
-
return
|
|
193
|
+
const r = U.value.dialogs.find((R) => R.dialogId === s.dialogId);
|
|
194
|
+
return r == null ? void 0 : r.channelId;
|
|
190
195
|
}
|
|
191
|
-
function
|
|
192
|
-
return
|
|
196
|
+
function le(t) {
|
|
197
|
+
return t.type === "message.call" && typeof n.callMessageOnCallback == "function" ? { onCall: n.callMessageOnCallback } : {};
|
|
193
198
|
}
|
|
194
|
-
const
|
|
195
|
-
checkScrollPosition:
|
|
196
|
-
startScrollWatch:
|
|
197
|
-
stopScrollWatch:
|
|
198
|
-
resetAllowFlags:
|
|
199
|
-
} =
|
|
200
|
-
feedRef:
|
|
201
|
-
emit:
|
|
202
|
-
isLoadingMoreRef:
|
|
199
|
+
const g = Y, {
|
|
200
|
+
checkScrollPosition: de,
|
|
201
|
+
startScrollWatch: q,
|
|
202
|
+
stopScrollWatch: E,
|
|
203
|
+
resetAllowFlags: ce
|
|
204
|
+
} = et({
|
|
205
|
+
feedRef: u,
|
|
206
|
+
emit: g,
|
|
207
|
+
isLoadingMoreRef: l(() => n.isLoadingMore)
|
|
203
208
|
}), {
|
|
204
|
-
getMessage:
|
|
205
|
-
messageAction:
|
|
206
|
-
handleClickReplied:
|
|
207
|
-
feedObjectDoubleClick:
|
|
208
|
-
handleResetReply:
|
|
209
|
-
handleResetEdit:
|
|
210
|
-
} =
|
|
211
|
-
enableDoubleClickReply:
|
|
212
|
-
emit:
|
|
213
|
-
isReplyAllowed: (
|
|
209
|
+
getMessage: S,
|
|
210
|
+
messageAction: ue,
|
|
211
|
+
handleClickReplied: me,
|
|
212
|
+
feedObjectDoubleClick: fe,
|
|
213
|
+
handleResetReply: ge,
|
|
214
|
+
handleResetEdit: ye
|
|
215
|
+
} = at({
|
|
216
|
+
enableDoubleClickReply: n.enableDoubleClickReply,
|
|
217
|
+
emit: g,
|
|
218
|
+
isReplyAllowed: (t) => !ct(t, j(t))
|
|
214
219
|
});
|
|
215
|
-
function
|
|
216
|
-
|
|
220
|
+
function pe(t) {
|
|
221
|
+
g("smsInvite", t);
|
|
217
222
|
}
|
|
218
|
-
function
|
|
219
|
-
|
|
223
|
+
function be(t) {
|
|
224
|
+
g("delimiterRead", t);
|
|
220
225
|
}
|
|
221
226
|
const {
|
|
222
|
-
showKeyboard:
|
|
223
|
-
keyboardAction:
|
|
224
|
-
feedKeyboardAction:
|
|
225
|
-
} =
|
|
226
|
-
isKeyboardPlace:
|
|
227
|
-
objects:
|
|
228
|
-
emit:
|
|
227
|
+
showKeyboard: ke,
|
|
228
|
+
keyboardAction: ve,
|
|
229
|
+
feedKeyboardAction: he
|
|
230
|
+
} = _e({
|
|
231
|
+
isKeyboardPlace: Z,
|
|
232
|
+
objects: l(() => n.objects),
|
|
233
|
+
emit: g
|
|
229
234
|
}), {
|
|
230
|
-
showStickyDate:
|
|
231
|
-
stickyDateText:
|
|
232
|
-
show:
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
235
|
+
showStickyDate: Me,
|
|
236
|
+
stickyDateText: Se,
|
|
237
|
+
show: Re,
|
|
238
|
+
hide: Ie
|
|
239
|
+
} = it({
|
|
240
|
+
feedRef: u,
|
|
241
|
+
trackingObjects: v
|
|
236
242
|
}), {
|
|
237
|
-
isInitialized:
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
243
|
+
isInitialized: Ae,
|
|
244
|
+
stickToBottom: Be,
|
|
245
|
+
initializeScroll: Fe,
|
|
246
|
+
smoothScrollToBottom: Ce
|
|
247
|
+
} = nt({
|
|
248
|
+
feedRef: u,
|
|
249
|
+
objectsRef: l(() => n.objects),
|
|
250
|
+
scrollToBottomRef: l(() => n.scrollToBottom)
|
|
251
|
+
}), P = l(() => n.chatBackground ?? `data:image/svg+xml;charset=utf-8,${encodeURIComponent(ut)}`);
|
|
252
|
+
function V() {
|
|
253
|
+
if (Be.value || !K.value) {
|
|
254
|
+
Ie();
|
|
249
255
|
return;
|
|
250
256
|
}
|
|
251
|
-
|
|
257
|
+
Re();
|
|
252
258
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
259
|
+
function W(t = !0) {
|
|
260
|
+
if (_(), oe.value) {
|
|
261
|
+
const s = u.value;
|
|
262
|
+
s && s.scrollTop < 300 && ne(), V();
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
de(t), V();
|
|
256
266
|
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
267
|
+
const Te = lt(() => W(), 250);
|
|
268
|
+
function De() {
|
|
269
|
+
g("forceScrollToBottom"), Ce();
|
|
270
|
+
}
|
|
271
|
+
function we(t) {
|
|
272
|
+
const s = n.objects;
|
|
273
|
+
if (t.startsWith("mid-")) {
|
|
274
|
+
const e = parseInt(t.slice(4), 10);
|
|
275
|
+
return s[e];
|
|
262
276
|
}
|
|
263
|
-
return
|
|
277
|
+
return s.find((e) => e.messageId === t);
|
|
264
278
|
}
|
|
265
|
-
const { restartObserving:
|
|
266
|
-
trackingObjects:
|
|
267
|
-
chatAppId:
|
|
268
|
-
getMessageById:
|
|
269
|
-
onMessageVisible: (
|
|
279
|
+
const { restartObserving: z } = tt({
|
|
280
|
+
trackingObjects: v,
|
|
281
|
+
chatAppId: b,
|
|
282
|
+
getMessageById: we,
|
|
283
|
+
onMessageVisible: (t) => g("messageVisible", t)
|
|
270
284
|
});
|
|
271
|
-
|
|
272
|
-
() =>
|
|
285
|
+
return B(
|
|
286
|
+
() => n.objects,
|
|
273
287
|
() => {
|
|
274
|
-
|
|
288
|
+
F(() => {
|
|
275
289
|
requestAnimationFrame(() => {
|
|
276
|
-
|
|
290
|
+
ce(), W(!1), v.value = document.querySelectorAll(".tracking-message"), z();
|
|
277
291
|
});
|
|
278
292
|
});
|
|
279
293
|
},
|
|
280
294
|
{ immediate: !0 }
|
|
281
|
-
),
|
|
282
|
-
|
|
283
|
-
|
|
295
|
+
), B(h, () => {
|
|
296
|
+
F(() => {
|
|
297
|
+
v.value = document.querySelectorAll(".tracking-message"), z();
|
|
284
298
|
});
|
|
285
|
-
}),
|
|
286
|
-
() =>
|
|
287
|
-
(
|
|
288
|
-
if (!
|
|
289
|
-
const
|
|
290
|
-
let
|
|
291
|
-
|
|
299
|
+
}), B(
|
|
300
|
+
() => n.scrollTo,
|
|
301
|
+
(t) => {
|
|
302
|
+
if (!t) return;
|
|
303
|
+
const s = n.objects, e = t.trim(), r = e.startsWith("msg-") ? e.slice(4) : e;
|
|
304
|
+
let m = -1;
|
|
305
|
+
r.startsWith("mid-") ? m = Number.parseInt(r.slice(4), 10) : m = s.findIndex((d) => d.messageId === r || d.messageId === e), Number.isFinite(m) && ae(m);
|
|
292
306
|
}
|
|
293
|
-
),
|
|
294
|
-
targetIdRef:
|
|
295
|
-
feedContainerId: `feed-container-${
|
|
296
|
-
}),
|
|
297
|
-
|
|
298
|
-
|
|
307
|
+
), rt({
|
|
308
|
+
targetIdRef: l(() => n.scrollTo),
|
|
309
|
+
feedContainerId: `feed-container-${b}`
|
|
310
|
+
}), xe(() => {
|
|
311
|
+
F(() => {
|
|
312
|
+
n.objects.length > 0 && !Ae.value && Fe();
|
|
299
313
|
});
|
|
300
|
-
})
|
|
301
|
-
|
|
302
|
-
|
|
314
|
+
}), (t, s) => (i(), y("div", mt, [
|
|
315
|
+
a.objects.length > 0 || a.typing ? (i(), y("div", {
|
|
316
|
+
key: 0,
|
|
317
|
+
id: "feed-container-" + o(b),
|
|
318
|
+
ref_key: "refFeed",
|
|
319
|
+
ref: u,
|
|
320
|
+
class: "message-feed",
|
|
321
|
+
"data-testid": "feed-scroll",
|
|
322
|
+
style: J({ backgroundImage: `url(${P.value})` }),
|
|
323
|
+
onScroll: s[2] || (s[2] = (e) => o(Te)()),
|
|
324
|
+
onMousedown: s[3] || (s[3] = //@ts-ignore
|
|
325
|
+
(...e) => o(q) && o(q)(...e)),
|
|
326
|
+
onMouseup: s[4] || (s[4] = //@ts-ignore
|
|
327
|
+
(...e) => o(E) && o(E)(...e))
|
|
328
|
+
}, [
|
|
329
|
+
Q(t.$slots, "prepend", {}, void 0, !0),
|
|
330
|
+
Oe(C("div", gt, [
|
|
331
|
+
p(Je, {
|
|
332
|
+
"is-loading": a.isLoadingMore,
|
|
333
|
+
size: "small",
|
|
334
|
+
position: "top"
|
|
335
|
+
}, null, 8, ["is-loading"])
|
|
336
|
+
], 512), [
|
|
337
|
+
[$e, a.isLoadingMore]
|
|
338
|
+
]),
|
|
339
|
+
p(T, null, {
|
|
340
|
+
default: D(() => [
|
|
341
|
+
o(Me) && !a.isLoadingMore ? (i(), f(Pe, {
|
|
342
|
+
key: 0,
|
|
343
|
+
class: "message-feed__sticky-date",
|
|
344
|
+
text: o(Se)
|
|
345
|
+
}, null, 8, ["text"])) : c("", !0)
|
|
346
|
+
]),
|
|
347
|
+
_: 1
|
|
348
|
+
}),
|
|
349
|
+
(i(!0), y(Ne, null, Le(o(se), (e, r, m, d) => {
|
|
350
|
+
const k = [e.messageId, e.text, e.status, e.reply, e.deleted, o(N)[o(h) + r], ie(e)];
|
|
351
|
+
if (d && d.key === M(e, r) && Ue(d, k)) return d;
|
|
352
|
+
const R = (i(), y("div", {
|
|
353
|
+
id: "msg-" + M(e, r),
|
|
354
|
+
key: M(e, r),
|
|
355
|
+
"data-timestamp": re(e),
|
|
356
|
+
"data-testid": "feed-message",
|
|
357
|
+
"data-message-id": e.messageId,
|
|
358
|
+
class: "tracking-message",
|
|
359
|
+
onDblclick: (G) => o(fe)(G, e)
|
|
360
|
+
}, [
|
|
361
|
+
(i(), f(je(o(ee)(e)), qe({
|
|
362
|
+
key: M(e, r),
|
|
363
|
+
class: "message-feed__message",
|
|
364
|
+
message: e,
|
|
365
|
+
"apply-style": a.applyStyle,
|
|
366
|
+
"is-first-in-series": o(N)[o(h) + r],
|
|
367
|
+
"reactions-enabled": x.value,
|
|
368
|
+
"reactions-mode": te.value,
|
|
369
|
+
"current-user-id": O.value,
|
|
370
|
+
"reaction-user-names": $.value,
|
|
371
|
+
"subtext-tooltip-data": a.subtextTooltipData,
|
|
372
|
+
channel: j(e)
|
|
373
|
+
}, { ref_for: !0 }, le(e), {
|
|
374
|
+
onAction: o(ue),
|
|
375
|
+
onReply: o(me),
|
|
376
|
+
onSmsInvite: (G) => pe(e),
|
|
377
|
+
onRead: be
|
|
378
|
+
}), null, 16, ["message", "apply-style", "is-first-in-series", "reactions-enabled", "reactions-mode", "current-user-id", "reaction-user-names", "subtext-tooltip-data", "channel", "onAction", "onReply", "onSmsInvite"]))
|
|
379
|
+
], 40, ["id", "data-timestamp", "data-message-id", "onDblclick"]));
|
|
380
|
+
return R.memo = k, R;
|
|
381
|
+
}, s, 0), 128)),
|
|
382
|
+
a.typing ? (i(), f(He, {
|
|
383
|
+
key: 0,
|
|
384
|
+
message: {
|
|
385
|
+
subText: a.typing.title,
|
|
386
|
+
avatar: a.typing.avatar
|
|
387
|
+
}
|
|
388
|
+
}, null, 8, ["message"])) : c("", !0),
|
|
389
|
+
p(T, null, {
|
|
390
|
+
default: D(() => [
|
|
391
|
+
o(ke) ? (i(), f(ze, {
|
|
392
|
+
key: 0,
|
|
393
|
+
ref_key: "keyboardRef",
|
|
394
|
+
ref: w,
|
|
395
|
+
class: "message-feed__keyboard",
|
|
396
|
+
keyboard: a.objects[a.objects.length - 1].keyboard,
|
|
397
|
+
align: a.keyboardAlign,
|
|
398
|
+
onAction: o(ve)
|
|
399
|
+
}, null, 8, ["keyboard", "align", "onAction"])) : c("", !0)
|
|
400
|
+
]),
|
|
401
|
+
_: 1
|
|
402
|
+
}),
|
|
403
|
+
a.feedKeyboards && a.feedKeyboards.length > 0 ? (i(), f(Ge, {
|
|
404
|
+
key: 1,
|
|
405
|
+
class: "message-feed__feed-keyboard",
|
|
406
|
+
buttons: a.feedKeyboards,
|
|
407
|
+
align: a.feedKeyboardAlign,
|
|
408
|
+
onAction: o(he)
|
|
409
|
+
}, null, 8, ["buttons", "align", "onAction"])) : c("", !0)
|
|
410
|
+
], 44, ft)) : (i(), y("div", {
|
|
411
|
+
key: 1,
|
|
412
|
+
ref_key: "refFeed",
|
|
413
|
+
ref: u,
|
|
414
|
+
class: "message-feed",
|
|
415
|
+
style: J({ backgroundImage: `url(${P.value})` })
|
|
416
|
+
}, [
|
|
417
|
+
C("div", yt, [
|
|
418
|
+
Q(t.$slots, "empty-feed", {}, void 0, !0)
|
|
419
|
+
])
|
|
420
|
+
], 4)),
|
|
421
|
+
p(T, null, {
|
|
422
|
+
default: D(() => [
|
|
423
|
+
o(K) ? (i(), y("button", {
|
|
424
|
+
key: 0,
|
|
425
|
+
class: "message-feed__button-down",
|
|
426
|
+
onClick: De
|
|
427
|
+
}, [
|
|
428
|
+
a.buttonParams ? (i(), y("div", pt, Ee(a.buttonParams.unreadAmount), 1)) : c("", !0),
|
|
429
|
+
s[5] || (s[5] = C("span", { class: "pi pi-angle-down message-feed__icon-down" }, null, -1))
|
|
430
|
+
])) : c("", !0)
|
|
431
|
+
]),
|
|
432
|
+
_: 1
|
|
433
|
+
}),
|
|
434
|
+
o(S)().reply ? (i(), f(X, {
|
|
435
|
+
key: 2,
|
|
436
|
+
to: "#chat-input-reply-line-" + o(b)
|
|
437
|
+
}, [
|
|
438
|
+
p(Ve, {
|
|
439
|
+
class: "chat-input-reply",
|
|
440
|
+
message: o(S)().reply,
|
|
441
|
+
onReset: o(ge)
|
|
442
|
+
}, null, 8, ["message", "onReset"])
|
|
443
|
+
], 8, ["to"])) : c("", !0),
|
|
444
|
+
o(S)().edit ? (i(), f(X, {
|
|
445
|
+
key: 3,
|
|
446
|
+
to: "#chat-input-reply-line-" + o(b)
|
|
447
|
+
}, [
|
|
448
|
+
p(We, {
|
|
449
|
+
class: "chat-input-reply",
|
|
450
|
+
message: o(S)().edit,
|
|
451
|
+
onReset: o(ye)
|
|
452
|
+
}, null, 8, ["message", "onReset"])
|
|
453
|
+
], 8, ["to"])) : c("", !0),
|
|
454
|
+
x.value ? (i(), f(Qe, { key: 4 })) : c("", !0)
|
|
455
|
+
]));
|
|
303
456
|
}
|
|
304
457
|
});
|
|
305
458
|
export {
|
|
306
|
-
|
|
459
|
+
Vt as default
|
|
307
460
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { ref as S, watch as f, nextTick as h, onUnmounted as U } from "vue";
|
|
2
|
-
function q({ feedRef:
|
|
3
|
-
const a = S(!1),
|
|
2
|
+
function q({ feedRef: i, objectsRef: l, scrollToBottomRef: B }) {
|
|
3
|
+
const a = S(!1), n = S(!1);
|
|
4
4
|
let d = !1, u = !1, s = null, e = null;
|
|
5
5
|
function c() {
|
|
6
|
-
if (!
|
|
7
|
-
const t =
|
|
6
|
+
if (!n.value) return;
|
|
7
|
+
const t = i.value;
|
|
8
8
|
t && (d = !0, t.style.scrollBehavior = "auto", t.scrollTop = t.scrollHeight, requestAnimationFrame(() => {
|
|
9
9
|
d = !1;
|
|
10
10
|
}));
|
|
11
11
|
}
|
|
12
12
|
function g() {
|
|
13
|
-
const t =
|
|
13
|
+
const t = i.value;
|
|
14
14
|
if (!t) return;
|
|
15
|
-
const
|
|
16
|
-
t.style.scrollBehavior = "auto", t.scrollTop =
|
|
15
|
+
const o = t.scrollTop;
|
|
16
|
+
t.style.scrollBehavior = "auto", t.scrollTop = o;
|
|
17
17
|
}
|
|
18
18
|
function m() {
|
|
19
|
-
|
|
19
|
+
n.value = !0, h(() => {
|
|
20
20
|
c(), requestAnimationFrame(() => c());
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
function r() {
|
|
24
|
-
|
|
24
|
+
n.value && (n.value = !1, g());
|
|
25
25
|
}
|
|
26
26
|
function p(t) {
|
|
27
27
|
e == null || e.disconnect(), e = new ResizeObserver(() => {
|
|
28
28
|
c();
|
|
29
29
|
}), e.observe(t);
|
|
30
|
-
for (const
|
|
31
|
-
|
|
30
|
+
for (const o of t.children)
|
|
31
|
+
o instanceof HTMLElement && e.observe(o);
|
|
32
32
|
}
|
|
33
33
|
function w() {
|
|
34
34
|
u = !0;
|
|
@@ -52,22 +52,22 @@ function q({ feedRef: o, objectsRef: l, scrollToBottomRef: B }) {
|
|
|
52
52
|
!a.value && l.value.length > 0 && (m(), a.value = !0);
|
|
53
53
|
}
|
|
54
54
|
function P() {
|
|
55
|
-
|
|
56
|
-
const t =
|
|
55
|
+
n.value = !0, h(() => {
|
|
56
|
+
const t = i.value;
|
|
57
57
|
t && t.scrollTo({ top: t.scrollHeight, behavior: "smooth" });
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
return f(
|
|
61
|
-
|
|
62
|
-
(t,
|
|
63
|
-
|
|
61
|
+
i,
|
|
62
|
+
(t, o) => {
|
|
63
|
+
o && E(o), s = t ?? null, t && (k(t), p(t), n.value && c());
|
|
64
64
|
},
|
|
65
65
|
{ immediate: !0 }
|
|
66
66
|
), f(
|
|
67
67
|
l,
|
|
68
68
|
() => {
|
|
69
69
|
h(() => {
|
|
70
|
-
|
|
70
|
+
i.value && p(i.value);
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
), f(
|
|
@@ -86,6 +86,8 @@ function q({ feedRef: o, objectsRef: l, scrollToBottomRef: B }) {
|
|
|
86
86
|
e == null || e.disconnect(), e = null, s && (E(s), s = null);
|
|
87
87
|
}), {
|
|
88
88
|
isInitialized: a,
|
|
89
|
+
/** true, пока лента прижата вниз (автоскролл при новых сообщениях) */
|
|
90
|
+
stickToBottom: n,
|
|
89
91
|
performScrollToBottom: F,
|
|
90
92
|
initializeScroll: T,
|
|
91
93
|
smoothScrollToBottom: P
|