isometrik-plugin-chat-sdk 2.0.4 → 2.0.7
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/dist/cjs/admin-transfer-dialog.cjs.entry.js +44 -0
- package/dist/cjs/admin-transfer-dialog.cjs.entry.js.map +1 -0
- package/dist/cjs/{app-globals-61a8bfde.js → app-globals-c433d8a6.js} +4 -4
- package/dist/cjs/{app-globals-61a8bfde.js.map → app-globals-c433d8a6.js.map} +1 -1
- package/dist/cjs/attachment-preview_22.cjs.entry.js +220 -99
- package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
- package/dist/cjs/audio-bubble_4.cjs.entry.js +9 -9
- package/dist/cjs/chat-app.cjs.entry.js +1 -1
- package/dist/cjs/chat-document-message-bubble.cjs.entry.js +1 -1
- package/dist/cjs/chat-image-message-bubble.cjs.entry.js +1 -1
- package/dist/cjs/chat-video-message-bubble.cjs.entry.js +1 -1
- package/dist/cjs/delete-message.cjs.entry.js +1 -1
- package/dist/cjs/{drawer-811d2ce8.js → drawer-960b3f5d.js} +3 -1
- package/dist/cjs/drawer-960b3f5d.js.map +1 -0
- package/dist/cjs/forward-memebers.cjs.entry.js +3 -3
- package/dist/cjs/forward-message.cjs.entry.js +2 -2
- package/dist/cjs/group-admin-leave-b5cfdb33.js +55 -0
- package/dist/cjs/group-admin-leave-b5cfdb33.js.map +1 -0
- package/dist/cjs/{send-media-14908d4b.js → groupcast-5e3d49c4.js} +1 -127
- package/dist/cjs/groupcast-5e3d49c4.js.map +1 -0
- package/dist/cjs/index.cjs.js +9 -9
- package/dist/cjs/isometrik-webchat.cjs.js +5 -5
- package/dist/cjs/link-preview.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/login-page_3.cjs.entry.js +57 -52
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/cjs/member-add.cjs.entry.js +4 -4
- package/dist/cjs/message-bubble.cjs.entry.js +2 -2
- package/dist/cjs/my-component.cjs.entry.js +1 -1
- package/dist/cjs/{profile-avatar_2.cjs.entry.js → profile-avatar.cjs.entry.js} +1 -25
- package/dist/cjs/profile-avatar.cjs.entry.js.map +1 -0
- package/dist/cjs/reaction-container.cjs.entry.js +2 -2
- package/dist/cjs/{runtime-controls-201c71ba.js → runtime-controls-95f6cb3b.js} +23 -21
- package/dist/cjs/runtime-controls-95f6cb3b.js.map +1 -0
- package/dist/cjs/send-media-37e09e83.js +357 -0
- package/dist/cjs/send-media-37e09e83.js.map +1 -0
- package/dist/cjs/share-popup.cjs.entry.js +1 -1
- package/dist/cjs/spinner-loader.cjs.entry.js +32 -0
- package/dist/cjs/spinner-loader.cjs.entry.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ChatUIComponent/AddMember.js +3 -3
- package/dist/collection/components/ChatUIComponent/ChatDocumentMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatImageMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +45 -17
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/ChatVideoMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +15 -16
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js +22 -7
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/ReactionContainer.js +2 -2
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +39 -18
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/AudioBubble/AudioBubble.js +3 -3
- package/dist/collection/components/ChatUIComponent/shared/ForwardMessageList/ForwardMessageList.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/admin-transfer-dialog/admin-transfer-dialog.js +101 -0
- package/dist/collection/components/ChatUIComponent/shared/admin-transfer-dialog/admin-transfer-dialog.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/shared/attachment-preview/attachment-preview.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/block chatlist/BlockChatList.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/chat-loading-placeholder/chat-loading-placeholder.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js +10 -4
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/delete-message/delete-message.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/document-message/document-message.js +3 -3
- package/dist/collection/components/ChatUIComponent/shared/forward-message/forward-message.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/image-message/image-message.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/incoming-text-message-bubble/incoming-text-message-bubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/index.js +1 -0
- package/dist/collection/components/ChatUIComponent/shared/index.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/link-preview/link-preview.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-bubble/message-bubble.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/message-date-pill/message-date-pill.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-info/message-info.js +6 -2
- package/dist/collection/components/ChatUIComponent/shared/message-info/message-info.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-search/message-search.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/profile sidebar/profile-sidebar.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/profile-info/profile-info.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/reply-block/reply-block.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/reply-message-container/reply-message-container.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/share-popup/share-popup.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js +2 -2
- package/dist/collection/components/chat-main.js +1 -1
- package/dist/collection/components/my-component/my-component.js +1 -1
- package/dist/collection/components/my-component/web-chat/event-handlers.js +5 -0
- package/dist/collection/components/my-component/web-chat/event-handlers.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/mqtt-host.js +9 -9
- package/dist/collection/components/my-component/web-chat/mqtt-host.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/offline-host.js +7 -6
- package/dist/collection/components/my-component/web-chat/offline-host.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/public-send.js +3 -3
- package/dist/collection/components/my-component/web-chat/public-send.js.map +1 -1
- package/dist/collection/lib/chat/index.js +2 -2
- package/dist/collection/lib/chat/index.js.map +1 -1
- package/dist/collection/lib/chat/messages.js +36 -0
- package/dist/collection/lib/chat/messages.js.map +1 -1
- package/dist/collection/lib/chat/send-media.js +30 -5
- package/dist/collection/lib/chat/send-media.js.map +1 -1
- package/dist/collection/lib/drawer.js +3 -0
- package/dist/collection/lib/drawer.js.map +1 -1
- package/dist/collection/lib/group-admin-leave.js +47 -0
- package/dist/collection/lib/group-admin-leave.js.map +1 -0
- package/dist/collection/lib/prompt-exit-group.js +59 -0
- package/dist/collection/lib/prompt-exit-group.js.map +1 -0
- package/dist/collection/sdk/headless-api.js +3 -1
- package/dist/collection/sdk/headless-api.js.map +1 -1
- package/dist/components/AudioBubble.js +3 -3
- package/dist/components/BlockChatList.js +1 -1
- package/dist/components/ChatFooter.js +15 -16
- package/dist/components/ChatFooter.js.map +1 -1
- package/dist/components/ChatSidebar.js +46 -18
- package/dist/components/ChatSidebar.js.map +1 -1
- package/dist/components/WebChat.js +27 -21
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/WebChatBody.js +39 -18
- package/dist/components/WebChatBody.js.map +1 -1
- package/dist/components/WebChatHeader.js +23 -8
- package/dist/components/WebChatHeader.js.map +1 -1
- package/dist/components/WebchatRightSide.js +4 -35
- package/dist/components/WebchatRightSide.js.map +1 -1
- package/dist/components/admin-transfer-dialog.d.ts +11 -0
- package/dist/components/admin-transfer-dialog.js +69 -0
- package/dist/components/admin-transfer-dialog.js.map +1 -0
- package/dist/components/attachment-preview2.js +1 -1
- package/dist/components/chat-app.js +1 -1
- package/dist/components/chat-document-message-bubble.js +1 -1
- package/dist/components/chat-image-message-bubble.js +1 -1
- package/dist/components/chat-loading-placeholder2.js +1 -1
- package/dist/components/chat-video-message-bubble.js +1 -1
- package/dist/components/client.js +1 -121
- package/dist/components/client.js.map +1 -1
- package/dist/components/contact-info2.js +11 -5
- package/dist/components/contact-info2.js.map +1 -1
- package/dist/components/conversation.js +2 -283
- package/dist/components/conversation.js.map +1 -1
- package/dist/components/delete-message.js +1 -1
- package/dist/components/document-message2.js +3 -3
- package/dist/components/drawer.js +2 -0
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/forward-memebers.js +2 -2
- package/dist/components/forward-message.js +2 -2
- package/dist/components/group-admin-leave.js +50 -0
- package/dist/components/group-admin-leave.js.map +1 -0
- package/dist/components/group-members.js +298 -26
- package/dist/components/group-members.js.map +1 -1
- package/dist/components/group-members2.js +37 -0
- package/dist/components/group-members2.js.map +1 -0
- package/dist/components/image-message2.js +1 -1
- package/dist/components/incoming-text-message-bubble2.js +1 -1
- package/dist/components/index.js +6 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/link-preview2.js +1 -1
- package/dist/components/member-add.js +4 -4
- package/dist/components/message-bubble2.js +2 -2
- package/dist/components/message-date-pill2.js +1 -1
- package/dist/components/message-info2.js +6 -2
- package/dist/components/message-info2.js.map +1 -1
- package/dist/components/message-search2.js +1 -1
- package/dist/components/messages.js +37 -1
- package/dist/components/messages.js.map +1 -1
- package/dist/components/my-component.js +1 -1
- package/dist/components/outgoing-text-message-bubble2.js +1 -1
- package/dist/components/profile-info2.js +2 -2
- package/dist/components/profile-sidebar2.js +1 -1
- package/dist/components/prompt-exit-group.js +73 -0
- package/dist/components/prompt-exit-group.js.map +1 -0
- package/dist/components/reaction-container.js +2 -2
- package/dist/components/reply-block2.js +1 -1
- package/dist/components/reply-message-container2.js +1 -1
- package/dist/components/send-media.js +150 -0
- package/dist/components/send-media.js.map +1 -0
- package/dist/components/share-popup.js +1 -1
- package/dist/components/video-message2.js +2 -2
- package/dist/esm/admin-transfer-dialog.entry.js +40 -0
- package/dist/esm/admin-transfer-dialog.entry.js.map +1 -0
- package/dist/esm/{app-globals-2beecb81.js → app-globals-dfce8a5b.js} +3 -3
- package/dist/esm/{app-globals-2beecb81.js.map → app-globals-dfce8a5b.js.map} +1 -1
- package/dist/esm/attachment-preview_22.entry.js +209 -88
- package/dist/esm/attachment-preview_22.entry.js.map +1 -1
- package/dist/esm/audio-bubble_4.entry.js +9 -9
- package/dist/esm/chat-app.entry.js +1 -1
- package/dist/esm/chat-document-message-bubble.entry.js +1 -1
- package/dist/esm/chat-image-message-bubble.entry.js +1 -1
- package/dist/esm/chat-video-message-bubble.entry.js +1 -1
- package/dist/esm/delete-message.entry.js +1 -1
- package/dist/esm/{drawer-74c188f1.js → drawer-d54c2f10.js} +3 -1
- package/dist/esm/drawer-d54c2f10.js.map +1 -0
- package/dist/esm/forward-memebers.entry.js +3 -3
- package/dist/esm/forward-message.entry.js +2 -2
- package/dist/esm/group-admin-leave-a60b9b1a.js +50 -0
- package/dist/esm/group-admin-leave-a60b9b1a.js.map +1 -0
- package/dist/esm/{send-media-917dcc2f.js → groupcast-58a59d64.js} +2 -122
- package/dist/esm/groupcast-58a59d64.js.map +1 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/isometrik-webchat.js +5 -5
- package/dist/esm/link-preview.entry.js +1 -1
- package/dist/esm/loader.js +5 -5
- package/dist/esm/login-page_3.entry.js +24 -19
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/esm/member-add.entry.js +4 -4
- package/dist/esm/message-bubble.entry.js +2 -2
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/{profile-avatar_2.entry.js → profile-avatar.entry.js} +2 -25
- package/dist/esm/profile-avatar.entry.js.map +1 -0
- package/dist/esm/reaction-container.entry.js +2 -2
- package/dist/esm/{runtime-controls-cf599fe2.js → runtime-controls-ec6d5c75.js} +5 -3
- package/dist/esm/runtime-controls-ec6d5c75.js.map +1 -0
- package/dist/esm/send-media-a946c6dd.js +332 -0
- package/dist/esm/send-media-a946c6dd.js.map +1 -0
- package/dist/esm/share-popup.entry.js +1 -1
- package/dist/esm/spinner-loader.entry.js +28 -0
- package/dist/esm/spinner-loader.entry.js.map +1 -0
- package/dist/isometrik-webchat/index.esm.js +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js.map +1 -1
- package/dist/isometrik-webchat/{p-a876991d.entry.js → p-0ccfbe90.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-1854b156.entry.js → p-161fcb35.entry.js} +2 -2
- package/dist/isometrik-webchat/p-1953573d.js +2 -0
- package/dist/isometrik-webchat/p-1953573d.js.map +1 -0
- package/dist/isometrik-webchat/{p-a43ad157.entry.js → p-1eecc7c5.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-fdd327f5.entry.js → p-2195b0c0.entry.js} +2 -2
- package/dist/isometrik-webchat/p-2e9974e1.entry.js +2 -0
- package/dist/isometrik-webchat/p-30dc94e0.js +2 -0
- package/dist/isometrik-webchat/p-30dc94e0.js.map +1 -0
- package/dist/isometrik-webchat/{p-c1e8c38e.entry.js → p-3664e0ad.entry.js} +2 -2
- package/dist/isometrik-webchat/p-3f355f9e.js +2 -0
- package/dist/isometrik-webchat/p-3f355f9e.js.map +1 -0
- package/dist/isometrik-webchat/p-46dcd38f.js +2 -0
- package/dist/isometrik-webchat/p-46dcd38f.js.map +1 -0
- package/dist/isometrik-webchat/p-46e0048e.js +2 -0
- package/dist/isometrik-webchat/p-46e0048e.js.map +1 -0
- package/dist/isometrik-webchat/p-48ce4dca.entry.js +2 -0
- package/dist/isometrik-webchat/{p-d720cf14.entry.js → p-76341adb.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-2d3e8cd4.entry.js → p-7af9a7f3.entry.js} +2 -2
- package/dist/isometrik-webchat/p-7b25f234.entry.js +2 -0
- package/dist/isometrik-webchat/p-7b25f234.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-84424caa.entry.js +2 -0
- package/dist/isometrik-webchat/p-84424caa.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-86be30fe.js +2 -0
- package/dist/isometrik-webchat/p-9db196a4.entry.js +2 -0
- package/dist/isometrik-webchat/p-9db196a4.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-ad02a8ca.entry.js +2 -0
- package/dist/isometrik-webchat/p-c5bff6a1.entry.js +2 -0
- package/dist/isometrik-webchat/p-c5bff6a1.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-c83e2d5d.entry.js +2 -0
- package/dist/isometrik-webchat/{p-fb705915.entry.js → p-cc5b86e6.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-f1fbf3be.entry.js → p-d8b65cf4.entry.js} +2 -2
- package/dist/isometrik-webchat/p-e48a1217.entry.js +2 -0
- package/dist/isometrik-webchat/p-ff023d39.entry.js +2 -0
- package/dist/isometrik-webchat/p-ff023d39.entry.js.map +1 -0
- package/dist/types/components/ChatUIComponent/Footer/ChatFooter.d.ts +2 -22
- package/dist/types/components/ChatUIComponent/shared/admin-transfer-dialog/admin-transfer-dialog.d.ts +13 -0
- package/dist/types/components/ChatUIComponent/shared/index.d.ts +1 -0
- package/dist/types/components.d.ts +27 -0
- package/dist/types/lib/chat/index.d.ts +2 -2
- package/dist/types/lib/chat/send-media.d.ts +8 -0
- package/dist/types/lib/drawer.d.ts +1 -0
- package/dist/types/lib/group-admin-leave.d.ts +20 -0
- package/dist/types/lib/prompt-exit-group.d.ts +9 -0
- package/dist/types/sdk/headless-api.d.ts +3 -1
- package/package.json +2 -1
- package/dist/cjs/drawer-811d2ce8.js.map +0 -1
- package/dist/cjs/media-limits-eba42629.js +0 -165
- package/dist/cjs/media-limits-eba42629.js.map +0 -1
- package/dist/cjs/profile-avatar_2.cjs.entry.js.map +0 -1
- package/dist/cjs/runtime-controls-201c71ba.js.map +0 -1
- package/dist/cjs/send-media-14908d4b.js.map +0 -1
- package/dist/esm/drawer-74c188f1.js.map +0 -1
- package/dist/esm/media-limits-3fa07c09.js +0 -152
- package/dist/esm/media-limits-3fa07c09.js.map +0 -1
- package/dist/esm/profile-avatar_2.entry.js.map +0 -1
- package/dist/esm/runtime-controls-cf599fe2.js.map +0 -1
- package/dist/esm/send-media-917dcc2f.js.map +0 -1
- package/dist/isometrik-webchat/p-0392c7be.entry.js +0 -2
- package/dist/isometrik-webchat/p-0731d488.js +0 -2
- package/dist/isometrik-webchat/p-0731d488.js.map +0 -1
- package/dist/isometrik-webchat/p-3c70c22c.entry.js +0 -2
- package/dist/isometrik-webchat/p-5d243250.entry.js +0 -2
- package/dist/isometrik-webchat/p-7d4cc4e3.entry.js +0 -2
- package/dist/isometrik-webchat/p-7d4cc4e3.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-7f415f28.js +0 -2
- package/dist/isometrik-webchat/p-b857775d.entry.js +0 -2
- package/dist/isometrik-webchat/p-bdcdf1c5.js +0 -2
- package/dist/isometrik-webchat/p-bdcdf1c5.js.map +0 -1
- package/dist/isometrik-webchat/p-c0c19621.entry.js +0 -2
- package/dist/isometrik-webchat/p-dc2bf17e.entry.js +0 -2
- package/dist/isometrik-webchat/p-dc2bf17e.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-dd62bd69.js +0 -2
- package/dist/isometrik-webchat/p-dd62bd69.js.map +0 -1
- package/dist/isometrik-webchat/p-eb54f75d.js +0 -2
- package/dist/isometrik-webchat/p-eb54f75d.js.map +0 -1
- package/dist/isometrik-webchat/p-ed4699a0.entry.js +0 -2
- package/dist/isometrik-webchat/p-ed4699a0.entry.js.map +0 -1
- /package/dist/isometrik-webchat/{p-a876991d.entry.js.map → p-0ccfbe90.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-1854b156.entry.js.map → p-161fcb35.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-a43ad157.entry.js.map → p-1eecc7c5.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-fdd327f5.entry.js.map → p-2195b0c0.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-3c70c22c.entry.js.map → p-2e9974e1.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-c1e8c38e.entry.js.map → p-3664e0ad.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-b857775d.entry.js.map → p-48ce4dca.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-d720cf14.entry.js.map → p-76341adb.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-2d3e8cd4.entry.js.map → p-7af9a7f3.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-7f415f28.js.map → p-86be30fe.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-5d243250.entry.js.map → p-ad02a8ca.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-c0c19621.entry.js.map → p-c83e2d5d.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-fb705915.entry.js.map → p-cc5b86e6.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-f1fbf3be.entry.js.map → p-d8b65cf4.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-0392c7be.entry.js.map → p-e48a1217.entry.js.map} +0 -0
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { r as registerInstance, a as createEvent, h, g as getElement, F as Fragment, f as Host } from './index-bc463197.js';
|
|
2
2
|
import { N as New_Group, c as Group_cast, d as Left_Arrow, e as New_Chat, T as Three_Dots, f as Logout, a as Search, A as Add_User, I as Info, g as CloseButton, h as Clear_Chat, B as Block_User, i as Icon_Doc, j as Icon_Excel, k as Icon_Rtf, l as Icon_Txt, m as Smile, S as Send, D as Delete, n as Attachment, M as Microphone, o as Camera_Add, E as Edit, p as Dark_Theme, q as Message, R as Reply, F as Forward } from './chat-assets-bb056958.js';
|
|
3
3
|
import { C as CancelIcon } from './cancel-4f6541af.js';
|
|
4
|
-
import { M as MAX_MEDIA_PER_MESSAGE, t as takeMediaFiles,
|
|
4
|
+
import { M as MAX_MEDIA_PER_MESSAGE, t as takeMediaFiles, l as mediaLimitToastMessage, A as ATTACHMENT_BODY_PLACEHOLDER, j as attachmentBodyForApi, i as buildReplyMetaData, o as mediaPreviewUrls, q as docIconKind, r as splitSharedMessages, v as attachmentCaption } from './send-media-a946c6dd.js';
|
|
5
5
|
import { i as isPdfAttachment, D as DoubleCheck } from './doublecheck-261763ef.js';
|
|
6
6
|
import { M } from './index.m-8c70037f.js';
|
|
7
|
-
import { d as drawerDialogService } from './drawer-
|
|
7
|
+
import { d as drawerDialogService } from './drawer-d54c2f10.js';
|
|
8
8
|
import { c as clearAll, d as debounce, e as getFormattedTime, a as getDeviceID, b as getGroupcastUrlQuery, g as generateProfileImageByInitials, f as getFormattedDeliveryTime } from './helpers-f33b895c.js';
|
|
9
9
|
import { g as getCustomPartTag, f as findWebChatHost, h as hasNamedSlot } from './index-4c865e34.js';
|
|
10
10
|
import { s as showToast } from './toast-533dd183.js';
|
|
11
11
|
import { p as postGroupCast, f as getPresignedUrlForGroupcastMedia, h as postGroupCastMessage, i as getGroupcastMessageReadStatus, j as getGroupcastMessageDeliveryStatus, k as deleteGroupcastMessageSelf, l as deleteGroupcastMessageEveryone } from './groupcast-9c7d2a32.js';
|
|
12
12
|
import { i as isometrikLogo } from './IsometrikLogo-36cb0542.js';
|
|
13
13
|
import { c as createStore, g as groupMembersStore } from './group-members-05414da2.js';
|
|
14
|
+
import { n as needsAdminTransferBeforeLeave, b as adminTransferCandidates, m as memberDisplayName, a as memberUserId } from './group-admin-leave-a60b9b1a.js';
|
|
14
15
|
import { W as WEB_CONTENT } from './content-fb138a93.js';
|
|
15
16
|
import { r as renderMessageBody, e as emitTagUser } from './message-body-render-f5ab3a62.js';
|
|
16
17
|
import { p as postReaction, d as deleteReaction } from './message-reaction-0a2bb115.js';
|
|
@@ -578,30 +579,38 @@ const ChatSidebar = class {
|
|
|
578
579
|
return (last === null || last === void 0 ? void 0 : last.name) || (last === null || last === void 0 ? void 0 : last.nameWithExtension) || 'Document';
|
|
579
580
|
}
|
|
580
581
|
getMessageBody(tile, userMetaData) {
|
|
581
|
-
var _a;
|
|
582
|
+
var _a, _b, _c;
|
|
582
583
|
const details = tile === null || tile === void 0 ? void 0 : tile.lastMessageDetails;
|
|
583
584
|
if (!(details === null || details === void 0 ? void 0 : details.body))
|
|
584
585
|
return '';
|
|
585
|
-
const { senderId, senderName, body, attachments } = details;
|
|
586
|
+
const { senderId, senderName, body, attachments, metaData } = details;
|
|
586
587
|
const sender = senderId === (userMetaData === null || userMetaData === void 0 ? void 0 : userMetaData.userId) ? 'You' : senderName || '';
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
else if (mimeType === null || mimeType === void 0 ? void 0 : mimeType.includes('image'))
|
|
588
|
+
const caption = String((_b = (_a = metaData === null || metaData === void 0 ? void 0 : metaData.caption) !== null && _a !== void 0 ? _a : metaData === null || metaData === void 0 ? void 0 : metaData.captionMessage) !== null && _b !== void 0 ? _b : '').trim();
|
|
589
|
+
let messageContent = caption || body;
|
|
590
|
+
// Body placeholder (API non-empty) — never show AttachmentMessage:* as preview text
|
|
591
|
+
if (!caption && String(body || '').startsWith('AttachmentMessage:')) {
|
|
592
|
+
if (body === 'AttachmentMessage:Image')
|
|
593
593
|
messageContent = 'Image';
|
|
594
|
-
else if (
|
|
595
|
-
messageContent = '
|
|
596
|
-
else
|
|
594
|
+
else if (body === 'AttachmentMessage:Video')
|
|
595
|
+
messageContent = 'Video';
|
|
596
|
+
else if (body === 'AttachmentMessage:File' || body === 'AttachmentMessage:Audio' || body === 'AttachmentMessage:Doc') {
|
|
597
597
|
messageContent = 'Document';
|
|
598
|
+
}
|
|
599
|
+
else if (attachments === null || attachments === void 0 ? void 0 : attachments.length) {
|
|
600
|
+
const mimeType = ((_c = attachments[attachments.length - 1]) === null || _c === void 0 ? void 0 : _c.mimeType) || '';
|
|
601
|
+
if (mimeType.includes('video'))
|
|
602
|
+
messageContent = 'Video';
|
|
603
|
+
else if (mimeType.includes('image'))
|
|
604
|
+
messageContent = 'Image';
|
|
605
|
+
else if (mimeType.includes('audio'))
|
|
606
|
+
messageContent = 'Audio';
|
|
607
|
+
else
|
|
608
|
+
messageContent = 'Document';
|
|
609
|
+
}
|
|
610
|
+
else {
|
|
611
|
+
messageContent = 'Attachment';
|
|
612
|
+
}
|
|
598
613
|
}
|
|
599
|
-
else if (body === 'AttachmentMessage:Image')
|
|
600
|
-
messageContent = 'Image';
|
|
601
|
-
else if (body === 'AttachmentMessage:Video')
|
|
602
|
-
messageContent = 'Video';
|
|
603
|
-
else if (body === 'AttachmentMessage:File' || body === 'AttachmentMessage:Audio')
|
|
604
|
-
messageContent = 'Document';
|
|
605
614
|
return (tile === null || tile === void 0 ? void 0 : tile.isGroup) ? `${sender}: ${messageContent}` : messageContent;
|
|
606
615
|
}
|
|
607
616
|
getLastMessageText(tile, userMetaData) {
|
|
@@ -1019,6 +1028,24 @@ const ChatSidebar = class {
|
|
|
1019
1028
|
}
|
|
1020
1029
|
}
|
|
1021
1030
|
async exitGroup(conversationId) {
|
|
1031
|
+
var _a, _b;
|
|
1032
|
+
const selfId = String(((_a = this.userMetaData) === null || _a === void 0 ? void 0 : _a.userId) || '');
|
|
1033
|
+
const storeMembers = groupMembersStore.getCurrentConversationId() === conversationId
|
|
1034
|
+
? groupMembersStore.getMembers()
|
|
1035
|
+
: [];
|
|
1036
|
+
const detailMembers = Array.isArray((_b = this.conversationDetails) === null || _b === void 0 ? void 0 : _b.members)
|
|
1037
|
+
? this.conversationDetails.members
|
|
1038
|
+
: [];
|
|
1039
|
+
const members = storeMembers.length ? storeMembers : detailMembers;
|
|
1040
|
+
if (needsAdminTransferBeforeLeave(selfId, members)) {
|
|
1041
|
+
showToast({
|
|
1042
|
+
message: 'Make another member an admin before leaving this group',
|
|
1043
|
+
type: 'error',
|
|
1044
|
+
position: 'bottom-right',
|
|
1045
|
+
});
|
|
1046
|
+
drawerDialogService.closeDialog('confirm-dialog');
|
|
1047
|
+
return;
|
|
1048
|
+
}
|
|
1022
1049
|
try {
|
|
1023
1050
|
this.isLoading = true;
|
|
1024
1051
|
await M.getInstance().Conversation.deleteConversationLeave({ conversationId });
|
|
@@ -1396,6 +1423,70 @@ const GroupCast = class {
|
|
|
1396
1423
|
};
|
|
1397
1424
|
GroupCast.style = ":host {\n display: block;\n height: 100%;\n background: var(--bg-primary, var(--bg-primary-color));\n color: var(--text-primary, var(--text-primary-color));\n }\n .group-cast-container {\n padding: 20px 0 20px 20px;\n height: 96%;\n display: flex;\n flex-direction: column;\n gap: 5px;\n box-sizing: border-box;\n }\n .group-cast-header-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 20px 0 0;\n }\n .group-cast-header {\n font-size: var(--title-font-size, 24px);\n font-weight: 600;\n margin: 0;\n }\n .icon-btn {\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n }\n .icon-btn img {\n width: 28px;\n height: 28px;\n }\n .group-cast-body {\n flex: 1;\n min-height: 0;\n overflow: hidden auto;\n padding: 0 15px 0 0;\n }\n .group-cast-body::-webkit-scrollbar { width: 5px; }\n .group-cast-body::-webkit-scrollbar-track { background: transparent; }\n .group-cast-body::-webkit-scrollbar-thumb {\n background-color: var(--bg-secondary, var(--bg-secondary-color)) !important;\n border-radius: 10px;\n }\n chat-tile:hover {\n background-color: var(--bg-secondary, var(--bg-secondary-color)) !important;\n }\n .create-panel {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n height: 100%;\n padding-right: 20px;\n }\n .create-panel searchable-list,\n .create-panel iso-group-info {\n display: block;\n flex: 1;\n min-height: 0;\n height: 100%;\n }\n .picker-back {\n display: flex;\n align-items: center;\n padding: 0 0 8px;\n }\n .picker-back button {\n border: none;\n background: transparent;\n color: inherit;\n font-size: 18px;\n cursor: pointer;\n }\n .empty {\n text-align: center;\n padding: 20px;\n color: var(--text-tertiary, var(--text-tertiary-color));\n }\n .loader {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0,0,0,0.25);\n z-index: 5;\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
|
|
1398
1425
|
|
|
1426
|
+
const makeAdmin = async (conversationId, userId) => {
|
|
1427
|
+
const response = await M.getInstance().Conversation.putConversationAdmin({conversationId: conversationId, memberId: userId});
|
|
1428
|
+
return response;
|
|
1429
|
+
};
|
|
1430
|
+
|
|
1431
|
+
const removeAdmin = async (conversationId, userId) => {
|
|
1432
|
+
const response = await M.getInstance().Conversation.deleteConversationAdmin({conversationId: conversationId, memberId: userId});
|
|
1433
|
+
return response;
|
|
1434
|
+
};
|
|
1435
|
+
|
|
1436
|
+
/**
|
|
1437
|
+
* Exit-group UX: normal confirm, or sole-admin transfer picker first.
|
|
1438
|
+
*/
|
|
1439
|
+
function promptExitGroup(opts) {
|
|
1440
|
+
const { selfId, members, conversationId, onLeave } = opts;
|
|
1441
|
+
if (!conversationId)
|
|
1442
|
+
return;
|
|
1443
|
+
if (!needsAdminTransferBeforeLeave(selfId, members)) {
|
|
1444
|
+
drawerDialogService.openDialog('confirm-dialog', {
|
|
1445
|
+
title: 'Exit group',
|
|
1446
|
+
description: 'Are you sure you want to exit this group?',
|
|
1447
|
+
handleConfirm: () => onLeave(),
|
|
1448
|
+
});
|
|
1449
|
+
return;
|
|
1450
|
+
}
|
|
1451
|
+
const candidates = adminTransferCandidates(selfId, members);
|
|
1452
|
+
if (!candidates.length) {
|
|
1453
|
+
drawerDialogService.openDialog('confirm-dialog', {
|
|
1454
|
+
title: 'Cannot exit yet',
|
|
1455
|
+
description: 'You are the only admin. Add another member and make them an admin before leaving.',
|
|
1456
|
+
yesText: 'OK',
|
|
1457
|
+
noText: 'Close',
|
|
1458
|
+
handleConfirm: () => drawerDialogService.closeDialog('confirm-dialog'),
|
|
1459
|
+
});
|
|
1460
|
+
return;
|
|
1461
|
+
}
|
|
1462
|
+
drawerDialogService.openDialog('admin-transfer', {
|
|
1463
|
+
candidates,
|
|
1464
|
+
handlePick: async (member) => {
|
|
1465
|
+
const memberId = memberUserId(member);
|
|
1466
|
+
const name = memberDisplayName(member);
|
|
1467
|
+
if (!memberId)
|
|
1468
|
+
return;
|
|
1469
|
+
try {
|
|
1470
|
+
await makeAdmin(conversationId, memberId);
|
|
1471
|
+
// Keep leave safety-net in sync — API succeeded, store must reflect it.
|
|
1472
|
+
if (groupMembersStore.getCurrentConversationId() === conversationId) {
|
|
1473
|
+
groupMembersStore.updateAdminStatus(memberId, true);
|
|
1474
|
+
}
|
|
1475
|
+
drawerDialogService.closeDialog('admin-transfer');
|
|
1476
|
+
onLeave();
|
|
1477
|
+
}
|
|
1478
|
+
catch (err) {
|
|
1479
|
+
console.error('[webchat] make admin before leave failed', err);
|
|
1480
|
+
showToast({
|
|
1481
|
+
message: `Could not make ${name} an admin. Try again or pick someone else.`,
|
|
1482
|
+
type: 'error',
|
|
1483
|
+
position: 'bottom-right',
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
},
|
|
1487
|
+
});
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1399
1490
|
const WebChatHeader = class {
|
|
1400
1491
|
constructor(hostRef) {
|
|
1401
1492
|
registerInstance(this, hostRef);
|
|
@@ -1463,15 +1554,28 @@ const WebChatHeader = class {
|
|
|
1463
1554
|
this.handleTextClick();
|
|
1464
1555
|
};
|
|
1465
1556
|
this.exitGroup = () => {
|
|
1557
|
+
var _a, _b;
|
|
1466
1558
|
this.menuOpen = false;
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1559
|
+
const conversationId = this.conversationId();
|
|
1560
|
+
const fromDetails = (_a = this.conversationDetails) === null || _a === void 0 ? void 0 : _a.members;
|
|
1561
|
+
const fromStore = groupMembersStore.getCurrentConversationId() === conversationId
|
|
1562
|
+
? groupMembersStore.getMembers()
|
|
1563
|
+
: [];
|
|
1564
|
+
const members = (Array.isArray(fromDetails) && fromDetails.length ? fromDetails : null) ||
|
|
1565
|
+
(Array.isArray(this.groupMembers) && this.groupMembers.length
|
|
1566
|
+
? this.groupMembers
|
|
1567
|
+
: null) ||
|
|
1568
|
+
fromStore ||
|
|
1569
|
+
[];
|
|
1570
|
+
promptExitGroup({
|
|
1571
|
+
selfId: String(((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userId) || ''),
|
|
1572
|
+
members,
|
|
1573
|
+
conversationId: String(conversationId || ''),
|
|
1574
|
+
onLeave: () => {
|
|
1471
1575
|
this.el.dispatchEvent(new CustomEvent('contact-action', {
|
|
1472
1576
|
bubbles: true,
|
|
1473
1577
|
composed: true,
|
|
1474
|
-
detail: { action: 'exit-group', conversationId
|
|
1578
|
+
detail: { action: 'exit-group', conversationId },
|
|
1475
1579
|
}));
|
|
1476
1580
|
},
|
|
1477
1581
|
});
|
|
@@ -1616,10 +1720,10 @@ const WebChatHeader = class {
|
|
|
1616
1720
|
const groupcast = this.isGroupcast();
|
|
1617
1721
|
const isGroup = !!((_a = this.conversationDetails) === null || _a === void 0 ? void 0 : _a.isGroup) && !groupcast;
|
|
1618
1722
|
const showBlock = !groupcast && !((_b = this.conversationDetails) === null || _b === void 0 ? void 0 : _b.isGroup);
|
|
1619
|
-
return (h(Fragment, { key: '
|
|
1723
|
+
return (h(Fragment, { key: 'f69b1ff89bd8cbb686af42fea6cbe5d7d0372f4d' }, h("div", { key: 'b3a85a44a6b10b177987d9df97c5545caa9eb545', class: "head-container", style: {
|
|
1620
1724
|
backgroundColor: this.headerBgColor || undefined,
|
|
1621
1725
|
color: this.headerUsernameColor || undefined,
|
|
1622
|
-
} }, h("div", { key: '
|
|
1726
|
+
} }, h("div", { key: '1c25ac2995fd196618d842b018fe5ead158aa0bf', class: "head-left" }, h("button", { key: '623aab35ec496f1d17150c50303f4fcaee1fc521', class: "back-button", type: "button", onClick: () => typeof this.onBackButtonClick === 'function' && this.onBackButtonClick(), "aria-label": "Back" }, h("img", { key: 'a10dbf338a89839bb729393ba196b09244388fbb', class: "theme-icon", src: Left_Arrow, alt: "" })), h("div", { key: '58f51fda7f45e45ef4d9f8c60e1b1702c940e0ed', class: "identity", onClick: this.handleTextClick }, h("profile-avatar", { key: '301f581d815101e8c7e5f35051063784bdcff3dd', src: this.avatarSrc(), name: this.title(), size: "var(--avatar-sm)", isGroup: this.avatarIsGroup() }), h("div", { key: 'd3965924dd15944444e46907ba7e4710ed4ec71e', class: "text-container" }, h("div", { key: '34098ad59a669252193b72de2be172f4f596aaec', class: "title" }, this.title()), h("div", { key: '056426edd6da5abf00736baffd35d30c1420f797', class: "subtitle", style: { color: this.headerLastSeenColor || undefined } }, this.subtitle(formattedLastSeen))))), h("div", { key: 'da3984f8bb92923b17f2ef3415aeb94e7ba605e1', class: "actions" }, !groupcast ? (h("button", { type: "button", class: "icon-btn", title: "Search in conversation", onClick: () => this.openSearch() }, h("img", { class: "theme-icon", src: Search, alt: "" }))) : null, h("div", { key: 'df68b4da79c8a0d1ce2b7800b6562e100b42c24b', class: "more-wrap" }, h("button", { key: 'ccf5fd29b11027279e979ce1c24a380219d23d59', type: "button", class: "icon-btn", title: "Menu", "aria-label": "Menu", "aria-haspopup": "menu", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: this.toggleMenu }, h("img", { key: '8494806478460e4447c05753554e4bd74f845826', class: "theme-icon", src: Three_Dots, alt: "" })), this.menuOpen ? (h("div", { class: "more-menu", role: "menu" }, isGroup ? (h(Fragment, null, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.openAddMember }, h("img", { class: "theme-icon", src: Add_User, alt: "" }), h("span", null, "Add member")), h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.openGroupInfo }, h("img", { class: "theme-icon", src: Info, alt: "" }), h("span", null, "Group info")))) : null, !groupcast ? (h("button", { type: "button", class: "more-item", role: "menuitem", onClick: () => this.openSearch() }, h("img", { class: "theme-icon", src: Search, alt: "" }), h("span", null, "Search"))) : null, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: () => this.doCloseChat() }, h("img", { class: "theme-icon", src: CloseButton, alt: "" }), h("span", null, "Close chat")), !groupcast ? (h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.handleClearChat }, h("img", { class: "theme-icon", src: Clear_Chat, alt: "" }), h("span", null, "Clear chat"))) : null, isGroup ? (h(Fragment, null, h("div", { class: "more-divider" }), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.exitGroup }, h("img", { class: "theme-icon", src: Logout, alt: "" }), h("span", null, "Exit group")))) : null, showBlock ? (h(Fragment, null, h("div", { class: "more-divider" }), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.doBlock }, h("img", { class: "theme-icon", src: Block_User, alt: "" }), h("span", null, this.isBlocked ? 'Unblock Chat' : 'Block Chat')))) : null)) : null))), this.isLoading && (h("div", { key: '55f81b2d021ca262054d214c36fbc2f3d8ebb150', class: "loading-overlay" }, h("spinner-loader", { key: 'f124da66a180e08a7db55c2dfbe2e6438f478bee', height: "30px", width: "30px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" })))));
|
|
1623
1727
|
}
|
|
1624
1728
|
get el() { return getElement(this); }
|
|
1625
1729
|
static get watchers() { return {
|
|
@@ -4754,7 +4858,7 @@ const AttachmentPreview = class {
|
|
|
4754
4858
|
const type = this.typeOf(cur, this.localIndex);
|
|
4755
4859
|
const fileMode = this.isFilePreview(type);
|
|
4756
4860
|
const fileTitle = this.fileName(cur);
|
|
4757
|
-
return (h("div", { key: '
|
|
4861
|
+
return (h("div", { key: 'e4dbf47c2492175a7c1b502741b3f42f123c704a', class: "preview-container" }, h("div", { key: 'aa47dfa5328eb329d88a907fb2cd24785310eaab', class: "topbar" }, fileMode && !this.showCamera ? (h(Fragment, null, h("button", { class: "icon-btn", type: "button", "aria-label": "Close", onClick: () => this.close() }, h("img", { class: "theme-icon", src: CancelIcon, alt: "" })), h("span", { class: "topbar-title centered" }, fileTitle), h("span", { class: "topbar-spacer" }))) : (h("button", { class: "icon-btn", type: "button", "aria-label": "Close", onClick: () => this.close() }, h("img", { class: "theme-icon", src: CancelIcon, alt: "" })))), h("div", { key: 'b0eadf608ac9f4107aa9d0581e64ae68ac512f24', class: "main" }, this.showCamera ? (h("div", { class: "camera-view" }, this.cameraError ? h("p", { class: "camera-error" }, this.cameraError) : null, !this.cameraReady && !this.cameraError ? h("p", { class: "camera-loading" }, "Opening camera\u2026") : null, h("video", { class: this.cameraReady ? 'is-ready' : '', ref: this.bindVideo, autoplay: true, playsinline: true, muted: true, style: { transform: this.facingMode === 'user' ? 'scaleX(-1)' : 'none' } }), this.cameraReady ? (h("button", { class: "snap-btn", type: "button", title: "Take photo", onClick: this.snap })) : null)) : !cur ? (h("div", null, "No attachment")) : type === 'video' ? (h("video", { class: "preview-media", src: this.srcOf(cur), controls: true, preload: "metadata" })) : type === 'audio' ? (h("div", { class: "audio-stage" }, h("p", { class: "audio-title" }, fileTitle), h("audio", { src: this.srcOf(cur), controls: true, preload: "metadata" }), h("p", { class: "file-preview-meta" }, this.formatSize((_b = (_a = cur === null || cur === void 0 ? void 0 : cur.file) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : cur === null || cur === void 0 ? void 0 : cur.size)))) : type === 'image' || (!type && !fileMode) ? (h("img", { src: this.srcOf(cur), alt: fileTitle })) : this.isPdf(cur) && this.srcOf(cur) ? (h("div", { class: "pdf-stage" }, h("iframe", { class: "pdf-frame", src: `${this.srcOf(cur)}#toolbar=1&navpanes=0`, title: fileTitle }))) : fileMode ? (h("div", { class: "file-preview" }, h("div", { class: "file-preview-icon-wrap" }, h("img", { src: this.fileIconSrc(cur), alt: "" })), h("h3", { class: "file-preview-title" }, fileTitle), h("p", { class: "file-preview-meta" }, [this.formatSize((_d = (_c = cur === null || cur === void 0 ? void 0 : cur.file) === null || _c === void 0 ? void 0 : _c.size) !== null && _d !== void 0 ? _d : cur === null || cur === void 0 ? void 0 : cur.size), this.fileKind(cur)].filter(Boolean).join(' · ')), h("div", { class: "file-preview-actions" }, this.srcOf(cur) ? (h("button", { type: "button", onClick: () => this.openInNewTab(this.srcOf(cur)) }, "Open")) : null, this.srcOf(cur) ? (h("a", { class: "secondary", href: this.srcOf(cur), download: fileTitle }, "Download")) : null))) : (h("div", { class: "file-chip" }, ((_e = cur === null || cur === void 0 ? void 0 : cur.file) === null || _e === void 0 ? void 0 : _e.name) || (cur === null || cur === void 0 ? void 0 : cur.name) || type || 'File'))), !this.showCamera ? (h("div", { class: "footer" }, h("div", { class: "composer" }, this.showEmojiPicker ? (h("div", { class: "emoji-panel" }, h("emoji-picker", { class: "emoji-picker light", ref: this.bindEmojiPicker }))) : null, h("div", { class: "composer-pill" }, h("input", { type: "text", placeholder: this.inputPlaceholder || 'Type a message', value: this.inputValue || '', onInput: this.onCaption, ref: el => (this.captionInputRef = el) }), h("button", { class: "icon-btn smile-btn", type: "button", title: "Emoji", "aria-label": "Emoji", onClick: this.toggleEmoji }, h("img", { src: Smile, alt: "" }))), h("button", { class: "send-btn", type: "button", title: "Send", onClick: () => this.send() }, h("img", { src: Send, alt: "" }), list.length > 1 ? h("span", { class: "send-badge" }, list.length) : null)), h("div", { class: "action-row" }, h("div", { class: "thumbs" }, list.map((item, i) => {
|
|
4758
4862
|
const t = this.typeOf(item, i);
|
|
4759
4863
|
const isFile = this.isFilePreview(t);
|
|
4760
4864
|
const pdf = this.isPdf(item);
|
|
@@ -4823,7 +4927,7 @@ const ReplyBlock = class {
|
|
|
4823
4927
|
return this.messageBody;
|
|
4824
4928
|
}
|
|
4825
4929
|
render() {
|
|
4826
|
-
return (h("div", { key: '
|
|
4930
|
+
return (h("div", { key: '4a67c3ddbbdd334f69be375acdec82ad654378b7', class: "reply-block-container" }, h("div", { key: 'fdf6a1c768d57e37fa9825ad8890ac2708eeca4a', class: "reply-main" }, h("div", { key: '2c4cdb6961182bac974ed1d1bc4274ece697caaa', class: "accent" }), h("div", { key: '5de9fd10baa48e611cf61d755ebe756a1b8ea9ef', class: "reply-body" }, h("div", { key: 'd0b1c362ad10a86d3dd33d01f4380041b4fad776', class: "sender" }, this.senderName), h("div", { key: '232c1757e27f21685c44a36713f64d236749dc1a', class: "message-body-container" }, this.bodyLabel()))), h("button", { key: '87ca553ed902defb6ecaa7989354b84fca348c5b', type: "button", class: "close-btn", "aria-label": "Cancel reply", title: "Cancel reply", onClick: () => { var _a; return (_a = this.onIconClick) === null || _a === void 0 ? void 0 : _a.call(this); } }, h("img", { key: '545aa0ea40ea13491f9dfaa81faae8a45f03dff6', class: "theme-icon", src: CloseButton, alt: "" }))));
|
|
4827
4931
|
}
|
|
4828
4932
|
};
|
|
4829
4933
|
ReplyBlock.style = ":host {\n display: block;\n width: var(--w-full);\n font-family: var(--font-primary);\n margin-bottom: var(--gap-6);\n }\n .reply-block-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--gap-10);\n background: var(--bg-primary);\n border: 1px solid var(--border);\n border-radius: var(--rounded-12);\n box-shadow: 0 1px 2px var(--overlay);\n padding: var(--space-8) var(--space-12);\n box-sizing: border-box;\n }\n .reply-main {\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n min-width: 0;\n flex: 1;\n }\n .accent {\n width: var(--strip);\n height: var(--control);\n border-radius: var(--rounded-full);\n background: var(--brand);\n flex-shrink: 0;\n }\n .reply-body {\n display: flex;\n flex-direction: column;\n min-width: 0;\n gap: var(--gap-2);\n }\n .sender {\n font-size: var(--text-12);\n font-weight: var(--fw-600);\n color: var(--brand);\n line-height: 1.2;\n }\n .message-body-container {\n font-size: var(--text-12);\n color: var(--text-secondary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.3;\n }\n .close-btn {\n cursor: pointer;\n border: none;\n background: transparent;\n padding: var(--gap-4);\n border-radius: var(--rounded-full);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: var(--text-tertiary);\n }\n .close-btn:hover {\n background: var(--hover-overlay);\n color: var(--text-primary);\n }\n .close-btn img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n display: block;\n object-fit: contain;\n opacity: 0.7;\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
|
|
@@ -5427,7 +5531,7 @@ const ChatFooter = class {
|
|
|
5427
5531
|
}
|
|
5428
5532
|
}
|
|
5429
5533
|
async sendMediaMessage(conversationId) {
|
|
5430
|
-
var _a;
|
|
5534
|
+
var _a, _b;
|
|
5431
5535
|
this.changeMessageSendingState(true);
|
|
5432
5536
|
let messageId = Date.now().toString() + Math.random() * 100;
|
|
5433
5537
|
const files = takeMediaFiles(this.attachmentDetails || [], 0).accepted;
|
|
@@ -5461,8 +5565,9 @@ const ChatFooter = class {
|
|
|
5461
5565
|
: files[0].type.startsWith('audio/')
|
|
5462
5566
|
? 'AttachmentMessage:Audio'
|
|
5463
5567
|
: 'AttachmentMessage:File'
|
|
5464
|
-
:
|
|
5465
|
-
const
|
|
5568
|
+
: ATTACHMENT_BODY_PLACEHOLDER;
|
|
5569
|
+
const caption = ((_a = this.messageBody) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
5570
|
+
const localMessage = Object.assign(Object.assign({}, this.createLocalMessage(attachmentBodyForApi(caption), localAttachments, messageId)), { customType, metaData: buildReplyMetaData(this.replyMessage, caption) });
|
|
5466
5571
|
try {
|
|
5467
5572
|
await this.updateConversationListOnMessageSend(localMessage);
|
|
5468
5573
|
}
|
|
@@ -5478,7 +5583,7 @@ const ChatFooter = class {
|
|
|
5478
5583
|
try {
|
|
5479
5584
|
let resForPresignedUrl;
|
|
5480
5585
|
if (this.isGroupcast) {
|
|
5481
|
-
resForPresignedUrl = await getPresignedUrlForGroupcastMedia((
|
|
5586
|
+
resForPresignedUrl = await getPresignedUrlForGroupcastMedia((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userIdentifier, attachments === null || attachments === void 0 ? void 0 : attachments.mimeType);
|
|
5482
5587
|
}
|
|
5483
5588
|
else {
|
|
5484
5589
|
resForPresignedUrl = await M.getInstance().message.postMessagesPresignedurls(payload);
|
|
@@ -5504,7 +5609,7 @@ const ChatFooter = class {
|
|
|
5504
5609
|
}
|
|
5505
5610
|
}
|
|
5506
5611
|
async uploadAndSendMedia(presignedUrls, attachments, conversationId, oldMessageId) {
|
|
5507
|
-
var _a, _b, _c;
|
|
5612
|
+
var _a, _b, _c, _d;
|
|
5508
5613
|
const allPayloads = [];
|
|
5509
5614
|
const uploadPromises = presignedUrls.map(async (urlDetails, index) => {
|
|
5510
5615
|
let mediaId, mediaUrl, thumbnailUrl, mediaPresignedUrl;
|
|
@@ -5542,7 +5647,7 @@ const ChatFooter = class {
|
|
|
5542
5647
|
});
|
|
5543
5648
|
await Promise.all(uploadPromises);
|
|
5544
5649
|
// One attachment → typed; 2–5 together → Multiple (same message)
|
|
5545
|
-
let customType =
|
|
5650
|
+
let customType = ATTACHMENT_BODY_PLACEHOLDER;
|
|
5546
5651
|
if ((attachments === null || attachments === void 0 ? void 0 : attachments.length) === 1 && ((_a = attachments[0]) === null || _a === void 0 ? void 0 : _a.mimeType)) {
|
|
5547
5652
|
if (attachments[0].mimeType.startsWith('image/')) {
|
|
5548
5653
|
customType = 'AttachmentMessage:Image';
|
|
@@ -5557,20 +5662,22 @@ const ChatFooter = class {
|
|
|
5557
5662
|
customType = 'AttachmentMessage:Doc';
|
|
5558
5663
|
}
|
|
5559
5664
|
}
|
|
5665
|
+
const caption = ((_b = this.messageBody) === null || _b === void 0 ? void 0 : _b.trim()) || '';
|
|
5560
5666
|
let payload = {
|
|
5561
5667
|
showInConversation: true,
|
|
5562
5668
|
messageType: this.replyMessage ? 2 : 0,
|
|
5563
|
-
parentMessageId: (
|
|
5669
|
+
parentMessageId: (_c = this.replyMessage) === null || _c === void 0 ? void 0 : _c.messageId,
|
|
5564
5670
|
encrypted: false,
|
|
5565
5671
|
conversationId,
|
|
5566
|
-
body
|
|
5672
|
+
// API rejects empty body; caption text or placeholder. Real caption also in metaData.caption
|
|
5673
|
+
body: attachmentBodyForApi(caption),
|
|
5567
5674
|
customType: customType,
|
|
5568
5675
|
attachments: allPayloads,
|
|
5569
5676
|
deviceId: this.deviceId,
|
|
5570
5677
|
metaData: this.getReplyMetadata(),
|
|
5571
5678
|
};
|
|
5572
5679
|
let payloadForGroupcastMessage = Object.assign(Object.assign({}, payload), { hideNewConversationsForSender: false, groupcastId: this.groupcastId, notifyOnCompletion: true, sendPushForNewConversationCreated: true });
|
|
5573
|
-
if (((
|
|
5680
|
+
if (((_d = this.mentionUserList) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
|
5574
5681
|
payload['mentionedUsers'] = this.mentionUserList;
|
|
5575
5682
|
}
|
|
5576
5683
|
try {
|
|
@@ -5599,12 +5706,7 @@ const ChatFooter = class {
|
|
|
5599
5706
|
}
|
|
5600
5707
|
}
|
|
5601
5708
|
getReplyMetadata() {
|
|
5602
|
-
|
|
5603
|
-
return Object.assign(Object.assign({ parentMessageId: (_a = this.replyMessage) === null || _a === void 0 ? void 0 : _a.messageId, parentMessage: (_b = this.replyMessage) === null || _b === void 0 ? void 0 : _b.body, parentMessageTime: (_c = this.replyMessage) === null || _c === void 0 ? void 0 : _c.sentAt, parentMessageSenderId: (_e = (_d = this.replyMessage) === null || _d === void 0 ? void 0 : _d.senderInfo) === null || _e === void 0 ? void 0 : _e.userId, parentMessageSenderName: (_g = (_f = this.replyMessage) === null || _f === void 0 ? void 0 : _f.senderInfo) === null || _g === void 0 ? void 0 : _g.userName }, (((_j = (_h = this.replyMessage) === null || _h === void 0 ? void 0 : _h.attachments) === null || _j === void 0 ? void 0 : _j[0]) && {
|
|
5604
|
-
parentMessageName: this.replyMessage.attachments[0].name,
|
|
5605
|
-
parentMessageMediaUrl: this.replyMessage.attachments[0].mediaUrl,
|
|
5606
|
-
parentMessageType: this.replyMessage.attachments[0].mimeType,
|
|
5607
|
-
})), (((_k = this.messageBody) === null || _k === void 0 ? void 0 : _k.trim()) && { captionMessage: this.messageBody.trim() }));
|
|
5709
|
+
return buildReplyMetaData(this.replyMessage, this.messageBody);
|
|
5608
5710
|
}
|
|
5609
5711
|
revokePreviewSrc(src) {
|
|
5610
5712
|
if (src && typeof src === 'string' && src.startsWith('blob:')) {
|
|
@@ -5637,7 +5739,7 @@ const ChatFooter = class {
|
|
|
5637
5739
|
const webChat = findWebChatHost(this.el);
|
|
5638
5740
|
const hasCustomReply = (webChat ? hasNamedSlot(webChat, 'reply-preview') : false) || hasNamedSlot(this.el, 'reply-preview');
|
|
5639
5741
|
const showAttachment = this.attachmentDetails || this.showCamera;
|
|
5640
|
-
return (h(Host, { key: '
|
|
5742
|
+
return (h(Host, { key: '4aecc1f90f540e9082f8abbaf4faadbbcd549fd4', class: { 'attachment-open': !!showAttachment } }, h("div", { key: 'f11f01df71447e564785543322ad9cefffb2df19', class: "chat-footer-container" }, showAttachment ? (h("slot", { name: "attachment-preview" }, h("attachment-preview", { showCamera: this.showCamera, onClose: this.handleClearAttachment, width: "150px", height: "150px", bgColor: "var(--bg-primary-light)", padding: "3px", margin: "10px 0 0 0", contentType: contentType, content: this.mediaPreviews, onSend: this.handleSendMessage, "onfile-uploaded": this.handleFileUpload, "onattachment-removed": this.handleRemoveAttachment, "oncamera-retake": this.handleCameraRetake, key: this.inputKey, inputValue: this.messageBody, "oninput-change": this.handleInputChange, backgroundColor: "var(--bg-primary-color)", containerBoxShadow: "none", inputFontColor: "var(--text-primary-color)", inputBorderRadius: "10px", conversationDetails: this.conversationDetails, userMetaData: this.userMetaData }))) : (h(Fragment, null, hasCustomReply ? h("slot", { name: "reply-preview" }) : null, h("slot", { name: "composer-input" }, !hasCustomReply && this.replyMessage ? (h("reply-block", { messageBody: (_a = this.replyMessage) === null || _a === void 0 ? void 0 : _a.body, messageInfo: this.replyMessage, senderName: ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userId) === ((_d = (_c = this.replyMessage) === null || _c === void 0 ? void 0 : _c.senderInfo) === null || _d === void 0 ? void 0 : _d.userId)
|
|
5641
5743
|
? 'You'
|
|
5642
5744
|
: (_f = (_e = this.replyMessage) === null || _e === void 0 ? void 0 : _e.senderInfo) === null || _f === void 0 ? void 0 : _f.userName, onIconClick: this.handleremoveReplyMessage })) : null, h("div", { class: "composer-wrap", key: this.inputKey, ref: el => (this.composerWrapRef = el) }, this.showEmojiPicker ? (h("div", { class: "emoji-panel", style: this.emojiPanelStyle }, h("div", { class: "emoji-panel-header" }, h("span", null, "Emoji"), h("button", { class: "emoji-panel-close", type: "button", "aria-label": "Close", onClick: this.handleEmojiToggle }, "\u00D7")), h("emoji-picker", { class: "emoji-picker light", ref: this.bindEmojiPicker }))) : null, h("div", { class: { composer: true, recording: this.isRecording } }, this.isRecording ? (h("div", { class: "rec-body" }, h("div", { class: "rec-left" }, h("button", { class: "rec-icon-btn danger", type: "button", title: "Delete recording", "aria-label": "Delete recording", onClick: this.handleRecDelete }, h("img", { class: "theme-icon", src: Delete, alt: "" })), h("div", { class: "rec-timer-wrap" }, h("span", { class: { 'rec-dot': true, live: !this.isPaused } }), h("span", { class: "rec-timer" }, this.formatRecTime(this.recordingSeconds)))), h("div", { class: "rec-wave" }, h("audio-bubble", { liveRecord: true, audioProgressColor: "#2563eb", audioWaveColor: "#2563eb", ref: el => (this.recBubble = el), onRecordingProgress: this.onRecordingProgress, onRecordingError: this.onRecordingError })), h("button", { class: { 'rec-icon-btn': true, 'rec-toggle': true, pause: !this.isPaused }, type: "button", title: this.isPaused ? 'Resume recording' : 'Pause recording', "aria-label": this.isPaused ? 'Resume recording' : 'Pause recording', onClick: this.handleRecPauseToggle }, h("img", { class: "theme-icon", src: this.isPaused ? PlayIcon : PauseIcon, alt: "" })), h("button", { class: "rec-send", type: "button", title: "Send voice note", "aria-label": "Send voice note", onClick: this.handleRecSend }, h("img", { src: Send, alt: "" })))) : (h(Fragment, null, h("div", { class: "attach-wrap" }, h("button", { class: "icon-btn", type: "button", title: "Attach file", "aria-label": "Attach", onClick: this.handleAttachClick }, h("img", { src: Attachment, alt: "" })), this.showAttachMenu ? (h("div", { class: "attach-menu", style: this.attachMenuStyle }, h("button", { class: "attach-opt", type: "button", onClick: this.pickDocument }, h("span", { class: "attach-opt-icon attach-opt-icon--doc" }, h("img", { src: DocumentsIcon, alt: "" })), h("span", null, "Document")), h("button", { class: "attach-opt", type: "button", onClick: this.pickPhotos }, h("span", { class: "attach-opt-icon attach-opt-icon--photos" }, h("img", { class: "theme-icon", src: PhotosIcon, alt: "" })), h("span", null, "Photos & videos")), h("button", { class: "attach-opt", type: "button", onClick: this.pickCamera }, h("span", { class: "attach-opt-icon attach-opt-icon--camera" }, h("img", { class: "theme-icon", src: CameraIcon, alt: "" })), h("span", null, "Camera")))) : null), h("button", { class: "icon-btn", type: "button", title: "Emojis", "aria-label": "Emojis", onClick: this.handleEmojiToggle }, h("img", { src: Smile, alt: "" })), h("input", { class: "file-input", type: "file", multiple: true, accept: ".jpg,.jpeg,.png,.gif,.webp,.bmp,.heic,.mp4,.mov,.webm,.mkv,.mp3,.wav,.m4a,.aac,.ogg", ref: el => (this.mediaInputRef = el), onChange: this.handleNativeFileChange }), h("input", { class: "file-input", type: "file", multiple: true, accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,.rtf,application/*", ref: el => (this.docInputRef = el), onChange: this.handleNativeFileChange }), h("textarea", { class: "composer-input", rows: 1, placeholder: "Type a message", value: this.messageBody, ref: el => (this.inputRef = el), onInput: this.handleComposerInput, onKeyDown: this.handleComposerKeyDown }), this.messageBody.trim() ? (h("button", { class: "icon-btn", type: "button", title: "Send", "aria-label": "Send", onClick: this.handleSendMessage }, h("img", { src: Send, alt: "" }))) : (h("button", { class: "icon-btn", type: "button", title: "Voice note", "aria-label": "Voice note", onClick: this.handleMicClick }, h("img", { src: Microphone, alt: "" })))))))))))));
|
|
5643
5745
|
}
|
|
@@ -5732,7 +5834,7 @@ const BlockChatList = class {
|
|
|
5732
5834
|
}
|
|
5733
5835
|
render() {
|
|
5734
5836
|
var _a, _b;
|
|
5735
|
-
return (h("div", { key: '
|
|
5837
|
+
return (h("div", { key: '012322ba96f6b096fe7857cae36c30a322620827', class: "blocked-users-container" }, h("div", { key: '7fc77bfcb108603e7eed5e0f25aef3dc58127ac7', class: "header" }, h("button", { key: '9697c52f5e372884c4270c0c258a3ba21dfef0cf', class: "back-button", type: "button", onClick: () => { var _a; return (_a = this.goBack) === null || _a === void 0 ? void 0 : _a.call(this); }, "aria-label": "Back" }, h("img", { key: '0c6b0dc3f69d7c62a0d3ea132d08d4c8d93b34e4', class: "theme-icon", src: Left_Arrow, alt: "" })), h("h2", { key: '3322096a3259618ab665c791a444dcaf318aa991', style: { margin: '0', fontSize: '18px' } }, "Blocked Users")), h("div", { key: '04e0436cf07effc38946264793414d50bc2f1667', class: "search-container" }, h("input", { key: 'bbb909a7b2ba1b756d7d5770657184539c89785c', class: "search-input", type: "text", placeholder: "Search users...", value: this.searchTerm, onInput: (e) => {
|
|
5736
5838
|
this.searchTerm = e.target.value;
|
|
5737
5839
|
this.debouncedSearch(this.searchTerm);
|
|
5738
5840
|
} })), this.isLoading ? (h("div", { class: "loading-spinner" }, h("spinner-loader", { height: "30px", width: "30px" }))) : ((_a = this.blockUsers) === null || _a === void 0 ? void 0 : _a.length) === 0 ? (h("div", { class: "empty-state" }, this.searchTerm
|
|
@@ -5962,7 +6064,7 @@ const ProfileSidebar = class {
|
|
|
5962
6064
|
}
|
|
5963
6065
|
render() {
|
|
5964
6066
|
var _a, _b;
|
|
5965
|
-
return (h("div", { key: '
|
|
6067
|
+
return (h("div", { key: '55246be4cb99d67f1a4d3210bed4ef1bfae7fe84', class: "profile-tab" }, h("div", { key: '22bd741640954f50a478f861ad11809cbd80e879', class: "top-buttons" }, h("div", { key: '81ab0727f845eb42370d4342168c343354505be8', class: `chat-button${this.activeTab === 'Chat' ? ' active' : ''}`, title: "Chat", onClick: () => this.call(this.openChat) }, h("img", { key: 'aabcb91dbc626c4e14e6f577560d0e8f8d05251a', src: Message, class: "theme-icon", alt: "chat" }), this.unreadConversationsCount > 0 ? (h("div", { class: "unread-count" }, this.unreadConversationsCount)) : null), h("div", { key: '0d2ce5f28848e3cf872a757695dcd16e1abdc446', class: `chat-button${this.activeTab === 'GroupCast' ? ' active' : ''}`, title: "GroupCast", onClick: () => this.call(this.openGroupCast) }, h("img", { key: 'eb6fb9a32070d6b20ad2466b0ee571c8a1a07e00', src: Group_cast, class: "theme-icon", alt: "broadcast" }))), h("div", { key: '96b301bc866b6b44570b9b2ac9b8b42b0c6c0da9', class: "bottom-buttons" }, h("div", { key: 'f480664f2413cb7e802e2c0df84dffdc4c981090', class: `avatar-wrap${this.activeTab === 'Profile' ? ' active' : ''}`, title: "Profile", onClick: () => this.call(this.openProfile) }, h("profile-avatar", { key: 'ae4e299d9399997d976f18a0e3c138db7b4f9f48', src: ((_a = this.userMetaData) === null || _a === void 0 ? void 0 : _a.userProfileImageUrl) || '', name: ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userName) || '', size: "var(--avatar-sm)" })))));
|
|
5966
6068
|
}
|
|
5967
6069
|
};
|
|
5968
6070
|
ProfileSidebar.style = ":host {\n display: flex;\n height: var(--h-full);\n flex-shrink: 0;\n background-color: var(--bg-tertiary);\n }\n .profile-tab {\n width: var(--rail-width);\n height: var(--h-full);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n background-color: var(--bg-tertiary);\n border-right: 1px solid var(--border);\n padding: var(--space-16);\n box-sizing: border-box;\n z-index: 20;\n }\n .top-buttons,\n .bottom-buttons {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: var(--w-full);\n gap: var(--gap-16);\n }\n .top-buttons {\n margin-top: var(--gap-4);\n }\n .bottom-buttons {\n gap: var(--gap-12);\n }\n .chat-button {\n width: var(--control);\n height: var(--control);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--rounded-full);\n cursor: pointer;\n position: relative;\n color: var(--icon);\n transition: background-color 0.15s, color 0.15s, transform 0.1s;\n border: none;\n background: transparent;\n padding: 0;\n }\n .chat-button:hover {\n background-color: var(--hover-overlay);\n color: var(--text-primary);\n }\n .chat-button:active {\n transform: scale(0.95);\n }\n .chat-button.active {\n background-color: var(--brand-soft);\n color: var(--brand);\n }\n .chat-button img {\n width: var(--icon-md);\n height: var(--icon-md);\n display: block;\n }\n .theme-icon { filter: var(--svg-icon-filter); }\n .unread-count {\n position: absolute;\n top: calc(var(--gap-4) * -1);\n right: calc(var(--gap-4) * -1);\n min-width: var(--badge);\n height: var(--badge);\n padding: var(--gap-2) var(--gap-6);\n border-radius: var(--rounded-full);\n background: var(--brand);\n color: var(--text-on-brand);\n font-size: var(--text-10);\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n line-height: 1;\n }\n .avatar-wrap {\n width: var(--avatar-sm);\n height: var(--avatar-sm);\n border-radius: var(--rounded-full);\n overflow: hidden;\n cursor: pointer;\n position: relative;\n box-sizing: border-box;\n box-shadow: 0 0 0 2px transparent;\n transition: box-shadow 0.15s;\n }\n .avatar-wrap:hover {\n box-shadow: 0 0 0 2px var(--brand-soft);\n }\n .avatar-wrap.active {\n box-shadow: 0 0 0 2px var(--brand);\n }\n .avatar {\n width: var(--w-full);\n height: var(--h-full);\n object-fit: cover;\n display: block;\n }\n @media (max-width: 768px) {\n .profile-tab {\n display: none;\n }\n }";
|
|
@@ -5997,10 +6099,15 @@ const ContactInfo = class {
|
|
|
5997
6099
|
});
|
|
5998
6100
|
};
|
|
5999
6101
|
this.confirmExitGroup = () => {
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6102
|
+
var _a;
|
|
6103
|
+
const members = this.isGroupcast
|
|
6104
|
+
? this.groupcastMembers || []
|
|
6105
|
+
: this.groupMembers || [];
|
|
6106
|
+
promptExitGroup({
|
|
6107
|
+
selfId: String(((_a = this.userMetaData) === null || _a === void 0 ? void 0 : _a.userId) || ''),
|
|
6108
|
+
members,
|
|
6109
|
+
conversationId: String(this.conversationId || ''),
|
|
6110
|
+
onLeave: () => this.emitAction('exit-group'),
|
|
6004
6111
|
});
|
|
6005
6112
|
};
|
|
6006
6113
|
this.openAddMember = () => {
|
|
@@ -6353,7 +6460,7 @@ const ProfileInfo = class {
|
|
|
6353
6460
|
}
|
|
6354
6461
|
render() {
|
|
6355
6462
|
const avatar = this.contactImage || generateProfileImageByInitials(this.contactName || '?', 96, 96);
|
|
6356
|
-
return (h("div", { key: '
|
|
6463
|
+
return (h("div", { key: 'f5f2d99774f205ee64e022f0099495df8bc0d6e2', class: "panel", style: {
|
|
6357
6464
|
padding: this.padding,
|
|
6358
6465
|
margin: this.margin,
|
|
6359
6466
|
width: this.width,
|
|
@@ -6362,21 +6469,11 @@ const ProfileInfo = class {
|
|
|
6362
6469
|
backgroundColor: this.backgroundColor,
|
|
6363
6470
|
color: this.textColor,
|
|
6364
6471
|
fontFamily: this.fontFamily,
|
|
6365
|
-
} }, h("div", { key: '
|
|
6472
|
+
} }, h("div", { key: 'abe6b2979c84a16ac7fdb80fa37c743ca80b9b02', class: "header" }, h("strong", { key: '73779826bbb27ccfa126aa1af18b7921dccdc474' }, "Profile"), h("button", { key: '0e27a1393f72079f9c2b35f4f77c49f09218b7b5', class: "close-btn", type: "button", onClick: () => this.close() }, "\u2715")), h("div", { key: 'bc3004b96617cc989c5c1d1f39a660829ceaf37b', class: "hero" }, h("img", { key: '0b01732603938aff0f9ec5911032e90b20e9e440', class: "avatar", src: avatar, alt: "", onClick: () => typeof this.openOwnProfile === 'function' && this.openOwnProfile() }), h("div", { key: '0fb3419e0102105777bfe63b0090cf226e97e804', class: "name" }, this.isEditingName ? this.editedName || this.contactName : this.contactName || 'Unknown'), this.contactEmail ? h("div", { class: "email" }, this.contactEmail) : null), h("div", { key: 'f140d43fefdc6f1ac258b2223a9ace8444e1e220', class: "section" }, h("h4", { key: 'b31611ea9f971e42337e5bc4a80de5dc4368f051' }, "Media"), h("div", { key: '7f88774bd7e612427305b444dda71d64a88c4ce4' }, (this.allAttachments || []).length, " items")), h("div", { key: '198d3d0193c90d864315b84b0250e6e457eacfae', class: "actions" }, typeof this.handleChatSelect === 'function' ? (h("button", { type: "button", onClick: () => this.handleChatSelect() }, "Message")) : null)));
|
|
6366
6473
|
}
|
|
6367
6474
|
};
|
|
6368
6475
|
ProfileInfo.style = ":host { display: block; height: 100%; }\n .panel {\n display: flex; flex-direction: column; height: 100%; box-sizing: border-box;\n background: var(--bg-primary); color: var(--text-primary); padding: 12px; gap: 12px;\n }\n .header { display: flex; align-items: center; gap: 10px; }\n .close-btn { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 20px; color: inherit; }\n .hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0; }\n .avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--bg-tertiary); }\n .name { font-size: 20px; font-weight: 600; }\n .email { font-size: 13px; opacity: 0.7; }\n .section { border-top: 1px solid var(--bg-secondary); padding-top: 12px; }\n .section h4 { margin: 0 0 8px; font-size: 13px; opacity: 0.75; text-transform: uppercase; }\n .actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }\n .actions button {\n padding: 10px 12px; border-radius: 8px; border: 1px solid var(--bg-secondary);\n background: var(--bg-secondary); color: inherit; cursor: pointer; text-align: left;\n }";
|
|
6369
6476
|
|
|
6370
|
-
const makeAdmin = async (conversationId, userId) => {
|
|
6371
|
-
const response = await M.getInstance().Conversation.putConversationAdmin({conversationId: conversationId, memberId: userId});
|
|
6372
|
-
return response;
|
|
6373
|
-
};
|
|
6374
|
-
|
|
6375
|
-
const removeAdmin = async (conversationId, userId) => {
|
|
6376
|
-
const response = await M.getInstance().Conversation.deleteConversationAdmin({conversationId: conversationId, memberId: userId});
|
|
6377
|
-
return response;
|
|
6378
|
-
};
|
|
6379
|
-
|
|
6380
6477
|
const MessageSearch = class {
|
|
6381
6478
|
constructor(hostRef) {
|
|
6382
6479
|
registerInstance(this, hostRef);
|
|
@@ -6433,7 +6530,7 @@ const MessageSearch = class {
|
|
|
6433
6530
|
}
|
|
6434
6531
|
render() {
|
|
6435
6532
|
const results = this.searchedMessageDetails || [];
|
|
6436
|
-
return (h("div", { key: '
|
|
6533
|
+
return (h("div", { key: '991a3aab62e0de33ad78a6fc12f2877b9dcb119b', class: "panel", onClick: e => e.stopPropagation() }, h("div", { key: 'c33084e8cede5b2722b7e8abc2096ea11e1da7d9', class: "header" }, h("button", { key: '5d37359264c899a926eba4f4085a2e7036c5911f', class: "icon-btn", type: "button", "aria-label": "Close", onClick: () => this.closeSearch() }, h("img", { key: 'a3663ac6fe3ec8219c5df8cd9130e2acdf6ed0c9', class: "theme-icon", src: CancelIcon, alt: "" })), h("h3", { key: 'a9cbdc0cfa4814189852d8b57bcd4bcc20db41dd', class: "title" }, "Search messages")), h("div", { key: '9a940abd01df7b290747cbb0aa1e30ac02b34fba', class: "search-wrap" }, h("div", { key: 'c872e78b1c380faef04a373a7f692b7b02e7effe', class: "search-bar" }, h("img", { key: 'fcb9b448a8053ff49eaee65d644b034a7c8e60af', class: "theme-icon search-icon", src: Search, alt: "" }), h("input", { key: 'eab5cdb1a8e1ccfb063cb3e9f47e1e76073c1130', type: "text", placeholder: "Search", value: this.searchValue, onInput: this.onInput, autofocus: true }), this.searchValue ? (h("button", { class: "clear-btn", type: "button", "aria-label": "Clear", onClick: this.clearInput }, h("img", { class: "theme-icon", src: CancelIcon, alt: "" }))) : null)), h("div", { key: 'af8a7bd79ae5975ab876c8c19114a285dec80bcb', class: "results" }, this.isLoadingMessage ? (h("div", { class: "empty" }, h("spinner-loader", { height: "15px", width: "15px" }))) : results.length === 0 ? (h("div", { class: "empty" }, h("p", null, this.searchValue ? 'No results found' : 'Search for messages'))) : (results.map(message => (h("div", { class: "row", onClick: () => this.handleResultClick(message.messageId) }, h("span", { class: "date" }, this.formatDate(message.sentAt)), h("span", { class: "body" }, this.highlight(message.body)))))))));
|
|
6437
6534
|
}
|
|
6438
6535
|
};
|
|
6439
6536
|
MessageSearch.style = ":host {\n display: block;\n height: 100%;\n font-family: var(--font-primary);\n color: var(--text-primary);\n }\n .panel {\n display: flex;\n flex-direction: column;\n height: 100%;\n box-sizing: border-box;\n background: var(--bg-primary);\n }\n .header {\n height: 4rem;\n padding: 0 var(--space-16);\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n border-bottom: 1px solid var(--border);\n flex-shrink: 0;\n box-sizing: border-box;\n }\n .icon-btn {\n width: var(--control);\n height: var(--control);\n border: none;\n border-radius: var(--rounded-full);\n background: transparent;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n color: var(--icon);\n flex-shrink: 0;\n }\n .icon-btn:hover { background: var(--hover-overlay); color: var(--text-primary); }\n .icon-btn img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n display: block;\n }\n .title {\n margin: 0;\n font-size: var(--text-16);\n font-weight: var(--fw-600);\n color: var(--text-primary);\n }\n .search-wrap {\n padding: var(--space-16) var(--space-16) var(--space-8);\n border-bottom: 1px solid var(--border-subtle);\n }\n .search-bar {\n position: relative;\n display: flex;\n align-items: center;\n }\n .search-icon {\n position: absolute;\n left: 0.75rem;\n width: 1.125rem;\n height: 1.125rem;\n opacity: 0.55;\n pointer-events: none;\n }\n .search-bar input {\n width: 100%;\n box-sizing: border-box;\n border: none;\n outline: none;\n border-radius: var(--rounded-8);\n background: var(--bg-input);\n color: var(--text-primary);\n font-size: var(--text-14);\n font-family: var(--font-primary);\n padding: var(--gap-8) 2.25rem var(--gap-8) 2.25rem;\n }\n .search-bar input::placeholder { color: var(--text-tertiary); }\n .search-bar input:focus {\n box-shadow: 0 0 0 2px var(--focus-ring);\n }\n .clear-btn {\n position: absolute;\n right: 0.5rem;\n width: 1.75rem;\n height: 1.75rem;\n border: none;\n border-radius: var(--rounded-full);\n background: transparent;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n color: var(--text-tertiary);\n }\n .clear-btn:hover { color: var(--text-secondary); }\n .clear-btn img { width: 0.875rem; height: 0.875rem; display: block; }\n .results {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n .empty {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 2rem;\n text-align: center;\n box-sizing: border-box;\n }\n .empty p {\n margin: 0;\n max-width: 15rem;\n font-size: var(--text-12);\n color: var(--text-tertiary);\n line-height: 1.6;\n }\n .row {\n display: flex;\n flex-direction: column;\n gap: var(--gap-4);\n padding: var(--space-12) var(--space-16);\n border-bottom: 1px solid var(--border-subtle);\n cursor: pointer;\n }\n .row:hover { background: var(--hover-overlay); }\n .date {\n font-size: var(--text-12);\n color: var(--text-secondary);\n }\n .body {\n font-size: var(--text-14);\n color: var(--text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .hit {\n background-color: var(--brand, #2563eb);\n color: var(--text-on-brand, #ffffff);\n border-radius: var(--rounded-2);\n padding: 0 2px;\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
|
|
@@ -6691,7 +6788,7 @@ const ChatLoadingPlaceholder = class {
|
|
|
6691
6788
|
}
|
|
6692
6789
|
render() {
|
|
6693
6790
|
const pct = Math.max(0, Math.min(100, Number(this.progress) || 0));
|
|
6694
|
-
return (h("div", { key: '
|
|
6791
|
+
return (h("div", { key: '1d94ae77a3b84334f8baccfc56ce2626d49fbe5c', class: "box" }, h("div", { key: 'c5e6ee763f846855de73c4dfd3a11712ab67e179', class: "logo", innerHTML: isometrikLogo }), h("div", { key: 'b0406f8e134260c4a6ca950d86628c4206a51e0e', class: "bar" }, h("div", { key: '3f1e832c8a3c18bcf627562b31a742f77f99f893', class: "fill", style: { width: `${pct}%` } })), h("div", { key: '01787478f77aa07380c661e54e7144a335252224', class: "pct" }, pct, "%")));
|
|
6695
6792
|
}
|
|
6696
6793
|
};
|
|
6697
6794
|
ChatLoadingPlaceholder.style = ":host {\n display: flex;\n box-sizing: border-box;\n width: var(--w-full);\n min-height: var(--h-screen);\n height: var(--h-full);\n align-items: center;\n justify-content: center;\n background: var(--bg-secondary);\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .box {\n display: flex;\n flex-direction: column;\n gap: var(--gap-16);\n align-items: center;\n min-width: 220px;\n max-width: 320px;\n width: min(320px, 80vw);\n padding: calc(var(--space-16) + var(--space-8));\n }\n .logo {\n width: 180px;\n max-width: 70vw;\n }\n .logo svg {\n width: var(--w-full);\n height: var(--h-auto);\n display: block;\n }\n .bar {\n width: var(--w-full);\n height: var(--gap-6);\n border-radius: var(--rounded-full);\n background: var(--bg-primary);\n overflow: hidden;\n }\n .fill {\n height: var(--h-full);\n background: var(--brand);\n transition: width 0.2s ease;\n }\n .pct {\n font-size: var(--text-14);\n font-weight: var(--fw-600);\n color: var(--text-secondary);\n text-align: center;\n }";
|
|
@@ -6740,6 +6837,7 @@ const MessageInfo = class {
|
|
|
6740
6837
|
this.closePopup();
|
|
6741
6838
|
}
|
|
6742
6839
|
previewText() {
|
|
6840
|
+
var _a, _b, _c, _d;
|
|
6743
6841
|
if (this.messagePreviewText)
|
|
6744
6842
|
return this.messagePreviewText;
|
|
6745
6843
|
const msg = this.selectedMessage;
|
|
@@ -6751,8 +6849,11 @@ const MessageInfo = class {
|
|
|
6751
6849
|
if (names.length > 1)
|
|
6752
6850
|
return `${names[0]} +${names.length - 1}`;
|
|
6753
6851
|
}
|
|
6852
|
+
const caption = String((_d = (_b = (_a = msg === null || msg === void 0 ? void 0 : msg.metaData) === null || _a === void 0 ? void 0 : _a.caption) !== null && _b !== void 0 ? _b : (_c = msg === null || msg === void 0 ? void 0 : msg.metaData) === null || _c === void 0 ? void 0 : _c.captionMessage) !== null && _d !== void 0 ? _d : '').trim();
|
|
6853
|
+
if (caption)
|
|
6854
|
+
return caption;
|
|
6754
6855
|
const body = (msg === null || msg === void 0 ? void 0 : msg.body) || '';
|
|
6755
|
-
// API stores
|
|
6856
|
+
// API stores placeholder in body for media; never show AttachmentMessage:* as caption
|
|
6756
6857
|
if (String(body).startsWith('AttachmentMessage:'))
|
|
6757
6858
|
return (atts === null || atts === void 0 ? void 0 : atts.length) ? 'Attachment' : '';
|
|
6758
6859
|
return body || '';
|
|
@@ -6778,7 +6879,7 @@ const MessageInfo = class {
|
|
|
6778
6879
|
render() {
|
|
6779
6880
|
const delivery = this.deliveryUserList || [];
|
|
6780
6881
|
const read = this.readUserList || [];
|
|
6781
|
-
return (h("div", { key: '
|
|
6882
|
+
return (h("div", { key: '8cbb260b458f09271cd6b1675b65d25b518a5b62', class: "panel" }, h("div", { key: '5a985b94d89e5a4197cb62e11cdf18f1bdc1871d', class: "header" }, h("button", { key: 'db8c9ed3526898872e1f368c7ec5ba09addb5cad', class: "close-btn", type: "button", "aria-label": "Close", title: "Close", onClick: () => this.close() }, h("img", { key: '083f8274705e283259aae905deaa436e5f4b245f', class: "theme-icon", src: CancelIcon, alt: "" })), h("h2", { key: 'a058a67fdacca067d745bdb50cbd7b8a816fa29e' }, "Message info")), h("div", { key: '55b49021b93e4083a2fda96a185ebd5c42d95025', class: "body" }, h("div", { key: '6c1d2b82c79b070909448af67538582e9f8d378b', class: "preview-wrap" }, h("div", { key: '1515cfcb240da83d3c7f190e2dcf9d082e9add0d', class: "preview-bubble" }, h("p", { key: '70df9dd2a094607d3d19eff09559ab8a5199cf1a', class: "preview-text" }, this.previewText()), h("div", { key: 'c85a9579c7071ccb31b92752cf1f5d5cae2be107', class: "preview-meta" }, h("span", { key: 'da4b0fb14e4704778ee2dae312418bdb5d3f7bd7' }, this.bubbleTime())))), h("div", { key: '1413b77d30d10cdce084d6ea98e4bfd5c5b97aac', class: "status-list" }, h("div", { key: '66f72522b946e8331c18dcbb17252b205ac4c962', class: "status-row" }, this.ticksIcon('read'), h("div", { key: '389e7a90d1c4b68641ed70b09f0780e4e74cc041', class: "status-content" }, h("div", { key: 'ee49e7669508a13c75672148127d691a0019a192', class: "status-title" }, "Read"), h("p", { key: '500268878c0716daea5124d781b26a4861fed4d4', class: "status-time" }, this.formatTime(this.messageReadTime)), read.map(u => (h("div", { class: "user-row" }, h("profile-avatar", { src: u.userProfileImageUrl || '', name: u.userName || '', size: "2rem" }), h("span", { class: "user-name" }, u.userName)))))), h("div", { key: 'faddbe446898e96d1d8b7d37a44d019ed7ccd30e', class: "status-row" }, this.ticksIcon('delivered'), h("div", { key: '72953384928b55b8d6c6864b26250b2d4c2f7aa0', class: "status-content" }, h("div", { key: '8bb0a893faa9bef1c99c4eef221446044193d02c', class: "status-title" }, "Delivered"), h("p", { key: '8baa9cf3f7e8973c03a5526371dab136e8895659', class: "status-time" }, this.formatTime(this.messageDeliveryTime)), delivery.map(u => (h("div", { class: "user-row" }, h("profile-avatar", { src: u.userProfileImageUrl || '', name: u.userName || '', size: "2rem" }), h("span", { class: "user-name" }, u.userName))))))))));
|
|
6782
6883
|
}
|
|
6783
6884
|
};
|
|
6784
6885
|
MessageInfo.style = ":host {\n display: block;\n height: var(--h-full);\n width: var(--w-full);\n font-family: var(--font-primary);\n color: var(--text-primary);\n }\n .panel {\n display: flex;\n flex-direction: column;\n height: var(--h-full);\n background: var(--bg-primary);\n }\n .header {\n height: var(--rail-width);\n padding: 0 var(--space-16);\n background: var(--bg-primary);\n border-bottom: 1px solid var(--border);\n display: flex;\n align-items: center;\n gap: var(--gap-16);\n flex-shrink: 0;\n box-sizing: border-box;\n }\n .header h2 {\n margin: 0;\n font-size: var(--text-16);\n font-weight: var(--fw-600);\n color: var(--text-primary);\n }\n .close-btn {\n border: none;\n background: transparent;\n cursor: pointer;\n width: var(--icon-lg);\n height: var(--icon-lg);\n border-radius: var(--rounded-full);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--icon);\n padding: 0;\n }\n .close-btn:hover {\n background: var(--hover-overlay);\n color: var(--text-primary);\n }\n .close-btn img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n display: block;\n }\n .body {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n background: var(--bg-tertiary);\n display: flex;\n flex-direction: column;\n }\n .preview-wrap {\n padding: var(--space-16);\n background: var(--bg-secondary);\n border-bottom: 1px solid var(--border);\n display: flex;\n justify-content: flex-end;\n box-sizing: border-box;\n }\n .preview-bubble {\n background: var(--brand);\n color: var(--text-on-brand);\n border-radius: var(--rounded-12) var(--rounded-12) var(--rounded-2) var(--rounded-12);\n padding: var(--gap-10) var(--space-16);\n max-width: 20rem;\n box-shadow: 0 1px 2px var(--overlay);\n box-sizing: border-box;\n }\n .preview-text {\n margin: 0;\n font-size: var(--text-14);\n line-height: 1.5;\n word-break: break-word;\n white-space: pre-wrap;\n }\n .preview-meta {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n margin-top: var(--gap-4);\n font-size: var(--text-10);\n color: var(--text-on-brand);\n opacity: 0.85;\n }\n .status-list {\n background: var(--bg-primary);\n box-shadow: 0 1px 2px var(--overlay);\n }\n .status-row {\n display: flex;\n align-items: flex-start;\n gap: var(--space-16);\n padding: var(--space-16);\n border-bottom: 1px solid var(--border-subtle);\n box-sizing: border-box;\n }\n .status-row:last-child {\n border-bottom: none;\n }\n .status-row:hover {\n background: var(--hover-overlay);\n }\n .status-icon {\n flex-shrink: 0;\n margin-top: var(--gap-2);\n width: var(--icon-md);\n height: var(--icon-md);\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--text-tertiary);\n -webkit-mask: var(--tick-mask) center / contain no-repeat;\n mask: var(--tick-mask) center / contain no-repeat;\n }\n .status-icon.read {\n background-color: var(--brand);\n }\n .status-icon.delivered {\n background-color: var(--text-tertiary);\n }\n .status-content {\n flex: 1;\n min-width: 0;\n }\n .status-title {\n font-size: var(--text-14);\n font-weight: var(--fw-600);\n color: var(--text-primary);\n }\n .status-time {\n margin: var(--gap-2) 0 0;\n font-size: var(--text-12);\n color: var(--text-tertiary);\n }\n .user-row {\n display: flex;\n align-items: center;\n gap: var(--space-8);\n margin-top: var(--space-8);\n }\n .user-name {\n font-size: var(--text-14);\n color: var(--text-primary);\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
|
|
@@ -6809,7 +6910,7 @@ const IncomingTextMessageBubble = class {
|
|
|
6809
6910
|
this.showReactionOnHover = false;
|
|
6810
6911
|
}
|
|
6811
6912
|
render() {
|
|
6812
|
-
return (h("message-bubble", { key: '
|
|
6913
|
+
return (h("message-bubble", { key: '918370c86bf0b7e135e67b3b86e41331269cc98f', isSelf: false, time: this.time, timeColor: this.timeColor, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor || '#EFF1FA', borderRadius: this.borderRadius || '7px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover }, h("div", { key: 'a69f51b6c043a1baec73ed1b068792ff2ccacce6', style: { fontFamily: this.fontFamily, color: this.color, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, renderMessageBody(this.textContent, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), false))));
|
|
6813
6914
|
}
|
|
6814
6915
|
};
|
|
6815
6916
|
IncomingTextMessageBubble.style = ":host { display: block; max-width: 80%; margin-left: 10px; }";
|
|
@@ -6830,7 +6931,7 @@ const MessageDatePill = class {
|
|
|
6830
6931
|
this.content = '';
|
|
6831
6932
|
}
|
|
6832
6933
|
render() {
|
|
6833
|
-
return (h("span", { key: '
|
|
6934
|
+
return (h("span", { key: '9ba025a7d2726e79e9cc52353787434e7ee414f4', class: "pill", style: {
|
|
6834
6935
|
background: this.bgColor,
|
|
6835
6936
|
color: this.textColor,
|
|
6836
6937
|
width: this.width,
|
|
@@ -6875,7 +6976,7 @@ const OutgoingTextMessageBubble = class {
|
|
|
6875
6976
|
this.fontFamily = 'var(--font-primary)';
|
|
6876
6977
|
}
|
|
6877
6978
|
render() {
|
|
6878
|
-
return (h("message-bubble", { key: '
|
|
6979
|
+
return (h("message-bubble", { key: 'afc55ff86f19f328ac69cf2169d1b9a0dbbf715a', isSelf: true, time: this.time, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, deliveryStatus: this.deliveryStatus, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px' }, h("div", { key: '00b057946676eccc6bb97dfe223398ab4806673f', style: { fontFamily: this.fontFamily, color: this.textColor, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, renderMessageBody(this.textContent, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), true))));
|
|
6879
6980
|
}
|
|
6880
6981
|
};
|
|
6881
6982
|
OutgoingTextMessageBubble.style = ":host { display: block; max-width: 80%; margin-right: 10px; }";
|
|
@@ -6933,7 +7034,7 @@ const ReplyMessageContainer = class {
|
|
|
6933
7034
|
render() {
|
|
6934
7035
|
const parentBody = this.parentMessageBody || this.parentmessageBody || this.repliedMessage || '';
|
|
6935
7036
|
const parentName = this.parentMessageSenderName || this.senderName || 'Reply';
|
|
6936
|
-
return (h("message-bubble", { key: '
|
|
7037
|
+
return (h("message-bubble", { key: 'eb31f7a04555d65b448a7c54ed58d3b13ad2d788', isSelf: !!this.isSelf, time: this.messageTime, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, backgroundColor: this.backgroundColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover }, h("div", { key: '016db93d605068afc6c51d16eccc8b9dd89821b9', class: "quote", onClick: e => { var _a; return (_a = this.onMediaClick) === null || _a === void 0 ? void 0 : _a.call(this, e); } }, h("div", { key: 'c4acc4bd04ec7279baeb6aaad48098bacb9888e9', class: "quote-sender" }, parentName), h("div", { key: '72a4c0a1a561666d78b3c8a9de2cfefaa86aa96a', class: "quote-body" }, parentBody), this.parentMessageMediaUrl ? (h("img", { class: "quote-media", src: this.parentMessageMediaUrl, alt: "" })) : null), h("div", { key: 'eceb7aa34cc3482cc31ce9e60d575cf8dcb2c731', class: "reply-body", style: { color: this.color, fontSize: this.fontSize, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, this.messageBody)));
|
|
6937
7038
|
}
|
|
6938
7039
|
};
|
|
6939
7040
|
ReplyMessageContainer.style = ":host { display: block; }\n .quote {\n border-left: 3px solid var(--brand);\n background: var(--hover-overlay);\n border-radius: 6px;\n padding: 6px 8px;\n margin-bottom: 6px;\n font-size: 12px;\n max-width: 100%;\n width: 100%;\n box-sizing: border-box;\n text-align: left;\n }\n .quote-sender { font-weight: 600; margin-bottom: 2px; color: var(--brand); }\n .quote-body { opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .quote-media { max-width: 120px; max-height: 80px; border-radius: 6px; margin-top: 4px; object-fit: cover; }\n .reply-body { width: 100%; text-align: left; }";
|
|
@@ -7116,21 +7217,39 @@ const WebChatBody = class {
|
|
|
7116
7217
|
};
|
|
7117
7218
|
this.putReadAll = async () => {
|
|
7118
7219
|
var _a, _b;
|
|
7119
|
-
|
|
7120
|
-
|
|
7220
|
+
if (!this.selectedConversationId)
|
|
7221
|
+
return;
|
|
7222
|
+
const hasUnreadMessages = (_a = this.allMessages) === null || _a === void 0 ? void 0 : _a.some(message => {
|
|
7223
|
+
var _a, _b;
|
|
7224
|
+
return ((message === null || message === void 0 ? void 0 : message.senderId) || ((_a = message === null || message === void 0 ? void 0 : message.senderInfo) === null || _a === void 0 ? void 0 : _a.userId)) != ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userId) &&
|
|
7225
|
+
!(message === null || message === void 0 ? void 0 : message.readByAll);
|
|
7226
|
+
});
|
|
7227
|
+
// Always hit the server on open/visible — unread flags on local rows race and miss.
|
|
7228
|
+
try {
|
|
7121
7229
|
await M.getInstance().message.putRead({ conversationId: this.selectedConversationId });
|
|
7122
|
-
|
|
7230
|
+
}
|
|
7231
|
+
catch (err) {
|
|
7232
|
+
console.warn('[webchat] putRead failed', err);
|
|
7233
|
+
return;
|
|
7234
|
+
}
|
|
7235
|
+
if (hasUnreadMessages) {
|
|
7236
|
+
const newUpdatedAllMessages = (_b = this.allMessages) === null || _b === void 0 ? void 0 : _b.map(message => {
|
|
7237
|
+
var _a, _b;
|
|
7238
|
+
return (message === null || message === void 0 ? void 0 : message.readByAll) != true &&
|
|
7239
|
+
((message === null || message === void 0 ? void 0 : message.senderId) || ((_a = message === null || message === void 0 ? void 0 : message.senderInfo) === null || _a === void 0 ? void 0 : _a.userId)) != ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userId)
|
|
7240
|
+
? Object.assign(Object.assign({}, message), { readByAll: true }) : message;
|
|
7241
|
+
});
|
|
7123
7242
|
this.updateAllMessages(newUpdatedAllMessages);
|
|
7124
|
-
this.el.dispatchEvent(new CustomEvent('message-read-status-updated', {
|
|
7125
|
-
bubbles: true,
|
|
7126
|
-
composed: true,
|
|
7127
|
-
detail: {
|
|
7128
|
-
conversationId: this.selectedConversationId,
|
|
7129
|
-
isRead: true,
|
|
7130
|
-
isDelivered: true,
|
|
7131
|
-
},
|
|
7132
|
-
}));
|
|
7133
7243
|
}
|
|
7244
|
+
this.el.dispatchEvent(new CustomEvent('message-read-status-updated', {
|
|
7245
|
+
bubbles: true,
|
|
7246
|
+
composed: true,
|
|
7247
|
+
detail: {
|
|
7248
|
+
conversationId: this.selectedConversationId,
|
|
7249
|
+
isRead: true,
|
|
7250
|
+
isDelivered: true,
|
|
7251
|
+
},
|
|
7252
|
+
}));
|
|
7134
7253
|
};
|
|
7135
7254
|
this.handleVisibilityChange = async () => {
|
|
7136
7255
|
if (document.visibilityState === 'visible') {
|
|
@@ -7300,6 +7419,8 @@ const WebChatBody = class {
|
|
|
7300
7419
|
};
|
|
7301
7420
|
this.renderAttachmentMessage = (message, isSelf) => {
|
|
7302
7421
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
7422
|
+
// Caption from metaData.caption (Flutter/Swift); never show AttachmentMessage:* body placeholders
|
|
7423
|
+
const caption = attachmentCaption(message);
|
|
7303
7424
|
// Common props for all message types
|
|
7304
7425
|
const commonOutgoingProps = {
|
|
7305
7426
|
time: message === null || message === void 0 ? void 0 : message.sentAt,
|
|
@@ -7309,7 +7430,7 @@ const WebChatBody = class {
|
|
|
7309
7430
|
deliveryStatus: (message === null || message === void 0 ? void 0 : message.deliveryStatus) || '',
|
|
7310
7431
|
textColor: 'var(--text-outgoing-message)',
|
|
7311
7432
|
timeColor: 'var(--text-outgoing-time)',
|
|
7312
|
-
message:
|
|
7433
|
+
message: caption,
|
|
7313
7434
|
mentionedUsers: message === null || message === void 0 ? void 0 : message.mentionedUsers,
|
|
7314
7435
|
bgColor: 'var(--bg-outgoing-message)',
|
|
7315
7436
|
borderRadius: '6px 6px 0 6px',
|
|
@@ -7320,7 +7441,7 @@ const WebChatBody = class {
|
|
|
7320
7441
|
isSelf: isSelf,
|
|
7321
7442
|
textColor: 'var(--text-incoming-message)',
|
|
7322
7443
|
timeColor: 'var(--text-incoming-time)',
|
|
7323
|
-
message:
|
|
7444
|
+
message: caption,
|
|
7324
7445
|
mentionedUsers: message === null || message === void 0 ? void 0 : message.mentionedUsers,
|
|
7325
7446
|
bgColor: 'var(--bg-incoming-message)',
|
|
7326
7447
|
borderRadius: '6px 6px 6px 0',
|
|
@@ -7744,7 +7865,7 @@ const WebChatBody = class {
|
|
|
7744
7865
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7745
7866
|
const currentConversation = (_a = this.conversationList) === null || _a === void 0 ? void 0 : _a.find(conversation => (conversation === null || conversation === void 0 ? void 0 : conversation.conversationId) === this.selectedConversationId);
|
|
7746
7867
|
const shouldShowPlaceholder = ((_b = this.allMessages) === null || _b === void 0 ? void 0 : _b.length) === 1 && ((_d = (_c = this.allMessages) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.action) !== 'clearConversation' && ((_e = this.allMessages) === null || _e === void 0 ? void 0 : _e.some(message => (message === null || message === void 0 ? void 0 : message.action) === 'clearConversation'));
|
|
7747
|
-
return (h("div", { key: '
|
|
7868
|
+
return (h("div", { key: '017c85307bdbe5be7616541e79f9822d37238192', class: `chat-body ${this.isChatBodyUnscrollable ? 'unscrollable' : null}` }, this.showScrollButton || this.newMessageNotification && (h("div", { key: 'faa75f085f8866011206e9df18c19e70608b73ee', onClick: this.scrollToBottom, style: {
|
|
7748
7869
|
position: 'sticky',
|
|
7749
7870
|
top: '90%',
|
|
7750
7871
|
left: '95%',
|
|
@@ -7758,7 +7879,7 @@ const WebChatBody = class {
|
|
|
7758
7879
|
cursor: 'pointer',
|
|
7759
7880
|
boxShadow: '0 2px 5px rgba(0,0,0,0.2)',
|
|
7760
7881
|
zIndex: '100',
|
|
7761
|
-
} }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (h("div", { key: '
|
|
7882
|
+
} }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (h("div", { key: '8d8ce11d2b6a6605123263fdad1c9cbd3cc69c57', style: {
|
|
7762
7883
|
position: 'absolute',
|
|
7763
7884
|
bottom: '22px',
|
|
7764
7885
|
right: '-2px',
|
|
@@ -7772,7 +7893,7 @@ const WebChatBody = class {
|
|
|
7772
7893
|
justifyContent: 'center',
|
|
7773
7894
|
fontSize: '12px',
|
|
7774
7895
|
padding: '0 4px',
|
|
7775
|
-
} })), h("svg", { key: '
|
|
7896
|
+
} })), h("svg", { key: '8e151339669a3cb217c5a2dc8d91ed505b5bc19e', width: "20px", height: "30px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '03721744e4913ee969fd54b8fbe56f56df430a2b', d: "M12 5V19M12 19L19 12M12 19L5 12", stroke: "var(--text-primary-color)", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), shouldShowPlaceholder && (h("div", { key: '6ad033ccc314f2e9405c2a70c344535797401d75', style: {
|
|
7776
7897
|
display: 'flex',
|
|
7777
7898
|
flexDirection: 'column',
|
|
7778
7899
|
alignItems: 'center',
|
|
@@ -7782,7 +7903,7 @@ const WebChatBody = class {
|
|
|
7782
7903
|
textAlign: 'center',
|
|
7783
7904
|
color: 'var(--text-secondary-color)',
|
|
7784
7905
|
marginTop: '20px',
|
|
7785
|
-
} }, h("img", { key: '
|
|
7906
|
+
} }, h("img", { key: 'ed586743164aa9421c3fa670d41490ea6348c6ba', src: NoMessagePlaceholder, alt: "No messages", style: { width: '200px', height: '200px' } }), h("div", { key: 'ae7b72d55f359fa4499dd0389780fd3eea42c5d1', style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px' } }, h("span", { key: 'c8646251c1736ffcfc1f57d66d3e39aa1d0c2661', style: { fontSize: '24px', color: 'var(--text-primary-color)' } }, "No messages"), h("span", { key: '6f26a1c1449f381d7d18fd09caebbf14d2db6958', style: { fontSize: '16px', color: 'var(--text-secondary-color)' } }, "Send a \"Hi\" and make someone's day brighter!")))), this.isMessagesLoading && (h("spinner-loader", { key: '17eb012be71eac04a736212baea3ebf611825ddf', height: "20px", width: "20px", spinTime: "1s", spinnerPrimaryColor: "#000", spinnerSecondaryColor: "var(--bg-grey-color)", spinnerBorderWidth: "3px" })), ((_g = this.allMessages) === null || _g === void 0 ? void 0 : _g.length) > 0 &&
|
|
7786
7907
|
((_h = this.userMetaData) === null || _h === void 0 ? void 0 : _h.userId) &&
|
|
7787
7908
|
(() => {
|
|
7788
7909
|
const total = this.allMessages.length;
|