@mobilon-dev/chotto 0.3.29 → 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-2MSB5_mE.js → components/2_modals/CreateChat/CreateChat.vue.js} +8 -7
- package/dist/components/2_modals/CreateChat/CreateChat.vue2.js +1 -0
- package/dist/{CreateChat2-CMpXJzp0.js → components/2_modals/CreateChat2/CreateChat2.vue.js} +4 -3
- package/dist/{CreateDialog-CcDtIhwf.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-BCwswaCl.js → components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js} +48 -49
- package/dist/components/2_modals/SelectUser/SelectUser.vue.js +63 -0
- package/dist/{SelectUser2-C9PtiaqO.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/ButtonEmojiPicker/ButtonEmojiPicker.vue.d.ts +2 -0
- 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 +6 -6
- package/dist/index-5NsJv9hy.js +0 -43496
- 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,307 @@
|
|
|
1
|
+
import { ref as d, computed as m, watch as Ee, onMounted as we, onUnmounted as xe, createElementBlock as u, openBlock as o, createElementVNode as l, createCommentVNode as R, Fragment as E, renderList as $, unref as e, normalizeClass as r, createBlock as c, createVNode as Ie, withCtx as H, resolveDynamicComponent as p, normalizeStyle as ee, toDisplayString as h } from "vue";
|
|
2
|
+
import q from "../../1_atoms/Tooltip/Tooltip.vue.js";
|
|
3
|
+
import { useCommunicationChannels as Se } from "./composables/useCommunicationChannels.js";
|
|
4
|
+
import { useCommunicationMenu as ze } from "./composables/useCommunicationMenu.js";
|
|
5
|
+
import { useCommunicationAttributes as Le } from "./composables/useCommunicationAttributes.js";
|
|
6
|
+
import { useCommunicationActions as De } from "./composables/useCommunicationActions.js";
|
|
7
|
+
import { useCommunicationSubMenu as $e } from "./composables/useCommunicationSubMenu.js";
|
|
8
|
+
import { useCommunicationDialogSync as He } from "./composables/useCommunicationDialogSync.js";
|
|
9
|
+
/* empty css */
|
|
10
|
+
import qe from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
11
|
+
const Fe = ["onClick", "onMouseenter"], Oe = { class: "channel-icon" }, Pe = { class: "channel-icon" }, je = { class: "menu-header" }, Be = { class: "attribute-info" }, Ne = { class: "attribute-value" }, Ve = { class: "attribute-info" }, We = { class: "attribute-value" }, Ue = {
|
|
12
|
+
key: 2,
|
|
13
|
+
class: "menu-divider"
|
|
14
|
+
}, Ge = ["onMouseenter", "onClick"], Je = { class: "attribute-info" }, Ke = { class: "attribute-value" }, Qe = { class: "menu-icon" }, Xe = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "menu-icon-arrow"
|
|
17
|
+
}, Ye = ["onClick"], Ze = { class: "sub-menu-title" }, et = {
|
|
18
|
+
__name: "CommunicationPanel",
|
|
19
|
+
props: {
|
|
20
|
+
contactAttributes: {
|
|
21
|
+
type: Array,
|
|
22
|
+
required: !0,
|
|
23
|
+
default: () => []
|
|
24
|
+
},
|
|
25
|
+
channels: {
|
|
26
|
+
type: Array,
|
|
27
|
+
required: !0,
|
|
28
|
+
default: () => []
|
|
29
|
+
},
|
|
30
|
+
recentAttributeChannels: {
|
|
31
|
+
type: Object,
|
|
32
|
+
required: !0,
|
|
33
|
+
default: () => ({})
|
|
34
|
+
},
|
|
35
|
+
selectedDialog: {
|
|
36
|
+
type: Object,
|
|
37
|
+
required: !1,
|
|
38
|
+
default: null
|
|
39
|
+
},
|
|
40
|
+
channelTooltips: {
|
|
41
|
+
type: Object,
|
|
42
|
+
required: !1,
|
|
43
|
+
default: () => ({})
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
emits: ["select-attribute-channel", "phone-call"],
|
|
47
|
+
setup(te, { emit: ne }) {
|
|
48
|
+
const a = te, oe = ne, f = d(null), F = d(null), w = d(null), x = d(null), v = d(!1), C = d(null), I = d({}), S = m(() => a.channels ?? []), se = m(() => a.channelTooltips ?? {}), {
|
|
49
|
+
channelsTypes: le,
|
|
50
|
+
getTooltipText: ie,
|
|
51
|
+
getChannelTypeFromId: ue,
|
|
52
|
+
hasMultipleChannels: y,
|
|
53
|
+
isChannelActive: M,
|
|
54
|
+
getSingleChannelForType: ae,
|
|
55
|
+
getMenuChannelIconComponent: O,
|
|
56
|
+
getMenuChannelIconComponentForChannelId: re,
|
|
57
|
+
getSingleMenuChannelIconComponent: ce,
|
|
58
|
+
getAvailableChannels: de
|
|
59
|
+
} = Se({
|
|
60
|
+
channels: S,
|
|
61
|
+
channelTooltips: se,
|
|
62
|
+
selectedChannelType: C
|
|
63
|
+
}), {
|
|
64
|
+
activeChannelType: s,
|
|
65
|
+
hoveredChannel: A,
|
|
66
|
+
showMenu: me,
|
|
67
|
+
showSubMenu: z,
|
|
68
|
+
menuWidth: pe,
|
|
69
|
+
updateMenuWidth: L,
|
|
70
|
+
handleChannelClick: ve,
|
|
71
|
+
closeMenu: be,
|
|
72
|
+
handleClickOutside: P
|
|
73
|
+
} = ze({
|
|
74
|
+
panelRef: f,
|
|
75
|
+
channelsPanelRef: F,
|
|
76
|
+
selectedChannelType: C,
|
|
77
|
+
frozenAttribute: x,
|
|
78
|
+
isRecentAttributeHovered: v
|
|
79
|
+
}), he = m(() => a.contactAttributes ?? []), j = m(() => a.recentAttributeChannels ?? {}), {
|
|
80
|
+
organizedContactAttributes: B,
|
|
81
|
+
organizeContactAttributes: fe,
|
|
82
|
+
recentAttribute: k,
|
|
83
|
+
showRecentAttribute: D,
|
|
84
|
+
isAttributeFrozen: Ce
|
|
85
|
+
} = Le({
|
|
86
|
+
contactAttributes: he,
|
|
87
|
+
recentAttributeChannels: j,
|
|
88
|
+
activeChannelType: s,
|
|
89
|
+
frozenAttribute: x
|
|
90
|
+
}), {
|
|
91
|
+
handleRecentAttributeClick: N,
|
|
92
|
+
handleAttributeClick: ye,
|
|
93
|
+
selectChannel: Me,
|
|
94
|
+
availableChannels: Ae
|
|
95
|
+
} = De({
|
|
96
|
+
activeChannelType: s,
|
|
97
|
+
channels: S,
|
|
98
|
+
recentAttributeChannels: j,
|
|
99
|
+
selectedChannel: I,
|
|
100
|
+
selectedChannelType: C,
|
|
101
|
+
isRecentAttributeHovered: v,
|
|
102
|
+
hoveredAttribute: w,
|
|
103
|
+
closeMenu: be,
|
|
104
|
+
hasMultipleChannels: y,
|
|
105
|
+
getSingleChannelForType: ae,
|
|
106
|
+
getAvailableChannels: de,
|
|
107
|
+
emit: oe
|
|
108
|
+
}), {
|
|
109
|
+
subMenuTop: ke,
|
|
110
|
+
resetRegularAttributeHover: g,
|
|
111
|
+
handleRecentAttributeMouseEnter: ge,
|
|
112
|
+
handleRecentAttributeMouseLeave: _,
|
|
113
|
+
handleAttributeMouseEnter: _e,
|
|
114
|
+
handleAttributeMouseLeave: V,
|
|
115
|
+
keepSubMenuOpen: W,
|
|
116
|
+
closeSubMenu: U,
|
|
117
|
+
alignSubMenuWithTarget: G
|
|
118
|
+
} = $e({
|
|
119
|
+
activeChannelType: s,
|
|
120
|
+
showSubMenu: z,
|
|
121
|
+
frozenAttribute: x,
|
|
122
|
+
hoveredAttribute: w,
|
|
123
|
+
isRecentAttributeHovered: v,
|
|
124
|
+
hasMultipleChannels: y
|
|
125
|
+
});
|
|
126
|
+
He({
|
|
127
|
+
selectedChannelType: C,
|
|
128
|
+
selectedChannel: I,
|
|
129
|
+
channels: S,
|
|
130
|
+
selectedDialog: m(() => a.selectedDialog ?? null)
|
|
131
|
+
});
|
|
132
|
+
const J = m(
|
|
133
|
+
() => Ae()
|
|
134
|
+
), Te = m(
|
|
135
|
+
() => z.value && w.value && J.value.length > 0 && s.value !== "phone" && y(s.value)
|
|
136
|
+
), K = (T) => {
|
|
137
|
+
const n = ge(T.currentTarget);
|
|
138
|
+
n instanceof HTMLElement && G(f, n);
|
|
139
|
+
}, Re = (T, n) => {
|
|
140
|
+
const b = _e(T, n.currentTarget);
|
|
141
|
+
b instanceof HTMLElement && G(f, b);
|
|
142
|
+
};
|
|
143
|
+
return Ee(() => a.selectedDialog, () => {
|
|
144
|
+
}, { deep: !0 }), we(() => {
|
|
145
|
+
L(), window.addEventListener("resize", L), document.addEventListener("click", P), fe();
|
|
146
|
+
}), xe(() => {
|
|
147
|
+
window.removeEventListener("resize", L), document.removeEventListener("click", P);
|
|
148
|
+
}), (T, n) => {
|
|
149
|
+
var b, Q, X, Y;
|
|
150
|
+
return o(), u("div", {
|
|
151
|
+
ref_key: "panelRef",
|
|
152
|
+
ref: f,
|
|
153
|
+
class: "communication-panel"
|
|
154
|
+
}, [
|
|
155
|
+
l("div", {
|
|
156
|
+
ref_key: "channelsPanelRef",
|
|
157
|
+
ref: F,
|
|
158
|
+
class: "channels-panel"
|
|
159
|
+
}, [
|
|
160
|
+
(o(!0), u(E, null, $(e(le), (t) => {
|
|
161
|
+
var i;
|
|
162
|
+
return o(), u("button", {
|
|
163
|
+
key: t.type,
|
|
164
|
+
class: r(["channel-btn", {
|
|
165
|
+
active: e(M)(t.type),
|
|
166
|
+
hover: e(A) === t.type && !e(M)(t.type) || e(A) === t.type && e(M)(t.type)
|
|
167
|
+
}]),
|
|
168
|
+
onClick: (Z) => e(ve)(t.type),
|
|
169
|
+
onMouseenter: (Z) => A.value = t.type,
|
|
170
|
+
onMouseleave: n[0] || (n[0] = (Z) => A.value = null)
|
|
171
|
+
}, [
|
|
172
|
+
e(M)(t.type) ? (o(), u(E, { key: 0 }, [
|
|
173
|
+
Ie(q, {
|
|
174
|
+
text: (i = I.value) == null ? void 0 : i.title,
|
|
175
|
+
position: "bottom",
|
|
176
|
+
offset: 8
|
|
177
|
+
}, {
|
|
178
|
+
default: H(() => [
|
|
179
|
+
l("span", Oe, [
|
|
180
|
+
(o(), c(p(t.component)))
|
|
181
|
+
])
|
|
182
|
+
]),
|
|
183
|
+
_: 2
|
|
184
|
+
}, 1032, ["text"]),
|
|
185
|
+
n[12] || (n[12] = l("span", { class: "active-indicator" }, null, -1))
|
|
186
|
+
], 64)) : (o(), c(q, {
|
|
187
|
+
key: 1,
|
|
188
|
+
text: e(ie)(t.type),
|
|
189
|
+
position: "bottom",
|
|
190
|
+
offset: 8
|
|
191
|
+
}, {
|
|
192
|
+
default: H(() => [
|
|
193
|
+
l("span", Pe, [
|
|
194
|
+
(o(), c(p(t.component)))
|
|
195
|
+
])
|
|
196
|
+
]),
|
|
197
|
+
_: 2
|
|
198
|
+
}, 1032, ["text"]))
|
|
199
|
+
], 42, Fe);
|
|
200
|
+
}), 128))
|
|
201
|
+
], 512),
|
|
202
|
+
e(me) && e(s) ? (o(), u("div", {
|
|
203
|
+
key: 0,
|
|
204
|
+
class: "attributes-menu",
|
|
205
|
+
style: ee({ width: e(pe) })
|
|
206
|
+
}, [
|
|
207
|
+
l("div", je, h(e(s) === "phone" ? "Телефон" : "Недавний"), 1),
|
|
208
|
+
e(D) && ((b = a.recentAttributeChannels[e(s)]) != null && b.tooltip) ? (o(), c(q, {
|
|
209
|
+
key: 0,
|
|
210
|
+
text: (Q = a.recentAttributeChannels[e(s)]) == null ? void 0 : Q.tooltip,
|
|
211
|
+
position: "bottom",
|
|
212
|
+
offset: 8
|
|
213
|
+
}, {
|
|
214
|
+
default: H(() => {
|
|
215
|
+
var t;
|
|
216
|
+
return [
|
|
217
|
+
l("div", {
|
|
218
|
+
class: r(["recent-attribute", {
|
|
219
|
+
"frozen-hover": v.value
|
|
220
|
+
}]),
|
|
221
|
+
onMouseenter: n[1] || (n[1] = (i) => K(i)),
|
|
222
|
+
onMouseleave: n[2] || (n[2] = (...i) => e(_) && e(_)(...i)),
|
|
223
|
+
onMouseover: n[3] || (n[3] = (...i) => e(g) && e(g)(...i)),
|
|
224
|
+
onClick: n[4] || (n[4] = (i) => e(N)(e(k)))
|
|
225
|
+
}, [
|
|
226
|
+
l("div", Be, [
|
|
227
|
+
l("span", Ne, h((t = e(k)) == null ? void 0 : t.value), 1)
|
|
228
|
+
]),
|
|
229
|
+
l("span", {
|
|
230
|
+
class: r(["channel-icon-small", { "menu-icon-grey": e(s) !== "sms" }])
|
|
231
|
+
}, [
|
|
232
|
+
(o(), c(p(e(O)(e(s)))))
|
|
233
|
+
], 2)
|
|
234
|
+
], 34)
|
|
235
|
+
];
|
|
236
|
+
}),
|
|
237
|
+
_: 1
|
|
238
|
+
}, 8, ["text"])) : e(D) ? (o(), u("div", {
|
|
239
|
+
key: 1,
|
|
240
|
+
class: r(["recent-attribute", {
|
|
241
|
+
"frozen-hover": v.value
|
|
242
|
+
}]),
|
|
243
|
+
onMouseenter: n[5] || (n[5] = (t) => K(t)),
|
|
244
|
+
onMouseleave: n[6] || (n[6] = (...t) => e(_) && e(_)(...t)),
|
|
245
|
+
onMouseover: n[7] || (n[7] = (...t) => e(g) && e(g)(...t)),
|
|
246
|
+
onClick: n[8] || (n[8] = (t) => e(N)(e(k)))
|
|
247
|
+
}, [
|
|
248
|
+
l("div", Ve, [
|
|
249
|
+
l("span", We, h((X = e(k)) == null ? void 0 : X.value), 1)
|
|
250
|
+
]),
|
|
251
|
+
l("span", {
|
|
252
|
+
class: r(["channel-icon-small", { "menu-icon-grey": e(s) !== "sms" }])
|
|
253
|
+
}, [
|
|
254
|
+
(o(), c(p(e(O)(e(s)))))
|
|
255
|
+
], 2)
|
|
256
|
+
], 34)) : R("", !0),
|
|
257
|
+
e(D) && ((Y = e(B)[e(s)]) != null && Y.length) && e(s) !== "phone" ? (o(), u("div", Ue)) : R("", !0),
|
|
258
|
+
(o(!0), u(E, null, $(e(B)[e(s)], (t) => (o(), u("div", {
|
|
259
|
+
key: t.attributeId,
|
|
260
|
+
class: r(["attribute-item", {
|
|
261
|
+
"frozen-hover": e(Ce)(t)
|
|
262
|
+
}]),
|
|
263
|
+
onMouseenter: (i) => Re(t, i),
|
|
264
|
+
onMouseleave: n[9] || (n[9] = (...i) => e(V) && e(V)(...i)),
|
|
265
|
+
onClick: (i) => e(ye)(t)
|
|
266
|
+
}, [
|
|
267
|
+
l("div", Je, [
|
|
268
|
+
l("span", Ke, h(t.value), 1)
|
|
269
|
+
]),
|
|
270
|
+
l("span", Qe, [
|
|
271
|
+
e(y)(e(s)) ? (o(), u("span", Xe)) : (o(), u("span", {
|
|
272
|
+
key: 1,
|
|
273
|
+
class: r(["channel-icon-small", { "menu-icon-grey": e(s) !== "sms" }])
|
|
274
|
+
}, [
|
|
275
|
+
(o(), c(p(e(ce)(e(s)))))
|
|
276
|
+
], 2))
|
|
277
|
+
])
|
|
278
|
+
], 42, Ge))), 128)),
|
|
279
|
+
e(z) && Te.value ? (o(), u("div", {
|
|
280
|
+
key: 3,
|
|
281
|
+
class: "sub-menu left",
|
|
282
|
+
style: ee({ top: e(ke) + "px" }),
|
|
283
|
+
onMouseenter: n[10] || (n[10] = (...t) => e(W) && e(W)(...t)),
|
|
284
|
+
onMouseleave: n[11] || (n[11] = (...t) => e(U) && e(U)(...t))
|
|
285
|
+
}, [
|
|
286
|
+
n[13] || (n[13] = l("div", { class: "sub-menu-header" }, " Канал связи ", -1)),
|
|
287
|
+
(o(!0), u(E, null, $(J.value, (t) => (o(), u("div", {
|
|
288
|
+
key: t.channelId,
|
|
289
|
+
class: "sub-menu-item",
|
|
290
|
+
onClick: (i) => e(Me)(t.channelId)
|
|
291
|
+
}, [
|
|
292
|
+
l("span", Ze, h(t.title || t.channelId), 1),
|
|
293
|
+
l("span", {
|
|
294
|
+
class: r(["sub-menu-icon", { "menu-icon-grey": e(ue)(t.channelId) !== "sms" }])
|
|
295
|
+
}, [
|
|
296
|
+
(o(), c(p(e(re)(t.channelId))))
|
|
297
|
+
], 2)
|
|
298
|
+
], 8, Ye))), 128))
|
|
299
|
+
], 36)) : R("", !0)
|
|
300
|
+
], 4)) : R("", !0)
|
|
301
|
+
], 512);
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
}, dt = /* @__PURE__ */ qe(et, [["__scopeId", "data-v-074734c8"]]);
|
|
305
|
+
export {
|
|
306
|
+
dt as default
|
|
307
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
function j({
|
|
2
|
+
activeChannelType: u,
|
|
3
|
+
channels: t,
|
|
4
|
+
recentAttributeChannels: k,
|
|
5
|
+
selectedChannel: c,
|
|
6
|
+
selectedChannelType: f,
|
|
7
|
+
isRecentAttributeHovered: C,
|
|
8
|
+
hoveredAttribute: o,
|
|
9
|
+
closeMenu: e,
|
|
10
|
+
hasMultipleChannels: d,
|
|
11
|
+
getSingleChannelForType: h,
|
|
12
|
+
getAvailableChannels: R,
|
|
13
|
+
emit: i
|
|
14
|
+
}) {
|
|
15
|
+
const r = (n) => {
|
|
16
|
+
n && (i("phone-call", {
|
|
17
|
+
attributeId: n.id,
|
|
18
|
+
phoneNumber: n.data
|
|
19
|
+
}), e());
|
|
20
|
+
}, s = (n, l) => {
|
|
21
|
+
i("select-attribute-channel", {
|
|
22
|
+
attributeId: n.id,
|
|
23
|
+
channelId: l
|
|
24
|
+
}), f.value = u.value, c.value = t.value.find((a) => a.channelId === l) ?? {}, e();
|
|
25
|
+
}, v = (n, l) => {
|
|
26
|
+
l && i("select-attribute-channel", {
|
|
27
|
+
attributeId: l.id,
|
|
28
|
+
channelId: n
|
|
29
|
+
}), f.value = u.value, c.value = t.value.find((a) => a.channelId === n) ?? {}, e();
|
|
30
|
+
};
|
|
31
|
+
return {
|
|
32
|
+
handlePhoneCall: r,
|
|
33
|
+
handleRecentAttributeClick: (n) => {
|
|
34
|
+
var I;
|
|
35
|
+
const l = u.value;
|
|
36
|
+
if (!l)
|
|
37
|
+
return;
|
|
38
|
+
if (l === "phone") {
|
|
39
|
+
r(n);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (!d(l)) {
|
|
43
|
+
const b = h(l);
|
|
44
|
+
n && b && s(n, b.channelId);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const a = (I = k.value[l]) == null ? void 0 : I.channelId;
|
|
48
|
+
n && a && v(a, n);
|
|
49
|
+
},
|
|
50
|
+
handleAttributeClick: (n) => {
|
|
51
|
+
const l = u.value;
|
|
52
|
+
if (l) {
|
|
53
|
+
if (l === "phone") {
|
|
54
|
+
r(n);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (!d(l)) {
|
|
58
|
+
const a = h(l);
|
|
59
|
+
a && s(n, a.channelId);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
selectSingleChannel: s,
|
|
64
|
+
selectChannelForRecentAttribute: v,
|
|
65
|
+
selectChannel: (n) => {
|
|
66
|
+
if (C.value) {
|
|
67
|
+
v(n, o.value ?? null);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
o.value && (i("select-attribute-channel", {
|
|
71
|
+
attributeId: o.value.id,
|
|
72
|
+
channelId: n
|
|
73
|
+
}), f.value = u.value, c.value = t.value.find((l) => l.channelId === n) ?? {}), e();
|
|
74
|
+
},
|
|
75
|
+
availableChannels: () => {
|
|
76
|
+
const n = u.value;
|
|
77
|
+
return n ? R(n) : [];
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
j as useCommunicationActions
|
|
83
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { computed as r, unref as l, ref as v, watch as y } from "vue";
|
|
2
|
+
import { CHANNEL_TYPES as f } from "./useCommunicationChannels.js";
|
|
3
|
+
function C({
|
|
4
|
+
contactAttributes: m,
|
|
5
|
+
recentAttributeChannels: b,
|
|
6
|
+
activeChannelType: o,
|
|
7
|
+
frozenAttribute: d
|
|
8
|
+
}) {
|
|
9
|
+
const u = r(() => l(m) ?? []), i = r(() => l(b) ?? {}), s = v(
|
|
10
|
+
Object.fromEntries(f.map((t) => [t, []]))
|
|
11
|
+
), c = () => {
|
|
12
|
+
const t = Object.fromEntries(
|
|
13
|
+
f.map((e) => [e, []])
|
|
14
|
+
);
|
|
15
|
+
u.value.forEach((e) => {
|
|
16
|
+
if (!(!e || !e.type)) {
|
|
17
|
+
if (e.type === "telegram") {
|
|
18
|
+
t.telegram.push(e);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (e.type === "phone") {
|
|
22
|
+
["whatsapp", "max", "sms", "phone"].forEach((n) => {
|
|
23
|
+
t[n].push(e);
|
|
24
|
+
});
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
t[e.type] && t[e.type].push(e);
|
|
28
|
+
}
|
|
29
|
+
}), s.value = t;
|
|
30
|
+
};
|
|
31
|
+
y(u, c, { deep: !0, immediate: !0 });
|
|
32
|
+
const a = (t) => {
|
|
33
|
+
var n;
|
|
34
|
+
const e = (n = i.value[t]) == null ? void 0 : n.attributeId;
|
|
35
|
+
return e ? u.value.find((A) => A.id === e) ?? null : null;
|
|
36
|
+
}, p = r(() => {
|
|
37
|
+
const t = o.value;
|
|
38
|
+
return t ? a(t) : null;
|
|
39
|
+
}), h = r(() => {
|
|
40
|
+
const t = o.value;
|
|
41
|
+
if (!t || t === "phone")
|
|
42
|
+
return !1;
|
|
43
|
+
const e = p.value, n = i.value[t];
|
|
44
|
+
return !!(e && (n != null && n.channelId));
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
organizedContactAttributes: s,
|
|
48
|
+
organizeContactAttributes: c,
|
|
49
|
+
recentAttribute: p,
|
|
50
|
+
getRecentAttributeByType: a,
|
|
51
|
+
showRecentAttribute: h,
|
|
52
|
+
isAttributeFrozen: (t) => {
|
|
53
|
+
const e = d.value;
|
|
54
|
+
return !t || !(e != null && e.id) ? !1 : t.id === e.id;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
C as useCommunicationAttributes
|
|
60
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { computed as l, unref as c } from "vue";
|
|
2
|
+
import P from "../icons/CommunicationPanelPhoneIcon.vue.js";
|
|
3
|
+
import S from "../icons/CommunicationPanelWhatsAppIcon.vue.js";
|
|
4
|
+
import M from "../icons/CommunicationPanelTelegramIcon.vue.js";
|
|
5
|
+
import T from "../icons/CommunicationPanelMaxIcon.vue.js";
|
|
6
|
+
import b from "../icons/CommunicationPanelSMSIcon.vue.js";
|
|
7
|
+
import d from "../icons/CommunicationPanelSubmenuPhoneIcon.vue.js";
|
|
8
|
+
import v from "../icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js";
|
|
9
|
+
import x from "../icons/CommunicationPanelSubmenuTelegramIcon.vue.js";
|
|
10
|
+
import w from "../icons/CommunicationPanelSubmenuMaxIcon.vue.js";
|
|
11
|
+
import A from "../icons/CommunicationPanelSubmenuSMSIcon.vue.js";
|
|
12
|
+
const F = ["phone", "whatsapp", "telegram", "max", "sms"], y = {
|
|
13
|
+
phone: P,
|
|
14
|
+
whatsapp: S,
|
|
15
|
+
telegram: M,
|
|
16
|
+
max: T,
|
|
17
|
+
sms: b
|
|
18
|
+
}, E = {
|
|
19
|
+
phone: d,
|
|
20
|
+
whatsapp: v,
|
|
21
|
+
telegram: x,
|
|
22
|
+
max: w,
|
|
23
|
+
sms: A
|
|
24
|
+
}, L = {
|
|
25
|
+
phone: "Позвонить",
|
|
26
|
+
whatsapp: "Выберите контакт и канал для отправки сообщения",
|
|
27
|
+
telegram: "Выберите контакт и канал для отправки сообщения",
|
|
28
|
+
max: "Выберите контакт и канал для отправки сообщения",
|
|
29
|
+
sms: "Выберите контакт и канал для отправки сообщения"
|
|
30
|
+
};
|
|
31
|
+
function K({ channels: i, channelTooltips: u, selectedChannelType: s }) {
|
|
32
|
+
const t = l(() => c(i) ?? []), p = l(() => c(u) ?? {}), h = l(
|
|
33
|
+
() => F.map((n) => ({
|
|
34
|
+
type: n,
|
|
35
|
+
component: y[n]
|
|
36
|
+
}))
|
|
37
|
+
), C = (n) => {
|
|
38
|
+
const e = p.value[n];
|
|
39
|
+
return e || (L[n] ?? "");
|
|
40
|
+
}, o = (n) => {
|
|
41
|
+
if (!n) return null;
|
|
42
|
+
const [e] = n.split(".");
|
|
43
|
+
return e.includes("waba") ? "whatsapp" : e.includes("telegrambot") ? "telegram" : e;
|
|
44
|
+
}, g = (n) => t.value.filter((e) => o(e.channelId) === n).length > 1, f = (n) => s.value === n, m = (n) => {
|
|
45
|
+
const e = t.value.filter((I) => o(I.channelId) === n);
|
|
46
|
+
return e.length === 1 ? e[0] : null;
|
|
47
|
+
}, a = (n) => E[n] ?? null, r = (n) => {
|
|
48
|
+
const e = o(n);
|
|
49
|
+
return e ? a(e) : null;
|
|
50
|
+
};
|
|
51
|
+
return {
|
|
52
|
+
channelsTypes: h,
|
|
53
|
+
getTooltipText: C,
|
|
54
|
+
getChannelTypeFromId: o,
|
|
55
|
+
hasMultipleChannels: g,
|
|
56
|
+
isChannelActive: f,
|
|
57
|
+
getSingleChannelForType: m,
|
|
58
|
+
getMenuChannelIconComponent: a,
|
|
59
|
+
getMenuChannelIconComponentForChannelId: r,
|
|
60
|
+
getSingleMenuChannelIconComponent: (n) => {
|
|
61
|
+
const e = m(n);
|
|
62
|
+
return e ? r(e.channelId) : a(n);
|
|
63
|
+
},
|
|
64
|
+
getAvailableChannels: (n) => t.value.filter((e) => o(e.channelId) === n)
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
F as CHANNEL_TYPES,
|
|
69
|
+
K as useCommunicationChannels
|
|
70
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { watch as m, unref as f } from "vue";
|
|
2
|
+
import { CHANNEL_TYPES as h } from "./useCommunicationChannels.js";
|
|
3
|
+
function v({
|
|
4
|
+
selectedChannelType: n,
|
|
5
|
+
selectedChannel: l,
|
|
6
|
+
channels: t,
|
|
7
|
+
selectedDialog: c
|
|
8
|
+
}) {
|
|
9
|
+
const u = (e) => {
|
|
10
|
+
if (!e || !e.channelId) {
|
|
11
|
+
n.value = null, l.value = {};
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const r = e.channelId ? e.channelId.split(".")[0] : null, a = r ? d(r) : null;
|
|
15
|
+
if (a) {
|
|
16
|
+
n.value = a;
|
|
17
|
+
const i = t.value.find((o) => o.channelId === e.channelId);
|
|
18
|
+
l.value = i ?? {};
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return m(
|
|
22
|
+
() => f(c),
|
|
23
|
+
(e) => {
|
|
24
|
+
u(e ?? null);
|
|
25
|
+
},
|
|
26
|
+
{ immediate: !0, deep: !0 }
|
|
27
|
+
), {
|
|
28
|
+
updateSelectedChannelFromDialog: u
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function d(n) {
|
|
32
|
+
return n.includes("waba") ? "whatsapp" : n.includes("telegrambot") ? "telegram" : h.includes(n) ? n : null;
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
v as useCommunicationDialogSync
|
|
36
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ref as e } from "vue";
|
|
2
|
+
function k({
|
|
3
|
+
panelRef: h,
|
|
4
|
+
channelsPanelRef: t,
|
|
5
|
+
selectedChannelType: d,
|
|
6
|
+
frozenAttribute: o,
|
|
7
|
+
isRecentAttributeHovered: v
|
|
8
|
+
}) {
|
|
9
|
+
const u = e(null), C = e(null), n = e(!1), a = e(!1), i = e("0px"), c = () => {
|
|
10
|
+
t.value && (i.value = `${t.value.offsetWidth}px`);
|
|
11
|
+
}, s = () => {
|
|
12
|
+
n.value = !1, u.value = null, o.value = null, v.value = !1, a.value = !1;
|
|
13
|
+
};
|
|
14
|
+
return {
|
|
15
|
+
activeChannelType: u,
|
|
16
|
+
hoveredChannel: C,
|
|
17
|
+
showMenu: n,
|
|
18
|
+
showSubMenu: a,
|
|
19
|
+
menuWidth: i,
|
|
20
|
+
updateMenuWidth: c,
|
|
21
|
+
handleChannelClick: (l) => {
|
|
22
|
+
if (d.value === l && u.value === l) {
|
|
23
|
+
s();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
u.value = l, n.value = !0, a.value = !1, o.value = null, v.value = !1, c();
|
|
27
|
+
},
|
|
28
|
+
closeMenu: s,
|
|
29
|
+
handleClickOutside: (l) => {
|
|
30
|
+
const f = h.value;
|
|
31
|
+
f && !f.contains(l.target) && s();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
k as useCommunicationMenu
|
|
37
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ref as S } from "vue";
|
|
2
|
+
function F({
|
|
3
|
+
activeChannelType: s,
|
|
4
|
+
showSubMenu: t,
|
|
5
|
+
frozenAttribute: a,
|
|
6
|
+
hoveredAttribute: v,
|
|
7
|
+
isRecentAttributeHovered: o,
|
|
8
|
+
hasMultipleChannels: i
|
|
9
|
+
}) {
|
|
10
|
+
const n = S(0), m = () => {
|
|
11
|
+
t.value = !1, a.value = null, v.value = null;
|
|
12
|
+
};
|
|
13
|
+
return {
|
|
14
|
+
subMenuTop: n,
|
|
15
|
+
resetRegularAttributeHover: m,
|
|
16
|
+
handleRecentAttributeMouseEnter: (e) => {
|
|
17
|
+
const u = s.value;
|
|
18
|
+
if (!(!u || !i(u)))
|
|
19
|
+
return m(), o.value = !0, t.value = !0, e;
|
|
20
|
+
},
|
|
21
|
+
handleRecentAttributeMouseLeave: () => {
|
|
22
|
+
t.value || (o.value = !1);
|
|
23
|
+
},
|
|
24
|
+
handleAttributeMouseEnter: (e, u) => {
|
|
25
|
+
const l = s.value;
|
|
26
|
+
return !l || !i(l) ? null : (o.value = !1, v.value = e, t.value = !0, a.value = e, u);
|
|
27
|
+
},
|
|
28
|
+
handleAttributeMouseLeave: () => {
|
|
29
|
+
t.value || (a.value = null);
|
|
30
|
+
},
|
|
31
|
+
keepSubMenuOpen: () => {
|
|
32
|
+
t.value = !0;
|
|
33
|
+
},
|
|
34
|
+
closeSubMenu: () => {
|
|
35
|
+
t.value = !1, a.value = null, o.value = !1;
|
|
36
|
+
},
|
|
37
|
+
alignSubMenuWithTarget: (e, u) => {
|
|
38
|
+
var l, d, g;
|
|
39
|
+
if (!u) {
|
|
40
|
+
n.value = 0;
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
const p = (l = e.value) == null ? void 0 : l.querySelector(".attributes-menu"), c = (d = e.value) == null ? void 0 : d.querySelector(".sub-menu-header"), f = (g = e.value) == null ? void 0 : g.querySelector(".sub-menu");
|
|
45
|
+
if (!p) {
|
|
46
|
+
n.value = 0;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const y = p.getBoundingClientRect(), E = u.getBoundingClientRect();
|
|
50
|
+
let M = 0;
|
|
51
|
+
if (c) {
|
|
52
|
+
const r = c.getBoundingClientRect(), R = getComputedStyle(c), h = parseFloat(R.marginBottom || "0");
|
|
53
|
+
M = r.height + (Number.isNaN(h) ? 0 : h);
|
|
54
|
+
}
|
|
55
|
+
let b = 0;
|
|
56
|
+
if (f) {
|
|
57
|
+
const r = getComputedStyle(f);
|
|
58
|
+
b = parseFloat(r.paddingTop || "0") || 0;
|
|
59
|
+
}
|
|
60
|
+
n.value = E.top - y.top - M - b - 2;
|
|
61
|
+
} catch {
|
|
62
|
+
n.value = 0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
F as useCommunicationSubMenu
|
|
69
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createElementBlock as e, openBlock as i, createStaticVNode as o } from "vue";
|
|
2
|
+
import n from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const r = {}, l = {
|
|
4
|
+
width: "24",
|
|
5
|
+
height: "23",
|
|
6
|
+
viewBox: "0 0 24 23",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
};
|
|
10
|
+
function c(p, t) {
|
|
11
|
+
return i(), e("svg", l, [...t[0] || (t[0] = [
|
|
12
|
+
o('<g clip-path="url(#clip0_5484_1263)"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.8465 22.9371C9.5763 22.9371 8.52184 22.6072 6.69327 21.2872C5.52964 22.7721 1.86702 23.9271 1.70628 21.9472C1.70628 20.464 1.37041 19.214 1.00063 17.8378C0.547734 16.1523 0.0439453 14.2774 0.0439453 11.5525C0.0439453 5.05468 5.41635 0.167969 11.7862 0.167969C18.1561 0.167969 23.1503 5.29327 23.1503 11.6157C23.1503 17.9381 17.9972 22.9371 11.8465 22.9371ZM11.939 5.78538C8.83924 5.62414 6.42029 7.7577 5.88688 11.0971C5.44515 13.8625 6.22833 17.2322 6.89823 17.4018C7.21393 17.4817 8.02297 16.8324 8.52167 16.3374C9.34193 16.865 10.2832 17.2737 11.3295 17.3281C14.5118 17.4936 17.3319 15.0231 17.4985 11.8663C17.6652 8.70944 15.1213 5.95092 11.939 5.78538Z" fill="url(#paint0_linear_5484_1263)"></path></g><defs><linearGradient id="paint0_linear_5484_1263" x1="11.5971" y1="0.167969" x2="11.5971" y2="23.0001" gradientUnits="userSpaceOnUse"><stop stop-color="#45BEFD"></stop><stop offset="1" stop-color="#6726E2"></stop></linearGradient><clipPath id="clip0_5484_1263"><rect width="24" height="23" fill="white"></rect></clipPath></defs>', 2)
|
|
13
|
+
])]);
|
|
14
|
+
}
|
|
15
|
+
const d = /* @__PURE__ */ n(r, [["render", c]]);
|
|
16
|
+
export {
|
|
17
|
+
d as default
|
|
18
|
+
};
|