@mobilon-dev/chotto 0.3.98 → 0.3.99

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 (211) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js +4 -29
  3. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +61 -42
  4. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue.js +4 -47
  5. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +82 -55
  6. package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +51 -86
  7. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue.js +4 -32
  8. package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue2.js +28 -7
  9. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +38 -22
  10. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +2 -33
  11. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue.js +4 -37
  12. package/dist/components/1_atoms/LinkPreview/LinkPreview.vue2.js +21 -7
  13. package/dist/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.js +19 -30
  14. package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +4 -70
  15. package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +108 -76
  16. package/dist/components/1_icons/AvatarIcon.vue.js +8 -8
  17. package/dist/components/1_icons/CheckIcon.vue.js +13 -26
  18. package/dist/components/1_icons/CloseButtonIcon.vue.js +10 -16
  19. package/dist/components/1_icons/CloseIcon.vue.js +10 -16
  20. package/dist/components/1_icons/ContactCRMIcon.vue.js +10 -16
  21. package/dist/components/1_icons/MenuIcon.vue.js +10 -16
  22. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue.js +3 -23
  23. package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue2.js +21 -12
  24. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue.js +4 -36
  25. package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue2.js +26 -11
  26. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue.js +3 -23
  27. package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue2.js +21 -12
  28. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js +3 -23
  29. package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue2.js +20 -11
  30. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue.js +4 -33
  31. package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue2.js +23 -11
  32. package/dist/components/1_icons/SearchIcon.vue.js +17 -29
  33. package/dist/components/1_icons/SettingsIcon.vue.js +8 -8
  34. package/dist/components/1_icons/TelegramIcon.vue.js +20 -32
  35. package/dist/components/1_icons/WhatsAppIcon.vue.js +20 -32
  36. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +396 -546
  37. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.js +58 -101
  38. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +8 -14
  39. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.vue.js +7 -7
  40. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelMaxIcon.vue.js +7 -7
  41. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelPhoneIcon.vue.js +13 -19
  42. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSMSIcon.vue.js +10 -16
  43. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuMaxIcon.vue.js +23 -35
  44. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuPhoneIcon.vue.js +20 -32
  45. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuSMSIcon.vue.js +11 -17
  46. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuTelegramIcon.vue.js +8 -8
  47. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js +20 -32
  48. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelTelegramIcon.vue.js +21 -33
  49. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelUnconfirmedIcon.vue.js +7 -7
  50. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelWhatsAppIcon.vue.js +8 -8
  51. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +4 -74
  52. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +42 -8
  53. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js +4 -62
  54. package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue2.js +36 -15
  55. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue.js +4 -49
  56. package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +45 -22
  57. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue.js +4 -36
  58. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +37 -19
  59. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +4 -61
  60. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +96 -79
  61. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +27 -31
  62. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue2.js +2 -13
  63. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +4 -72
  64. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +83 -47
  65. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +21 -19
  66. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue2.js +2 -13
  67. package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +51 -80
  68. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +4 -182
  69. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +135 -25
  70. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +4 -78
  71. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +95 -73
  72. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +17 -15
  73. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue2.js +2 -13
  74. package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js +33 -39
  75. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +4 -220
  76. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +256 -146
  77. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue.js +41 -39
  78. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue2.js +2 -13
  79. package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +163 -233
  80. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js +4 -164
  81. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +175 -87
  82. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js +4 -73
  83. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +60 -34
  84. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js +4 -47
  85. package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js +23 -10
  86. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js +4 -52
  87. package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue2.js +26 -8
  88. package/dist/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js +220 -299
  89. package/dist/components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js +33 -39
  90. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +4 -306
  91. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +311 -134
  92. package/dist/components/2_chatlist_elements/ChatItem/icons/AudioIcon.vue.js +12 -18
  93. package/dist/components/2_chatlist_elements/ChatItem/icons/FileIcon.vue.js +11 -23
  94. package/dist/components/2_chatlist_elements/ChatItem/icons/ImageIcon.vue.js +7 -7
  95. package/dist/components/2_chatlist_elements/ChatItem/icons/MissedCallIcon.vue.js +22 -34
  96. package/dist/components/2_chatlist_elements/ChatItem/icons/StickerIcon.vue.js +9 -15
  97. package/dist/components/2_chatlist_elements/ChatItem/icons/VideoIcon.vue.js +14 -26
  98. package/dist/components/2_chatlist_elements/ChatItem/icons/VoiceIcon.vue.js +7 -7
  99. package/dist/components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js +24 -52
  100. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +4 -84
  101. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +67 -35
  102. package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +38 -72
  103. package/dist/components/2_elements/ChatInfo/ChatInfo.vue.js +57 -76
  104. package/dist/components/2_elements/ChatPanel/ChatPanel.vue.js +29 -41
  105. package/dist/components/2_elements/ContactInfo/ContactInfo.vue.js +115 -176
  106. package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +27 -48
  107. package/dist/components/2_elements/UserProfile/UserProfile.vue.js +28 -58
  108. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +4 -54
  109. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +39 -19
  110. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +4 -458
  111. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +471 -160
  112. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js +4 -19
  113. package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue2.js +22 -12
  114. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +4 -26
  115. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +39 -26
  116. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +4 -482
  117. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +448 -148
  118. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue.js +19 -17
  119. package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue2.js +2 -13
  120. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue.js +19 -17
  121. package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue2.js +2 -13
  122. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue.js +4 -17
  123. package/dist/components/2_feed_elements/DateMessage/DateMessage.vue2.js +7 -7
  124. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js +3 -16
  125. package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue2.js +7 -7
  126. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +4 -67
  127. package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +43 -11
  128. package/dist/components/2_feed_elements/DeletedMessageContent/icons/DeletedMessageIcon.vue.js +10 -16
  129. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js +4 -60
  130. package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue2.js +53 -36
  131. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js +4 -22
  132. package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue2.js +15 -8
  133. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js +4 -43
  134. package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue2.js +25 -10
  135. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +4 -250
  136. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +233 -67
  137. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +4 -315
  138. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +319 -98
  139. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js +4 -39
  140. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +22 -12
  141. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +4 -155
  142. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +212 -110
  143. package/dist/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.js +20 -32
  144. package/dist/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.js +20 -32
  145. package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +11 -17
  146. package/dist/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.js +10 -16
  147. package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +11 -17
  148. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue.js +4 -22
  149. package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue2.js +23 -17
  150. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +4 -28
  151. package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +29 -27
  152. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +4 -142
  153. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +121 -33
  154. package/dist/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.js +22 -34
  155. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +4 -55
  156. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +30 -8
  157. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +4 -47
  158. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +25 -9
  159. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +4 -56
  160. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +37 -8
  161. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +4 -72
  162. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +59 -10
  163. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +4 -142
  164. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +120 -36
  165. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +4 -49
  166. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +53 -15
  167. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +4 -75
  168. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +63 -10
  169. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue.js +4 -18
  170. package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue2.js +17 -9
  171. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +4 -346
  172. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +307 -73
  173. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue.js +4 -17
  174. package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue2.js +7 -7
  175. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +4 -307
  176. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +269 -65
  177. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue.js +4 -37
  178. package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue2.js +21 -7
  179. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +4 -307
  180. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +298 -76
  181. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.js +4 -64
  182. package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue3.js +45 -10
  183. package/dist/components/2_modals/CreateChat/CreateChat.vue.js +18 -35
  184. package/dist/components/2_modals/CreateChat2/CreateChat2.vue.js +92 -140
  185. package/dist/components/2_modals/CreateDialog/CreateDialog.vue.js +49 -96
  186. package/dist/components/2_modals/Modal/Modal.vue.js +50 -59
  187. package/dist/components/2_modals/ModalFullscreen/ModalFullscreen.vue.js +38 -51
  188. package/dist/components/2_modals/ModalNoFooter/ModalNoFooter.vue.js +30 -39
  189. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +4 -155
  190. package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js +121 -49
  191. package/dist/components/2_modals/SelectUser/SelectUser.vue.js +43 -60
  192. package/dist/components/2_modals/SelectUser2/SelectUser2.vue.js +24 -41
  193. package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +4 -85
  194. package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +210 -149
  195. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue.js +21 -25
  196. package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue2.js +2 -13
  197. package/dist/components/3_compounds/ChatList/ChatList.vue.js +163 -253
  198. package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +32 -50
  199. package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +6 -6
  200. package/dist/components/3_compounds/Feed/Feed.vue.js +4 -172
  201. package/dist/components/3_compounds/Feed/Feed.vue2.js +257 -126
  202. package/dist/components/3_compounds/SideBar/SideBar.vue.js +202 -279
  203. package/dist/components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js +36 -43
  204. package/dist/components/4_layouts/BaseLayout/BaseLayout.vue.js +5 -5
  205. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue.js +4 -32
  206. package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue2.js +29 -7
  207. package/dist/components/4_layouts/ExtendedLayout/ExtendedLayout.vue.js +7 -7
  208. package/dist/components/4_layouts/FeedLayout/FeedLayout.vue.js +8 -8
  209. package/dist/components/5_containers/BaseContainer/BaseContainer.vue.js +18 -31
  210. package/dist/components/5_containers/FloatContainer/FloatContainer.vue.js +56 -85
  211. package/package.json +1 -1
@@ -1,19 +1,31 @@
1
- import { createElementBlock as r, openBlock as l, createCommentVNode as c, Fragment as x, renderList as ue, normalizeClass as A, createBlock as p, createVNode as ce, createElementVNode as d, withCtx as de, resolveDynamicComponent as O, toDisplayString as H, normalizeStyle as yt, ref as h, computed as i, watch as B, onMounted as Fe, onUnmounted as Ee, nextTick as G } from "vue";
2
- import pt from "../../1_atoms/Tooltip/Tooltip.vue.js";
3
- import { useCommunicationChannels as ze } from "./composables/useCommunicationChannels.js";
4
- import { useCommunicationMenu as Ne } from "./composables/useCommunicationMenu.js";
5
- import { useCommunicationAttributes as je, getSubMenuChannelIndicatorClass as Le, getSubMenuChannelIndicatorType as Ue, isAttributeBlocked as Ve, isAttributeConfirming as gt, getAttributeStatusClass as At } from "./composables/useCommunicationAttributes.js";
6
- import { useCommunicationActions as We } from "./composables/useCommunicationActions.js";
7
- import { useCommunicationSubMenu as He } from "./composables/useCommunicationSubMenu.js";
8
- import { useCommunicationDialogSync as Ge } from "./composables/useCommunicationDialogSync.js";
9
- import { useCommunicationPlaceholder as Je } from "./composables/useCommunicationPlaceholder.js";
10
- import It from "./CommunicationPanelAttributeIndicator.vue.js";
11
- import kt from "./icons/CommunicationPanelCheckIcon.vue.js";
1
+ import { ref as m, computed as a, watch as z, onMounted as ct, onUnmounted as dt, createElementBlock as u, openBlock as l, createCommentVNode as y, unref as n, Fragment as w, renderList as te, normalizeClass as k, createBlock as v, createVNode as ne, createElementVNode as d, withCtx as oe, resolveDynamicComponent as D, toDisplayString as F, normalizeStyle as ft, nextTick as le } from "vue";
2
+ import se from "../../1_atoms/Tooltip/Tooltip.vue.js";
3
+ import { useCommunicationChannels as pt } from "./composables/useCommunicationChannels.js";
4
+ import { useCommunicationMenu as mt } from "./composables/useCommunicationMenu.js";
5
+ import { useCommunicationAttributes as vt, isAttributeBlocked as ht, getAttributeStatusClass as Re, isAttributeConfirming as qe, getSubMenuChannelIndicatorType as yt, getSubMenuChannelIndicatorClass as Ct } from "./composables/useCommunicationAttributes.js";
6
+ import { useCommunicationActions as bt } from "./composables/useCommunicationActions.js";
7
+ import { useCommunicationSubMenu as gt } from "./composables/useCommunicationSubMenu.js";
8
+ import { useCommunicationDialogSync as kt } from "./composables/useCommunicationDialogSync.js";
9
+ import { useCommunicationPlaceholder as It } from "./composables/useCommunicationPlaceholder.js";
10
+ import xe from "./CommunicationPanelAttributeIndicator.vue.js";
11
+ import At from "./icons/CommunicationPanelCheckIcon.vue.js";
12
12
  import Tt from "./icons/CommunicationPanelUnconfirmedIcon.vue.js";
13
13
  import Mt from "./icons/CommunicationPanelConfirmSpinner.vue.js";
14
14
  import St from "../../../_virtual/_plugin-vue_export-helper.js";
15
15
  /* empty css */
16
- const _t = {
16
+ const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "channel-icon" }, _t = { class: "channel-icon" }, Rt = {
17
+ key: 1,
18
+ class: "attributes-menu"
19
+ }, qt = {
20
+ key: 0,
21
+ class: "empty-channels-placeholder"
22
+ }, xt = ["data-attribute-status", "onMouseenter", "onClick"], Ot = { class: "attribute-info" }, Pt = { class: "attribute-value" }, Bt = { class: "menu-icon" }, Nt = {
23
+ key: 0,
24
+ class: "menu-icon-arrow"
25
+ }, Et = ["data-attribute-status", "onMouseenter", "onClick"], $t = { class: "attribute-info" }, jt = { class: "attribute-value" }, zt = { class: "menu-icon" }, Ft = {
26
+ key: 0,
27
+ class: "menu-icon-arrow"
28
+ }, Lt = ["onClick"], Ut = { class: "sub-menu-indicator-slot" }, Vt = { class: "sub-menu-title" }, Wt = {
17
29
  __name: "CommunicationPanel",
18
30
  props: {
19
31
  contactAttributes: {
@@ -124,579 +136,417 @@ const _t = {
124
136
  "phone-call",
125
137
  "reset-blocked-attributes"
126
138
  ],
127
- setup(fe, { expose: u, emit: v }) {
128
- const e = fe, q = v, F = h(null), n = h(null), s = h(null), C = h(null), M = h(null), J = h({}), E = h(null), z = h(!1), S = h(null), g = h(null), _ = h(null), w = i(
129
- () => e.confirmingAttributeId ?? _.value
130
- ), me = i(() => e.blockedAttributeIds ?? []), N = (t) => Ve(t, me.value), j = i(() => e.channels ?? []), he = i(() => e.channelOrder), Ce = i(() => e.visibleChannelTypes), be = i(() => e.channelTooltips ?? {}), ve = i(() => e.attributeTooltips ?? {}), Ke = i(() => e.attributeIndicatorTooltips ?? {}), K = i(() => e.recentAttributeChannels ?? {}), Q = i(() => e.messages ?? []), ye = i(() => e.selectedChat ?? null), X = i(() => e.isNewDialog ?? !1), Y = i(() => {
131
- var t;
132
- return ((t = e.selectedDialog) == null ? void 0 : t.channelId) ?? null;
133
- }), P = (t, o) => {
134
- if (!o || !t)
139
+ setup(h, { expose: Oe, emit: Pe }) {
140
+ const i = h, ae = Pe, L = m(null), Be = m(null), _ = m(null), R = m(null), T = m(null), U = m({}), V = m(null), A = m(!1), q = m(null), C = m(null), x = m(null), b = a(
141
+ () => i.confirmingAttributeId ?? x.value
142
+ ), W = a(() => i.blockedAttributeIds ?? []), M = (e) => ht(e, W.value), H = a(() => i.channels ?? []), Ne = a(() => i.channelOrder), Ee = a(() => i.visibleChannelTypes), $e = a(() => i.channelTooltips ?? {}), je = a(() => i.attributeTooltips ?? {}), ie = a(() => i.attributeIndicatorTooltips ?? {}), ue = a(() => i.recentAttributeChannels ?? {}), re = a(() => i.messages ?? []), ze = a(() => i.selectedChat ?? null), ce = a(() => i.isNewDialog ?? !1), de = a(() => {
143
+ var e;
144
+ return ((e = i.selectedDialog) == null ? void 0 : e.channelId) ?? null;
145
+ }), O = (e, o) => {
146
+ if (!o || !e)
135
147
  return !1;
136
- const a = t.id ?? t.attributeId;
137
- if (!a)
148
+ const t = e.id ?? e.attributeId;
149
+ if (!t)
138
150
  return !1;
139
- const b = o.includes(".") ? o.split(".").pop() : o;
140
- return o === a || a === b || a.endsWith(`.${b}`);
141
- }, pe = (t) => {
142
- const o = ve.value, a = (t == null ? void 0 : t.attributeId) ?? (t == null ? void 0 : t.id);
143
- if (a != null) {
144
- const b = o[String(a)];
145
- if (b)
146
- return b;
151
+ const s = o.includes(".") ? o.split(".").pop() : o;
152
+ return o === t || t === s || t.endsWith(`.${s}`);
153
+ }, fe = (e) => {
154
+ const o = je.value, t = (e == null ? void 0 : e.attributeId) ?? (e == null ? void 0 : e.id);
155
+ if (t != null) {
156
+ const s = o[String(t)];
157
+ if (s)
158
+ return s;
147
159
  }
148
- return t != null && t.value ? o[String(t.value)] ?? "" : "";
149
- }, Qe = (t) => !!pe(t), {
150
- panelChannelTypes: ge,
151
- channelsTypes: Xe,
152
- getTooltipText: Ye,
153
- getChannelTypeFromId: Ze,
154
- hasMultipleChannels: L,
155
- isChannelActive: $e,
156
- getSingleChannelForType: Ae,
157
- getMenuChannelIconComponentForChannelId: et,
158
- getSingleMenuChannelIconComponent: tt,
159
- getAvailableChannels: Z
160
- } = ze({
161
- channels: j,
162
- channelTooltips: be,
163
- channelOrder: he,
164
- visibleChannelTypes: Ce,
165
- selectedChannelType: M
160
+ return e != null && e.value ? o[String(e.value)] ?? "" : "";
161
+ }, Fe = (e) => !!fe(e), {
162
+ panelChannelTypes: Le,
163
+ channelsTypes: pe,
164
+ getTooltipText: Ue,
165
+ getChannelTypeFromId: Ve,
166
+ hasMultipleChannels: S,
167
+ isChannelActive: P,
168
+ getSingleChannelForType: We,
169
+ getMenuChannelIconComponentForChannelId: He,
170
+ getSingleMenuChannelIconComponent: me,
171
+ getAvailableChannels: ve
172
+ } = pt({
173
+ channels: H,
174
+ channelTooltips: $e,
175
+ channelOrder: Ne,
176
+ visibleChannelTypes: Ee,
177
+ selectedChannelType: T
166
178
  }), {
167
- activeChannelType: y,
168
- hoveredChannel: nt,
169
- showMenu: I,
170
- showSubMenu: $,
171
- retainOpenUntilDismiss: Ie,
172
- handleChannelClick: ke,
173
- openMenu: Te,
174
- closeMenu: D,
175
- pinMenuOpen: Me,
176
- armOutsideClickSuppression: Se,
177
- handleClickOutside: ee
178
- } = Ne({
179
- panelRef: F,
180
- selectedChannelType: M,
181
- frozenAttribute: C
182
- }), U = i(() => {
183
- var t;
184
- return ((t = e.selectedDialog) == null ? void 0 : t.attributeId) ?? null;
185
- }), te = i(() => {
186
- if (!I.value || !y.value)
179
+ activeChannelType: r,
180
+ hoveredChannel: B,
181
+ showMenu: g,
182
+ showSubMenu: G,
183
+ retainOpenUntilDismiss: Ge,
184
+ handleChannelClick: Je,
185
+ openMenu: Ke,
186
+ closeMenu: N,
187
+ pinMenuOpen: Qe,
188
+ armOutsideClickSuppression: Xe,
189
+ handleClickOutside: he
190
+ } = mt({
191
+ panelRef: L,
192
+ selectedChannelType: T,
193
+ frozenAttribute: R
194
+ }), J = a(() => {
195
+ var e;
196
+ return ((e = i.selectedDialog) == null ? void 0 : e.attributeId) ?? null;
197
+ }), ye = a(() => {
198
+ if (!g.value || !r.value)
187
199
  return null;
188
- const t = E.value;
189
- return t && t.channelType === y.value ? t : null;
190
- }), ne = (t) => {
191
- var qe;
192
- const o = typeof t == "string" ? t : t == null ? void 0 : t.channelId, a = typeof t == "object" && t != null ? t.backendChannelId : void 0, b = (m, re) => !m || !re ? !1 : !!(m === re || a && (m === a || re === a)), k = te.value;
193
- if (k != null && k.channelId && b(k.channelId, o))
200
+ const e = V.value;
201
+ return e && e.channelType === r.value ? e : null;
202
+ }), K = (e) => {
203
+ var _e;
204
+ const o = typeof e == "string" ? e : e == null ? void 0 : e.channelId, t = typeof e == "object" && e != null ? e.backendChannelId : void 0, s = (p, ee) => !p || !ee ? !1 : !!(p === ee || t && (p === t || ee === t)), c = ye.value;
205
+ if (c != null && c.channelId && s(c.channelId, o))
194
206
  return !0;
195
- const f = y.value, T = V.value;
196
- if (I.value && f && T) {
197
- const m = (qe = K.value) == null ? void 0 : qe[f];
198
- if (m != null && m.channelId && (m != null && m.attributeId) && P(T, m.attributeId) && b(m.channelId, o))
207
+ const f = r.value, I = Q.value;
208
+ if (g.value && f && I) {
209
+ const p = (_e = ue.value) == null ? void 0 : _e[f];
210
+ if (p != null && p.channelId && (p != null && p.attributeId) && O(I, p.attributeId) && s(p.channelId, o))
199
211
  return !0;
200
212
  }
201
- return I.value && f && T && U.value && P(T, U.value) && b(Y.value, o) ? !0 : b(Y.value, o);
202
- }, ot = (t) => {
203
- const o = te.value;
204
- return o != null && o.attributeId ? P(t, o.attributeId) : P(t, U.value);
205
- }, V = i(() => s.value ?? C.value ?? null), oe = (t) => {
206
- const o = t == null ? void 0 : t.backendChannelId;
213
+ return g.value && f && I && J.value && O(I, J.value) && s(de.value, o) ? !0 : s(de.value, o);
214
+ }, E = (e) => {
215
+ const o = ye.value;
216
+ return o != null && o.attributeId ? O(e, o.attributeId) : O(e, J.value);
217
+ }, Q = a(() => _.value ?? R.value ?? null), Ce = (e) => {
218
+ const o = e == null ? void 0 : e.backendChannelId;
207
219
  return o ? [o] : [];
208
- }, lt = (t) => Ue(
209
- V.value,
210
- t.channelId,
211
- ne(t),
212
- w.value,
213
- oe(t)
214
- ), it = (t) => Le(
215
- V.value,
216
- t.channelId,
217
- ne(t),
218
- w.value,
219
- oe(t)
220
- ) ?? "", W = i(() => e.contactAttributes ?? []), le = (t) => {
221
- var k;
222
- if (!t || !Q.value) return !0;
223
- const o = (k = ye.value) == null ? void 0 : k.chatId;
224
- return o ? !Q.value.filter(
220
+ }, X = (e) => yt(
221
+ Q.value,
222
+ e.channelId,
223
+ K(e),
224
+ b.value,
225
+ Ce(e)
226
+ ), Ye = (e) => Ct(
227
+ Q.value,
228
+ e.channelId,
229
+ K(e),
230
+ b.value,
231
+ Ce(e)
232
+ ) ?? "", Y = a(() => i.contactAttributes ?? []), be = (e) => {
233
+ var c;
234
+ if (!e || !re.value) return !0;
235
+ const o = (c = ze.value) == null ? void 0 : c.chatId;
236
+ return o ? !re.value.filter(
225
237
  (f) => {
226
- var T;
227
- return f.chatId === o && f.dialogId === ((T = e.selectedDialog) == null ? void 0 : T.dialogId);
238
+ var I;
239
+ return f.chatId === o && f.dialogId === ((I = i.selectedDialog) == null ? void 0 : I.dialogId);
228
240
  }
229
241
  ).some(
230
242
  (f) => f.type !== "message.system" && f.type !== "message.delimiter" && f.type !== "system" && f.type !== "system_message" && f.type !== "notification"
231
243
  ) : !0;
232
- }, ie = () => {
233
- R(), z.value = !0, G(() => {
234
- const t = Array.isArray(g.value) ? g.value[0] : g.value;
235
- t && typeof t.startAutoShow == "function" ? t.startAutoShow() : console.log("startAutoShow method not found on tooltipRef");
236
- }), S.value = setTimeout(() => {
237
- z.value = !1;
244
+ }, ge = () => {
245
+ $(), A.value = !0, le(() => {
246
+ const e = Array.isArray(C.value) ? C.value[0] : C.value;
247
+ e && typeof e.startAutoShow == "function" ? e.startAutoShow() : console.log("startAutoShow method not found on tooltipRef");
248
+ }), q.value = setTimeout(() => {
249
+ A.value = !1;
238
250
  }, 5e3);
239
- }, R = () => {
240
- if (S.value && (clearTimeout(S.value), S.value = null), g.value) {
241
- const t = Array.isArray(g.value) ? g.value[0] : g.value;
242
- t && typeof t.clearAutoTimer == "function" && t.clearAutoTimer();
251
+ }, $ = () => {
252
+ if (q.value && (clearTimeout(q.value), q.value = null), C.value) {
253
+ const e = Array.isArray(C.value) ? C.value[0] : C.value;
254
+ e && typeof e.clearAutoTimer == "function" && e.clearAutoTimer();
243
255
  }
244
- z.value = !1;
256
+ A.value = !1;
245
257
  }, {
246
- organizedContactAttributes: ae,
247
- organizeContactAttributes: _e,
248
- isAttributeFrozen: at
249
- } = je({
250
- contactAttributes: W,
251
- panelChannelTypes: ge,
252
- frozenAttribute: C
258
+ organizedContactAttributes: Z,
259
+ organizeContactAttributes: Ze,
260
+ isAttributeFrozen: ke
261
+ } = vt({
262
+ contactAttributes: Y,
263
+ panelChannelTypes: Le,
264
+ frozenAttribute: R
253
265
  }), {
254
- handleAttributeClick: we,
255
- selectChannel: st,
256
- availableChannels: Pe,
257
- applyRecentChannelButtonSelection: De,
258
- clearPanelPendingSelection: se
259
- } = We({
260
- activeChannelType: y,
261
- channels: j,
262
- selectedChannel: J,
263
- selectedChannelType: M,
264
- hoveredAttribute: s,
265
- confirmingAttributeId: _,
266
- isAttributeBlocked: N,
267
- closeMenu: D,
268
- pinMenuOpen: Me,
269
- hasMultipleChannels: L,
270
- getSingleChannelForType: Ae,
271
- getAvailableChannels: Z,
272
- isChannelEmpty: le,
273
- isNewDialog: X,
274
- showDefaultChannelTooltipWithTimer: ie,
275
- clearDefaultChannelTooltip: R,
276
- emit: q,
277
- panelPendingSelection: E
266
+ handleAttributeClick: et,
267
+ selectChannel: tt,
268
+ availableChannels: nt,
269
+ applyRecentChannelButtonSelection: ot,
270
+ clearPanelPendingSelection: Ie
271
+ } = bt({
272
+ activeChannelType: r,
273
+ channels: H,
274
+ selectedChannel: U,
275
+ selectedChannelType: T,
276
+ hoveredAttribute: _,
277
+ confirmingAttributeId: x,
278
+ isAttributeBlocked: M,
279
+ closeMenu: N,
280
+ pinMenuOpen: Qe,
281
+ hasMultipleChannels: S,
282
+ getSingleChannelForType: We,
283
+ getAvailableChannels: ve,
284
+ isChannelEmpty: be,
285
+ isNewDialog: ce,
286
+ showDefaultChannelTooltipWithTimer: ge,
287
+ clearDefaultChannelTooltip: $,
288
+ emit: ae,
289
+ panelPendingSelection: V
278
290
  }), {
279
- subMenuTop: rt,
280
- handleAttributeMouseEnter: Re,
281
- handleAttributeMouseLeave: ut,
282
- keepSubMenuOpen: ct,
283
- closeSubMenu: dt,
284
- alignSubMenuWithTarget: xe
285
- } = He({
286
- activeChannelType: y,
287
- showSubMenu: $,
288
- frozenAttribute: C,
289
- hoveredAttribute: s,
290
- confirmingAttributeId: w,
291
- retainOpenUntilDismiss: Ie,
292
- hasMultipleChannels: L,
293
- isAttributeBlocked: N
294
- }), ft = async (t) => {
295
- if (I.value && y.value === t) {
296
- D();
291
+ subMenuTop: lt,
292
+ handleAttributeMouseEnter: st,
293
+ handleAttributeMouseLeave: j,
294
+ keepSubMenuOpen: Ae,
295
+ closeSubMenu: Te,
296
+ alignSubMenuWithTarget: at
297
+ } = gt({
298
+ activeChannelType: r,
299
+ showSubMenu: G,
300
+ frozenAttribute: R,
301
+ hoveredAttribute: _,
302
+ confirmingAttributeId: b,
303
+ retainOpenUntilDismiss: Ge,
304
+ hasMultipleChannels: S,
305
+ isAttributeBlocked: M
306
+ }), it = async (e) => {
307
+ if (g.value && r.value === e) {
308
+ N();
297
309
  return;
298
310
  }
299
- q("reset-blocked-attributes");
300
- const a = M.value !== t;
301
- ke(t), a ? (De(
302
- t,
303
- K.value,
304
- ae.value
305
- ), await G(), Te(t)) : E.value = null;
311
+ ae("reset-blocked-attributes");
312
+ const t = T.value !== e;
313
+ Je(e), t ? (ot(
314
+ e,
315
+ ue.value,
316
+ Z.value
317
+ ), await le(), Ke(e)) : V.value = null;
306
318
  };
307
- B(I, (t) => {
308
- t || se();
319
+ z(g, (e) => {
320
+ e || Ie();
309
321
  });
310
- const mt = (t) => {
311
- N(t) || we(t);
322
+ const Me = (e) => {
323
+ M(e) || et(e);
312
324
  };
313
- Ge({
314
- selectedChannelType: M,
315
- selectedChannel: J,
316
- channels: j,
317
- selectedDialog: i(() => e.selectedDialog ?? null),
318
- isChannelEmpty: le,
319
- isNewDialog: X,
320
- showDefaultChannelTooltipWithTimer: ie,
321
- clearDefaultChannelTooltip: R
325
+ kt({
326
+ selectedChannelType: T,
327
+ selectedChannel: U,
328
+ channels: H,
329
+ selectedDialog: a(() => i.selectedDialog ?? null),
330
+ isChannelEmpty: be,
331
+ isNewDialog: ce,
332
+ showDefaultChannelTooltipWithTimer: ge,
333
+ clearDefaultChannelTooltip: $
322
334
  });
323
335
  const {
324
- emptyChannelsPlaceholderText: ht,
325
- shouldShowEmptyChannelsPlaceholder: Ct
326
- } = Je({
327
- showMenu: I,
328
- activeChannelType: y,
329
- emptyChannelsPlaceholder: i(() => e.emptyChannelsPlaceholder ?? {}),
330
- getAvailableChannels: Z,
331
- organizedContactAttributes: ae
332
- }), Oe = i(
333
- () => Pe()
334
- ), bt = i(
335
- () => $.value && s.value && Oe.value.length > 0 && y.value !== "phone" && L(y.value)
336
- ), vt = async (t, o) => {
337
- const a = Re(t, o.currentTarget);
338
- await G(), a instanceof HTMLElement && xe(F, a);
336
+ emptyChannelsPlaceholderText: ut,
337
+ shouldShowEmptyChannelsPlaceholder: Se
338
+ } = It({
339
+ showMenu: g,
340
+ activeChannelType: r,
341
+ emptyChannelsPlaceholder: a(() => i.emptyChannelsPlaceholder ?? {}),
342
+ getAvailableChannels: ve,
343
+ organizedContactAttributes: Z
344
+ }), we = a(
345
+ () => nt()
346
+ ), rt = a(
347
+ () => G.value && _.value && we.value.length > 0 && r.value !== "phone" && S(r.value)
348
+ ), De = async (e, o) => {
349
+ const t = st(e, o.currentTarget);
350
+ await le(), t instanceof HTMLElement && at(L, t);
339
351
  };
340
- B(() => e.confirmingAttributeId, (t, o) => {
341
- t || (_.value = null, o && Se());
342
- }), B(W, () => {
343
- const t = w.value;
344
- if (!t)
352
+ return z(() => i.confirmingAttributeId, (e, o) => {
353
+ e || (x.value = null, o && Xe());
354
+ }), z(Y, () => {
355
+ const e = b.value;
356
+ if (!e)
345
357
  return;
346
- const o = W.value.find((a) => a.id === t);
347
- (o == null ? void 0 : o.status) === "confirmed" && (_.value = null, D());
348
- }, { deep: !0 }), B(() => e.selectedDialog, () => {
349
- se();
350
- }, { deep: !0 }), Fe(() => {
351
- document.addEventListener("click", ee), _e();
352
- }), Ee(() => {
353
- document.removeEventListener("click", ee), R();
354
- }), u({
358
+ const o = Y.value.find((t) => t.id === e);
359
+ (o == null ? void 0 : o.status) === "confirmed" && (x.value = null, N());
360
+ }, { deep: !0 }), z(() => i.selectedDialog, () => {
361
+ Ie();
362
+ }, { deep: !0 }), ct(() => {
363
+ document.addEventListener("click", he), Ze();
364
+ }), dt(() => {
365
+ document.removeEventListener("click", he), $();
366
+ }), Oe({
355
367
  /** Снять pin и закрыть оба меню (вызывать с host при ОК на splash). */
356
- closeMenu: D
357
- });
358
- const Be = { props: e, emit: q, panelRef: F, channelsPanelRef: n, hoveredAttribute: s, frozenAttribute: C, selectedChannelType: M, selectedChannel: J, panelPendingSelection: E, showDefaultChannelTooltip: z, defaultChannelTooltipTimer: S, channelTooltipRef: g, internalConfirmingAttributeId: _, effectiveConfirmingAttributeId: w, blockedAttributeIdsRef: me, isAttributeBlocked: N, channelsRef: j, channelOrderRef: he, visibleChannelTypesRef: Ce, channelTooltipsRef: be, attributeTooltipsRef: ve, attributeIndicatorTooltipsRef: Ke, recentAttributeChannelsRef: K, messagesRef: Q, selectedChatRef: ye, isNewDialogRef: X, currentChannelId: Y, attributeIdMatches: P, getAttributeTooltipText: pe, hasAttributeTooltip: Qe, panelChannelTypes: ge, channelsTypes: Xe, getTooltipText: Ye, getChannelTypeFromId: Ze, hasMultipleChannels: L, isChannelActive: $e, getSingleChannelForType: Ae, getMenuChannelIconComponentForChannelId: et, getSingleMenuChannelIconComponent: tt, getAvailableChannels: Z, activeChannelType: y, hoveredChannel: nt, showMenu: I, showSubMenu: $, retainOpenUntilDismiss: Ie, handleChannelClick: ke, openMenu: Te, closeMenu: D, pinMenuOpen: Me, armOutsideClickSuppression: Se, handleClickOutside: ee, selectedAttributeId: U, effectivePanelSelection: te, isChannelSelected: ne, isAttributeSelected: ot, subMenuAttribute: V, getChannelIndicatorAliases: oe, getSubMenuChannelIndicatorTypeForChannel: lt, getSubMenuChannelIndicatorClassForChannel: it, contactAttributesRef: W, isChannelEmpty: le, showDefaultChannelTooltipWithTimer: ie, clearDefaultChannelTooltip: R, organizedContactAttributes: ae, organizeContactAttributes: _e, isAttributeFrozen: at, handleAttributeClick: we, selectChannel: st, resolveAvailableChannels: Pe, applyRecentChannelButtonSelection: De, clearPanelPendingSelection: se, subMenuTop: rt, baseHandleAttributeMouseEnter: Re, handleAttributeMouseLeave: ut, keepSubMenuOpen: ct, closeSubMenu: dt, alignSubMenuWithTarget: xe, onChannelButtonClick: ft, onAttributeClick: mt, emptyChannelsPlaceholderText: ht, shouldShowEmptyChannelsPlaceholder: Ct, availableChannels: Oe, shouldShowSubMenu: bt, onAttributeMouseEnter: vt, ref: h, watch: B, onMounted: Fe, onUnmounted: Ee, computed: i, nextTick: G, Tooltip: pt, get useCommunicationChannels() {
359
- return ze;
360
- }, get useCommunicationMenu() {
361
- return Ne;
362
- }, get useCommunicationAttributes() {
363
- return je;
364
- }, get getAttributeStatusClass() {
365
- return At;
366
- }, get isAttributeConfirming() {
367
- return gt;
368
- }, get checkAttributeBlocked() {
369
- return Ve;
370
- }, get getSubMenuChannelIndicatorType() {
371
- return Ue;
372
- }, get getSubMenuChannelIndicatorClass() {
373
- return Le;
374
- }, get useCommunicationActions() {
375
- return We;
376
- }, get useCommunicationSubMenu() {
377
- return He;
378
- }, get useCommunicationDialogSync() {
379
- return Ge;
380
- }, get useCommunicationPlaceholder() {
381
- return Je;
382
- }, CommunicationPanelAttributeIndicator: It, get CommunicationPanelCheckIcon() {
383
- return kt;
384
- }, get CommunicationPanelConfirmSpinner() {
385
- return Mt;
386
- }, get CommunicationPanelUnconfirmedIcon() {
387
- return Tt;
388
- } };
389
- return Object.defineProperty(Be, "__isScriptSetup", { enumerable: !1, value: !0 }), Be;
390
- }
391
- }, wt = {
392
- ref: "panelRef",
393
- class: "communication-panel"
394
- }, Pt = {
395
- key: 0,
396
- ref: "channelsPanelRef",
397
- class: "channels-panel"
398
- }, Dt = ["data-channel-type", "onClick", "onMouseenter"], Rt = { class: "channel-icon" }, xt = { class: "channel-icon" }, Ot = {
399
- key: 1,
400
- class: "attributes-menu"
401
- }, Bt = {
402
- key: 0,
403
- class: "empty-channels-placeholder"
404
- }, qt = ["data-attribute-status", "onMouseenter", "onClick"], Ft = { class: "attribute-info" }, Et = { class: "attribute-value" }, zt = { class: "menu-icon" }, Nt = {
405
- key: 0,
406
- class: "menu-icon-arrow"
407
- }, jt = ["data-attribute-status", "onMouseenter", "onClick"], Lt = { class: "attribute-info" }, Ut = { class: "attribute-value" }, Vt = { class: "menu-icon" }, Wt = {
408
- key: 0,
409
- class: "menu-icon-arrow"
410
- }, Ht = ["onClick"], Gt = { class: "sub-menu-indicator-slot" }, Jt = { class: "sub-menu-title" };
411
- function Kt(fe, u, v, e, q, F) {
412
- return l(), r(
413
- "div",
414
- wt,
415
- [
416
- c(" Панель с кнопками каналов "),
417
- e.channelsTypes.length ? (l(), r(
418
- "div",
419
- Pt,
420
- [
421
- (l(!0), r(
422
- x,
423
- null,
424
- ue(e.channelsTypes, (n) => {
425
- var s;
426
- return l(), r("button", {
427
- key: n.type,
428
- "data-channel-type": n.type,
429
- class: A(["channel-btn", {
430
- active: e.isChannelActive(n.type),
431
- hover: e.hoveredChannel === n.type && !e.isChannelActive(n.type) || e.hoveredChannel === n.type && e.isChannelActive(n.type),
432
- menuOpen: e.showMenu && e.activeChannelType === n.type
433
- }]),
434
- onClick: (C) => e.onChannelButtonClick(n.type),
435
- onMouseenter: (C) => e.hoveredChannel = n.type,
436
- onMouseleave: u[0] || (u[0] = (C) => e.hoveredChannel = null)
437
- }, [
438
- e.isChannelActive(n.type) ? (l(), r(
439
- x,
440
- { key: 0 },
441
- [
442
- ce(e.Tooltip, {
443
- ref_for: !0,
444
- ref: (C) => {
445
- C && (e.channelTooltipRef = C);
446
- },
447
- text: e.showDefaultChannelTooltip ? "Выбран канал по умолчанию, можно изменить в настройках профиля" : (s = e.selectedChannel) == null ? void 0 : s.title,
448
- position: "bottom-left",
449
- offset: 8,
450
- delay: v.tooltipDelay,
451
- "hide-on-click": "",
452
- trigger: e.showDefaultChannelTooltip ? "auto" : "hover",
453
- "auto-show-duration": e.showDefaultChannelTooltip ? 5e3 : 0
454
- }, {
455
- default: de(() => [
456
- d("span", Rt, [
457
- (l(), p(O(n.component)))
458
- ])
459
- ]),
460
- _: 2
461
- /* DYNAMIC */
462
- }, 1032, ["text", "delay", "trigger", "auto-show-duration"]),
463
- u[5] || (u[5] = d(
464
- "span",
465
- { class: "active-indicator" },
466
- null,
467
- -1
468
- /* CACHED */
469
- ))
470
- ],
471
- 64
472
- /* STABLE_FRAGMENT */
473
- )) : (l(), p(e.Tooltip, {
474
- key: 1,
475
- text: e.getTooltipText(n.type),
476
- position: "bottom-left",
477
- offset: 8,
478
- delay: v.tooltipDelay,
479
- "hide-on-click": ""
480
- }, {
481
- default: de(() => [
482
- d("span", xt, [
483
- (l(), p(O(n.component)))
484
- ])
485
- ]),
486
- _: 2
487
- /* DYNAMIC */
488
- }, 1032, ["text", "delay"]))
489
- ], 42, Dt);
490
- }),
491
- 128
492
- /* KEYED_FRAGMENT */
493
- ))
494
- ],
495
- 512
496
- /* NEED_PATCH */
497
- )) : c("v-if", !0),
498
- c(" Меню контактов "),
499
- e.showMenu && e.activeChannelType ? (l(), r("div", Ot, [
500
- c(" Placeholder когда нет каналов "),
501
- e.shouldShowEmptyChannelsPlaceholder ? (l(), r(
502
- "div",
503
- Bt,
504
- H(e.emptyChannelsPlaceholderText),
505
- 1
506
- /* TEXT */
507
- )) : c("v-if", !0),
508
- c(" Все контакты (показываем только если есть каналы или атрибуты) "),
509
- e.shouldShowEmptyChannelsPlaceholder ? c("v-if", !0) : (l(!0), r(
510
- x,
511
- { key: 1 },
512
- ue(e.organizedContactAttributes[e.activeChannelType], (n) => (l(), r(
513
- x,
514
- {
515
- key: n.attributeId
516
- },
517
- [
518
- e.hasAttributeTooltip(n) ? (l(), p(e.Tooltip, {
519
- key: 0,
520
- text: e.getAttributeTooltipText(n),
368
+ closeMenu: N
369
+ }), (e, o) => (l(), u("div", {
370
+ ref_key: "panelRef",
371
+ ref: L,
372
+ class: "communication-panel"
373
+ }, [
374
+ n(pe).length ? (l(), u("div", {
375
+ key: 0,
376
+ ref_key: "channelsPanelRef",
377
+ ref: Be,
378
+ class: "channels-panel"
379
+ }, [
380
+ (l(!0), u(w, null, te(n(pe), (t) => {
381
+ var s;
382
+ return l(), u("button", {
383
+ key: t.type,
384
+ "data-channel-type": t.type,
385
+ class: k(["channel-btn", {
386
+ active: n(P)(t.type),
387
+ hover: n(B) === t.type && !n(P)(t.type) || n(B) === t.type && n(P)(t.type),
388
+ menuOpen: n(g) && n(r) === t.type
389
+ }]),
390
+ onClick: (c) => it(t.type),
391
+ onMouseenter: (c) => B.value = t.type,
392
+ onMouseleave: o[0] || (o[0] = (c) => B.value = null)
393
+ }, [
394
+ n(P)(t.type) ? (l(), u(w, { key: 0 }, [
395
+ ne(se, {
396
+ ref_for: !0,
397
+ ref: (c) => {
398
+ c && (C.value = c);
399
+ },
400
+ text: A.value ? "Выбран канал по умолчанию, можно изменить в настройках профиля" : (s = U.value) == null ? void 0 : s.title,
521
401
  position: "bottom-left",
522
402
  offset: 8,
523
- delay: v.tooltipDelay,
524
- "hide-on-click": ""
403
+ delay: h.tooltipDelay,
404
+ "hide-on-click": "",
405
+ trigger: A.value ? "auto" : "hover",
406
+ "auto-show-duration": A.value ? 5e3 : 0
525
407
  }, {
526
- default: de(() => [
527
- d("div", {
528
- class: A(["attribute-item", e.getAttributeStatusClass(n), {
529
- "frozen-hover": e.isAttributeFrozen(n),
530
- selected: e.isAttributeSelected(n),
531
- confirming: e.isAttributeConfirming(n, e.effectiveConfirmingAttributeId),
532
- blocked: e.isAttributeBlocked(n)
533
- }]),
534
- "data-attribute-status": n.status,
535
- onMouseenter: (s) => e.onAttributeMouseEnter(n, s),
536
- onMouseleave: u[1] || (u[1] = (...s) => e.handleAttributeMouseLeave && e.handleAttributeMouseLeave(...s)),
537
- onClick: (s) => e.onAttributeClick(n)
538
- }, [
539
- d("div", Ft, [
540
- ce(e.CommunicationPanelAttributeIndicator, {
541
- attribute: n,
542
- "is-selected": e.isAttributeSelected(n),
543
- "confirming-attribute-id": e.effectiveConfirmingAttributeId,
544
- "blocked-attribute-ids": e.blockedAttributeIdsRef,
545
- "indicator-tooltips": e.attributeIndicatorTooltipsRef,
546
- "tooltip-delay": v.tooltipDelay
547
- }, null, 8, ["attribute", "is-selected", "confirming-attribute-id", "blocked-attribute-ids", "indicator-tooltips", "tooltip-delay"]),
548
- d(
549
- "span",
550
- Et,
551
- H(n.value),
552
- 1
553
- /* TEXT */
554
- )
555
- ]),
556
- d("span", zt, [
557
- e.hasMultipleChannels(e.activeChannelType) ? (l(), r("span", Nt)) : v.showChannelIcons ? (l(), r(
558
- "span",
559
- {
560
- key: 1,
561
- class: A(["channel-icon-small", { "menu-icon-grey": e.activeChannelType !== "sms" }])
562
- },
563
- [
564
- (l(), p(O(e.getSingleMenuChannelIconComponent(e.activeChannelType))))
565
- ],
566
- 2
567
- /* CLASS */
568
- )) : c("v-if", !0)
569
- ])
570
- ], 42, qt)
408
+ default: oe(() => [
409
+ d("span", Dt, [
410
+ (l(), v(D(t.component)))
411
+ ])
571
412
  ]),
572
413
  _: 2
573
- /* DYNAMIC */
574
- }, 1032, ["text", "delay"])) : (l(), r("div", {
575
- key: 1,
576
- class: A(["attribute-item", e.getAttributeStatusClass(n), {
577
- "frozen-hover": e.isAttributeFrozen(n),
578
- selected: e.isAttributeSelected(n),
579
- confirming: e.isAttributeConfirming(n, e.effectiveConfirmingAttributeId),
580
- blocked: e.isAttributeBlocked(n)
414
+ }, 1032, ["text", "delay", "trigger", "auto-show-duration"]),
415
+ o[5] || (o[5] = d("span", { class: "active-indicator" }, null, -1))
416
+ ], 64)) : (l(), v(se, {
417
+ key: 1,
418
+ text: n(Ue)(t.type),
419
+ position: "bottom-left",
420
+ offset: 8,
421
+ delay: h.tooltipDelay,
422
+ "hide-on-click": ""
423
+ }, {
424
+ default: oe(() => [
425
+ d("span", _t, [
426
+ (l(), v(D(t.component)))
427
+ ])
428
+ ]),
429
+ _: 2
430
+ }, 1032, ["text", "delay"]))
431
+ ], 42, wt);
432
+ }), 128))
433
+ ], 512)) : y("", !0),
434
+ n(g) && n(r) ? (l(), u("div", Rt, [
435
+ n(Se) ? (l(), u("div", qt, F(n(ut)), 1)) : y("", !0),
436
+ n(Se) ? y("", !0) : (l(!0), u(w, { key: 1 }, te(n(Z)[n(r)], (t) => (l(), u(w, {
437
+ key: t.attributeId
438
+ }, [
439
+ Fe(t) ? (l(), v(se, {
440
+ key: 0,
441
+ text: fe(t),
442
+ position: "bottom-left",
443
+ offset: 8,
444
+ delay: h.tooltipDelay,
445
+ "hide-on-click": ""
446
+ }, {
447
+ default: oe(() => [
448
+ d("div", {
449
+ class: k(["attribute-item", n(Re)(t), {
450
+ "frozen-hover": n(ke)(t),
451
+ selected: E(t),
452
+ confirming: n(qe)(t, b.value),
453
+ blocked: M(t)
581
454
  }]),
582
- "data-attribute-status": n.status,
583
- onMouseenter: (s) => e.onAttributeMouseEnter(n, s),
584
- onMouseleave: u[2] || (u[2] = (...s) => e.handleAttributeMouseLeave && e.handleAttributeMouseLeave(...s)),
585
- onClick: (s) => e.onAttributeClick(n)
455
+ "data-attribute-status": t.status,
456
+ onMouseenter: (s) => De(t, s),
457
+ onMouseleave: o[1] || (o[1] = (...s) => n(j) && n(j)(...s)),
458
+ onClick: (s) => Me(t)
586
459
  }, [
587
- d("div", Lt, [
588
- ce(e.CommunicationPanelAttributeIndicator, {
589
- attribute: n,
590
- "is-selected": e.isAttributeSelected(n),
591
- "confirming-attribute-id": e.effectiveConfirmingAttributeId,
592
- "blocked-attribute-ids": e.blockedAttributeIdsRef,
593
- "indicator-tooltips": e.attributeIndicatorTooltipsRef,
594
- "tooltip-delay": v.tooltipDelay
460
+ d("div", Ot, [
461
+ ne(xe, {
462
+ attribute: t,
463
+ "is-selected": E(t),
464
+ "confirming-attribute-id": b.value,
465
+ "blocked-attribute-ids": W.value,
466
+ "indicator-tooltips": ie.value,
467
+ "tooltip-delay": h.tooltipDelay
595
468
  }, null, 8, ["attribute", "is-selected", "confirming-attribute-id", "blocked-attribute-ids", "indicator-tooltips", "tooltip-delay"]),
596
- d(
597
- "span",
598
- Ut,
599
- H(n.value),
600
- 1
601
- /* TEXT */
602
- )
469
+ d("span", Pt, F(t.value), 1)
603
470
  ]),
604
- d("span", Vt, [
605
- e.hasMultipleChannels(e.activeChannelType) ? (l(), r("span", Wt)) : v.showChannelIcons ? (l(), r(
606
- "span",
607
- {
608
- key: 1,
609
- class: A(["channel-icon-small", { "menu-icon-grey": e.activeChannelType !== "sms" }])
610
- },
611
- [
612
- (l(), p(O(e.getSingleMenuChannelIconComponent(e.activeChannelType))))
613
- ],
614
- 2
615
- /* CLASS */
616
- )) : c("v-if", !0)
471
+ d("span", Bt, [
472
+ n(S)(n(r)) ? (l(), u("span", Nt)) : h.showChannelIcons ? (l(), u("span", {
473
+ key: 1,
474
+ class: k(["channel-icon-small", { "menu-icon-grey": n(r) !== "sms" }])
475
+ }, [
476
+ (l(), v(D(n(me)(n(r)))))
477
+ ], 2)) : y("", !0)
617
478
  ])
618
- ], 42, jt))
619
- ],
620
- 64
621
- /* STABLE_FRAGMENT */
622
- ))),
623
- 128
624
- /* KEYED_FRAGMENT */
625
- )),
626
- c(" Второй уровень меню "),
627
- e.showSubMenu && e.shouldShowSubMenu ? (l(), r(
628
- "div",
629
- {
630
- key: 2,
631
- class: "sub-menu left",
632
- style: yt({ top: e.subMenuTop + "px" }),
633
- onMouseenter: u[3] || (u[3] = (...n) => e.keepSubMenuOpen && e.keepSubMenuOpen(...n)),
634
- onMouseleave: u[4] || (u[4] = (...n) => e.closeSubMenu && e.closeSubMenu(...n))
635
- },
636
- [
637
- u[6] || (u[6] = d(
638
- "div",
639
- { class: "sub-menu-header" },
640
- " Канал связи ",
641
- -1
642
- /* CACHED */
643
- )),
644
- (l(!0), r(
645
- x,
646
- null,
647
- ue(e.availableChannels, (n) => (l(), r("div", {
648
- key: n.channelId,
649
- class: A(["sub-menu-item", { selected: e.isChannelSelected(n) }]),
650
- onClick: (s) => e.selectChannel(n.channelId)
479
+ ], 42, xt)
480
+ ]),
481
+ _: 2
482
+ }, 1032, ["text", "delay"])) : (l(), u("div", {
483
+ key: 1,
484
+ class: k(["attribute-item", n(Re)(t), {
485
+ "frozen-hover": n(ke)(t),
486
+ selected: E(t),
487
+ confirming: n(qe)(t, b.value),
488
+ blocked: M(t)
489
+ }]),
490
+ "data-attribute-status": t.status,
491
+ onMouseenter: (s) => De(t, s),
492
+ onMouseleave: o[2] || (o[2] = (...s) => n(j) && n(j)(...s)),
493
+ onClick: (s) => Me(t)
494
+ }, [
495
+ d("div", $t, [
496
+ ne(xe, {
497
+ attribute: t,
498
+ "is-selected": E(t),
499
+ "confirming-attribute-id": b.value,
500
+ "blocked-attribute-ids": W.value,
501
+ "indicator-tooltips": ie.value,
502
+ "tooltip-delay": h.tooltipDelay
503
+ }, null, 8, ["attribute", "is-selected", "confirming-attribute-id", "blocked-attribute-ids", "indicator-tooltips", "tooltip-delay"]),
504
+ d("span", jt, F(t.value), 1)
505
+ ]),
506
+ d("span", zt, [
507
+ n(S)(n(r)) ? (l(), u("span", Ft)) : h.showChannelIcons ? (l(), u("span", {
508
+ key: 1,
509
+ class: k(["channel-icon-small", { "menu-icon-grey": n(r) !== "sms" }])
651
510
  }, [
652
- d("span", Gt, [
653
- e.getSubMenuChannelIndicatorTypeForChannel(n) ? (l(), r(
654
- "span",
655
- {
656
- key: 0,
657
- class: A(e.getSubMenuChannelIndicatorClassForChannel(n))
658
- },
659
- [
660
- e.getSubMenuChannelIndicatorTypeForChannel(n) === "spinner" ? (l(), p(e.CommunicationPanelConfirmSpinner, { key: 0 })) : e.getSubMenuChannelIndicatorTypeForChannel(n) === "unconfirmed" ? (l(), p(e.CommunicationPanelUnconfirmedIcon, { key: 1 })) : (l(), p(e.CommunicationPanelCheckIcon, { key: 2 }))
661
- ],
662
- 2
663
- /* CLASS */
664
- )) : c("v-if", !0)
665
- ]),
666
- d(
667
- "span",
668
- Jt,
669
- H(n.title || n.channelId),
670
- 1
671
- /* TEXT */
672
- ),
673
- v.showChannelIcons ? (l(), r(
674
- "span",
675
- {
676
- key: 0,
677
- class: A(["sub-menu-icon", { "menu-icon-grey": e.getChannelTypeFromId(n.channelId) !== "sms" }])
678
- },
679
- [
680
- (l(), p(O(e.getMenuChannelIconComponentForChannelId(n.channelId))))
681
- ],
682
- 2
683
- /* CLASS */
684
- )) : c("v-if", !0)
685
- ], 10, Ht))),
686
- 128
687
- /* KEYED_FRAGMENT */
688
- ))
689
- ],
690
- 36
691
- /* STYLE, NEED_HYDRATION */
692
- )) : c("v-if", !0)
693
- ])) : c("v-if", !0)
694
- ],
695
- 512
696
- /* NEED_PATCH */
697
- );
698
- }
699
- const dn = /* @__PURE__ */ St(_t, [["render", Kt], ["__scopeId", "data-v-153e29a4"], ["__file", "/var/store/dev-space/repos-projects/chotto/chotto/src/components/2_blocks/CommunicationPanel/CommunicationPanel.vue"]]);
511
+ (l(), v(D(n(me)(n(r)))))
512
+ ], 2)) : y("", !0)
513
+ ])
514
+ ], 42, Et))
515
+ ], 64))), 128)),
516
+ n(G) && rt.value ? (l(), u("div", {
517
+ key: 2,
518
+ class: "sub-menu left",
519
+ style: ft({ top: n(lt) + "px" }),
520
+ onMouseenter: o[3] || (o[3] = (...t) => n(Ae) && n(Ae)(...t)),
521
+ onMouseleave: o[4] || (o[4] = (...t) => n(Te) && n(Te)(...t))
522
+ }, [
523
+ o[6] || (o[6] = d("div", { class: "sub-menu-header" }, " Канал связи ", -1)),
524
+ (l(!0), u(w, null, te(we.value, (t) => (l(), u("div", {
525
+ key: t.channelId,
526
+ class: k(["sub-menu-item", { selected: K(t) }]),
527
+ onClick: (s) => n(tt)(t.channelId)
528
+ }, [
529
+ d("span", Ut, [
530
+ X(t) ? (l(), u("span", {
531
+ key: 0,
532
+ class: k(Ye(t))
533
+ }, [
534
+ X(t) === "spinner" ? (l(), v(n(Mt), { key: 0 })) : X(t) === "unconfirmed" ? (l(), v(n(Tt), { key: 1 })) : (l(), v(n(At), { key: 2 }))
535
+ ], 2)) : y("", !0)
536
+ ]),
537
+ d("span", Vt, F(t.title || t.channelId), 1),
538
+ h.showChannelIcons ? (l(), u("span", {
539
+ key: 0,
540
+ class: k(["sub-menu-icon", { "menu-icon-grey": n(Ve)(t.channelId) !== "sms" }])
541
+ }, [
542
+ (l(), v(D(n(He)(t.channelId))))
543
+ ], 2)) : y("", !0)
544
+ ], 10, Lt))), 128))
545
+ ], 36)) : y("", !0)
546
+ ])) : y("", !0)
547
+ ], 512));
548
+ }
549
+ }, un = /* @__PURE__ */ St(Wt, [["__scopeId", "data-v-bcd57170"]]);
700
550
  export {
701
- dn as default
551
+ un as default
702
552
  };