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,1339 @@
|
|
|
1
|
+
import { css, html, LitElement } from 'lit';
|
|
2
|
+
import '../Inputbox/Input';
|
|
3
|
+
import '../AttachmentBox/AttachmentBox';
|
|
4
|
+
import './MentionUserList'; // Import the new mention user list component
|
|
5
|
+
import { formatMessageDateFromTimestamp } from '../../../utils/getFomattedDate';
|
|
6
|
+
import '../../Components/MessageBubble/LinkMessageBubble/LinkMessageBubble';
|
|
7
|
+
import { debounce } from '../../../lib/helpers';
|
|
8
|
+
import RecordRTC from 'recordrtc';
|
|
9
|
+
import 'emoji-picker-element';
|
|
10
|
+
|
|
11
|
+
class TestFooter extends LitElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
this.isAttachmentMenuVisible = false;
|
|
15
|
+
this.inputBorderColor = 'transparent';
|
|
16
|
+
this.inputBorderWidth = '1px';
|
|
17
|
+
this.inputBorderStyle = 'dashed';
|
|
18
|
+
this.inputPlaceholder = 'Type a message';
|
|
19
|
+
this.sendButtonIcon = 'https://flexcrew.s3.us-west-1.amazonaws.com/Group_1171280804_28e21ab22f.svg';
|
|
20
|
+
this.attachmentIcon = 'https://isometrik-website-bucket.s3.ap-south-1.amazonaws.com/attachment_top_svgrepo_com_8c3f5013f3.svg';
|
|
21
|
+
this.attachmentIconHeight = '34px';
|
|
22
|
+
this.attachmentIconWidth = '34px';
|
|
23
|
+
this.sendButtonIconHeight = '40px';
|
|
24
|
+
this.sendButtonIconWidth = '40px';
|
|
25
|
+
this.sendButtonIconRadius = '50%';
|
|
26
|
+
this.inputBgColor = 'transparent';
|
|
27
|
+
this.inputFontSize = '15px';
|
|
28
|
+
this.containerPadding = '12px 16px 16px';
|
|
29
|
+
this.containerBoxShadow = 'none';
|
|
30
|
+
this.inputBorderRadius = '0';
|
|
31
|
+
this.inputContainerBorderColor = 'transparent';
|
|
32
|
+
this.inputContainerBorderWidth = '0';
|
|
33
|
+
this.inputContainerBorderRadius = '12px';
|
|
34
|
+
this.inputContainerBorderStyle = 'solid';
|
|
35
|
+
this.inputPlaceholderColor = 'var(--text-secondary-color)';
|
|
36
|
+
this.inputContainerPadding = '4px 10px 4px 6px';
|
|
37
|
+
this.onSendClick = null;
|
|
38
|
+
this.backgroundColor = 'var(--bg-primary-color)';
|
|
39
|
+
|
|
40
|
+
this.audioContext = null;
|
|
41
|
+
this.audioInput = null;
|
|
42
|
+
this.audioRecorder = null;
|
|
43
|
+
this.audioProcessor = null;
|
|
44
|
+
this.audioChunks = [];
|
|
45
|
+
this.mp3Encoder = null;
|
|
46
|
+
this.sampleRate = 44100;
|
|
47
|
+
this.mp3Data = [];
|
|
48
|
+
this.audioBlob = null;
|
|
49
|
+
this.audioUrl = null;
|
|
50
|
+
this.isRecording = false;
|
|
51
|
+
this.isPaused = false;
|
|
52
|
+
this.recordingTime = 0;
|
|
53
|
+
this.recordingTimeInterval = null;
|
|
54
|
+
this.recorder = null;
|
|
55
|
+
this.stream = null;
|
|
56
|
+
|
|
57
|
+
// New mention-related properties
|
|
58
|
+
this.showMentionList = false;
|
|
59
|
+
this.mentionSearchQuery = '';
|
|
60
|
+
this.lastInputValue = '';
|
|
61
|
+
this.cursorPosition = 0;
|
|
62
|
+
this.detectLinks = true;
|
|
63
|
+
this.linkPreview = '';
|
|
64
|
+
this.linkToPreview = '';
|
|
65
|
+
this.debouncedCheckLinks = debounce(this.checkLinks.bind(this), 500);
|
|
66
|
+
this.linkHidePreview = false;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
static properties = {
|
|
70
|
+
// ... existing properties ...
|
|
71
|
+
inputBorderColor: { type: String },
|
|
72
|
+
inputBorderWidth: { type: String },
|
|
73
|
+
inputBorderStyle: { type: String },
|
|
74
|
+
inputPlaceholder: { type: String },
|
|
75
|
+
inputBgColor: { type: String },
|
|
76
|
+
inputFontSize: { type: String },
|
|
77
|
+
inputFontColor: { type: String },
|
|
78
|
+
inputBorderRadius: { type: String },
|
|
79
|
+
attachmentIcon: { type: String },
|
|
80
|
+
sendButtonIcon: { type: String },
|
|
81
|
+
micButtonIcon: { type: String },
|
|
82
|
+
deleteIcon: { type: String },
|
|
83
|
+
pauseIcon: { type: String },
|
|
84
|
+
playIcon: { type: String },
|
|
85
|
+
sendButtonIconHeight: { type: String },
|
|
86
|
+
sendButtonIconWidth: { type: String },
|
|
87
|
+
attachmentIconHeight: { type: String },
|
|
88
|
+
attachmentIconWidth: { type: String },
|
|
89
|
+
sendButtonIconRadius: { type: String },
|
|
90
|
+
containerPadding: { type: String },
|
|
91
|
+
containerBoxShadow: { type: String },
|
|
92
|
+
inputContainerBorderColor: { type: String },
|
|
93
|
+
inputContainerBorderWidth: { type: String },
|
|
94
|
+
inputContainerBorderRadius: { type: String },
|
|
95
|
+
inputPlaceholderColor: { type: String },
|
|
96
|
+
inputContainerPadding: { type: String },
|
|
97
|
+
isAttachmentMenuVisible: { type: Boolean },
|
|
98
|
+
onSendClick: { type: Function },
|
|
99
|
+
inputValue: { type: String },
|
|
100
|
+
onMediaIconClick: { type: Function },
|
|
101
|
+
onDocumentClick: { type: Function },
|
|
102
|
+
onFileUploaded: { type: Function },
|
|
103
|
+
backgroundColor: { type: String },
|
|
104
|
+
replyMessage: { type: Object },
|
|
105
|
+
handleremoveReplyMessage: { type: Function },
|
|
106
|
+
onCameraClick: { type: Function },
|
|
107
|
+
conversationDetails: { type: Object },
|
|
108
|
+
userMetaData: { type: Object },
|
|
109
|
+
|
|
110
|
+
// New mention-related properties
|
|
111
|
+
showMentionList: { type: Boolean },
|
|
112
|
+
mentionSearchQuery: { type: String },
|
|
113
|
+
cursorPosition: { type: Number },
|
|
114
|
+
|
|
115
|
+
detectLinks: { type: Boolean },
|
|
116
|
+
linkPreview: { type: String },
|
|
117
|
+
linkToPreview: { type: String },
|
|
118
|
+
linkHidePreview: { type: Boolean },
|
|
119
|
+
|
|
120
|
+
// Audio recording related properties
|
|
121
|
+
isRecording: { type: Boolean },
|
|
122
|
+
isPaused: { type: Boolean },
|
|
123
|
+
recordingTime: { type: Number },
|
|
124
|
+
audioBlob: { type: Object },
|
|
125
|
+
audioUrl: { type: String },
|
|
126
|
+
selectedConversationId: { type: String },
|
|
127
|
+
handleDirectAudioUpload: { type: Function },
|
|
128
|
+
// Emoji picker related properties
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
static styles = css`
|
|
132
|
+
* {
|
|
133
|
+
box-sizing: border-box;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.composer-shell {
|
|
137
|
+
border-top: 1px solid var(--border-subtle);
|
|
138
|
+
background: var(--bg-primary-color);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.composer-row {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
gap: 10px;
|
|
145
|
+
width: 100%;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.send-container {
|
|
149
|
+
flex-shrink: 0;
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.send-container button {
|
|
155
|
+
width: 40px;
|
|
156
|
+
height: 40px;
|
|
157
|
+
border: none;
|
|
158
|
+
border-radius: 50%;
|
|
159
|
+
background: transparent;
|
|
160
|
+
color: var(--text-secondary-color);
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
justify-content: center;
|
|
164
|
+
cursor: pointer;
|
|
165
|
+
padding: 0;
|
|
166
|
+
box-shadow: none;
|
|
167
|
+
transition:
|
|
168
|
+
transform 120ms var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
|
|
169
|
+
background-color 140ms ease,
|
|
170
|
+
color 140ms ease;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.send-container button.has-text {
|
|
174
|
+
background: var(--primary);
|
|
175
|
+
color: var(--primary-foreground);
|
|
176
|
+
box-shadow: 0 4px 12px var(--shadow-color);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.send-container button:hover {
|
|
180
|
+
background: var(--muted);
|
|
181
|
+
color: var(--text-primary-color);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.send-container button.has-text:hover {
|
|
185
|
+
filter: brightness(1.06);
|
|
186
|
+
background: var(--primary);
|
|
187
|
+
color: var(--primary-foreground);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.send-container button:active {
|
|
191
|
+
transform: scale(0.94);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.send-container button svg {
|
|
195
|
+
width: 20px;
|
|
196
|
+
height: 20px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.emoji-container,
|
|
200
|
+
.attachment-container {
|
|
201
|
+
position: relative;
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
z-index: 99;
|
|
204
|
+
display: flex;
|
|
205
|
+
align-items: center;
|
|
206
|
+
justify-content: center;
|
|
207
|
+
width: 36px;
|
|
208
|
+
height: 36px;
|
|
209
|
+
flex-shrink: 0;
|
|
210
|
+
border-radius: 10px;
|
|
211
|
+
color: var(--text-secondary-color);
|
|
212
|
+
transition: background-color 140ms var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)), color 140ms ease;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.emoji-container:hover,
|
|
216
|
+
.attachment-container:hover {
|
|
217
|
+
background: var(--muted);
|
|
218
|
+
color: var(--text-primary-color);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.emoji-container svg,
|
|
222
|
+
.attachment-container svg {
|
|
223
|
+
width: 20px;
|
|
224
|
+
height: 20px;
|
|
225
|
+
pointer-events: none;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
emoji-picker {
|
|
229
|
+
position: absolute;
|
|
230
|
+
bottom: 56px;
|
|
231
|
+
left: 0;
|
|
232
|
+
z-index: 1001;
|
|
233
|
+
--background: var(--bg-primary-color);
|
|
234
|
+
--category-emoji-size: 1.5rem;
|
|
235
|
+
--emoji-size: 1.5rem;
|
|
236
|
+
--num-columns: 8;
|
|
237
|
+
--border-color: var(--border-subtle);
|
|
238
|
+
width: min(360px, 92vw);
|
|
239
|
+
display: none;
|
|
240
|
+
--border-radius: 16px;
|
|
241
|
+
--num-columns: 8;
|
|
242
|
+
--emoji-size: 28px;
|
|
243
|
+
--input-padding: 10px;
|
|
244
|
+
--input-border-size: 0;
|
|
245
|
+
--input-font-color: var(--text-primary-color);
|
|
246
|
+
--input-border-radius: 10px;
|
|
247
|
+
--button-hover-background: var(--bg-primary-light);
|
|
248
|
+
--button-active-background: var(--bg-primary-light);
|
|
249
|
+
--category-emoji-size: 28px;
|
|
250
|
+
--indicator-color: var(--text-primary-color);
|
|
251
|
+
box-shadow: var(--menu-shadow, 0 12px 40px rgba(0, 0, 0, 0.16));
|
|
252
|
+
border: 1px solid var(--border-subtle);
|
|
253
|
+
overflow: hidden;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@media screen and (max-width: 768px) {
|
|
257
|
+
emoji-picker {
|
|
258
|
+
--num-columns: 6;
|
|
259
|
+
--category-emoji-size: 20px;
|
|
260
|
+
--emoji-size: 20px;
|
|
261
|
+
--input-padding: 5px;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.footer-container {
|
|
266
|
+
display: flex;
|
|
267
|
+
align-items: end;
|
|
268
|
+
gap: 8px;
|
|
269
|
+
position: relative;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.footer-content-wrapper {
|
|
273
|
+
flex: 1;
|
|
274
|
+
display: flex;
|
|
275
|
+
flex-direction: column;
|
|
276
|
+
gap: 8px;
|
|
277
|
+
position: relative;
|
|
278
|
+
min-width: 0;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.input-container {
|
|
282
|
+
flex: 1;
|
|
283
|
+
display: flex;
|
|
284
|
+
align-items: center;
|
|
285
|
+
position: relative;
|
|
286
|
+
min-width: 0;
|
|
287
|
+
background: var(--bg-message-input-color);
|
|
288
|
+
border: 1px solid var(--border-subtle);
|
|
289
|
+
border-radius: var(--radius-md);
|
|
290
|
+
padding: 4px 10px 4px 6px;
|
|
291
|
+
min-height: 48px;
|
|
292
|
+
transition: border-color 140ms ease, box-shadow 140ms ease;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.input-container:focus-within {
|
|
296
|
+
border-color: var(--ring);
|
|
297
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 12%, transparent);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.composer-fields {
|
|
301
|
+
display: flex;
|
|
302
|
+
align-items: center;
|
|
303
|
+
width: 100%;
|
|
304
|
+
gap: 2px;
|
|
305
|
+
min-width: 0;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.custom-reply-block {
|
|
309
|
+
width: 100%;
|
|
310
|
+
border-radius: 12px;
|
|
311
|
+
background: var(--bg-secondary-color);
|
|
312
|
+
z-index: 2;
|
|
313
|
+
border-left: 3px solid var(--base-color);
|
|
314
|
+
overflow: hidden;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.input-box-container {
|
|
318
|
+
flex: 1;
|
|
319
|
+
min-width: 0;
|
|
320
|
+
position: relative;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.input-box-container my-input {
|
|
324
|
+
display: block;
|
|
325
|
+
width: 100%;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.focused-input {
|
|
329
|
+
border: none !important;
|
|
330
|
+
outline: none !important;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.attachment-menu {
|
|
334
|
+
position: absolute;
|
|
335
|
+
background-color: var(--bg-primary-color);
|
|
336
|
+
bottom: 28px;
|
|
337
|
+
left: 0;
|
|
338
|
+
box-shadow: 0 12px 40px color-mix(in srgb, #000 22%, transparent);
|
|
339
|
+
display: flex;
|
|
340
|
+
flex-direction: column;
|
|
341
|
+
border-radius: 16px;
|
|
342
|
+
border: 1px solid var(--border-subtle, color-mix(in srgb, var(--text-primary-color) 10%, transparent));
|
|
343
|
+
overflow: hidden;
|
|
344
|
+
min-width: 220px;
|
|
345
|
+
animation: attachIn 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
@keyframes attachIn {
|
|
349
|
+
from {
|
|
350
|
+
opacity: 0;
|
|
351
|
+
transform: translateY(6px) scale(0.98);
|
|
352
|
+
}
|
|
353
|
+
to {
|
|
354
|
+
opacity: 1;
|
|
355
|
+
transform: translateY(0) scale(1);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
@media (prefers-reduced-motion: reduce) {
|
|
360
|
+
.attachment-menu {
|
|
361
|
+
animation: none;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
attachment-box {
|
|
366
|
+
margin: 6px;
|
|
367
|
+
overflow: hidden;
|
|
368
|
+
display: block;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.attachment-container svg.close-svg {
|
|
372
|
+
transform: rotate(0deg);
|
|
373
|
+
background-color: transparent;
|
|
374
|
+
border-radius: 50%;
|
|
375
|
+
padding: 0;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.attachment-container svg.add-svg {
|
|
379
|
+
transform: rotate(0deg);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.attachment-container svg.close-svg.rotating {
|
|
383
|
+
transform: rotate(180deg);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.attachment-container svg.add-svg.rotating {
|
|
387
|
+
transform: rotate(180deg);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.link-preview-loading {
|
|
391
|
+
padding: 12px;
|
|
392
|
+
text-align: center;
|
|
393
|
+
color: #666;
|
|
394
|
+
background-color: var(--bg-secondary-color);
|
|
395
|
+
border-radius: 8px;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.hide {
|
|
399
|
+
display: none;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.attachemnt-backdrop {
|
|
403
|
+
top: 0;
|
|
404
|
+
left: 26%;
|
|
405
|
+
right: 0;
|
|
406
|
+
bottom: 8%;
|
|
407
|
+
z-index: 99;
|
|
408
|
+
position: fixed;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
@keyframes fadeIn {
|
|
412
|
+
from {
|
|
413
|
+
opacity: 0;
|
|
414
|
+
}
|
|
415
|
+
to {
|
|
416
|
+
opacity: 1;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
@keyframes fadeOut {
|
|
421
|
+
from {
|
|
422
|
+
opacity: 1;
|
|
423
|
+
}
|
|
424
|
+
to {
|
|
425
|
+
opacity: 0;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
@media (max-width: 768px) {
|
|
430
|
+
.attachemnt-backdrop {
|
|
431
|
+
top: 0;
|
|
432
|
+
left: 5%;
|
|
433
|
+
right: 0;
|
|
434
|
+
bottom: 8%;
|
|
435
|
+
z-index: 99;
|
|
436
|
+
position: fixed;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.recording-container {
|
|
441
|
+
display: flex;
|
|
442
|
+
align-items: center;
|
|
443
|
+
justify-content: end;
|
|
444
|
+
width: 40%;
|
|
445
|
+
padding: 10px;
|
|
446
|
+
border-radius: 10px;
|
|
447
|
+
animation: fadeIn 0.3s ease;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.recording-info {
|
|
451
|
+
display: flex;
|
|
452
|
+
align-items: center;
|
|
453
|
+
gap: 10px;
|
|
454
|
+
color: var(--text-primary-color);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.recording-time {
|
|
458
|
+
font-size: 16px;
|
|
459
|
+
font-weight: 500;
|
|
460
|
+
min-width: 70px;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.recording-controls {
|
|
464
|
+
display: flex;
|
|
465
|
+
align-items: center;
|
|
466
|
+
gap: 16px;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.recording-control-btn {
|
|
470
|
+
width: 40px;
|
|
471
|
+
height: 40px;
|
|
472
|
+
border-radius: 50%;
|
|
473
|
+
display: flex;
|
|
474
|
+
align-items: center;
|
|
475
|
+
justify-content: center;
|
|
476
|
+
background-color: var(--bg-primary-light, #e4e6eb);
|
|
477
|
+
cursor: pointer;
|
|
478
|
+
transition: all 0.2s ease;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.recording-control-btn:hover {
|
|
482
|
+
background-color: var(--bg-secondary-color, #d8dadf);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.pulsing-dot {
|
|
486
|
+
width: 12px;
|
|
487
|
+
height: 12px;
|
|
488
|
+
border-radius: 50%;
|
|
489
|
+
background-color: #ff4b4b;
|
|
490
|
+
animation: pulse 1.5s infinite;
|
|
491
|
+
}
|
|
492
|
+
.link-preview-wrapper{
|
|
493
|
+
width: 95%;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
@keyframes pulse {
|
|
497
|
+
0% {
|
|
498
|
+
transform: scale(0.8);
|
|
499
|
+
opacity: 0.7;
|
|
500
|
+
}
|
|
501
|
+
50% {
|
|
502
|
+
transform: scale(1);
|
|
503
|
+
opacity: 1;
|
|
504
|
+
}
|
|
505
|
+
100% {
|
|
506
|
+
transform: scale(0.8);
|
|
507
|
+
opacity: 0.7;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
`;
|
|
511
|
+
|
|
512
|
+
toggleAttachmentMenu() {
|
|
513
|
+
this.isAttachmentMenuVisible = !this.isAttachmentMenuVisible;
|
|
514
|
+
if (this.inputValue) {
|
|
515
|
+
this.dispatchEvent(
|
|
516
|
+
new CustomEvent('input-change', {
|
|
517
|
+
detail: { value: '' },
|
|
518
|
+
bubbles: true,
|
|
519
|
+
composed: true,
|
|
520
|
+
}),
|
|
521
|
+
);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
async clearLinkPreview() {
|
|
526
|
+
this.linkPreview = null;
|
|
527
|
+
this.linkToPreview = null;
|
|
528
|
+
this.requestUpdate();
|
|
529
|
+
return new Promise(resolve => {
|
|
530
|
+
requestAnimationFrame(() => {
|
|
531
|
+
// Double-check values are cleared
|
|
532
|
+
this.linkPreview = null;
|
|
533
|
+
this.linkToPreview = null;
|
|
534
|
+
this.requestUpdate();
|
|
535
|
+
resolve(true);
|
|
536
|
+
});
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
updated(changedProperties) {
|
|
540
|
+
if (changedProperties.has('selectedConversationId')) {
|
|
541
|
+
this.inputValue = '';
|
|
542
|
+
this.lastInputValue = '';
|
|
543
|
+
this.cancelRecording();
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
async checkLinks(newValue) {
|
|
547
|
+
if (this.linkHidePreview || !this.detectLinks || !newValue?.trim()) {
|
|
548
|
+
this.clearLinkPreview();
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
const urlRegex = /https?:\/\/(?:www\.)?[a-zA-Z0-9-]+\.[a-zA-Z]{2,}(?:\.[a-zA-Z]{2,})?(?:\/[^\s]*)?/gi;
|
|
552
|
+
const urls = (newValue.match(urlRegex) || []).filter(url => {
|
|
553
|
+
try {
|
|
554
|
+
const parsedUrl = new URL(url.startsWith('http') ? url : `https://${url}`);
|
|
555
|
+
|
|
556
|
+
return parsedUrl.protocol === 'https:' || (parsedUrl.protocol === 'http:' && parsedUrl.hostname.includes('.') && parsedUrl.hostname.split('.').length >= 2);
|
|
557
|
+
} catch {
|
|
558
|
+
return false;
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
const lastUrl = urls[urls.length - 1];
|
|
563
|
+
if (lastUrl && lastUrl !== this.linkToPreview) {
|
|
564
|
+
this.linkToPreview = lastUrl;
|
|
565
|
+
try {
|
|
566
|
+
const fullUrl = lastUrl.startsWith('http') ? lastUrl : `https://${lastUrl}`;
|
|
567
|
+
|
|
568
|
+
const parsedUrl = new URL(fullUrl);
|
|
569
|
+
const normalizedUrl = parsedUrl.toString();
|
|
570
|
+
this.linkPreview = normalizedUrl;
|
|
571
|
+
} catch (error) {
|
|
572
|
+
console.error('Error generating link preview:', error);
|
|
573
|
+
this.clearLinkPreview();
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
} else if (!urls.length && !newValue?.trim()) {
|
|
577
|
+
this.clearLinkPreview();
|
|
578
|
+
}
|
|
579
|
+
this.requestUpdate();
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
handleInputChange(event) {
|
|
583
|
+
const newValue = event.target.value;
|
|
584
|
+
this.inputValue = newValue;
|
|
585
|
+
this.lastInputValue = newValue;
|
|
586
|
+
|
|
587
|
+
// Get cursor position
|
|
588
|
+
const inputElement = this.shadowRoot.querySelector('my-input');
|
|
589
|
+
const textArea = inputElement?.shadowRoot.querySelector('textarea');
|
|
590
|
+
if (textArea) {
|
|
591
|
+
this.cursorPosition = textArea.selectionStart;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
// Check for @ symbol to trigger mention list
|
|
595
|
+
this.checkForMentionTrigger(newValue);
|
|
596
|
+
if (!newValue.trim() || (this.linkToPreview && !newValue.includes(this.linkToPreview))) {
|
|
597
|
+
if (this.debouncedCheckLinks && typeof this.debouncedCheckLinks.cancel === 'function') {
|
|
598
|
+
this.debouncedCheckLinks.cancel();
|
|
599
|
+
}
|
|
600
|
+
this.clearLinkPreview();
|
|
601
|
+
} else {
|
|
602
|
+
this.debouncedCheckLinks(newValue);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
// Always dispatch the mention-user event when input changes
|
|
606
|
+
this.dispatchMentionEvent(newValue);
|
|
607
|
+
this.dispatchEvent(
|
|
608
|
+
new CustomEvent('input-change', {
|
|
609
|
+
detail: { value: newValue },
|
|
610
|
+
bubbles: true,
|
|
611
|
+
composed: true,
|
|
612
|
+
}),
|
|
613
|
+
);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
dispatchMentionEvent(text) {
|
|
617
|
+
const mentionedUsers = this.extractMentions(text, this.conversationDetails?.members || []);
|
|
618
|
+
|
|
619
|
+
this.dispatchEvent(
|
|
620
|
+
new CustomEvent('mention-user', {
|
|
621
|
+
detail: {
|
|
622
|
+
value: text,
|
|
623
|
+
mentionUsersList: mentionedUsers,
|
|
624
|
+
},
|
|
625
|
+
bubbles: true,
|
|
626
|
+
composed: true,
|
|
627
|
+
}),
|
|
628
|
+
);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
toggleEmojiPicker() {
|
|
632
|
+
const emojiPicker = this.shadowRoot.querySelector('emoji-picker');
|
|
633
|
+
if (emojiPicker) {
|
|
634
|
+
emojiPicker.style.display = emojiPicker.style.display === 'none' ? 'block' : 'none';
|
|
635
|
+
}
|
|
636
|
+
this.requestUpdate();
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
handleEmojiSelect(event) {
|
|
640
|
+
const emoji = event.detail.unicode;
|
|
641
|
+
const inputElement = this.shadowRoot.querySelector('my-input');
|
|
642
|
+
const textArea = inputElement?.shadowRoot.querySelector('textarea');
|
|
643
|
+
|
|
644
|
+
if (textArea) {
|
|
645
|
+
const cursorPos = textArea.selectionStart;
|
|
646
|
+
const textBeforeCursor = this.inputValue.substring(0, cursorPos);
|
|
647
|
+
const textAfterCursor = this.inputValue.substring(cursorPos);
|
|
648
|
+
|
|
649
|
+
const newValue = `${textBeforeCursor}${emoji}${textAfterCursor}`;
|
|
650
|
+
this.inputValue = newValue;
|
|
651
|
+
|
|
652
|
+
this.dispatchEvent(
|
|
653
|
+
new CustomEvent('input-change', {
|
|
654
|
+
detail: { value: newValue },
|
|
655
|
+
bubbles: true,
|
|
656
|
+
composed: true,
|
|
657
|
+
}),
|
|
658
|
+
);
|
|
659
|
+
|
|
660
|
+
setTimeout(() => {
|
|
661
|
+
textArea.setSelectionRange(cursorPos + emoji.length, cursorPos + emoji.length);
|
|
662
|
+
}, 0);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
firstUpdated() {
|
|
667
|
+
document.addEventListener('click', e => {
|
|
668
|
+
const emojiPicker = this.shadowRoot.querySelector('emoji-picker');
|
|
669
|
+
const emojiContainer = this.shadowRoot.querySelector('.emoji-container');
|
|
670
|
+
const emojiButton = emojiContainer?.querySelector('svg');
|
|
671
|
+
|
|
672
|
+
const path = e.composedPath();
|
|
673
|
+
const clickedElement = path[0];
|
|
674
|
+
|
|
675
|
+
if (
|
|
676
|
+
emojiPicker &&
|
|
677
|
+
!path.includes(emojiPicker) &&
|
|
678
|
+
!path.includes(emojiContainer) &&
|
|
679
|
+
!path.includes(emojiButton)
|
|
680
|
+
) {
|
|
681
|
+
emojiPicker.style.display = 'none';
|
|
682
|
+
this.requestUpdate();
|
|
683
|
+
}
|
|
684
|
+
});
|
|
685
|
+
|
|
686
|
+
const emojiPicker = this.shadowRoot.querySelector('emoji-picker');
|
|
687
|
+
if (emojiPicker && emojiPicker.shadowRoot) {
|
|
688
|
+
const style = document.createElement('style');
|
|
689
|
+
style.textContent = `
|
|
690
|
+
#search::placeholder {
|
|
691
|
+
color: var(--text-primary-color);
|
|
692
|
+
opacity: 0.7;
|
|
693
|
+
font-style: italic;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
#search {
|
|
697
|
+
background: var(--bg-secondary-color)
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
#search::focus {
|
|
701
|
+
outline: none;
|
|
702
|
+
border: none;
|
|
703
|
+
background: transparent;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
*::-webkit-scrollbar {
|
|
707
|
+
width: 5px;
|
|
708
|
+
height: 8px;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
*::-webkit-scrollbar-track {
|
|
712
|
+
border-radius: 4px;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
*::-webkit-scrollbar-thumb {
|
|
716
|
+
border-radius: 4px;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
* {
|
|
720
|
+
scrollbar-width: thin;
|
|
721
|
+
scrollbar-color: var(--bg-grey-color) var(--bg-secondary-color);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.favorites {
|
|
725
|
+
background: var(--bg-secondary-color) !important;
|
|
726
|
+
height: 62px !important;
|
|
727
|
+
align-items: center !important;
|
|
728
|
+
}
|
|
729
|
+
`;
|
|
730
|
+
emojiPicker.shadowRoot.appendChild(style);
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
checkForMentionTrigger(value) {
|
|
735
|
+
const textBeforeCursor = value.substring(0, this.cursorPosition);
|
|
736
|
+
const lastAtIndex = textBeforeCursor.lastIndexOf('@');
|
|
737
|
+
|
|
738
|
+
if (lastAtIndex !== -1) {
|
|
739
|
+
const textAfterAt = textBeforeCursor.substring(lastAtIndex + 1);
|
|
740
|
+
const nextChar = value.charAt(lastAtIndex + 1);
|
|
741
|
+
|
|
742
|
+
if (lastAtIndex === textBeforeCursor.length - 1 || (!textAfterAt.includes(' ') && nextChar !== '@')) {
|
|
743
|
+
this.showMentionList = true;
|
|
744
|
+
this.mentionSearchQuery = textAfterAt;
|
|
745
|
+
return;
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
this.showMentionList = false;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
handleUserSelect(user) {
|
|
753
|
+
const textBeforeCursor = this.inputValue.substring(0, this.cursorPosition);
|
|
754
|
+
const lastAtIndex = textBeforeCursor.lastIndexOf('@');
|
|
755
|
+
const textBeforeAt = this.inputValue.substring(0, lastAtIndex);
|
|
756
|
+
const textAfterCursor = this.inputValue.substring(this.cursorPosition);
|
|
757
|
+
|
|
758
|
+
const newValue = `${textBeforeAt}@${user.userName} ${textAfterCursor}`;
|
|
759
|
+
this.inputValue = newValue;
|
|
760
|
+
|
|
761
|
+
const newCursorPosition = lastAtIndex + user.userName.length + 2; // +2 for @ and space
|
|
762
|
+
this.cursorPosition = newCursorPosition;
|
|
763
|
+
|
|
764
|
+
this.updateInputWithMention(newValue, newCursorPosition);
|
|
765
|
+
|
|
766
|
+
this.showMentionList = false;
|
|
767
|
+
|
|
768
|
+
this.dispatchEvent(
|
|
769
|
+
new CustomEvent('input-change', {
|
|
770
|
+
detail: { value: newValue },
|
|
771
|
+
bubbles: true,
|
|
772
|
+
composed: true,
|
|
773
|
+
}),
|
|
774
|
+
);
|
|
775
|
+
|
|
776
|
+
this.dispatchMentionEvent(newValue);
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
extractMentions(text, members) {
|
|
780
|
+
let mentionedUsers = [];
|
|
781
|
+
let order = 1;
|
|
782
|
+
|
|
783
|
+
for (const member of members) {
|
|
784
|
+
if (!member?.userName) continue;
|
|
785
|
+
|
|
786
|
+
const mentionText = `@${member.userName}`;
|
|
787
|
+
let startIndex = 0;
|
|
788
|
+
|
|
789
|
+
while (true) {
|
|
790
|
+
const index = text.indexOf(mentionText, startIndex);
|
|
791
|
+
if (index === -1) break; // No more mentions of this user
|
|
792
|
+
|
|
793
|
+
const isAtStart = index === 0 || /\s/.test(text[index - 1]);
|
|
794
|
+
const endIndex = index + mentionText.length;
|
|
795
|
+
const isAtEnd = endIndex >= text.length || /[\s,.!?;:]/.test(text[endIndex]);
|
|
796
|
+
|
|
797
|
+
if (isAtStart && isAtEnd) {
|
|
798
|
+
mentionedUsers.push({
|
|
799
|
+
wordCount: member.userName.length,
|
|
800
|
+
userId: member.userId,
|
|
801
|
+
userName: member.userName,
|
|
802
|
+
order: order++,
|
|
803
|
+
position: index
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
startIndex = index + 1;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
mentionedUsers.sort((a, b) => a.position - b.position);
|
|
812
|
+
|
|
813
|
+
return mentionedUsers.map(({ position, ...user }) => user);
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
updateInputWithMention(value, cursorPos) {
|
|
817
|
+
setTimeout(() => {
|
|
818
|
+
const inputElement = this.shadowRoot.querySelector('my-input');
|
|
819
|
+
const textArea = inputElement?.shadowRoot.querySelector('textarea');
|
|
820
|
+
if (textArea) {
|
|
821
|
+
textArea.value = value;
|
|
822
|
+
textArea.focus();
|
|
823
|
+
textArea.setSelectionRange(cursorPos, cursorPos);
|
|
824
|
+
}
|
|
825
|
+
}, 0);
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
resetInputHeight() {
|
|
829
|
+
const inputElement = this.shadowRoot.querySelector('my-input');
|
|
830
|
+
if (inputElement) {
|
|
831
|
+
inputElement.resetHeight();
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
fileUploadHandler(event) {
|
|
836
|
+
this.onFileUploaded(event);
|
|
837
|
+
this.isAttachmentMenuVisible = false;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
focusInput() {
|
|
841
|
+
const inputElement = this.shadowRoot.querySelector('my-input');
|
|
842
|
+
if (inputElement) {
|
|
843
|
+
setTimeout(() => {
|
|
844
|
+
const textArea = inputElement.shadowRoot.querySelector('textarea');
|
|
845
|
+
if (textArea) {
|
|
846
|
+
textArea.focus();
|
|
847
|
+
}
|
|
848
|
+
}, 0);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
connectedCallback() {
|
|
853
|
+
super.connectedCallback();
|
|
854
|
+
this.boundHandleEnterPress = this.handleEnterPress.bind(this);
|
|
855
|
+
document.addEventListener('keydown', this.boundHandleEnterPress);
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
disconnectedCallback() {
|
|
859
|
+
super.disconnectedCallback();
|
|
860
|
+
// Remove the event listener to prevent memory leaks
|
|
861
|
+
document.removeEventListener('keydown', this.boundHandleEnterPress);
|
|
862
|
+
// Cancel any pending debounced calls
|
|
863
|
+
if (this.debouncedCheckLinks && typeof this.debouncedCheckLinks.cancel === 'function') {
|
|
864
|
+
this.debouncedCheckLinks.cancel();
|
|
865
|
+
}
|
|
866
|
+
// Stop recording if active
|
|
867
|
+
this.stopRecording();
|
|
868
|
+
// Clear recording timer if running
|
|
869
|
+
this.clearRecordingTimer();
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
handleEnterPress(event) {
|
|
873
|
+
if (event.key === 'Enter' && !event.shiftKey) {
|
|
874
|
+
event.preventDefault();
|
|
875
|
+
this.sendMessageHandler();
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
async sendMessageHandler() {
|
|
880
|
+
const emojiPicker = this.shadowRoot.querySelector('emoji-picker');
|
|
881
|
+
if (emojiPicker) {
|
|
882
|
+
emojiPicker.style.display = 'none';
|
|
883
|
+
}
|
|
884
|
+
if (this.isRecording) {
|
|
885
|
+
await this.stopRecording();
|
|
886
|
+
await new Promise(resolve => setTimeout(resolve, 300));
|
|
887
|
+
if (this.audioBlob) {
|
|
888
|
+
await this.sendAudioMessage();
|
|
889
|
+
} else {
|
|
890
|
+
console.error('Failed to create audio blob after recording');
|
|
891
|
+
}
|
|
892
|
+
}else{
|
|
893
|
+
if (this.debouncedCheckLinks && typeof this.debouncedCheckLinks.cancel === 'function') {
|
|
894
|
+
this.debouncedCheckLinks.cancel();
|
|
895
|
+
}
|
|
896
|
+
this.linkToPreview = null;
|
|
897
|
+
this.linkPreview = null;
|
|
898
|
+
this.linkHidePreview = true;
|
|
899
|
+
|
|
900
|
+
this.inputValue = '';
|
|
901
|
+
this.lastInputValue = '';
|
|
902
|
+
|
|
903
|
+
this.requestUpdate();
|
|
904
|
+
|
|
905
|
+
this.onSendClick();
|
|
906
|
+
this.resetInputHeight();
|
|
907
|
+
|
|
908
|
+
await new Promise(resolve => setTimeout(resolve, 10));
|
|
909
|
+
this.requestUpdate();
|
|
910
|
+
setTimeout(() => {
|
|
911
|
+
this.linkHidePreview = false;
|
|
912
|
+
this.requestUpdate();
|
|
913
|
+
}, 500);
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
// Audio recording methods
|
|
918
|
+
async startRecording() {
|
|
919
|
+
try {
|
|
920
|
+
try {
|
|
921
|
+
const constraints = {
|
|
922
|
+
audio: {
|
|
923
|
+
channelCount: 2,
|
|
924
|
+
deviceId: 'default'
|
|
925
|
+
}
|
|
926
|
+
};
|
|
927
|
+
this.stream = await navigator.mediaDevices.getUserMedia(constraints);
|
|
928
|
+
} catch (error){
|
|
929
|
+
alert("Error: " + error)
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
this.recorder = RecordRTC(this.stream, {
|
|
933
|
+
type: 'audio',
|
|
934
|
+
mimeType: 'audio/wav',
|
|
935
|
+
recorderType: RecordRTC.StereoAudioRecorder,
|
|
936
|
+
numberOfAudioChannels: 1,
|
|
937
|
+
audioBitsPerSecond: 128000,
|
|
938
|
+
timeSlice: 1000,
|
|
939
|
+
disableLogs: true,
|
|
940
|
+
bufferSize: 4096,
|
|
941
|
+
sampleRate: 44100
|
|
942
|
+
});
|
|
943
|
+
|
|
944
|
+
// Start recording
|
|
945
|
+
this.recorder.startRecording();
|
|
946
|
+
|
|
947
|
+
this.isRecording = true;
|
|
948
|
+
this.isPaused = false;
|
|
949
|
+
this.startRecordingTimer();
|
|
950
|
+
|
|
951
|
+
this.requestUpdate();
|
|
952
|
+
} catch (error) {
|
|
953
|
+
console.error('Error starting recording:', error);
|
|
954
|
+
alert('Could not start recording. Please check microphone permissions.',error);
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
pauseRecording() {
|
|
959
|
+
if (this.isRecording && !this.isPaused && this.recorder) {
|
|
960
|
+
this.recorder.pauseRecording();
|
|
961
|
+
this.isPaused = true;
|
|
962
|
+
this.clearRecordingTimer();
|
|
963
|
+
this.requestUpdate();
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
resumeRecording() {
|
|
968
|
+
if (this.isRecording && this.isPaused && this.recorder) {
|
|
969
|
+
this.recorder.resumeRecording();
|
|
970
|
+
this.isPaused = false;
|
|
971
|
+
this.startRecordingTimer();
|
|
972
|
+
this.requestUpdate();
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
async stopRecording() {
|
|
977
|
+
return new Promise((resolve, reject) => {
|
|
978
|
+
if (this.isRecording && this.recorder) {
|
|
979
|
+
try {
|
|
980
|
+
// Stop recording
|
|
981
|
+
this.recorder.stopRecording(() => {
|
|
982
|
+
// Get the recorded blob
|
|
983
|
+
this.audioBlob = this.recorder.getBlob();
|
|
984
|
+
this.audioUrl = URL.createObjectURL(this.audioBlob);
|
|
985
|
+
|
|
986
|
+
// Stop media stream tracks
|
|
987
|
+
this.stream.getTracks().forEach(track => track.stop());
|
|
988
|
+
|
|
989
|
+
this.isRecording = false;
|
|
990
|
+
this.isPaused = false;
|
|
991
|
+
this.clearRecordingTimer();
|
|
992
|
+
|
|
993
|
+
this.requestUpdate();
|
|
994
|
+
resolve(this.audioBlob);
|
|
995
|
+
});
|
|
996
|
+
} catch (error) {
|
|
997
|
+
console.error('Error stopping recording:', error);
|
|
998
|
+
reject(error);
|
|
999
|
+
}
|
|
1000
|
+
} else {
|
|
1001
|
+
resolve(null);
|
|
1002
|
+
}
|
|
1003
|
+
});
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
cancelRecording() {
|
|
1007
|
+
if (this.isRecording && this.recorder) {
|
|
1008
|
+
// Stop recording
|
|
1009
|
+
this.recorder.stopRecording(() => {
|
|
1010
|
+
// Stop media stream tracks
|
|
1011
|
+
if (this.stream) {
|
|
1012
|
+
this.stream.getTracks().forEach(track => track.stop());
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
this.audioBlob = null;
|
|
1016
|
+
this.audioUrl = null;
|
|
1017
|
+
|
|
1018
|
+
this.isRecording = false;
|
|
1019
|
+
this.isPaused = false;
|
|
1020
|
+
this.recordingTime = 0;
|
|
1021
|
+
this.clearRecordingTimer();
|
|
1022
|
+
|
|
1023
|
+
this.requestUpdate();
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
startRecordingTimer() {
|
|
1030
|
+
this.clearRecordingTimer();
|
|
1031
|
+
this.recordingTimeInterval = setInterval(() => {
|
|
1032
|
+
this.recordingTime += 1;
|
|
1033
|
+
this.requestUpdate();
|
|
1034
|
+
}, 1000);
|
|
1035
|
+
}
|
|
1036
|
+
clearRecordingTimer() {
|
|
1037
|
+
if (this.recordingTimeInterval) {
|
|
1038
|
+
clearInterval(this.recordingTimeInterval);
|
|
1039
|
+
this.recordingTimeInterval = null;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
formatRecordingTime(seconds) {
|
|
1044
|
+
const minutes = Math.floor(seconds / 60);
|
|
1045
|
+
const remainingSeconds = seconds % 60;
|
|
1046
|
+
return `${minutes.toString().padStart(2, '0')}:${remainingSeconds.toString().padStart(2, '0')}`;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
toggleAudioPlayback() {
|
|
1050
|
+
const audio = this.shadowRoot.querySelector('#audio-preview');
|
|
1051
|
+
if (audio) {
|
|
1052
|
+
if (audio.paused) {
|
|
1053
|
+
audio.play();
|
|
1054
|
+
} else {
|
|
1055
|
+
audio.pause();
|
|
1056
|
+
}
|
|
1057
|
+
this.requestUpdate();
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
sendAudioMessage() {
|
|
1062
|
+
if (this.audioBlob) {
|
|
1063
|
+
const audioFile = new File(
|
|
1064
|
+
[this.audioBlob],
|
|
1065
|
+
`audio_${Date.now()}.webm`, // Filename with timestamp
|
|
1066
|
+
{
|
|
1067
|
+
type: this.audioBlob.type,
|
|
1068
|
+
lastModified: Date.now(),
|
|
1069
|
+
},
|
|
1070
|
+
);
|
|
1071
|
+
|
|
1072
|
+
const audioEvent = new CustomEvent('audio-message', {
|
|
1073
|
+
detail: {
|
|
1074
|
+
files: [audioFile], // Now using File instead of Blob
|
|
1075
|
+
type: 'audio',
|
|
1076
|
+
},
|
|
1077
|
+
bubbles: true,
|
|
1078
|
+
composed: true,
|
|
1079
|
+
});
|
|
1080
|
+
|
|
1081
|
+
this.handleDirectAudioUpload(audioFile);
|
|
1082
|
+
|
|
1083
|
+
this.audioBlob = null;
|
|
1084
|
+
this.audioUrl = null;
|
|
1085
|
+
this.recordingTime = 0;
|
|
1086
|
+
this.mp3Data = [];
|
|
1087
|
+
this.requestUpdate();
|
|
1088
|
+
} else {
|
|
1089
|
+
console.error('No audio blob available to send');
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
renderSendOrMicButton() {
|
|
1094
|
+
const hasText = !!(this.inputValue && this.inputValue.trim());
|
|
1095
|
+
|
|
1096
|
+
if (this.isRecording) {
|
|
1097
|
+
return html`
|
|
1098
|
+
<button type="button" class="has-text" aria-label="Send voice note" @click=${() => this.sendMessageHandler()}>
|
|
1099
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1100
|
+
<path d="M22 2L11 13"></path>
|
|
1101
|
+
<path d="M22 2L15 22L11 13L2 9L22 2Z"></path>
|
|
1102
|
+
</svg>
|
|
1103
|
+
</button>
|
|
1104
|
+
`;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
if (hasText) {
|
|
1108
|
+
return html`
|
|
1109
|
+
<button type="button" class="has-text" aria-label="Send message" @click=${() => this.sendMessageHandler()}>
|
|
1110
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1111
|
+
<path d="M22 2L11 13"></path>
|
|
1112
|
+
<path d="M22 2L15 22L11 13L2 9L22 2Z"></path>
|
|
1113
|
+
</svg>
|
|
1114
|
+
</button>
|
|
1115
|
+
`;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
return html`
|
|
1119
|
+
<button type="button" aria-label="Record voice note" @click=${() => this.startRecording()}>
|
|
1120
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
|
1121
|
+
<path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"></path>
|
|
1122
|
+
<path d="M19 10v1a7 7 0 0 1-14 0v-1"></path>
|
|
1123
|
+
<line x1="12" y1="19" x2="12" y2="22"></line>
|
|
1124
|
+
</svg>
|
|
1125
|
+
</button>
|
|
1126
|
+
`;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
renderRecordingControls() {
|
|
1130
|
+
return html`
|
|
1131
|
+
<div class="recording-container">
|
|
1132
|
+
<div class="recording-info">
|
|
1133
|
+
<div class="pulsing-dot"></div>
|
|
1134
|
+
<div class="recording-time">${this.formatRecordingTime(this.recordingTime)}</div>
|
|
1135
|
+
</div>
|
|
1136
|
+
<div class="recording-controls">
|
|
1137
|
+
<div class="recording-control-btn" @click="${() => this.cancelRecording()}">
|
|
1138
|
+
<svg
|
|
1139
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1140
|
+
width="24"
|
|
1141
|
+
height="24"
|
|
1142
|
+
viewBox="0 0 24 24"
|
|
1143
|
+
fill="none"
|
|
1144
|
+
stroke="currentColor"
|
|
1145
|
+
stroke-width="2"
|
|
1146
|
+
stroke-linecap="round"
|
|
1147
|
+
stroke-linejoin="round"
|
|
1148
|
+
>
|
|
1149
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
1150
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
1151
|
+
</svg>
|
|
1152
|
+
</div>
|
|
1153
|
+
<div class="recording-control-btn" @click="${() => (this.isPaused ? this.resumeRecording() : this.pauseRecording())}">
|
|
1154
|
+
${this.isPaused
|
|
1155
|
+
? html`<svg
|
|
1156
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1157
|
+
width="24"
|
|
1158
|
+
height="24"
|
|
1159
|
+
viewBox="0 0 24 24"
|
|
1160
|
+
fill="none"
|
|
1161
|
+
stroke="currentColor"
|
|
1162
|
+
stroke-width="2"
|
|
1163
|
+
stroke-linecap="round"
|
|
1164
|
+
stroke-linejoin="round"
|
|
1165
|
+
>
|
|
1166
|
+
<polygon points="5 3 19 12 5 21 5 3"></polygon>
|
|
1167
|
+
</svg>`
|
|
1168
|
+
: html`<svg
|
|
1169
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1170
|
+
width="24"
|
|
1171
|
+
height="24"
|
|
1172
|
+
viewBox="0 0 24 24"
|
|
1173
|
+
fill="none"
|
|
1174
|
+
stroke="currentColor"
|
|
1175
|
+
stroke-width="2"
|
|
1176
|
+
stroke-linecap="round"
|
|
1177
|
+
stroke-linejoin="round"
|
|
1178
|
+
>
|
|
1179
|
+
<rect x="6" y="4" width="4" height="16"></rect>
|
|
1180
|
+
<rect x="14" y="4" width="4" height="16"></rect>
|
|
1181
|
+
</svg>`}
|
|
1182
|
+
</div>
|
|
1183
|
+
</div>
|
|
1184
|
+
</div>
|
|
1185
|
+
`;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
render() {
|
|
1189
|
+
const isOwnMessage = this.userMetaData?.userId === this.replyMessage?.senderInfo?.userId;
|
|
1190
|
+
const displayName = isOwnMessage ? 'You' : this.replyMessage?.senderInfo?.userName;
|
|
1191
|
+
return html`
|
|
1192
|
+
<div class="composer-shell" style="padding: ${this.containerPadding}; box-shadow: ${this.containerBoxShadow}; background-color: ${this.backgroundColor}">
|
|
1193
|
+
<div class="footer-container">
|
|
1194
|
+
<div class="footer-content-wrapper">
|
|
1195
|
+
${this.replyMessage
|
|
1196
|
+
? html`
|
|
1197
|
+
<div class="custom-reply-block">
|
|
1198
|
+
<reply-block
|
|
1199
|
+
.messageBody=${this.replyMessage?.body}
|
|
1200
|
+
.messageInfo=${this.replyMessage}
|
|
1201
|
+
.senderName=${displayName}
|
|
1202
|
+
.messageTime=${formatMessageDateFromTimestamp(this.replyMessage?.sentAt)}
|
|
1203
|
+
padding="10px"
|
|
1204
|
+
color="var(--text-primary-color)"
|
|
1205
|
+
fontSize="16px"
|
|
1206
|
+
.onIconClick=${this.handleremoveReplyMessage}
|
|
1207
|
+
/>
|
|
1208
|
+
</div>
|
|
1209
|
+
`
|
|
1210
|
+
: null}
|
|
1211
|
+
${this.linkPreview && this.linkToPreview && this.inputValue
|
|
1212
|
+
? html`
|
|
1213
|
+
<div class="link-preview-wrapper ${this.linkHidePreview ? 'hide' : ''}">
|
|
1214
|
+
<link-preview
|
|
1215
|
+
.url=${this.linkPreview}
|
|
1216
|
+
.backgroundColor=${'var(--bg-secondary-color, #f0f2f5)'}
|
|
1217
|
+
.textColor=${'var(--text-primary-color)'}
|
|
1218
|
+
.isShowFooter=${false}
|
|
1219
|
+
.showReactionOnHover=${false}
|
|
1220
|
+
></link-preview>
|
|
1221
|
+
</div>
|
|
1222
|
+
`
|
|
1223
|
+
: null}
|
|
1224
|
+
|
|
1225
|
+
<div class="composer-row">
|
|
1226
|
+
<div
|
|
1227
|
+
class="input-container"
|
|
1228
|
+
style="
|
|
1229
|
+
padding: ${this.isRecording ? null : this.inputContainerPadding};
|
|
1230
|
+
justify-content: ${this.isRecording ? 'end' : 'space-between'}"
|
|
1231
|
+
>
|
|
1232
|
+
${this.isRecording
|
|
1233
|
+
? this.renderRecordingControls()
|
|
1234
|
+
: html`
|
|
1235
|
+
<div class="composer-fields">
|
|
1236
|
+
<div class="emoji-container" @click="${this.toggleEmojiPicker}" title="Emoji">
|
|
1237
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
|
|
1238
|
+
<circle cx="12" cy="12" r="10"></circle>
|
|
1239
|
+
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
|
|
1240
|
+
<line x1="9" y1="9" x2="9.01" y2="9"></line>
|
|
1241
|
+
<line x1="15" y1="9" x2="15.01" y2="9"></line>
|
|
1242
|
+
</svg>
|
|
1243
|
+
</div>
|
|
1244
|
+
|
|
1245
|
+
<emoji-picker class="emoji-picker" @emoji-click="${this.handleEmojiSelect}"></emoji-picker>
|
|
1246
|
+
|
|
1247
|
+
<div class="attachment-container" @click="${this.toggleAttachmentMenu}" title="Attach">
|
|
1248
|
+
${this.isAttachmentMenuVisible
|
|
1249
|
+
? html`<svg class="close-svg rotating" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
|
1250
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
1251
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
1252
|
+
</svg>`
|
|
1253
|
+
: html`<svg class="add-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
|
1254
|
+
<line x1="12" y1="5" x2="12" y2="19"></line>
|
|
1255
|
+
<line x1="5" y1="12" x2="19" y2="12"></line>
|
|
1256
|
+
</svg>`}
|
|
1257
|
+
</div>
|
|
1258
|
+
|
|
1259
|
+
${this.isAttachmentMenuVisible
|
|
1260
|
+
? html`
|
|
1261
|
+
<div
|
|
1262
|
+
class="attachemnt-backdrop"
|
|
1263
|
+
@click="${() => {
|
|
1264
|
+
this.isAttachmentMenuVisible = false;
|
|
1265
|
+
}}"
|
|
1266
|
+
>
|
|
1267
|
+
<div class="attachment-menu">
|
|
1268
|
+
<attachment-box
|
|
1269
|
+
.flexDirection=${'column'}
|
|
1270
|
+
.bgColor=${'var(--bg-primary-color)'}
|
|
1271
|
+
.onMediaIconClick="${this.mediaIconHandler}"
|
|
1272
|
+
.onDocumentIconClick="${this.onDocumentClick}"
|
|
1273
|
+
.onFileUploaded="${this.onFileUploaded}"
|
|
1274
|
+
@file-uploaded="${event => this.fileUploadHandler(event)}"
|
|
1275
|
+
.onCameraClick="${this.onCameraClick}"
|
|
1276
|
+
>
|
|
1277
|
+
</attachment-box>
|
|
1278
|
+
</div>
|
|
1279
|
+
</div>
|
|
1280
|
+
`
|
|
1281
|
+
: ''}
|
|
1282
|
+
|
|
1283
|
+
<div class="input-box-container">
|
|
1284
|
+
${this.conversationDetails?.isGroup
|
|
1285
|
+
? html` <mention-user-list
|
|
1286
|
+
.users=${this.conversationDetails?.members || []}
|
|
1287
|
+
.isVisible=${this.showMentionList}
|
|
1288
|
+
.searchQuery=${this.mentionSearchQuery}
|
|
1289
|
+
.onSelectUser=${user => this.handleUserSelect(user)}
|
|
1290
|
+
.userMetaData=${this.userMetaData}
|
|
1291
|
+
></mention-user-list>`
|
|
1292
|
+
: null}
|
|
1293
|
+
|
|
1294
|
+
<my-input
|
|
1295
|
+
.value="${this.inputValue}"
|
|
1296
|
+
.borderColor=${'transparent'}
|
|
1297
|
+
.borderWidth=${'0px'}
|
|
1298
|
+
.borderRadius=${'0'}
|
|
1299
|
+
.backgroundColor=${'transparent'}
|
|
1300
|
+
.fontSize="${this.inputFontSize || '15px'}"
|
|
1301
|
+
.padding=${'6px 4px'}
|
|
1302
|
+
.minHeight=${'36px'}
|
|
1303
|
+
.inputHeight=${'36px'}
|
|
1304
|
+
.maxHeight=${'120px'}
|
|
1305
|
+
.placeholder="${this.inputPlaceholder || 'Message'}"
|
|
1306
|
+
.color=${this.inputFontColor}
|
|
1307
|
+
.placeholderColor=${this.inputPlaceholderColor || 'var(--text-secondary-color)'}
|
|
1308
|
+
.isSearchSvg=${false}
|
|
1309
|
+
.disabled=${this.showCloseIcon}
|
|
1310
|
+
@input="${this.handleInputChange}"
|
|
1311
|
+
></my-input>
|
|
1312
|
+
</div>
|
|
1313
|
+
</div>
|
|
1314
|
+
`}
|
|
1315
|
+
</div>
|
|
1316
|
+
<div class="send-container">${this.renderSendOrMicButton()}</div>
|
|
1317
|
+
</div>
|
|
1318
|
+
</div>
|
|
1319
|
+
</div>
|
|
1320
|
+
</div>
|
|
1321
|
+
`;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
disconnectedCallback() {
|
|
1326
|
+
super.disconnectedCallback();
|
|
1327
|
+
document.removeEventListener('keydown', this.boundHandleEnterPress);
|
|
1328
|
+
|
|
1329
|
+
// Cancel any pending debounced calls
|
|
1330
|
+
if (this.debouncedCheckLinks && typeof this.debouncedCheckLinks.cancel === 'function') {
|
|
1331
|
+
this.debouncedCheckLinks.cancel();
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
// Clean up audio recording resources
|
|
1335
|
+
this.cancelRecording();
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
customElements.define('my-test-footer', TestFooter);
|