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,868 @@
1
+ import { html, css, LitElement } from 'lit';
2
+ import videoThumbnail from '../../../assets/images/videoPlaceholder.svg';
3
+ import AudioPlaceholder from '../../../assets/images/equalizer.svg'
4
+ import '../../../stories/Components/Loader/Spinner/Spinner';
5
+ import'../../../components/ChatUIComponent/AudioBubble';
6
+ import '../../../stories/Components/SharePopup/SharePopup';
7
+ import { WEB_CONTENT } from '../../../constants/content';
8
+ import { drawerDialogService } from '../Dialog-Drawer/dialog-drawer';
9
+
10
+ class MediaGallery extends LitElement {
11
+ static properties = {
12
+ allAttachments: {
13
+ type: Array,
14
+ hasChanged(newVal, oldVal) {
15
+ return JSON.stringify(newVal) !== JSON.stringify(oldVal);
16
+ },
17
+ },
18
+ mainImageIndex: { type: Number },
19
+ topbarBgColor: { type: String },
20
+ iconColor: { type: String },
21
+ galleryImageSize: { type: String },
22
+ isZoomed: { type: Boolean },
23
+ loadingMediaGallery: { type: Boolean },
24
+ zoomLevel: { type: Number },
25
+ isSharePopupOpen: { type: Boolean },
26
+ shareLink: { type: String },
27
+ };
28
+
29
+ static styles = css`
30
+ :host {
31
+ display: block;
32
+ font-family: Arial, sans-serif;
33
+ }
34
+
35
+ .media-gallery-container {
36
+ width: 100%;
37
+ height: 100%;
38
+ z-index: 1000;
39
+ display: flex;
40
+ flex-direction: column;
41
+ }
42
+
43
+ .topbar {
44
+ display: flex;
45
+ justify-content: flex-end;
46
+ background-color: var(--bg-secondary-color);
47
+ padding: 10px;
48
+ }
49
+
50
+ .topbar-icon-container {
51
+ display: flex;
52
+ align-items: center;
53
+ gap: 10px;
54
+ }
55
+
56
+ .icon {
57
+ cursor: pointer;
58
+ color: var(--text-primary-color);
59
+ }
60
+
61
+ .popup-overlay {
62
+ position: fixed;
63
+ top: 0;
64
+ left: 0;
65
+ height: 100%;
66
+ width: 100%;
67
+ background-color: var(--overlay-color);
68
+ z-index: 999;
69
+ display: flex;
70
+ justify-content: center;
71
+ align-items: center;
72
+ }
73
+
74
+ .main-image-container {
75
+ text-align: center;
76
+ padding: 10px;
77
+ background-color: var(--bg-primary-color);
78
+ height: 50%;
79
+ position: relative;
80
+ touch-action: pan-y pinch-zoom;
81
+ flex: 1;
82
+ cursor: zoom-in;
83
+ overflow: hidden;
84
+ }
85
+
86
+ .main-image-container.zoomed {
87
+ cursor: move;
88
+ }
89
+
90
+ .main-image {
91
+ max-width: 100%;
92
+ height: 100%;
93
+ border-radius: 5px;
94
+ transition: transform 0.2s ease;
95
+ object-fit: contain;
96
+ }
97
+
98
+ .zoom-controls {
99
+ position: absolute;
100
+ bottom: 20px;
101
+ left: 50%;
102
+ transform: translateX(-50%);
103
+ background: rgba(0, 0, 0, 0.6);
104
+ border-radius: 20px;
105
+ padding: 5px 10px;
106
+ display: flex;
107
+ align-items: center;
108
+ gap: 10px;
109
+ z-index: 10;
110
+ }
111
+
112
+ .zoom-btn {
113
+ background: none;
114
+ border: none;
115
+ color: white;
116
+ font-size: 20px;
117
+ cursor: pointer;
118
+ width: 30px;
119
+ height: 30px;
120
+ display: flex;
121
+ align-items: center;
122
+ justify-content: center;
123
+ }
124
+
125
+ .zoom-level {
126
+ color: white;
127
+ font-size: 14px;
128
+ min-width: 50px;
129
+ text-align: center;
130
+ }
131
+
132
+ .nav-arrow {
133
+ position: absolute;
134
+ top: 50%;
135
+ transform: translateY(-50%);
136
+ background: rgba(0, 0, 0, 0.5);
137
+ color: white;
138
+ padding: 15px 10px;
139
+ cursor: pointer;
140
+ border: none;
141
+ border-radius: 4px;
142
+ font-size: 20px;
143
+ z-index: 1;
144
+ }
145
+
146
+ .nav-arrow:hover {
147
+ background: rgba(0, 0, 0, 0.7);
148
+ }
149
+
150
+ .nav-arrow.left {
151
+ left: 10px;
152
+ }
153
+ .nav-arrow.right {
154
+ right: 10px;
155
+ }
156
+
157
+ .gallery {
158
+ display: flex;
159
+ gap: 10px;
160
+ background-color: var(--bg-secondary-color);
161
+ padding: 10px;
162
+ overflow-x: auto;
163
+ scrollbar-width: thin;
164
+ }
165
+
166
+ .gallery::-webkit-scrollbar {
167
+ height: 6px;
168
+ }
169
+
170
+ .gallery::-webkit-scrollbar-thumb {
171
+ background-color: rgba(0, 0, 0, 0.3);
172
+ border-radius: 3px;
173
+ }
174
+
175
+ .gallery-image,
176
+ .gallery-video-container {
177
+ width: var(--gallery-image-size, 70px);
178
+ height: var(--gallery-image-size, 70px);
179
+ flex-shrink: 0;
180
+ border-radius: 5px;
181
+ }
182
+
183
+ .gallery-image {
184
+ object-fit: cover;
185
+ cursor: pointer;
186
+ transition: transform 0.2s;
187
+ background-color: var(--base-color);
188
+ }
189
+
190
+ .gallery-image:hover,
191
+ .gallery-video-container:hover {
192
+ transform: scale(1.05);
193
+ }
194
+
195
+ .gallery-image.selected,
196
+ .gallery-video-container.selected {
197
+ transform: scale(1.1);
198
+ outline: 3px solid var(--base-color);
199
+ outline-offset: 2px;
200
+ }
201
+
202
+ .unsupported-media {
203
+ display: flex;
204
+ justify-content: center;
205
+ align-items: center;
206
+ height: 100%;
207
+ font-size: 20px;
208
+ color: #808080;
209
+ }
210
+
211
+ .video-thumbnail {
212
+ width: 70px;
213
+ height: 70px;
214
+ }
215
+
216
+ .spinner-wrapper {
217
+ position: absolute;
218
+ top: 50%;
219
+ left: 50%;
220
+ transform: translate(-50%, -50%);
221
+ display: flex;
222
+ justify-content: center;
223
+ align-items: center;
224
+ }
225
+
226
+ .audio-wrapper{
227
+ height: 100%;
228
+ display: flex;
229
+ align-items: center;
230
+ justify-content: center;
231
+ }
232
+
233
+ @media (max-width: 768px) {
234
+ .main-image { max-height: 100%; }
235
+ .gallery-image, .gallery-video-container {
236
+ width: calc(var(--gallery-image-size, 70px) - 10px);
237
+ height: calc(var(--gallery-image-size, 70px) - 10px);
238
+ }
239
+ }
240
+ `;
241
+
242
+ constructor() {
243
+ super();
244
+ this.mainImageIndex = 0;
245
+ this.topbarBgColor = '#f1f1f1';
246
+ this.iconColor = 'var(--text-primary-color)';
247
+ this.galleryImageSize = '70px';
248
+ this.isZoomed = false;
249
+ this.loadingMediaGallery = false;
250
+ this._mediaItems = null;
251
+ this._boundKeyHandler = this.handleKeyPress.bind(this);
252
+ this._attachmentsHash = '';
253
+
254
+ // Zoom related properties
255
+ this.zoomLevel = 1;
256
+ this.minZoom = 1;
257
+ this.maxZoom = 5;
258
+ this.zoomStep = 0.5;
259
+ this.isDragging = false;
260
+ this.startX = 0;
261
+ this.startY = 0;
262
+ this.translateX = 0;
263
+ this.translateY = 0;
264
+ this.initialPinchDistance = 0;
265
+
266
+ // Image boundaries for constrained panning
267
+ this.imageBounds = {
268
+ width: 0,
269
+ height: 0
270
+ };
271
+ this.containerBounds = {
272
+ width: 0,
273
+ height: 0
274
+ };
275
+ }
276
+
277
+ connectedCallback() {
278
+ super.connectedCallback();
279
+ window.addEventListener('keydown', this._boundKeyHandler);
280
+ }
281
+
282
+ disconnectedCallback() {
283
+ super.disconnectedCallback();
284
+ window.removeEventListener('keydown', this._boundKeyHandler);
285
+ this._removeZoomListeners();
286
+ }
287
+
288
+ updated(changedProperties) {
289
+ super.updated(changedProperties);
290
+
291
+ if (changedProperties.has('allAttachments')) {
292
+ this.resetMediaItemsCache();
293
+ }
294
+
295
+ if (changedProperties.has('mainImageIndex')) {
296
+ // Reset zoom when changing images
297
+ this.resetZoom();
298
+ }
299
+
300
+ if (changedProperties.has('isZoomed')) {
301
+ const mainContainer = this.shadowRoot.querySelector('.main-image-container');
302
+ if (this.isZoomed) {
303
+ mainContainer.classList.add('zoomed');
304
+ this._setupZoomListeners();
305
+ this._updateBoundingBoxes();
306
+ } else {
307
+ mainContainer.classList.remove('zoomed');
308
+ this._removeZoomListeners();
309
+ this.resetZoom();
310
+ }
311
+ }
312
+
313
+ if (changedProperties.has('zoomLevel')) {
314
+ this._updateBoundingBoxes();
315
+ }
316
+ }
317
+
318
+ _updateBoundingBoxes() {
319
+ requestAnimationFrame(() => {
320
+ const container = this.shadowRoot.querySelector('.main-image-container');
321
+ const image = this.shadowRoot.querySelector('.main-image');
322
+
323
+ if (!container || !image) return;
324
+
325
+ // Get the displayed dimensions of the image (not zoomed)
326
+ const displayedWidth = image.offsetWidth / this.zoomLevel;
327
+ const displayedHeight = image.offsetHeight / this.zoomLevel;
328
+
329
+ // Calculate the zoomed dimensions
330
+ this.imageBounds = {
331
+ width: displayedWidth * this.zoomLevel,
332
+ height: displayedHeight * this.zoomLevel
333
+ };
334
+
335
+ this.containerBounds = {
336
+ width: container.clientWidth,
337
+ height: container.clientHeight
338
+ };
339
+ });
340
+ }
341
+
342
+ _calculateAttachmentsHash(attachments) {
343
+ return JSON.stringify(attachments);
344
+ }
345
+
346
+ _processAttachments() {
347
+ if (!this.allAttachments) return [];
348
+
349
+ return this.allAttachments.reduce((acc, message) => {
350
+ if (message.attachments?.length) {
351
+ const validAttachments = message.attachments.filter(
352
+ attachment => attachment.mimeType?.match(/^(image|video|audio)\//)
353
+ );
354
+ return [...acc, ...validAttachments];
355
+ }
356
+ return acc;
357
+ }, []);
358
+ }
359
+
360
+ get mediaItems() {
361
+ const currentHash = this._calculateAttachmentsHash(this.allAttachments);
362
+
363
+ if (this._mediaItems === null || currentHash !== this._attachmentsHash) {
364
+ this._attachmentsHash = currentHash;
365
+ this._mediaItems = this._processAttachments();
366
+ }
367
+
368
+ return this._mediaItems;
369
+ }
370
+
371
+ resetMediaItemsCache() {
372
+ this._mediaItems = null;
373
+ this._attachmentsHash = '';
374
+ }
375
+
376
+ handleKeyPress(event) {
377
+ const currentMedia = this.mediaItems[this.mainImageIndex];
378
+ const isImage = currentMedia?.mimeType?.startsWith('image/');
379
+
380
+ switch (event.key) {
381
+ case 'ArrowLeft':
382
+ this.navigateImage('prev');
383
+ break;
384
+ case 'ArrowRight':
385
+ this.navigateImage('next');
386
+ break;
387
+ case 'Escape':
388
+ if (this.isZoomed) {
389
+ this.resetZoom();
390
+ } else {
391
+ this.closeGallery();
392
+ }
393
+ break;
394
+ case '+':
395
+ if (isImage) this.zoomIn();
396
+ break;
397
+ case '-':
398
+ if (isImage) this.zoomOut();
399
+ break;
400
+ case ' ':
401
+ case 'Enter':
402
+ if (isImage) this.toggleZoom();
403
+ break;
404
+ }
405
+ }
406
+
407
+ navigateImage(direction) {
408
+ const newIndex = direction === 'next' ? Math.min(this.mainImageIndex + 1, this.mediaItems.length - 1) : Math.max(this.mainImageIndex - 1, 0);
409
+
410
+ if (newIndex !== this.mainImageIndex) {
411
+ this.isZoomed = false;
412
+ this.mainImageIndex = newIndex;
413
+ }
414
+ }
415
+
416
+ toggleZoom() {
417
+ this.isZoomed = !this.isZoomed;
418
+
419
+ if (this.isZoomed) {
420
+ this.zoomLevel = 1.5; // Start with slight zoom
421
+ this._updateBoundingBoxes();
422
+ this.updateZoomStyle();
423
+ } else {
424
+ this.resetZoom();
425
+ }
426
+ }
427
+
428
+ resetZoom() {
429
+ this.zoomLevel = 1;
430
+ this.translateX = 0;
431
+ this.translateY = 0;
432
+ this.isZoomed = false;
433
+ this.updateZoomStyle();
434
+ }
435
+
436
+ zoomIn(e) {
437
+ if (e) e.stopPropagation();
438
+
439
+ if (this.zoomLevel < this.maxZoom) {
440
+ this.zoomLevel = Math.min(this.zoomLevel + this.zoomStep, this.maxZoom);
441
+ this._updateBoundingBoxes();
442
+ this.constrainTranslation();
443
+ this.updateZoomStyle();
444
+ }
445
+ }
446
+
447
+ zoomOut(e) {
448
+ if (e) e.stopPropagation();
449
+
450
+ if (this.zoomLevel > this.minZoom) {
451
+ this.zoomLevel = Math.max(this.zoomLevel - this.zoomStep, this.minZoom);
452
+
453
+ // If we're back at min zoom, reset position
454
+ if (this.zoomLevel === this.minZoom) {
455
+ this.translateX = 0;
456
+ this.translateY = 0;
457
+ } else {
458
+ this._updateBoundingBoxes();
459
+ this.constrainTranslation();
460
+ }
461
+
462
+ this.updateZoomStyle();
463
+ }
464
+ }
465
+
466
+ // New method to constrain the translation within visible bounds
467
+ constrainTranslation() {
468
+ // Calculate how much the image extends beyond the container on each side when zoomed
469
+ const overflowX = Math.max(0, this.imageBounds.width - this.containerBounds.width);
470
+ const overflowY = Math.max(0, this.imageBounds.height - this.containerBounds.height);
471
+
472
+ // Ensure a minimum percentage of the image remains visible (e.g., 20%)
473
+ const minVisibleWidth = this.containerBounds.width * 0.2;
474
+ const minVisibleHeight = this.containerBounds.height * 0.2;
475
+
476
+ // Calculate maximum allowed translation
477
+ // This allows the image to move until only the minimum visible portion remains
478
+ const maxTranslateX = overflowX / 2 + (this.containerBounds.width - minVisibleWidth) / 2;
479
+ const maxTranslateY = overflowY / 2 + (this.containerBounds.height - minVisibleHeight) / 2;
480
+
481
+ // Constrain the translation values
482
+ this.translateX = Math.max(-maxTranslateX, Math.min(maxTranslateX, this.translateX));
483
+ this.translateY = Math.max(-maxTranslateY, Math.min(maxTranslateY, this.translateY));
484
+ }
485
+
486
+ updateZoomStyle() {
487
+ const mainImage = this.shadowRoot.querySelector('.main-image');
488
+ if (!mainImage) return;
489
+
490
+ mainImage.style.transform = `translate(${this.translateX}px, ${this.translateY}px) scale(${this.zoomLevel})`;
491
+
492
+ // Only show zoomed cursor when zoomed in
493
+ const container = this.shadowRoot.querySelector('.main-image-container');
494
+ if (container) {
495
+ if (this.zoomLevel > 1) {
496
+ container.classList.add('zoomed');
497
+ } else {
498
+ container.classList.remove('zoomed');
499
+ }
500
+ }
501
+
502
+ this.requestUpdate();
503
+ }
504
+
505
+ _setupZoomListeners() {
506
+ const container = this.shadowRoot.querySelector('.main-image-container');
507
+ const mainImage = this.shadowRoot.querySelector('.main-image');
508
+
509
+ if (!container || !mainImage) return;
510
+
511
+ // Mouse events for desktop
512
+ this._boundMouseDown = this.handleMouseDown.bind(this);
513
+ this._boundMouseMove = this.handleMouseMove.bind(this);
514
+ this._boundMouseUp = this.handleMouseUp.bind(this);
515
+ this._boundWheel = this.handleWheel.bind(this);
516
+
517
+ // Touch events for mobile
518
+ this._boundTouchStart = this.handleTouchStart.bind(this);
519
+ this._boundTouchMove = this.handleTouchMove.bind(this);
520
+ this._boundTouchEnd = this.handleTouchEnd.bind(this);
521
+
522
+ container.addEventListener('mousedown', this._boundMouseDown);
523
+ window.addEventListener('mousemove', this._boundMouseMove);
524
+ window.addEventListener('mouseup', this._boundMouseUp);
525
+ container.addEventListener('wheel', this._boundWheel);
526
+
527
+ container.addEventListener('touchstart', this._boundTouchStart, { passive: false });
528
+ container.addEventListener('touchmove', this._boundTouchMove, { passive: false });
529
+ container.addEventListener('touchend', this._boundTouchEnd);
530
+
531
+ // Update bounding boxes on window resize
532
+ this._boundResizeHandler = this._updateBoundingBoxes.bind(this);
533
+ window.addEventListener('resize', this._boundResizeHandler);
534
+
535
+ // Initial update of bounding boxes
536
+ this._updateBoundingBoxes();
537
+ }
538
+
539
+ _removeZoomListeners() {
540
+ const container = this.shadowRoot.querySelector('.main-image-container');
541
+
542
+ if (!container) return;
543
+
544
+ if (this._boundMouseDown) {
545
+ container.removeEventListener('mousedown', this._boundMouseDown);
546
+ window.removeEventListener('mousemove', this._boundMouseMove);
547
+ window.removeEventListener('mouseup', this._boundMouseUp);
548
+ container.removeEventListener('wheel', this._boundWheel);
549
+
550
+ container.removeEventListener('touchstart', this._boundTouchStart);
551
+ container.removeEventListener('touchmove', this._boundTouchMove);
552
+ container.removeEventListener('touchend', this._boundTouchEnd);
553
+ }
554
+
555
+ if (this._boundResizeHandler) {
556
+ window.removeEventListener('resize', this._boundResizeHandler);
557
+ }
558
+ }
559
+
560
+ handleMouseDown(e) {
561
+ const currentMedia = this.mediaItems[this.mainImageIndex];
562
+ const isImage = currentMedia?.mimeType?.startsWith('image/');
563
+
564
+ if (!isImage || this.zoomLevel <= 1) return;
565
+
566
+ this.isDragging = true;
567
+ this.startX = e.clientX - this.translateX;
568
+ this.startY = e.clientY - this.translateY;
569
+ e.preventDefault();
570
+ }
571
+
572
+ handleMouseMove(e) {
573
+ if (!this.isDragging) return;
574
+
575
+ const newTranslateX = e.clientX - this.startX;
576
+ const newTranslateY = e.clientY - this.startY;
577
+
578
+ this.translateX = newTranslateX;
579
+ this.translateY = newTranslateY;
580
+
581
+ // Apply constraints to keep the image in view
582
+ this.constrainTranslation();
583
+ this.updateZoomStyle();
584
+ e.preventDefault();
585
+ }
586
+
587
+ handleMouseUp() {
588
+ this.isDragging = false;
589
+ }
590
+
591
+ handleWheel(e) {
592
+ e.preventDefault();
593
+
594
+ const currentMedia = this.mediaItems[this.mainImageIndex];
595
+ const isImage = currentMedia?.mimeType?.startsWith('image/');
596
+
597
+ if (!isImage) return;
598
+
599
+ // Get cursor position relative to container for zoom targeting
600
+ const container = this.shadowRoot.querySelector('.main-image-container');
601
+ const rect = container.getBoundingClientRect();
602
+ const cursorX = e.clientX - rect.left;
603
+ const cursorY = e.clientY - rect.top;
604
+
605
+ // Store old zoom level
606
+ const oldZoom = this.zoomLevel;
607
+
608
+ if (e.deltaY < 0) {
609
+ // Zoom in
610
+ this.zoomIn();
611
+ } else {
612
+ // Zoom out
613
+ this.zoomOut();
614
+ }
615
+
616
+ // If zoom level actually changed and we're zoomed in
617
+ if (oldZoom !== this.zoomLevel && this.zoomLevel > 1) {
618
+ // Adjust translateX and translateY to zoom in/out around cursor position
619
+ // This is a simplified approach - for more precise targeting, you'd need more complex math
620
+ this.constrainTranslation();
621
+ }
622
+ }
623
+
624
+ handleTouchStart(e) {
625
+ const currentMedia = this.mediaItems[this.mainImageIndex];
626
+ const isImage = currentMedia?.mimeType?.startsWith('image/');
627
+
628
+ if (!isImage) return;
629
+
630
+ e.preventDefault();
631
+
632
+ if (e.touches.length === 1) {
633
+ // Single touch - prepare for panning
634
+ this.isDragging = true;
635
+ this.startX = e.touches[0].clientX - this.translateX;
636
+ this.startY = e.touches[0].clientY - this.translateY;
637
+ }
638
+ else if (e.touches.length === 2) {
639
+ // Pinch to zoom
640
+ this.isDragging = false;
641
+ const touch1 = e.touches[0];
642
+ const touch2 = e.touches[1];
643
+ this.initialPinchDistance = Math.hypot(
644
+ touch2.clientX - touch1.clientX,
645
+ touch2.clientY - touch1.clientY
646
+ );
647
+ }
648
+ }
649
+
650
+ handleTouchMove(e) {
651
+ const currentMedia = this.mediaItems[this.mainImageIndex];
652
+ const isImage = currentMedia?.mimeType?.startsWith('image/');
653
+
654
+ if (!isImage || this.zoomLevel <= 1 && e.touches.length === 1) return;
655
+
656
+ e.preventDefault();
657
+
658
+ if (e.touches.length === 1 && this.isDragging) {
659
+ // Pan the image
660
+ this.translateX = e.touches[0].clientX - this.startX;
661
+ this.translateY = e.touches[0].clientY - this.startY;
662
+
663
+ // Apply constraints to keep the image in view
664
+ this.constrainTranslation();
665
+ this.updateZoomStyle();
666
+ }
667
+ else if (e.touches.length === 2) {
668
+ // Pinch zoom
669
+ const touch1 = e.touches[0];
670
+ const touch2 = e.touches[1];
671
+ const currentDistance = Math.hypot(
672
+ touch2.clientX - touch1.clientX,
673
+ touch2.clientY - touch1.clientY
674
+ );
675
+
676
+ if (this.initialPinchDistance > 0) {
677
+ const pinchRatio = currentDistance / this.initialPinchDistance;
678
+ const newZoomLevel = Math.max(
679
+ this.minZoom,
680
+ Math.min(this.maxZoom, this.zoomLevel * pinchRatio)
681
+ );
682
+
683
+ // Calculate center point between the two touches
684
+ const centerX = (touch1.clientX + touch2.clientX) / 2;
685
+ const centerY = (touch1.clientY + touch2.clientY) / 2;
686
+
687
+ // Apply zoom centered on pinch point
688
+ this.zoomLevel = newZoomLevel;
689
+ this.initialPinchDistance = currentDistance;
690
+
691
+ this._updateBoundingBoxes();
692
+ this.constrainTranslation();
693
+ this.updateZoomStyle();
694
+ }
695
+ }
696
+ }
697
+
698
+ handleTouchEnd(e) {
699
+ this.isDragging = false;
700
+ this.initialPinchDistance = 0;
701
+
702
+ // If we're at minimum zoom, reset position
703
+ if (this.zoomLevel <= this.minZoom) {
704
+ this.resetZoom();
705
+ }
706
+ }
707
+
708
+ handleShare() {
709
+ const currentMedia = this.mediaItems[this.mainImageIndex];
710
+ if (!currentMedia) return;
711
+ drawerDialogService.openDialog('share-popup', {
712
+ titleColor:"var(--text-primary-color)",
713
+ ctaColor:"var(--bg-primary-color)",
714
+ title:WEB_CONTENT.POPUP_MESSAGES.SHARE_MEDIA_LABEL,
715
+ shareLink:currentMedia.mediaUrl
716
+ });
717
+
718
+ }
719
+
720
+
721
+ async handleDownload() {
722
+ const currentMedia = this.mediaItems[this.mainImageIndex];
723
+ if (!currentMedia) return;
724
+
725
+ const extension = currentMedia.mimeType?.includes('/') ? '.' + currentMedia.mimeType.split('/')[1] : '.jpg';
726
+
727
+ try {
728
+ const response = await fetch(currentMedia.mediaUrl);
729
+ const blob = await response.blob();
730
+ const url = URL.createObjectURL(blob);
731
+ const a = document.createElement('a');
732
+ a.href = url;
733
+ a.download = `chat-media${extension}`;
734
+ document.body.appendChild(a);
735
+ a.click();
736
+ document.body.removeChild(a);
737
+ URL.revokeObjectURL(url);
738
+ } catch (error) {
739
+ console.error('Download failed:', error);
740
+ }
741
+ }
742
+
743
+ openShareWindow(url) {
744
+ window.open(`mailto:?body=${encodeURIComponent(url)}`, '_blank');
745
+ }
746
+
747
+ closeGallery() {
748
+ this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true }));
749
+ }
750
+
751
+
752
+ render() {
753
+ const items = this.mediaItems;
754
+
755
+ if (this.loadingMediaGallery && !items.length) {
756
+ return html`<div class="spinner-wrapper">
757
+ <spinner-loader
758
+ height="15px"
759
+ width="15px"
760
+ spinTime="1s"
761
+ spinnerPrimaryColor="var(--bg-primary-color)"
762
+ spinnerSecondaryColor="var(--text-primary-color)"
763
+ spinnerBorderWidth="2px"
764
+ ></spinner-loader>
765
+ </div>`;
766
+ }
767
+
768
+ if (!this.loadingMediaGallery && !items.length) {
769
+ return html`<div class="unsupported-media">${WEB_CONTENT.PLACEHOLDER_CONTENT.UNSUPPORTED_MEDIA}</div>`;
770
+ }
771
+
772
+ const currentMedia = items[this.mainImageIndex];
773
+ const isImage = currentMedia?.mimeType?.startsWith('image/');
774
+ const isVideo = currentMedia?.mimeType?.startsWith('video/');
775
+ const isAudio = currentMedia?.mimeType?.startsWith('audio/');
776
+
777
+ return html`
778
+ <div class="media-gallery-container">
779
+ <div class="topbar">
780
+ <div class="topbar-icon-container">
781
+ ${!isAudio ? html` <span class="icon" @click=${this.handleShare}>
782
+ <svg width="20" height="20" fill="var(--text-primary-color)" viewBox="0 0 1920 1920">
783
+ <path
784
+ d="M1513.827 1278.28c-96.772 0-182.634 43.765-241.415 111.531l-564.2-325.737c11.807-33.498 19.508-69.049 19.508-106.654 0-34.91-7.06-68.022-17.327-99.595l563.815-325.48c58.782 66.482 143.746 109.35 239.619 109.35 177.243 0 320.86-143.618 320.86-320.86 0-177.244-143.617-320.86-320.86-320.86-177.243 0-320.86 143.616-320.86 320.86 0 35.165 7.059 68.407 17.454 99.98l-563.686 325.48C587.953 679.554 502.86 636.56 406.86 636.56 229.617 636.56 86 780.177 86 957.42c0 177.243 143.617 320.86 320.86 320.86 93.434 0 176.601-40.428 235.254-104.215l567.537 327.662c-9.882 30.803-16.684 63.145-16.684 97.413 0 177.243 143.617 320.86 320.86 320.86 177.243 0 320.86-143.617 320.86-320.86 0-177.243-143.617-320.86-320.86-320.86"
785
+ />
786
+ </svg>
787
+ </span>` : null}
788
+ <span class="icon" @click=${this.handleDownload}>
789
+ <svg width="24" fill="var(--text-primary-color)" height="24" viewBox="0 0 24 24">
790
+ <path
791
+ d="M9.163 2.819C9 3.139 9 3.559 9 4.4V11H7.803c-.883 0-1.325 0-1.534.176a.75.75 0 0 0-.266.62c.017.274.322.593.931 1.232l4.198 4.401c.302.318.453.476.63.535a.749.749 0 0 0 .476 0c.177-.059.328-.217.63-.535l4.198-4.4c.61-.64.914-.96.93-1.233a.75.75 0 0 0-.265-.62C17.522 11 17.081 11 16.197 11H15V4.4c0-.84 0-1.26-.164-1.581a1.5 1.5 0 0 0-.655-.656C13.861 2 13.441 2 12.6 2h-1.2c-.84 0-1.26 0-1.581.163a1.5 1.5 0 0 0-.656.656zM5 21a1 1 0 0 0 1 1h12a1 1 0 1 0 0-2H6a1 1 0 0 0-1 1z"
792
+ />
793
+ </svg>
794
+ </span>
795
+ <span class="icon" @click=${this.closeGallery}>
796
+ <svg width="24" height="24" fill="var(--text-primary-color)" viewBox="0 0 24 24">
797
+ <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />
798
+ </svg>
799
+ </span>
800
+ </div>
801
+ </div>
802
+
803
+ <div class="main-image-container">
804
+ ${this.mainImageIndex > 0
805
+ ? html`<button class="nav-arrow left" @click=${e => (e.stopPropagation(), this.navigateImage('prev'))}>←</button>`
806
+ : ''}
807
+
808
+ ${
809
+ isImage
810
+ ? html`
811
+ <img src="${currentMedia.mediaUrl}" alt="Main Image" class="main-image" @dblclick=${this.toggleZoom} />
812
+ ${this.isZoomed && isImage ? html`
813
+ <div class="zoom-controls">
814
+ <button class="zoom-btn" @click=${this.zoomOut}>−</button>
815
+ <span class="zoom-level">${Math.round(this.zoomLevel * 100)}%</span>
816
+ <button class="zoom-btn" @click=${this.zoomIn}>+</button>
817
+ </div>
818
+ ` : ''}
819
+ `
820
+ : isVideo
821
+ ? html`<video src="${currentMedia.mediaUrl}" class="main-image" controls autoplay></video>`
822
+ : isAudio
823
+ ? html`
824
+ <div class='audio-wrapper' key=${currentMedia?.mediaUrl}>
825
+ <audio-bubble
826
+ .audioUrl=${currentMedia?.mediaUrl}
827
+ .showFooter=${false}
828
+ ></audio-bubble>
829
+ </div>
830
+ `
831
+ : html`<div class="unsupported-media">${WEB_CONTENT.UNSUPPORTED_MEDIA_TYPES}</div>`}
832
+
833
+ ${this.mainImageIndex < items.length - 1
834
+ ? html`<button class="nav-arrow right" @click=${e => (e.stopPropagation(), this.navigateImage('next'))}>→</button>`
835
+ : ''}
836
+ </div>
837
+
838
+ <div class="gallery">
839
+ ${items.map((media, index) => {
840
+ const isVideo = media.mimeType?.startsWith('video/');
841
+ const isAudio = media.mimeType?.startsWith('audio/');
842
+ return isVideo
843
+ ? html`
844
+ <div class="gallery-video-container ${index === this.mainImageIndex ? 'selected' : ''}"
845
+ @click=${() => (this.mainImageIndex = index)}>
846
+ <img class='video-thumbnail' src="${videoThumbnail}"></img>
847
+ </div>`
848
+ : isAudio
849
+ ? html`
850
+ <img src="${AudioPlaceholder}"
851
+ alt="Gallery Image ${index + 1}"
852
+ class="gallery-image ${index === this.mainImageIndex ? 'selected' : ''}"
853
+ @click=${() => (this.mainImageIndex = index)} />`
854
+ : html`
855
+ <img src="${media.mediaUrl}"
856
+ alt="Gallery Image ${index + 1}"
857
+ class="gallery-image ${index === this.mainImageIndex ? 'selected' : ''}"
858
+ @click=${() => (this.mainImageIndex = index)} />`;
859
+ })}
860
+ </div>
861
+ </div>
862
+ `;
863
+ }
864
+ }
865
+
866
+ customElements.define('media-gallery', MediaGallery);
867
+
868
+ export { MediaGallery };