@mobilon-dev/chotto 0.3.30 → 0.3.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (330) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/dist/chotto.css +1 -1
  3. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js +7 -0
  4. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +106 -0
  5. package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +46 -0
  6. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue.js +7 -0
  7. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue2.js +39 -0
  8. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue.js +7 -0
  9. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue2.js +32 -0
  10. package/dist/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.js +23 -0
  11. package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +7 -0
  12. package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +77 -0
  13. package/dist/components/1_icons/AvatarIcon.vue.js +42 -0
  14. package/dist/components/1_icons/CheckIcon.vue.js +28 -0
  15. package/dist/components/1_icons/CloseButtonIcon.vue.js +21 -0
  16. package/dist/components/1_icons/ContactCRMIcon.vue.js +21 -0
  17. package/dist/components/1_icons/MenuIcon.vue.js +21 -0
  18. package/dist/components/1_icons/SearchIcon.vue.js +28 -0
  19. package/dist/components/1_icons/SettingsIcon.vue.js +18 -0
  20. package/dist/components/1_icons/TelegramIcon.vue.js +32 -0
  21. package/dist/components/1_icons/WhatsAppIcon.vue.js +32 -0
  22. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +307 -0
  23. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.js +83 -0
  24. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationAttributes.js +60 -0
  25. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationChannels.js +70 -0
  26. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationDialogSync.js +36 -0
  27. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.js +37 -0
  28. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.js +69 -0
  29. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelMaxIcon.vue.js +18 -0
  30. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelPhoneIcon.vue.js +23 -0
  31. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSMSIcon.vue.js +21 -0
  32. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuMaxIcon.vue.js +34 -0
  33. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuPhoneIcon.vue.js +32 -0
  34. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuSMSIcon.vue.js +21 -0
  35. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuTelegramIcon.vue.js +18 -0
  36. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js +32 -0
  37. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelTelegramIcon.vue.js +32 -0
  38. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelWhatsAppIcon.vue.js +18 -0
  39. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +7 -0
  40. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +61 -0
  41. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js +7 -0
  42. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue2.js +58 -0
  43. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue.js +7 -0
  44. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +68 -0
  45. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue.js +7 -0
  46. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +70 -0
  47. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +106 -0
  48. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +18 -0
  49. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +105 -0
  50. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +25 -0
  51. package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +98 -0
  52. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +7 -0
  53. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +157 -0
  54. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +7 -0
  55. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +105 -0
  56. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +21 -0
  57. package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js +66 -0
  58. package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +206 -0
  59. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js +7 -0
  60. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +210 -0
  61. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js +7 -0
  62. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +126 -0
  63. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js +7 -0
  64. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js +38 -0
  65. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js +7 -0
  66. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue2.js +41 -0
  67. package/dist/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js +281 -0
  68. package/dist/components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js +49 -0
  69. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +7 -0
  70. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +193 -0
  71. package/dist/components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js +37 -0
  72. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +7 -0
  73. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +116 -0
  74. package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +73 -0
  75. package/dist/components/2_elements/ChatInfo/ChatInfo.vue.js +93 -0
  76. package/dist/components/2_elements/ChatPanel/ChatPanel.vue.js +47 -0
  77. package/dist/components/2_elements/ContactInfo/ContactInfo.vue.js +158 -0
  78. package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +49 -0
  79. package/dist/components/2_elements/UserProfile/UserProfile.vue.js +39 -0
  80. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +7 -0
  81. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +94 -0
  82. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +7 -0
  83. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +380 -0
  84. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +7 -0
  85. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +57 -0
  86. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +7 -0
  87. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +476 -0
  88. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue.js +26 -0
  89. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue2.js +4 -0
  90. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue.js +26 -0
  91. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue2.js +4 -0
  92. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue.js +7 -0
  93. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue2.js +20 -0
  94. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js +7 -0
  95. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue2.js +18 -0
  96. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js +7 -0
  97. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue2.js +42 -0
  98. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +7 -0
  99. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +204 -0
  100. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +7 -0
  101. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +266 -0
  102. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js +7 -0
  103. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +46 -0
  104. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +7 -0
  105. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +161 -0
  106. package/dist/components/2_feed_elements/MessageReactions/composables/usePositioning.js +104 -0
  107. package/dist/components/2_feed_elements/MessageReactions/composables/useReactions.js +30 -0
  108. package/dist/components/2_feed_elements/MessageReactions/composables/useReactionsPanel.js +90 -0
  109. package/dist/components/2_feed_elements/MessageReactions/composables/useReactionsState.js +32 -0
  110. package/dist/components/2_feed_elements/MessageReactions/utils/quickReactions.js +17 -0
  111. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +73 -0
  112. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +4 -0
  113. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +7 -0
  114. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +39 -0
  115. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +7 -0
  116. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +35 -0
  117. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +7 -0
  118. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +46 -0
  119. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +7 -0
  120. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +71 -0
  121. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +7 -0
  122. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +119 -0
  123. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +7 -0
  124. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +27 -0
  125. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +7 -0
  126. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +75 -0
  127. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue.js +7 -0
  128. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue2.js +23 -0
  129. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +7 -0
  130. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +258 -0
  131. package/dist/components/2_feed_elements/StickerMessage/libs/tgs-player/lottie-player.esm.js +6469 -0
  132. package/dist/components/2_feed_elements/StickerMessage/libs/tgs-player/tgs-player.esm.js +7216 -0
  133. package/dist/components/2_feed_elements/StickerMessage/utils/stickerUtils.js +10 -0
  134. package/dist/components/2_feed_elements/StickerMessage/utils/suppress-lit-warning.js +21 -0
  135. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue.js +7 -0
  136. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue2.js +18 -0
  137. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +7 -0
  138. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +174 -0
  139. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue.js +7 -0
  140. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue2.js +32 -0
  141. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +7 -0
  142. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +286 -0
  143. package/dist/{CreateChat-C4y1ddK_.js → components/2_modals/CreateChat/CreateChat.vue.js} +8 -7
  144. package/dist/components/2_modals/CreateChat/CreateChat.vue2.js +1 -0
  145. package/dist/{CreateChat2-Oy9JaaRC.js → components/2_modals/CreateChat2/CreateChat2.vue.js} +4 -3
  146. package/dist/{CreateDialog-DacwclUe.js → components/2_modals/CreateDialog/CreateDialog.vue.js} +12 -11
  147. package/dist/components/2_modals/Modal/Modal.vue.js +69 -0
  148. package/dist/components/2_modals/ModalFullscreen/ModalFullscreen.vue.js +46 -0
  149. package/dist/components/2_modals/ModalNoFooter/ModalNoFooter.vue.js +43 -0
  150. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +7 -0
  151. package/dist/{ModalVideoRecorder-BkPr4JP7.js → components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js} +48 -49
  152. package/dist/components/2_modals/SelectUser/SelectUser.vue.js +63 -0
  153. package/dist/{SelectUser2-kaPAmxhi.js → components/2_modals/SelectUser2/SelectUser2.vue.js} +4 -3
  154. package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +7 -0
  155. package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +192 -0
  156. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue.js +35 -0
  157. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue2.js +4 -0
  158. package/dist/components/3_compounds/ChatList/ChatList.vue.js +195 -0
  159. package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +27 -0
  160. package/dist/components/3_compounds/ChatList/composables/useChatListActions.js +16 -0
  161. package/dist/components/3_compounds/ChatList/composables/useChatListFilter.js +27 -0
  162. package/dist/components/3_compounds/ChatList/composables/useChatListScroll.js +47 -0
  163. package/dist/components/3_compounds/ChatList/composables/useChatListSelection.js +28 -0
  164. package/dist/components/3_compounds/Feed/Feed.vue.js +7 -0
  165. package/dist/components/3_compounds/Feed/Feed.vue2.js +295 -0
  166. package/dist/components/3_compounds/Feed/assets/chat-background.svg.js +7 -0
  167. package/dist/components/3_compounds/Feed/composables/useFeedButton.js +17 -0
  168. package/dist/components/3_compounds/Feed/composables/useFeedComponents.js +29 -0
  169. package/dist/components/3_compounds/Feed/composables/useFeedGrouping.js +15 -0
  170. package/dist/components/3_compounds/Feed/composables/useFeedKeyboard.js +15 -0
  171. package/dist/components/3_compounds/Feed/composables/useFeedLoadMore.js +62 -0
  172. package/dist/components/3_compounds/Feed/composables/useFeedMessageVisibility.js +33 -0
  173. package/dist/components/3_compounds/Feed/composables/useFeedReply.js +42 -0
  174. package/dist/components/3_compounds/Feed/composables/useFeedScroll.js +63 -0
  175. package/dist/components/3_compounds/Feed/composables/useFeedScrollTo.js +18 -0
  176. package/dist/components/3_compounds/Feed/composables/useStickyDate.js +61 -0
  177. package/dist/components/3_compounds/Feed/functions/throttle.js +11 -0
  178. package/dist/components/3_compounds/SideBar/SideBar.vue.js +190 -0
  179. package/dist/components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js +63 -0
  180. package/dist/components/4_layouts/BaseLayout/BaseLayout.vue.js +18 -0
  181. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue.js +7 -0
  182. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue2.js +53 -0
  183. package/dist/components/4_layouts/ExtendedLayout/ExtendedLayout.vue.js +21 -0
  184. package/dist/components/4_layouts/FeedLayout/FeedLayout.vue.js +15 -0
  185. package/dist/components/5_containers/BaseContainer/BaseContainer.vue.js +33 -0
  186. package/dist/components/5_containers/FloatContainer/FloatContainer.vue.js +104 -0
  187. package/dist/functions/createReactionHandlers.js +19 -0
  188. package/dist/functions/formatTimestamp.js +8 -0
  189. package/dist/functions/getChannelAccentColor.js +30 -0
  190. package/dist/functions/getMessageClass.js +6 -0
  191. package/dist/functions/getStatusMessage.js +42 -0
  192. package/dist/functions/insertDaySeparators.js +24 -0
  193. package/dist/functions/parseMarkdown.js +18 -0
  194. package/dist/functions/playNotificationAudio.js +13 -0
  195. package/dist/functions/sortByTimestamp.js +4 -0
  196. package/dist/hooks/messages/useChannelAccentColor.js +29 -0
  197. package/dist/hooks/messages/useMessageActions.js +28 -0
  198. package/dist/hooks/messages/useMessageLinks.js +48 -0
  199. package/dist/hooks/messages/useSubtextTooltip.js +12 -0
  200. package/dist/hooks/modals/useCreateChat.js +19 -0
  201. package/dist/hooks/modals/useCreateChat2.js +16 -0
  202. package/dist/hooks/modals/useCreateDialog.js +20 -0
  203. package/dist/hooks/modals/useModal.js +41 -0
  204. package/dist/hooks/modals/useModalSelectUser2.js +20 -0
  205. package/dist/hooks/modals/useVideoRecorder.js +14 -0
  206. package/dist/hooks/uploadFile/generatePreview.js +20 -0
  207. package/dist/hooks/uploadFile/getTypeFileByMime.js +7 -0
  208. package/dist/hooks/uploadFile/uploadFile.js +28 -0
  209. package/dist/hooks/useDelayDebouncedRef.js +18 -0
  210. package/dist/hooks/useImmediateDebouncedRef.js +18 -0
  211. package/dist/hooks/useMessageDraft.js +87 -0
  212. package/dist/hooks/useSearchModel.js +11 -0
  213. package/dist/hooks/useTheme.js +11 -0
  214. package/dist/hooks/validators/chats/chatValidator.js +79 -0
  215. package/dist/hooks/validators/chats/useChatValidator.js +82 -0
  216. package/dist/hooks/validators/messages/messageValidator.js +84 -0
  217. package/dist/hooks/validators/messages/useMessageValidator.js +82 -0
  218. package/dist/hooks/validators/sidebar/sidebarValidator.js +47 -0
  219. package/dist/hooks/validators/sidebar/useSidebarValidator.js +82 -0
  220. package/dist/hooks/validators/useValidation.js +94 -0
  221. package/dist/index.js +239 -0
  222. package/dist/locale/en.js +22 -0
  223. package/dist/locale/ru.js +22 -0
  224. package/dist/locale/useLocale.js +34 -0
  225. package/dist/node_modules/entities/lib/esm/decode.js +278 -0
  226. package/dist/node_modules/entities/lib/esm/decode_codepoint.js +46 -0
  227. package/dist/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
  228. package/dist/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
  229. package/dist/node_modules/linkify-it/index.js +187 -0
  230. package/dist/node_modules/linkify-it/lib/re.js +19 -0
  231. package/dist/node_modules/linkify-string/dist/linkify-string.js +41 -0
  232. package/dist/node_modules/linkifyjs/dist/linkify.js +679 -0
  233. package/dist/node_modules/markdown-it/lib/common/html_blocks.js +67 -0
  234. package/dist/node_modules/markdown-it/lib/common/html_re.js +5 -0
  235. package/dist/node_modules/markdown-it/lib/common/utils.js +169 -0
  236. package/dist/node_modules/markdown-it/lib/helpers/index.js +8 -0
  237. package/dist/node_modules/markdown-it/lib/helpers/parse_link_destination.js +44 -0
  238. package/dist/node_modules/markdown-it/lib/helpers/parse_link_label.js +21 -0
  239. package/dist/node_modules/markdown-it/lib/helpers/parse_link_title.js +37 -0
  240. package/dist/node_modules/markdown-it/lib/index.js +112 -0
  241. package/dist/node_modules/markdown-it/lib/parser_block.js +63 -0
  242. package/dist/node_modules/markdown-it/lib/parser_core.js +34 -0
  243. package/dist/node_modules/markdown-it/lib/parser_inline.js +96 -0
  244. package/dist/node_modules/markdown-it/lib/presets/commonmark.js +78 -0
  245. package/dist/node_modules/markdown-it/lib/presets/default.js +40 -0
  246. package/dist/node_modules/markdown-it/lib/presets/zero.js +59 -0
  247. package/dist/node_modules/markdown-it/lib/renderer.js +127 -0
  248. package/dist/node_modules/markdown-it/lib/ruler.js +95 -0
  249. package/dist/node_modules/markdown-it/lib/rules_block/blockquote.js +59 -0
  250. package/dist/node_modules/markdown-it/lib/rules_block/code.js +23 -0
  251. package/dist/node_modules/markdown-it/lib/rules_block/fence.js +30 -0
  252. package/dist/node_modules/markdown-it/lib/rules_block/heading.js +28 -0
  253. package/dist/node_modules/markdown-it/lib/rules_block/hr.js +27 -0
  254. package/dist/node_modules/markdown-it/lib/rules_block/html_block.js +37 -0
  255. package/dist/node_modules/markdown-it/lib/rules_block/lheading.js +43 -0
  256. package/dist/node_modules/markdown-it/lib/rules_block/list.js +110 -0
  257. package/dist/node_modules/markdown-it/lib/rules_block/paragraph.js +25 -0
  258. package/dist/node_modules/markdown-it/lib/rules_block/reference.js +95 -0
  259. package/dist/node_modules/markdown-it/lib/rules_block/state_block.js +84 -0
  260. package/dist/node_modules/markdown-it/lib/rules_block/table.js +99 -0
  261. package/dist/node_modules/markdown-it/lib/rules_core/block.js +7 -0
  262. package/dist/node_modules/markdown-it/lib/rules_core/inline.js +10 -0
  263. package/dist/node_modules/markdown-it/lib/rules_core/linkify.js +57 -0
  264. package/dist/node_modules/markdown-it/lib/rules_core/normalize.js +9 -0
  265. package/dist/node_modules/markdown-it/lib/rules_core/replacements.js +31 -0
  266. package/dist/node_modules/markdown-it/lib/rules_core/smartquotes.js +80 -0
  267. package/dist/node_modules/markdown-it/lib/rules_core/state_core.js +8 -0
  268. package/dist/node_modules/markdown-it/lib/rules_core/text_join.js +16 -0
  269. package/dist/node_modules/markdown-it/lib/rules_inline/autolink.js +46 -0
  270. package/dist/node_modules/markdown-it/lib/rules_inline/backticks.js +31 -0
  271. package/dist/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +34 -0
  272. package/dist/node_modules/markdown-it/lib/rules_inline/emphasis.js +57 -0
  273. package/dist/node_modules/markdown-it/lib/rules_inline/entity.js +33 -0
  274. package/dist/node_modules/markdown-it/lib/rules_inline/escape.js +32 -0
  275. package/dist/node_modules/markdown-it/lib/rules_inline/fragments_join.js +10 -0
  276. package/dist/node_modules/markdown-it/lib/rules_inline/html_inline.js +32 -0
  277. package/dist/node_modules/markdown-it/lib/rules_inline/image.js +48 -0
  278. package/dist/node_modules/markdown-it/lib/rules_inline/link.js +40 -0
  279. package/dist/node_modules/markdown-it/lib/rules_inline/linkify.js +28 -0
  280. package/dist/node_modules/markdown-it/lib/rules_inline/newline.js +23 -0
  281. package/dist/node_modules/markdown-it/lib/rules_inline/state_inline.js +27 -0
  282. package/dist/node_modules/markdown-it/lib/rules_inline/strikethrough.js +54 -0
  283. package/dist/node_modules/markdown-it/lib/rules_inline/text.js +39 -0
  284. package/dist/node_modules/markdown-it/lib/token.js +31 -0
  285. package/dist/node_modules/mdurl/index.js +10 -0
  286. package/dist/node_modules/mdurl/lib/decode.js +61 -0
  287. package/dist/node_modules/mdurl/lib/encode.js +48 -0
  288. package/dist/node_modules/mdurl/lib/format.js +7 -0
  289. package/dist/node_modules/mdurl/lib/parse.js +74 -0
  290. package/dist/node_modules/punycode.js/punycode.es6.js +139 -0
  291. package/dist/node_modules/uc.micro/categories/Cc/regex.js +4 -0
  292. package/dist/node_modules/uc.micro/categories/Cf/regex.js +4 -0
  293. package/dist/node_modules/uc.micro/categories/P/regex.js +4 -0
  294. package/dist/node_modules/uc.micro/categories/S/regex.js +4 -0
  295. package/dist/node_modules/uc.micro/categories/Z/regex.js +4 -0
  296. package/dist/node_modules/uc.micro/index.js +14 -0
  297. package/dist/node_modules/uc.micro/properties/Any/regex.js +4 -0
  298. package/dist/node_modules/vue3-emoji-picker-ru/dist/emoji-picker.es.js +16471 -0
  299. package/dist/themes/dark.css +1 -1
  300. package/dist/themes/default.css +1 -1
  301. package/dist/themes/green.css +1 -1
  302. package/dist/themes/mobilon1.css +1 -1
  303. package/dist/types/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.d.ts +7 -0
  304. package/dist/types/components/1_atoms/LoadingIndicator/stories/LoadingIndicator.stories.d.ts +9 -0
  305. package/dist/types/components/1_atoms/LoadingIndicator/styles/types.d.ts +49 -0
  306. package/dist/types/components/1_icons/AvatarIcon.vue.d.ts +1 -1
  307. package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationChannels.d.ts +1 -1
  308. package/dist/types/components/2_blocks/FeedSearch/FeedSearch.vue.d.ts +2 -2
  309. package/dist/types/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.d.ts +2 -2
  310. package/dist/types/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.d.ts +2 -2
  311. package/dist/types/components/2_feed_elements/AudioMessage/AudioMessage.vue.d.ts +2 -2
  312. package/dist/types/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.d.ts +2 -2
  313. package/dist/types/components/2_feed_elements/CallMessage/CallMessage.vue.d.ts +2 -2
  314. package/dist/types/components/2_feed_elements/FileMessage/FileMessage.vue.d.ts +2 -2
  315. package/dist/types/components/2_feed_elements/ImageMessage/ImageMessage.vue.d.ts +2 -2
  316. package/dist/types/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.d.ts +1 -3
  317. package/dist/types/components/2_feed_elements/StickerMessage/StickerMessage.vue.d.ts +3 -5
  318. package/dist/types/components/2_feed_elements/StickerMessage/utils/stickerUtils.d.ts +19 -0
  319. package/dist/types/components/2_feed_elements/TextMessage/TextMessage.vue.d.ts +2 -2
  320. package/dist/types/components/2_feed_elements/VideoMessage/VideoMessage.vue.d.ts +2 -2
  321. package/dist/types/components/2_modals/CreateDialog/CreateDialog.vue.d.ts +2 -2
  322. package/dist/types/components/2_modals/CreateDialog/stories/CreateDialog.stories.d.ts +2 -2
  323. package/dist/types/components/3_compounds/ChatList/ChatList.vue.d.ts +3 -1
  324. package/dist/types/components/3_compounds/Feed/Feed.vue.d.ts +2 -2
  325. package/dist/types/main.d.ts +1 -1
  326. package/package.json +5 -5
  327. package/dist/index-BzAEsq7j.js +0 -43508
  328. package/dist/vuessages.es.js +0 -123
  329. package/dist/vuessages.umd.js +0 -624
  330. /package/dist/types/{utils → components/2_feed_elements/StickerMessage/utils}/suppress-lit-warning.d.ts +0 -0
@@ -0,0 +1,7 @@
1
+ const i = (t) => {
2
+ let e = "file";
3
+ return t.startsWith("image/") ? e = "image" : t.startsWith("video/") ? e = "video" : t.startsWith("audio/") && (e = "audio"), e;
4
+ };
5
+ export {
6
+ i as getTypeFileByMime
7
+ };
@@ -0,0 +1,28 @@
1
+ import { generatePreview as n } from "./generatePreview.js";
2
+ import { getTypeFileByMime as a } from "./getTypeFileByMime.js";
3
+ const c = async (o, r) => {
4
+ const t = new FormData();
5
+ t.append("file", r);
6
+ const s = (o || "https://filebump2.services.mobilon.ru") + "/upload";
7
+ try {
8
+ return {
9
+ url: (await (await fetch(
10
+ s,
11
+ {
12
+ method: "POST",
13
+ body: t
14
+ }
15
+ )).json()).url,
16
+ name: r.name,
17
+ size: r.size,
18
+ type: a(r.type),
19
+ status: "success",
20
+ preview: n(r)
21
+ };
22
+ } catch (e) {
23
+ return console.error("Ошибка при загрузке файла:", e), { status: "error" };
24
+ }
25
+ };
26
+ export {
27
+ c as uploadFile
28
+ };
@@ -0,0 +1,18 @@
1
+ import { customRef as i } from "vue";
2
+ function f(e, o = 500) {
3
+ let t;
4
+ return i((r, u) => ({
5
+ get() {
6
+ return r(), e;
7
+ },
8
+ set(n) {
9
+ clearTimeout(t), t = window.setTimeout(() => {
10
+ e = n, u();
11
+ }, o);
12
+ }
13
+ }));
14
+ }
15
+ export {
16
+ f as default,
17
+ f as useDelayDebouncedRef
18
+ };
@@ -0,0 +1,18 @@
1
+ import { customRef as m } from "vue";
2
+ function f(t, o = 500) {
3
+ let e;
4
+ return m((r, u) => ({
5
+ get() {
6
+ return r(), t;
7
+ },
8
+ set(i) {
9
+ e || (e = window.setTimeout(() => {
10
+ t = i, u(), e = void 0;
11
+ }, o));
12
+ }
13
+ }));
14
+ }
15
+ export {
16
+ f as default,
17
+ f as useImmediateDebouncedRef
18
+ };
@@ -0,0 +1,87 @@
1
+ import { ref as o } from "vue";
2
+ const s = o([]), x = (t) => {
3
+ const i = o(0), d = s.value.find(({ id: l }) => l == t);
4
+ d != null ? i.value = s.value.indexOf(d) : (s.value.push({
5
+ id: t,
6
+ text: "",
7
+ file: void 0,
8
+ forceSend: !1,
9
+ isRecording: !1
10
+ }), i.value = s.value.length - 1);
11
+ const n = () => {
12
+ s.value[i.value] = {
13
+ id: e().id,
14
+ text: "",
15
+ file: void 0,
16
+ reply: void 0,
17
+ forceSend: !1,
18
+ isRecording: e().isRecording
19
+ };
20
+ }, r = (l) => {
21
+ s.value[i.value] = {
22
+ id: e().id,
23
+ text: l,
24
+ file: e().file,
25
+ reply: e().reply,
26
+ forceSend: !1,
27
+ isRecording: e().isRecording
28
+ };
29
+ }, a = (l) => {
30
+ s.value[i.value] = {
31
+ id: e().id,
32
+ text: e().text,
33
+ file: l,
34
+ reply: e().reply,
35
+ forceSend: !1,
36
+ isRecording: e().isRecording
37
+ };
38
+ }, c = () => {
39
+ s.value[i.value] = {
40
+ id: e().id,
41
+ text: e().text,
42
+ file: void 0,
43
+ reply: e().reply,
44
+ forceSend: !1,
45
+ isRecording: e().isRecording
46
+ };
47
+ }, f = (l) => {
48
+ s.value[i.value] = {
49
+ id: e().id,
50
+ text: e().text,
51
+ file: e().file,
52
+ reply: l,
53
+ forceSend: !1,
54
+ isRecording: e().isRecording
55
+ };
56
+ }, g = () => {
57
+ s.value[i.value] = {
58
+ id: e().id,
59
+ text: e().text,
60
+ file: e().file,
61
+ reply: void 0,
62
+ forceSend: !1,
63
+ isRecording: e().isRecording
64
+ };
65
+ };
66
+ function e() {
67
+ return s.value[i.value];
68
+ }
69
+ return {
70
+ getMessage: e,
71
+ resetMessage: n,
72
+ setMessageFile: a,
73
+ resetMessageFile: c,
74
+ setMessageText: r,
75
+ setReply: f,
76
+ resetReply: g,
77
+ setForceSendMessage: (l) => {
78
+ s.value[i.value].forceSend = l;
79
+ },
80
+ setRecordingMessage: (l) => {
81
+ s.value[i.value].isRecording = l;
82
+ }
83
+ };
84
+ };
85
+ export {
86
+ x as useMessageDraft
87
+ };
@@ -0,0 +1,11 @@
1
+ import { ref as n } from "vue";
2
+ const e = n([]), r = (o) => {
3
+ const l = n(0), t = e.value.find(({ id: u }) => u == o);
4
+ return t != null ? l.value = e.value.indexOf(t) : (e.value.push({
5
+ id: o,
6
+ text: ""
7
+ }), l.value = e.value.length - 1), { getModel: () => e.value[l.value] };
8
+ };
9
+ export {
10
+ r as useSearchModel
11
+ };
@@ -0,0 +1,11 @@
1
+ import { ref as l } from "vue";
2
+ const e = l([]), a = (n) => {
3
+ const t = l(0), u = e.value.find(({ id: o }) => o == n);
4
+ return u != null ? t.value = e.value.indexOf(u) : (e.value.push({
5
+ id: n,
6
+ theme: ""
7
+ }), t.value = e.value.length - 1), { getTheme: () => e.value[t.value] };
8
+ };
9
+ export {
10
+ a as useTheme
11
+ };
@@ -0,0 +1,79 @@
1
+ function p(e, i, t) {
2
+ const s = [], a = `chats[${i}].actions[${t}]`;
3
+ return typeof e != "object" || e === null ? (s.push({ path: a, message: "Action должен быть объектом", value: e }), s) : ((!e.action || typeof e.action != "string") && s.push({ path: `${a}.action`, message: "Поле action обязательно и должно быть строкой", value: e.action }), (!e.title || typeof e.title != "string") && s.push({ path: `${a}.title`, message: "Поле title обязательно и должно быть строкой", value: e.title }), e.icon !== void 0 && typeof e.icon != "string" && s.push({ path: `${a}.icon`, message: "Поле icon должно быть строкой", value: e.icon }), s);
4
+ }
5
+ function u(e, i, t) {
6
+ const s = [], a = `chats[${i}].contact.attributes[${t}]`;
7
+ return typeof e != "object" || e === null ? (s.push({ path: a, message: "Атрибут контакта должен быть объектом", value: e }), s) : ((!e.id || typeof e.id != "string") && s.push({ path: `${a}.id`, message: "Поле id обязательно и должно быть строкой", value: e.id }), e.type !== void 0 && typeof e.type != "string" && s.push({ path: `${a}.type`, message: "Поле type должно быть строкой", value: e.type }), e.data !== void 0 && (typeof e.data != "string" && typeof e.data != "object" ? s.push({ path: `${a}.data`, message: "Поле data должно быть строкой или объектом", value: e.data }) : typeof e.data == "object" && ((!e.data.id || typeof e.data.id != "string") && s.push({ path: `${a}.data.id`, message: "Поле data.id должно быть строкой", value: e.data.id }), (!e.data.nickname || typeof e.data.nickname != "string") && s.push({ path: `${a}.data.nickname`, message: "Поле data.nickname должно быть строкой", value: e.data.nickname }), (!e.data.phone || typeof e.data.phone != "string") && s.push({ path: `${a}.data.phone`, message: "Поле data.phone должно быть строкой", value: e.data.phone }))), (!e.value || typeof e.value != "string") && s.push({ path: `${a}.value`, message: "Поле value обязательно и должно быть строкой", value: e.value }), s);
8
+ }
9
+ function o(e, i) {
10
+ const t = [], s = `chats[${i}].contact`;
11
+ return typeof e != "object" || e === null ? (t.push({ path: s, message: "Contact должен быть объектом", value: e }), t) : e.attributes !== void 0 && !Array.isArray(e.attributes) ? (t.push({ path: `${s}.attributes`, message: "Поле attributes должно быть массивом", value: e.attributes }), t) : (e.attributes && e.attributes.forEach((a, n) => {
12
+ t.push(...u(a, i, n));
13
+ }), t);
14
+ }
15
+ function l(e, i, t) {
16
+ const s = [], a = `chats[${i}].dialogs[${t}]`;
17
+ return typeof e != "object" || e === null ? (s.push({ path: a, message: "Диалог должен быть объектом", value: e }), s) : ((!e.dialogId || typeof e.dialogId != "string") && s.push({ path: `${a}.dialogId`, message: "Поле dialogId обязательно и должно быть строкой", value: e.dialogId }), (!e.name || typeof e.name != "string") && s.push({ path: `${a}.name`, message: "Поле name обязательно и должно быть строкой", value: e.name }), e["lastActivity.timestamp"] === void 0 ? s.push({ path: `${a}['lastActivity.timestamp']`, message: "Поле lastActivity.timestamp обязательно", value: e["lastActivity.timestamp"] }) : typeof e["lastActivity.timestamp"] != "number" && s.push({ path: `${a}['lastActivity.timestamp']`, message: "Поле lastActivity.timestamp должно быть числом", value: e["lastActivity.timestamp"] }), (e.isSelected === void 0 || typeof e.isSelected != "boolean") && s.push({ path: `${a}.isSelected`, message: "Поле isSelected обязательно и должно быть boolean", value: e.isSelected }), e.branchId !== void 0 && typeof e.branchId != "string" && s.push({ path: `${a}.branchId`, message: "Поле branchId должно быть строкой", value: e.branchId }), e.attributeId !== void 0 && typeof e.attributeId != "string" && s.push({ path: `${a}.attributeId`, message: "Поле attributeId должно быть строкой", value: e.attributeId }), e.channelId !== void 0 && typeof e.channelId != "string" && s.push({ path: `${a}.channelId`, message: "Поле channelId должно быть строкой", value: e.channelId }), e.icon !== void 0 && typeof e.icon != "string" && s.push({ path: `${a}.icon`, message: "Поле icon должно быть строкой", value: e.icon }), e.fullname !== void 0 && typeof e.fullname != "string" && s.push({ path: `${a}.fullname`, message: "Поле fullname должно быть строкой", value: e.fullname }), e.countUnread !== void 0 && typeof e.countUnread != "number" && s.push({ path: `${a}.countUnread`, message: "Поле countUnread должно быть числом", value: e.countUnread }), e["lastActivity.time"] !== void 0 && typeof e["lastActivity.time"] != "string" && s.push({ path: `${a}['lastActivity.time']`, message: "Поле lastActivity.time должно быть строкой", value: e["lastActivity.time"] }), s);
18
+ }
19
+ function d(e, i) {
20
+ const t = [], s = `chats[${i}]`;
21
+ if (typeof e != "object" || e === null)
22
+ return t.push({ path: s, message: "Чат должен быть объектом", value: e }), t;
23
+ if ((e.chatId === void 0 || typeof e.chatId != "string") && t.push({ path: `${s}.chatId`, message: "Поле chatId обязательно и должно быть строкой", value: e.chatId }), (!e.name || typeof e.name != "string") && t.push({ path: `${s}.name`, message: "Поле name обязательно и должно быть строкой", value: e.name }), e.countUnread === void 0 || typeof e.countUnread != "number" ? t.push({ path: `${s}.countUnread`, message: "Поле countUnread обязательно и должно быть числом", value: e.countUnread }) : e.countUnread < 0 && t.push({ path: `${s}.countUnread`, message: "Поле countUnread не может быть отрицательным", value: e.countUnread }), (!e.lastMessage || typeof e.lastMessage != "string") && t.push({ path: `${s}.lastMessage`, message: "Поле lastMessage обязательно и должно быть строкой", value: e.lastMessage }), (!e["lastActivity.timestamp"] || typeof e["lastActivity.timestamp"] != "number") && t.push({ path: `${s}['lastActivity.timestamp']`, message: "Поле lastActivity.timestamp обязательно и должно быть числом", value: e["lastActivity.timestamp"] }), e.avatar !== void 0 && typeof e.avatar != "string" && t.push({ path: `${s}.avatar`, message: "Поле avatar должно быть строкой", value: e.avatar }), e["lastActivity.time"] !== void 0 && typeof e["lastActivity.time"] != "string" && t.push({ path: `${s}['lastActivity.time']`, message: "Поле lastActivity.time должно быть строкой", value: e["lastActivity.time"] }), e["lastMessage.status"] !== void 0) {
24
+ const a = ["read", "sent", "received"];
25
+ a.includes(e["lastMessage.status"]) || t.push({
26
+ path: `${s}['lastMessage.status']`,
27
+ message: `Поле lastMessage.status должно быть одним из: ${a.join(", ")}`,
28
+ value: e["lastMessage.status"]
29
+ });
30
+ }
31
+ return e.isFixedTop !== void 0 && typeof e.isFixedTop != "boolean" && t.push({ path: `${s}.isFixedTop`, message: "Поле isFixedTop должно быть boolean", value: e.isFixedTop }), e.isFixedBottom !== void 0 && typeof e.isFixedBottom != "boolean" && t.push({ path: `${s}.isFixedBottom`, message: "Поле isFixedBottom должно быть boolean", value: e.isFixedBottom }), e.isFixed !== void 0 && typeof e.isFixed != "boolean" && t.push({ path: `${s}.isFixed`, message: "Поле isFixed должно быть boolean", value: e.isFixed }), e.status !== void 0 && typeof e.status != "string" && t.push({ path: `${s}.status`, message: "Поле status должно быть строкой", value: e.status }), e.statusMessage !== void 0 && typeof e.statusMessage != "string" && t.push({ path: `${s}.statusMessage`, message: "Поле statusMessage должно быть строкой", value: e.statusMessage }), e.colorUnread !== void 0 && typeof e.colorUnread != "string" && t.push({ path: `${s}.colorUnread`, message: "Поле colorUnread должно быть строкой", value: e.colorUnread }), e.typing !== void 0 && typeof e.typing != "boolean" && t.push({ path: `${s}.typing`, message: "Поле typing должно быть boolean", value: e.typing }), e.metadata !== void 0 && typeof e.metadata != "string" && t.push({ path: `${s}.metadata`, message: "Поле metadata должно быть строкой", value: e.metadata }), e.dialogsExpanded !== void 0 && typeof e.dialogsExpanded != "boolean" && t.push({ path: `${s}.dialogsExpanded`, message: "Поле dialogsExpanded должно быть boolean", value: e.dialogsExpanded }), e.actions !== void 0 && (Array.isArray(e.actions) ? e.actions.forEach((a, n) => {
32
+ t.push(...p(a, i, n));
33
+ }) : t.push({ path: `${s}.actions`, message: "Поле actions должно быть массивом", value: e.actions })), e.dialogs !== void 0 && (Array.isArray(e.dialogs) ? e.dialogs.forEach((a, n) => {
34
+ t.push(...l(a, i, n));
35
+ }) : t.push({ path: `${s}.dialogs`, message: "Поле dialogs должно быть массивом", value: e.dialogs })), e.contact !== void 0 && t.push(...o(e.contact, i)), t;
36
+ }
37
+ function f(e) {
38
+ const i = [], t = [];
39
+ if (!Array.isArray(e))
40
+ return {
41
+ isValid: !1,
42
+ errors: [{ path: "chats", message: "Данные должны быть массивом", value: e }],
43
+ warnings: []
44
+ };
45
+ e.length === 0 && t.push({ path: "chats", message: "Массив чатов пустой" });
46
+ const s = /* @__PURE__ */ new Set();
47
+ return e.forEach((a, n) => {
48
+ a && typeof a == "object" && a.chatId !== void 0 && (s.has(a.chatId) ? i.push({
49
+ path: `chats[${n}].chatId`,
50
+ message: "Дублирующийся chatId",
51
+ value: a.chatId
52
+ }) : s.add(a.chatId));
53
+ }), e.forEach((a, n) => {
54
+ i.push(...d(a, n));
55
+ }), {
56
+ isValid: i.length === 0,
57
+ errors: i,
58
+ warnings: t
59
+ };
60
+ }
61
+ function r(e) {
62
+ const i = [];
63
+ return i.push(`=== РЕЗУЛЬТАТ ВАЛИДАЦИИ ЧАТОВ ===
64
+ `), e.isValid ? i.push(`✅ Данные валидны!
65
+ `) : i.push(`❌ Обнаружены ошибки!
66
+ `), e.errors.length > 0 && (i.push(`
67
+ 🔴 ОШИБКИ (${e.errors.length}):`), e.errors.forEach((t, s) => {
68
+ i.push(` ${s + 1}. [${t.path}] ${t.message}`), t.value !== void 0 && i.push(` Значение: ${JSON.stringify(t.value)}`);
69
+ })), e.warnings.length > 0 && (i.push(`
70
+ ⚠️ ПРЕДУПРЕЖДЕНИЯ (${e.warnings.length}):`), e.warnings.forEach((t, s) => {
71
+ i.push(` ${s + 1}. [${t.path}] ${t.message}`), t.value !== void 0 && i.push(` Значение: ${JSON.stringify(t.value)}`);
72
+ })), i.push(`
73
+ ` + "=".repeat(35)), i.join(`
74
+ `);
75
+ }
76
+ export {
77
+ r as getValidationReport,
78
+ f as validateChats
79
+ };
@@ -0,0 +1,82 @@
1
+ import { ref as C, computed as u, watch as V } from "vue";
2
+ import { getValidationReport as R, validateChats as b } from "./chatValidator.js";
3
+ function x(a, d = {}) {
4
+ const { autoValidate: p = !0, debounce: r = 0 } = d, l = C(null), h = u(() => {
5
+ var o;
6
+ return ((o = l.value) == null ? void 0 : o.isValid) ?? !0;
7
+ }), s = u(() => {
8
+ var o;
9
+ return ((o = l.value) == null ? void 0 : o.errors) ?? [];
10
+ }), g = u(() => {
11
+ var o;
12
+ return ((o = l.value) == null ? void 0 : o.warnings) ?? [];
13
+ }), m = u(() => s.value.length), $ = u(() => g.value.length), v = u(() => l.value ? R(l.value) : "Валидация не выполнена");
14
+ function i() {
15
+ const o = b(a.value);
16
+ return l.value = o, o;
17
+ }
18
+ function w() {
19
+ l.value = null;
20
+ }
21
+ function E() {
22
+ if (!l.value) {
23
+ console.log("Валидация не выполнена");
24
+ return;
25
+ }
26
+ if (console.group("📋 Детальный отчет валидации чатов"), console.log(v.value), s.value.length > 0) {
27
+ console.log(`
28
+ 📊 Детали ошибок:`);
29
+ const o = /* @__PURE__ */ new Map();
30
+ s.value.forEach((e) => {
31
+ const n = e.path.match(/chats\[(\d+)\]/);
32
+ if (n) {
33
+ const t = parseInt(n[1]);
34
+ o.has(t) || o.set(t, []), o.get(t).push(e);
35
+ }
36
+ });
37
+ let f = 1;
38
+ o.forEach((e, n) => {
39
+ console.group(`
40
+ 🔴 Чат [${n}] - ошибок: ${e.length}`), e.forEach((t) => {
41
+ console.log(`
42
+ ${f}. ${t.path}`), console.log(` Сообщение: ${t.message}`), t.value !== void 0 && console.log(" Значение поля:", t.value), f++;
43
+ }), a.value && a.value[n] && (console.log(`
44
+ 📦 Полный объект чата:`), console.log(a.value[n])), console.groupEnd();
45
+ });
46
+ const c = s.value.filter((e) => !e.path.match(/chats\[(\d+)\]/));
47
+ c.length > 0 && (console.group(`
48
+ ⚠️ Общие ошибки - ${c.length}`), c.forEach((e, n) => {
49
+ console.log(`
50
+ ${n + 1}. ${e.path}`), console.log(` Сообщение: ${e.message}`), e.value !== void 0 && console.log(" Значение:", e.value);
51
+ }), console.groupEnd());
52
+ }
53
+ console.groupEnd();
54
+ }
55
+ if (p) {
56
+ let o = null;
57
+ V(
58
+ a,
59
+ () => {
60
+ r > 0 ? (o !== null && clearTimeout(o), o = window.setTimeout(() => {
61
+ i(), o = null;
62
+ }, r)) : i();
63
+ },
64
+ { deep: !0, immediate: !0 }
65
+ );
66
+ }
67
+ return {
68
+ validationResult: l,
69
+ isValid: h,
70
+ errors: s,
71
+ warnings: g,
72
+ errorCount: m,
73
+ warningCount: $,
74
+ report: v,
75
+ validate: i,
76
+ reset: w,
77
+ showReport: E
78
+ };
79
+ }
80
+ export {
81
+ x as useChatValidator
82
+ };
@@ -0,0 +1,84 @@
1
+ function n(t, s, e) {
2
+ const i = [], a = `messages[${s}].actions[${e}]`;
3
+ return typeof t != "object" || t === null ? (i.push({ path: a, message: "Action должен быть объектом", value: t }), i) : ((!t.action || typeof t.action != "string") && i.push({ path: `${a}.action`, message: "Поле action обязательно и должно быть строкой", value: t.action }), (!t.title || typeof t.title != "string") && i.push({ path: `${a}.title`, message: "Поле title обязательно и должно быть строкой", value: t.title }), t.icon !== void 0 && typeof t.icon != "string" && i.push({ path: `${a}.icon`, message: "Поле icon должно быть строкой", value: t.icon }), i);
4
+ }
5
+ function h(t, s) {
6
+ const e = [], i = `messages[${s}].reply`;
7
+ return typeof t != "object" || t === null ? (e.push({ path: i, message: "Reply должен быть объектом", value: t }), e) : (t.messageId === void 0 ? e.push({ path: `${i}.messageId`, message: "Поле messageId обязательно", value: t.messageId }) : typeof t.messageId != "string" && typeof t.messageId != "number" && e.push({ path: `${i}.messageId`, message: "Поле messageId должно быть строкой или числом", value: t.messageId }), (!t.type || typeof t.type != "string") && e.push({ path: `${i}.type`, message: "Поле type обязательно и должно быть строкой", value: t.type }), t.text !== void 0 && typeof t.text != "string" && e.push({ path: `${i}.text`, message: "Поле text должно быть строкой", value: t.text }), t.url !== void 0 && typeof t.url != "string" && e.push({ path: `${i}.url`, message: "Поле url должно быть строкой", value: t.url }), t.filename !== void 0 && typeof t.filename != "string" && e.push({ path: `${i}.filename`, message: "Поле filename должно быть строкой", value: t.filename }), e);
8
+ }
9
+ function f(t, s) {
10
+ const e = [], i = `messages[${s}]`;
11
+ if (typeof t != "object" || t === null)
12
+ return e.push({ path: i, message: "Сообщение должно быть объектом", value: t }), e;
13
+ if (t.chatId !== void 0 && typeof t.chatId != "string" && e.push({ path: `${i}.chatId`, message: "Поле chatId должно быть строкой", value: t.chatId }), t.type !== "system.date" && (t.messageId === void 0 ? e.push({ path: `${i}.messageId`, message: "Поле messageId обязательно", value: t.messageId }) : typeof t.messageId != "string" && typeof t.messageId != "number" && e.push({ path: `${i}.messageId`, message: "Поле messageId должно быть строкой или числом", value: t.messageId })), (!t.type || typeof t.type != "string") && e.push({ path: `${i}.type`, message: "Поле type обязательно и должно быть строкой", value: t.type }), t.type !== "system.date" && (t.timestamp === void 0 ? e.push({ path: `${i}.timestamp`, message: "Поле timestamp обязательно", value: t.timestamp }) : typeof t.timestamp != "string" && typeof t.timestamp != "number" && e.push({ path: `${i}.timestamp`, message: "Поле timestamp должно быть строкой или числом", value: t.timestamp })), t.dialogId !== void 0 && typeof t.dialogId != "string" && e.push({ path: `${i}.dialogId`, message: "Поле dialogId должно быть строкой", value: t.dialogId }), t.direction !== void 0) {
14
+ const a = ["incoming", "outgoing"];
15
+ a.includes(t.direction) || e.push({
16
+ path: `${i}.direction`,
17
+ message: `Поле direction должно быть одним из: ${a.join(", ")}`,
18
+ value: t.direction
19
+ });
20
+ }
21
+ if (t.status !== void 0) {
22
+ const a = ["read", "sent", "received"];
23
+ a.includes(t.status) || e.push({
24
+ path: `${i}.status`,
25
+ message: `Поле status должно быть одним из: ${a.join(", ")}`,
26
+ value: t.status
27
+ });
28
+ }
29
+ return t.text !== void 0 && typeof t.text != "string" && e.push({ path: `${i}.text`, message: "Поле text должно быть строкой", value: t.text }), t.header !== void 0 && typeof t.header != "string" && e.push({ path: `${i}.header`, message: "Поле header должно быть строкой", value: t.header }), t.subText !== void 0 && typeof t.subText != "string" && e.push({ path: `${i}.subText`, message: "Поле subText должно быть строкой", value: t.subText }), t.avatar !== void 0 && typeof t.avatar != "string" && e.push({ path: `${i}.avatar`, message: "Поле avatar должно быть строкой", value: t.avatar }), t.url !== void 0 && typeof t.url != "string" && e.push({ path: `${i}.url`, message: "Поле url должно быть строкой", value: t.url }), t.filename !== void 0 && typeof t.filename != "string" && e.push({ path: `${i}.filename`, message: "Поле filename должно быть строкой", value: t.filename }), t.views !== void 0 && typeof t.views != "number" && e.push({ path: `${i}.views`, message: "Поле views должно быть числом", value: t.views }), t.actions !== void 0 && (Array.isArray(t.actions) ? t.actions.forEach((a, p) => {
30
+ e.push(...n(a, s, p));
31
+ }) : e.push({ path: `${i}.actions`, message: "Поле actions должно быть массивом", value: t.actions })), t.reply !== void 0 && e.push(...h(t.reply, s)), t.embed !== void 0 && (typeof t.embed != "object" || t.embed === null ? e.push({ path: `${i}.embed`, message: "Поле embed должно быть объектом", value: t.embed }) : ((!t.embed.type || typeof t.embed.type != "string") && e.push({ path: `${i}.embed.type`, message: "Поле embed.type обязательно и должно быть строкой", value: t.embed.type }), (!t.embed.url || typeof t.embed.url != "string") && e.push({ path: `${i}.embed.url`, message: "Поле embed.url обязательно и должно быть строкой", value: t.embed.url }))), e;
32
+ }
33
+ function l(t) {
34
+ const s = [], e = [];
35
+ if (!Array.isArray(t))
36
+ return {
37
+ isValid: !1,
38
+ errors: [{ path: "messages", message: "Данные должны быть массивом", value: t }],
39
+ warnings: []
40
+ };
41
+ t.length === 0 && e.push({ path: "messages", message: "Массив сообщений пустой" });
42
+ const i = /* @__PURE__ */ new Map();
43
+ return t.forEach((a, p) => {
44
+ if (a && typeof a == "object" && a.chatId !== void 0 && a.messageId !== void 0) {
45
+ const u = a.dialogId ? `${a.chatId}:${a.dialogId}` : `${a.chatId}`;
46
+ i.has(u) || i.set(u, /* @__PURE__ */ new Set());
47
+ const o = i.get(u);
48
+ if (o.has(a.messageId)) {
49
+ const d = a.dialogId ? `в чате ${a.chatId}, диалоге ${a.dialogId}` : `в чате ${a.chatId}`;
50
+ s.push({
51
+ path: `messages[${p}].messageId`,
52
+ message: `Дублирующийся messageId ${d}`,
53
+ value: a.messageId
54
+ });
55
+ } else
56
+ o.add(a.messageId);
57
+ }
58
+ }), t.forEach((a, p) => {
59
+ s.push(...f(a, p));
60
+ }), {
61
+ isValid: s.length === 0,
62
+ errors: s,
63
+ warnings: e
64
+ };
65
+ }
66
+ function r(t) {
67
+ const s = [];
68
+ return s.push(`=== РЕЗУЛЬТАТ ВАЛИДАЦИИ СООБЩЕНИЙ ===
69
+ `), t.isValid ? s.push(`✅ Данные валидны!
70
+ `) : s.push(`❌ Обнаружены ошибки!
71
+ `), t.errors.length > 0 && (s.push(`
72
+ 🔴 ОШИБКИ (${t.errors.length}):`), t.errors.forEach((e, i) => {
73
+ s.push(` ${i + 1}. [${e.path}] ${e.message}`), e.value !== void 0 && s.push(` Значение: ${JSON.stringify(e.value)}`);
74
+ })), t.warnings.length > 0 && (s.push(`
75
+ ⚠️ ПРЕДУПРЕЖДЕНИЯ (${t.warnings.length}):`), t.warnings.forEach((e, i) => {
76
+ s.push(` ${i + 1}. [${e.path}] ${e.message}`), e.value !== void 0 && s.push(` Значение: ${JSON.stringify(e.value)}`);
77
+ })), s.push(`
78
+ ` + "=".repeat(40)), s.join(`
79
+ `);
80
+ }
81
+ export {
82
+ r as getMessageValidationReport,
83
+ l as validateMessages
84
+ };
@@ -0,0 +1,82 @@
1
+ import { ref as M, computed as u, watch as V } from "vue";
2
+ import { getMessageValidationReport as R, validateMessages as b } from "./messageValidator.js";
3
+ function T(a, d = {}) {
4
+ const { autoValidate: h = !0, debounce: r = 0 } = d, l = M(null), p = u(() => {
5
+ var o;
6
+ return ((o = l.value) == null ? void 0 : o.isValid) ?? !0;
7
+ }), s = u(() => {
8
+ var o;
9
+ return ((o = l.value) == null ? void 0 : o.errors) ?? [];
10
+ }), g = u(() => {
11
+ var o;
12
+ return ((o = l.value) == null ? void 0 : o.warnings) ?? [];
13
+ }), m = u(() => s.value.length), $ = u(() => g.value.length), v = u(() => l.value ? R(l.value) : "Валидация не выполнена");
14
+ function c() {
15
+ const o = b(a.value);
16
+ return l.value = o, o;
17
+ }
18
+ function w() {
19
+ l.value = null;
20
+ }
21
+ function E() {
22
+ if (!l.value) {
23
+ console.log("Валидация не выполнена");
24
+ return;
25
+ }
26
+ if (console.group("📋 Детальный отчет валидации сообщений"), console.log(v.value), s.value.length > 0) {
27
+ console.log(`
28
+ 📊 Детали ошибок:`);
29
+ const o = /* @__PURE__ */ new Map();
30
+ s.value.forEach((e) => {
31
+ const n = e.path.match(/messages\[(\d+)\]/);
32
+ if (n) {
33
+ const t = parseInt(n[1]);
34
+ o.has(t) || o.set(t, []), o.get(t).push(e);
35
+ }
36
+ });
37
+ let f = 1;
38
+ o.forEach((e, n) => {
39
+ console.group(`
40
+ 🔴 Сообщение [${n}] - ошибок: ${e.length}`), e.forEach((t) => {
41
+ console.log(`
42
+ ${f}. ${t.path}`), console.log(` Сообщение: ${t.message}`), t.value !== void 0 && console.log(" Значение поля:", t.value), f++;
43
+ }), a.value && a.value[n] && (console.log(`
44
+ 📦 Полный объект сообщения:`), console.log(a.value[n])), console.groupEnd();
45
+ });
46
+ const i = s.value.filter((e) => !e.path.match(/messages\[(\d+)\]/));
47
+ i.length > 0 && (console.group(`
48
+ ⚠️ Общие ошибки - ${i.length}`), i.forEach((e, n) => {
49
+ console.log(`
50
+ ${n + 1}. ${e.path}`), console.log(` Сообщение: ${e.message}`), e.value !== void 0 && console.log(" Значение:", e.value);
51
+ }), console.groupEnd());
52
+ }
53
+ console.groupEnd();
54
+ }
55
+ if (h) {
56
+ let o = null;
57
+ V(
58
+ a,
59
+ () => {
60
+ r > 0 ? (o !== null && clearTimeout(o), o = window.setTimeout(() => {
61
+ c(), o = null;
62
+ }, r)) : c();
63
+ },
64
+ { deep: !0, immediate: !0 }
65
+ );
66
+ }
67
+ return {
68
+ validationResult: l,
69
+ isValid: p,
70
+ errors: s,
71
+ warnings: g,
72
+ errorCount: m,
73
+ warningCount: $,
74
+ report: v,
75
+ validate: c,
76
+ reset: w,
77
+ showReport: E
78
+ };
79
+ }
80
+ export {
81
+ T as useMessageValidator
82
+ };
@@ -0,0 +1,47 @@
1
+ function t(o, i) {
2
+ const e = [], s = `sidebarItems[${i}]`;
3
+ return typeof o != "object" || o === null ? (e.push({ path: s, message: "SidebarItem должен быть объектом", value: o }), e) : ((!o.itemId || typeof o.itemId != "string") && e.push({ path: `${s}.itemId`, message: "Поле itemId обязательно и должно быть строкой", value: o.itemId }), (!o.icon || typeof o.icon != "string") && e.push({ path: `${s}.icon`, message: "Поле icon обязательно и должно быть строкой", value: o.icon }), o.notificationCount === void 0 || typeof o.notificationCount != "number" ? e.push({ path: `${s}.notificationCount`, message: "Поле notificationCount обязательно и должно быть числом", value: o.notificationCount }) : o.notificationCount < 0 && e.push({ path: `${s}.notificationCount`, message: "Поле notificationCount не может быть отрицательным", value: o.notificationCount }), (o.selected === void 0 || typeof o.selected != "boolean") && e.push({ path: `${s}.selected`, message: "Поле selected обязательно и должно быть boolean", value: o.selected }), o.name !== void 0 && typeof o.name != "string" && e.push({ path: `${s}.name`, message: "Поле name должно быть строкой", value: o.name }), o.notificationColor !== void 0 && typeof o.notificationColor != "string" && e.push({ path: `${s}.notificationColor`, message: "Поле notificationColor должно быть строкой", value: o.notificationColor }), o.isFixedBottom !== void 0 && typeof o.isFixedBottom != "boolean" && e.push({ path: `${s}.isFixedBottom`, message: "Поле isFixedBottom должно быть boolean", value: o.isFixedBottom }), o.isFixedTop !== void 0 && typeof o.isFixedTop != "boolean" && e.push({ path: `${s}.isFixedTop`, message: "Поле isFixedTop должно быть boolean", value: o.isFixedTop }), e);
4
+ }
5
+ function p(o) {
6
+ const i = [], e = [];
7
+ if (!Array.isArray(o))
8
+ return {
9
+ isValid: !1,
10
+ errors: [{ path: "sidebarItems", message: "Данные должны быть массивом", value: o }],
11
+ warnings: []
12
+ };
13
+ o.length === 0 && e.push({ path: "sidebarItems", message: "Массив sidebar items пустой" });
14
+ const s = /* @__PURE__ */ new Set();
15
+ return o.forEach((a, n) => {
16
+ a && typeof a == "object" && a.itemId !== void 0 && (s.has(a.itemId) ? i.push({
17
+ path: `sidebarItems[${n}].itemId`,
18
+ message: "Дублирующийся itemId",
19
+ value: a.itemId
20
+ }) : s.add(a.itemId));
21
+ }), o.forEach((a, n) => {
22
+ i.push(...t(a, n));
23
+ }), {
24
+ isValid: i.length === 0,
25
+ errors: i,
26
+ warnings: e
27
+ };
28
+ }
29
+ function d(o) {
30
+ const i = [];
31
+ return i.push(`=== РЕЗУЛЬТАТ ВАЛИДАЦИИ SIDEBAR ITEMS ===
32
+ `), o.isValid ? i.push(`✅ Данные валидны!
33
+ `) : i.push(`❌ Обнаружены ошибки!
34
+ `), o.errors.length > 0 && (i.push(`
35
+ 🔴 ОШИБКИ (${o.errors.length}):`), o.errors.forEach((e, s) => {
36
+ i.push(` ${s + 1}. [${e.path}] ${e.message}`), e.value !== void 0 && i.push(` Значение: ${JSON.stringify(e.value)}`);
37
+ })), o.warnings.length > 0 && (i.push(`
38
+ ⚠️ ПРЕДУПРЕЖДЕНИЯ (${o.warnings.length}):`), o.warnings.forEach((e, s) => {
39
+ i.push(` ${s + 1}. [${e.path}] ${e.message}`), e.value !== void 0 && i.push(` Значение: ${JSON.stringify(e.value)}`);
40
+ })), i.push(`
41
+ ` + "=".repeat(42)), i.join(`
42
+ `);
43
+ }
44
+ export {
45
+ d as getSidebarValidationReport,
46
+ p as validateSidebarItems
47
+ };
@@ -0,0 +1,82 @@
1
+ import { ref as I, computed as u, watch as b } from "vue";
2
+ import { getSidebarValidationReport as V, validateSidebarItems as S } from "./sidebarValidator.js";
3
+ function T(a, f = {}) {
4
+ const { autoValidate: h = !0, debounce: r = 0 } = f, l = I(null), p = u(() => {
5
+ var e;
6
+ return ((e = l.value) == null ? void 0 : e.isValid) ?? !0;
7
+ }), s = u(() => {
8
+ var e;
9
+ return ((e = l.value) == null ? void 0 : e.errors) ?? [];
10
+ }), g = u(() => {
11
+ var e;
12
+ return ((e = l.value) == null ? void 0 : e.warnings) ?? [];
13
+ }), m = u(() => s.value.length), $ = u(() => g.value.length), v = u(() => l.value ? V(l.value) : "Валидация не выполнена");
14
+ function i() {
15
+ const e = S(a.value);
16
+ return l.value = e, e;
17
+ }
18
+ function w() {
19
+ l.value = null;
20
+ }
21
+ function E() {
22
+ if (!l.value) {
23
+ console.log("Валидация не выполнена");
24
+ return;
25
+ }
26
+ if (console.group("📋 Детальный отчет валидации sidebar items"), console.log(v.value), s.value.length > 0) {
27
+ console.log(`
28
+ 📊 Детали ошибок:`);
29
+ const e = /* @__PURE__ */ new Map();
30
+ s.value.forEach((o) => {
31
+ const n = o.path.match(/sidebarItems\[(\d+)\]/);
32
+ if (n) {
33
+ const t = parseInt(n[1]);
34
+ e.has(t) || e.set(t, []), e.get(t).push(o);
35
+ }
36
+ });
37
+ let d = 1;
38
+ e.forEach((o, n) => {
39
+ console.group(`
40
+ 🔴 Sidebar Item [${n}] - ошибок: ${o.length}`), o.forEach((t) => {
41
+ console.log(`
42
+ ${d}. ${t.path}`), console.log(` Сообщение: ${t.message}`), t.value !== void 0 && console.log(" Значение поля:", t.value), d++;
43
+ }), a.value && a.value[n] && (console.log(`
44
+ 📦 Полный объект sidebar item:`), console.log(a.value[n])), console.groupEnd();
45
+ });
46
+ const c = s.value.filter((o) => !o.path.match(/sidebarItems\[(\d+)\]/));
47
+ c.length > 0 && (console.group(`
48
+ ⚠️ Общие ошибки - ${c.length}`), c.forEach((o, n) => {
49
+ console.log(`
50
+ ${n + 1}. ${o.path}`), console.log(` Сообщение: ${o.message}`), o.value !== void 0 && console.log(" Значение:", o.value);
51
+ }), console.groupEnd());
52
+ }
53
+ console.groupEnd();
54
+ }
55
+ if (h) {
56
+ let e = null;
57
+ b(
58
+ a,
59
+ () => {
60
+ r > 0 ? (e !== null && clearTimeout(e), e = window.setTimeout(() => {
61
+ i(), e = null;
62
+ }, r)) : i();
63
+ },
64
+ { deep: !0, immediate: !0 }
65
+ );
66
+ }
67
+ return {
68
+ validationResult: l,
69
+ isValid: p,
70
+ errors: s,
71
+ warnings: g,
72
+ errorCount: m,
73
+ warningCount: $,
74
+ report: v,
75
+ validate: i,
76
+ reset: w,
77
+ showReport: E
78
+ };
79
+ }
80
+ export {
81
+ T as useSidebarValidator
82
+ };