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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-9afe62b6.js');
|
|
4
|
+
const Image = require('./Image-67c52acd.js');
|
|
5
|
+
const dialogDrawer = require('./dialog-drawer-9d04911c.js');
|
|
6
|
+
|
|
7
|
+
class BlockedUsers extends Image.h {
|
|
8
|
+
static get properties() {
|
|
9
|
+
return {
|
|
10
|
+
blockedUsers: { type: Array },
|
|
11
|
+
isLoading: { type: Boolean },
|
|
12
|
+
paginationLoading: { type: Boolean },
|
|
13
|
+
hasMore: { type: Boolean },
|
|
14
|
+
handleUnblock: { type: Function },
|
|
15
|
+
goBack: { type: Function },
|
|
16
|
+
findBlokedUser: { type: Function },
|
|
17
|
+
skip: { type: Number },
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
this.blockedUsers = [];
|
|
24
|
+
this.isLoading = false;
|
|
25
|
+
this.handleUnblock = () => {};
|
|
26
|
+
this.goBack = () => {};
|
|
27
|
+
this.searchTerm = '';
|
|
28
|
+
this.debouncedSearchHandler = dialogDrawer.debounce(query => {
|
|
29
|
+
this.findBlokedUser(query);
|
|
30
|
+
}, 500);
|
|
31
|
+
}
|
|
32
|
+
handleScroll(event) {
|
|
33
|
+
const element = event.target;
|
|
34
|
+
const threshold = 10;
|
|
35
|
+
if (element.scrollHeight - element.scrollTop <= element.clientHeight + threshold && this.hasMore && !this.paginationLoading) {
|
|
36
|
+
this.findBlokedUser(null, this.skip + 20);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
handleSearch(e) {
|
|
40
|
+
this.searchTerm = e.target.value;
|
|
41
|
+
this.debouncedSearchHandler(this.searchTerm);
|
|
42
|
+
}
|
|
43
|
+
unBlockUser(user){
|
|
44
|
+
dialogDrawer.drawerDialogService.openDialog('confirm-dialog', {
|
|
45
|
+
title: `Unblock`,
|
|
46
|
+
description: `Are you sure you want to unblock ${user.userName} ?`,
|
|
47
|
+
handleConfirm:() => this.handleUnblock(user.userId)
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
render() {
|
|
51
|
+
return Image.ke`
|
|
52
|
+
<div class="blocked-users-container">
|
|
53
|
+
<div class="header">
|
|
54
|
+
<button class="back-button" @click=${this.goBack}>
|
|
55
|
+
<svg
|
|
56
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
57
|
+
width="24"
|
|
58
|
+
height="24"
|
|
59
|
+
viewBox="0 0 24 24"
|
|
60
|
+
fill="none"
|
|
61
|
+
stroke="currentColor"
|
|
62
|
+
stroke-width="2"
|
|
63
|
+
stroke-linecap="round"
|
|
64
|
+
stroke-linejoin="round"
|
|
65
|
+
>
|
|
66
|
+
<line x1="19" y1="12" x2="5" y2="12"></line>
|
|
67
|
+
<polyline points="12 19 5 12 12 5"></polyline>
|
|
68
|
+
</svg>
|
|
69
|
+
</button>
|
|
70
|
+
<h2>Blocked Users</h2>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="search-container">
|
|
73
|
+
<div class="search-input-wrapper">
|
|
74
|
+
<svg
|
|
75
|
+
class="search-icon"
|
|
76
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
77
|
+
width="18"
|
|
78
|
+
height="18"
|
|
79
|
+
viewBox="0 0 24 24"
|
|
80
|
+
fill="none"
|
|
81
|
+
stroke="currentColor"
|
|
82
|
+
stroke-width="2"
|
|
83
|
+
stroke-linecap="round"
|
|
84
|
+
stroke-linejoin="round"
|
|
85
|
+
>
|
|
86
|
+
<circle cx="11" cy="11" r="8"></circle>
|
|
87
|
+
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
|
88
|
+
</svg>
|
|
89
|
+
<input type="text" class="search-input" placeholder="Search users..." .value=${this.searchTerm} @input=${this.handleSearch} />
|
|
90
|
+
${this.searchTerm
|
|
91
|
+
? Image.ke`
|
|
92
|
+
<button
|
|
93
|
+
class="clear-search"
|
|
94
|
+
@click=${() => {
|
|
95
|
+
this.searchTerm = '';
|
|
96
|
+
this.shadowRoot.querySelector('.search-input').value = '';
|
|
97
|
+
this.findBlokedUser();
|
|
98
|
+
}}
|
|
99
|
+
>
|
|
100
|
+
<svg
|
|
101
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
102
|
+
width="18"
|
|
103
|
+
height="18"
|
|
104
|
+
viewBox="0 0 24 24"
|
|
105
|
+
fill="none"
|
|
106
|
+
stroke="currentColor"
|
|
107
|
+
stroke-width="2"
|
|
108
|
+
stroke-linecap="round"
|
|
109
|
+
stroke-linejoin="round"
|
|
110
|
+
>
|
|
111
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
112
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
113
|
+
</svg>
|
|
114
|
+
</button>
|
|
115
|
+
`
|
|
116
|
+
: ''}
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
${this.isLoading
|
|
121
|
+
? Image.ke`
|
|
122
|
+
<div class="loading-spinner">
|
|
123
|
+
<spinner-loader
|
|
124
|
+
height="30px"
|
|
125
|
+
width="30px"
|
|
126
|
+
spinTime="1s"
|
|
127
|
+
spinnerPrimaryColor="var(--bg-primary-color)"
|
|
128
|
+
spinnerSecondaryColor="var(--text-primary-color)"
|
|
129
|
+
spinnerBorderWidth="2px"
|
|
130
|
+
>
|
|
131
|
+
</spinner-loader>
|
|
132
|
+
</div>
|
|
133
|
+
`
|
|
134
|
+
: this.blockedUsers?.length === 0
|
|
135
|
+
? Image.ke`<div class="empty-state">${this.searchTerm ? `No users found matching "${this.searchTerm}".` : "You haven't blocked any users yet."}</div>`
|
|
136
|
+
: Image.ke`
|
|
137
|
+
<div class="users-list" @scroll=${this.handleScroll}>
|
|
138
|
+
${this.blockedUsers?.map(
|
|
139
|
+
user => Image.ke`
|
|
140
|
+
<div class="user-item">
|
|
141
|
+
<div class="user-info">
|
|
142
|
+
<div class="user-avatar">
|
|
143
|
+
${user.userProfileImageUrl
|
|
144
|
+
? Image.ke`${Image.Image({
|
|
145
|
+
src: user.userProfileImageUrl,
|
|
146
|
+
alt: `${user.userName}'s profile picture`,
|
|
147
|
+
width: '40px',
|
|
148
|
+
height: '40px',
|
|
149
|
+
objectFit: 'cover',
|
|
150
|
+
borderRadius: '50%',
|
|
151
|
+
placeholderImage: dialogDrawer.generateProfileImageByInitials(user.userName, 40, 40),
|
|
152
|
+
})}`
|
|
153
|
+
: Image.ke`<div class="avatar-placeholder">${dialogDrawer.generateProfileImageByInitials(user.userName)}</div>`}
|
|
154
|
+
</div>
|
|
155
|
+
<div class="user-name">${user.userName}</div>
|
|
156
|
+
</div>
|
|
157
|
+
<button class="unblock-button" @click=${() => this.unBlockUser(user)}>Unblock</button>
|
|
158
|
+
</div>
|
|
159
|
+
`,
|
|
160
|
+
)}
|
|
161
|
+
${this.paginationLoading
|
|
162
|
+
? Image.ke`
|
|
163
|
+
<div>
|
|
164
|
+
<spinner-loader
|
|
165
|
+
height="30px"
|
|
166
|
+
width="30px"
|
|
167
|
+
spinTime="1s"
|
|
168
|
+
spinnerPrimaryColor="var(--bg-primary-color)"
|
|
169
|
+
spinnerSecondaryColor="var(--text-primary-color)"
|
|
170
|
+
spinnerBorderWidth="2px"
|
|
171
|
+
>
|
|
172
|
+
</spinner-loader>
|
|
173
|
+
</div>
|
|
174
|
+
`
|
|
175
|
+
: null}
|
|
176
|
+
</div>
|
|
177
|
+
`}
|
|
178
|
+
</div>
|
|
179
|
+
`;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
static get styles() {
|
|
183
|
+
return Image.i`
|
|
184
|
+
:host {
|
|
185
|
+
height: 96% !important;
|
|
186
|
+
}
|
|
187
|
+
.blocked-users-container {
|
|
188
|
+
padding: 5px;
|
|
189
|
+
height: 100%;
|
|
190
|
+
display: flex;
|
|
191
|
+
flex-direction: column;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.header {
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
padding: 10px 0;
|
|
198
|
+
margin-bottom: 20px;
|
|
199
|
+
border-bottom: 1px solid var(--bg-grey-color);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.back-button {
|
|
203
|
+
background: none;
|
|
204
|
+
border: none;
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
padding: 5px;
|
|
207
|
+
display: flex;
|
|
208
|
+
align-items: center;
|
|
209
|
+
color: var(--text-outgoing-message);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
h2 {
|
|
213
|
+
margin: 0 0 0 10px;
|
|
214
|
+
font-size: 22px;
|
|
215
|
+
font-weight: 500;
|
|
216
|
+
color: var(--text-outgoing-message);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.loading-spinner {
|
|
220
|
+
display: flex;
|
|
221
|
+
justify-content: center;
|
|
222
|
+
align-items: center;
|
|
223
|
+
height: 100%;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.empty-state {
|
|
227
|
+
text-align: center;
|
|
228
|
+
padding: 40px 20px;
|
|
229
|
+
color: var(--text-secondary-color);
|
|
230
|
+
font-size: 16px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.users-list {
|
|
234
|
+
display: flex;
|
|
235
|
+
flex-direction: column;
|
|
236
|
+
gap: 12px;
|
|
237
|
+
height: calc(100vh - 100px);
|
|
238
|
+
overflow-y: auto;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.user-item {
|
|
242
|
+
display: flex;
|
|
243
|
+
justify-content: space-between;
|
|
244
|
+
align-items: center;
|
|
245
|
+
padding: 8px;
|
|
246
|
+
border-bottom: 1px solid var(--bg-grey-color);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.user-info {
|
|
250
|
+
display: flex;
|
|
251
|
+
align-items: center;
|
|
252
|
+
gap: 12px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.user-avatar {
|
|
256
|
+
width: 40px;
|
|
257
|
+
height: 40px;
|
|
258
|
+
border-radius: 50%;
|
|
259
|
+
overflow: hidden;
|
|
260
|
+
}
|
|
261
|
+
.search-container {
|
|
262
|
+
margin-bottom: 20px;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.search-input-wrapper {
|
|
266
|
+
position: relative;
|
|
267
|
+
display: flex;
|
|
268
|
+
align-items: center;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.search-icon {
|
|
272
|
+
position: absolute;
|
|
273
|
+
left: 10px;
|
|
274
|
+
color: var(--text-secondary-color);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.search-input {
|
|
278
|
+
width: 100%;
|
|
279
|
+
padding: 10px 10px 10px 36px;
|
|
280
|
+
border-radius: 8px;
|
|
281
|
+
border: 1px solid var(--bg-grey-color);
|
|
282
|
+
background-color: var(--bg-grey-color);
|
|
283
|
+
color: var(--text-outgoing-message);
|
|
284
|
+
font-size: 14px;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.search-input:focus {
|
|
288
|
+
outline: none;
|
|
289
|
+
border-color: var(--bg-incoming-message);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.clear-search {
|
|
293
|
+
position: absolute;
|
|
294
|
+
right: 10px;
|
|
295
|
+
background: none;
|
|
296
|
+
border: none;
|
|
297
|
+
cursor: pointer;
|
|
298
|
+
color: var(--text-secondary-color);
|
|
299
|
+
display: flex;
|
|
300
|
+
align-items: center;
|
|
301
|
+
justify-content: center;
|
|
302
|
+
padding: 0;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.avatar-placeholder {
|
|
306
|
+
width: 100%;
|
|
307
|
+
height: 100%;
|
|
308
|
+
display: flex;
|
|
309
|
+
align-items: center;
|
|
310
|
+
justify-content: center;
|
|
311
|
+
background-color: var(--bg-incoming-message);
|
|
312
|
+
color: var(--text-incoming-message);
|
|
313
|
+
font-weight: 500;
|
|
314
|
+
font-size: 16px;
|
|
315
|
+
}
|
|
316
|
+
.user-name {
|
|
317
|
+
font-size: 16px;
|
|
318
|
+
color: var(--text-outgoing-message);
|
|
319
|
+
}
|
|
320
|
+
.unblock-button {
|
|
321
|
+
background-color: var(--base-color);
|
|
322
|
+
color: var(--text-outgoing-message);
|
|
323
|
+
border: none;
|
|
324
|
+
border-radius: 4px;
|
|
325
|
+
padding: 6px 12px;
|
|
326
|
+
font-size: 14px;
|
|
327
|
+
cursor: pointer;
|
|
328
|
+
transition: background-color 0.2s;
|
|
329
|
+
}
|
|
330
|
+
.unblock-button:hover {
|
|
331
|
+
background-color: var(--bg-incoming-message);
|
|
332
|
+
color: var(--text-incoming-message);
|
|
333
|
+
}
|
|
334
|
+
`;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
customElements.define('blocked-users-list', BlockedUsers);
|
|
339
|
+
|
|
340
|
+
const BlockChatList = class {
|
|
341
|
+
constructor(hostRef) {
|
|
342
|
+
index.registerInstance(this, hostRef);
|
|
343
|
+
this.findBlokedUser = async (searchTag, skip = 0) => {
|
|
344
|
+
var _a;
|
|
345
|
+
if (skip === 0) {
|
|
346
|
+
this.isLoading = true;
|
|
347
|
+
this.blockUsers = [];
|
|
348
|
+
}
|
|
349
|
+
if (skip >= 20) {
|
|
350
|
+
this.paginationLoading = true;
|
|
351
|
+
}
|
|
352
|
+
this.hasMore = true;
|
|
353
|
+
try {
|
|
354
|
+
let payload = {
|
|
355
|
+
limit: 20,
|
|
356
|
+
skip: skip,
|
|
357
|
+
};
|
|
358
|
+
if (searchTag) {
|
|
359
|
+
payload['searchTag'] = searchTag;
|
|
360
|
+
}
|
|
361
|
+
const findRes = await Image.M.getInstance().user.getUserBlock(payload);
|
|
362
|
+
if (findRes === null || findRes === void 0 ? void 0 : findRes.users) {
|
|
363
|
+
if (skip === 0) {
|
|
364
|
+
this.blockUsers = [...findRes.users];
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
this.blockUsers = [...this.blockUsers, ...findRes.users];
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
if (((_a = findRes === null || findRes === void 0 ? void 0 : findRes.users) === null || _a === void 0 ? void 0 : _a.length) < payload.limit) {
|
|
371
|
+
this.hasMore = false;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
catch (error) {
|
|
375
|
+
if ((error === null || error === void 0 ? void 0 : error.status) === 404 || (error === null || error === void 0 ? void 0 : error.statusCode) === 404) {
|
|
376
|
+
this.hasMore = false;
|
|
377
|
+
}
|
|
378
|
+
if (((error === null || error === void 0 ? void 0 : error.status) === 404 || (error === null || error === void 0 ? void 0 : error.statusCode) === 404) && searchTag != null) {
|
|
379
|
+
this.blockUsers = [];
|
|
380
|
+
}
|
|
381
|
+
console.error(error);
|
|
382
|
+
}
|
|
383
|
+
finally {
|
|
384
|
+
this.isLoading = false;
|
|
385
|
+
this.paginationLoading = false;
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
|
+
this.handleUnblockUser = async (conversationId) => {
|
|
389
|
+
var _a;
|
|
390
|
+
this.isLoading = true;
|
|
391
|
+
try {
|
|
392
|
+
await Image.M.getInstance().user.postUserUnblock({
|
|
393
|
+
opponentId: conversationId,
|
|
394
|
+
});
|
|
395
|
+
this.blockUsers = (_a = this.blockUsers) === null || _a === void 0 ? void 0 : _a.filter((user) => user.userId !== conversationId);
|
|
396
|
+
}
|
|
397
|
+
catch (error) {
|
|
398
|
+
console.error(`Failed to unblock user with ID ${conversationId}:`, error);
|
|
399
|
+
}
|
|
400
|
+
finally {
|
|
401
|
+
this.isLoading = false;
|
|
402
|
+
dialogDrawer.drawerDialogService.closeDialog('confirm-dialog');
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
this.goBack = undefined;
|
|
406
|
+
this.blockUsers = [];
|
|
407
|
+
this.isLoading = false;
|
|
408
|
+
this.skip = 0;
|
|
409
|
+
this.hasMore = false;
|
|
410
|
+
this.paginationLoading = false;
|
|
411
|
+
}
|
|
412
|
+
async componentWillLoad() {
|
|
413
|
+
await this.findBlokedUser();
|
|
414
|
+
}
|
|
415
|
+
render() {
|
|
416
|
+
return (index.h("blocked-users-list", { key: '2ba93236b2c8d8fd9558605eeaba80970abe1d25', blockedUsers: this.blockUsers, isLoading: this.isLoading, handleUnblock: this.handleUnblockUser, goBack: () => this.goBack(), findBlokedUser: this.findBlokedUser, skip: this.skip, hasMore: this.hasMore, paginationLoading: this.paginationLoading }));
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
BlockChatList.style = ":host{\n height:96%;\n }";
|
|
420
|
+
|
|
421
|
+
exports.BlockChatList = BlockChatList;
|
|
422
|
+
|
|
423
|
+
//# sourceMappingURL=BlockChatList-720a703e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"BlockChatList-720a703e.js","mappings":";;;;;;AAKO,MAAM,YAAY,SAASA,OAAU,CAAC;AAC7C,EAAE,WAAW,UAAU,GAAG;AAC1B,IAAI,OAAO;AACX,MAAM,YAAY,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;AACnC,MAAM,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;AAClC,MAAM,iBAAiB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;AAC1C,MAAM,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;AAChC,MAAM,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AACvC,MAAM,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AAChC,MAAM,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AACxC,MAAM,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;AAC5B,KAAK,CAAC;AACN,GAAG;AACH;AACA,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,EAAE,CAAC;AACZ,IAAI,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;AAC3B,IAAI,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;AAC3B,IAAI,IAAI,CAAC,aAAa,GAAG,MAAM,EAAE,CAAC;AAClC,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC;AAC3B,IAAI,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;AACzB,I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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,CAAC,CAAC;AACN,GAAG;AACH,CAAC;AACD;AACA,cAAc,CAAC,MAAM,CAAC,oBAAoB,EAAE,YAAY,CAAC;;MClU5C,aAAa;;;QAYxB,mBAAc,GAAG,OAAO,SAAkB,EAAE,OAAe,CAAC;;YAC1D,IAAI,IAAI,KAAK,CAAC,EAAE;gBACZ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBACtB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;aACxB;YAED,IAAI,IAAI,IAAI,EAAE,EAAE;gBACZ,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;aACjC;YAED,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YAEpB,IAAI;gBACA,IAAI,OAAO,GAAG;oBACV,KAAK,EAAE,EAAE;oBACT,IAAI,EAAE,IAAI;iBACb,CAAC;gBAEF,IAAI,SAAS,EAAE;oBACX,OAAO,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;iBACpC;gBAED,MAAM,OAAO,GAAG,MAAMC,OAAO,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;gBAEvE,IAAI,OAAO,aAAP,OAAO,uBA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cAAc;iBAC3B,CAAC,CAAC;gBACH,IAAI,CAAC,UAAU,GAAG,MAAA,IAAI,CAAC,UAAU,0CAAE,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,MAAM,KAAK,cAAc,CAAC,CAAC;aACrF;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,kCAAkC,cAAc,GAAG,EAAE,KAAK,CAAC,CAAC;aAC3E;oBAAS;gBACR,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;gBACzBL,gCAAmB,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAA;aAChD;SACF,CAAC;;0BAxEyB,EAAE;yBACC,KAAK;oBACX,CAAC;uBACG,KAAK;iCACK,KAAK;;IAE3C,MAAM,iBAAiB;QACrB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;KAC7B;IAkED,MAAM;QACJ,QACEM,iFACI,YAAY,EAAE,IAAI,CAAC,UAAU,EAC7B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,aAAa,EAAE,IAAI,CAAC,iBAAiB,EACrC,MAAM,EAAE,MAAM,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,EACtB;KACF;;;;;;","names":["LitElement","debounce","drawerDialogService","html","Image","generateProfileImageByInitials","css","ChatSDK","h"],"sources":["src/stories/Components/BlockUsers/BlockUsers.js","src/components/ChatUIComponent/BlockChatList.tsx"],"sourcesContent":["import { LitElement, html, css } from 'lit-element';\nimport { debounce, generateProfileImageByInitials } from '../../../lib/helpers';\nimport { Image } from '../Image/Image';\nimport { drawerDialogService } from '../Dialog-Drawer/dialog-drawer';\n\nexport class BlockedUsers extends LitElement {\n static get properties() {\n return {\n blockedUsers: { type: Array },\n isLoading: { type: Boolean },\n paginationLoading: { type: Boolean },\n hasMore: { type: Boolean },\n handleUnblock: { type: Function },\n goBack: { type: Function },\n findBlokedUser: { type: Function },\n skip: { type: Number },\n };\n }\n\n constructor() {\n super();\n this.blockedUsers = [];\n this.isLoading = false;\n this.handleUnblock = () => {};\n this.goBack = () => {};\n this.searchTerm = '';\n this.debouncedSearchHandler = debounce(query => {\n this.findBlokedUser(query);\n }, 500);\n }\n handleScroll(event) {\n const element = event.target;\n const threshold = 10;\n if (element.scrollHeight - element.scrollTop <= element.clientHeight + threshold && this.hasMore && !this.paginationLoading) {\n this.findBlokedUser(null, this.skip + 20);\n }\n }\n handleSearch(e) {\n this.searchTerm = e.target.value;\n this.debouncedSearchHandler(this.searchTerm);\n }\n unBlockUser(user){\n drawerDialogService.openDialog('confirm-dialog', { \n title: `Unblock`, \n description: `Are you sure you want to unblock ${user.userName} ?`,\n handleConfirm:() => this.handleUnblock(user.userId)\n });\n }\n render() {\n return html`\n <div class=\"blocked-users-container\">\n <div class=\"header\">\n <button class=\"back-button\" @click=${this.goBack}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <line x1=\"19\" y1=\"12\" x2=\"5\" y2=\"12\"></line>\n <polyline points=\"12 19 5 12 12 5\"></polyline>\n </svg>\n </button>\n <h2>Blocked Users</h2>\n </div>\n <div class=\"search-container\">\n <div class=\"search-input-wrapper\">\n <svg\n class=\"search-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </svg>\n <input type=\"text\" class=\"search-input\" placeholder=\"Search users...\" .value=${this.searchTerm} @input=${this.handleSearch} />\n ${this.searchTerm\n ? html`\n <button\n class=\"clear-search\"\n @click=${() => {\n this.searchTerm = '';\n this.shadowRoot.querySelector('.search-input').value = '';\n this.findBlokedUser();\n }}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n `\n : ''}\n </div>\n </div>\n\n ${this.isLoading\n ? html`\n <div class=\"loading-spinner\">\n <spinner-loader\n height=\"30px\"\n width=\"30px\"\n spinTime=\"1s\"\n spinnerPrimaryColor=\"var(--bg-primary-color)\"\n spinnerSecondaryColor=\"var(--text-primary-color)\"\n spinnerBorderWidth=\"2px\"\n >\n </spinner-loader>\n </div>\n `\n : this.blockedUsers?.length === 0\n ? html`<div class=\"empty-state\">${this.searchTerm ? `No users found matching \"${this.searchTerm}\".` : \"You haven't blocked any users yet.\"}</div>`\n : html`\n <div class=\"users-list\" @scroll=${this.handleScroll}>\n ${this.blockedUsers?.map(\n user => html`\n <div class=\"user-item\">\n <div class=\"user-info\">\n <div class=\"user-avatar\">\n ${user.userProfileImageUrl\n ? html`${Image({\n src: user.userProfileImageUrl,\n alt: `${user.userName}'s profile picture`,\n width: '40px',\n height: '40px',\n objectFit: 'cover',\n borderRadius: '50%',\n placeholderImage: generateProfileImageByInitials(user.userName, 40, 40),\n })}`\n : html`<div class=\"avatar-placeholder\">${generateProfileImageByInitials(user.userName)}</div>`}\n </div>\n <div class=\"user-name\">${user.userName}</div>\n </div>\n <button class=\"unblock-button\" @click=${() => this.unBlockUser(user)}>Unblock</button>\n </div>\n `,\n )}\n ${this.paginationLoading\n ? html`\n <div>\n <spinner-loader\n height=\"30px\"\n width=\"30px\"\n spinTime=\"1s\"\n spinnerPrimaryColor=\"var(--bg-primary-color)\"\n spinnerSecondaryColor=\"var(--text-primary-color)\"\n spinnerBorderWidth=\"2px\"\n >\n </spinner-loader>\n </div>\n `\n : null}\n </div>\n `}\n </div>\n `;\n }\n\n static get styles() {\n return css`\n :host {\n height: 96% !important;\n }\n .blocked-users-container {\n padding: 5px;\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .header {\n display: flex;\n align-items: center;\n padding: 10px 0;\n margin-bottom: 20px;\n border-bottom: 1px solid var(--bg-grey-color);\n }\n\n .back-button {\n background: none;\n border: none;\n cursor: pointer;\n padding: 5px;\n display: flex;\n align-items: center;\n color: var(--text-outgoing-message);\n }\n\n h2 {\n margin: 0 0 0 10px;\n font-size: 22px;\n font-weight: 500;\n color: var(--text-outgoing-message);\n }\n\n .loading-spinner {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n }\n\n .empty-state {\n text-align: center;\n padding: 40px 20px;\n color: var(--text-secondary-color);\n font-size: 16px;\n }\n\n .users-list {\n display: flex;\n flex-direction: column;\n gap: 12px;\n height: calc(100vh - 100px);\n overflow-y: auto;\n }\n\n .user-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px;\n border-bottom: 1px solid var(--bg-grey-color);\n }\n\n .user-info {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .user-avatar {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n overflow: hidden;\n }\n .search-container {\n margin-bottom: 20px;\n }\n\n .search-input-wrapper {\n position: relative;\n display: flex;\n align-items: center;\n }\n\n .search-icon {\n position: absolute;\n left: 10px;\n color: var(--text-secondary-color);\n }\n\n .search-input {\n width: 100%;\n padding: 10px 10px 10px 36px;\n border-radius: 8px;\n border: 1px solid var(--bg-grey-color);\n background-color: var(--bg-grey-color);\n color: var(--text-outgoing-message);\n font-size: 14px;\n }\n\n .search-input:focus {\n outline: none;\n border-color: var(--bg-incoming-message);\n }\n\n .clear-search {\n position: absolute;\n right: 10px;\n background: none;\n border: none;\n cursor: pointer;\n color: var(--text-secondary-color);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n }\n\n .avatar-placeholder {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--bg-incoming-message);\n color: var(--text-incoming-message);\n font-weight: 500;\n font-size: 16px;\n }\n .user-name {\n font-size: 16px;\n color: var(--text-outgoing-message);\n }\n .unblock-button {\n background-color: var(--base-color);\n color: var(--text-outgoing-message);\n border: none;\n border-radius: 4px;\n padding: 6px 12px;\n font-size: 14px;\n cursor: pointer;\n transition: background-color 0.2s;\n }\n .unblock-button:hover {\n background-color: var(--bg-incoming-message);\n color: var(--text-incoming-message);\n }\n `;\n }\n}\n\ncustomElements.define('blocked-users-list', BlockedUsers);\n","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}"],"version":3}
|