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,790 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import "../../../stories/Components/TestFooter/TestFooter";
|
|
3
|
+
import "../../../stories/Components/Toaster/Toaster";
|
|
4
|
+
import "../../../stories/Components/AttachmentBox/AttachmentPreview/AttachmentPreview";
|
|
5
|
+
import ChatSDK from "test-iso-chat-sdk";
|
|
6
|
+
import { getDeviceID, getGroupcastUrlQuery } from "../../../lib/helpers";
|
|
7
|
+
import "../../../stories/Components/ReplyBlock/ReplyBlock";
|
|
8
|
+
import { showToast } from "../../../stories/Components/Toaster/toast-helper";
|
|
9
|
+
import { postGroupCastMessage, getPresignedUrlForGroupcastMedia } from "../../../api/groupcast.js";
|
|
10
|
+
class ChatFooter {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.handleInputChange = async (event) => {
|
|
13
|
+
this.messageBody = event.detail.value;
|
|
14
|
+
if (!this.isGroupcast) {
|
|
15
|
+
this.debounceApiCall();
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
this.debounceApiCall = () => {
|
|
19
|
+
clearTimeout(this.debounceTimeout);
|
|
20
|
+
this.debounceTimeout = setTimeout(() => {
|
|
21
|
+
this.postTyping();
|
|
22
|
+
}, 300);
|
|
23
|
+
};
|
|
24
|
+
this.handleCameraClick = () => {
|
|
25
|
+
this.showCamera = true; // Use state instead of directly accessing ref
|
|
26
|
+
};
|
|
27
|
+
this.postTyping = async () => {
|
|
28
|
+
await ChatSDK.getInstance().message.postIndicateTyping({ conversationId: this.selectedConversationId });
|
|
29
|
+
};
|
|
30
|
+
this.generateSearchableTags = (body) => {
|
|
31
|
+
const words = body.trim().split(/\s+/);
|
|
32
|
+
if (words.length <= 4) {
|
|
33
|
+
return words;
|
|
34
|
+
}
|
|
35
|
+
const tags = [];
|
|
36
|
+
tags.push(words[0]);
|
|
37
|
+
tags.push(words[words.length - 1]);
|
|
38
|
+
const mid1 = Math.floor(words.length / 3);
|
|
39
|
+
const mid2 = Math.floor((2 * words.length) / 3);
|
|
40
|
+
tags.push(words[mid1]);
|
|
41
|
+
tags.push(words[mid2]);
|
|
42
|
+
return tags;
|
|
43
|
+
};
|
|
44
|
+
this.handleFileUpload = (event) => {
|
|
45
|
+
const { files } = event.detail;
|
|
46
|
+
this.attachmentDetails = files;
|
|
47
|
+
this.mediaPreviews = [];
|
|
48
|
+
Array.from(files).forEach((file) => {
|
|
49
|
+
const reader = new FileReader();
|
|
50
|
+
reader.onload = (e) => {
|
|
51
|
+
var _a;
|
|
52
|
+
const fileType = file.type.split('/')[0];
|
|
53
|
+
if (['image', 'video'].includes(fileType)) {
|
|
54
|
+
this.mediaPreviews = [
|
|
55
|
+
...this.mediaPreviews,
|
|
56
|
+
{
|
|
57
|
+
type: fileType,
|
|
58
|
+
src: (_a = e.target) === null || _a === void 0 ? void 0 : _a.result,
|
|
59
|
+
file,
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
reader.readAsDataURL(file);
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
this.createLocalMessage = (messageBody, attachments = null, messageId) => {
|
|
68
|
+
var _a;
|
|
69
|
+
return (Object.assign(Object.assign(Object.assign({ body: messageBody, messageId: messageId, deliveredToAll: 'pending', senderId: this.userMetaData.userId, messageType: this.replyMessage ? 2 : 0, sentAt: Date.now() }, (attachments && { attachments })), (((_a = this.mentionUserList) === null || _a === void 0 ? void 0 : _a.length) > 0 && { mentionedUsers: this.mentionUserList })), (this.replyMessage && { metaData: this.getReplyMetadata() })));
|
|
70
|
+
};
|
|
71
|
+
this.updateMessageWithApiResponse = (messageId, oldMessageId) => {
|
|
72
|
+
const newMessages = [...this.allMessages];
|
|
73
|
+
const indexOfLastMessage = newMessages.findIndex(message => message.messageId === oldMessageId);
|
|
74
|
+
if (indexOfLastMessage !== -1) {
|
|
75
|
+
const lastMessage = newMessages[indexOfLastMessage];
|
|
76
|
+
const lastNewMessage = Object.assign(Object.assign({}, lastMessage), { messageId, deliveredToAll: false });
|
|
77
|
+
newMessages.splice(indexOfLastMessage, 1, lastNewMessage);
|
|
78
|
+
this.updateAllMessages(newMessages);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
this.handleSendMessage = async () => {
|
|
82
|
+
var _a;
|
|
83
|
+
if (!this.messageBody.trim() && !this.attachmentDetails) {
|
|
84
|
+
const singleLineText = this.messageBody.replace(/\n/g, ' ');
|
|
85
|
+
this.messageBody = singleLineText;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this.handleremoveReplyMessage();
|
|
89
|
+
this.clearLinkPreview();
|
|
90
|
+
this.changeScrollToBottomState(true);
|
|
91
|
+
const conversationId = this.selectedConversationId;
|
|
92
|
+
const body = this.messageBody.trim();
|
|
93
|
+
if (body && !this.attachmentDetails) {
|
|
94
|
+
await this.sendTextMessage(body, conversationId);
|
|
95
|
+
}
|
|
96
|
+
else if (this.attachmentDetails && Array.isArray(this.attachmentDetails)) {
|
|
97
|
+
await this.sendMediaMessage(conversationId);
|
|
98
|
+
}
|
|
99
|
+
this.detectLinks = true;
|
|
100
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focusInput();
|
|
101
|
+
};
|
|
102
|
+
this.handleDirectAudioUpload = async (audioFile) => {
|
|
103
|
+
var _a;
|
|
104
|
+
this.changeMessageSendingState(true);
|
|
105
|
+
const conversationId = this.selectedConversationId;
|
|
106
|
+
let messageId = Date.now().toString() + Math.random() * 100;
|
|
107
|
+
const attachment = {
|
|
108
|
+
nameWithExtension: audioFile.name,
|
|
109
|
+
mediaType: 2, // Audio type
|
|
110
|
+
mediaId: audioFile.lastModified + '',
|
|
111
|
+
mimeType: audioFile.type,
|
|
112
|
+
size: audioFile.size,
|
|
113
|
+
file: audioFile,
|
|
114
|
+
};
|
|
115
|
+
const localAttachment = {
|
|
116
|
+
name: audioFile.name,
|
|
117
|
+
size: audioFile.size,
|
|
118
|
+
type: 'audio',
|
|
119
|
+
mediaUrl: URL.createObjectURL(audioFile),
|
|
120
|
+
mimeType: audioFile.type,
|
|
121
|
+
};
|
|
122
|
+
const localMessage = this.createLocalMessage('AttachmentMessage:Multiple', [localAttachment], messageId);
|
|
123
|
+
try {
|
|
124
|
+
await this.updateConversationListOnMessageSend(localMessage);
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
console.error('Error updating conversation list', error);
|
|
128
|
+
}
|
|
129
|
+
this.updateAllMessages([...this.allMessages, localMessage]);
|
|
130
|
+
try {
|
|
131
|
+
let resForPresignedUrl;
|
|
132
|
+
if (this.isGroupcast) {
|
|
133
|
+
resForPresignedUrl = await getPresignedUrlForGroupcastMedia((_a = this.userMetaData) === null || _a === void 0 ? void 0 : _a.userIdentifier, attachment.mimeType);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
resForPresignedUrl = await ChatSDK.getInstance().message.postMessagesPresignedurls({
|
|
137
|
+
conversationId: conversationId,
|
|
138
|
+
attachments: [attachment],
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
if (resForPresignedUrl === null || resForPresignedUrl === void 0 ? void 0 : resForPresignedUrl.presignedUrls) {
|
|
142
|
+
await this.uploadAndSendMedia(resForPresignedUrl.presignedUrls, [attachment], conversationId, messageId);
|
|
143
|
+
}
|
|
144
|
+
else if (resForPresignedUrl === null || resForPresignedUrl === void 0 ? void 0 : resForPresignedUrl.presignedUrl) {
|
|
145
|
+
await this.uploadAndSendMedia([resForPresignedUrl], [attachment], conversationId, messageId);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
console.error(error, 'Error while uploading the audio');
|
|
150
|
+
showToast({
|
|
151
|
+
message: error === null || error === void 0 ? void 0 : error.message,
|
|
152
|
+
type: 'error',
|
|
153
|
+
position: 'bottom-right',
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
finally {
|
|
157
|
+
this.changeMessageSendingState(false);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
this.handleClearAttachment = () => {
|
|
161
|
+
this.attachmentDetails = null;
|
|
162
|
+
this.mediaPreviews = [];
|
|
163
|
+
this.showCamera = false;
|
|
164
|
+
};
|
|
165
|
+
this.handleCameraCapture = async (captureData) => {
|
|
166
|
+
const customEvent = new CustomEvent('fileUploaded', {
|
|
167
|
+
detail: {
|
|
168
|
+
files: [captureData.file],
|
|
169
|
+
fileTypes: [captureData.type],
|
|
170
|
+
totalFiles: 1,
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
this.handleFileUpload(customEvent);
|
|
174
|
+
this.showCamera = false;
|
|
175
|
+
};
|
|
176
|
+
this.messageBody = '';
|
|
177
|
+
this.attachmentDetails = null;
|
|
178
|
+
this.deviceId = '';
|
|
179
|
+
this.mediaPreviews = [];
|
|
180
|
+
this.inputKey = 0;
|
|
181
|
+
this.showCloseIcon = false;
|
|
182
|
+
this.mentionUserList = [];
|
|
183
|
+
this.userMetaData = undefined;
|
|
184
|
+
this.refetchMessages = undefined;
|
|
185
|
+
this.changeMessageSendingState = undefined;
|
|
186
|
+
this.changeScrollToBottomState = undefined;
|
|
187
|
+
this.updateAllMessages = undefined;
|
|
188
|
+
this.allMessages = undefined;
|
|
189
|
+
this.selectedConversationId = undefined;
|
|
190
|
+
this.replyMessage = undefined;
|
|
191
|
+
this.handleremoveReplyMessage = undefined;
|
|
192
|
+
this.sortConversationsByLatestMessage = undefined;
|
|
193
|
+
this.conversationDetails = {};
|
|
194
|
+
this.allConversationList = [];
|
|
195
|
+
this.updateConversationListProp = undefined;
|
|
196
|
+
this.showCamera = false;
|
|
197
|
+
this.linkPreview = '';
|
|
198
|
+
this.linkToPreview = '';
|
|
199
|
+
this.detectLinks = true;
|
|
200
|
+
this.isGroupcast = false;
|
|
201
|
+
this.groupcastId = '';
|
|
202
|
+
}
|
|
203
|
+
async componentWillLoad() {
|
|
204
|
+
const deviceId = await getDeviceID();
|
|
205
|
+
this.deviceId = deviceId;
|
|
206
|
+
const { isGroupcast, groupcastId } = await getGroupcastUrlQuery();
|
|
207
|
+
this.isGroupcast = isGroupcast;
|
|
208
|
+
this.groupcastId = groupcastId;
|
|
209
|
+
}
|
|
210
|
+
async updateConversationListOnMessageSend(localMessage) {
|
|
211
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
212
|
+
// Ensure we have a valid conversation ID
|
|
213
|
+
if (!this.selectedConversationId) {
|
|
214
|
+
console.error('No selected conversation ID');
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
// Find if conversation exists
|
|
218
|
+
const existingConversationIndex = this.allConversationList.findIndex(conversation => conversation.conversationId === this.selectedConversationId);
|
|
219
|
+
// Prepare the message details
|
|
220
|
+
const messageDetails = {
|
|
221
|
+
body: localMessage.body,
|
|
222
|
+
updatedAt: localMessage.sentAt || Date.now(),
|
|
223
|
+
userName: (_a = this.userMetaData) === null || _a === void 0 ? void 0 : _a.userName,
|
|
224
|
+
userProfileImageUrl: ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userProfileImageUrl) || '',
|
|
225
|
+
isDeliveredToAllMembers: false,
|
|
226
|
+
isReadByAllMembers: false,
|
|
227
|
+
isPendingAllMembers: true,
|
|
228
|
+
senderId: (_c = this.userMetaData) === null || _c === void 0 ? void 0 : _c.userId,
|
|
229
|
+
sentAt: localMessage.sentAt || Date.now(),
|
|
230
|
+
messageId: localMessage.messageId,
|
|
231
|
+
attachments: localMessage.attachments || [],
|
|
232
|
+
senderName: (_d = this.userMetaData) === null || _d === void 0 ? void 0 : _d.userName,
|
|
233
|
+
};
|
|
234
|
+
// Create a new conversation list
|
|
235
|
+
let updatedConversationList = [...this.allConversationList];
|
|
236
|
+
if (existingConversationIndex !== -1) {
|
|
237
|
+
// Update existing conversation
|
|
238
|
+
updatedConversationList[existingConversationIndex] = Object.assign(Object.assign({}, updatedConversationList[existingConversationIndex]), { lastMessageDetails: messageDetails });
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
// Create new conversation
|
|
242
|
+
const newConversation = {
|
|
243
|
+
conversationId: this.selectedConversationId,
|
|
244
|
+
lastMessageDetails: messageDetails,
|
|
245
|
+
isGroup: ((_e = this.conversationDetails) === null || _e === void 0 ? void 0 : _e.conversationType) === 1,
|
|
246
|
+
conversationTitle: ((_f = this.conversationDetails) === null || _f === void 0 ? void 0 : _f.conversationTitle) || '',
|
|
247
|
+
conversationImageUrl: ((_g = this.conversationDetails) === null || _g === void 0 ? void 0 : _g.conversationImageUrl) || '',
|
|
248
|
+
opponentDetails: ((_h = this.conversationDetails) === null || _h === void 0 ? void 0 : _h.opponentDetails) || null,
|
|
249
|
+
};
|
|
250
|
+
updatedConversationList.unshift(newConversation);
|
|
251
|
+
}
|
|
252
|
+
// Verify the prop method exists and is a function
|
|
253
|
+
if (typeof this.updateConversationListProp === 'function') {
|
|
254
|
+
try {
|
|
255
|
+
// Call the prop method and log the result
|
|
256
|
+
this.updateConversationListProp(updatedConversationList);
|
|
257
|
+
}
|
|
258
|
+
catch (error) {
|
|
259
|
+
console.error('Error updating conversation list', error);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
console.warn('updateConversationListProp is not a function', this.updateConversationListProp);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
clearLinkPreview() {
|
|
267
|
+
this.linkPreview = '';
|
|
268
|
+
this.linkToPreview = '';
|
|
269
|
+
}
|
|
270
|
+
async sendTextMessage(body, conversationId) {
|
|
271
|
+
var _a;
|
|
272
|
+
this.messageBody = '';
|
|
273
|
+
let messageId = 'localId' + Date.now().toString() + Math.random() * 100;
|
|
274
|
+
const localMessage = this.createLocalMessage(body, null, messageId);
|
|
275
|
+
try {
|
|
276
|
+
await this.updateConversationListOnMessageSend(localMessage);
|
|
277
|
+
}
|
|
278
|
+
catch (error) {
|
|
279
|
+
console.error('Error updating conversation list', error);
|
|
280
|
+
}
|
|
281
|
+
this.updateAllMessages([...this.allMessages, localMessage]);
|
|
282
|
+
this.changeMessageSendingState(true);
|
|
283
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
284
|
+
const isGroupcast = urlParams.has('groupcast');
|
|
285
|
+
const groupcastId = urlParams.get('groupcast');
|
|
286
|
+
if (isGroupcast) {
|
|
287
|
+
const payloadForGroupcastMessage = {
|
|
288
|
+
showInConversation: true,
|
|
289
|
+
sendPushForNewConversationCreated: true,
|
|
290
|
+
searchableTags: this.generateSearchableTags(body),
|
|
291
|
+
metaData: this.getReplyMetadata(),
|
|
292
|
+
body: body,
|
|
293
|
+
groupcastId: groupcastId,
|
|
294
|
+
readCount: 1,
|
|
295
|
+
notifyOnCompletion: true,
|
|
296
|
+
messageType: this.replyMessage ? 2 : 0,
|
|
297
|
+
hideNewConversationsForSender: true,
|
|
298
|
+
encrypted: true,
|
|
299
|
+
deviceId: this.deviceId,
|
|
300
|
+
deliveryCount: 1,
|
|
301
|
+
};
|
|
302
|
+
try {
|
|
303
|
+
const res = await postGroupCastMessage(payloadForGroupcastMessage);
|
|
304
|
+
this.updateMessageWithApiResponse(res.messageId, messageId);
|
|
305
|
+
}
|
|
306
|
+
catch (error) {
|
|
307
|
+
console.error(error, 'Error while sending groupcast message');
|
|
308
|
+
showToast({
|
|
309
|
+
message: error === null || error === void 0 ? void 0 : error.message,
|
|
310
|
+
type: 'error',
|
|
311
|
+
position: 'bottom-right',
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
const payload = {
|
|
317
|
+
showInConversation: true,
|
|
318
|
+
messageType: this.replyMessage ? 2 : 0,
|
|
319
|
+
parentMessageId: this.replyMessage ? this.replyMessage.messageId : undefined,
|
|
320
|
+
searchableTags: this.generateSearchableTags(body),
|
|
321
|
+
encrypted: false,
|
|
322
|
+
conversationId: conversationId,
|
|
323
|
+
deviceId: this.deviceId,
|
|
324
|
+
customType: (body === null || body === void 0 ? void 0 : body.match(/(https?:\/\/[^\s]+)/g)) ? 'AttachmentMessage:Link' : 'AttachmentMessage:Text',
|
|
325
|
+
body: body,
|
|
326
|
+
metaData: this.getReplyMetadata(),
|
|
327
|
+
social: true,
|
|
328
|
+
};
|
|
329
|
+
if (((_a = this.mentionUserList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
330
|
+
payload['mentionedUsers'] = this.mentionUserList;
|
|
331
|
+
}
|
|
332
|
+
try {
|
|
333
|
+
const res = await ChatSDK.getInstance().message.postMessages(payload);
|
|
334
|
+
this.updateMessageWithApiResponse(res.messageId, messageId);
|
|
335
|
+
}
|
|
336
|
+
catch (error) {
|
|
337
|
+
console.error(error, 'postMessages error for text');
|
|
338
|
+
showToast({
|
|
339
|
+
message: error === null || error === void 0 ? void 0 : error.message,
|
|
340
|
+
type: 'error',
|
|
341
|
+
position: 'bottom-right',
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
finally {
|
|
345
|
+
this.changeMessageSendingState(false);
|
|
346
|
+
this.replyMessage = null;
|
|
347
|
+
this.messageBody = '';
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
async sendMediaMessage(conversationId) {
|
|
352
|
+
var _a;
|
|
353
|
+
this.changeMessageSendingState(true);
|
|
354
|
+
let messageId = Date.now().toString() + Math.random() * 100;
|
|
355
|
+
const attachments = this.attachmentDetails.map(file => ({
|
|
356
|
+
nameWithExtension: file.name,
|
|
357
|
+
mediaType: file.type.startsWith('image/') ? 0 : file.type.startsWith('video/') ? 1 : file.type.startsWith('audio/') ? 2 : 3,
|
|
358
|
+
mediaId: file.lastModified + '',
|
|
359
|
+
mimeType: file.type,
|
|
360
|
+
size: file.size,
|
|
361
|
+
file,
|
|
362
|
+
}));
|
|
363
|
+
const localAttachments = this.mediaPreviews.map(preview => ({
|
|
364
|
+
name: preview.file.name,
|
|
365
|
+
size: preview.file.size,
|
|
366
|
+
type: preview.type,
|
|
367
|
+
mediaUrl: preview.src,
|
|
368
|
+
mimeType: preview.file.type,
|
|
369
|
+
}));
|
|
370
|
+
const localMessage = this.createLocalMessage(this.messageBody || 'AttachmentMessage:Multiple', localAttachments, messageId);
|
|
371
|
+
try {
|
|
372
|
+
await this.updateConversationListOnMessageSend(localMessage);
|
|
373
|
+
}
|
|
374
|
+
catch (error) {
|
|
375
|
+
console.error('Error updating conversation list', error);
|
|
376
|
+
}
|
|
377
|
+
this.updateAllMessages([...this.allMessages, localMessage]);
|
|
378
|
+
this.handleClearAttachment();
|
|
379
|
+
let payload = {
|
|
380
|
+
conversationId: conversationId,
|
|
381
|
+
attachments: attachments,
|
|
382
|
+
};
|
|
383
|
+
try {
|
|
384
|
+
let resForPresignedUrl;
|
|
385
|
+
if (this.isGroupcast) {
|
|
386
|
+
resForPresignedUrl = await getPresignedUrlForGroupcastMedia((_a = this.userMetaData) === null || _a === void 0 ? void 0 : _a.userIdentifier, attachments === null || attachments === void 0 ? void 0 : attachments.mimeType);
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
resForPresignedUrl = await ChatSDK.getInstance().message.postMessagesPresignedurls(payload);
|
|
390
|
+
}
|
|
391
|
+
if (resForPresignedUrl === null || resForPresignedUrl === void 0 ? void 0 : resForPresignedUrl.presignedUrls) {
|
|
392
|
+
await this.uploadAndSendMedia(resForPresignedUrl.presignedUrls, attachments, conversationId, messageId);
|
|
393
|
+
}
|
|
394
|
+
else if (resForPresignedUrl === null || resForPresignedUrl === void 0 ? void 0 : resForPresignedUrl.presignedUrl) {
|
|
395
|
+
await this.uploadAndSendMedia([resForPresignedUrl], attachments, conversationId, messageId);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
catch (error) {
|
|
399
|
+
console.error(error, 'Error while uploading the media for Presignedurls');
|
|
400
|
+
showToast({
|
|
401
|
+
message: error === null || error === void 0 ? void 0 : error.message,
|
|
402
|
+
type: 'error',
|
|
403
|
+
position: 'bottom-right',
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
finally {
|
|
407
|
+
this.changeMessageSendingState(false);
|
|
408
|
+
this.messageBody = '';
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
async uploadAndSendMedia(presignedUrls, attachments, conversationId, oldMessageId) {
|
|
412
|
+
var _a, _b, _c;
|
|
413
|
+
const allPayloads = [];
|
|
414
|
+
const uploadPromises = presignedUrls.map(async (urlDetails, index) => {
|
|
415
|
+
let mediaId, mediaUrl, thumbnailUrl, mediaPresignedUrl;
|
|
416
|
+
if (this.isGroupcast) {
|
|
417
|
+
mediaUrl = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl;
|
|
418
|
+
mediaPresignedUrl = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.presignedUrl;
|
|
419
|
+
mediaId = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl;
|
|
420
|
+
thumbnailUrl = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl;
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
({ mediaPresignedUrl, mediaId, mediaUrl, thumbnailUrl } = urlDetails);
|
|
424
|
+
}
|
|
425
|
+
const attachmentPayload = attachments[index];
|
|
426
|
+
const fileExtensionType = attachmentPayload.mimeType.split('/')[1];
|
|
427
|
+
const newPayload = {
|
|
428
|
+
mediaId,
|
|
429
|
+
mediaUrl,
|
|
430
|
+
thumbnailUrl,
|
|
431
|
+
mediaType: attachmentPayload.mediaType,
|
|
432
|
+
nameWithExtension: attachmentPayload.nameWithExtension,
|
|
433
|
+
name: attachmentPayload.nameWithExtension,
|
|
434
|
+
mimeType: attachmentPayload.mimeType,
|
|
435
|
+
extension: fileExtensionType,
|
|
436
|
+
size: attachmentPayload.size,
|
|
437
|
+
attachmentType: 0,
|
|
438
|
+
};
|
|
439
|
+
allPayloads.push(newPayload);
|
|
440
|
+
await fetch(mediaPresignedUrl, {
|
|
441
|
+
method: 'PUT',
|
|
442
|
+
body: attachmentPayload.file,
|
|
443
|
+
headers: {
|
|
444
|
+
'Content-Type': attachmentPayload.mimeType,
|
|
445
|
+
},
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
await Promise.all(uploadPromises);
|
|
449
|
+
// Determine customType based on media type
|
|
450
|
+
let customType = 'AttachmentMessage:Multiple';
|
|
451
|
+
if ((_a = attachments === null || attachments === void 0 ? void 0 : attachments[0]) === null || _a === void 0 ? void 0 : _a.mimeType) {
|
|
452
|
+
if (attachments[0].mimeType.startsWith('image/')) {
|
|
453
|
+
customType = 'AttachmentMessage:Image';
|
|
454
|
+
}
|
|
455
|
+
else if (attachments[0].mimeType.startsWith('video/')) {
|
|
456
|
+
customType = 'AttachmentMessage:Video';
|
|
457
|
+
}
|
|
458
|
+
else if (attachments[0].mimeType.startsWith('audio/')) {
|
|
459
|
+
customType = 'AttachmentMessage:Audio';
|
|
460
|
+
}
|
|
461
|
+
else if (attachments[0].mimeType.startsWith('application/')) {
|
|
462
|
+
customType = 'AttachmentMessage:Doc';
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
let payload = {
|
|
466
|
+
showInConversation: true,
|
|
467
|
+
messageType: this.replyMessage ? 2 : 0,
|
|
468
|
+
parentMessageId: (_b = this.replyMessage) === null || _b === void 0 ? void 0 : _b.messageId,
|
|
469
|
+
encrypted: false,
|
|
470
|
+
conversationId,
|
|
471
|
+
body: 'AttachmentMessage:Multiple',
|
|
472
|
+
customType: customType,
|
|
473
|
+
attachments: allPayloads,
|
|
474
|
+
deviceId: this.deviceId,
|
|
475
|
+
metaData: this.getReplyMetadata(),
|
|
476
|
+
social: true,
|
|
477
|
+
};
|
|
478
|
+
let payloadForGroupcastMessage = Object.assign(Object.assign({}, payload), { hideNewConversationsForSender: false, groupcastId: this.groupcastId, notifyOnCompletion: true, sendPushForNewConversationCreated: true });
|
|
479
|
+
if (((_c = this.mentionUserList) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
480
|
+
payload['mentionedUsers'] = this.mentionUserList;
|
|
481
|
+
}
|
|
482
|
+
try {
|
|
483
|
+
let sendMessageRes;
|
|
484
|
+
if (this.isGroupcast) {
|
|
485
|
+
sendMessageRes = await postGroupCastMessage(payloadForGroupcastMessage);
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
sendMessageRes = await ChatSDK.getInstance().message.postMessages(payload);
|
|
489
|
+
}
|
|
490
|
+
this.updateMessageWithApiResponse(sendMessageRes.messageId, oldMessageId);
|
|
491
|
+
this.replyMessage = null;
|
|
492
|
+
showToast({
|
|
493
|
+
message: 'Media sent successfully!',
|
|
494
|
+
type: 'success',
|
|
495
|
+
position: 'bottom-right',
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
catch (error) {
|
|
499
|
+
console.error(error, 'Error while sending the message');
|
|
500
|
+
showToast({
|
|
501
|
+
message: error === null || error === void 0 ? void 0 : error.message,
|
|
502
|
+
type: 'error',
|
|
503
|
+
position: 'bottom-right',
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
getReplyMetadata() {
|
|
508
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
509
|
+
return Object.assign(Object.assign({ parentMessageId: (_a = this.replyMessage) === null || _a === void 0 ? void 0 : _a.messageId, parentMessage: (_b = this.replyMessage) === null || _b === void 0 ? void 0 : _b.body, parentMessageTime: (_c = this.replyMessage) === null || _c === void 0 ? void 0 : _c.sentAt, parentMessageSenderId: (_e = (_d = this.replyMessage) === null || _d === void 0 ? void 0 : _d.senderInfo) === null || _e === void 0 ? void 0 : _e.userId, parentMessageSenderName: (_g = (_f = this.replyMessage) === null || _f === void 0 ? void 0 : _f.senderInfo) === null || _g === void 0 ? void 0 : _g.userName }, (((_j = (_h = this.replyMessage) === null || _h === void 0 ? void 0 : _h.attachments) === null || _j === void 0 ? void 0 : _j[0]) && {
|
|
510
|
+
parentMessageName: this.replyMessage.attachments[0].name,
|
|
511
|
+
parentMessageMediaUrl: this.replyMessage.attachments[0].mediaUrl,
|
|
512
|
+
parentMessageType: this.replyMessage.attachments[0].mimeType,
|
|
513
|
+
})), (((_k = this.messageBody) === null || _k === void 0 ? void 0 : _k.trim()) && { captionMessage: this.messageBody.trim() }));
|
|
514
|
+
}
|
|
515
|
+
async handleDataChange() {
|
|
516
|
+
this.handleClearAttachment();
|
|
517
|
+
}
|
|
518
|
+
replyFocusHandler() {
|
|
519
|
+
var _a;
|
|
520
|
+
if (this.inputRef && this.replyMessage) {
|
|
521
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focusInput();
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
handleMentionUser(event) {
|
|
525
|
+
const { value, mentionUsersList } = event.detail;
|
|
526
|
+
this.messageBody = value;
|
|
527
|
+
this.mentionUserList = mentionUsersList;
|
|
528
|
+
}
|
|
529
|
+
render() {
|
|
530
|
+
const contentType = this.attachmentDetails ? this.attachmentDetails.map(detail => { var _a; return ((_a = detail === null || detail === void 0 ? void 0 : detail.type) === null || _a === void 0 ? void 0 : _a.split('/')[0]) || ''; }) : [];
|
|
531
|
+
const currentPreviews = this.mediaPreviews.filter(preview => contentType.includes(preview.type)).map(preview => preview.src);
|
|
532
|
+
return (h("div", { key: '2e8cb768da2f5e4db18344b7e1cebce1d11d5521', class: "chat-footer-container" }, this.attachmentDetails || this.showCamera ? (h("attachment-preview", { showCamera: this.showCamera, onClose: this.handleClearAttachment, width: "150px", height: "150px", bgColor: "var(--bg-primary-light)", padding: "3px", margin: "10px 0 0 0", contentType: contentType, content: this.mediaPreviews, onSend: this.handleSendMessage, "onfile-uploaded": this.handleFileUpload, key: this.inputKey, inputValue: this.messageBody, "oninput-change": this.handleInputChange, backgroundColor: "var(--bg-primary-color)", containerBoxShadow: "none", inputFontColor: "var(--text-primary-color)", inputBgColor: "var(--bg-message-input-color)", inputPlaceholderColor: "var(--text-secondary-color)", inputBorderColor: "var(--border-subtle)", inputBorderRadius: "var(--radius-md)", conversationDetails: this.conversationDetails, userMetaData: this.userMetaData })) : (h("my-test-footer", { key: this.inputKey, inputValue: this.messageBody, onFileUploaded: this.handleFileUpload, "oninput-change": this.handleInputChange, onSendClick: this.handleSendMessage, backgroundColor: "var(--bg-primary-color)", containerBoxShadow: "none", inputFontColor: "var(--text-primary-color)", showCross: this.attachmentDetails ? true : false, contentType: contentType, content: currentPreviews, onClose: this.handleClearAttachment, ref: el => (this.inputRef = el), replyMessage: this.replyMessage, handleremoveReplyMessage: this.handleremoveReplyMessage, conversationDetails: this.conversationDetails, userMetaData: this.userMetaData, onCameraClick: this.handleCameraClick, linkPreview: this.linkPreview, linkToPreview: this.linkToPreview, detectLinks: this.detectLinks, handleDirectAudioUpload: this.handleDirectAudioUpload, selectedConversationId: this.selectedConversationId }))));
|
|
533
|
+
}
|
|
534
|
+
static get is() { return "chat-footer"; }
|
|
535
|
+
static get encapsulation() { return "shadow"; }
|
|
536
|
+
static get styles() { return ".chat-footer-container {\n position: relative;\n }\n .toaster {\n position: fixed;\n bottom: 20px;\n right: 20px;\n z-index: 1000;\n }"; }
|
|
537
|
+
static get properties() {
|
|
538
|
+
return {
|
|
539
|
+
"userMetaData": {
|
|
540
|
+
"type": "any",
|
|
541
|
+
"mutable": false,
|
|
542
|
+
"complexType": {
|
|
543
|
+
"original": "any",
|
|
544
|
+
"resolved": "any",
|
|
545
|
+
"references": {}
|
|
546
|
+
},
|
|
547
|
+
"required": false,
|
|
548
|
+
"optional": false,
|
|
549
|
+
"docs": {
|
|
550
|
+
"tags": [],
|
|
551
|
+
"text": ""
|
|
552
|
+
},
|
|
553
|
+
"attribute": "user-meta-data",
|
|
554
|
+
"reflect": false
|
|
555
|
+
},
|
|
556
|
+
"refetchMessages": {
|
|
557
|
+
"type": "unknown",
|
|
558
|
+
"mutable": false,
|
|
559
|
+
"complexType": {
|
|
560
|
+
"original": "() => void",
|
|
561
|
+
"resolved": "() => void",
|
|
562
|
+
"references": {}
|
|
563
|
+
},
|
|
564
|
+
"required": false,
|
|
565
|
+
"optional": false,
|
|
566
|
+
"docs": {
|
|
567
|
+
"tags": [],
|
|
568
|
+
"text": ""
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
"changeMessageSendingState": {
|
|
572
|
+
"type": "unknown",
|
|
573
|
+
"mutable": false,
|
|
574
|
+
"complexType": {
|
|
575
|
+
"original": "(newState: boolean) => void",
|
|
576
|
+
"resolved": "(newState: boolean) => void",
|
|
577
|
+
"references": {}
|
|
578
|
+
},
|
|
579
|
+
"required": false,
|
|
580
|
+
"optional": false,
|
|
581
|
+
"docs": {
|
|
582
|
+
"tags": [],
|
|
583
|
+
"text": ""
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
"changeScrollToBottomState": {
|
|
587
|
+
"type": "unknown",
|
|
588
|
+
"mutable": false,
|
|
589
|
+
"complexType": {
|
|
590
|
+
"original": "(newState: boolean) => void",
|
|
591
|
+
"resolved": "(newState: boolean) => void",
|
|
592
|
+
"references": {}
|
|
593
|
+
},
|
|
594
|
+
"required": false,
|
|
595
|
+
"optional": false,
|
|
596
|
+
"docs": {
|
|
597
|
+
"tags": [],
|
|
598
|
+
"text": ""
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
"updateAllMessages": {
|
|
602
|
+
"type": "unknown",
|
|
603
|
+
"mutable": false,
|
|
604
|
+
"complexType": {
|
|
605
|
+
"original": "(newMessages: any) => void",
|
|
606
|
+
"resolved": "(newMessages: any) => void",
|
|
607
|
+
"references": {}
|
|
608
|
+
},
|
|
609
|
+
"required": false,
|
|
610
|
+
"optional": false,
|
|
611
|
+
"docs": {
|
|
612
|
+
"tags": [],
|
|
613
|
+
"text": ""
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
"allMessages": {
|
|
617
|
+
"type": "any",
|
|
618
|
+
"mutable": false,
|
|
619
|
+
"complexType": {
|
|
620
|
+
"original": "any",
|
|
621
|
+
"resolved": "any",
|
|
622
|
+
"references": {}
|
|
623
|
+
},
|
|
624
|
+
"required": false,
|
|
625
|
+
"optional": false,
|
|
626
|
+
"docs": {
|
|
627
|
+
"tags": [],
|
|
628
|
+
"text": ""
|
|
629
|
+
},
|
|
630
|
+
"attribute": "all-messages",
|
|
631
|
+
"reflect": false
|
|
632
|
+
},
|
|
633
|
+
"selectedConversationId": {
|
|
634
|
+
"type": "string",
|
|
635
|
+
"mutable": false,
|
|
636
|
+
"complexType": {
|
|
637
|
+
"original": "string",
|
|
638
|
+
"resolved": "string",
|
|
639
|
+
"references": {}
|
|
640
|
+
},
|
|
641
|
+
"required": false,
|
|
642
|
+
"optional": false,
|
|
643
|
+
"docs": {
|
|
644
|
+
"tags": [],
|
|
645
|
+
"text": ""
|
|
646
|
+
},
|
|
647
|
+
"attribute": "selected-conversation-id",
|
|
648
|
+
"reflect": false
|
|
649
|
+
},
|
|
650
|
+
"replyMessage": {
|
|
651
|
+
"type": "any",
|
|
652
|
+
"mutable": true,
|
|
653
|
+
"complexType": {
|
|
654
|
+
"original": "any",
|
|
655
|
+
"resolved": "any",
|
|
656
|
+
"references": {}
|
|
657
|
+
},
|
|
658
|
+
"required": false,
|
|
659
|
+
"optional": false,
|
|
660
|
+
"docs": {
|
|
661
|
+
"tags": [],
|
|
662
|
+
"text": ""
|
|
663
|
+
},
|
|
664
|
+
"attribute": "reply-message",
|
|
665
|
+
"reflect": false
|
|
666
|
+
},
|
|
667
|
+
"handleremoveReplyMessage": {
|
|
668
|
+
"type": "unknown",
|
|
669
|
+
"mutable": false,
|
|
670
|
+
"complexType": {
|
|
671
|
+
"original": "() => void",
|
|
672
|
+
"resolved": "() => void",
|
|
673
|
+
"references": {}
|
|
674
|
+
},
|
|
675
|
+
"required": false,
|
|
676
|
+
"optional": false,
|
|
677
|
+
"docs": {
|
|
678
|
+
"tags": [],
|
|
679
|
+
"text": ""
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
"sortConversationsByLatestMessage": {
|
|
683
|
+
"type": "unknown",
|
|
684
|
+
"mutable": false,
|
|
685
|
+
"complexType": {
|
|
686
|
+
"original": "(conversations: any[]) => void",
|
|
687
|
+
"resolved": "(conversations: any[]) => void",
|
|
688
|
+
"references": {}
|
|
689
|
+
},
|
|
690
|
+
"required": false,
|
|
691
|
+
"optional": false,
|
|
692
|
+
"docs": {
|
|
693
|
+
"tags": [],
|
|
694
|
+
"text": ""
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
"conversationDetails": {
|
|
698
|
+
"type": "unknown",
|
|
699
|
+
"mutable": true,
|
|
700
|
+
"complexType": {
|
|
701
|
+
"original": "ConversationDetails",
|
|
702
|
+
"resolved": "ConversationDetails",
|
|
703
|
+
"references": {
|
|
704
|
+
"ConversationDetails": {
|
|
705
|
+
"location": "global",
|
|
706
|
+
"id": "global::ConversationDetails"
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
"required": false,
|
|
711
|
+
"optional": false,
|
|
712
|
+
"docs": {
|
|
713
|
+
"tags": [],
|
|
714
|
+
"text": ""
|
|
715
|
+
},
|
|
716
|
+
"defaultValue": "{} as ConversationDetails"
|
|
717
|
+
},
|
|
718
|
+
"allConversationList": {
|
|
719
|
+
"type": "any",
|
|
720
|
+
"mutable": true,
|
|
721
|
+
"complexType": {
|
|
722
|
+
"original": "any",
|
|
723
|
+
"resolved": "any",
|
|
724
|
+
"references": {}
|
|
725
|
+
},
|
|
726
|
+
"required": false,
|
|
727
|
+
"optional": false,
|
|
728
|
+
"docs": {
|
|
729
|
+
"tags": [],
|
|
730
|
+
"text": ""
|
|
731
|
+
},
|
|
732
|
+
"attribute": "all-conversation-list",
|
|
733
|
+
"reflect": false,
|
|
734
|
+
"defaultValue": "[]"
|
|
735
|
+
},
|
|
736
|
+
"updateConversationListProp": {
|
|
737
|
+
"type": "unknown",
|
|
738
|
+
"mutable": false,
|
|
739
|
+
"complexType": {
|
|
740
|
+
"original": "(updatedList: any[]) => void",
|
|
741
|
+
"resolved": "(updatedList: any[]) => void",
|
|
742
|
+
"references": {}
|
|
743
|
+
},
|
|
744
|
+
"required": false,
|
|
745
|
+
"optional": false,
|
|
746
|
+
"docs": {
|
|
747
|
+
"tags": [],
|
|
748
|
+
"text": ""
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
static get states() {
|
|
754
|
+
return {
|
|
755
|
+
"messageBody": {},
|
|
756
|
+
"attachmentDetails": {},
|
|
757
|
+
"deviceId": {},
|
|
758
|
+
"mediaPreviews": {},
|
|
759
|
+
"inputKey": {},
|
|
760
|
+
"showCloseIcon": {},
|
|
761
|
+
"mentionUserList": {},
|
|
762
|
+
"showCamera": {},
|
|
763
|
+
"linkPreview": {},
|
|
764
|
+
"linkToPreview": {},
|
|
765
|
+
"detectLinks": {},
|
|
766
|
+
"isGroupcast": {},
|
|
767
|
+
"groupcastId": {}
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
static get watchers() {
|
|
771
|
+
return [{
|
|
772
|
+
"propName": "selectedConversationId",
|
|
773
|
+
"methodName": "handleDataChange"
|
|
774
|
+
}, {
|
|
775
|
+
"propName": "replyMessage",
|
|
776
|
+
"methodName": "replyFocusHandler"
|
|
777
|
+
}];
|
|
778
|
+
}
|
|
779
|
+
static get listeners() {
|
|
780
|
+
return [{
|
|
781
|
+
"name": "mention-user",
|
|
782
|
+
"method": "handleMentionUser",
|
|
783
|
+
"target": undefined,
|
|
784
|
+
"capture": false,
|
|
785
|
+
"passive": false
|
|
786
|
+
}];
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
export { ChatFooter };
|
|
790
|
+
//# sourceMappingURL=ChatFooter.js.map
|