@mobilon-dev/chotto 0.3.30 → 0.3.31
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/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/chotto.css +1 -1
- package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js +7 -0
- package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +106 -0
- package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +46 -0
- package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue.js +7 -0
- package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue2.js +39 -0
- package/dist/components/1_atoms/LinkPreview/LinkPreview.vue.js +7 -0
- package/dist/components/1_atoms/LinkPreview/LinkPreview.vue2.js +32 -0
- package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +7 -0
- package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +77 -0
- package/dist/components/1_icons/AvatarIcon.vue.js +42 -0
- package/dist/components/1_icons/CheckIcon.vue.js +28 -0
- package/dist/components/1_icons/CloseButtonIcon.vue.js +21 -0
- package/dist/components/1_icons/ContactCRMIcon.vue.js +21 -0
- package/dist/components/1_icons/MenuIcon.vue.js +21 -0
- package/dist/components/1_icons/SearchIcon.vue.js +28 -0
- package/dist/components/1_icons/SettingsIcon.vue.js +18 -0
- package/dist/components/1_icons/TelegramIcon.vue.js +32 -0
- package/dist/components/1_icons/WhatsAppIcon.vue.js +32 -0
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +307 -0
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.js +83 -0
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationAttributes.js +60 -0
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationChannels.js +70 -0
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationDialogSync.js +36 -0
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.js +37 -0
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.js +69 -0
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelMaxIcon.vue.js +18 -0
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelPhoneIcon.vue.js +23 -0
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSMSIcon.vue.js +21 -0
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuMaxIcon.vue.js +34 -0
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuPhoneIcon.vue.js +32 -0
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuSMSIcon.vue.js +21 -0
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuTelegramIcon.vue.js +18 -0
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js +32 -0
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelTelegramIcon.vue.js +32 -0
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelWhatsAppIcon.vue.js +18 -0
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +7 -0
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +61 -0
- package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js +7 -0
- package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue2.js +58 -0
- package/dist/components/2_blocks/FeedSearch/FeedSearch.vue.js +7 -0
- package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +68 -0
- package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue.js +7 -0
- package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +70 -0
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +106 -0
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +18 -0
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +105 -0
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +25 -0
- package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +98 -0
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +7 -0
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +157 -0
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +7 -0
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +105 -0
- package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +21 -0
- package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js +66 -0
- package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +206 -0
- package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js +7 -0
- package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +210 -0
- package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js +7 -0
- package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +126 -0
- package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js +7 -0
- package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js +38 -0
- package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js +7 -0
- package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue2.js +41 -0
- package/dist/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js +281 -0
- package/dist/components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js +49 -0
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +7 -0
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +193 -0
- package/dist/components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js +37 -0
- package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +7 -0
- package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +116 -0
- package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +73 -0
- package/dist/components/2_elements/ChatInfo/ChatInfo.vue.js +93 -0
- package/dist/components/2_elements/ChatPanel/ChatPanel.vue.js +47 -0
- package/dist/components/2_elements/ContactInfo/ContactInfo.vue.js +158 -0
- package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +49 -0
- package/dist/components/2_elements/UserProfile/UserProfile.vue.js +39 -0
- package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +7 -0
- package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +94 -0
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +380 -0
- package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +57 -0
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +476 -0
- package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue.js +26 -0
- package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue2.js +4 -0
- package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue.js +26 -0
- package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue2.js +4 -0
- package/dist/components/2_feed_elements/DateMessage/DateMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/DateMessage/DateMessage.vue2.js +20 -0
- package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js +7 -0
- package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue2.js +18 -0
- package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js +7 -0
- package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue2.js +42 -0
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +204 -0
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +266 -0
- package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js +7 -0
- package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +46 -0
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +7 -0
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +161 -0
- package/dist/components/2_feed_elements/MessageReactions/composables/usePositioning.js +104 -0
- package/dist/components/2_feed_elements/MessageReactions/composables/useReactions.js +30 -0
- package/dist/components/2_feed_elements/MessageReactions/composables/useReactionsPanel.js +90 -0
- package/dist/components/2_feed_elements/MessageReactions/composables/useReactionsState.js +32 -0
- package/dist/components/2_feed_elements/MessageReactions/utils/quickReactions.js +17 -0
- package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +73 -0
- package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +4 -0
- package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +39 -0
- package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +35 -0
- package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +46 -0
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +71 -0
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +119 -0
- package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +27 -0
- package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +75 -0
- package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue.js +7 -0
- package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue2.js +23 -0
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +258 -0
- package/dist/components/2_feed_elements/StickerMessage/libs/tgs-player/lottie-player.esm.js +6469 -0
- package/dist/components/2_feed_elements/StickerMessage/libs/tgs-player/tgs-player.esm.js +7216 -0
- package/dist/components/2_feed_elements/StickerMessage/utils/stickerUtils.js +10 -0
- package/dist/components/2_feed_elements/StickerMessage/utils/suppress-lit-warning.js +21 -0
- package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue2.js +18 -0
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +174 -0
- package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue2.js +32 -0
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +286 -0
- package/dist/{CreateChat-C4y1ddK_.js → components/2_modals/CreateChat/CreateChat.vue.js} +8 -7
- package/dist/components/2_modals/CreateChat/CreateChat.vue2.js +1 -0
- package/dist/{CreateChat2-Oy9JaaRC.js → components/2_modals/CreateChat2/CreateChat2.vue.js} +4 -3
- package/dist/{CreateDialog-DacwclUe.js → components/2_modals/CreateDialog/CreateDialog.vue.js} +12 -11
- package/dist/components/2_modals/Modal/Modal.vue.js +69 -0
- package/dist/components/2_modals/ModalFullscreen/ModalFullscreen.vue.js +46 -0
- package/dist/components/2_modals/ModalNoFooter/ModalNoFooter.vue.js +43 -0
- package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +7 -0
- package/dist/{ModalVideoRecorder-BkPr4JP7.js → components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js} +48 -49
- package/dist/components/2_modals/SelectUser/SelectUser.vue.js +63 -0
- package/dist/{SelectUser2-kaPAmxhi.js → components/2_modals/SelectUser2/SelectUser2.vue.js} +4 -3
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +7 -0
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +192 -0
- package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue.js +35 -0
- package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue2.js +4 -0
- package/dist/components/3_compounds/ChatList/ChatList.vue.js +186 -0
- package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +27 -0
- package/dist/components/3_compounds/ChatList/composables/useChatListActions.js +16 -0
- package/dist/components/3_compounds/ChatList/composables/useChatListFilter.js +27 -0
- package/dist/components/3_compounds/ChatList/composables/useChatListScroll.js +47 -0
- package/dist/components/3_compounds/ChatList/composables/useChatListSelection.js +28 -0
- package/dist/components/3_compounds/Feed/Feed.vue.js +7 -0
- package/dist/components/3_compounds/Feed/Feed.vue2.js +295 -0
- package/dist/components/3_compounds/Feed/assets/chat-background.svg.js +7 -0
- package/dist/components/3_compounds/Feed/composables/useFeedButton.js +17 -0
- package/dist/components/3_compounds/Feed/composables/useFeedComponents.js +29 -0
- package/dist/components/3_compounds/Feed/composables/useFeedGrouping.js +15 -0
- package/dist/components/3_compounds/Feed/composables/useFeedKeyboard.js +15 -0
- package/dist/components/3_compounds/Feed/composables/useFeedLoadMore.js +62 -0
- package/dist/components/3_compounds/Feed/composables/useFeedMessageVisibility.js +33 -0
- package/dist/components/3_compounds/Feed/composables/useFeedReply.js +42 -0
- package/dist/components/3_compounds/Feed/composables/useFeedScroll.js +63 -0
- package/dist/components/3_compounds/Feed/composables/useFeedScrollTo.js +18 -0
- package/dist/components/3_compounds/Feed/composables/useStickyDate.js +61 -0
- package/dist/components/3_compounds/Feed/functions/throttle.js +11 -0
- package/dist/components/3_compounds/SideBar/SideBar.vue.js +190 -0
- package/dist/components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js +63 -0
- package/dist/components/4_layouts/BaseLayout/BaseLayout.vue.js +18 -0
- package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue.js +7 -0
- package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue2.js +53 -0
- package/dist/components/4_layouts/ExtendedLayout/ExtendedLayout.vue.js +21 -0
- package/dist/components/4_layouts/FeedLayout/FeedLayout.vue.js +15 -0
- package/dist/components/5_containers/BaseContainer/BaseContainer.vue.js +33 -0
- package/dist/components/5_containers/FloatContainer/FloatContainer.vue.js +104 -0
- package/dist/functions/createReactionHandlers.js +19 -0
- package/dist/functions/formatTimestamp.js +8 -0
- package/dist/functions/getChannelAccentColor.js +30 -0
- package/dist/functions/getMessageClass.js +6 -0
- package/dist/functions/getStatusMessage.js +42 -0
- package/dist/functions/insertDaySeparators.js +24 -0
- package/dist/functions/parseMarkdown.js +18 -0
- package/dist/functions/playNotificationAudio.js +13 -0
- package/dist/functions/sortByTimestamp.js +4 -0
- package/dist/hooks/messages/useChannelAccentColor.js +29 -0
- package/dist/hooks/messages/useMessageActions.js +28 -0
- package/dist/hooks/messages/useMessageLinks.js +48 -0
- package/dist/hooks/messages/useSubtextTooltip.js +12 -0
- package/dist/hooks/modals/useCreateChat.js +19 -0
- package/dist/hooks/modals/useCreateChat2.js +16 -0
- package/dist/hooks/modals/useCreateDialog.js +20 -0
- package/dist/hooks/modals/useModal.js +41 -0
- package/dist/hooks/modals/useModalSelectUser2.js +20 -0
- package/dist/hooks/modals/useVideoRecorder.js +14 -0
- package/dist/hooks/uploadFile/generatePreview.js +20 -0
- package/dist/hooks/uploadFile/getTypeFileByMime.js +7 -0
- package/dist/hooks/uploadFile/uploadFile.js +28 -0
- package/dist/hooks/useDelayDebouncedRef.js +18 -0
- package/dist/hooks/useImmediateDebouncedRef.js +18 -0
- package/dist/hooks/useMessageDraft.js +87 -0
- package/dist/hooks/useSearchModel.js +11 -0
- package/dist/hooks/useTheme.js +11 -0
- package/dist/hooks/validators/chats/chatValidator.js +79 -0
- package/dist/hooks/validators/chats/useChatValidator.js +82 -0
- package/dist/hooks/validators/messages/messageValidator.js +84 -0
- package/dist/hooks/validators/messages/useMessageValidator.js +82 -0
- package/dist/hooks/validators/sidebar/sidebarValidator.js +47 -0
- package/dist/hooks/validators/sidebar/useSidebarValidator.js +82 -0
- package/dist/hooks/validators/useValidation.js +94 -0
- package/dist/index.js +239 -0
- package/dist/locale/en.js +22 -0
- package/dist/locale/ru.js +22 -0
- package/dist/locale/useLocale.js +34 -0
- package/dist/node_modules/entities/lib/esm/decode.js +278 -0
- package/dist/node_modules/entities/lib/esm/decode_codepoint.js +46 -0
- package/dist/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
- package/dist/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
- package/dist/node_modules/linkify-it/index.js +187 -0
- package/dist/node_modules/linkify-it/lib/re.js +19 -0
- package/dist/node_modules/linkify-string/dist/linkify-string.js +41 -0
- package/dist/node_modules/linkifyjs/dist/linkify.js +679 -0
- package/dist/node_modules/markdown-it/lib/common/html_blocks.js +67 -0
- package/dist/node_modules/markdown-it/lib/common/html_re.js +5 -0
- package/dist/node_modules/markdown-it/lib/common/utils.js +169 -0
- package/dist/node_modules/markdown-it/lib/helpers/index.js +8 -0
- package/dist/node_modules/markdown-it/lib/helpers/parse_link_destination.js +44 -0
- package/dist/node_modules/markdown-it/lib/helpers/parse_link_label.js +21 -0
- package/dist/node_modules/markdown-it/lib/helpers/parse_link_title.js +37 -0
- package/dist/node_modules/markdown-it/lib/index.js +112 -0
- package/dist/node_modules/markdown-it/lib/parser_block.js +63 -0
- package/dist/node_modules/markdown-it/lib/parser_core.js +34 -0
- package/dist/node_modules/markdown-it/lib/parser_inline.js +96 -0
- package/dist/node_modules/markdown-it/lib/presets/commonmark.js +78 -0
- package/dist/node_modules/markdown-it/lib/presets/default.js +40 -0
- package/dist/node_modules/markdown-it/lib/presets/zero.js +59 -0
- package/dist/node_modules/markdown-it/lib/renderer.js +127 -0
- package/dist/node_modules/markdown-it/lib/ruler.js +95 -0
- package/dist/node_modules/markdown-it/lib/rules_block/blockquote.js +59 -0
- package/dist/node_modules/markdown-it/lib/rules_block/code.js +23 -0
- package/dist/node_modules/markdown-it/lib/rules_block/fence.js +30 -0
- package/dist/node_modules/markdown-it/lib/rules_block/heading.js +28 -0
- package/dist/node_modules/markdown-it/lib/rules_block/hr.js +27 -0
- package/dist/node_modules/markdown-it/lib/rules_block/html_block.js +37 -0
- package/dist/node_modules/markdown-it/lib/rules_block/lheading.js +43 -0
- package/dist/node_modules/markdown-it/lib/rules_block/list.js +110 -0
- package/dist/node_modules/markdown-it/lib/rules_block/paragraph.js +25 -0
- package/dist/node_modules/markdown-it/lib/rules_block/reference.js +95 -0
- package/dist/node_modules/markdown-it/lib/rules_block/state_block.js +84 -0
- package/dist/node_modules/markdown-it/lib/rules_block/table.js +99 -0
- package/dist/node_modules/markdown-it/lib/rules_core/block.js +7 -0
- package/dist/node_modules/markdown-it/lib/rules_core/inline.js +10 -0
- package/dist/node_modules/markdown-it/lib/rules_core/linkify.js +57 -0
- package/dist/node_modules/markdown-it/lib/rules_core/normalize.js +9 -0
- package/dist/node_modules/markdown-it/lib/rules_core/replacements.js +31 -0
- package/dist/node_modules/markdown-it/lib/rules_core/smartquotes.js +80 -0
- package/dist/node_modules/markdown-it/lib/rules_core/state_core.js +8 -0
- package/dist/node_modules/markdown-it/lib/rules_core/text_join.js +16 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/autolink.js +46 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/backticks.js +31 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +34 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/emphasis.js +57 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/entity.js +33 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/escape.js +32 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/fragments_join.js +10 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/html_inline.js +32 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/image.js +48 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/link.js +40 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/linkify.js +28 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/newline.js +23 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/state_inline.js +27 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/strikethrough.js +54 -0
- package/dist/node_modules/markdown-it/lib/rules_inline/text.js +39 -0
- package/dist/node_modules/markdown-it/lib/token.js +31 -0
- package/dist/node_modules/mdurl/index.js +10 -0
- package/dist/node_modules/mdurl/lib/decode.js +61 -0
- package/dist/node_modules/mdurl/lib/encode.js +48 -0
- package/dist/node_modules/mdurl/lib/format.js +7 -0
- package/dist/node_modules/mdurl/lib/parse.js +74 -0
- package/dist/node_modules/punycode.js/punycode.es6.js +139 -0
- package/dist/node_modules/uc.micro/categories/Cc/regex.js +4 -0
- package/dist/node_modules/uc.micro/categories/Cf/regex.js +4 -0
- package/dist/node_modules/uc.micro/categories/P/regex.js +4 -0
- package/dist/node_modules/uc.micro/categories/S/regex.js +4 -0
- package/dist/node_modules/uc.micro/categories/Z/regex.js +4 -0
- package/dist/node_modules/uc.micro/index.js +14 -0
- package/dist/node_modules/uc.micro/properties/Any/regex.js +4 -0
- package/dist/node_modules/vue3-emoji-picker-ru/dist/emoji-picker.es.js +16471 -0
- package/dist/types/components/1_icons/AvatarIcon.vue.d.ts +1 -1
- package/dist/types/components/2_blocks/FeedSearch/FeedSearch.vue.d.ts +2 -2
- package/dist/types/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.d.ts +2 -2
- package/dist/types/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.d.ts +2 -2
- package/dist/types/components/2_feed_elements/AudioMessage/AudioMessage.vue.d.ts +2 -2
- package/dist/types/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.d.ts +2 -2
- package/dist/types/components/2_feed_elements/CallMessage/CallMessage.vue.d.ts +2 -2
- package/dist/types/components/2_feed_elements/FileMessage/FileMessage.vue.d.ts +2 -2
- package/dist/types/components/2_feed_elements/ImageMessage/ImageMessage.vue.d.ts +2 -2
- package/dist/types/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.d.ts +1 -3
- package/dist/types/components/2_feed_elements/StickerMessage/StickerMessage.vue.d.ts +3 -5
- package/dist/types/components/2_feed_elements/StickerMessage/utils/stickerUtils.d.ts +19 -0
- package/dist/types/components/2_feed_elements/TextMessage/TextMessage.vue.d.ts +2 -2
- package/dist/types/components/2_feed_elements/VideoMessage/VideoMessage.vue.d.ts +2 -2
- package/dist/types/components/2_modals/CreateDialog/CreateDialog.vue.d.ts +2 -2
- package/dist/types/components/2_modals/CreateDialog/stories/CreateDialog.stories.d.ts +2 -2
- package/dist/types/components/3_compounds/ChatList/ChatList.vue.d.ts +1 -1
- package/dist/types/components/3_compounds/Feed/Feed.vue.d.ts +2 -2
- package/dist/types/main.d.ts +1 -1
- package/package.json +5 -5
- package/dist/index-BzAEsq7j.js +0 -43508
- package/dist/vuessages.es.js +0 -123
- package/dist/vuessages.umd.js +0 -624
- /package/dist/types/{utils → components/2_feed_elements/StickerMessage/utils}/suppress-lit-warning.d.ts +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { defineComponent as V, inject as $, ref as g, computed as C, watch as d, nextTick as p, unref as a, onMounted as N, createElementBlock as y, openBlock as x, createElementVNode as u, withDirectives as G, createVNode as T, renderSlot as w, toDisplayString as U, withKeys as J, vModelText as Q, normalizeClass as X } from "vue";
|
|
2
|
+
import { useImmediateDebouncedRef as Z } from "../../../hooks/useImmediateDebouncedRef.js";
|
|
3
|
+
import { useMessageDraft as ee } from "../../../hooks/useMessageDraft.js";
|
|
4
|
+
import "../../../hooks/useSearchModel.js";
|
|
5
|
+
import "../../../hooks/useTheme.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
8
|
+
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
9
|
+
import "../../../functions/parseMarkdown.js";
|
|
10
|
+
import { t as te } from "../../../locale/useLocale.js";
|
|
11
|
+
import ne from "./icons/SendIcon.vue.js";
|
|
12
|
+
import le from "../../2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js";
|
|
13
|
+
const ie = { class: "chat-input__container" }, se = ["id"], oe = ["id"], ae = { class: "chat-input__inline-buttons" }, re = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "chat-input__input chat-input__disabled-placeholder"
|
|
16
|
+
}, ue = ["disabled", "placeholder"], ce = ["disabled"], de = { class: "" }, pe = { class: "chat-input__third-line" }, Ie = /* @__PURE__ */ V({
|
|
17
|
+
__name: "ChatInput",
|
|
18
|
+
props: {
|
|
19
|
+
state: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: !1,
|
|
22
|
+
default: "active"
|
|
23
|
+
},
|
|
24
|
+
focusOnInputArea: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
required: !1,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
disabledPlaceholder: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: null
|
|
32
|
+
},
|
|
33
|
+
selectedChannel: {
|
|
34
|
+
type: Object,
|
|
35
|
+
required: !1,
|
|
36
|
+
default: null
|
|
37
|
+
},
|
|
38
|
+
inputButtonColor: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: !1,
|
|
41
|
+
default: null
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
emits: ["send", "typing"],
|
|
45
|
+
setup(c, { emit: I }) {
|
|
46
|
+
const f = I, h = $("chatAppId"), { resetMessage: A, getMessage: i, setMessageText: m, setForceSendMessage: D } = ee(h), n = g(), F = Z("", 2e3), E = g(), r = c, R = C(() => !!(r.state == "disabled" || i().text == "" && !i().file || i().isRecording)), k = C(() => {
|
|
47
|
+
var t;
|
|
48
|
+
if (r.inputButtonColor)
|
|
49
|
+
return r.inputButtonColor;
|
|
50
|
+
if (!((t = r.selectedChannel) != null && t.channelId))
|
|
51
|
+
return "#25D366";
|
|
52
|
+
const e = r.selectedChannel.channelId.toLowerCase();
|
|
53
|
+
return e.includes("whatsapp") || e.includes("waba") ? "#25D366" : e.includes("telegram") ? "#37AFE2" : e.includes("sms") ? "#6C757D" : e.includes("max") ? "#4B0082" : "#25D366";
|
|
54
|
+
});
|
|
55
|
+
d(
|
|
56
|
+
() => F.value,
|
|
57
|
+
() => {
|
|
58
|
+
f("typing");
|
|
59
|
+
}
|
|
60
|
+
), d(
|
|
61
|
+
() => r.focusOnInputArea,
|
|
62
|
+
() => {
|
|
63
|
+
r.focusOnInputArea && p(() => {
|
|
64
|
+
const e = a(n);
|
|
65
|
+
e == null || e.focus();
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
{ immediate: !0 }
|
|
69
|
+
), d(
|
|
70
|
+
() => i().text,
|
|
71
|
+
() => {
|
|
72
|
+
p(() => {
|
|
73
|
+
const e = n.value;
|
|
74
|
+
if (!e) return;
|
|
75
|
+
const t = e.scrollTop;
|
|
76
|
+
e.style.height = "auto";
|
|
77
|
+
const l = getComputedStyle(e), s = parseFloat(l.fontSize) || 16, L = parseFloat(l.lineHeight) || s * 1.4, _ = 40, b = L * 11, S = e.scrollHeight, W = i().text.split(`
|
|
78
|
+
`).length > 1, o = document.createElement("div");
|
|
79
|
+
o.style.position = "absolute", o.style.visibility = "hidden", o.style.whiteSpace = "nowrap", o.style.font = l.font, o.style.fontSize = l.fontSize, o.style.fontFamily = l.fontFamily, o.style.fontWeight = l.fontWeight, o.style.letterSpacing = l.letterSpacing, o.textContent = i().text, document.body.appendChild(o);
|
|
80
|
+
const O = o.offsetWidth;
|
|
81
|
+
document.body.removeChild(o);
|
|
82
|
+
const Y = parseFloat(l.paddingLeft) || 0, q = parseFloat(l.paddingRight) || 0, K = e.clientWidth - Y - q, P = O > K, j = W || P;
|
|
83
|
+
i().text.trim() && j ? S <= b ? (e.style.height = S + "px", e.style.overflowY = "hidden") : (e.style.height = b + "px", e.style.overflowY = "auto", e.scrollTop = t) : (e.style.height = _ + "px", e.style.overflowY = "hidden");
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
{ immediate: !0 }
|
|
87
|
+
), d(
|
|
88
|
+
() => i().forceSend,
|
|
89
|
+
() => {
|
|
90
|
+
i().forceSend && (v(), D(!1));
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
const z = (e) => {
|
|
94
|
+
const t = e.target;
|
|
95
|
+
f("typing", t.value);
|
|
96
|
+
}, B = () => {
|
|
97
|
+
p(() => {
|
|
98
|
+
const e = n.value;
|
|
99
|
+
e && (e.style.height = "40px", e.style.overflowY = "hidden");
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
N(() => {
|
|
103
|
+
B();
|
|
104
|
+
});
|
|
105
|
+
const H = (e) => {
|
|
106
|
+
if (e.shiftKey) {
|
|
107
|
+
if (n.value instanceof HTMLTextAreaElement) {
|
|
108
|
+
let t = n.value.selectionStart;
|
|
109
|
+
t && (n.value.setRangeText(`
|
|
110
|
+
`, t, t, "end"), m(n.value.value));
|
|
111
|
+
}
|
|
112
|
+
e.preventDefault();
|
|
113
|
+
} else if (e.ctrlKey) {
|
|
114
|
+
if (n.value instanceof HTMLTextAreaElement) {
|
|
115
|
+
let t = n.value.selectionStart;
|
|
116
|
+
t && (n.value.setRangeText(`
|
|
117
|
+
`, t, t, "end"), m(n.value.value));
|
|
118
|
+
}
|
|
119
|
+
e.preventDefault();
|
|
120
|
+
} else
|
|
121
|
+
e.preventDefault(), v();
|
|
122
|
+
}, M = (e) => {
|
|
123
|
+
if (n.value) {
|
|
124
|
+
const t = n.value.value;
|
|
125
|
+
n.value.value = e.newText;
|
|
126
|
+
const l = e.newText.length - (t.length - (e.end - e.start)), s = e.start + l;
|
|
127
|
+
m(e.newText), p(() => {
|
|
128
|
+
n.value && (n.value.setSelectionRange(s, s), n.value.focus());
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}, v = () => {
|
|
132
|
+
var t, l;
|
|
133
|
+
const e = g(i());
|
|
134
|
+
if (e.value.text != "" || e.value.file) {
|
|
135
|
+
const s = {
|
|
136
|
+
type: "",
|
|
137
|
+
text: "",
|
|
138
|
+
url: "",
|
|
139
|
+
filename: "",
|
|
140
|
+
size: "",
|
|
141
|
+
reply: void 0
|
|
142
|
+
};
|
|
143
|
+
e.value.file ? (s.type = "message." + e.value.file.type, s.url = e.value.file.url, s.filename = e.value.file.name, s.size = (t = e.value.file.size) == null ? void 0 : t.toString(), s.text = (l = e == null ? void 0 : e.value) == null ? void 0 : l.text.trim()) : (s.type = "message.text", s.text = e.value.text.trim()), e.value.reply && (s.reply = e.value.reply), f("send", s), A(), E.value = void 0, n.value && n.value.focus();
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
return (e, t) => (x(), y("div", ie, [
|
|
147
|
+
u("div", {
|
|
148
|
+
id: "chat-input-reply-line-" + a(h),
|
|
149
|
+
class: "chat-input__reply-line"
|
|
150
|
+
}, null, 8, se),
|
|
151
|
+
u("div", {
|
|
152
|
+
id: "chat-input-file-line-" + a(h),
|
|
153
|
+
class: "chat-input__file-line"
|
|
154
|
+
}, null, 8, oe),
|
|
155
|
+
u("div", ae, [
|
|
156
|
+
w(e.$slots, "inline-buttons", {}, void 0, !0)
|
|
157
|
+
]),
|
|
158
|
+
c.disabledPlaceholder && (c.state == "disabled" || a(i)().isRecording) ? (x(), y("div", re, U(c.disabledPlaceholder), 1)) : G((x(), y("textarea", {
|
|
159
|
+
key: 1,
|
|
160
|
+
ref_key: "refInput",
|
|
161
|
+
ref: n,
|
|
162
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => a(i)().text = l),
|
|
163
|
+
disabled: c.state == "disabled" || a(i)().isRecording,
|
|
164
|
+
class: "chat-input__input",
|
|
165
|
+
placeholder: a(te)("component.ChatInput.InputPlaceholder"),
|
|
166
|
+
onKeydown: J(H, ["enter"]),
|
|
167
|
+
onInput: z
|
|
168
|
+
}, null, 40, ue)), [
|
|
169
|
+
[Q, a(i)().text]
|
|
170
|
+
]),
|
|
171
|
+
T(le, {
|
|
172
|
+
textarea: n.value,
|
|
173
|
+
onFormatApplied: M
|
|
174
|
+
}, null, 8, ["textarea"]),
|
|
175
|
+
u("button", {
|
|
176
|
+
class: X(["chat-input__button", { "chat-input__button-disabled": R.value }]),
|
|
177
|
+
disabled: a(i)().isRecording,
|
|
178
|
+
onClick: v
|
|
179
|
+
}, [
|
|
180
|
+
u("span", de, [
|
|
181
|
+
T(a(ne), { color: k.value }, null, 8, ["color"])
|
|
182
|
+
])
|
|
183
|
+
], 10, ce),
|
|
184
|
+
u("div", pe, [
|
|
185
|
+
w(e.$slots, "buttons", {}, void 0, !0)
|
|
186
|
+
])
|
|
187
|
+
]));
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
export {
|
|
191
|
+
Ie as default
|
|
192
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent as o, createElementBlock as i, openBlock as n, createElementVNode as t } from "vue";
|
|
2
|
+
const c = {
|
|
3
|
+
width: "30",
|
|
4
|
+
height: "30",
|
|
5
|
+
viewBox: "0 0 30 30",
|
|
6
|
+
fill: "none",
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
8
|
+
}, r = { "clip-path": "url(#clip0_5094_38)" }, s = ["fill"], p = /* @__PURE__ */ o({
|
|
9
|
+
__name: "SendIcon",
|
|
10
|
+
props: {
|
|
11
|
+
color: { default: "#6C757D" }
|
|
12
|
+
},
|
|
13
|
+
setup(l) {
|
|
14
|
+
return (C, e) => (n(), i("svg", c, [
|
|
15
|
+
t("g", r, [
|
|
16
|
+
t("path", {
|
|
17
|
+
d: "M29.2562 15.8609C29.4249 15.7886 29.5687 15.6685 29.6697 15.5153C29.7708 15.3621 29.8246 15.1826 29.8246 14.9991C29.8246 14.8156 29.7708 14.6361 29.6697 14.4829C29.5687 14.3297 29.4249 14.2096 29.2562 14.1373L2.25448 2.56551L2.25315 2.56418L1.41523 2.20356C1.25645 2.13533 1.0819 2.11232 0.910865 2.13706C0.739829 2.16181 0.57896 2.23335 0.44603 2.34378C0.3131 2.45421 0.21328 2.59924 0.157599 2.76284C0.101917 2.92644 0.0925408 3.10225 0.130504 3.27085L0.329378 4.15915L0.328052 4.16313L2.73707 14.9991L0.328052 25.8351L0.328051 25.8404L0.129177 26.7287C0.0918219 26.8971 0.101658 27.0725 0.157599 27.2357C0.213541 27.3989 0.313419 27.5435 0.446241 27.6535C0.579064 27.7636 0.739678 27.8349 0.910408 27.8596C1.08114 27.8842 1.25536 27.8613 1.4139 27.7933L29.2562 15.8609ZM24.3202 15.9365H4.44872L4.61179 15.2033C4.6418 15.0688 4.6418 14.9294 4.61179 14.7949L4.44872 14.0617H24.3202L26.5065 14.9991L24.3215 15.9378L24.3202 15.9365Z",
|
|
18
|
+
fill: l.color
|
|
19
|
+
}, null, 8, s)
|
|
20
|
+
]),
|
|
21
|
+
e[0] || (e[0] = t("defs", null, [
|
|
22
|
+
t("clipPath", { id: "clip0_5094_38" }, [
|
|
23
|
+
t("rect", {
|
|
24
|
+
width: "30",
|
|
25
|
+
height: "30",
|
|
26
|
+
fill: "white"
|
|
27
|
+
})
|
|
28
|
+
])
|
|
29
|
+
], -1))
|
|
30
|
+
]));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
p as default
|
|
35
|
+
};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { ref as L, computed as I, createElementBlock as o, openBlock as a, renderSlot as v, createBlock as r, createCommentVNode as n, createElementVNode as i, createVNode as D, unref as e, toDisplayString as h, createTextVNode as Q, Fragment as u, renderList as g, Transition as N, withCtx as V } from "vue";
|
|
2
|
+
import p from "../../2_chatlist_elements/ChatItem/ChatItem.vue.js";
|
|
3
|
+
import $ from "../../2_chatlist_elements/ChatFilter/ChatFilter.vue.js";
|
|
4
|
+
import q from "../../2_chatlist_elements/ChatTabs/ChatTabs.vue.js";
|
|
5
|
+
import { useChatListScroll as M } from "./composables/useChatListScroll.js";
|
|
6
|
+
import { useChatListSelection as P } from "./composables/useChatListSelection.js";
|
|
7
|
+
import { useChatListFilter as U } from "./composables/useChatListFilter.js";
|
|
8
|
+
import { useChatListActions as W } from "./composables/useChatListActions.js";
|
|
9
|
+
/* empty css */
|
|
10
|
+
import j from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
11
|
+
const O = { class: "chat-list" }, R = {
|
|
12
|
+
key: 2,
|
|
13
|
+
class: "chat-list__search-indicator"
|
|
14
|
+
}, z = { class: "chat-list__search-content" }, G = { class: "chat-list__search-text" }, H = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "chat-list__search-progress"
|
|
17
|
+
}, J = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "chat-list__search-query"
|
|
20
|
+
}, K = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "chat-list__search-stats"
|
|
23
|
+
}, X = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "chat-list__no-data"
|
|
26
|
+
}, Y = { class: "chat-list__fixed-items-top" }, Z = { class: "chat-list__scrollable-items" }, tt = { class: "chat-list__fixed-items-bottom" }, et = {
|
|
27
|
+
__name: "ChatList",
|
|
28
|
+
props: {
|
|
29
|
+
chats: {
|
|
30
|
+
type: Array,
|
|
31
|
+
required: !0
|
|
32
|
+
},
|
|
33
|
+
filterEnabled: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
required: !0
|
|
36
|
+
},
|
|
37
|
+
filterQuery: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: null
|
|
40
|
+
},
|
|
41
|
+
dialogTabs: {
|
|
42
|
+
type: Array,
|
|
43
|
+
default: () => []
|
|
44
|
+
},
|
|
45
|
+
activeTabId: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "all"
|
|
48
|
+
},
|
|
49
|
+
// Props для поиска
|
|
50
|
+
searchQuery: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ""
|
|
53
|
+
},
|
|
54
|
+
isSearching: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: !1
|
|
57
|
+
},
|
|
58
|
+
searchProgress: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: ""
|
|
61
|
+
},
|
|
62
|
+
searchStats: {
|
|
63
|
+
type: Object,
|
|
64
|
+
default: () => ({ loaded: 0, total: "?" })
|
|
65
|
+
},
|
|
66
|
+
showDialogs: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: !0
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
emits: ["select", "action", "loadMoreChats", "expand", "tab-click", "search", "clear-search"],
|
|
72
|
+
setup(s, { emit: A }) {
|
|
73
|
+
const S = s, c = A, k = L(), _ = I(() => S.chats), {
|
|
74
|
+
isShowButton: E,
|
|
75
|
+
scrollToTopForce: C,
|
|
76
|
+
scrollCheck: b,
|
|
77
|
+
startScrollWatch: x,
|
|
78
|
+
stopScrollWatch: T
|
|
79
|
+
} = M({ refChatList: k, chats: _, emit: c }), {
|
|
80
|
+
selectChat: m
|
|
81
|
+
} = P({ chats: _, emit: c }), {
|
|
82
|
+
getSortedAndFilteredChats: d,
|
|
83
|
+
getFilter: F
|
|
84
|
+
} = U({ props: S, emit: c }), {
|
|
85
|
+
expandChat: f,
|
|
86
|
+
action: y,
|
|
87
|
+
handleTabClick: B
|
|
88
|
+
} = W({ emit: c });
|
|
89
|
+
return (w, l) => (a(), o("div", O, [
|
|
90
|
+
v(w.$slots, "header", {}, void 0, !0),
|
|
91
|
+
v(w.$slots, "sidebar", {}, void 0, !0),
|
|
92
|
+
s.filterEnabled ? (a(), r($, {
|
|
93
|
+
key: 0,
|
|
94
|
+
class: "chat-list__filter",
|
|
95
|
+
onUpdate: e(F)
|
|
96
|
+
}, null, 8, ["onUpdate"])) : n("", !0),
|
|
97
|
+
s.dialogTabs && s.dialogTabs.length > 0 ? (a(), r(q, {
|
|
98
|
+
key: 1,
|
|
99
|
+
tabs: s.dialogTabs,
|
|
100
|
+
onTabClick: e(B)
|
|
101
|
+
}, null, 8, ["tabs", "onTabClick"])) : n("", !0),
|
|
102
|
+
s.isSearching || s.searchQuery ? (a(), o("div", R, [
|
|
103
|
+
i("div", z, [
|
|
104
|
+
i("div", G, [
|
|
105
|
+
s.isSearching ? (a(), o("span", H, h(s.searchProgress || "Поиск..."), 1)) : (a(), o("span", J, [
|
|
106
|
+
Q(' Поиск "' + h(s.searchQuery) + '" завершён ', 1),
|
|
107
|
+
s.searchStats.loaded > 0 ? (a(), o("span", K, " (" + h(s.searchStats.loaded) + " " + h(s.searchStats.total !== "?" ? `из ${s.searchStats.total}` : "") + ") ", 1)) : n("", !0)
|
|
108
|
+
]))
|
|
109
|
+
]),
|
|
110
|
+
s.searchQuery ? (a(), o("button", {
|
|
111
|
+
key: 0,
|
|
112
|
+
class: "chat-list__search-clear",
|
|
113
|
+
title: "Очистить поиск",
|
|
114
|
+
onClick: l[0] || (l[0] = (t) => c("clear-search"))
|
|
115
|
+
}, [...l[5] || (l[5] = [
|
|
116
|
+
i("i", { class: "pi pi-times" }, null, -1)
|
|
117
|
+
])])) : n("", !0)
|
|
118
|
+
])
|
|
119
|
+
])) : n("", !0),
|
|
120
|
+
i("div", {
|
|
121
|
+
ref_key: "refChatList",
|
|
122
|
+
ref: k,
|
|
123
|
+
class: "chat-list__items",
|
|
124
|
+
onScroll: l[1] || (l[1] = (...t) => e(b) && e(b)(...t)),
|
|
125
|
+
onMousedown: l[2] || (l[2] = (...t) => e(x) && e(x)(...t)),
|
|
126
|
+
onMouseup: l[3] || (l[3] = (...t) => e(T) && e(T)(...t))
|
|
127
|
+
}, [
|
|
128
|
+
e(d)().length === 0 ? (a(), o("div", X, [...l[6] || (l[6] = [
|
|
129
|
+
i("div", { class: "chat-list__placeholder" }, [
|
|
130
|
+
i("p", { class: "chat-list__placeholder-title" }, " Нет контактных данных, чтобы начать чат "),
|
|
131
|
+
i("p", { class: "chat-list__placeholder-hint" }, " Добавьте номер телефона или имя Telegram в карточку контакта ")
|
|
132
|
+
], -1)
|
|
133
|
+
])])) : (a(), o(u, { key: 1 }, [
|
|
134
|
+
i("div", Y, [
|
|
135
|
+
(a(!0), o(u, null, g(e(d)().filter((t) => t.isFixedTop), (t) => (a(), r(p, {
|
|
136
|
+
key: t.chatId,
|
|
137
|
+
class: "chat-list__item",
|
|
138
|
+
chat: t,
|
|
139
|
+
"show-dialogs": s.showDialogs,
|
|
140
|
+
onSelect: e(m),
|
|
141
|
+
onExpand: e(f),
|
|
142
|
+
onAction: e(y)
|
|
143
|
+
}, null, 8, ["chat", "show-dialogs", "onSelect", "onExpand", "onAction"]))), 128))
|
|
144
|
+
]),
|
|
145
|
+
i("div", Z, [
|
|
146
|
+
(a(!0), o(u, null, g(e(d)().filter((t) => !t.isFixedBottom && !t.isFixedTop), (t) => (a(), r(p, {
|
|
147
|
+
key: t.chatId,
|
|
148
|
+
class: "chat-list__item",
|
|
149
|
+
chat: t,
|
|
150
|
+
"show-dialogs": s.showDialogs,
|
|
151
|
+
onSelect: e(m),
|
|
152
|
+
onExpand: e(f),
|
|
153
|
+
onAction: e(y)
|
|
154
|
+
}, null, 8, ["chat", "show-dialogs", "onSelect", "onExpand", "onAction"]))), 128))
|
|
155
|
+
]),
|
|
156
|
+
i("div", tt, [
|
|
157
|
+
(a(!0), o(u, null, g(e(d)().filter((t) => t.isFixedBottom), (t) => (a(), r(p, {
|
|
158
|
+
key: t.chatId,
|
|
159
|
+
class: "chat-list__item",
|
|
160
|
+
chat: t,
|
|
161
|
+
"show-dialogs": s.showDialogs,
|
|
162
|
+
onSelect: e(m),
|
|
163
|
+
onExpand: e(f),
|
|
164
|
+
onAction: e(y)
|
|
165
|
+
}, null, 8, ["chat", "show-dialogs", "onSelect", "onExpand", "onAction"]))), 128))
|
|
166
|
+
])
|
|
167
|
+
], 64))
|
|
168
|
+
], 544),
|
|
169
|
+
D(N, null, {
|
|
170
|
+
default: V(() => [
|
|
171
|
+
e(E) ? (a(), o("button", {
|
|
172
|
+
key: 0,
|
|
173
|
+
class: "chat-list__button-up",
|
|
174
|
+
onClick: l[4] || (l[4] = (...t) => e(C) && e(C)(...t))
|
|
175
|
+
}, [...l[7] || (l[7] = [
|
|
176
|
+
i("span", { class: "pi pi-angle-up chat-list__icon-down" }, null, -1)
|
|
177
|
+
])])) : n("", !0)
|
|
178
|
+
]),
|
|
179
|
+
_: 1
|
|
180
|
+
})
|
|
181
|
+
]));
|
|
182
|
+
}
|
|
183
|
+
}, ut = /* @__PURE__ */ j(et, [["__scopeId", "data-v-f4c84599"]]);
|
|
184
|
+
export {
|
|
185
|
+
ut as default
|
|
186
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createElementBlock as e, openBlock as o, createCommentVNode as a, renderSlot as n, toDisplayString as i } from "vue";
|
|
2
|
+
const r = { class: "chat-list__title-container" }, c = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "chat-list__title"
|
|
5
|
+
}, p = {
|
|
6
|
+
__name: "ChatListHeader",
|
|
7
|
+
props: {
|
|
8
|
+
title: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "Чаты"
|
|
11
|
+
},
|
|
12
|
+
titleEnabled: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !0
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(l) {
|
|
18
|
+
const t = l;
|
|
19
|
+
return (s, _) => (o(), e("div", r, [
|
|
20
|
+
t.titleEnabled ? (o(), e("h2", c, i(t.title), 1)) : a("", !0),
|
|
21
|
+
n(s.$slots, "actions")
|
|
22
|
+
]));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
p as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ref as l } from "vue";
|
|
2
|
+
function m({ props: e, emit: u }) {
|
|
3
|
+
const n = l("");
|
|
4
|
+
return {
|
|
5
|
+
filter: n,
|
|
6
|
+
getSortedAndFilteredChats: () => !e.chats || e.chats.length === 0 ? [] : e.chats.slice().sort((t, r) => {
|
|
7
|
+
const a = Number(t["lastActivity.timestamp"] || 0), s = Number(r["lastActivity.timestamp"] || 0);
|
|
8
|
+
return a > s ? -1 : a < s ? 1 : 0;
|
|
9
|
+
}).sort((t, r) => t.countUnread > r.countUnread ? -1 : t.countUnread < r.countUnread ? 1 : 0).filter((t) => {
|
|
10
|
+
var a;
|
|
11
|
+
const r = e.activeTabId || "all";
|
|
12
|
+
if (r !== "all") {
|
|
13
|
+
if (r === "countUnread") {
|
|
14
|
+
if (t.countUnread <= 0) return !1;
|
|
15
|
+
} else if (r.startsWith("tag_") && (!((a = t.contact) != null && a.tags) || !t.contact.tags.some((s) => s.tagId === r)))
|
|
16
|
+
return !1;
|
|
17
|
+
}
|
|
18
|
+
return e.searchQuery && e.searchQuery.trim() !== "" ? !0 : e.filterQuery ? t.name.includes(e.filterQuery) || t.metadata.includes(e.filterQuery) : t.name.includes(n.value) || t.metadata.includes(n.value);
|
|
19
|
+
}),
|
|
20
|
+
getFilter: (i) => {
|
|
21
|
+
n.value = i, i.trim() !== "" ? u("search", i) : u("clear-search");
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
m as useChatListFilter
|
|
27
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ref as n, watch as a, unref as r, nextTick as v } from "vue";
|
|
2
|
+
function W({ refChatList: t, chats: u, emit: i }) {
|
|
3
|
+
const o = n(!1), s = n(!1), c = n(!1);
|
|
4
|
+
function f() {
|
|
5
|
+
v(function() {
|
|
6
|
+
const l = r(t);
|
|
7
|
+
l && (l.scrollTop = 0);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
const h = () => {
|
|
11
|
+
const l = r(t);
|
|
12
|
+
if (!l) return;
|
|
13
|
+
const e = l.scrollHeight - l.scrollTop - l.clientHeight;
|
|
14
|
+
l.scrollTop > 500 && (s.value = !0), l.scrollTop <= 500 && (s.value = !1), c.value ? e < 300 && (o.value = !0) : (e < 300 && (o.value = !0), e >= 300 && (o.value = !1));
|
|
15
|
+
};
|
|
16
|
+
return a(
|
|
17
|
+
() => o.value,
|
|
18
|
+
() => {
|
|
19
|
+
o.value && i("loadMoreChats");
|
|
20
|
+
}
|
|
21
|
+
), a(
|
|
22
|
+
u,
|
|
23
|
+
() => {
|
|
24
|
+
if (o.value = !1, c.value) {
|
|
25
|
+
const l = r(t);
|
|
26
|
+
if (!l) return;
|
|
27
|
+
l.scrollTop = l.scrollHeight;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
), {
|
|
31
|
+
allowLoadMore: o,
|
|
32
|
+
isShowButton: s,
|
|
33
|
+
scrollToTopForce: f,
|
|
34
|
+
scrollCheck: h,
|
|
35
|
+
startScrollWatch: (l) => {
|
|
36
|
+
const e = r(t);
|
|
37
|
+
if (!e) return;
|
|
38
|
+
(l.offsetX > e.clientWidth || l.offsetY > e.clientHeight) && (c.value = !0);
|
|
39
|
+
},
|
|
40
|
+
stopScrollWatch: () => {
|
|
41
|
+
c.value = !1;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
W as useChatListScroll
|
|
47
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function d({ chats: r, emit: l }) {
|
|
2
|
+
const s = (t) => {
|
|
3
|
+
const a = r.value;
|
|
4
|
+
!a || !Array.isArray(a) || a.forEach((i) => {
|
|
5
|
+
i.isSelected = !1, i.dialogs && Array.isArray(i.dialogs) && i.dialogs.forEach((e) => {
|
|
6
|
+
e.isSelected = !1, e.dialogId == t.dialogId && (e.isSelected = !0);
|
|
7
|
+
});
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
selectChat: (t) => {
|
|
12
|
+
const a = r.value;
|
|
13
|
+
if (!a || !Array.isArray(a))
|
|
14
|
+
return;
|
|
15
|
+
a.forEach((e) => {
|
|
16
|
+
e.isSelected = !1, e.dialogs && Array.isArray(e.dialogs) && e.dialogs.forEach((o) => {
|
|
17
|
+
o.isSelected = !1;
|
|
18
|
+
});
|
|
19
|
+
}), t.dialog && s(t.dialog);
|
|
20
|
+
const i = a.find((e) => e.chatId === t.chat.chatId);
|
|
21
|
+
i && (i.isSelected = !0), l("select", t);
|
|
22
|
+
},
|
|
23
|
+
selectDialog: s
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
d as useChatListSelection
|
|
28
|
+
};
|