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.
- package/LICENSE +21 -0
- package/dist/cjs/BlockChatList-720a703e.js +423 -0
- package/dist/cjs/BlockChatList-720a703e.js.map +1 -0
- package/dist/cjs/DocumentMessageBubble-c79bfbe5.js +493 -0
- package/dist/cjs/DocumentMessageBubble-c79bfbe5.js.map +1 -0
- package/dist/cjs/Image-67c52acd.js +135 -0
- package/dist/cjs/Image-67c52acd.js.map +1 -0
- package/dist/cjs/ImageMessageBubble-1218fb66.js +675 -0
- package/dist/cjs/ImageMessageBubble-1218fb66.js.map +1 -0
- package/dist/cjs/IsometrikLogo-976b1c34.js +44 -0
- package/dist/cjs/IsometrikLogo-976b1c34.js.map +1 -0
- package/dist/cjs/MessageSearch-5fc9dc00.js +5892 -0
- package/dist/cjs/MessageSearch-5fc9dc00.js.map +1 -0
- package/dist/cjs/ReactionsContainer-a6ce9059.js +375 -0
- package/dist/cjs/ReactionsContainer-a6ce9059.js.map +1 -0
- package/dist/cjs/Text-fedf6eab.js +60 -0
- package/dist/cjs/Text-fedf6eab.js.map +1 -0
- package/dist/cjs/VideoMessageBubble-c4694a78.js +571 -0
- package/dist/cjs/VideoMessageBubble-c4694a78.js.map +1 -0
- package/dist/cjs/WebChat-403e7ab1.js +2884 -0
- package/dist/cjs/WebChat-403e7ab1.js.map +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/audio-bubble_8.cjs.entry.js +21011 -0
- package/dist/cjs/audio-bubble_8.cjs.entry.js.map +1 -0
- package/dist/cjs/block-chat-list.cjs.entry.js +16 -0
- package/dist/cjs/block-chat-list.cjs.entry.js.map +1 -0
- package/dist/cjs/chat-app.cjs.entry.js +55 -0
- package/dist/cjs/chat-app.cjs.entry.js.map +1 -0
- package/dist/cjs/chat-assets-6ab1faa6.js +9 -0
- package/dist/cjs/chat-assets-6ab1faa6.js.map +1 -0
- package/dist/cjs/chat-creds-f4cbf400.js +38 -0
- package/dist/cjs/chat-creds-f4cbf400.js.map +1 -0
- package/dist/cjs/chat-document-message-bubble.cjs.entry.js +24 -0
- package/dist/cjs/chat-document-message-bubble.cjs.entry.js.map +1 -0
- package/dist/cjs/chat-image-message-bubble.cjs.entry.js +26 -0
- package/dist/cjs/chat-image-message-bubble.cjs.entry.js.map +1 -0
- package/dist/cjs/chat-video-message-bubble.cjs.entry.js +24 -0
- package/dist/cjs/chat-video-message-bubble.cjs.entry.js.map +1 -0
- package/dist/cjs/content-eca5336c.js +81 -0
- package/dist/cjs/content-eca5336c.js.map +1 -0
- package/dist/cjs/dialog-drawer-9d04911c.js +5313 -0
- package/dist/cjs/dialog-drawer-9d04911c.js.map +1 -0
- package/dist/cjs/forward-memebers.cjs.entry.js +128 -0
- package/dist/cjs/forward-memebers.cjs.entry.js.map +1 -0
- package/dist/cjs/group-members-a60fb1cb.js +41 -0
- package/dist/cjs/group-members-a60fb1cb.js.map +1 -0
- package/dist/cjs/groupcast-49dae5ab.js +202 -0
- package/dist/cjs/groupcast-49dae5ab.js.map +1 -0
- package/dist/cjs/imagePlaceholder-030cc566.js +4365 -0
- package/dist/cjs/imagePlaceholder-030cc566.js.map +1 -0
- package/dist/cjs/index-9afe62b6.js +3129 -0
- package/dist/cjs/index-9afe62b6.js.map +1 -0
- package/dist/cjs/index.cjs.js +148 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/isometrik-webchat.cjs.js +54 -0
- package/dist/cjs/isometrik-webchat.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/login-page.cjs.entry.js +85 -0
- package/dist/cjs/login-page.cjs.entry.js.map +1 -0
- package/dist/cjs/member-add.cjs.entry.js +122 -0
- package/dist/cjs/member-add.cjs.entry.js.map +1 -0
- package/dist/cjs/message-reaction-976f6261.js +24 -0
- package/dist/cjs/message-reaction-976f6261.js.map +1 -0
- package/dist/cjs/my-component.cjs.entry.js +29 -0
- package/dist/cjs/my-component.cjs.entry.js.map +1 -0
- package/dist/cjs/reaction-container.cjs.entry.js +52 -0
- package/dist/cjs/reaction-container.cjs.entry.js.map +1 -0
- package/dist/cjs/shadow-css-7c4dbc43.js +336 -0
- package/dist/cjs/shadow-css-7c4dbc43.js.map +1 -0
- package/dist/cjs/signup-page.cjs.entry.js +143 -0
- package/dist/cjs/signup-page.cjs.entry.js.map +1 -0
- package/dist/cjs/taguser-aca04ed9.js +512 -0
- package/dist/cjs/taguser-aca04ed9.js.map +1 -0
- package/dist/cjs/theme-provider_2.cjs.entry.js +113 -0
- package/dist/cjs/theme-provider_2.cjs.entry.js.map +1 -0
- package/dist/cjs/toast-helper-defae4a5.js +84 -0
- package/dist/cjs/toast-helper-defae4a5.js.map +1 -0
- package/dist/cjs/utils-bcad3386.js +9 -0
- package/dist/cjs/utils-bcad3386.js.map +1 -0
- package/dist/collection/api/conversations.js +12 -0
- package/dist/collection/api/group-members.js +36 -0
- package/dist/collection/api/groupcast.js +183 -0
- package/dist/collection/api/membership-control.js +13 -0
- package/dist/collection/api/message-reaction.js +16 -0
- package/dist/collection/api/social-accounts.js +282 -0
- package/dist/collection/app-root.js +51 -0
- package/dist/collection/app-root.js.map +1 -0
- package/dist/collection/assets/images/avatar.svg +1 -0
- package/dist/collection/assets/images/chatdefaultbg.svg +6140 -0
- package/dist/collection/assets/images/equalizer.svg +1 -0
- package/dist/collection/assets/images/imagePlaceholder.svg +2 -0
- package/dist/collection/assets/images/link.svg +1 -0
- package/dist/collection/assets/images/videoPlaceholder.svg +4 -0
- package/dist/collection/assets/images/videoThumbnail.svg +1 -0
- package/dist/collection/assets/svg/ExcelDocument.js +2 -0
- package/dist/collection/assets/svg/IsometrikLogo.js +38 -0
- package/dist/collection/assets/svg/Moon.svg +1 -0
- package/dist/collection/assets/svg/NoChatPlaceholder.js +16 -0
- package/dist/collection/assets/svg/NoContactsPlaceholder.js +9 -0
- package/dist/collection/assets/svg/NoMessagePlaceholder.svg +13 -0
- package/dist/collection/assets/svg/PdfDocument.js +2 -0
- package/dist/collection/assets/svg/ProfilePlaceholder.js +1 -0
- package/dist/collection/assets/svg/SelectChatPlaceholder.js +13 -0
- package/dist/collection/assets/svg/Sun.svg +1 -0
- package/dist/collection/assets/svg/broadcast-selected.svg +4 -0
- package/dist/collection/assets/svg/broadcst-default.svg +4 -0
- package/dist/collection/assets/svg/close.svg +1 -0
- package/dist/collection/assets/svg/group.svg +7 -0
- package/dist/collection/assets/svg/login.svg +3051 -0
- package/dist/collection/assets/svg/message-add.svg +5 -0
- package/dist/collection/assets/svg/message-bold.svg +3 -0
- package/dist/collection/assets/svg/message-outline.svg +5 -0
- package/dist/collection/collection-manifest.json +32 -0
- package/dist/collection/components/ChatUIComponent/AddMember.js +144 -0
- package/dist/collection/components/ChatUIComponent/AddMember.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/AudioBubble.js +528 -0
- package/dist/collection/components/ChatUIComponent/AudioBubble.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/BlockChatList.js +114 -0
- package/dist/collection/components/ChatUIComponent/BlockChatList.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/ChatDocumentMessageBubble.js +11 -0
- package/dist/collection/components/ChatUIComponent/ChatDocumentMessageBubble.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/ChatImageMessageBubble.js +11 -0
- package/dist/collection/components/ChatUIComponent/ChatImageMessageBubble.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/ChatOwnProfile/Profile.js +540 -0
- package/dist/collection/components/ChatUIComponent/ChatOwnProfile/Profile.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/ChatOwnProfile/profile-page.css +252 -0
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +1175 -0
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/ChatVideoMessageBubble.js +11 -0
- package/dist/collection/components/ChatUIComponent/ChatVideoMessageBubble.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +790 -0
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/ForwardMessageList.js +152 -0
- package/dist/collection/components/ChatUIComponent/ForwardMessageList.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/GroupCast.js +218 -0
- package/dist/collection/components/ChatUIComponent/GroupCast.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js +590 -0
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/ReactionContainer.js +103 -0
- package/dist/collection/components/ChatUIComponent/ReactionContainer.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +1352 -0
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/WebChatBody/web-chat-body.css +277 -0
- package/dist/collection/components/Login.js +118 -0
- package/dist/collection/components/Login.js.map +1 -0
- package/dist/collection/components/Signup.js +177 -0
- package/dist/collection/components/Signup.js.map +1 -0
- package/dist/collection/components/chat-main.js +131 -0
- package/dist/collection/components/chat-main.js.map +1 -0
- package/dist/collection/components/my-component/my-component.css +3 -0
- package/dist/collection/components/my-component/my-component.js +83 -0
- package/dist/collection/components/my-component/my-component.js.map +1 -0
- package/dist/collection/components/my-component/web-chat/WebChat.js +2686 -0
- package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -0
- package/dist/collection/components/my-component/web-chat/WebchatRightSide.js +675 -0
- package/dist/collection/components/my-component/web-chat/WebchatRightSide.js.map +1 -0
- package/dist/collection/components/my-component/web-chat/web-chat.css +336 -0
- package/dist/collection/components/theme-provider.js +182 -0
- package/dist/collection/components/theme-provider.js.map +1 -0
- package/dist/collection/constants/chat-assets.js +12 -0
- package/dist/collection/constants/chat-creds.js +31 -0
- package/dist/collection/constants/content.js +75 -0
- package/dist/collection/constants/urls.js +1 -0
- package/dist/collection/index.js +135 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/lib/helpers.js +205 -0
- package/dist/collection/lib/taguser.js +123 -0
- package/dist/collection/store/conversation.js +25 -0
- package/dist/collection/store/conversation.js.map +1 -0
- package/dist/collection/store/group-members.js +24 -0
- package/dist/collection/store/group-members.js.map +1 -0
- package/dist/collection/store/unread-count.js +18 -0
- package/dist/collection/store/unread-count.js.map +1 -0
- package/dist/collection/stories/Components/ActionsPopup/ActionsPopup.js +222 -0
- package/dist/collection/stories/Components/ActionsPopup/ActionsPopup.stories.js +148 -0
- package/dist/collection/stories/Components/AttachmentBox/AttachmentBox.js +211 -0
- package/dist/collection/stories/Components/AttachmentBox/AttachmentPreview/AttachmentPreview.js +708 -0
- package/dist/collection/stories/Components/AttachmentBox/AttachmentPreview/AttachmentPreview.stories.js +57 -0
- package/dist/collection/stories/Components/AttachmentBox/Attachmentbox.stories.js +74 -0
- package/dist/collection/stories/Components/AttachmentBox/CameraPreview.js +231 -0
- package/dist/collection/stories/Components/BlockUsers/BlockUsers.js +337 -0
- package/dist/collection/stories/Components/Body/Body.js +48 -0
- package/dist/collection/stories/Components/Body/Body.stories.js +33 -0
- package/dist/collection/stories/Components/Buttons/Buttons.js +65 -0
- package/dist/collection/stories/Components/Buttons/Buttons.stories.js +132 -0
- package/dist/collection/stories/Components/ChatSidebar/ChatSidebar.js +951 -0
- package/dist/collection/stories/Components/ChatSidebar/ChatSidebar.stories.js +75 -0
- package/dist/collection/stories/Components/ChatSidebar/ContextMenu.js +109 -0
- package/dist/collection/stories/Components/ChatTile/ChatTile.js +290 -0
- package/dist/collection/stories/Components/ChatTile/ChatTile.stories.js +180 -0
- package/dist/collection/stories/Components/Chip/Chip.js +111 -0
- package/dist/collection/stories/Components/Chip/Chip.stories.js +149 -0
- package/dist/collection/stories/Components/ContactInfo/ContactInfo.js +1491 -0
- package/dist/collection/stories/Components/ContactInfo/ContactInfo.stories.js +118 -0
- package/dist/collection/stories/Components/ContactInfo/MediaList.js +147 -0
- package/dist/collection/stories/Components/ContactInfo/ProfileInfo.js +1219 -0
- package/dist/collection/stories/Components/ContactTile/ContactTile.js +416 -0
- package/dist/collection/stories/Components/ContactTile/ContactTile.stories.js +60 -0
- package/dist/collection/stories/Components/Dialog-Drawer/confirm.js +113 -0
- package/dist/collection/stories/Components/Dialog-Drawer/deletemessage.js +97 -0
- package/dist/collection/stories/Components/Dialog-Drawer/dialog-drawer.js +264 -0
- package/dist/collection/stories/Components/EmojiReactions/EmojiReactions.js +179 -0
- package/dist/collection/stories/Components/Footer/Footer.js +4 -0
- package/dist/collection/stories/Components/Footer/Footer.stories.js +155 -0
- package/dist/collection/stories/Components/ForwardMessage/ForwardMessageContainer.js +433 -0
- package/dist/collection/stories/Components/ForwardMessage/ForwardMessageContainer.stories.js +110 -0
- package/dist/collection/stories/Components/ForwardMessage/ForwardUi.js +46 -0
- package/dist/collection/stories/Components/GroupChatContacts/GroupChatContacts.js +546 -0
- package/dist/collection/stories/Components/GroupChatContacts/GroupChatContacts.stories.js +56 -0
- package/dist/collection/stories/Components/GroupInfo/GroupInfo.js +394 -0
- package/dist/collection/stories/Components/GroupInfo/GroupInfo.stories.js +107 -0
- package/dist/collection/stories/Components/Head/ClosedHeader/ClosedHead.js +129 -0
- package/dist/collection/stories/Components/Head/ClosedHeader/ClosedHead.stories.js +78 -0
- package/dist/collection/stories/Components/Head/Head.js +672 -0
- package/dist/collection/stories/Components/Head/Head.stories.js +91 -0
- package/dist/collection/stories/Components/Icon/Icon.js +115 -0
- package/dist/collection/stories/Components/Image/Image.js +41 -0
- package/dist/collection/stories/Components/Image/Image.stories.js +49 -0
- package/dist/collection/stories/Components/Image/Img.stories.js +178 -0
- package/dist/collection/stories/Components/Inputbox/Input.js +206 -0
- package/dist/collection/stories/Components/Inputbox/Input.stories.js +87 -0
- package/dist/collection/stories/Components/InstagramAccounts/InstagramAccountsPanel.js +605 -0
- package/dist/collection/stories/Components/Loader/Spinner/Spinner.js +60 -0
- package/dist/collection/stories/Components/Loader/Spinner/Spinner.stories.js +38 -0
- package/dist/collection/stories/Components/MainPlaceHolder/MainChatPlaceHolder.js +78 -0
- package/dist/collection/stories/Components/MainPlaceHolder/MainPlaceHolder.stories.js +130 -0
- package/dist/collection/stories/Components/MediaGallery/MediaGallery.js +868 -0
- package/dist/collection/stories/Components/MediaGallery/MediaGallery.stories.js +81 -0
- package/dist/collection/stories/Components/MembersList/MembersList.js +348 -0
- package/dist/collection/stories/Components/MessageBubble/AudioMessageBubble/AudioMesaageBubble.js +533 -0
- package/dist/collection/stories/Components/MessageBubble/DocumentMessageBubble/DocumentMessageBubble.js +484 -0
- package/dist/collection/stories/Components/MessageBubble/DocumentMessageBubble/DocumentMessageBubble.stories.js +54 -0
- package/dist/collection/stories/Components/MessageBubble/ImageMessageBubble/ImageMessageBubble.js +683 -0
- package/dist/collection/stories/Components/MessageBubble/ImageMessageBubble/ImageMessageBubble.stories.js +49 -0
- package/dist/collection/stories/Components/MessageBubble/IncomingTextMessageBubble/IncomingTextMessageBubble.js +450 -0
- package/dist/collection/stories/Components/MessageBubble/IncomingTextMessageBubble/IncomingTextMessageBubble.stories.js +56 -0
- package/dist/collection/stories/Components/MessageBubble/LinkMessageBubble/LinkMessageBubble.js +721 -0
- package/dist/collection/stories/Components/MessageBubble/OutgoingTextMessageBubble/OutgoingTextMessageBubble.js +139 -0
- package/dist/collection/stories/Components/MessageBubble/OutgoingTextMessageBubble/OutgoingTextMessageBubble.stories.js +63 -0
- package/dist/collection/stories/Components/MessageBubble/VideoMessageBubble/VideoMessageBubble.js +576 -0
- package/dist/collection/stories/Components/MessageBubble/VideoMessageBubble/VideoMessageBubble.stories.js +50 -0
- package/dist/collection/stories/Components/MessageDatePill/MessageDatePill.js +66 -0
- package/dist/collection/stories/Components/MessageDatePill/MessageDatePill.stories.js +48 -0
- package/dist/collection/stories/Components/MessageInfo/MessageInfo.js +465 -0
- package/dist/collection/stories/Components/MessageInfo/MessageInfo.stories.js +111 -0
- package/dist/collection/stories/Components/MessageSearch/MessageSearch.js +242 -0
- package/dist/collection/stories/Components/MessageSearchBar/SearchBar.js +523 -0
- package/dist/collection/stories/Components/MessageSearchBar/SearchBar.stories.js +98 -0
- package/dist/collection/stories/Components/MessageUnreadCount/MessageUnreadCount.js +51 -0
- package/dist/collection/stories/Components/MessageUnreadCount/MessageUnreadCount.stories.js +79 -0
- package/dist/collection/stories/Components/NewChatSidebar/NewChatSidebar.js +560 -0
- package/dist/collection/stories/Components/NewChatSidebar/NewChatSidebar.stories.js +56 -0
- package/dist/collection/stories/Components/Placeholder/NoContactsPlaceholder.js +57 -0
- package/dist/collection/stories/Components/Popup/ConfirmationPopup/DeleteConfirmationPopup/DeletePopup.js +114 -0
- package/dist/collection/stories/Components/ProfileSidebar/ProfileSidebar.js +166 -0
- package/dist/collection/stories/Components/ProfileSidebar/ProfileSidebar.stories.js +125 -0
- package/dist/collection/stories/Components/ProfileTab/ProfileTab.js +939 -0
- package/dist/collection/stories/Components/ProfileTab/ProfileTab.stories.js +144 -0
- package/dist/collection/stories/Components/ReactionsContainer/ReactionsContainer.js +166 -0
- package/dist/collection/stories/Components/ReactionsContainer/ReactionsContainer.stories.js +115 -0
- package/dist/collection/stories/Components/ReactionsContainer/ReactionsInfoCard/ReactionsInfoCard.js +98 -0
- package/dist/collection/stories/Components/ReactionsContainer/ReactionsInfoCard/ReactionsInfoCard.stories.js +55 -0
- package/dist/collection/stories/Components/ReadMark/BlueReadMark/BlueReadMark.js +27 -0
- package/dist/collection/stories/Components/ReadMark/BlueReadMark/BlueReadMark.stories.js +28 -0
- package/dist/collection/stories/Components/ReadMark/ClockMark/ClockMark.js +26 -0
- package/dist/collection/stories/Components/ReadMark/ClockMark/ClockMark.stories.js +33 -0
- package/dist/collection/stories/Components/ReadMark/DoubleMark/DoubleMark.js +27 -0
- package/dist/collection/stories/Components/ReadMark/DoubleMark/DoubleMark.stories.js +28 -0
- package/dist/collection/stories/Components/ReadMark/SingleMark/SingleMark.js +38 -0
- package/dist/collection/stories/Components/ReadMark/SingleMark/SingleMark.stories.js +33 -0
- package/dist/collection/stories/Components/ReplyBlock/MediaIcons.js +16 -0
- package/dist/collection/stories/Components/ReplyBlock/ReplyBlock.js +196 -0
- package/dist/collection/stories/Components/ReplyBlock/ReplyBlock.stories.js +57 -0
- package/dist/collection/stories/Components/ReplyMessageContainer/ReplyMessageContainer.js +645 -0
- package/dist/collection/stories/Components/ReplyMessageContainer/ReplyMessageContainer.stories.js +58 -0
- package/dist/collection/stories/Components/SearchableList/SearchableList.js +393 -0
- package/dist/collection/stories/Components/SearchableList/SearchableList.stories.js +65 -0
- package/dist/collection/stories/Components/SharePopup/SharePopup.js +152 -0
- package/dist/collection/stories/Components/SharePopup/SharePopup.stories.js +47 -0
- package/dist/collection/stories/Components/Splitscreen/Splitscreen.js +157 -0
- package/dist/collection/stories/Components/Splitscreen/Splitscreen.stories.js +100 -0
- package/dist/collection/stories/Components/TestFooter/MentionUserList.js +194 -0
- package/dist/collection/stories/Components/TestFooter/TestFooter.js +1339 -0
- package/dist/collection/stories/Components/TestFooter/TestFooter.stories.js +89 -0
- package/dist/collection/stories/Components/Text/Text.js +57 -0
- package/dist/collection/stories/Components/Text/Text.stories.js +83 -0
- package/dist/collection/stories/Components/TextStyle/TextStyle.js +38 -0
- package/dist/collection/stories/Components/TextStyle/TextStyle.stories.js +50 -0
- package/dist/collection/stories/Components/Time/Timestamp.js +50 -0
- package/dist/collection/stories/Components/Time/Timestamp.stories.js +34 -0
- package/dist/collection/stories/Components/Toaster/Toaster.js +94 -0
- package/dist/collection/stories/Components/Toaster/Toaster.stories.js +108 -0
- package/dist/collection/stories/Components/Toaster/toast-helper.js +79 -0
- package/dist/collection/stories/Components/Toaster/toast-helper.js.map +1 -0
- package/dist/collection/stories/Components/final/final.js +86 -0
- package/dist/collection/stories/Components/final/final.stories.js +30 -0
- package/dist/collection/stories/assets/SEARCH ICON.svg +1 -0
- package/dist/collection/types/ConversationDetailsTypes.js +2 -0
- package/dist/collection/types/ConversationDetailsTypes.js.map +1 -0
- package/dist/collection/utils/chatSdk.js +14 -0
- package/dist/collection/utils/getFomattedDate.js +34 -0
- package/dist/collection/utils/getFomattedDate.js.map +1 -0
- package/dist/collection/utils/unixTimeConverter.js +28 -0
- package/dist/collection/utils/utils.js +4 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/esm/BlockChatList-9fc3a42b.js +421 -0
- package/dist/esm/BlockChatList-9fc3a42b.js.map +1 -0
- package/dist/esm/DocumentMessageBubble-b67726f2.js +491 -0
- package/dist/esm/DocumentMessageBubble-b67726f2.js.map +1 -0
- package/dist/esm/Image-bb9efda3.js +121 -0
- package/dist/esm/Image-bb9efda3.js.map +1 -0
- package/dist/esm/ImageMessageBubble-0e473f6e.js +673 -0
- package/dist/esm/ImageMessageBubble-0e473f6e.js.map +1 -0
- package/dist/esm/IsometrikLogo-14db76af.js +42 -0
- package/dist/esm/IsometrikLogo-14db76af.js.map +1 -0
- package/dist/esm/MessageSearch-4101a627.js +5875 -0
- package/dist/esm/MessageSearch-4101a627.js.map +1 -0
- package/dist/esm/ReactionsContainer-bdd74a3c.js +373 -0
- package/dist/esm/ReactionsContainer-bdd74a3c.js.map +1 -0
- package/dist/esm/Text-3b0b3898.js +58 -0
- package/dist/esm/Text-3b0b3898.js.map +1 -0
- package/dist/esm/VideoMessageBubble-88a7a53e.js +569 -0
- package/dist/esm/VideoMessageBubble-88a7a53e.js.map +1 -0
- package/dist/esm/WebChat-5448d615.js +2882 -0
- package/dist/esm/WebChat-5448d615.js.map +1 -0
- package/dist/esm/app-globals-0f993ce5.js +5 -0
- package/dist/esm/app-globals-0f993ce5.js.map +1 -0
- package/dist/esm/audio-bubble_8.entry.js +21001 -0
- package/dist/esm/audio-bubble_8.entry.js.map +1 -0
- package/dist/esm/block-chat-list.entry.js +8 -0
- package/dist/esm/block-chat-list.entry.js.map +1 -0
- package/dist/esm/chat-app.entry.js +51 -0
- package/dist/esm/chat-app.entry.js.map +1 -0
- package/dist/esm/chat-assets-bd8778d5.js +6 -0
- package/dist/esm/chat-assets-bd8778d5.js.map +1 -0
- package/dist/esm/chat-creds-ff086f05.js +35 -0
- package/dist/esm/chat-creds-ff086f05.js.map +1 -0
- package/dist/esm/chat-document-message-bubble.entry.js +20 -0
- package/dist/esm/chat-document-message-bubble.entry.js.map +1 -0
- package/dist/esm/chat-image-message-bubble.entry.js +22 -0
- package/dist/esm/chat-image-message-bubble.entry.js.map +1 -0
- package/dist/esm/chat-video-message-bubble.entry.js +20 -0
- package/dist/esm/chat-video-message-bubble.entry.js.map +1 -0
- package/dist/esm/content-5aea5e39.js +79 -0
- package/dist/esm/content-5aea5e39.js.map +1 -0
- package/dist/esm/dialog-drawer-9fa083b1.js +5304 -0
- package/dist/esm/dialog-drawer-9fa083b1.js.map +1 -0
- package/dist/esm/forward-memebers.entry.js +124 -0
- package/dist/esm/forward-memebers.entry.js.map +1 -0
- package/dist/esm/group-members-bb3c8db7.js +37 -0
- package/dist/esm/group-members-bb3c8db7.js.map +1 -0
- package/dist/esm/groupcast-d1c54a27.js +187 -0
- package/dist/esm/groupcast-d1c54a27.js.map +1 -0
- package/dist/esm/imagePlaceholder-e544f70b.js +4360 -0
- package/dist/esm/imagePlaceholder-e544f70b.js.map +1 -0
- package/dist/esm/index-fddf30b7.js +3093 -0
- package/dist/esm/index-fddf30b7.js.map +1 -0
- package/dist/esm/index.js +139 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/isometrik-webchat.js +49 -0
- package/dist/esm/isometrik-webchat.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/login-page.entry.js +81 -0
- package/dist/esm/login-page.entry.js.map +1 -0
- package/dist/esm/member-add.entry.js +118 -0
- package/dist/esm/member-add.entry.js.map +1 -0
- package/dist/esm/message-reaction-ad47ea1a.js +20 -0
- package/dist/esm/message-reaction-ad47ea1a.js.map +1 -0
- package/dist/esm/my-component.entry.js +25 -0
- package/dist/esm/my-component.entry.js.map +1 -0
- package/dist/esm/reaction-container.entry.js +48 -0
- package/dist/esm/reaction-container.entry.js.map +1 -0
- package/dist/esm/shadow-css-7ad5caf8.js +334 -0
- package/dist/esm/shadow-css-7ad5caf8.js.map +1 -0
- package/dist/esm/signup-page.entry.js +139 -0
- package/dist/esm/signup-page.entry.js.map +1 -0
- package/dist/esm/taguser-e9032d65.js +510 -0
- package/dist/esm/taguser-e9032d65.js.map +1 -0
- package/dist/esm/theme-provider_2.entry.js +108 -0
- package/dist/esm/theme-provider_2.entry.js.map +1 -0
- package/dist/esm/toast-helper-840fd8dc.js +82 -0
- package/dist/esm/toast-helper-840fd8dc.js.map +1 -0
- package/dist/esm/utils-11fcde98.js +7 -0
- package/dist/esm/utils-11fcde98.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/isometrik-webchat/index.esm.js +2 -0
- package/dist/isometrik-webchat/index.esm.js.map +1 -0
- package/dist/isometrik-webchat/isometrik-webchat.css +2 -0
- package/dist/isometrik-webchat/isometrik-webchat.esm.js +2 -0
- package/dist/isometrik-webchat/isometrik-webchat.esm.js.map +1 -0
- package/dist/isometrik-webchat/p-12774661.js +2 -0
- package/dist/isometrik-webchat/p-12774661.js.map +1 -0
- package/dist/isometrik-webchat/p-12e56271.js +549 -0
- package/dist/isometrik-webchat/p-12e56271.js.map +1 -0
- package/dist/isometrik-webchat/p-1415e589.js +2 -0
- package/dist/isometrik-webchat/p-1415e589.js.map +1 -0
- package/dist/isometrik-webchat/p-18f8d210.js +13 -0
- package/dist/isometrik-webchat/p-18f8d210.js.map +1 -0
- package/dist/isometrik-webchat/p-1b2461f4.js +357 -0
- package/dist/isometrik-webchat/p-1b2461f4.js.map +1 -0
- package/dist/isometrik-webchat/p-229095d4.js +2 -0
- package/dist/isometrik-webchat/p-229095d4.js.map +1 -0
- package/dist/isometrik-webchat/p-2953d06a.entry.js +2 -0
- package/dist/isometrik-webchat/p-2953d06a.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-3004a123.js +2 -0
- package/dist/isometrik-webchat/p-3004a123.js.map +1 -0
- package/dist/isometrik-webchat/p-3044698a.js +2 -0
- package/dist/isometrik-webchat/p-3044698a.js.map +1 -0
- package/dist/isometrik-webchat/p-40517d7f.js +1098 -0
- package/dist/isometrik-webchat/p-40517d7f.js.map +1 -0
- package/dist/isometrik-webchat/p-42a62cf2.js +2 -0
- package/dist/isometrik-webchat/p-42a62cf2.js.map +1 -0
- package/dist/isometrik-webchat/p-48e1d174.js +45 -0
- package/dist/isometrik-webchat/p-48e1d174.js.map +1 -0
- package/dist/isometrik-webchat/p-48e243ec.entry.js +2 -0
- package/dist/isometrik-webchat/p-48e243ec.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-4d2aca06.js +257 -0
- package/dist/isometrik-webchat/p-4d2aca06.js.map +1 -0
- package/dist/isometrik-webchat/p-610bfd8a.js +2 -0
- package/dist/isometrik-webchat/p-610bfd8a.js.map +1 -0
- package/dist/isometrik-webchat/p-674e4bb0.js +9 -0
- package/dist/isometrik-webchat/p-674e4bb0.js.map +1 -0
- package/dist/isometrik-webchat/p-8490e13d.js +192 -0
- package/dist/isometrik-webchat/p-8490e13d.js.map +1 -0
- package/dist/isometrik-webchat/p-858b0da8.entry.js +2 -0
- package/dist/isometrik-webchat/p-858b0da8.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-89108249.entry.js +5010 -0
- package/dist/isometrik-webchat/p-89108249.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-8dcdea59.js +2963 -0
- package/dist/isometrik-webchat/p-8dcdea59.js.map +1 -0
- package/dist/isometrik-webchat/p-92d0b21c.js +2 -0
- package/dist/isometrik-webchat/p-92d0b21c.js.map +1 -0
- package/dist/isometrik-webchat/p-ada9c8e8.entry.js +2 -0
- package/dist/isometrik-webchat/p-ada9c8e8.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-adbb398d.entry.js +2 -0
- package/dist/isometrik-webchat/p-adbb398d.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-b07dd267.js +2 -0
- package/dist/isometrik-webchat/p-b07dd267.js.map +1 -0
- package/dist/isometrik-webchat/p-bf0aeb22.entry.js +2 -0
- package/dist/isometrik-webchat/p-bf0aeb22.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-bfd51dd4.entry.js +2 -0
- package/dist/isometrik-webchat/p-bfd51dd4.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-c50aa410.entry.js +2 -0
- package/dist/isometrik-webchat/p-c50aa410.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-cd34448c.entry.js +2 -0
- package/dist/isometrik-webchat/p-cd34448c.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-d4b8ece6.entry.js +2 -0
- package/dist/isometrik-webchat/p-d4b8ece6.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-de8a8642.js +197 -0
- package/dist/isometrik-webchat/p-de8a8642.js.map +1 -0
- package/dist/isometrik-webchat/p-e09b32eb.js +591 -0
- package/dist/isometrik-webchat/p-e09b32eb.js.map +1 -0
- package/dist/isometrik-webchat/p-e1255160.js +2 -0
- package/dist/isometrik-webchat/p-e1255160.js.map +1 -0
- package/dist/isometrik-webchat/p-e3731295.js +274 -0
- package/dist/isometrik-webchat/p-e3731295.js.map +1 -0
- package/dist/isometrik-webchat/p-e4efea64.entry.js +2 -0
- package/dist/isometrik-webchat/p-e4efea64.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-ef6e482a.entry.js +2 -0
- package/dist/isometrik-webchat/p-ef6e482a.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-f1f5d5bd.js +3 -0
- package/dist/isometrik-webchat/p-f1f5d5bd.js.map +1 -0
- package/dist/isometrik-webchat/p-ff9f3dfe.js +203 -0
- package/dist/isometrik-webchat/p-ff9f3dfe.js.map +1 -0
- package/dist/loader/cdn.js +1 -0
- package/dist/loader/index.cjs.js +1 -0
- package/dist/loader/index.d.ts +24 -0
- package/dist/loader/index.es2017.js +1 -0
- package/dist/loader/index.js +2 -0
- package/dist/loader/package.json +11 -0
- package/dist/types/app-root.d.ts +0 -0
- package/dist/types/components/ChatUIComponent/AddMember.d.ts +13 -0
- package/dist/types/components/ChatUIComponent/AudioBubble.d.ts +39 -0
- package/dist/types/components/ChatUIComponent/BlockChatList.d.ts +13 -0
- package/dist/types/components/ChatUIComponent/ChatDocumentMessageBubble.d.ts +5 -0
- package/dist/types/components/ChatUIComponent/ChatImageMessageBubble.d.ts +5 -0
- package/dist/types/components/ChatUIComponent/ChatOwnProfile/Profile.d.ts +42 -0
- package/dist/types/components/ChatUIComponent/ChatSidebar/ChatSidebar.d.ts +85 -0
- package/dist/types/components/ChatUIComponent/ChatVideoMessageBubble.d.ts +5 -0
- package/dist/types/components/ChatUIComponent/Footer/ChatFooter.d.ts +154 -0
- package/dist/types/components/ChatUIComponent/ForwardMessageList.d.ts +15 -0
- package/dist/types/components/ChatUIComponent/GroupCast.d.ts +26 -0
- package/dist/types/components/ChatUIComponent/Header/WebChatHeader.d.ts +45 -0
- package/dist/types/components/ChatUIComponent/ReactionContainer.d.ts +12 -0
- package/dist/types/components/ChatUIComponent/WebChatBody/WebChatBody.d.ts +120 -0
- package/dist/types/components/Login.d.ts +13 -0
- package/dist/types/components/Signup.d.ts +17 -0
- package/dist/types/components/chat-main.d.ts +15 -0
- package/dist/types/components/my-component/my-component.d.ts +16 -0
- package/dist/types/components/my-component/web-chat/WebchatRightSide.d.ts +42 -0
- package/dist/types/components/theme-provider.d.ts +44 -0
- package/dist/types/components.d.ts +838 -0
- package/dist/types/index.d.ts +37 -0
- package/dist/types/stencil-public-runtime.d.ts +1678 -0
- package/dist/types/store/conversation.d.ts +17 -0
- package/dist/types/store/group-members.d.ts +18 -0
- package/dist/types/store/unread-count.d.ts +10 -0
- package/dist/types/stories/Components/Toaster/toast-helper.d.ts +8 -0
- package/dist/types/types/ConversationDetailsTypes.d.ts +52 -0
- package/dist/types/utils/getFomattedDate.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +89 -0
- package/readme.md +569 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import WaveSurfer from "wavesurfer.js";
|
|
3
|
+
import { convertSecondsToMinutes } from "../../lib/helpers";
|
|
4
|
+
import "../../stories/Components/MessageBubble/AudioMessageBubble/AudioMesaageBubble.js";
|
|
5
|
+
export class AudioBubble {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.wavesurfer = null;
|
|
8
|
+
this.waveformContainer = null;
|
|
9
|
+
this.loadAbortController = null;
|
|
10
|
+
this.currentLoadingUrl = null;
|
|
11
|
+
this.initializationInterval = null;
|
|
12
|
+
this.pauseAudioHandler = () => {
|
|
13
|
+
console.log('Pause requested, wavesurfer exists:', !!this.wavesurfer);
|
|
14
|
+
if (!this.wavesurfer)
|
|
15
|
+
return;
|
|
16
|
+
this.isPlaying = false;
|
|
17
|
+
this.wavesurfer.pause();
|
|
18
|
+
};
|
|
19
|
+
this.playAudioHandler = () => {
|
|
20
|
+
if (!this.wavesurfer) {
|
|
21
|
+
const success = this.initWaveSurfer();
|
|
22
|
+
if (success) {
|
|
23
|
+
// Wait for the 'ready' event before playing
|
|
24
|
+
this.wavesurfer.once('ready', () => {
|
|
25
|
+
this.isPlaying = true;
|
|
26
|
+
this.wavesurfer.play();
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
this.isPlaying = true;
|
|
32
|
+
this.wavesurfer.play();
|
|
33
|
+
};
|
|
34
|
+
this.audioUrl = undefined;
|
|
35
|
+
this.audioWaveColor = '#C5C5C5';
|
|
36
|
+
this.audioProgressColor = '#4A76FD';
|
|
37
|
+
this.textColor = '#4A76FD';
|
|
38
|
+
this.isSelf = false;
|
|
39
|
+
this.borderRadius = '';
|
|
40
|
+
this.bgColor = '';
|
|
41
|
+
this.time = '';
|
|
42
|
+
this.isRead = false;
|
|
43
|
+
this.isDelivered = false;
|
|
44
|
+
this.showFooter = false;
|
|
45
|
+
this.messageId = '';
|
|
46
|
+
this.timeColor = '';
|
|
47
|
+
this.reactions = {};
|
|
48
|
+
this.messageType = undefined;
|
|
49
|
+
this.isPlaying = false;
|
|
50
|
+
this.audioDuration = '0:00';
|
|
51
|
+
this.currentAudioId = null;
|
|
52
|
+
this.waveformContainerReady = false;
|
|
53
|
+
this.initializationAttempts = 0;
|
|
54
|
+
}
|
|
55
|
+
componentWillLoad() {
|
|
56
|
+
if (typeof WaveSurfer !== 'function') {
|
|
57
|
+
console.error('WaveSurfer is not available as a function. Import may be failing.');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
componentDidLoad() {
|
|
61
|
+
if (this.initializationInterval) {
|
|
62
|
+
clearInterval(this.initializationInterval);
|
|
63
|
+
}
|
|
64
|
+
// Start trying to initialize in a loop until successful
|
|
65
|
+
this.initializationInterval = setInterval(() => {
|
|
66
|
+
this.initializationAttempts++;
|
|
67
|
+
console.log(`Initialization attempt ${this.initializationAttempts}...`);
|
|
68
|
+
// Check if we have the necessary pieces
|
|
69
|
+
if (this.waveformContainer && this.audioUrl) {
|
|
70
|
+
this.initWaveSurfer();
|
|
71
|
+
// If wavesurfer was created successfully, stop the interval
|
|
72
|
+
if (this.wavesurfer) {
|
|
73
|
+
clearInterval(this.initializationInterval);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
console.log('Still waiting for:', !this.waveformContainer ? 'waveform container' : '', !this.audioUrl ? 'audio URL' : '');
|
|
78
|
+
}
|
|
79
|
+
// Give up after 10 attempts
|
|
80
|
+
if (this.initializationAttempts >= 10) {
|
|
81
|
+
console.error('Failed to initialize WaveSurfer after 10 attempts');
|
|
82
|
+
clearInterval(this.initializationInterval);
|
|
83
|
+
}
|
|
84
|
+
}, 500); // Try every 500ms
|
|
85
|
+
}
|
|
86
|
+
handleWaveformReady(event) {
|
|
87
|
+
this.waveformContainer = event.detail;
|
|
88
|
+
if (this.waveformContainer && this.audioUrl) {
|
|
89
|
+
setTimeout(() => this.initWaveSurfer(), 100);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
initWaveSurfer() {
|
|
93
|
+
if (!this.waveformContainer) {
|
|
94
|
+
console.error('Waveform container reference is missing');
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
if (!this.waveformContainer.isConnected) {
|
|
98
|
+
console.error('Waveform container is not connected to DOM');
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
if (!this.audioUrl) {
|
|
102
|
+
console.error('Audio URL is missing');
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
// Abort any ongoing loads before destroying
|
|
107
|
+
this.abortCurrentLoad();
|
|
108
|
+
// Destroy existing instance if any
|
|
109
|
+
if (this.wavesurfer) {
|
|
110
|
+
this.wavesurfer.destroy();
|
|
111
|
+
this.wavesurfer = null;
|
|
112
|
+
}
|
|
113
|
+
// Create a new abort controller for this load operation
|
|
114
|
+
this.loadAbortController = new AbortController();
|
|
115
|
+
this.currentLoadingUrl = this.audioUrl;
|
|
116
|
+
// Create a new instance with more basic settings first
|
|
117
|
+
this.wavesurfer = WaveSurfer.create({
|
|
118
|
+
container: this.waveformContainer,
|
|
119
|
+
waveColor: this.isSelf ? '#000000' : this.audioWaveColor,
|
|
120
|
+
progressColor: this.audioProgressColor,
|
|
121
|
+
height: 40,
|
|
122
|
+
barHeight: 1,
|
|
123
|
+
barWidth: 4,
|
|
124
|
+
barRadius: 3,
|
|
125
|
+
barGap: 4,
|
|
126
|
+
normalize: true,
|
|
127
|
+
sampleRate: 60000,
|
|
128
|
+
fetchParams: {
|
|
129
|
+
signal: this.loadAbortController.signal
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
if (!this.wavesurfer) {
|
|
133
|
+
console.error('Failed to create WaveSurfer instance');
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
this.wavesurfer.load(this.audioUrl);
|
|
137
|
+
this.wavesurfer.on('ready', () => {
|
|
138
|
+
// Only update if this is still the current URL
|
|
139
|
+
if (this.currentLoadingUrl === this.audioUrl) {
|
|
140
|
+
const totalDuration = this.wavesurfer.getDuration();
|
|
141
|
+
const getSortedTime = convertSecondsToMinutes(Math.round(totalDuration));
|
|
142
|
+
this.audioDuration = getSortedTime;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
this.wavesurfer.on('audioprocess', () => {
|
|
146
|
+
const totalDuration = this.wavesurfer.getCurrentTime();
|
|
147
|
+
const getSortedTime = convertSecondsToMinutes(Math.round(totalDuration));
|
|
148
|
+
this.audioDuration = getSortedTime;
|
|
149
|
+
});
|
|
150
|
+
this.wavesurfer.on('finish', () => {
|
|
151
|
+
this.isPlaying = false;
|
|
152
|
+
this.wavesurfer.seekTo(0);
|
|
153
|
+
// Add a small delay to ensure seekTo completes before setting audioDuration
|
|
154
|
+
setTimeout(() => {
|
|
155
|
+
const totalDuration = this.wavesurfer.getDuration();
|
|
156
|
+
const getSortedTime = convertSecondsToMinutes(Math.round(totalDuration));
|
|
157
|
+
this.audioDuration = getSortedTime;
|
|
158
|
+
}, 50);
|
|
159
|
+
});
|
|
160
|
+
this.wavesurfer.on('error', err => {
|
|
161
|
+
// Only log if it's not an abort error (which we expect when changing URLs)
|
|
162
|
+
if (err.name !== 'AbortError') {
|
|
163
|
+
console.error('WaveSurfer error:', err);
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
console.error('Error initializing WaveSurfer:', error);
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
abortCurrentLoad() {
|
|
174
|
+
// Abort any ongoing fetch operations
|
|
175
|
+
if (this.loadAbortController) {
|
|
176
|
+
this.loadAbortController.abort();
|
|
177
|
+
this.loadAbortController = null;
|
|
178
|
+
}
|
|
179
|
+
this.currentLoadingUrl = null;
|
|
180
|
+
}
|
|
181
|
+
disconnectedCallback() {
|
|
182
|
+
this.abortCurrentLoad();
|
|
183
|
+
if (this.wavesurfer) {
|
|
184
|
+
this.wavesurfer.destroy();
|
|
185
|
+
this.wavesurfer = null;
|
|
186
|
+
}
|
|
187
|
+
this.isPlaying = false;
|
|
188
|
+
if (this.initializationInterval) {
|
|
189
|
+
clearInterval(this.initializationInterval);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
chatChanged(newAudioUrl, oldAudioUrl) {
|
|
193
|
+
// Only reinitialize if the URL actually changed
|
|
194
|
+
if (newAudioUrl !== oldAudioUrl) {
|
|
195
|
+
// Stop playback before changing URL
|
|
196
|
+
if (this.wavesurfer && this.isPlaying) {
|
|
197
|
+
this.wavesurfer.pause();
|
|
198
|
+
this.isPlaying = false;
|
|
199
|
+
}
|
|
200
|
+
// Reset to default duration display
|
|
201
|
+
this.audioDuration = '0:00';
|
|
202
|
+
// Short delay to ensure clean state before reinitializing
|
|
203
|
+
setTimeout(() => {
|
|
204
|
+
if (this.waveformContainer && newAudioUrl) {
|
|
205
|
+
this.initWaveSurfer();
|
|
206
|
+
}
|
|
207
|
+
}, 100);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
render() {
|
|
211
|
+
return (h("audio-bubble-ui", { key: 'ee2e179e8b040ee56c84931e6b1a94558ec69c49', isPlaying: this.isPlaying, audioDuration: this.audioDuration, playAudioHandler: this.playAudioHandler, pauseAudioHandler: this.pauseAudioHandler, isDelivered: this.isDelivered, isRead: this.isRead, time: this.time, borderRadius: this.borderRadius, bgColor: this.bgColor, textColor: this.textColor, isSelf: this.isSelf, showFooter: this.showFooter, messageId: this.messageId, reactions: this.reactions, messageType: this.messageType, timeColor: this.timeColor }));
|
|
212
|
+
}
|
|
213
|
+
static get is() { return "audio-bubble"; }
|
|
214
|
+
static get encapsulation() { return "shadow"; }
|
|
215
|
+
static get properties() {
|
|
216
|
+
return {
|
|
217
|
+
"audioUrl": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"mutable": false,
|
|
220
|
+
"complexType": {
|
|
221
|
+
"original": "string",
|
|
222
|
+
"resolved": "string",
|
|
223
|
+
"references": {}
|
|
224
|
+
},
|
|
225
|
+
"required": false,
|
|
226
|
+
"optional": false,
|
|
227
|
+
"docs": {
|
|
228
|
+
"tags": [],
|
|
229
|
+
"text": ""
|
|
230
|
+
},
|
|
231
|
+
"attribute": "audio-url",
|
|
232
|
+
"reflect": false
|
|
233
|
+
},
|
|
234
|
+
"audioWaveColor": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"mutable": false,
|
|
237
|
+
"complexType": {
|
|
238
|
+
"original": "string",
|
|
239
|
+
"resolved": "string",
|
|
240
|
+
"references": {}
|
|
241
|
+
},
|
|
242
|
+
"required": false,
|
|
243
|
+
"optional": false,
|
|
244
|
+
"docs": {
|
|
245
|
+
"tags": [],
|
|
246
|
+
"text": ""
|
|
247
|
+
},
|
|
248
|
+
"attribute": "audio-wave-color",
|
|
249
|
+
"reflect": false,
|
|
250
|
+
"defaultValue": "'#C5C5C5'"
|
|
251
|
+
},
|
|
252
|
+
"audioProgressColor": {
|
|
253
|
+
"type": "string",
|
|
254
|
+
"mutable": false,
|
|
255
|
+
"complexType": {
|
|
256
|
+
"original": "string",
|
|
257
|
+
"resolved": "string",
|
|
258
|
+
"references": {}
|
|
259
|
+
},
|
|
260
|
+
"required": false,
|
|
261
|
+
"optional": false,
|
|
262
|
+
"docs": {
|
|
263
|
+
"tags": [],
|
|
264
|
+
"text": ""
|
|
265
|
+
},
|
|
266
|
+
"attribute": "audio-progress-color",
|
|
267
|
+
"reflect": false,
|
|
268
|
+
"defaultValue": "'#4A76FD'"
|
|
269
|
+
},
|
|
270
|
+
"textColor": {
|
|
271
|
+
"type": "string",
|
|
272
|
+
"mutable": false,
|
|
273
|
+
"complexType": {
|
|
274
|
+
"original": "string",
|
|
275
|
+
"resolved": "string",
|
|
276
|
+
"references": {}
|
|
277
|
+
},
|
|
278
|
+
"required": false,
|
|
279
|
+
"optional": false,
|
|
280
|
+
"docs": {
|
|
281
|
+
"tags": [],
|
|
282
|
+
"text": ""
|
|
283
|
+
},
|
|
284
|
+
"attribute": "text-color",
|
|
285
|
+
"reflect": false,
|
|
286
|
+
"defaultValue": "'#4A76FD'"
|
|
287
|
+
},
|
|
288
|
+
"isSelf": {
|
|
289
|
+
"type": "boolean",
|
|
290
|
+
"mutable": false,
|
|
291
|
+
"complexType": {
|
|
292
|
+
"original": "boolean",
|
|
293
|
+
"resolved": "boolean",
|
|
294
|
+
"references": {}
|
|
295
|
+
},
|
|
296
|
+
"required": false,
|
|
297
|
+
"optional": false,
|
|
298
|
+
"docs": {
|
|
299
|
+
"tags": [],
|
|
300
|
+
"text": ""
|
|
301
|
+
},
|
|
302
|
+
"attribute": "is-self",
|
|
303
|
+
"reflect": false,
|
|
304
|
+
"defaultValue": "false"
|
|
305
|
+
},
|
|
306
|
+
"borderRadius": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"mutable": false,
|
|
309
|
+
"complexType": {
|
|
310
|
+
"original": "string",
|
|
311
|
+
"resolved": "string",
|
|
312
|
+
"references": {}
|
|
313
|
+
},
|
|
314
|
+
"required": false,
|
|
315
|
+
"optional": false,
|
|
316
|
+
"docs": {
|
|
317
|
+
"tags": [],
|
|
318
|
+
"text": ""
|
|
319
|
+
},
|
|
320
|
+
"attribute": "border-radius",
|
|
321
|
+
"reflect": false,
|
|
322
|
+
"defaultValue": "''"
|
|
323
|
+
},
|
|
324
|
+
"bgColor": {
|
|
325
|
+
"type": "string",
|
|
326
|
+
"mutable": false,
|
|
327
|
+
"complexType": {
|
|
328
|
+
"original": "string",
|
|
329
|
+
"resolved": "string",
|
|
330
|
+
"references": {}
|
|
331
|
+
},
|
|
332
|
+
"required": false,
|
|
333
|
+
"optional": false,
|
|
334
|
+
"docs": {
|
|
335
|
+
"tags": [],
|
|
336
|
+
"text": ""
|
|
337
|
+
},
|
|
338
|
+
"attribute": "bg-color",
|
|
339
|
+
"reflect": false,
|
|
340
|
+
"defaultValue": "''"
|
|
341
|
+
},
|
|
342
|
+
"time": {
|
|
343
|
+
"type": "string",
|
|
344
|
+
"mutable": false,
|
|
345
|
+
"complexType": {
|
|
346
|
+
"original": "string",
|
|
347
|
+
"resolved": "string",
|
|
348
|
+
"references": {}
|
|
349
|
+
},
|
|
350
|
+
"required": false,
|
|
351
|
+
"optional": false,
|
|
352
|
+
"docs": {
|
|
353
|
+
"tags": [],
|
|
354
|
+
"text": ""
|
|
355
|
+
},
|
|
356
|
+
"attribute": "time",
|
|
357
|
+
"reflect": false,
|
|
358
|
+
"defaultValue": "''"
|
|
359
|
+
},
|
|
360
|
+
"isRead": {
|
|
361
|
+
"type": "unknown",
|
|
362
|
+
"mutable": false,
|
|
363
|
+
"complexType": {
|
|
364
|
+
"original": "Boolean",
|
|
365
|
+
"resolved": "Boolean",
|
|
366
|
+
"references": {
|
|
367
|
+
"Boolean": {
|
|
368
|
+
"location": "global",
|
|
369
|
+
"id": "global::Boolean"
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
"required": false,
|
|
374
|
+
"optional": false,
|
|
375
|
+
"docs": {
|
|
376
|
+
"tags": [],
|
|
377
|
+
"text": ""
|
|
378
|
+
},
|
|
379
|
+
"defaultValue": "false"
|
|
380
|
+
},
|
|
381
|
+
"isDelivered": {
|
|
382
|
+
"type": "unknown",
|
|
383
|
+
"mutable": false,
|
|
384
|
+
"complexType": {
|
|
385
|
+
"original": "Boolean",
|
|
386
|
+
"resolved": "Boolean",
|
|
387
|
+
"references": {
|
|
388
|
+
"Boolean": {
|
|
389
|
+
"location": "global",
|
|
390
|
+
"id": "global::Boolean"
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
"required": false,
|
|
395
|
+
"optional": false,
|
|
396
|
+
"docs": {
|
|
397
|
+
"tags": [],
|
|
398
|
+
"text": ""
|
|
399
|
+
},
|
|
400
|
+
"defaultValue": "false"
|
|
401
|
+
},
|
|
402
|
+
"showFooter": {
|
|
403
|
+
"type": "unknown",
|
|
404
|
+
"mutable": false,
|
|
405
|
+
"complexType": {
|
|
406
|
+
"original": "Boolean",
|
|
407
|
+
"resolved": "Boolean",
|
|
408
|
+
"references": {
|
|
409
|
+
"Boolean": {
|
|
410
|
+
"location": "global",
|
|
411
|
+
"id": "global::Boolean"
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"required": false,
|
|
416
|
+
"optional": false,
|
|
417
|
+
"docs": {
|
|
418
|
+
"tags": [],
|
|
419
|
+
"text": ""
|
|
420
|
+
},
|
|
421
|
+
"defaultValue": "false"
|
|
422
|
+
},
|
|
423
|
+
"messageId": {
|
|
424
|
+
"type": "unknown",
|
|
425
|
+
"mutable": false,
|
|
426
|
+
"complexType": {
|
|
427
|
+
"original": "String",
|
|
428
|
+
"resolved": "String",
|
|
429
|
+
"references": {
|
|
430
|
+
"String": {
|
|
431
|
+
"location": "global",
|
|
432
|
+
"id": "global::String"
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"required": false,
|
|
437
|
+
"optional": false,
|
|
438
|
+
"docs": {
|
|
439
|
+
"tags": [],
|
|
440
|
+
"text": ""
|
|
441
|
+
},
|
|
442
|
+
"defaultValue": "''"
|
|
443
|
+
},
|
|
444
|
+
"timeColor": {
|
|
445
|
+
"type": "unknown",
|
|
446
|
+
"mutable": false,
|
|
447
|
+
"complexType": {
|
|
448
|
+
"original": "String",
|
|
449
|
+
"resolved": "String",
|
|
450
|
+
"references": {
|
|
451
|
+
"String": {
|
|
452
|
+
"location": "global",
|
|
453
|
+
"id": "global::String"
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
"required": false,
|
|
458
|
+
"optional": false,
|
|
459
|
+
"docs": {
|
|
460
|
+
"tags": [],
|
|
461
|
+
"text": ""
|
|
462
|
+
},
|
|
463
|
+
"defaultValue": "''"
|
|
464
|
+
},
|
|
465
|
+
"reactions": {
|
|
466
|
+
"type": "any",
|
|
467
|
+
"mutable": false,
|
|
468
|
+
"complexType": {
|
|
469
|
+
"original": "any",
|
|
470
|
+
"resolved": "any",
|
|
471
|
+
"references": {}
|
|
472
|
+
},
|
|
473
|
+
"required": false,
|
|
474
|
+
"optional": false,
|
|
475
|
+
"docs": {
|
|
476
|
+
"tags": [],
|
|
477
|
+
"text": ""
|
|
478
|
+
},
|
|
479
|
+
"attribute": "reactions",
|
|
480
|
+
"reflect": false,
|
|
481
|
+
"defaultValue": "{}"
|
|
482
|
+
},
|
|
483
|
+
"messageType": {
|
|
484
|
+
"type": "number",
|
|
485
|
+
"mutable": false,
|
|
486
|
+
"complexType": {
|
|
487
|
+
"original": "number",
|
|
488
|
+
"resolved": "number",
|
|
489
|
+
"references": {}
|
|
490
|
+
},
|
|
491
|
+
"required": false,
|
|
492
|
+
"optional": false,
|
|
493
|
+
"docs": {
|
|
494
|
+
"tags": [],
|
|
495
|
+
"text": ""
|
|
496
|
+
},
|
|
497
|
+
"attribute": "message-type",
|
|
498
|
+
"reflect": false
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
static get states() {
|
|
503
|
+
return {
|
|
504
|
+
"isPlaying": {},
|
|
505
|
+
"audioDuration": {},
|
|
506
|
+
"currentAudioId": {},
|
|
507
|
+
"waveformContainerReady": {},
|
|
508
|
+
"initializationAttempts": {}
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
static get elementRef() { return "el"; }
|
|
512
|
+
static get watchers() {
|
|
513
|
+
return [{
|
|
514
|
+
"propName": "audioUrl",
|
|
515
|
+
"methodName": "chatChanged"
|
|
516
|
+
}];
|
|
517
|
+
}
|
|
518
|
+
static get listeners() {
|
|
519
|
+
return [{
|
|
520
|
+
"name": "waveformReady",
|
|
521
|
+
"method": "handleWaveformReady",
|
|
522
|
+
"target": undefined,
|
|
523
|
+
"capture": false,
|
|
524
|
+
"passive": false
|
|
525
|
+
}];
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
//# sourceMappingURL=AudioBubble.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioBubble.js","sourceRoot":"","sources":["../../../src/components/ChatUIComponent/AudioBubble.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,iFAAiF,CAAC;AAOzF,MAAM,OAAO,WAAW;;QAwBd,eAAU,GAAQ,IAAI,CAAC;QACvB,sBAAiB,GAAgB,IAAI,CAAC;QACtC,wBAAmB,GAAoB,IAAI,CAAC;QAC5C,sBAAiB,GAAW,IAAI,CAAC;QAGjC,2BAAsB,GAAQ,IAAI,CAAC;QAsK3C,sBAAiB,GAAG,GAAG,EAAE;YACvB,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACtE,IAAI,CAAC,IAAI,CAAC,UAAU;gBAAE,OAAO;YAE7B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;YACvB,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC,CAAC;QAEF,qBAAgB,GAAG,GAAG,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;gBACrB,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;gBAEtC,IAAI,OAAO,EAAE,CAAC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C,IAAI,CAAC,cAAc,EAAE,CAAC;gBACxB,CAAC;YACH,CAAC,EAAE,GAAG,CAAC,CAAC;QACV,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,wEACE,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EACzC,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,SAAS,EAAE,IAAI,CAAC,SAAS,GACR,CACpB,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, State, Prop, Element, Watch, Listen } from '@stencil/core';\nimport WaveSurfer from 'wavesurfer.js';\nimport { convertSecondsToMinutes } from '../../lib/helpers';\nimport '../../stories/Components/MessageBubble/AudioMessageBubble/AudioMesaageBubble.js';\n\n@Component({\n tag: 'audio-bubble',\n styleUrl: '',\n shadow: true,\n})\nexport class AudioBubble {\n @Prop() audioUrl: string;\n @Prop() audioWaveColor: string = '#C5C5C5';\n @Prop() audioProgressColor: string = '#4A76FD';\n @Prop() textColor: string = '#4A76FD';\n @Prop() isSelf: boolean = false;\n @Prop() borderRadius: string = '';\n @Prop() bgColor: string = '';\n @Prop() time: string = '';\n @Prop() isRead: Boolean = false;\n @Prop() isDelivered: Boolean = false;\n @Prop() showFooter: Boolean = false;\n @Prop() messageId: String = '';\n @Prop() timeColor: String = '';\n @Prop() reactions: any = {};\n @Prop() messageType: number;\n\n @State() isPlaying: boolean = false;\n @State() audioDuration: string = '0:00';\n @State() currentAudioId: string = null;\n @State() waveformContainerReady: boolean = false;\n\n @Element() el: HTMLElement;\n\n private wavesurfer: any = null;\n private waveformContainer: HTMLElement = null;\n private loadAbortController: AbortController = null;\n private currentLoadingUrl: string = null;\n\n @State() initializationAttempts: number = 0;\n private initializationInterval: any = null;\n\n componentWillLoad() {\n if (typeof WaveSurfer !== 'function') {\n console.error('WaveSurfer is not available as a function. Import may be failing.');\n }\n }\n\n componentDidLoad() {\n if (this.initializationInterval) {\n clearInterval(this.initializationInterval);\n }\n\n // Start trying to initialize in a loop until successful\n this.initializationInterval = setInterval(() => {\n this.initializationAttempts++;\n console.log(`Initialization attempt ${this.initializationAttempts}...`);\n\n // Check if we have the necessary pieces\n if (this.waveformContainer && this.audioUrl) {\n this.initWaveSurfer();\n\n // If wavesurfer was created successfully, stop the interval\n if (this.wavesurfer) {\n clearInterval(this.initializationInterval);\n }\n } else {\n console.log('Still waiting for:', !this.waveformContainer ? 'waveform container' : '', !this.audioUrl ? 'audio URL' : '');\n }\n\n // Give up after 10 attempts\n if (this.initializationAttempts >= 10) {\n console.error('Failed to initialize WaveSurfer after 10 attempts');\n clearInterval(this.initializationInterval);\n }\n }, 500); // Try every 500ms\n }\n\n @Listen('waveformReady')\n handleWaveformReady(event: CustomEvent) {\n this.waveformContainer = event.detail;\n\n if (this.waveformContainer && this.audioUrl) {\n setTimeout(() => this.initWaveSurfer(), 100);\n }\n }\n\n initWaveSurfer() {\n if (!this.waveformContainer) {\n console.error('Waveform container reference is missing');\n return false;\n }\n\n if (!this.waveformContainer.isConnected) {\n console.error('Waveform container is not connected to DOM');\n return false;\n }\n\n if (!this.audioUrl) {\n console.error('Audio URL is missing');\n return false;\n }\n\n try {\n // Abort any ongoing loads before destroying\n this.abortCurrentLoad();\n\n // Destroy existing instance if any\n if (this.wavesurfer) {\n this.wavesurfer.destroy();\n this.wavesurfer = null;\n }\n\n // Create a new abort controller for this load operation\n this.loadAbortController = new AbortController();\n this.currentLoadingUrl = this.audioUrl;\n\n // Create a new instance with more basic settings first\n this.wavesurfer = WaveSurfer.create({\n container: this.waveformContainer,\n waveColor: this.isSelf ? '#000000' : this.audioWaveColor,\n progressColor: this.audioProgressColor,\n height: 40,\n barHeight: 1,\n barWidth: 4,\n barRadius: 3,\n barGap: 4,\n normalize: true,\n sampleRate: 60000,\n fetchParams: {\n signal: this.loadAbortController.signal\n }\n });\n\n if (!this.wavesurfer) {\n console.error('Failed to create WaveSurfer instance');\n return false;\n }\n\n this.wavesurfer.load(this.audioUrl);\n\n this.wavesurfer.on('ready', () => {\n // Only update if this is still the current URL\n if (this.currentLoadingUrl === this.audioUrl) {\n const totalDuration = this.wavesurfer.getDuration();\n const getSortedTime = convertSecondsToMinutes(Math.round(totalDuration));\n this.audioDuration = getSortedTime;\n }\n });\n \n this.wavesurfer.on('audioprocess', () => {\n const totalDuration = this.wavesurfer.getCurrentTime();\n const getSortedTime = convertSecondsToMinutes(Math.round(totalDuration));\n this.audioDuration = getSortedTime;\n });\n \n this.wavesurfer.on('finish', () => {\n this.isPlaying = false;\n this.wavesurfer.seekTo(0);\n \n // Add a small delay to ensure seekTo completes before setting audioDuration\n setTimeout(() => {\n const totalDuration = this.wavesurfer.getDuration();\n const getSortedTime = convertSecondsToMinutes(Math.round(totalDuration));\n this.audioDuration = getSortedTime;\n }, 50);\n });\n \n this.wavesurfer.on('error', err => {\n // Only log if it's not an abort error (which we expect when changing URLs)\n if (err.name !== 'AbortError') {\n console.error('WaveSurfer error:', err);\n }\n });\n\n return true;\n } catch (error) {\n console.error('Error initializing WaveSurfer:', error);\n return false;\n }\n }\n\n abortCurrentLoad() {\n // Abort any ongoing fetch operations\n if (this.loadAbortController) {\n this.loadAbortController.abort();\n this.loadAbortController = null;\n }\n this.currentLoadingUrl = null;\n }\n\n disconnectedCallback() {\n this.abortCurrentLoad();\n \n if (this.wavesurfer) {\n this.wavesurfer.destroy();\n this.wavesurfer = null;\n }\n \n this.isPlaying = false;\n \n if (this.initializationInterval) {\n clearInterval(this.initializationInterval);\n }\n }\n\n pauseAudioHandler = () => {\n console.log('Pause requested, wavesurfer exists:', !!this.wavesurfer);\n if (!this.wavesurfer) return;\n\n this.isPlaying = false;\n this.wavesurfer.pause();\n };\n\n playAudioHandler = () => {\n if (!this.wavesurfer) {\n const success = this.initWaveSurfer();\n\n if (success) {\n // Wait for the 'ready' event before playing\n this.wavesurfer.once('ready', () => {\n this.isPlaying = true;\n this.wavesurfer.play();\n });\n }\n return;\n }\n\n this.isPlaying = true;\n this.wavesurfer.play();\n };\n\n @Watch('audioUrl')\n chatChanged(newAudioUrl: string, oldAudioUrl: string) {\n // Only reinitialize if the URL actually changed\n if (newAudioUrl !== oldAudioUrl) {\n // Stop playback before changing URL\n if (this.wavesurfer && this.isPlaying) {\n this.wavesurfer.pause();\n this.isPlaying = false;\n }\n \n // Reset to default duration display\n this.audioDuration = '0:00';\n \n // Short delay to ensure clean state before reinitializing\n setTimeout(() => {\n if (this.waveformContainer && newAudioUrl) {\n this.initWaveSurfer();\n }\n }, 100);\n }\n }\n\n render() {\n return (\n <audio-bubble-ui\n isPlaying={this.isPlaying}\n audioDuration={this.audioDuration}\n playAudioHandler={this.playAudioHandler}\n pauseAudioHandler={this.pauseAudioHandler}\n isDelivered={this.isDelivered}\n isRead={this.isRead}\n time={this.time}\n borderRadius={this.borderRadius}\n bgColor={this.bgColor}\n textColor={this.textColor}\n isSelf={this.isSelf}\n showFooter={this.showFooter}\n messageId={this.messageId}\n reactions={this.reactions}\n messageType={this.messageType}\n timeColor={this.timeColor}\n ></audio-bubble-ui>\n );\n }\n}"]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import ChatSDK from "test-iso-chat-sdk";
|
|
3
|
+
import "../../stories/Components/BlockUsers/BlockUsers";
|
|
4
|
+
import { drawerDialogService } from "../../stories/Components/Dialog-Drawer/dialog-drawer.js";
|
|
5
|
+
export class BlockChatList {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.findBlokedUser = async (searchTag, skip = 0) => {
|
|
8
|
+
var _a;
|
|
9
|
+
if (skip === 0) {
|
|
10
|
+
this.isLoading = true;
|
|
11
|
+
this.blockUsers = [];
|
|
12
|
+
}
|
|
13
|
+
if (skip >= 20) {
|
|
14
|
+
this.paginationLoading = true;
|
|
15
|
+
}
|
|
16
|
+
this.hasMore = true;
|
|
17
|
+
try {
|
|
18
|
+
let payload = {
|
|
19
|
+
limit: 20,
|
|
20
|
+
skip: skip,
|
|
21
|
+
};
|
|
22
|
+
if (searchTag) {
|
|
23
|
+
payload['searchTag'] = searchTag;
|
|
24
|
+
}
|
|
25
|
+
const findRes = await ChatSDK.getInstance().user.getUserBlock(payload);
|
|
26
|
+
if (findRes === null || findRes === void 0 ? void 0 : findRes.users) {
|
|
27
|
+
if (skip === 0) {
|
|
28
|
+
this.blockUsers = [...findRes.users];
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
this.blockUsers = [...this.blockUsers, ...findRes.users];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (((_a = findRes === null || findRes === void 0 ? void 0 : findRes.users) === null || _a === void 0 ? void 0 : _a.length) < payload.limit) {
|
|
35
|
+
this.hasMore = false;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
if ((error === null || error === void 0 ? void 0 : error.status) === 404 || (error === null || error === void 0 ? void 0 : error.statusCode) === 404) {
|
|
40
|
+
this.hasMore = false;
|
|
41
|
+
}
|
|
42
|
+
if (((error === null || error === void 0 ? void 0 : error.status) === 404 || (error === null || error === void 0 ? void 0 : error.statusCode) === 404) && searchTag != null) {
|
|
43
|
+
this.blockUsers = [];
|
|
44
|
+
}
|
|
45
|
+
console.error(error);
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
this.isLoading = false;
|
|
49
|
+
this.paginationLoading = false;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
this.handleUnblockUser = async (conversationId) => {
|
|
53
|
+
var _a;
|
|
54
|
+
this.isLoading = true;
|
|
55
|
+
try {
|
|
56
|
+
await ChatSDK.getInstance().user.postUserUnblock({
|
|
57
|
+
opponentId: conversationId,
|
|
58
|
+
});
|
|
59
|
+
this.blockUsers = (_a = this.blockUsers) === null || _a === void 0 ? void 0 : _a.filter((user) => user.userId !== conversationId);
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
console.error(`Failed to unblock user with ID ${conversationId}:`, error);
|
|
63
|
+
}
|
|
64
|
+
finally {
|
|
65
|
+
this.isLoading = false;
|
|
66
|
+
drawerDialogService.closeDialog('confirm-dialog');
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
this.goBack = undefined;
|
|
70
|
+
this.blockUsers = [];
|
|
71
|
+
this.isLoading = false;
|
|
72
|
+
this.skip = 0;
|
|
73
|
+
this.hasMore = false;
|
|
74
|
+
this.paginationLoading = false;
|
|
75
|
+
}
|
|
76
|
+
async componentWillLoad() {
|
|
77
|
+
await this.findBlokedUser();
|
|
78
|
+
}
|
|
79
|
+
render() {
|
|
80
|
+
return (h("blocked-users-list", { key: '2ba93236b2c8d8fd9558605eeaba80970abe1d25', blockedUsers: this.blockUsers, isLoading: this.isLoading, handleUnblock: this.handleUnblockUser, goBack: () => this.goBack(), findBlokedUser: this.findBlokedUser, skip: this.skip, hasMore: this.hasMore, paginationLoading: this.paginationLoading }));
|
|
81
|
+
}
|
|
82
|
+
static get is() { return "block-chat-list"; }
|
|
83
|
+
static get encapsulation() { return "shadow"; }
|
|
84
|
+
static get styles() { return ":host{\n height:96%;\n }"; }
|
|
85
|
+
static get properties() {
|
|
86
|
+
return {
|
|
87
|
+
"goBack": {
|
|
88
|
+
"type": "unknown",
|
|
89
|
+
"mutable": false,
|
|
90
|
+
"complexType": {
|
|
91
|
+
"original": "() => void",
|
|
92
|
+
"resolved": "() => void",
|
|
93
|
+
"references": {}
|
|
94
|
+
},
|
|
95
|
+
"required": false,
|
|
96
|
+
"optional": false,
|
|
97
|
+
"docs": {
|
|
98
|
+
"tags": [],
|
|
99
|
+
"text": ""
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
static get states() {
|
|
105
|
+
return {
|
|
106
|
+
"blockUsers": {},
|
|
107
|
+
"isLoading": {},
|
|
108
|
+
"skip": {},
|
|
109
|
+
"hasMore": {},
|
|
110
|
+
"paginationLoading": {}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=BlockChatList.js.map
|