isometrik-plugin-chat-sdk 1.0.0

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 (507) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/BlockChatList-720a703e.js +423 -0
  3. package/dist/cjs/BlockChatList-720a703e.js.map +1 -0
  4. package/dist/cjs/DocumentMessageBubble-c79bfbe5.js +493 -0
  5. package/dist/cjs/DocumentMessageBubble-c79bfbe5.js.map +1 -0
  6. package/dist/cjs/Image-67c52acd.js +135 -0
  7. package/dist/cjs/Image-67c52acd.js.map +1 -0
  8. package/dist/cjs/ImageMessageBubble-1218fb66.js +675 -0
  9. package/dist/cjs/ImageMessageBubble-1218fb66.js.map +1 -0
  10. package/dist/cjs/IsometrikLogo-976b1c34.js +44 -0
  11. package/dist/cjs/IsometrikLogo-976b1c34.js.map +1 -0
  12. package/dist/cjs/MessageSearch-5fc9dc00.js +5892 -0
  13. package/dist/cjs/MessageSearch-5fc9dc00.js.map +1 -0
  14. package/dist/cjs/ReactionsContainer-a6ce9059.js +375 -0
  15. package/dist/cjs/ReactionsContainer-a6ce9059.js.map +1 -0
  16. package/dist/cjs/Text-fedf6eab.js +60 -0
  17. package/dist/cjs/Text-fedf6eab.js.map +1 -0
  18. package/dist/cjs/VideoMessageBubble-c4694a78.js +571 -0
  19. package/dist/cjs/VideoMessageBubble-c4694a78.js.map +1 -0
  20. package/dist/cjs/WebChat-403e7ab1.js +2884 -0
  21. package/dist/cjs/WebChat-403e7ab1.js.map +1 -0
  22. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  23. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  24. package/dist/cjs/audio-bubble_8.cjs.entry.js +21011 -0
  25. package/dist/cjs/audio-bubble_8.cjs.entry.js.map +1 -0
  26. package/dist/cjs/block-chat-list.cjs.entry.js +16 -0
  27. package/dist/cjs/block-chat-list.cjs.entry.js.map +1 -0
  28. package/dist/cjs/chat-app.cjs.entry.js +55 -0
  29. package/dist/cjs/chat-app.cjs.entry.js.map +1 -0
  30. package/dist/cjs/chat-assets-6ab1faa6.js +9 -0
  31. package/dist/cjs/chat-assets-6ab1faa6.js.map +1 -0
  32. package/dist/cjs/chat-creds-f4cbf400.js +38 -0
  33. package/dist/cjs/chat-creds-f4cbf400.js.map +1 -0
  34. package/dist/cjs/chat-document-message-bubble.cjs.entry.js +24 -0
  35. package/dist/cjs/chat-document-message-bubble.cjs.entry.js.map +1 -0
  36. package/dist/cjs/chat-image-message-bubble.cjs.entry.js +26 -0
  37. package/dist/cjs/chat-image-message-bubble.cjs.entry.js.map +1 -0
  38. package/dist/cjs/chat-video-message-bubble.cjs.entry.js +24 -0
  39. package/dist/cjs/chat-video-message-bubble.cjs.entry.js.map +1 -0
  40. package/dist/cjs/content-eca5336c.js +81 -0
  41. package/dist/cjs/content-eca5336c.js.map +1 -0
  42. package/dist/cjs/dialog-drawer-9d04911c.js +5313 -0
  43. package/dist/cjs/dialog-drawer-9d04911c.js.map +1 -0
  44. package/dist/cjs/forward-memebers.cjs.entry.js +128 -0
  45. package/dist/cjs/forward-memebers.cjs.entry.js.map +1 -0
  46. package/dist/cjs/group-members-a60fb1cb.js +41 -0
  47. package/dist/cjs/group-members-a60fb1cb.js.map +1 -0
  48. package/dist/cjs/groupcast-49dae5ab.js +202 -0
  49. package/dist/cjs/groupcast-49dae5ab.js.map +1 -0
  50. package/dist/cjs/imagePlaceholder-030cc566.js +4365 -0
  51. package/dist/cjs/imagePlaceholder-030cc566.js.map +1 -0
  52. package/dist/cjs/index-9afe62b6.js +3129 -0
  53. package/dist/cjs/index-9afe62b6.js.map +1 -0
  54. package/dist/cjs/index.cjs.js +148 -0
  55. package/dist/cjs/index.cjs.js.map +1 -0
  56. package/dist/cjs/isometrik-webchat.cjs.js +54 -0
  57. package/dist/cjs/isometrik-webchat.cjs.js.map +1 -0
  58. package/dist/cjs/loader.cjs.js +17 -0
  59. package/dist/cjs/loader.cjs.js.map +1 -0
  60. package/dist/cjs/login-page.cjs.entry.js +85 -0
  61. package/dist/cjs/login-page.cjs.entry.js.map +1 -0
  62. package/dist/cjs/member-add.cjs.entry.js +122 -0
  63. package/dist/cjs/member-add.cjs.entry.js.map +1 -0
  64. package/dist/cjs/message-reaction-976f6261.js +24 -0
  65. package/dist/cjs/message-reaction-976f6261.js.map +1 -0
  66. package/dist/cjs/my-component.cjs.entry.js +29 -0
  67. package/dist/cjs/my-component.cjs.entry.js.map +1 -0
  68. package/dist/cjs/reaction-container.cjs.entry.js +52 -0
  69. package/dist/cjs/reaction-container.cjs.entry.js.map +1 -0
  70. package/dist/cjs/shadow-css-7c4dbc43.js +336 -0
  71. package/dist/cjs/shadow-css-7c4dbc43.js.map +1 -0
  72. package/dist/cjs/signup-page.cjs.entry.js +143 -0
  73. package/dist/cjs/signup-page.cjs.entry.js.map +1 -0
  74. package/dist/cjs/taguser-aca04ed9.js +512 -0
  75. package/dist/cjs/taguser-aca04ed9.js.map +1 -0
  76. package/dist/cjs/theme-provider_2.cjs.entry.js +113 -0
  77. package/dist/cjs/theme-provider_2.cjs.entry.js.map +1 -0
  78. package/dist/cjs/toast-helper-defae4a5.js +84 -0
  79. package/dist/cjs/toast-helper-defae4a5.js.map +1 -0
  80. package/dist/cjs/utils-bcad3386.js +9 -0
  81. package/dist/cjs/utils-bcad3386.js.map +1 -0
  82. package/dist/collection/api/conversations.js +12 -0
  83. package/dist/collection/api/group-members.js +36 -0
  84. package/dist/collection/api/groupcast.js +183 -0
  85. package/dist/collection/api/membership-control.js +13 -0
  86. package/dist/collection/api/message-reaction.js +16 -0
  87. package/dist/collection/api/social-accounts.js +282 -0
  88. package/dist/collection/app-root.js +51 -0
  89. package/dist/collection/app-root.js.map +1 -0
  90. package/dist/collection/assets/images/avatar.svg +1 -0
  91. package/dist/collection/assets/images/chatdefaultbg.svg +6140 -0
  92. package/dist/collection/assets/images/equalizer.svg +1 -0
  93. package/dist/collection/assets/images/imagePlaceholder.svg +2 -0
  94. package/dist/collection/assets/images/link.svg +1 -0
  95. package/dist/collection/assets/images/videoPlaceholder.svg +4 -0
  96. package/dist/collection/assets/images/videoThumbnail.svg +1 -0
  97. package/dist/collection/assets/svg/ExcelDocument.js +2 -0
  98. package/dist/collection/assets/svg/IsometrikLogo.js +38 -0
  99. package/dist/collection/assets/svg/Moon.svg +1 -0
  100. package/dist/collection/assets/svg/NoChatPlaceholder.js +16 -0
  101. package/dist/collection/assets/svg/NoContactsPlaceholder.js +9 -0
  102. package/dist/collection/assets/svg/NoMessagePlaceholder.svg +13 -0
  103. package/dist/collection/assets/svg/PdfDocument.js +2 -0
  104. package/dist/collection/assets/svg/ProfilePlaceholder.js +1 -0
  105. package/dist/collection/assets/svg/SelectChatPlaceholder.js +13 -0
  106. package/dist/collection/assets/svg/Sun.svg +1 -0
  107. package/dist/collection/assets/svg/broadcast-selected.svg +4 -0
  108. package/dist/collection/assets/svg/broadcst-default.svg +4 -0
  109. package/dist/collection/assets/svg/close.svg +1 -0
  110. package/dist/collection/assets/svg/group.svg +7 -0
  111. package/dist/collection/assets/svg/login.svg +3051 -0
  112. package/dist/collection/assets/svg/message-add.svg +5 -0
  113. package/dist/collection/assets/svg/message-bold.svg +3 -0
  114. package/dist/collection/assets/svg/message-outline.svg +5 -0
  115. package/dist/collection/collection-manifest.json +32 -0
  116. package/dist/collection/components/ChatUIComponent/AddMember.js +144 -0
  117. package/dist/collection/components/ChatUIComponent/AddMember.js.map +1 -0
  118. package/dist/collection/components/ChatUIComponent/AudioBubble.js +528 -0
  119. package/dist/collection/components/ChatUIComponent/AudioBubble.js.map +1 -0
  120. package/dist/collection/components/ChatUIComponent/BlockChatList.js +114 -0
  121. package/dist/collection/components/ChatUIComponent/BlockChatList.js.map +1 -0
  122. package/dist/collection/components/ChatUIComponent/ChatDocumentMessageBubble.js +11 -0
  123. package/dist/collection/components/ChatUIComponent/ChatDocumentMessageBubble.js.map +1 -0
  124. package/dist/collection/components/ChatUIComponent/ChatImageMessageBubble.js +11 -0
  125. package/dist/collection/components/ChatUIComponent/ChatImageMessageBubble.js.map +1 -0
  126. package/dist/collection/components/ChatUIComponent/ChatOwnProfile/Profile.js +540 -0
  127. package/dist/collection/components/ChatUIComponent/ChatOwnProfile/Profile.js.map +1 -0
  128. package/dist/collection/components/ChatUIComponent/ChatOwnProfile/profile-page.css +252 -0
  129. package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +1175 -0
  130. package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -0
  131. package/dist/collection/components/ChatUIComponent/ChatVideoMessageBubble.js +11 -0
  132. package/dist/collection/components/ChatUIComponent/ChatVideoMessageBubble.js.map +1 -0
  133. package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +790 -0
  134. package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -0
  135. package/dist/collection/components/ChatUIComponent/ForwardMessageList.js +152 -0
  136. package/dist/collection/components/ChatUIComponent/ForwardMessageList.js.map +1 -0
  137. package/dist/collection/components/ChatUIComponent/GroupCast.js +218 -0
  138. package/dist/collection/components/ChatUIComponent/GroupCast.js.map +1 -0
  139. package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js +590 -0
  140. package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js.map +1 -0
  141. package/dist/collection/components/ChatUIComponent/ReactionContainer.js +103 -0
  142. package/dist/collection/components/ChatUIComponent/ReactionContainer.js.map +1 -0
  143. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +1352 -0
  144. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -0
  145. package/dist/collection/components/ChatUIComponent/WebChatBody/web-chat-body.css +277 -0
  146. package/dist/collection/components/Login.js +118 -0
  147. package/dist/collection/components/Login.js.map +1 -0
  148. package/dist/collection/components/Signup.js +177 -0
  149. package/dist/collection/components/Signup.js.map +1 -0
  150. package/dist/collection/components/chat-main.js +131 -0
  151. package/dist/collection/components/chat-main.js.map +1 -0
  152. package/dist/collection/components/my-component/my-component.css +3 -0
  153. package/dist/collection/components/my-component/my-component.js +83 -0
  154. package/dist/collection/components/my-component/my-component.js.map +1 -0
  155. package/dist/collection/components/my-component/web-chat/WebChat.js +2686 -0
  156. package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -0
  157. package/dist/collection/components/my-component/web-chat/WebchatRightSide.js +675 -0
  158. package/dist/collection/components/my-component/web-chat/WebchatRightSide.js.map +1 -0
  159. package/dist/collection/components/my-component/web-chat/web-chat.css +336 -0
  160. package/dist/collection/components/theme-provider.js +182 -0
  161. package/dist/collection/components/theme-provider.js.map +1 -0
  162. package/dist/collection/constants/chat-assets.js +12 -0
  163. package/dist/collection/constants/chat-creds.js +31 -0
  164. package/dist/collection/constants/content.js +75 -0
  165. package/dist/collection/constants/urls.js +1 -0
  166. package/dist/collection/index.js +135 -0
  167. package/dist/collection/index.js.map +1 -0
  168. package/dist/collection/lib/helpers.js +205 -0
  169. package/dist/collection/lib/taguser.js +123 -0
  170. package/dist/collection/store/conversation.js +25 -0
  171. package/dist/collection/store/conversation.js.map +1 -0
  172. package/dist/collection/store/group-members.js +24 -0
  173. package/dist/collection/store/group-members.js.map +1 -0
  174. package/dist/collection/store/unread-count.js +18 -0
  175. package/dist/collection/store/unread-count.js.map +1 -0
  176. package/dist/collection/stories/Components/ActionsPopup/ActionsPopup.js +222 -0
  177. package/dist/collection/stories/Components/ActionsPopup/ActionsPopup.stories.js +148 -0
  178. package/dist/collection/stories/Components/AttachmentBox/AttachmentBox.js +211 -0
  179. package/dist/collection/stories/Components/AttachmentBox/AttachmentPreview/AttachmentPreview.js +708 -0
  180. package/dist/collection/stories/Components/AttachmentBox/AttachmentPreview/AttachmentPreview.stories.js +57 -0
  181. package/dist/collection/stories/Components/AttachmentBox/Attachmentbox.stories.js +74 -0
  182. package/dist/collection/stories/Components/AttachmentBox/CameraPreview.js +231 -0
  183. package/dist/collection/stories/Components/BlockUsers/BlockUsers.js +337 -0
  184. package/dist/collection/stories/Components/Body/Body.js +48 -0
  185. package/dist/collection/stories/Components/Body/Body.stories.js +33 -0
  186. package/dist/collection/stories/Components/Buttons/Buttons.js +65 -0
  187. package/dist/collection/stories/Components/Buttons/Buttons.stories.js +132 -0
  188. package/dist/collection/stories/Components/ChatSidebar/ChatSidebar.js +951 -0
  189. package/dist/collection/stories/Components/ChatSidebar/ChatSidebar.stories.js +75 -0
  190. package/dist/collection/stories/Components/ChatSidebar/ContextMenu.js +109 -0
  191. package/dist/collection/stories/Components/ChatTile/ChatTile.js +290 -0
  192. package/dist/collection/stories/Components/ChatTile/ChatTile.stories.js +180 -0
  193. package/dist/collection/stories/Components/Chip/Chip.js +111 -0
  194. package/dist/collection/stories/Components/Chip/Chip.stories.js +149 -0
  195. package/dist/collection/stories/Components/ContactInfo/ContactInfo.js +1491 -0
  196. package/dist/collection/stories/Components/ContactInfo/ContactInfo.stories.js +118 -0
  197. package/dist/collection/stories/Components/ContactInfo/MediaList.js +147 -0
  198. package/dist/collection/stories/Components/ContactInfo/ProfileInfo.js +1219 -0
  199. package/dist/collection/stories/Components/ContactTile/ContactTile.js +416 -0
  200. package/dist/collection/stories/Components/ContactTile/ContactTile.stories.js +60 -0
  201. package/dist/collection/stories/Components/Dialog-Drawer/confirm.js +113 -0
  202. package/dist/collection/stories/Components/Dialog-Drawer/deletemessage.js +97 -0
  203. package/dist/collection/stories/Components/Dialog-Drawer/dialog-drawer.js +264 -0
  204. package/dist/collection/stories/Components/EmojiReactions/EmojiReactions.js +179 -0
  205. package/dist/collection/stories/Components/Footer/Footer.js +4 -0
  206. package/dist/collection/stories/Components/Footer/Footer.stories.js +155 -0
  207. package/dist/collection/stories/Components/ForwardMessage/ForwardMessageContainer.js +433 -0
  208. package/dist/collection/stories/Components/ForwardMessage/ForwardMessageContainer.stories.js +110 -0
  209. package/dist/collection/stories/Components/ForwardMessage/ForwardUi.js +46 -0
  210. package/dist/collection/stories/Components/GroupChatContacts/GroupChatContacts.js +546 -0
  211. package/dist/collection/stories/Components/GroupChatContacts/GroupChatContacts.stories.js +56 -0
  212. package/dist/collection/stories/Components/GroupInfo/GroupInfo.js +394 -0
  213. package/dist/collection/stories/Components/GroupInfo/GroupInfo.stories.js +107 -0
  214. package/dist/collection/stories/Components/Head/ClosedHeader/ClosedHead.js +129 -0
  215. package/dist/collection/stories/Components/Head/ClosedHeader/ClosedHead.stories.js +78 -0
  216. package/dist/collection/stories/Components/Head/Head.js +672 -0
  217. package/dist/collection/stories/Components/Head/Head.stories.js +91 -0
  218. package/dist/collection/stories/Components/Icon/Icon.js +115 -0
  219. package/dist/collection/stories/Components/Image/Image.js +41 -0
  220. package/dist/collection/stories/Components/Image/Image.stories.js +49 -0
  221. package/dist/collection/stories/Components/Image/Img.stories.js +178 -0
  222. package/dist/collection/stories/Components/Inputbox/Input.js +206 -0
  223. package/dist/collection/stories/Components/Inputbox/Input.stories.js +87 -0
  224. package/dist/collection/stories/Components/InstagramAccounts/InstagramAccountsPanel.js +605 -0
  225. package/dist/collection/stories/Components/Loader/Spinner/Spinner.js +60 -0
  226. package/dist/collection/stories/Components/Loader/Spinner/Spinner.stories.js +38 -0
  227. package/dist/collection/stories/Components/MainPlaceHolder/MainChatPlaceHolder.js +78 -0
  228. package/dist/collection/stories/Components/MainPlaceHolder/MainPlaceHolder.stories.js +130 -0
  229. package/dist/collection/stories/Components/MediaGallery/MediaGallery.js +868 -0
  230. package/dist/collection/stories/Components/MediaGallery/MediaGallery.stories.js +81 -0
  231. package/dist/collection/stories/Components/MembersList/MembersList.js +348 -0
  232. package/dist/collection/stories/Components/MessageBubble/AudioMessageBubble/AudioMesaageBubble.js +533 -0
  233. package/dist/collection/stories/Components/MessageBubble/DocumentMessageBubble/DocumentMessageBubble.js +484 -0
  234. package/dist/collection/stories/Components/MessageBubble/DocumentMessageBubble/DocumentMessageBubble.stories.js +54 -0
  235. package/dist/collection/stories/Components/MessageBubble/ImageMessageBubble/ImageMessageBubble.js +683 -0
  236. package/dist/collection/stories/Components/MessageBubble/ImageMessageBubble/ImageMessageBubble.stories.js +49 -0
  237. package/dist/collection/stories/Components/MessageBubble/IncomingTextMessageBubble/IncomingTextMessageBubble.js +450 -0
  238. package/dist/collection/stories/Components/MessageBubble/IncomingTextMessageBubble/IncomingTextMessageBubble.stories.js +56 -0
  239. package/dist/collection/stories/Components/MessageBubble/LinkMessageBubble/LinkMessageBubble.js +721 -0
  240. package/dist/collection/stories/Components/MessageBubble/OutgoingTextMessageBubble/OutgoingTextMessageBubble.js +139 -0
  241. package/dist/collection/stories/Components/MessageBubble/OutgoingTextMessageBubble/OutgoingTextMessageBubble.stories.js +63 -0
  242. package/dist/collection/stories/Components/MessageBubble/VideoMessageBubble/VideoMessageBubble.js +576 -0
  243. package/dist/collection/stories/Components/MessageBubble/VideoMessageBubble/VideoMessageBubble.stories.js +50 -0
  244. package/dist/collection/stories/Components/MessageDatePill/MessageDatePill.js +66 -0
  245. package/dist/collection/stories/Components/MessageDatePill/MessageDatePill.stories.js +48 -0
  246. package/dist/collection/stories/Components/MessageInfo/MessageInfo.js +465 -0
  247. package/dist/collection/stories/Components/MessageInfo/MessageInfo.stories.js +111 -0
  248. package/dist/collection/stories/Components/MessageSearch/MessageSearch.js +242 -0
  249. package/dist/collection/stories/Components/MessageSearchBar/SearchBar.js +523 -0
  250. package/dist/collection/stories/Components/MessageSearchBar/SearchBar.stories.js +98 -0
  251. package/dist/collection/stories/Components/MessageUnreadCount/MessageUnreadCount.js +51 -0
  252. package/dist/collection/stories/Components/MessageUnreadCount/MessageUnreadCount.stories.js +79 -0
  253. package/dist/collection/stories/Components/NewChatSidebar/NewChatSidebar.js +560 -0
  254. package/dist/collection/stories/Components/NewChatSidebar/NewChatSidebar.stories.js +56 -0
  255. package/dist/collection/stories/Components/Placeholder/NoContactsPlaceholder.js +57 -0
  256. package/dist/collection/stories/Components/Popup/ConfirmationPopup/DeleteConfirmationPopup/DeletePopup.js +114 -0
  257. package/dist/collection/stories/Components/ProfileSidebar/ProfileSidebar.js +166 -0
  258. package/dist/collection/stories/Components/ProfileSidebar/ProfileSidebar.stories.js +125 -0
  259. package/dist/collection/stories/Components/ProfileTab/ProfileTab.js +939 -0
  260. package/dist/collection/stories/Components/ProfileTab/ProfileTab.stories.js +144 -0
  261. package/dist/collection/stories/Components/ReactionsContainer/ReactionsContainer.js +166 -0
  262. package/dist/collection/stories/Components/ReactionsContainer/ReactionsContainer.stories.js +115 -0
  263. package/dist/collection/stories/Components/ReactionsContainer/ReactionsInfoCard/ReactionsInfoCard.js +98 -0
  264. package/dist/collection/stories/Components/ReactionsContainer/ReactionsInfoCard/ReactionsInfoCard.stories.js +55 -0
  265. package/dist/collection/stories/Components/ReadMark/BlueReadMark/BlueReadMark.js +27 -0
  266. package/dist/collection/stories/Components/ReadMark/BlueReadMark/BlueReadMark.stories.js +28 -0
  267. package/dist/collection/stories/Components/ReadMark/ClockMark/ClockMark.js +26 -0
  268. package/dist/collection/stories/Components/ReadMark/ClockMark/ClockMark.stories.js +33 -0
  269. package/dist/collection/stories/Components/ReadMark/DoubleMark/DoubleMark.js +27 -0
  270. package/dist/collection/stories/Components/ReadMark/DoubleMark/DoubleMark.stories.js +28 -0
  271. package/dist/collection/stories/Components/ReadMark/SingleMark/SingleMark.js +38 -0
  272. package/dist/collection/stories/Components/ReadMark/SingleMark/SingleMark.stories.js +33 -0
  273. package/dist/collection/stories/Components/ReplyBlock/MediaIcons.js +16 -0
  274. package/dist/collection/stories/Components/ReplyBlock/ReplyBlock.js +196 -0
  275. package/dist/collection/stories/Components/ReplyBlock/ReplyBlock.stories.js +57 -0
  276. package/dist/collection/stories/Components/ReplyMessageContainer/ReplyMessageContainer.js +645 -0
  277. package/dist/collection/stories/Components/ReplyMessageContainer/ReplyMessageContainer.stories.js +58 -0
  278. package/dist/collection/stories/Components/SearchableList/SearchableList.js +393 -0
  279. package/dist/collection/stories/Components/SearchableList/SearchableList.stories.js +65 -0
  280. package/dist/collection/stories/Components/SharePopup/SharePopup.js +152 -0
  281. package/dist/collection/stories/Components/SharePopup/SharePopup.stories.js +47 -0
  282. package/dist/collection/stories/Components/Splitscreen/Splitscreen.js +157 -0
  283. package/dist/collection/stories/Components/Splitscreen/Splitscreen.stories.js +100 -0
  284. package/dist/collection/stories/Components/TestFooter/MentionUserList.js +194 -0
  285. package/dist/collection/stories/Components/TestFooter/TestFooter.js +1339 -0
  286. package/dist/collection/stories/Components/TestFooter/TestFooter.stories.js +89 -0
  287. package/dist/collection/stories/Components/Text/Text.js +57 -0
  288. package/dist/collection/stories/Components/Text/Text.stories.js +83 -0
  289. package/dist/collection/stories/Components/TextStyle/TextStyle.js +38 -0
  290. package/dist/collection/stories/Components/TextStyle/TextStyle.stories.js +50 -0
  291. package/dist/collection/stories/Components/Time/Timestamp.js +50 -0
  292. package/dist/collection/stories/Components/Time/Timestamp.stories.js +34 -0
  293. package/dist/collection/stories/Components/Toaster/Toaster.js +94 -0
  294. package/dist/collection/stories/Components/Toaster/Toaster.stories.js +108 -0
  295. package/dist/collection/stories/Components/Toaster/toast-helper.js +79 -0
  296. package/dist/collection/stories/Components/Toaster/toast-helper.js.map +1 -0
  297. package/dist/collection/stories/Components/final/final.js +86 -0
  298. package/dist/collection/stories/Components/final/final.stories.js +30 -0
  299. package/dist/collection/stories/assets/SEARCH ICON.svg +1 -0
  300. package/dist/collection/types/ConversationDetailsTypes.js +2 -0
  301. package/dist/collection/types/ConversationDetailsTypes.js.map +1 -0
  302. package/dist/collection/utils/chatSdk.js +14 -0
  303. package/dist/collection/utils/getFomattedDate.js +34 -0
  304. package/dist/collection/utils/getFomattedDate.js.map +1 -0
  305. package/dist/collection/utils/unixTimeConverter.js +28 -0
  306. package/dist/collection/utils/utils.js +4 -0
  307. package/dist/collection/utils/utils.js.map +1 -0
  308. package/dist/esm/BlockChatList-9fc3a42b.js +421 -0
  309. package/dist/esm/BlockChatList-9fc3a42b.js.map +1 -0
  310. package/dist/esm/DocumentMessageBubble-b67726f2.js +491 -0
  311. package/dist/esm/DocumentMessageBubble-b67726f2.js.map +1 -0
  312. package/dist/esm/Image-bb9efda3.js +121 -0
  313. package/dist/esm/Image-bb9efda3.js.map +1 -0
  314. package/dist/esm/ImageMessageBubble-0e473f6e.js +673 -0
  315. package/dist/esm/ImageMessageBubble-0e473f6e.js.map +1 -0
  316. package/dist/esm/IsometrikLogo-14db76af.js +42 -0
  317. package/dist/esm/IsometrikLogo-14db76af.js.map +1 -0
  318. package/dist/esm/MessageSearch-4101a627.js +5875 -0
  319. package/dist/esm/MessageSearch-4101a627.js.map +1 -0
  320. package/dist/esm/ReactionsContainer-bdd74a3c.js +373 -0
  321. package/dist/esm/ReactionsContainer-bdd74a3c.js.map +1 -0
  322. package/dist/esm/Text-3b0b3898.js +58 -0
  323. package/dist/esm/Text-3b0b3898.js.map +1 -0
  324. package/dist/esm/VideoMessageBubble-88a7a53e.js +569 -0
  325. package/dist/esm/VideoMessageBubble-88a7a53e.js.map +1 -0
  326. package/dist/esm/WebChat-5448d615.js +2882 -0
  327. package/dist/esm/WebChat-5448d615.js.map +1 -0
  328. package/dist/esm/app-globals-0f993ce5.js +5 -0
  329. package/dist/esm/app-globals-0f993ce5.js.map +1 -0
  330. package/dist/esm/audio-bubble_8.entry.js +21001 -0
  331. package/dist/esm/audio-bubble_8.entry.js.map +1 -0
  332. package/dist/esm/block-chat-list.entry.js +8 -0
  333. package/dist/esm/block-chat-list.entry.js.map +1 -0
  334. package/dist/esm/chat-app.entry.js +51 -0
  335. package/dist/esm/chat-app.entry.js.map +1 -0
  336. package/dist/esm/chat-assets-bd8778d5.js +6 -0
  337. package/dist/esm/chat-assets-bd8778d5.js.map +1 -0
  338. package/dist/esm/chat-creds-ff086f05.js +35 -0
  339. package/dist/esm/chat-creds-ff086f05.js.map +1 -0
  340. package/dist/esm/chat-document-message-bubble.entry.js +20 -0
  341. package/dist/esm/chat-document-message-bubble.entry.js.map +1 -0
  342. package/dist/esm/chat-image-message-bubble.entry.js +22 -0
  343. package/dist/esm/chat-image-message-bubble.entry.js.map +1 -0
  344. package/dist/esm/chat-video-message-bubble.entry.js +20 -0
  345. package/dist/esm/chat-video-message-bubble.entry.js.map +1 -0
  346. package/dist/esm/content-5aea5e39.js +79 -0
  347. package/dist/esm/content-5aea5e39.js.map +1 -0
  348. package/dist/esm/dialog-drawer-9fa083b1.js +5304 -0
  349. package/dist/esm/dialog-drawer-9fa083b1.js.map +1 -0
  350. package/dist/esm/forward-memebers.entry.js +124 -0
  351. package/dist/esm/forward-memebers.entry.js.map +1 -0
  352. package/dist/esm/group-members-bb3c8db7.js +37 -0
  353. package/dist/esm/group-members-bb3c8db7.js.map +1 -0
  354. package/dist/esm/groupcast-d1c54a27.js +187 -0
  355. package/dist/esm/groupcast-d1c54a27.js.map +1 -0
  356. package/dist/esm/imagePlaceholder-e544f70b.js +4360 -0
  357. package/dist/esm/imagePlaceholder-e544f70b.js.map +1 -0
  358. package/dist/esm/index-fddf30b7.js +3093 -0
  359. package/dist/esm/index-fddf30b7.js.map +1 -0
  360. package/dist/esm/index.js +139 -0
  361. package/dist/esm/index.js.map +1 -0
  362. package/dist/esm/isometrik-webchat.js +49 -0
  363. package/dist/esm/isometrik-webchat.js.map +1 -0
  364. package/dist/esm/loader.js +13 -0
  365. package/dist/esm/loader.js.map +1 -0
  366. package/dist/esm/login-page.entry.js +81 -0
  367. package/dist/esm/login-page.entry.js.map +1 -0
  368. package/dist/esm/member-add.entry.js +118 -0
  369. package/dist/esm/member-add.entry.js.map +1 -0
  370. package/dist/esm/message-reaction-ad47ea1a.js +20 -0
  371. package/dist/esm/message-reaction-ad47ea1a.js.map +1 -0
  372. package/dist/esm/my-component.entry.js +25 -0
  373. package/dist/esm/my-component.entry.js.map +1 -0
  374. package/dist/esm/reaction-container.entry.js +48 -0
  375. package/dist/esm/reaction-container.entry.js.map +1 -0
  376. package/dist/esm/shadow-css-7ad5caf8.js +334 -0
  377. package/dist/esm/shadow-css-7ad5caf8.js.map +1 -0
  378. package/dist/esm/signup-page.entry.js +139 -0
  379. package/dist/esm/signup-page.entry.js.map +1 -0
  380. package/dist/esm/taguser-e9032d65.js +510 -0
  381. package/dist/esm/taguser-e9032d65.js.map +1 -0
  382. package/dist/esm/theme-provider_2.entry.js +108 -0
  383. package/dist/esm/theme-provider_2.entry.js.map +1 -0
  384. package/dist/esm/toast-helper-840fd8dc.js +82 -0
  385. package/dist/esm/toast-helper-840fd8dc.js.map +1 -0
  386. package/dist/esm/utils-11fcde98.js +7 -0
  387. package/dist/esm/utils-11fcde98.js.map +1 -0
  388. package/dist/index.cjs.js +1 -0
  389. package/dist/index.js +1 -0
  390. package/dist/isometrik-webchat/index.esm.js +2 -0
  391. package/dist/isometrik-webchat/index.esm.js.map +1 -0
  392. package/dist/isometrik-webchat/isometrik-webchat.css +2 -0
  393. package/dist/isometrik-webchat/isometrik-webchat.esm.js +2 -0
  394. package/dist/isometrik-webchat/isometrik-webchat.esm.js.map +1 -0
  395. package/dist/isometrik-webchat/p-12774661.js +2 -0
  396. package/dist/isometrik-webchat/p-12774661.js.map +1 -0
  397. package/dist/isometrik-webchat/p-12e56271.js +549 -0
  398. package/dist/isometrik-webchat/p-12e56271.js.map +1 -0
  399. package/dist/isometrik-webchat/p-1415e589.js +2 -0
  400. package/dist/isometrik-webchat/p-1415e589.js.map +1 -0
  401. package/dist/isometrik-webchat/p-18f8d210.js +13 -0
  402. package/dist/isometrik-webchat/p-18f8d210.js.map +1 -0
  403. package/dist/isometrik-webchat/p-1b2461f4.js +357 -0
  404. package/dist/isometrik-webchat/p-1b2461f4.js.map +1 -0
  405. package/dist/isometrik-webchat/p-229095d4.js +2 -0
  406. package/dist/isometrik-webchat/p-229095d4.js.map +1 -0
  407. package/dist/isometrik-webchat/p-2953d06a.entry.js +2 -0
  408. package/dist/isometrik-webchat/p-2953d06a.entry.js.map +1 -0
  409. package/dist/isometrik-webchat/p-3004a123.js +2 -0
  410. package/dist/isometrik-webchat/p-3004a123.js.map +1 -0
  411. package/dist/isometrik-webchat/p-3044698a.js +2 -0
  412. package/dist/isometrik-webchat/p-3044698a.js.map +1 -0
  413. package/dist/isometrik-webchat/p-40517d7f.js +1098 -0
  414. package/dist/isometrik-webchat/p-40517d7f.js.map +1 -0
  415. package/dist/isometrik-webchat/p-42a62cf2.js +2 -0
  416. package/dist/isometrik-webchat/p-42a62cf2.js.map +1 -0
  417. package/dist/isometrik-webchat/p-48e1d174.js +45 -0
  418. package/dist/isometrik-webchat/p-48e1d174.js.map +1 -0
  419. package/dist/isometrik-webchat/p-48e243ec.entry.js +2 -0
  420. package/dist/isometrik-webchat/p-48e243ec.entry.js.map +1 -0
  421. package/dist/isometrik-webchat/p-4d2aca06.js +257 -0
  422. package/dist/isometrik-webchat/p-4d2aca06.js.map +1 -0
  423. package/dist/isometrik-webchat/p-610bfd8a.js +2 -0
  424. package/dist/isometrik-webchat/p-610bfd8a.js.map +1 -0
  425. package/dist/isometrik-webchat/p-674e4bb0.js +9 -0
  426. package/dist/isometrik-webchat/p-674e4bb0.js.map +1 -0
  427. package/dist/isometrik-webchat/p-8490e13d.js +192 -0
  428. package/dist/isometrik-webchat/p-8490e13d.js.map +1 -0
  429. package/dist/isometrik-webchat/p-858b0da8.entry.js +2 -0
  430. package/dist/isometrik-webchat/p-858b0da8.entry.js.map +1 -0
  431. package/dist/isometrik-webchat/p-89108249.entry.js +5010 -0
  432. package/dist/isometrik-webchat/p-89108249.entry.js.map +1 -0
  433. package/dist/isometrik-webchat/p-8dcdea59.js +2963 -0
  434. package/dist/isometrik-webchat/p-8dcdea59.js.map +1 -0
  435. package/dist/isometrik-webchat/p-92d0b21c.js +2 -0
  436. package/dist/isometrik-webchat/p-92d0b21c.js.map +1 -0
  437. package/dist/isometrik-webchat/p-ada9c8e8.entry.js +2 -0
  438. package/dist/isometrik-webchat/p-ada9c8e8.entry.js.map +1 -0
  439. package/dist/isometrik-webchat/p-adbb398d.entry.js +2 -0
  440. package/dist/isometrik-webchat/p-adbb398d.entry.js.map +1 -0
  441. package/dist/isometrik-webchat/p-b07dd267.js +2 -0
  442. package/dist/isometrik-webchat/p-b07dd267.js.map +1 -0
  443. package/dist/isometrik-webchat/p-bf0aeb22.entry.js +2 -0
  444. package/dist/isometrik-webchat/p-bf0aeb22.entry.js.map +1 -0
  445. package/dist/isometrik-webchat/p-bfd51dd4.entry.js +2 -0
  446. package/dist/isometrik-webchat/p-bfd51dd4.entry.js.map +1 -0
  447. package/dist/isometrik-webchat/p-c50aa410.entry.js +2 -0
  448. package/dist/isometrik-webchat/p-c50aa410.entry.js.map +1 -0
  449. package/dist/isometrik-webchat/p-cd34448c.entry.js +2 -0
  450. package/dist/isometrik-webchat/p-cd34448c.entry.js.map +1 -0
  451. package/dist/isometrik-webchat/p-d4b8ece6.entry.js +2 -0
  452. package/dist/isometrik-webchat/p-d4b8ece6.entry.js.map +1 -0
  453. package/dist/isometrik-webchat/p-de8a8642.js +197 -0
  454. package/dist/isometrik-webchat/p-de8a8642.js.map +1 -0
  455. package/dist/isometrik-webchat/p-e09b32eb.js +591 -0
  456. package/dist/isometrik-webchat/p-e09b32eb.js.map +1 -0
  457. package/dist/isometrik-webchat/p-e1255160.js +2 -0
  458. package/dist/isometrik-webchat/p-e1255160.js.map +1 -0
  459. package/dist/isometrik-webchat/p-e3731295.js +274 -0
  460. package/dist/isometrik-webchat/p-e3731295.js.map +1 -0
  461. package/dist/isometrik-webchat/p-e4efea64.entry.js +2 -0
  462. package/dist/isometrik-webchat/p-e4efea64.entry.js.map +1 -0
  463. package/dist/isometrik-webchat/p-ef6e482a.entry.js +2 -0
  464. package/dist/isometrik-webchat/p-ef6e482a.entry.js.map +1 -0
  465. package/dist/isometrik-webchat/p-f1f5d5bd.js +3 -0
  466. package/dist/isometrik-webchat/p-f1f5d5bd.js.map +1 -0
  467. package/dist/isometrik-webchat/p-ff9f3dfe.js +203 -0
  468. package/dist/isometrik-webchat/p-ff9f3dfe.js.map +1 -0
  469. package/dist/loader/cdn.js +1 -0
  470. package/dist/loader/index.cjs.js +1 -0
  471. package/dist/loader/index.d.ts +24 -0
  472. package/dist/loader/index.es2017.js +1 -0
  473. package/dist/loader/index.js +2 -0
  474. package/dist/loader/package.json +11 -0
  475. package/dist/types/app-root.d.ts +0 -0
  476. package/dist/types/components/ChatUIComponent/AddMember.d.ts +13 -0
  477. package/dist/types/components/ChatUIComponent/AudioBubble.d.ts +39 -0
  478. package/dist/types/components/ChatUIComponent/BlockChatList.d.ts +13 -0
  479. package/dist/types/components/ChatUIComponent/ChatDocumentMessageBubble.d.ts +5 -0
  480. package/dist/types/components/ChatUIComponent/ChatImageMessageBubble.d.ts +5 -0
  481. package/dist/types/components/ChatUIComponent/ChatOwnProfile/Profile.d.ts +42 -0
  482. package/dist/types/components/ChatUIComponent/ChatSidebar/ChatSidebar.d.ts +85 -0
  483. package/dist/types/components/ChatUIComponent/ChatVideoMessageBubble.d.ts +5 -0
  484. package/dist/types/components/ChatUIComponent/Footer/ChatFooter.d.ts +154 -0
  485. package/dist/types/components/ChatUIComponent/ForwardMessageList.d.ts +15 -0
  486. package/dist/types/components/ChatUIComponent/GroupCast.d.ts +26 -0
  487. package/dist/types/components/ChatUIComponent/Header/WebChatHeader.d.ts +45 -0
  488. package/dist/types/components/ChatUIComponent/ReactionContainer.d.ts +12 -0
  489. package/dist/types/components/ChatUIComponent/WebChatBody/WebChatBody.d.ts +120 -0
  490. package/dist/types/components/Login.d.ts +13 -0
  491. package/dist/types/components/Signup.d.ts +17 -0
  492. package/dist/types/components/chat-main.d.ts +15 -0
  493. package/dist/types/components/my-component/my-component.d.ts +16 -0
  494. package/dist/types/components/my-component/web-chat/WebchatRightSide.d.ts +42 -0
  495. package/dist/types/components/theme-provider.d.ts +44 -0
  496. package/dist/types/components.d.ts +838 -0
  497. package/dist/types/index.d.ts +37 -0
  498. package/dist/types/stencil-public-runtime.d.ts +1678 -0
  499. package/dist/types/store/conversation.d.ts +17 -0
  500. package/dist/types/store/group-members.d.ts +18 -0
  501. package/dist/types/store/unread-count.d.ts +10 -0
  502. package/dist/types/stories/Components/Toaster/toast-helper.d.ts +8 -0
  503. package/dist/types/types/ConversationDetailsTypes.d.ts +52 -0
  504. package/dist/types/utils/getFomattedDate.d.ts +1 -0
  505. package/dist/types/utils/utils.d.ts +1 -0
  506. package/package.json +89 -0
  507. package/readme.md +569 -0
@@ -0,0 +1,1491 @@
1
+ import { css, html, LitElement } from 'lit';
2
+ import { styleMap } from 'lit/directives/style-map.js';
3
+ // import '../ChatTile/ChatTile';
4
+ import '../ContactTile/ContactTile';
5
+ import { Image } from '../Image/Image';
6
+ import './MediaList';
7
+ import { generateProfileImageByInitials } from '../../../lib/helpers';
8
+ import { WEB_CONTENT } from '../../../constants/content';
9
+ import '../MembersList/MembersList';
10
+ import { groupMembersStore } from '../../../store/group-members';
11
+ import '../../../stories/Components/MessageBubble/LinkMessageBubble/LinkMessageBubble';
12
+ import { drawerDialogService } from '../Dialog-Drawer/dialog-drawer';
13
+ import {getGroupcastUrlQuery} from '../../../lib/helpers'
14
+ class ContactInfo extends LitElement {
15
+ static properties = {
16
+ //strings
17
+ padding: { type: String },
18
+ margin: { type: String },
19
+ width: { type: String },
20
+ boxShadow: { type: String },
21
+ height: { type: String },
22
+ borderRadius: { type: String },
23
+ borderWidth: { type: String },
24
+ borderColor: { type: String },
25
+ borderStyle: { type: String },
26
+ backgroundColor: { type: String },
27
+ textColor: { type: String },
28
+ fontSize: { type: String },
29
+ fontWeight: { type: String },
30
+ fontFamily: { type: String },
31
+ fontStyle: { type: String },
32
+ lineHeight: { type: String },
33
+ textAlign: { type: String },
34
+ contactImage: { type: String },
35
+ contactName: { type: String },
36
+ contactEmail: { type: String },
37
+ messageAction: { type: Object },
38
+
39
+ //arrays
40
+ groupMembers: { type: Array },
41
+ allAttachments: { type: Array },
42
+
43
+ //booleans
44
+ isGroup: { type: Boolean },
45
+ showAllMembers: { type: Boolean },
46
+ isPopupOpen: { type: Boolean },
47
+ showMediaList: { type: Boolean },
48
+ isImageFullscreen: { type: Boolean },
49
+ showConfirmationPopup: { type: Boolean },
50
+ confirmationAction: { type: String },
51
+ conversationId: { type: String, reflect: true, mutable: true },
52
+ oppenentId: { type: String, reflect: true },
53
+ userMetaData: { type: Object },
54
+ onEditTitle: { type: Function },
55
+ onEditImage: { type: Function },
56
+ onEditImage: { type: Function },
57
+ openOwnProfile: { type: Boolean },
58
+ editedName: { type: String },
59
+ eligibleMembers: { type: Array },
60
+ isEligibleMembersPopupOpen: { type: Boolean },
61
+ hasMoreEligibleMembers: { type: Boolean },
62
+ isLoadingMembers: { type: Boolean },
63
+ activeTab: { type: String },
64
+ docsAttachments: { type: Array },
65
+ linksAttachments: { type: Array },
66
+ allLinks: { type: Array },
67
+ allLinksCount: { type: Number },
68
+ isBlocked: { type: Boolean | String },
69
+ conversationMetaData: { type: Object },
70
+ isGroupcast: {type: Boolean},
71
+ groupcastId: {type: String},
72
+ groupcastMembers: {type: Array}
73
+ };
74
+
75
+ static styles = css`
76
+ :host {
77
+ width: 100%;
78
+ }
79
+ .contact-info-container {
80
+ display: flex;
81
+ flex-direction: column;
82
+ overflow: hidden;
83
+ height: 100%;
84
+ }
85
+ .popup-overlay {
86
+ position: fixed;
87
+ top: 0;
88
+ left: 0;
89
+ width: 100%;
90
+ height: 100%;
91
+ background-color: rgba(0, 0, 0, 0.6);
92
+ display: flex;
93
+ justify-content: center;
94
+ align-items: center;
95
+ z-index: 1000;
96
+ }
97
+ .popup-content {
98
+ background: var(--bg-primary-color);
99
+ padding: 14px;
100
+ border-radius: 8px;
101
+ width: 28%;
102
+ max-height: 80vh;
103
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
104
+ }
105
+ .popup-header {
106
+ display: flex;
107
+ justify-content: space-between;
108
+ align-items: center;
109
+ padding: 0px 16px;
110
+ }
111
+ .popup-body {
112
+ padding: 0 16px;
113
+ }
114
+
115
+ .popup-body-buttons {
116
+ display: flex;
117
+ justify-content: space-between;
118
+ gap: 10px;
119
+ }
120
+
121
+ .popup-body button {
122
+ border: none;
123
+ font-size: 16px;
124
+ color: var(--text-primary-color);
125
+ cursor: pointer;
126
+ width: 50%;
127
+ padding: 10px 0px;
128
+ }
129
+
130
+ .popup-body button:last-child {
131
+ background: transparent;
132
+ border: 1px solid var(--text-primary-color);
133
+ border-radius: 20px;
134
+ }
135
+ .popup-body button:first-child {
136
+ background: var(--text-primary-color);
137
+ border-radius: 20px;
138
+ }
139
+ .contact-info-header {
140
+ display: flex;
141
+ align-items: center;
142
+ gap: 10px;
143
+ padding: 20px;
144
+ font-size: 18px;
145
+ background: inherit;
146
+ position: sticky;
147
+ top: 0;
148
+ z-index: 10;
149
+ background: var(--bg-primary-color);
150
+ }
151
+
152
+ .contact-info-body {
153
+ display: flex;
154
+ flex-direction: column;
155
+ gap: 1.5rem;
156
+ background: inherit;
157
+ overflow-y: auto;
158
+ flex-grow: 1;
159
+ }
160
+
161
+ .contact-info-body::-webkit-scrollbar {
162
+ width: 4px;
163
+ }
164
+
165
+ .contact-info-body::-webkit-scrollbar-thumb {
166
+ background-color: var(--text-primary-color);
167
+ border-radius: 10px;
168
+ }
169
+
170
+ .contact-info-body::-webkit-scrollbar-track {
171
+ background: var(--bg-primary-color);
172
+ border-radius: 10px;
173
+ }
174
+
175
+ .contact-info {
176
+ display: flex;
177
+ align-items: center;
178
+ gap: 10px;
179
+ flex-direction: column;
180
+ padding: 1.5rem;
181
+ }
182
+
183
+ .contact-info-name {
184
+ display: flex;
185
+ flex-direction: column;
186
+ align-items: center;
187
+ }
188
+
189
+ .contact-info-name span:first-child {
190
+ font-size: 20px;
191
+ font-weight: 600;
192
+ max-width: 350px;
193
+ }
194
+
195
+ .contact-info-name span:last-child {
196
+ font-size: 16px;
197
+ font-weight: 400;
198
+ }
199
+ .contact-media {
200
+ padding: 16px;
201
+ background: inherit;
202
+ }
203
+
204
+ .contact-media-header {
205
+ display: flex;
206
+ align-items: center;
207
+ justify-content: space-between;
208
+ font-size: 18px;
209
+ }
210
+ contact-media-header-label {
211
+ font-size: 14px;
212
+ }
213
+
214
+ .contact-media-header-count {
215
+ display: flex;
216
+ align-items: center;
217
+ cursor: pointer;
218
+ }
219
+
220
+ .contact-media-body {
221
+ display: flex;
222
+ gap: 10px;
223
+ overflow: hidden;
224
+ padding: 10px;
225
+ }
226
+ .shimmer-loader {
227
+ width: 50%;
228
+ height: 40px;
229
+ position: relative;
230
+ overflow: hidden;
231
+ }
232
+
233
+ .shimmer-line {
234
+ position: absolute;
235
+ top: 0;
236
+ left: -100%;
237
+ width: 100%;
238
+ height: 100%;
239
+ background: linear-gradient(90deg, var(--bg-secondary-color) 25%, var(--bg-primary-light) 50%, var(--bg-secondary-color) 75%);
240
+ animation: shimmer 1.5s infinite;
241
+ }
242
+
243
+ @keyframes shimmer {
244
+ 0% {
245
+ left: -100%;
246
+ }
247
+ 100% {
248
+ left: 100%;
249
+ }
250
+ }
251
+ .members-list {
252
+ position: absolute;
253
+ top: 50%;
254
+ left: 50%;
255
+ transform: translate(-50%, -50%);
256
+ z-index: 1000;
257
+ width: 25%;
258
+ min-width: var(--sidebar-width);
259
+ }
260
+
261
+ .popup-members {
262
+ display: flex;
263
+ flex-direction: column;
264
+ gap: 10px;
265
+ max-height: calc(80vh - 50px);
266
+ overflow-y: auto;
267
+ }
268
+
269
+ .popup-members::-webkit-scrollbar {
270
+ width: 4px;
271
+ }
272
+
273
+ .popup-members::-webkit-scrollbar-track {
274
+ background: transparent;
275
+ }
276
+
277
+ .popup-members::-webkit-scrollbar-thumb {
278
+ background-color: var(--bg-primary-light);
279
+ border-radius: 3px;
280
+ }
281
+
282
+ .group-members-popup-actions {
283
+ display: flex;
284
+ align-items: center;
285
+ gap: 10px;
286
+ position: absolute;
287
+ bottom: 0px;
288
+ background: var(--bg-secondary-color);
289
+ z-index: 1;
290
+ padding: 10px;
291
+ left: 0;
292
+ margin: 10px;
293
+ width: -webkit-fill-available;
294
+ justify-content: center;
295
+ cursor: pointer;
296
+ }
297
+
298
+ .group-members-popup {
299
+ position: relative;
300
+ }
301
+
302
+ .group-members-header {
303
+ display: flex;
304
+ justify-content: space-between;
305
+ align-items: center;
306
+ padding: 0px 16px;
307
+ }
308
+
309
+ .group-members-header svg {
310
+ cursor: pointer;
311
+ }
312
+
313
+ .group-members {
314
+ padding: 16px;
315
+ background: inherit;
316
+ }
317
+
318
+ .close-btn {
319
+ background: none;
320
+ border: none;
321
+ font-size: 24px;
322
+ cursor: pointer;
323
+ }
324
+
325
+ .ctas {
326
+ display: flex;
327
+ flex-direction: column;
328
+ gap: 2px;
329
+ background: var(--bg-primary-color);
330
+ }
331
+
332
+ .ctas button {
333
+ border: none;
334
+ display: flex;
335
+ align-items: center;
336
+ gap: 10px;
337
+ padding: 20px;
338
+ cursor: pointer;
339
+ width: 100%;
340
+ font-size: 16px;
341
+ background: transparent;
342
+ color: var(--text-primary-color);
343
+ }
344
+
345
+ .ctas button:hover {
346
+ color: var(--base-color);
347
+ }
348
+
349
+ .fullscreen-image-container {
350
+ display: flex;
351
+ justify-content: center;
352
+ align-items: center;
353
+ width: 100%;
354
+ height: 100%;
355
+ }
356
+
357
+ .fullscreen-image-container img {
358
+ position: relative;
359
+ }
360
+
361
+ .contact-media-body img {
362
+ cursor: pointer;
363
+ }
364
+
365
+ .contact-media-body img:hover {
366
+ scale: 1.05;
367
+ }
368
+
369
+ .group-members chat-tile:hover {
370
+ background: var(--bg-primary-light);
371
+ cursor: pointer;
372
+ border-radius: 8px;
373
+ }
374
+
375
+ .popup-members chat-tile:hover {
376
+ background: var(--bg-primary-light);
377
+ cursor: pointer;
378
+ border-radius: 8px;
379
+ }
380
+
381
+ .profile-image-container {
382
+ position: relative;
383
+ cursor: pointer;
384
+ }
385
+
386
+ .profile-image-container:hover .image-edit-overlay {
387
+ opacity: 1;
388
+ }
389
+
390
+ .image-edit-overlay {
391
+ position: absolute;
392
+ top: 0;
393
+ left: 0;
394
+ right: 0;
395
+ bottom: 0;
396
+ background: rgba(0, 0, 0, 0.5);
397
+ border-radius: 50%;
398
+ display: flex;
399
+ align-items: center;
400
+ justify-content: center;
401
+ opacity: 0;
402
+ transition: opacity 0.3s ease;
403
+ }
404
+
405
+ .name-edit-input:focus {
406
+ background: var(--bg-primary-light);
407
+ }
408
+
409
+ .nav-container {
410
+ width: 100%;
411
+ background-color: var(--bg-secondary-color);
412
+ padding: 16px 0;
413
+ }
414
+
415
+ /* Inner container for max width */
416
+ .inner-container {
417
+ max-width: 1024px;
418
+ margin: 0 auto;
419
+ padding: 0 16px;
420
+ }
421
+
422
+ /* Tab styling */
423
+ .tabs {
424
+ display: flex;
425
+ gap: 32px;
426
+ }
427
+
428
+ /* Tab item styling */
429
+ .tab-item {
430
+ position: relative;
431
+ cursor: pointer;
432
+ }
433
+
434
+ /* Radio buttons (hidden) */
435
+ .tab-radio {
436
+ position: absolute;
437
+ opacity: 0;
438
+ cursor: pointer;
439
+ }
440
+
441
+ /* Tab labels */
442
+ .tab-label {
443
+ display: inline-block;
444
+ color: #9ca3af;
445
+ font-size: 18px;
446
+ padding: 4px 0;
447
+ transition: color 0.3s ease;
448
+ }
449
+
450
+ /* Underline indicator */
451
+ .tab-indicator {
452
+ position: absolute;
453
+ bottom: -16px;
454
+ left: 0;
455
+ width: 100%;
456
+ height: 4px;
457
+ background-color: var(--base-color);
458
+ transform: scaleX(0);
459
+ transition: transform 0.3s ease;
460
+ }
461
+
462
+ /* When radio is checked */
463
+ .tab-radio:checked + .tab-label {
464
+ color: var(--base-color);
465
+ }
466
+
467
+ .tab-radio:checked ~ .tab-indicator {
468
+ transform: scaleX(1);
469
+ }
470
+
471
+ /* Focus styles for accessibility */
472
+ .tab-radio:focus + .tab-label {
473
+ outline-offset: 2px;
474
+ }
475
+ .doc-item {
476
+ display: flex;
477
+ align-items: center;
478
+ background: var(--bg-primary-light);
479
+ margin: 8px 0;
480
+ padding: 12px;
481
+ border-radius: 8px;
482
+ cursor: pointer;
483
+ }
484
+
485
+ .doc-item:hover {
486
+ background: var(--bg-secondary-color);
487
+ }
488
+
489
+ .doc-icon {
490
+ margin-right: 12px;
491
+ width: 40px;
492
+ height: 40px;
493
+ display: flex;
494
+ align-items: center;
495
+ justify-content: center;
496
+ }
497
+
498
+ .doc-info {
499
+ flex-grow: 1;
500
+ overflow: hidden;
501
+ }
502
+
503
+ .doc-name {
504
+ font-weight: 500;
505
+ white-space: nowrap;
506
+ overflow: hidden;
507
+ text-overflow: ellipsis;
508
+ margin-bottom: 4px;
509
+ }
510
+
511
+ .doc-meta {
512
+ display: flex;
513
+ font-size: 12px;
514
+ color: var(--text-secondary-color);
515
+ }
516
+
517
+ /* Link item styles */
518
+ .link-item {
519
+ display: flex;
520
+ margin: 8px 0;
521
+ border-radius: 8px;
522
+ overflow: hidden;
523
+ text-decoration: none;
524
+ color: inherit;
525
+ }
526
+
527
+ .link-item:hover {
528
+ background: var(--bg-secondary-color);
529
+ }
530
+
531
+ .link-preview {
532
+ width: 100%;
533
+ height: 100%;
534
+ display: flex;
535
+ align-items: center;
536
+ justify-content: center;
537
+ }
538
+
539
+ .link-info {
540
+ padding: 12px;
541
+ flex-grow: 1;
542
+ overflow: hidden;
543
+ }
544
+
545
+ .link-title {
546
+ font-weight: 500;
547
+ margin-bottom: 4px;
548
+ white-space: nowrap;
549
+ overflow: hidden;
550
+ text-overflow: ellipsis;
551
+ }
552
+
553
+ .link-url {
554
+ font-size: 12px;
555
+ color: var(--text-secondary-color);
556
+ white-space: nowrap;
557
+ overflow: hidden;
558
+ text-overflow: ellipsis;
559
+ }
560
+
561
+ .no-content {
562
+ display: flex;
563
+ flex-direction: column;
564
+ align-items: center;
565
+ justify-content: center;
566
+ height: 200px;
567
+ color: var(--text-secondary-color);
568
+ text-align: center;
569
+ padding: 0 20px;
570
+ }
571
+
572
+ .no-content svg {
573
+ margin-bottom: 16px;
574
+ opacity: 0.5;
575
+ }
576
+
577
+ /* Month separator */
578
+ .month-separator {
579
+ font-size: 14px;
580
+ font-weight: 500;
581
+ margin: 24px 0 12px 0;
582
+ padding-left: 8px;
583
+ }
584
+
585
+ .shimmer {
586
+ background: linear-gradient(90deg, var(--bg-secondary-color) 25%, var(--bg-primary-light) 50%, var(--bg-secondary-color) 75%);
587
+ background-size: 200% 100%;
588
+ animation: shimmer 1.5s infinite linear;
589
+ }
590
+
591
+ .member-shimmer {
592
+ height: 60px;
593
+ border-radius: 8px;
594
+ margin: 8px 16px;
595
+ opacity: 0.7;
596
+ }
597
+
598
+ @keyframes shimmer {
599
+ 0% {
600
+ background-position: 100% 0;
601
+ }
602
+ 100% {
603
+ background-position: -100% 0;
604
+ }
605
+ }
606
+ `;
607
+
608
+ constructor() {
609
+ super();
610
+ this.lastConversationId = null;
611
+ this.isEditingName = false;
612
+ this.editedName = '';
613
+ this.isLoadingMembers = true;
614
+ this.activeTab = 'media';
615
+ this.conversationMetaData = {};
616
+ // Sample data for docs and links
617
+ this.docsAttachments = [];
618
+ this.linksAttachments = [];
619
+
620
+ const urlParams = new URLSearchParams(window.location.search);
621
+ this.isGroupcast = urlParams.has('groupcast')
622
+ this.groupcastId = urlParams.get('groupcast')
623
+ }
624
+ willUpdate(changedProperties) {
625
+ if (changedProperties.has('conversationId')) {
626
+ this.handleConversationIdChange(this.conversationId, changedProperties.get('conversationId'));
627
+ }
628
+ if (changedProperties.has('groupMembers')) {
629
+ const newConversationId = this.getConversationIdFromUrl();
630
+ groupMembersStore.initializeMembers(this.groupMembers, newConversationId);
631
+ }
632
+ }
633
+
634
+ handleConversationIdChange(newValue, oldValue) {
635
+ if (newValue !== groupMembersStore.getCurrentConversationId()) {
636
+ this.isLoadingMembers = true;
637
+ groupMembersStore.initializeMembers(this.groupMembers, newValue);
638
+ }
639
+
640
+ const newConversationId = this.getConversationIdFromUrl();
641
+ if (this.lastConversationId && this.lastConversationId !== newConversationId) {
642
+ this._handleClose();
643
+ }
644
+
645
+ this.lastConversationId = newConversationId;
646
+ }
647
+
648
+ toggleShowAllMembers() {
649
+ this.showAllMembers = !this.showAllMembers;
650
+ }
651
+
652
+ showMembersPopup() {
653
+ this.isPopupOpen = true;
654
+ }
655
+
656
+ closeMembersPopup() {
657
+ this.isPopupOpen = false;
658
+ }
659
+
660
+ toggleMediaList() {
661
+ this.showMediaList = !this.showMediaList;
662
+ }
663
+
664
+ toggleImageFullscreen() {
665
+ this.isImageFullscreen = !this.isImageFullscreen;
666
+ }
667
+
668
+ _handleClose() {
669
+ if (this.showMediaList) {
670
+ this.showMediaList = false;
671
+ return;
672
+ }
673
+ this.dispatchEvent(
674
+ new CustomEvent('close-right-Sidebar', {
675
+ detail: {
676
+ type: 'close-right-Sidebar',
677
+ },
678
+ bubbles: true,
679
+ composed: true,
680
+ }),
681
+ );
682
+ }
683
+
684
+ getConversationIdFromUrl() {
685
+ const url = new URL(window.location.href);
686
+ return url.searchParams.get('conversation');
687
+ }
688
+
689
+ exitGroup() {
690
+ this.dispatchEvent(
691
+ new CustomEvent('contact-action', {
692
+ detail: {
693
+ action: 'exit-group',
694
+ conversationId: this.conversationId,
695
+ },
696
+ bubbles: true,
697
+ composed: true,
698
+ }),
699
+ );
700
+ }
701
+
702
+ clearChat() {
703
+ this.dispatchEvent(
704
+ new CustomEvent('contact-action', {
705
+ detail: {
706
+ action: 'clear-chat',
707
+ conversationId: this.conversationId,
708
+ },
709
+ bubbles: true,
710
+ composed: true,
711
+ }),
712
+ );
713
+ }
714
+
715
+ blockContact() {
716
+ this.dispatchEvent(
717
+ new CustomEvent('contact-action', {
718
+ detail: {
719
+ action: 'block-contact',
720
+ oppenentId: this.oppenentId,
721
+ userName: this.contactName,
722
+ },
723
+ bubbles: true,
724
+ composed: true,
725
+ }),
726
+ );
727
+ }
728
+ unblockContact() {
729
+ this.dispatchEvent(
730
+ new CustomEvent('contact-action', {
731
+ detail: {
732
+ action: 'unblock-contact',
733
+ oppenentId: this.oppenentId,
734
+ userName: this.contactName,
735
+ },
736
+ bubbles: true,
737
+ composed: true,
738
+ }),
739
+ );
740
+ }
741
+
742
+ deleteChat() {
743
+ this.dispatchEvent(
744
+ new CustomEvent('contact-action', {
745
+ detail: {
746
+ action: 'delete-chat',
747
+ conversationId: this.conversationId,
748
+ },
749
+ bubbles: true,
750
+ composed: true,
751
+ }),
752
+ );
753
+ }
754
+
755
+ deleteGroupcast() {
756
+ const urlParams = new URLSearchParams(window.location.search);
757
+ const groupcastId = urlParams.get('groupcast');
758
+
759
+ this.dispatchEvent(
760
+ new CustomEvent('delete-groupcast', {
761
+ detail: {
762
+ groupcastId: groupcastId,
763
+ conversationId: this.conversationId,
764
+ },
765
+ bubbles: true,
766
+ composed: true,
767
+ }),
768
+ );
769
+
770
+ drawerDialogService.closeDialog();
771
+ this._handleClose()
772
+ }
773
+ openConfirmationPopup(action, title) {
774
+ drawerDialogService.openDialog('confirm-dialog', {
775
+ title: `${title}`,
776
+ description: `Are you sure you want to ${title} ?`,
777
+ handleConfirm: () => this.confirmAction(action),
778
+ });
779
+ }
780
+
781
+ closeConfirmationPopup() {
782
+ this.showConfirmationPopup = false;
783
+ this._handleClose();
784
+ }
785
+
786
+ confirmAction(action) {
787
+ switch (action) {
788
+ case 'delete-groupcast':
789
+ this.deleteGroupcast();
790
+ break;
791
+ case 'delete-chat':
792
+ this.deleteChat();
793
+ break;
794
+ case 'exit-group':
795
+ this.exitGroup();
796
+ break;
797
+ case 'clear-chat':
798
+ this.clearChat();
799
+ break;
800
+ case 'block-contact':
801
+ this.blockContact();
802
+ break;
803
+ case 'unblock-contact':
804
+ this.unblockContact();
805
+ break;
806
+ // Add more cases if needed
807
+ }
808
+ this.closeConfirmationPopup();
809
+ }
810
+
811
+ _handleKebabMenuClick(e) {
812
+ e.stopPropagation();
813
+ }
814
+
815
+ shouldShowMemberActions(memberId) {
816
+ const currentUserMember = this.groupMembers?.find(m => m.userId === this.userMetaData?.userId);
817
+ return currentUserMember?.isAdmin ? this.userMetaData?.userId !== memberId : false;
818
+ }
819
+
820
+ handleNameClick() {
821
+ if (this.isGroup || this.isGroupcast) {
822
+ this.isEditingName = true;
823
+ this.editedName = this.contactName;
824
+ setTimeout(() => {
825
+ const input = this.shadowRoot.querySelector('.name-edit-input');
826
+ if (input) {
827
+ input.focus();
828
+ input.select();
829
+ }
830
+ }, 0);
831
+ }
832
+ }
833
+
834
+ handleNameInputKeyDown(e) {
835
+ if (e.key === 'Enter') {
836
+ this.saveName();
837
+ } else if (e.key === 'Escape') {
838
+ this.isEditingName = false;
839
+ }
840
+ }
841
+
842
+ saveName() {
843
+ if (this.editedName.trim() && this.editedName !== this.contactName) {
844
+ const oldName = this.contactName;
845
+ this.contactName = this.editedName.trim();
846
+
847
+ this.dispatchEvent(
848
+ new CustomEvent('edit-title', {
849
+ detail: {
850
+ currentTitle: oldName,
851
+ newTitle: this.editedName.trim(),
852
+ conversationId: this.conversationId,
853
+ onError: () => {
854
+ // Revert on error
855
+ this.contactName = oldName;
856
+ },
857
+ },
858
+ bubbles: true,
859
+ composed: true,
860
+ }),
861
+ );
862
+ }
863
+ this.isEditingName = false;
864
+ }
865
+
866
+ handleImageClick() {
867
+ if (this.isGroup || this.isGroupcast) {
868
+ const input = document.createElement('input');
869
+ input.type = 'file';
870
+ input.accept = 'image/*';
871
+ input.onchange = e => {
872
+ const file = e.target.files?.[0];
873
+ if (file) {
874
+ const tempImageUrl = URL.createObjectURL(file);
875
+ const oldImage = this.contactImage;
876
+
877
+ this.contactImage = tempImageUrl;
878
+
879
+ this.dispatchEvent(
880
+ new CustomEvent('edit-image', {
881
+ detail: {
882
+ currentImage: oldImage,
883
+ conversationId: this.conversationId,
884
+ file: file,
885
+ onError: () => {
886
+ this.contactImage = oldImage;
887
+ URL.revokeObjectURL(tempImageUrl);
888
+ },
889
+ onSuccess: () => {
890
+ URL.revokeObjectURL(tempImageUrl);
891
+ },
892
+ },
893
+ bubbles: true,
894
+ composed: true,
895
+ }),
896
+ );
897
+ }
898
+ };
899
+ input.click();
900
+ }
901
+ }
902
+
903
+ handleAddMembersClick(e) {
904
+ e.stopPropagation();
905
+ drawerDialogService.openDialog('member-add', {
906
+ title: 'Eligible Members',
907
+ width: '100%',
908
+ fontSize: '16px',
909
+ textColor: 'var(--text-primary-color)',
910
+ selectedConversationId: this.isGroupcast ? this.groupcastId : this.conversationId,
911
+ isGroupcast: this.isGroupcast
912
+ });
913
+ }
914
+
915
+ extractAttachmentsByType() {
916
+ // Reset arrays
917
+ this.docsAttachments = [];
918
+ this.linksAttachments = [];
919
+ if (!this.allAttachments || !this.allAttachments.length) return;
920
+ this.allAttachments.forEach(attachment => {
921
+ attachment?.attachments?.forEach(att => {
922
+ if (att.mediaType === 3) {
923
+ // Document type
924
+ this.docsAttachments.push({
925
+ ...att,
926
+ date: attachment.sentAt,
927
+ sender: attachment?.senderInfo?.userName,
928
+ });
929
+ } else if (attachment?.customType === 'AttachmentMessage:Link') {
930
+ // Link type
931
+ this.linksAttachments.push({
932
+ ...att,
933
+ date: attachment.sentAt,
934
+ sender: attachment?.senderInfo?.userName,
935
+ });
936
+ }
937
+ });
938
+ });
939
+
940
+ // Sort by date
941
+ this.docsAttachments.sort((a, b) => new Date(b.date) - new Date(a.date));
942
+ this.linksAttachments.sort((a, b) => new Date(b.date) - new Date(a.date));
943
+
944
+ this.requestUpdate();
945
+ }
946
+
947
+ updated(changedProperties) {
948
+ // Existing updated logic
949
+ super.updated(changedProperties);
950
+
951
+ // Add extraction of docs and links when attachments are updated
952
+ if (changedProperties.has('allAttachments')) {
953
+ this.extractAttachmentsByType();
954
+ }
955
+ }
956
+
957
+ switchTab(tab) {
958
+ this.activeTab = tab;
959
+ }
960
+
961
+ formatFileSize(bytes) {
962
+ if (!bytes) return '0 B';
963
+ const k = 1024;
964
+ const sizes = ['B', 'KB', 'MB', 'GB'];
965
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
966
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
967
+ }
968
+
969
+ formatDate(timestamp) {
970
+ if (!timestamp) return '';
971
+ const date = new Date(timestamp);
972
+ return date.toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric' });
973
+ }
974
+
975
+ getMonthYear(timestamp) {
976
+ if (!timestamp) return '';
977
+ const date = new Date(timestamp);
978
+ return date.toLocaleDateString('en-US', { month: 'long', year: 'numeric' });
979
+ }
980
+
981
+ groupByMonth(items, isLinks = false) {
982
+ const groups = {};
983
+ items.forEach(item => {
984
+ const monthYear = this.getMonthYear(isLinks ? item.sentAt : item.date);
985
+ if (!groups[monthYear]) {
986
+ groups[monthYear] = [];
987
+ }
988
+ groups[monthYear].push(item);
989
+ });
990
+
991
+ return groups;
992
+ }
993
+
994
+ renderNoContent(title, subtitle) {
995
+ return html`
996
+ <div class="tab-content active">
997
+ <div class="no-content">
998
+ <svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 0 24 24" width="48" fill="currentColor">
999
+ <path d="M0 0h24v24H0V0z" fill="none" />
1000
+ <path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z" />
1001
+ </svg>
1002
+ <h3 style="margin: 0 0 8px 0;">${title}</h3>
1003
+ <p style="margin: 0;">${subtitle}</p>
1004
+ </div>
1005
+ </div>
1006
+ `;
1007
+ }
1008
+
1009
+ renderTabContent() {
1010
+ if (this.activeTab === 'media') {
1011
+ const mediaFromAttachments = [];
1012
+ this.allAttachments?.forEach(attachment => {
1013
+ attachment?.attachments?.forEach(att => {
1014
+ if (att?.mediaUrl && (att.mediaType === 0 || att.mediaType === 1 || att.mediaType === 2)) {
1015
+ // Image/video type
1016
+ mediaFromAttachments.push(att.mediaUrl);
1017
+ }
1018
+ });
1019
+ });
1020
+ if (!mediaFromAttachments.length) {
1021
+ return this.renderNoContent('No Media', 'Share media with this chat to see them here.');
1022
+ }
1023
+
1024
+ return html`
1025
+ <div class="tab-content active">
1026
+ <media-list
1027
+ .mediaArray=${mediaFromAttachments}
1028
+ padding="10px"
1029
+ bgColor=${this.backgroundColor}
1030
+ color=${this.textColor}
1031
+ style="width: 100%"
1032
+ borderRadius="10px"
1033
+ height="calc(100vh - 100px)"
1034
+ ></media-list>
1035
+ </div>
1036
+ `;
1037
+ } else if (this.activeTab === 'docs') {
1038
+ if (!this.docsAttachments.length) {
1039
+ return this.renderNoContent('No Documents', 'Share documents with this chat to see them here.');
1040
+ }
1041
+
1042
+ const docsByMonth = this.groupByMonth(this.docsAttachments);
1043
+
1044
+ return html`
1045
+ <div class="tab-content active">
1046
+ ${Object.keys(docsByMonth).map(
1047
+ month => html`
1048
+ <div class="month-separator">${month}</div>
1049
+ ${docsByMonth[month].map(
1050
+ doc => html`
1051
+ <div class="doc-item" @click=${() => window.open(doc.mediaUrl, '_blank')}>
1052
+ <div class="doc-icon">
1053
+ <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="currentColor">
1054
+ <path d="M0 0h24v24H0V0z" fill="none" />
1055
+ <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM16 18H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z" />
1056
+ </svg>
1057
+ </div>
1058
+ <div class="doc-info">
1059
+ <div class="doc-name">${doc.name || 'Document'}</div>
1060
+ <div class="doc-meta">
1061
+ <span>${this.formatFileSize(doc.size)}</span>
1062
+ <span style="margin: 0 6px;">•</span>
1063
+ <span>${this.formatDate(doc.date)}</span>
1064
+ </div>
1065
+ </div>
1066
+ </div>
1067
+ `,
1068
+ )}
1069
+ `,
1070
+ )}
1071
+ </div>
1072
+ `;
1073
+ } else if (this.activeTab === 'links') {
1074
+ if (!this.allLinks?.length) {
1075
+ return this.renderNoContent('No Links', 'URLs shared in this chat will appear here.');
1076
+ }
1077
+
1078
+ const linksByMonth = this.groupByMonth(this.allLinks, true);
1079
+
1080
+ return html`
1081
+ <div class="tab-content active">
1082
+ ${Object.keys(linksByMonth).map(
1083
+ month => html`
1084
+ <div class="month-separator">${month}</div>
1085
+ ${linksByMonth[month].map(
1086
+ link => html`
1087
+ <a href=${link.body} target="_blank" class="link-item">
1088
+ <div class="link-preview">
1089
+ <link-preview .showReactionOnHover=${false} url=${link.body} time=${link.sentAt}></link-preview>
1090
+ </div>
1091
+ </a>
1092
+ `,
1093
+ )}
1094
+ `,
1095
+ )}
1096
+ </div>
1097
+ `;
1098
+ }
1099
+ }
1100
+ openProfile(member) {
1101
+ if (this.isPopupOpen) {
1102
+ this.isPopupOpen = false;
1103
+ }
1104
+ if (member.userId === this.userMetaData?.userId) {
1105
+ this.openOwnProfile();
1106
+ } else {
1107
+ this.dispatchEvent(
1108
+ new CustomEvent('open-right-Sidebar', {
1109
+ detail: {
1110
+ type: 'open-right-Sidebar',
1111
+ renderComponent: 'profile-info',
1112
+ userId: member.userId,
1113
+ userName: member.userName,
1114
+ },
1115
+ bubbles: true,
1116
+ composed: true,
1117
+ }),
1118
+ );
1119
+ }
1120
+ }
1121
+ render() {
1122
+ const headerFontSize = `calc(${this.fontSize} - 4px)`;
1123
+ const mediaFromAttachments = [];
1124
+ this.allAttachments?.forEach(attachment => {
1125
+ attachment?.attachments?.forEach(att => {
1126
+ if (att?.mediaUrl) {
1127
+ mediaFromAttachments.push(att.mediaUrl);
1128
+ }
1129
+ });
1130
+ });
1131
+ const members = groupMembersStore.getMembers();
1132
+ this.isLoadingMembers = !members;
1133
+
1134
+ const urlParams = new URLSearchParams(window.location.search);
1135
+ const isGroupcast = urlParams.has('groupcast');
1136
+
1137
+ return html`
1138
+ <div
1139
+ class="contact-info-container"
1140
+ style=${styleMap({
1141
+ padding: this.padding,
1142
+ margin: this.margin,
1143
+ width: this.width,
1144
+ height: this.height,
1145
+ borderRadius: this.borderRadius,
1146
+ borderWidth: this.borderWidth,
1147
+ borderColor: this.borderColor,
1148
+ borderStyle: this.borderStyle,
1149
+ backgroundColor: this.backgroundColor,
1150
+ color: this.textColor,
1151
+ fontSize: this.fontSize,
1152
+ fontWeight: this.fontWeight,
1153
+ fontFamily: this.fontFamily,
1154
+ fontStyle: this.fontStyle,
1155
+ lineHeight: this.lineHeight,
1156
+ boxShadow: this.boxShadow,
1157
+ textAlign: this.textAlign,
1158
+ })}
1159
+ >
1160
+ ${this.showMediaList
1161
+ ? html`
1162
+ <div class="contact-info-header">
1163
+ <svg
1164
+ @click=${this._handleClose}
1165
+ xmlns="http://www.w3.org/2000/svg"
1166
+ height="24px"
1167
+ viewBox="0 -960 960 960"
1168
+ width="24px"
1169
+ fill="${this.textColor}"
1170
+ style="cursor: pointer;"
1171
+ >
1172
+ <path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z" />
1173
+ </svg>
1174
+ </div>
1175
+ <div>
1176
+ <div class="nav-container">
1177
+ <div class="inner-container">
1178
+ <div class="tabs">
1179
+ <div class="tab-item">
1180
+ <input type="radio" id="tab-media" name="tabs" class="tab-radio" ?checked=${this.activeTab === 'media'} @change=${() => this.switchTab('media')} />
1181
+ <label for="tab-media" class="tab-label">Media</label>
1182
+ <div class="tab-indicator" style="transform: ${this.activeTab === 'media' ? 'scaleX(1)' : 'scaleX(0)'}"></div>
1183
+ </div>
1184
+
1185
+ <div class="tab-item">
1186
+ <input type="radio" id="tab-docs" name="tabs" class="tab-radio" ?checked=${this.activeTab === 'docs'} @change=${() => this.switchTab('docs')} />
1187
+ <label for="tab-docs" class="tab-label">Docs</label>
1188
+ <div class="tab-indicator" style="transform: ${this.activeTab === 'docs' ? 'scaleX(1)' : 'scaleX(0)'}"></div>
1189
+ </div>
1190
+
1191
+ <div class="tab-item">
1192
+ <input
1193
+ type="radio"
1194
+ id="tab-links"
1195
+ name="tabs"
1196
+ class="tab-radio"
1197
+ ?checked=${this.activeTab === 'links'}
1198
+ @change=${() => this.switchTab('links')}
1199
+ @click=${() =>
1200
+ this.dispatchEvent(
1201
+ new CustomEvent('get-links', {
1202
+ detail: {
1203
+ conversationId: this.conversationId,
1204
+ },
1205
+ bubbles: true,
1206
+ composed: true,
1207
+ }),
1208
+ )}
1209
+ />
1210
+ <label for="tab-links" class="tab-label">Links</label>
1211
+ <div class="tab-indicator" style="transform: ${this.activeTab === 'links' ? 'scaleX(1)' : 'scaleX(0)'}"></div>
1212
+ </div>
1213
+ </div>
1214
+ </div>
1215
+ </div>
1216
+
1217
+ ${this.renderTabContent()}
1218
+ </div>
1219
+ `
1220
+ : html`
1221
+ <div class="contact-info-header">
1222
+ <svg
1223
+ @click=${this._handleClose}
1224
+ xmlns="http://www.w3.org/2000/svg"
1225
+ height="24px"
1226
+ viewBox="0 -960 960 960"
1227
+ width="24px"
1228
+ fill="${this.textColor}"
1229
+ style="cursor: pointer;"
1230
+ >
1231
+ <path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z" />
1232
+ </svg>
1233
+ ${this.isGroup ? html`<span class="group-info-label">Group Info</span>` : html`<span class="contact-info-label">Contact Info</span>`}
1234
+ </div>
1235
+
1236
+ <div class="contact-info-body">
1237
+ <div class="contact-info" style="background: var(--bg-primary-color);">
1238
+ <div style="position: relative; display: flex; align-items: center; gap: 8px;">
1239
+ ${Image({
1240
+ src: this.contactImage,
1241
+ width: 'calc(75dvh - 300px)',
1242
+ height: 'calc(75dvh - 300px)',
1243
+ borderRadius: '50%',
1244
+ objectFit: 'cover',
1245
+ placeholderImage: generateProfileImageByInitials(this.contactImage),
1246
+ })}
1247
+ ${this.isGroup
1248
+ ? html`
1249
+ <div
1250
+ @click=${this.handleImageClick}
1251
+ style="
1252
+ position: absolute;
1253
+ right: 15%;
1254
+ bottom: 0;
1255
+ transform: translateY(-50%);
1256
+ cursor: pointer;
1257
+ padding: 8px;
1258
+ border-radius: 50%;
1259
+ background: var(--bg-primary-light);
1260
+ "
1261
+ >
1262
+ <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor">
1263
+ <path
1264
+ d="M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z"
1265
+ />
1266
+ </svg>
1267
+ </div>
1268
+ `
1269
+ : ''}
1270
+ </div>
1271
+ <div class="contact-info-name">
1272
+ ${this.isGroup
1273
+ ? this.isEditingName
1274
+ ? html`
1275
+ <div style="display: flex; align-items: center; gap: 8px; cursor: pointer;">
1276
+ <input
1277
+ type="text"
1278
+ .value=${this.editedName}
1279
+ @input=${e => (this.editedName = e.target.value)}
1280
+ @keydown=${this.handleNameInputKeyDown}
1281
+ class="name-edit-input"
1282
+ style="
1283
+ font-size: 20px;
1284
+ font-weight: 600;
1285
+ background: transparent;
1286
+ border: none;
1287
+ border-bottom: 2px solid var(--text-primary-color);
1288
+ color: var(--text-primary-color);
1289
+ text-align: center;
1290
+ width: 100%;
1291
+ padding: 4px;
1292
+ outline: none;
1293
+ "
1294
+ />
1295
+ <svg @click=${this.saveName} xmlns="http://www.w3.org/2000/svg" height="35px" viewBox="0 -960 960 960" width="36px" fill="var(--text-primary-color)">
1296
+ <path
1297
+ d="m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"
1298
+ />
1299
+ </svg>
1300
+ </div>
1301
+ `
1302
+ : html`
1303
+ <div style="display: flex; align-items: center; gap: 8px; cursor: pointer;" @click=${this.handleNameClick}>
1304
+ <span>${this.contactName}</span>
1305
+ <svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 -960 960 960" width="18px" fill="currentColor">
1306
+ <path
1307
+ d="M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z"
1308
+ />
1309
+ </svg>
1310
+ </div>
1311
+ `
1312
+ : html` <span>${this.contactName}</span> `}
1313
+ <span>${this.contactEmail}</span>
1314
+ </div>
1315
+ </div>
1316
+
1317
+ <div class="contact-media" style="background: var(--bg-primary-color);">
1318
+ <div class="contact-media-header">
1319
+ <span class="contact-media-header-label">Media, links and docs</span>
1320
+ <div class="contact-media-header-count" @click=${this.toggleMediaList}>
1321
+ <span>${this.allLinksCount || this.allAttachments?.length}</span>
1322
+ <svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="${this.textColor}">
1323
+ <path d="M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z" />
1324
+ </svg>
1325
+ </div>
1326
+ </div>
1327
+ </div>
1328
+
1329
+ ${this.isGroup || this.isGroupcast
1330
+ ? html`<div class="group-members" style="background: var(--bg-primary-color);">
1331
+ <div class="group-members-header">
1332
+ <span class="group-members-header-label" style="font-size: 18px;">${WEB_CONTENT.CHAT.GROUP_INFO.GROUP_MEMBERS.TITLE}</span>
1333
+ ${this.groupMembers?.find(m => m.userId === this.userMetaData?.userId)?.isAdmin || this.isGroupcast
1334
+ ? html`
1335
+ <svg
1336
+ @click=${this.handleAddMembersClick}
1337
+ xmlns="http://www.w3.org/2000/svg"
1338
+ height="24px"
1339
+ viewBox="0 -960 960 960"
1340
+ width="24px"
1341
+ fill="var(--text-primary-color)"
1342
+ >
1343
+ <path
1344
+ d="M720-400v-120H600v-80h120v-120h80v120h120v80H800v120h-80Zm-360-80q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47ZM40-160v-112q0-34 17.5-62.5T104-378q62-31 126-46.5T360-440q66 0 130 15.5T616-378q29 15 46.5 43.5T680-272v112H40Z"
1345
+ />
1346
+ </svg>
1347
+ `
1348
+ : ''}
1349
+ </div>
1350
+ ${this.isLoadingMembers
1351
+ ? html` <div style="padding: 0 0px;">${[1, 2, 3].map(() => html` <div class="member-shimmer shimmer"></div> `)}</div> `
1352
+ : html` ${Array.isArray(this.isGroupcast ? this.groupcastMembers : members)
1353
+ ? (this.isGroupcast ? this.groupcastMembers : members).slice(0, 8).map(
1354
+ member => html`
1355
+ <div>
1356
+ <contact-tile
1357
+ contactName="${member.userId === this.userMetaData?.userId ? 'You' : member.userName || member?.memberInfo?.userName}"
1358
+ imageSrc="${member.userProfileImageUrl || member?.memberInfo?.userProfileImageUrl}"
1359
+ .suffix=${member.isAdmin ? 'Admin' : ''}
1360
+ suffixBgColor="var(--bg-secondary-color)"
1361
+ suffixColor="var(--text-primary-color)"
1362
+ bgColor="inherit"
1363
+ padding="10px"
1364
+ borderWidth="0px"
1365
+ .isCheckBox=${false}
1366
+ gap="10px"
1367
+ .showActions=${this.shouldShowMemberActions(member.userId) || this.isGroupcast}
1368
+ .userId=${member?.userId || member?.memberId}
1369
+ .isAdmin=${member?.isAdmin || this.isGroupcast}
1370
+ @name-clicked=${e => this.openProfile(e.detail)}
1371
+ .isGroupcast=${this.isGroupcast}
1372
+ ></contact-tile>
1373
+ </div>
1374
+ `,
1375
+ )
1376
+ : ''}`}
1377
+ ${Array.isArray(members || this.groupcastMembers) && (members || this.groupcastMembers).length > 8
1378
+ ? html`<button
1379
+ style="border: none; background: transparent; cursor: pointer; padding: 10px; width: 100%; text-decoration: underline; color:var(--text-primary-color);"
1380
+ @click="${this.showMembersPopup}"
1381
+ >
1382
+ View All Members (${(members || this.groupcastMembers).length})
1383
+ </button>`
1384
+ : ''}
1385
+ </div>
1386
+
1387
+ ${this.isPopupOpen
1388
+ ? html`
1389
+ <div class="popup-overlay">
1390
+ <div class="popup-content group-members-popup">
1391
+ <div class="popup-header">
1392
+ <span style="color: ${this.textColor};">${WEB_CONTENT.CHAT.GROUP_INFO.GROUP_MEMBERS.TITLE}</span>
1393
+ ${this.groupMembers?.find(m => m.userId === this.userMetaData?.userId)?.isAdmin || this.isGroupcast
1394
+ ? html`
1395
+ <div class="group-members-popup-actions">
1396
+ <span>${WEB_CONTENT.CHAT.GROUP_INFO.GROUP_MEMBERS.ADD_MEMBER}</span>
1397
+ <svg
1398
+ @click=${this.handleAddMembersClick}
1399
+ xmlns="http://www.w3.org/2000/svg"
1400
+ height="24px"
1401
+ viewBox="0 -960 960 960"
1402
+ width="24px"
1403
+ fill="var(--text-primary-color)"
1404
+ >
1405
+ <path
1406
+ d="M720-400v-120H600v-80h120v-120h80v120h120v80H800v120h-80Zm-360-80q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47ZM40-160v-112q0-34 17.5-62.5T104-378q62-31 126-46.5T360-440q66 0 130 15.5T616-378q29 15 46.5 43.5T680-272v112H40Z"
1407
+ />
1408
+ </svg>
1409
+ </div>
1410
+ `
1411
+ : ''}
1412
+ <button class="close-btn" @click="${this.closeMembersPopup}">
1413
+ <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="${this.textColor}">
1414
+ <path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z" />
1415
+ </svg>
1416
+ </button>
1417
+ </div>
1418
+ <div class="popup-members">
1419
+ ${(this.isGroupcast? this.groupcastMembers : this.groupMembers).map(
1420
+ member => html`
1421
+ <div>
1422
+ <contact-tile
1423
+ contactName="${member.userName || member.memberInfo?.userName}"
1424
+ imageSrc="${member.userProfileImageUrl || member.memberInfo?.userProfileImageUrl}"
1425
+ .suffix=${member.isAdmin ? 'Admin' : ''}
1426
+ suffixBgColor="var(--bg-secondary-color)"
1427
+ suffixColor="var(--text-primary-color)"
1428
+ bgColor="inherit"
1429
+ padding="10px"
1430
+ borderWidth="0px"
1431
+ .isCheckBox=${false}
1432
+ gap="10px"
1433
+ .showActions=${this.shouldShowMemberActions(member.userId) || this.isGroupcast}
1434
+ .userId=${member.userId || member.memberId}
1435
+ @name-clicked=${e => this.openProfile(e.detail)}
1436
+ .isGroupcast=${this.isGroupcast}
1437
+ />
1438
+ </div>
1439
+ `,
1440
+ )}
1441
+ </div>
1442
+ </div>
1443
+ </div>
1444
+ `
1445
+ : ''}`
1446
+ : ''}
1447
+ </div>
1448
+ `}
1449
+ ${!isGroupcast
1450
+ ? html`
1451
+ <div class="ctas">
1452
+ ${
1453
+ this.showMediaList
1454
+ ? null
1455
+ : this.isGroup
1456
+ ? html`
1457
+ <button @click="${() => this.openConfirmationPopup('exit-group', 'exit group')}">
1458
+ <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="${this.textColor}">
1459
+ <path
1460
+ d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h280v80H200Zm440-160-55-58 102-102H360v-80h327L585-622l55-58 200 200-200 200Z"
1461
+ />
1462
+ </svg>
1463
+ Exit Group
1464
+ </button>
1465
+ `
1466
+ : html`
1467
+ <button @click="${() => this.openConfirmationPopup('clear-chat', 'Clear Chat')}">Clear Chat</button>
1468
+ ${this.conversationMetaData.messagingDisabled && this.isBlocked
1469
+ ? html`<button style="color: var(--text-danger-color);" @click="${() => this.openConfirmationPopup('unblock-contact', 'Unblock Chat')}">Unblock Chat</button>`
1470
+ : !this.conversationMetaData.messagingDisabled && this.isBlocked === null
1471
+ ? html`<button style="color: var(--text-danger-color);" @click="${() => this.openConfirmationPopup('block-contact', 'Block Chat')}">Block Chat</button>`
1472
+ : this.isBlocked === 'loading'
1473
+ ? html`<div class="shimmer-loader">
1474
+ <div class="shimmer-line"></div>
1475
+ </div>`
1476
+ : null}
1477
+ <button style="color: var(--text-danger-color);" @click="${() => this.openConfirmationPopup('delete-chat', 'Delete Chat')}">Delete Chat</button>
1478
+ `
1479
+ }
1480
+ </div>
1481
+ `
1482
+ : html`<div class="ctas">
1483
+ <button style="color: var(--text-danger-color);" @click="${() => this.openConfirmationPopup('delete-groupcast', 'Delete Groupcast')}">Delete Groupcast</button>
1484
+
1485
+ </div>`}
1486
+ </div>
1487
+ `;
1488
+ }
1489
+ }
1490
+
1491
+ customElements.define('contact-info', ContactInfo);