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 @@
|
|
|
1
|
+
{"version":3,"file":"BlockChatList.js","sourceRoot":"","sources":["../../../src/components/ChatUIComponent/BlockChatList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,gDAAgD,CAAC;AACxD,OAAO,EAAC,mBAAmB,EAAC,MAAM,yDAAyD,CAAA;AAW3F,MAAM,OAAO,aAAa;;QAYxB,mBAAc,GAAG,KAAK,EAAE,SAAkB,EAAE,OAAe,CAAC,EAAE,EAAE;;YAC9D,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;gBACb,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBACtB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;YACzB,CAAC;YAED,IAAI,IAAI,IAAI,EAAE,EAAE,CAAC;gBACb,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;YAClC,CAAC;YAED,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YAEpB,IAAI,CAAC;gBACD,IAAI,OAAO,GAAG;oBACV,KAAK,EAAE,EAAE;oBACT,IAAI,EAAE,IAAI;iBACb,CAAC;gBAEF,IAAI,SAAS,EAAE,CAAC;oBACZ,OAAO,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;gBACrC,CAAC;gBAED,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;gBAEvE,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAA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G,IAAI,CAAC;YACtB,IAAI,CAAC;gBACH,MAAM,OAAO,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC;oBAC/C,UAAU,EAAE,cAAc;iBAC3B,CAAC,CAAC;gBACH,IAAI,CAAC,UAAU,GAAG,MAAA,IAAI,CAAC,UAAU,0CAAE,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,cAAc,CAAC,CAAC;YACtF,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,kCAAkC,cAAc,GAAG,EAAE,KAAK,CAAC,CAAC;YAC5E,CAAC;oBAAS,CAAC;gBACT,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;gBACzB,mBAAmB,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAA;YACjD,CAAC;QACH,CAAC,CAAC;;0BAxEyB,EAAE;yBACC,KAAK;oBACX,CAAC;uBACG,KAAK;iCACK,KAAK;;IAE3C,KAAK,CAAC,iBAAiB;QACrB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,CAAC;IAkED,MAAM;QACJ,OAAO,CACL,2EACI,YAAY,EAAE,IAAI,CAAC,UAAU,EAC7B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,aAAa,EAAE,IAAI,CAAC,iBAAiB,EACrC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,EAC3B,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,GAExB,CACtB,CAAA;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, State, h } from \"@stencil/core\";\nimport ChatSDK from 'test-iso-chat-sdk';\nimport '../../stories/Components/BlockUsers/BlockUsers';\nimport {drawerDialogService} from '../../stories/Components/Dialog-Drawer/dialog-drawer.js'\n\n@Component({\n tag: 'block-chat-list',\n shadow: true,\n styles: `\n :host{\n height:96%;\n }\n `,\n})\nexport class BlockChatList {\n @Prop() goBack: () => void;\n @State() blockUsers: any = [];\n @State() isLoading: boolean = false;\n @State() skip: number = 0;\n @State() hasMore: boolean = false;\n @State() paginationLoading: boolean = false;\n\n async componentWillLoad() {\n await this.findBlokedUser(); \n }\n\n findBlokedUser = async (searchTag?: string, skip: number = 0) => {\n if (skip === 0) {\n this.isLoading = true;\n this.blockUsers = [];\n }\n\n if (skip >= 20) {\n this.paginationLoading = true;\n }\n\n this.hasMore = true;\n\n try {\n let payload = {\n limit: 20,\n skip: skip,\n };\n\n if (searchTag) {\n payload['searchTag'] = searchTag;\n }\n\n const findRes = await ChatSDK.getInstance().user.getUserBlock(payload);\n\n if (findRes?.users) {\n if (skip === 0) {\n this.blockUsers = [...findRes.users];\n } else {\n this.blockUsers = [...this.blockUsers, ...findRes.users];\n }\n }\n\n if (findRes?.users?.length < payload.limit) {\n this.hasMore = false;\n }\n } catch (error) {\n if (error?.status === 404 || error?.statusCode === 404) {\n this.hasMore = false;\n }\n if ((error?.status === 404 || error?.statusCode === 404) && searchTag != null) {\n this.blockUsers = [];\n }\n console.error(error);\n } finally {\n this.isLoading = false;\n this.paginationLoading = false;\n }\n }\n\n handleUnblockUser = async (conversationId: string) => {\n this.isLoading = true;\n try {\n await ChatSDK.getInstance().user.postUserUnblock({\n opponentId: conversationId,\n });\n this.blockUsers = this.blockUsers?.filter((user) => user.userId !== conversationId);\n } catch (error) {\n console.error(`Failed to unblock user with ID ${conversationId}:`, error);\n } finally {\n this.isLoading = false;\n drawerDialogService.closeDialog('confirm-dialog')\n }\n };\n\n render() {\n return (\n <blocked-users-list\n blockedUsers={this.blockUsers}\n isLoading={this.isLoading}\n handleUnblock={this.handleUnblockUser}\n goBack={() => this.goBack()}\n findBlokedUser={this.findBlokedUser}\n skip={this.skip}\n hasMore={this.hasMore}\n paginationLoading={this.paginationLoading}\n >\n </blocked-users-list>\n )\n }\n}"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import "../.././stories/Components/MessageBubble/DocumentMessageBubble/DocumentMessageBubble";
|
|
3
|
+
class ChatDocumentMessageBubble {
|
|
4
|
+
render() {
|
|
5
|
+
return (h("div", { key: 'a386f73b5dc394fe145cb4c1e40c0fd72b45c48c' }, h("document-message", { key: 'ad728bb79cf1112d15a3670cc27854a9ef6e46e6', bgColor: '#EFF1FA', borderRadius: "6px", time: new Date().toISOString(), docName: 'Somesomsomesomesome', width: "200px", height: "80px", documentNamePadding: "10px 7px", padding: "10px" })));
|
|
6
|
+
}
|
|
7
|
+
static get is() { return "chat-document-message-bubble"; }
|
|
8
|
+
static get encapsulation() { return "shadow"; }
|
|
9
|
+
}
|
|
10
|
+
export { ChatDocumentMessageBubble };
|
|
11
|
+
//# sourceMappingURL=ChatDocumentMessageBubble.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatDocumentMessageBubble.js","sourceRoot":"","sources":["../../../src/components/ChatUIComponent/ChatDocumentMessageBubble.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,sFAAsF,CAAA;AAC7F,MAIO,yBAAyB;IAE9B,MAAM;QACJ,OAAO,CACL;YACE,yEACE,OAAO,EAAC,SAAS,EACjB,YAAY,EAAC,KAAK,EAClB,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAC9B,OAAO,EAAC,qBAAqB,EAC7B,KAAK,EAAC,OAAO,EACb,MAAM,EAAC,MAAM,EACb,mBAAmB,EAAC,UAAU,EAC9B,OAAO,EAAC,MAAM,GAEG,CACf,CACP,CAAC;IACJ,CAAC;;;CACF;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC","sourcesContent":["import { Component, h } from '@stencil/core';\nimport \"../.././stories/Components/MessageBubble/DocumentMessageBubble/DocumentMessageBubble\"\n@Component({\n tag: 'chat-document-message-bubble',\n shadow: true\n})\n class ChatDocumentMessageBubble {\n\n render() {\n return (\n <div>\n <document-message\n bgColor='#EFF1FA'\n borderRadius=\"6px\"\n time={new Date().toISOString()}\n docName='Somesomsomesomesome'\n width=\"200px\"\n height=\"80px\"\n documentNamePadding=\"10px 7px\"\n padding=\"10px\"\n >\n </document-message>\n </div>\n );\n }\n}\n\nexport { ChatDocumentMessageBubble };\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import "../.././stories/Components/MessageBubble/ImageMessageBubble/ImageMessageBubble";
|
|
3
|
+
class ChatImageMessageBubble {
|
|
4
|
+
render() {
|
|
5
|
+
return (h("div", { key: '1afe59b20944af81015c1e00c305c8a15e02efe7' }, h("image-message", { key: '0581ec8f8cf292598d54965ace38e4cff2c1e15c', bgColor: '#EFF1FA', imageSrc: 'https://i.etsystatic.com/7251436/r/il/4fc56c/5398499035/il_570xN.5398499035_rnzx.jpg', width: '200px', height: 'fit-content', padding: '10px 10px 15px 10px', borderRadius: "6px", time: new Date().toISOString() })));
|
|
6
|
+
}
|
|
7
|
+
static get is() { return "chat-image-message-bubble"; }
|
|
8
|
+
static get encapsulation() { return "shadow"; }
|
|
9
|
+
}
|
|
10
|
+
export { ChatImageMessageBubble };
|
|
11
|
+
//# sourceMappingURL=ChatImageMessageBubble.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatImageMessageBubble.js","sourceRoot":"","sources":["../../../src/components/ChatUIComponent/ChatImageMessageBubble.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,gFAAgF,CAAA;AACvF,MAIO,sBAAsB;IAE3B,MAAM;QACJ,OAAO,CACL;YACE,sEACE,OAAO,EAAC,SAAS,EACjB,QAAQ,EAAC,sFAAsF,EAC/F,KAAK,EAAC,OAAO,EACb,MAAM,EAAC,aAAa,EACpB,OAAO,EAAC,qBAAqB,EAC7B,YAAY,EAAC,KAAK,EAClB,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,GAEhB,CACZ,CACP,CAAC;IACJ,CAAC;;;CACF;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC","sourcesContent":["import { Component, h } from '@stencil/core';\nimport \"../.././stories/Components/MessageBubble/ImageMessageBubble/ImageMessageBubble\"\n@Component({\n tag: 'chat-image-message-bubble',\n shadow: true\n})\n class ChatImageMessageBubble {\n\n render() {\n return (\n <div>\n <image-message\n bgColor='#EFF1FA'\n imageSrc='https://i.etsystatic.com/7251436/r/il/4fc56c/5398499035/il_570xN.5398499035_rnzx.jpg'\n width='200px'\n height='fit-content'\n padding='10px 10px 15px 10px'\n borderRadius=\"6px\"\n time={new Date().toISOString()}\n >\n </image-message>\n </div>\n );\n }\n}\n\nexport { ChatImageMessageBubble };\n"]}
|
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import ChatSDK from "test-iso-chat-sdk";
|
|
3
|
+
import "../../../stories/Components/Loader/Spinner/Spinner";
|
|
4
|
+
import { showToast } from "../../../stories/Components/Toaster/toast-helper";
|
|
5
|
+
import "../../../stories/Components/ProfileTab/ProfileTab";
|
|
6
|
+
import { connectSocialAccount, connectSocialAccountCallback, deleteSocialAccount, getConnectedInstagramAccounts, getSocialAccounts, getSocialRedirectUrl, openSocialAuthPopup, } from "../../../api/social-accounts";
|
|
7
|
+
import { drawerDialogService } from "../../../stories/Components/Dialog-Drawer/dialog-drawer";
|
|
8
|
+
export class ProfilePage {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.loadSocialAccounts = async () => {
|
|
11
|
+
this.isSocialLoading = true;
|
|
12
|
+
try {
|
|
13
|
+
const data = await getSocialAccounts({ platform: 'instagram' });
|
|
14
|
+
this.socialAccounts = (data === null || data === void 0 ? void 0 : data.accounts) || [];
|
|
15
|
+
this.InstagramAccountsChanged.emit(this.socialAccounts);
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
console.error('Failed to load social accounts:', error);
|
|
19
|
+
this.socialAccounts = [];
|
|
20
|
+
this.InstagramAccountsChanged.emit([]);
|
|
21
|
+
}
|
|
22
|
+
finally {
|
|
23
|
+
this.isSocialLoading = false;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
this.completeSocialCallback = async (payload) => {
|
|
27
|
+
await connectSocialAccountCallback({
|
|
28
|
+
platform: payload.platform || 'instagram',
|
|
29
|
+
username: payload.username || '',
|
|
30
|
+
displayName: payload.displayName || '',
|
|
31
|
+
loginMethod: 'instagram_login',
|
|
32
|
+
});
|
|
33
|
+
await this.loadSocialAccounts();
|
|
34
|
+
showToast({
|
|
35
|
+
message: 'Instagram connected',
|
|
36
|
+
type: 'success',
|
|
37
|
+
position: 'bottom-right',
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
this.handleConnectInstagram = async () => {
|
|
41
|
+
this.isSocialLoading = true;
|
|
42
|
+
try {
|
|
43
|
+
const data = await connectSocialAccount({
|
|
44
|
+
platform: 'instagram',
|
|
45
|
+
redirectUrl: getSocialRedirectUrl(),
|
|
46
|
+
loginMethod: 'instagram_login',
|
|
47
|
+
});
|
|
48
|
+
if (!(data === null || data === void 0 ? void 0 : data.authUrl))
|
|
49
|
+
throw new Error('No auth URL returned');
|
|
50
|
+
const result = await openSocialAuthPopup(data.authUrl);
|
|
51
|
+
if (result === null || result === void 0 ? void 0 : result.redirected)
|
|
52
|
+
return; // full-page fallback
|
|
53
|
+
if (result === null || result === void 0 ? void 0 : result.cancelled) {
|
|
54
|
+
// User closed popup - account may still be linked on Zernio; refresh list
|
|
55
|
+
await this.loadSocialAccounts();
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
await this.completeSocialCallback(result || {});
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
console.error('Failed to connect Instagram:', error);
|
|
62
|
+
showToast({
|
|
63
|
+
message: (error === null || error === void 0 ? void 0 : error.message) || 'Failed to connect Instagram',
|
|
64
|
+
type: 'error',
|
|
65
|
+
position: 'bottom-right',
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
finally {
|
|
69
|
+
this.isSocialLoading = false;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
this.handleDisconnectInstagram = (accountId, username) => {
|
|
73
|
+
drawerDialogService.openDialog('confirm-dialog', {
|
|
74
|
+
title: 'Disconnect Instagram',
|
|
75
|
+
description: `Disconnect @${username || 'this account'}?`,
|
|
76
|
+
handleConfirm: async () => {
|
|
77
|
+
drawerDialogService.closeDialog('confirm-dialog');
|
|
78
|
+
this.isSocialLoading = true;
|
|
79
|
+
try {
|
|
80
|
+
await deleteSocialAccount({ accountId });
|
|
81
|
+
// API soft-disconnects (status=disconnected) — reload truth from server
|
|
82
|
+
await this.loadSocialAccounts();
|
|
83
|
+
showToast({
|
|
84
|
+
message: 'Instagram disconnected',
|
|
85
|
+
type: 'success',
|
|
86
|
+
position: 'bottom-right',
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
console.error('Failed to disconnect Instagram:', error);
|
|
91
|
+
showToast({
|
|
92
|
+
message: (error === null || error === void 0 ? void 0 : error.message) || 'Failed to disconnect Instagram',
|
|
93
|
+
type: 'error',
|
|
94
|
+
position: 'bottom-right',
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
finally {
|
|
98
|
+
this.isSocialLoading = false;
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
this.validateNameInput = (input) => {
|
|
104
|
+
var _a;
|
|
105
|
+
return (_a = input === null || input === void 0 ? void 0 : input.toLowerCase()) === null || _a === void 0 ? void 0 : _a.replace(/[^a-z0-9_]/g, '').slice(0, 20);
|
|
106
|
+
};
|
|
107
|
+
this.handleNameEdit = () => {
|
|
108
|
+
this.isEditingName = true;
|
|
109
|
+
requestAnimationFrame(() => {
|
|
110
|
+
var _a, _b;
|
|
111
|
+
const profileComponent = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('profile-tab');
|
|
112
|
+
const inputElement = (_b = profileComponent === null || profileComponent === void 0 ? void 0 : profileComponent.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.name-input');
|
|
113
|
+
if (inputElement) {
|
|
114
|
+
inputElement.focus();
|
|
115
|
+
const length = inputElement.value.length;
|
|
116
|
+
inputElement.setSelectionRange(length, length);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
this.handleNameChange = (event) => {
|
|
121
|
+
const inputElement = event.target;
|
|
122
|
+
const originalValue = inputElement.value;
|
|
123
|
+
const cursorPosition = inputElement.selectionStart || 0;
|
|
124
|
+
this.newName = this.validateNameInput(originalValue);
|
|
125
|
+
if (this.newName !== originalValue) {
|
|
126
|
+
const beforeCursor = originalValue.substring(0, cursorPosition);
|
|
127
|
+
const validatedBeforeCursor = this.validateNameInput(beforeCursor);
|
|
128
|
+
const diff = beforeCursor.length - validatedBeforeCursor.length;
|
|
129
|
+
inputElement.value = this.newName;
|
|
130
|
+
const newPosition = Math.max(0, cursorPosition - diff);
|
|
131
|
+
setTimeout(() => {
|
|
132
|
+
inputElement.setSelectionRange(newPosition, newPosition);
|
|
133
|
+
}, 0);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
this.handleNameSave = async () => {
|
|
137
|
+
try {
|
|
138
|
+
if (this.newName !== this.name) {
|
|
139
|
+
await this.updateUserProfile({ name: this.newName });
|
|
140
|
+
// getUserDetails is still called to sync with server
|
|
141
|
+
await this.getUserDetails();
|
|
142
|
+
}
|
|
143
|
+
this.isEditingName = false;
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
console.error('Error saving name:', error);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
this.handleNameKeyDown = (event) => {
|
|
150
|
+
if (event.key === 'Enter') {
|
|
151
|
+
this.handleNameSave();
|
|
152
|
+
}
|
|
153
|
+
else if (event.key === 'Escape') {
|
|
154
|
+
this.newName = this.name;
|
|
155
|
+
this.isEditingName = false;
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
this.handleFileChange = async (event) => {
|
|
159
|
+
var _a;
|
|
160
|
+
const input = event.target;
|
|
161
|
+
const file = (_a = input.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
162
|
+
if (!file)
|
|
163
|
+
return;
|
|
164
|
+
try {
|
|
165
|
+
this.selectedFile = file;
|
|
166
|
+
// Create a temporary URL for preview
|
|
167
|
+
const tempUrl = URL.createObjectURL(file);
|
|
168
|
+
this.tempProfilePhotoUrl = tempUrl;
|
|
169
|
+
input.value = '';
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
console.error('Error handling file selection:', error);
|
|
173
|
+
input.value = '';
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
this.handleManualUpdate = async () => {
|
|
177
|
+
if (!this.selectedFile && this.newName === this.name) {
|
|
178
|
+
showToast({
|
|
179
|
+
message: 'No changes to update',
|
|
180
|
+
type: 'info',
|
|
181
|
+
position: 'bottom-right',
|
|
182
|
+
});
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
try {
|
|
186
|
+
this.isLoading = true;
|
|
187
|
+
let mediaUrl = this.profilePhotoUrl;
|
|
188
|
+
if (this.selectedFile) {
|
|
189
|
+
mediaUrl = await this.getPresignedUrl(this.selectedFile);
|
|
190
|
+
}
|
|
191
|
+
await this.updateUserProfile({
|
|
192
|
+
name: this.newName !== this.name ? this.newName : undefined,
|
|
193
|
+
profilePhotoUrl: this.selectedFile ? mediaUrl : undefined,
|
|
194
|
+
});
|
|
195
|
+
// Clean up after successful update
|
|
196
|
+
if (this.selectedFile) {
|
|
197
|
+
// Revoke the temporary object URL to prevent memory leaks
|
|
198
|
+
if (this.tempProfilePhotoUrl && this.tempProfilePhotoUrl.startsWith('blob:')) {
|
|
199
|
+
URL.revokeObjectURL(this.tempProfilePhotoUrl);
|
|
200
|
+
}
|
|
201
|
+
// Update the tempProfilePhotoUrl to match the new profilePhotoUrl
|
|
202
|
+
this.tempProfilePhotoUrl = this.profilePhotoUrl;
|
|
203
|
+
this.selectedFile = null;
|
|
204
|
+
}
|
|
205
|
+
// Still call getUserDetails to ensure server-side sync
|
|
206
|
+
await this.getUserDetails();
|
|
207
|
+
}
|
|
208
|
+
catch (error) {
|
|
209
|
+
console.error('Error updating profile:', error);
|
|
210
|
+
this.isLoading = false;
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
this.cancelChanges = () => {
|
|
214
|
+
this.newName = this.name;
|
|
215
|
+
this.isEditingName = false;
|
|
216
|
+
if (this.selectedFile) {
|
|
217
|
+
this.selectedFile = null;
|
|
218
|
+
// Only revoke if it's a blob URL
|
|
219
|
+
if (this.tempProfilePhotoUrl && this.tempProfilePhotoUrl.startsWith('blob:')) {
|
|
220
|
+
URL.revokeObjectURL(this.tempProfilePhotoUrl);
|
|
221
|
+
}
|
|
222
|
+
this.tempProfilePhotoUrl = this.profilePhotoUrl;
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
this.name = '';
|
|
226
|
+
this.profilePhotoUrl = '';
|
|
227
|
+
this.isEditingName = false;
|
|
228
|
+
this.newName = '';
|
|
229
|
+
this.isLoading = false;
|
|
230
|
+
this.selectedFile = null;
|
|
231
|
+
this.tempProfilePhotoUrl = '';
|
|
232
|
+
this.socialAccounts = [];
|
|
233
|
+
this.isSocialLoading = false;
|
|
234
|
+
this.conversationId = '';
|
|
235
|
+
this.getUserDetails = undefined;
|
|
236
|
+
this.closeDrawer = undefined;
|
|
237
|
+
this.toggleTheme = undefined;
|
|
238
|
+
this.defaultTheme = undefined;
|
|
239
|
+
this.agentUserId = '';
|
|
240
|
+
}
|
|
241
|
+
get connectedAccounts() {
|
|
242
|
+
return getConnectedInstagramAccounts(this.socialAccounts);
|
|
243
|
+
}
|
|
244
|
+
// Lifecycle methods
|
|
245
|
+
componentWillLoad() {
|
|
246
|
+
this.newName = this.name;
|
|
247
|
+
this.tempProfilePhotoUrl = this.profilePhotoUrl;
|
|
248
|
+
this.loadSocialAccounts();
|
|
249
|
+
}
|
|
250
|
+
// API methods
|
|
251
|
+
async getPresignedUrl(file) {
|
|
252
|
+
try {
|
|
253
|
+
const mediaExtension = file.name.split('.').pop();
|
|
254
|
+
const res = await ChatSDK.getInstance().user.getPresignedurlUpdate({
|
|
255
|
+
mediaExtension,
|
|
256
|
+
});
|
|
257
|
+
// Upload file to presigned URL
|
|
258
|
+
await fetch(res.presignedUrl, {
|
|
259
|
+
method: 'PUT',
|
|
260
|
+
body: file,
|
|
261
|
+
headers: {
|
|
262
|
+
'Content-Type': file.type,
|
|
263
|
+
},
|
|
264
|
+
});
|
|
265
|
+
// Return the final URL for the uploaded file
|
|
266
|
+
return res.mediaUrl;
|
|
267
|
+
}
|
|
268
|
+
catch (error) {
|
|
269
|
+
console.error('Error getting presigned URL or uploading file:', error);
|
|
270
|
+
throw error;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
async updateUserProfile(payload) {
|
|
274
|
+
this.isLoading = true;
|
|
275
|
+
try {
|
|
276
|
+
await ChatSDK.getInstance().user.patchUser({
|
|
277
|
+
userName: payload.name,
|
|
278
|
+
userProfileImageUrl: payload.profilePhotoUrl,
|
|
279
|
+
});
|
|
280
|
+
// Update local properties immediately for real-time update
|
|
281
|
+
if (payload.name) {
|
|
282
|
+
this.name = payload.name;
|
|
283
|
+
}
|
|
284
|
+
if (payload.profilePhotoUrl) {
|
|
285
|
+
this.profilePhotoUrl = payload.profilePhotoUrl;
|
|
286
|
+
}
|
|
287
|
+
this.isLoading = false;
|
|
288
|
+
showToast({
|
|
289
|
+
message: 'Profile Updated Successfully!',
|
|
290
|
+
type: 'success',
|
|
291
|
+
position: 'bottom-right',
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
catch (error) {
|
|
295
|
+
this.isLoading = false;
|
|
296
|
+
showToast({
|
|
297
|
+
message: 'Failed to update profile',
|
|
298
|
+
type: 'error',
|
|
299
|
+
position: 'bottom-right',
|
|
300
|
+
});
|
|
301
|
+
console.error('Error updating user profile:', error);
|
|
302
|
+
throw error;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
render() {
|
|
306
|
+
const hasChanges = this.newName !== this.name || this.selectedFile !== null;
|
|
307
|
+
return (h("profile-tab", { key: '3d52f731efb0616b6c366191c7f333c8d1b175c7', name: this.name, isLoading: this.isLoading, tempProfilePhotoUrl: this.tempProfilePhotoUrl, isEditingName: this.isEditingName, newName: this.newName, hasChanges: hasChanges, handleNameEdit: this.handleNameEdit, handleNameChange: this.handleNameChange, handleNameKeyDown: this.handleNameKeyDown, handleNameSave: this.handleNameSave, handleFileChange: this.handleFileChange, handleManualUpdate: this.handleManualUpdate, cancelChanges: this.cancelChanges, closeDrawer: this.closeDrawer, defaultTheme: this.defaultTheme, toggleTheme: this.toggleTheme, socialAccounts: this.connectedAccounts, isSocialLoading: this.isSocialLoading, handleConnectInstagram: this.handleConnectInstagram, handleDisconnectInstagram: this.handleDisconnectInstagram }));
|
|
308
|
+
}
|
|
309
|
+
static get is() { return "profile-page"; }
|
|
310
|
+
static get encapsulation() { return "shadow"; }
|
|
311
|
+
static get originalStyleUrls() {
|
|
312
|
+
return {
|
|
313
|
+
"$": ["profile-page.css"]
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
static get styleUrls() {
|
|
317
|
+
return {
|
|
318
|
+
"$": ["profile-page.css"]
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
static get properties() {
|
|
322
|
+
return {
|
|
323
|
+
"name": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"mutable": true,
|
|
326
|
+
"complexType": {
|
|
327
|
+
"original": "string",
|
|
328
|
+
"resolved": "string",
|
|
329
|
+
"references": {}
|
|
330
|
+
},
|
|
331
|
+
"required": false,
|
|
332
|
+
"optional": false,
|
|
333
|
+
"docs": {
|
|
334
|
+
"tags": [],
|
|
335
|
+
"text": ""
|
|
336
|
+
},
|
|
337
|
+
"attribute": "name",
|
|
338
|
+
"reflect": false,
|
|
339
|
+
"defaultValue": "''"
|
|
340
|
+
},
|
|
341
|
+
"profilePhotoUrl": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"mutable": true,
|
|
344
|
+
"complexType": {
|
|
345
|
+
"original": "string",
|
|
346
|
+
"resolved": "string",
|
|
347
|
+
"references": {}
|
|
348
|
+
},
|
|
349
|
+
"required": false,
|
|
350
|
+
"optional": false,
|
|
351
|
+
"docs": {
|
|
352
|
+
"tags": [],
|
|
353
|
+
"text": ""
|
|
354
|
+
},
|
|
355
|
+
"attribute": "profile-photo-url",
|
|
356
|
+
"reflect": false,
|
|
357
|
+
"defaultValue": "''"
|
|
358
|
+
},
|
|
359
|
+
"conversationId": {
|
|
360
|
+
"type": "string",
|
|
361
|
+
"mutable": false,
|
|
362
|
+
"complexType": {
|
|
363
|
+
"original": "string",
|
|
364
|
+
"resolved": "string",
|
|
365
|
+
"references": {}
|
|
366
|
+
},
|
|
367
|
+
"required": false,
|
|
368
|
+
"optional": false,
|
|
369
|
+
"docs": {
|
|
370
|
+
"tags": [],
|
|
371
|
+
"text": ""
|
|
372
|
+
},
|
|
373
|
+
"attribute": "conversation-id",
|
|
374
|
+
"reflect": false,
|
|
375
|
+
"defaultValue": "''"
|
|
376
|
+
},
|
|
377
|
+
"getUserDetails": {
|
|
378
|
+
"type": "unknown",
|
|
379
|
+
"mutable": false,
|
|
380
|
+
"complexType": {
|
|
381
|
+
"original": "() => void",
|
|
382
|
+
"resolved": "() => void",
|
|
383
|
+
"references": {}
|
|
384
|
+
},
|
|
385
|
+
"required": false,
|
|
386
|
+
"optional": false,
|
|
387
|
+
"docs": {
|
|
388
|
+
"tags": [],
|
|
389
|
+
"text": ""
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"closeDrawer": {
|
|
393
|
+
"type": "unknown",
|
|
394
|
+
"mutable": false,
|
|
395
|
+
"complexType": {
|
|
396
|
+
"original": "() => void",
|
|
397
|
+
"resolved": "() => void",
|
|
398
|
+
"references": {}
|
|
399
|
+
},
|
|
400
|
+
"required": false,
|
|
401
|
+
"optional": false,
|
|
402
|
+
"docs": {
|
|
403
|
+
"tags": [],
|
|
404
|
+
"text": ""
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
"toggleTheme": {
|
|
408
|
+
"type": "unknown",
|
|
409
|
+
"mutable": false,
|
|
410
|
+
"complexType": {
|
|
411
|
+
"original": "() => void",
|
|
412
|
+
"resolved": "() => void",
|
|
413
|
+
"references": {}
|
|
414
|
+
},
|
|
415
|
+
"required": false,
|
|
416
|
+
"optional": false,
|
|
417
|
+
"docs": {
|
|
418
|
+
"tags": [],
|
|
419
|
+
"text": ""
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
"defaultTheme": {
|
|
423
|
+
"type": "string",
|
|
424
|
+
"mutable": false,
|
|
425
|
+
"complexType": {
|
|
426
|
+
"original": "string",
|
|
427
|
+
"resolved": "string",
|
|
428
|
+
"references": {}
|
|
429
|
+
},
|
|
430
|
+
"required": false,
|
|
431
|
+
"optional": false,
|
|
432
|
+
"docs": {
|
|
433
|
+
"tags": [],
|
|
434
|
+
"text": ""
|
|
435
|
+
},
|
|
436
|
+
"attribute": "default-theme",
|
|
437
|
+
"reflect": false
|
|
438
|
+
},
|
|
439
|
+
"agentUserId": {
|
|
440
|
+
"type": "string",
|
|
441
|
+
"mutable": false,
|
|
442
|
+
"complexType": {
|
|
443
|
+
"original": "string",
|
|
444
|
+
"resolved": "string",
|
|
445
|
+
"references": {}
|
|
446
|
+
},
|
|
447
|
+
"required": false,
|
|
448
|
+
"optional": false,
|
|
449
|
+
"docs": {
|
|
450
|
+
"tags": [],
|
|
451
|
+
"text": ""
|
|
452
|
+
},
|
|
453
|
+
"attribute": "agent-user-id",
|
|
454
|
+
"reflect": false,
|
|
455
|
+
"defaultValue": "''"
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
static get states() {
|
|
460
|
+
return {
|
|
461
|
+
"isEditingName": {},
|
|
462
|
+
"newName": {},
|
|
463
|
+
"isLoading": {},
|
|
464
|
+
"selectedFile": {},
|
|
465
|
+
"tempProfilePhotoUrl": {},
|
|
466
|
+
"socialAccounts": {},
|
|
467
|
+
"isSocialLoading": {}
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
static get events() {
|
|
471
|
+
return [{
|
|
472
|
+
"method": "InstagramAccountsChanged",
|
|
473
|
+
"name": "InstagramAccountsChanged",
|
|
474
|
+
"bubbles": true,
|
|
475
|
+
"cancelable": true,
|
|
476
|
+
"composed": true,
|
|
477
|
+
"docs": {
|
|
478
|
+
"tags": [],
|
|
479
|
+
"text": ""
|
|
480
|
+
},
|
|
481
|
+
"complexType": {
|
|
482
|
+
"original": "any[]",
|
|
483
|
+
"resolved": "any[]",
|
|
484
|
+
"references": {}
|
|
485
|
+
}
|
|
486
|
+
}];
|
|
487
|
+
}
|
|
488
|
+
static get methods() {
|
|
489
|
+
return {
|
|
490
|
+
"getPresignedUrl": {
|
|
491
|
+
"complexType": {
|
|
492
|
+
"signature": "(file: File) => Promise<string>",
|
|
493
|
+
"parameters": [{
|
|
494
|
+
"name": "file",
|
|
495
|
+
"type": "File",
|
|
496
|
+
"docs": ""
|
|
497
|
+
}],
|
|
498
|
+
"references": {
|
|
499
|
+
"Promise": {
|
|
500
|
+
"location": "global",
|
|
501
|
+
"id": "global::Promise"
|
|
502
|
+
},
|
|
503
|
+
"File": {
|
|
504
|
+
"location": "global",
|
|
505
|
+
"id": "global::File"
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
"return": "Promise<string>"
|
|
509
|
+
},
|
|
510
|
+
"docs": {
|
|
511
|
+
"text": "",
|
|
512
|
+
"tags": []
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
"updateUserProfile": {
|
|
516
|
+
"complexType": {
|
|
517
|
+
"signature": "(payload: { name?: string; profilePhotoUrl?: string; }) => Promise<void>",
|
|
518
|
+
"parameters": [{
|
|
519
|
+
"name": "payload",
|
|
520
|
+
"type": "{ name?: string; profilePhotoUrl?: string; }",
|
|
521
|
+
"docs": ""
|
|
522
|
+
}],
|
|
523
|
+
"references": {
|
|
524
|
+
"Promise": {
|
|
525
|
+
"location": "global",
|
|
526
|
+
"id": "global::Promise"
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
"return": "Promise<void>"
|
|
530
|
+
},
|
|
531
|
+
"docs": {
|
|
532
|
+
"text": "",
|
|
533
|
+
"tags": []
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
static get elementRef() { return "el"; }
|
|
539
|
+
}
|
|
540
|
+
//# sourceMappingURL=Profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Profile.js","sourceRoot":"","sources":["../../../../src/components/ChatUIComponent/ChatOwnProfile/Profile.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAChG,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,oDAAoD,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,kDAAkD,CAAC;AAC7E,OAAO,mDAAmD,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,mBAAmB,EACnB,6BAA6B,EAC7B,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,mBAAmB,E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IAAI,CAAC,WAAW,EAC7B,cAAc,EAAE,IAAI,CAAC,iBAAiB,EACtC,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EACnD,yBAAyB,EAAE,IAAI,CAAC,yBAAyB,GACzD,CACH,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, State, Method, Element, Event, EventEmitter } from '@stencil/core';\nimport ChatSDK from 'test-iso-chat-sdk';\nimport '../../../stories/Components/Loader/Spinner/Spinner';\nimport { showToast } from '../../../stories/Components/Toaster/toast-helper';\nimport '../../../stories/Components/ProfileTab/ProfileTab';\nimport {\n connectSocialAccount,\n connectSocialAccountCallback,\n deleteSocialAccount,\n getConnectedInstagramAccounts,\n getSocialAccounts,\n getSocialRedirectUrl,\n openSocialAuthPopup,\n} from '../../../api/social-accounts';\nimport { drawerDialogService } from '../../../stories/Components/Dialog-Drawer/dialog-drawer';\n\n@Component({\n tag: 'profile-page',\n styleUrl: 'profile-page.css',\n shadow: true,\n})\nexport class ProfilePage {\n @Element() el: HTMLElement;\n\n @Prop({ mutable: true }) name: string = '';\n @Prop({ mutable: true }) profilePhotoUrl: string = '';\n\n @State() isEditingName: boolean = false;\n @State() newName: string = '';\n @State() isLoading: boolean = false;\n @State() selectedFile: File | null = null;\n @State() tempProfilePhotoUrl: string = '';\n @State() socialAccounts: any[] = [];\n @State() isSocialLoading: boolean = false;\n @Prop() conversationId: string = '';\n @Prop() getUserDetails: () => void;\n @Prop() closeDrawer: () => void;\n @Prop() toggleTheme: () => void;\n @Prop() defaultTheme: string;\n @Prop() agentUserId: string = '';\n @Event() InstagramAccountsChanged: EventEmitter<any[]>;\n\n private get connectedAccounts() {\n return getConnectedInstagramAccounts(this.socialAccounts);\n }\n\n // Lifecycle methods\n componentWillLoad() {\n this.newName = this.name;\n this.tempProfilePhotoUrl = this.profilePhotoUrl;\n this.loadSocialAccounts();\n }\n\n private loadSocialAccounts = async () => {\n this.isSocialLoading = true;\n try {\n const data = await getSocialAccounts({ platform: 'instagram' });\n this.socialAccounts = data?.accounts || [];\n this.InstagramAccountsChanged.emit(this.socialAccounts);\n } catch (error) {\n console.error('Failed to load social accounts:', error);\n this.socialAccounts = [];\n this.InstagramAccountsChanged.emit([]);\n } finally {\n this.isSocialLoading = false;\n }\n };\n\n private completeSocialCallback = async (payload: {\n zernioAccountId: string;\n username?: string;\n displayName?: string;\n platform?: string;\n }) => {\n await connectSocialAccountCallback({\n platform: payload.platform || 'instagram',\n username: payload.username || '',\n displayName: payload.displayName || '',\n loginMethod: 'instagram_login',\n });\n await this.loadSocialAccounts();\n showToast({\n message: 'Instagram connected',\n type: 'success',\n position: 'bottom-right',\n });\n };\n\n private handleConnectInstagram = async () => {\n this.isSocialLoading = true;\n try {\n const data = await connectSocialAccount({\n platform: 'instagram',\n redirectUrl: getSocialRedirectUrl(),\n loginMethod: 'instagram_login',\n });\n if (!data?.authUrl) throw new Error('No auth URL returned');\n\n const result = await openSocialAuthPopup(data.authUrl);\n if (result?.redirected) return; // full-page fallback\n if (result?.cancelled) {\n // User closed popup - account may still be linked on Zernio; refresh list\n await this.loadSocialAccounts();\n return;\n }\n await this.completeSocialCallback(result || {});\n } catch (error) {\n console.error('Failed to connect Instagram:', error);\n showToast({\n message: (error as Error)?.message || 'Failed to connect Instagram',\n type: 'error',\n position: 'bottom-right',\n });\n } finally {\n this.isSocialLoading = false;\n }\n };\n\n private handleDisconnectInstagram = (accountId: string, username: string) => {\n drawerDialogService.openDialog('confirm-dialog', {\n title: 'Disconnect Instagram',\n description: `Disconnect @${username || 'this account'}?`,\n handleConfirm: async () => {\n drawerDialogService.closeDialog('confirm-dialog');\n this.isSocialLoading = true;\n try {\n await deleteSocialAccount({ accountId });\n // API soft-disconnects (status=disconnected) — reload truth from server\n await this.loadSocialAccounts();\n showToast({\n message: 'Instagram disconnected',\n type: 'success',\n position: 'bottom-right',\n });\n } catch (error) {\n console.error('Failed to disconnect Instagram:', error);\n showToast({\n message: (error as Error)?.message || 'Failed to disconnect Instagram',\n type: 'error',\n position: 'bottom-right',\n });\n } finally {\n this.isSocialLoading = false;\n }\n },\n });\n };\n\n // API methods\n @Method()\n async getPresignedUrl(file: File): Promise<string> {\n try {\n const mediaExtension = file.name.split('.').pop();\n const res = await ChatSDK.getInstance().user.getPresignedurlUpdate({\n mediaExtension,\n });\n\n // Upload file to presigned URL\n await fetch(res.presignedUrl, {\n method: 'PUT',\n body: file,\n headers: {\n 'Content-Type': file.type,\n },\n });\n\n // Return the final URL for the uploaded file\n return res.mediaUrl;\n } catch (error) {\n console.error('Error getting presigned URL or uploading file:', error);\n throw error;\n }\n }\n\n @Method()\n async updateUserProfile(payload: { name?: string; profilePhotoUrl?: string }): Promise<void> {\n this.isLoading = true;\n try {\n await ChatSDK.getInstance().user.patchUser({\n userName: payload.name,\n userProfileImageUrl: payload.profilePhotoUrl,\n });\n\n // Update local properties immediately for real-time update\n if (payload.name) {\n this.name = payload.name;\n }\n if (payload.profilePhotoUrl) {\n this.profilePhotoUrl = payload.profilePhotoUrl;\n }\n\n this.isLoading = false;\n showToast({\n message: 'Profile Updated Successfully!',\n type: 'success',\n position: 'bottom-right',\n });\n } catch (error) {\n this.isLoading = false;\n showToast({\n message: 'Failed to update profile',\n type: 'error',\n position: 'bottom-right',\n });\n console.error('Error updating user profile:', error);\n throw error;\n }\n }\n\n private validateNameInput = (input: string): string => {\n return input?.toLowerCase()?.replace(/[^a-z0-9_]/g, '').slice(0, 20);\n };\n \n\n private handleNameEdit = () => {\n this.isEditingName = true;\n requestAnimationFrame(() => {\n const profileComponent = this.el.shadowRoot?.querySelector('profile-tab');\n const inputElement = profileComponent?.shadowRoot?.querySelector('.name-input') as HTMLInputElement;\n if (inputElement) {\n inputElement.focus();\n const length = inputElement.value.length;\n inputElement.setSelectionRange(length, length);\n }\n });\n };\n\n private handleNameChange = (event: Event) => {\n const inputElement = event.target as HTMLInputElement;\n const originalValue = inputElement.value;\n const cursorPosition = inputElement.selectionStart || 0;\n \n this.newName = this.validateNameInput(originalValue);\n \n if (this.newName !== originalValue) {\n const beforeCursor = originalValue.substring(0, cursorPosition);\n const validatedBeforeCursor = this.validateNameInput(beforeCursor);\n const diff = beforeCursor.length - validatedBeforeCursor.length;\n \n inputElement.value = this.newName;\n const newPosition = Math.max(0, cursorPosition - diff);\n \n setTimeout(() => {\n inputElement.setSelectionRange(newPosition, newPosition);\n }, 0);\n }\n };\n\n private handleNameSave = async () => {\n try {\n if (this.newName !== this.name) {\n await this.updateUserProfile({ name: this.newName });\n // getUserDetails is still called to sync with server\n await this.getUserDetails();\n }\n this.isEditingName = false;\n } catch (error) {\n console.error('Error saving name:', error);\n }\n };\n\n private handleNameKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n this.handleNameSave();\n } else if (event.key === 'Escape') {\n this.newName = this.name;\n this.isEditingName = false;\n }\n };\n\n private handleFileChange = async (event: Event) => {\n const input = event.target as HTMLInputElement;\n const file = input.files?.[0];\n\n if (!file) return;\n\n try {\n this.selectedFile = file;\n\n // Create a temporary URL for preview\n const tempUrl = URL.createObjectURL(file);\n this.tempProfilePhotoUrl = tempUrl;\n\n input.value = '';\n } catch (error) {\n console.error('Error handling file selection:', error);\n input.value = '';\n }\n };\n\n private handleManualUpdate = async () => {\n if (!this.selectedFile && this.newName === this.name) {\n showToast({\n message: 'No changes to update',\n type: 'info',\n position: 'bottom-right',\n });\n return;\n }\n\n try {\n this.isLoading = true;\n let mediaUrl = this.profilePhotoUrl;\n\n if (this.selectedFile) {\n mediaUrl = await this.getPresignedUrl(this.selectedFile);\n }\n\n await this.updateUserProfile({\n name: this.newName !== this.name ? this.newName : undefined,\n profilePhotoUrl: this.selectedFile ? mediaUrl : undefined,\n });\n\n // Clean up after successful update\n if (this.selectedFile) {\n // Revoke the temporary object URL to prevent memory leaks\n if (this.tempProfilePhotoUrl && this.tempProfilePhotoUrl.startsWith('blob:')) {\n URL.revokeObjectURL(this.tempProfilePhotoUrl);\n }\n // Update the tempProfilePhotoUrl to match the new profilePhotoUrl\n this.tempProfilePhotoUrl = this.profilePhotoUrl;\n this.selectedFile = null;\n }\n\n // Still call getUserDetails to ensure server-side sync\n await this.getUserDetails();\n } catch (error) {\n console.error('Error updating profile:', error);\n this.isLoading = false;\n }\n };\n\n private cancelChanges = () => {\n this.newName = this.name;\n this.isEditingName = false;\n\n if (this.selectedFile) {\n this.selectedFile = null;\n\n // Only revoke if it's a blob URL\n if (this.tempProfilePhotoUrl && this.tempProfilePhotoUrl.startsWith('blob:')) {\n URL.revokeObjectURL(this.tempProfilePhotoUrl);\n }\n this.tempProfilePhotoUrl = this.profilePhotoUrl;\n }\n };\n\n render() {\n const hasChanges = this.newName !== this.name || this.selectedFile !== null;\n\n return (\n <profile-tab\n name={this.name}\n isLoading={this.isLoading}\n tempProfilePhotoUrl={this.tempProfilePhotoUrl}\n isEditingName={this.isEditingName}\n newName={this.newName}\n hasChanges={hasChanges}\n handleNameEdit={this.handleNameEdit}\n handleNameChange={this.handleNameChange}\n handleNameKeyDown={this.handleNameKeyDown}\n handleNameSave={this.handleNameSave}\n handleFileChange={this.handleFileChange}\n handleManualUpdate={this.handleManualUpdate}\n cancelChanges={this.cancelChanges}\n closeDrawer={this.closeDrawer}\n defaultTheme={this.defaultTheme}\n toggleTheme={this.toggleTheme}\n socialAccounts={this.connectedAccounts}\n isSocialLoading={this.isSocialLoading}\n handleConnectInstagram={this.handleConnectInstagram}\n handleDisconnectInstagram={this.handleDisconnectInstagram}\n />\n );\n }\n}\n"]}
|