isometrik-plugin-chat-sdk 2.0.21 → 2.0.23
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 +2 -2
- package/dist/cjs/{app-globals-2824b330.js → app-globals-0e7848be.js} +3 -3
- package/dist/cjs/{app-globals-2824b330.js.map → app-globals-0e7848be.js.map} +1 -1
- package/dist/cjs/{attachment-preview_22.cjs.entry.js → attachment-preview_23.cjs.entry.js} +692 -388
- package/dist/cjs/attachment-preview_23.cjs.entry.js.map +1 -0
- package/dist/cjs/audio-bubble_4.cjs.entry.js +66 -22
- package/dist/cjs/audio-bubble_4.cjs.entry.js.map +1 -1
- 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-tile_3.cjs.entry.js +14 -10
- package/dist/cjs/chat-tile_3.cjs.entry.js.map +1 -1
- package/dist/cjs/chat-video-message-bubble.cjs.entry.js +1 -1
- package/dist/cjs/confirm-dialog.cjs.entry.js +1 -1
- package/dist/cjs/{content-ebca062a.js → content-8b271b56.js} +3 -1
- package/dist/cjs/content-8b271b56.js.map +1 -0
- package/dist/cjs/delete-message.cjs.entry.js +1 -1
- package/dist/cjs/download-9ccc0a6c.js +120 -0
- package/dist/cjs/download-9ccc0a6c.js.map +1 -0
- package/dist/cjs/{drawer-00a2323a.js → drawer-3f9c87b4.js} +42 -5
- package/dist/cjs/drawer-3f9c87b4.js.map +1 -0
- package/dist/cjs/forward-memebers.cjs.entry.js +61 -24
- package/dist/cjs/forward-memebers.cjs.entry.js.map +1 -1
- package/dist/cjs/forward-message.cjs.entry.js +2 -2
- package/dist/cjs/group-chat-contacts.cjs.entry.js +2 -2
- package/dist/cjs/{group-members-b3bea06e.js → group-members-1205fc4c.js} +5 -5
- package/dist/cjs/{group-members-b3bea06e.js.map → group-members-1205fc4c.js.map} +1 -1
- package/dist/cjs/{groupcast-8441b4df.js → groupcast-bb393c81.js} +14 -54
- package/dist/cjs/groupcast-bb393c81.js.map +1 -0
- package/dist/cjs/{groupcast-f24da720.js → groupcast-e1e52bd1.js} +16 -16
- package/dist/cjs/{groupcast-f24da720.js.map → groupcast-e1e52bd1.js.map} +1 -1
- package/dist/cjs/{helpers-154861e9.js → helpers-877a7116.js} +30 -1
- package/dist/cjs/helpers-877a7116.js.map +1 -0
- package/dist/cjs/index.cjs.js +8 -6
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{toast-91093c84.js → index.m-ff115b26.js} +1 -156
- package/dist/cjs/{toast-91093c84.js.map → index.m-ff115b26.js.map} +1 -1
- package/dist/cjs/info-panel-media_2.cjs.entry.js +244 -0
- package/dist/cjs/info-panel-media_2.cjs.entry.js.map +1 -0
- package/dist/cjs/isometrik-webchat.cjs.js +11 -9
- package/dist/cjs/isometrik-webchat.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +11 -9
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/{local-notification-bdd04d7a.js → local-notification-a86a2b34.js} +3 -3
- package/dist/cjs/local-notification-a86a2b34.js.map +1 -0
- package/dist/cjs/login-page_3.cjs.entry.js +258 -104
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/cjs/media-gallery.cjs.entry.js +10 -2
- package/dist/cjs/media-gallery.cjs.entry.js.map +1 -1
- package/dist/cjs/member-add.cjs.entry.js +20 -11
- package/dist/cjs/member-add.cjs.entry.js.map +1 -1
- package/dist/cjs/message-bubble.cjs.entry.js +2 -2
- package/dist/cjs/{message-reaction-82a4f93c.js → message-reaction-8f93a048.js} +5 -5
- package/dist/cjs/{message-reaction-82a4f93c.js.map → message-reaction-8f93a048.js.map} +1 -1
- package/dist/cjs/messages-e129b34d.js +179 -0
- package/dist/cjs/messages-e129b34d.js.map +1 -0
- package/dist/cjs/my-component.cjs.entry.js +1 -1
- package/dist/cjs/new-chat-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/play-b473e0ab.js +13 -0
- package/dist/cjs/play-b473e0ab.js.map +1 -0
- package/dist/cjs/profile-avatar.cjs.entry.js +1 -1
- package/dist/cjs/reaction-container.cjs.entry.js +5 -4
- package/dist/cjs/reaction-container.cjs.entry.js.map +1 -1
- package/dist/cjs/{runtime-controls-cfc8fc31.js → runtime-controls-a70872fe.js} +33 -15
- package/dist/cjs/runtime-controls-a70872fe.js.map +1 -0
- package/dist/cjs/{send-media-4ee967d4.js → send-media-8a841e50.js} +559 -192
- package/dist/cjs/send-media-8a841e50.js.map +1 -0
- package/dist/cjs/share-popup.cjs.entry.js +1 -1
- package/dist/cjs/signup-page.cjs.entry.js +2 -2
- package/dist/cjs/spinner-loader.cjs.entry.js +1 -1
- package/dist/cjs/{group-members-cef1198e.js → storage-quota-2e81fb71.js} +254 -10
- package/dist/cjs/storage-quota-2e81fb71.js.map +1 -0
- package/dist/cjs/toast-a75f822c.js +159 -0
- package/dist/cjs/toast-a75f822c.js.map +1 -0
- package/dist/collection/collection-manifest.json +10 -8
- package/dist/collection/components/ChatUIComponent/AddMember.js +14 -7
- package/dist/collection/components/ChatUIComponent/AddMember.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/ChatDocumentMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatImageMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatOwnProfile/Profile.js +8 -2
- package/dist/collection/components/ChatUIComponent/ChatOwnProfile/Profile.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +90 -47
- 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 +105 -37
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js +45 -11
- 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 +38 -13
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/WebChatBody/web-chat-body.css +1 -0
- package/dist/collection/components/ChatUIComponent/shared/AudioBubble/AudioBubble.js +22 -10
- package/dist/collection/components/ChatUIComponent/shared/AudioBubble/AudioBubble.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/ForwardMessageList/ForwardMessageList.js +55 -19
- package/dist/collection/components/ChatUIComponent/shared/ForwardMessageList/ForwardMessageList.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/admin-transfer-dialog/admin-transfer-dialog.js +2 -2
- 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/chat-tile/chat-tile.js +31 -9
- package/dist/collection/components/ChatUIComponent/shared/chat-tile/chat-tile.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/confirm-dialog/confirm-dialog.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js +66 -157
- 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 +14 -4
- package/dist/collection/components/ChatUIComponent/shared/document-message/document-message.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/forward-message/forward-message.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/group-info/group-info.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/image-message/image-message.js +65 -2
- package/dist/collection/components/ChatUIComponent/shared/image-message/image-message.js.map +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/info-panel-media/info-panel-media.js +335 -0
- package/dist/collection/components/ChatUIComponent/shared/info-panel-media/info-panel-media.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/shared/link-preview/link-preview.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/media-gallery/media-gallery.js +11 -2
- package/dist/collection/components/ChatUIComponent/shared/media-gallery/media-gallery.js.map +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 +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-search/message-search.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/new chat/new-chat.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-avatar/profile-avatar.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/profile-info/profile-info.js +70 -3
- package/dist/collection/components/ChatUIComponent/shared/profile-info/profile-info.js.map +1 -1
- 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 +31 -2
- package/dist/collection/components/ChatUIComponent/shared/reply-message-container/reply-message-container.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/reply-message-container/reply-message-container.stories.js +10 -6
- package/dist/collection/components/ChatUIComponent/shared/searchable list/searchable-list.js +3 -3
- package/dist/collection/components/ChatUIComponent/shared/share-popup/share-popup.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/spinner-loader/spinner-loader.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/storage/storage-manager.js +140 -0
- package/dist/collection/components/ChatUIComponent/shared/storage/storage-manager.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js +35 -3
- package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js.map +1 -1
- package/dist/collection/components/Login.js +1 -1
- package/dist/collection/components/Signup.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/WebChat.js +145 -1
- package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/WebchatRightSide.js +44 -2
- package/dist/collection/components/my-component/web-chat/WebchatRightSide.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/bootstrap.js +1 -0
- package/dist/collection/components/my-component/web-chat/bootstrap.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/conversation-ops.js +22 -2
- package/dist/collection/components/my-component/web-chat/conversation-ops.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/data-fetch.js +9 -4
- package/dist/collection/components/my-component/web-chat/data-fetch.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/event-handlers.js +51 -10
- package/dist/collection/components/my-component/web-chat/event-handlers.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/mutations.js +38 -8
- package/dist/collection/components/my-component/web-chat/mutations.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/offline-host.js +31 -17
- 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 +6 -1
- package/dist/collection/components/my-component/web-chat/public-send.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/shell-render.js +11 -9
- package/dist/collection/components/my-component/web-chat/shell-render.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/web-chat.css +40 -3
- package/dist/collection/components/theme-provider.js +1 -1
- package/dist/collection/constants/content.js +2 -0
- package/dist/collection/lib/chat/block-status.js +12 -0
- package/dist/collection/lib/chat/block-status.js.map +1 -0
- package/dist/collection/lib/chat/clipboard-paste.js +68 -0
- package/dist/collection/lib/chat/clipboard-paste.js.map +1 -0
- package/dist/collection/lib/chat/conversations.js +47 -3
- package/dist/collection/lib/chat/conversations.js.map +1 -1
- package/dist/collection/lib/chat/download-media.js +112 -0
- package/dist/collection/lib/chat/download-media.js.map +1 -0
- package/dist/collection/lib/chat/index.js +6 -2
- package/dist/collection/lib/chat/index.js.map +1 -1
- package/dist/collection/lib/chat/local-notification.js +1 -1
- package/dist/collection/lib/chat/local-notification.js.map +1 -1
- package/dist/collection/lib/chat/same-name-upload.js +53 -0
- package/dist/collection/lib/chat/same-name-upload.js.map +1 -0
- package/dist/collection/lib/chat/send-media.js +194 -27
- package/dist/collection/lib/chat/send-media.js.map +1 -1
- package/dist/collection/lib/chat/session.js +9 -3
- package/dist/collection/lib/chat/session.js.map +1 -1
- package/dist/collection/lib/chat/storage-quota.js +226 -0
- package/dist/collection/lib/chat/storage-quota.js.map +1 -0
- package/dist/collection/lib/custom-ui/public-api.js +5 -0
- package/dist/collection/lib/custom-ui/public-api.js.map +1 -1
- package/dist/collection/lib/drawer.js +42 -4
- package/dist/collection/lib/drawer.js.map +1 -1
- package/dist/collection/lib/helpers.js +29 -1
- package/dist/collection/lib/mqtt/dispatch.js +7 -3
- package/dist/collection/lib/mqtt/dispatch.js.map +1 -1
- package/dist/collection/sdk/headless-api.js +8 -0
- package/dist/collection/sdk/headless-api.js.map +1 -1
- package/dist/collection/sdk/index.js +1 -0
- package/dist/collection/sdk/index.js.map +1 -1
- package/dist/collection/sdk/webchat-api.js +5 -0
- package/dist/collection/sdk/webchat-api.js.map +1 -1
- package/dist/collection/store/storage-quota.js +244 -0
- package/dist/collection/store/storage-quota.js.map +1 -0
- package/dist/collection/testing/iso-chat-sdk-mock.js +10 -6
- package/dist/components/AudioBubble.js +22 -10
- package/dist/components/AudioBubble.js.map +1 -1
- package/dist/components/BlockChatList.js +2 -2
- package/dist/components/ChatFooter.js +172 -37
- package/dist/components/ChatFooter.js.map +1 -1
- package/dist/components/ChatSidebar.js +102 -49
- package/dist/components/ChatSidebar.js.map +1 -1
- package/dist/components/GroupCast2.js +1 -1
- package/dist/components/Login.js +1 -1
- package/dist/components/Profile.js +20 -9
- package/dist/components/Profile.js.map +1 -1
- package/dist/components/WebChat.js +301 -126
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/WebChatBody.js +39 -14
- package/dist/components/WebChatBody.js.map +1 -1
- package/dist/components/WebChatHeader.js +48 -15
- package/dist/components/WebChatHeader.js.map +1 -1
- package/dist/components/WebchatRightSide.js +22 -7
- package/dist/components/WebchatRightSide.js.map +1 -1
- package/dist/components/admin-transfer-dialog.js +2 -2
- package/dist/components/attachment-preview2.js +1 -1
- package/dist/components/chat-app.js +85 -73
- package/dist/components/chat-app.js.map +1 -1
- package/dist/components/chat-assets.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-tile2.js +12 -7
- package/dist/components/chat-tile2.js.map +1 -1
- package/dist/components/chat-video-message-bubble.js +1 -1
- package/dist/components/client.js +11 -47
- package/dist/components/client.js.map +1 -1
- package/dist/components/confirm-dialog.js +1 -1
- package/dist/components/contact-info2.js +73 -162
- package/dist/components/contact-info2.js.map +1 -1
- package/dist/components/content.js +2 -0
- package/dist/components/content.js.map +1 -1
- package/dist/components/conversation.js +1 -1
- package/dist/components/conversations.js +91 -0
- package/dist/components/conversations.js.map +1 -0
- package/dist/components/delete-message.js +1 -1
- package/dist/components/document-message2.js +15 -6
- package/dist/components/document-message2.js.map +1 -1
- package/dist/components/download-media.js +115 -0
- package/dist/components/download-media.js.map +1 -0
- package/dist/components/download.js +5 -0
- package/dist/components/download.js.map +1 -0
- package/dist/components/drawer.js +42 -5
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/forward-memebers.js +56 -20
- package/dist/components/forward-memebers.js.map +1 -1
- package/dist/components/forward-message.js +2 -2
- package/dist/components/group-chat-contacts2.js +1 -1
- package/dist/components/group-info.js +1 -1
- package/dist/components/group-members.js +26 -298
- package/dist/components/group-members.js.map +1 -1
- package/dist/components/helpers.js +28 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/image-message2.js +17 -2
- package/dist/components/image-message2.js.map +1 -1
- package/dist/components/incoming-text-message-bubble2.js +1 -1
- package/dist/components/index.js +21 -2
- package/dist/components/index.js.map +1 -1
- package/dist/{esm/group-members-7909941c.js → components/index3.js} +3 -52
- package/dist/components/index3.js.map +1 -0
- package/dist/components/info-panel-media.d.ts +11 -0
- package/dist/components/info-panel-media.js +8 -0
- package/dist/components/info-panel-media.js.map +1 -0
- package/dist/components/info-panel-media2.js +242 -0
- package/dist/components/info-panel-media2.js.map +1 -0
- package/dist/components/link-preview2.js +1 -1
- package/dist/components/local-notification.js +1 -1
- package/dist/components/local-notification.js.map +1 -1
- package/dist/components/media-gallery.js +11 -2
- package/dist/components/media-gallery.js.map +1 -1
- package/dist/components/member-add.js +16 -9
- package/dist/components/member-add.js.map +1 -1
- package/dist/components/message-bubble2.js +2 -2
- package/dist/components/message-date-pill2.js +1 -1
- package/dist/components/message-info2.js +2 -2
- package/dist/components/message-search2.js +1 -1
- package/dist/components/messages.js +1 -1
- package/dist/components/my-component.js +1 -1
- package/dist/components/new-chat-sidebar.js +1 -1
- package/dist/components/new-chat2.js +1 -1
- package/dist/components/outgoing-text-message-bubble2.js +1 -1
- package/dist/components/profile-avatar2.js +1 -1
- package/dist/components/profile-info2.js +69 -6
- package/dist/components/profile-info2.js.map +1 -1
- package/dist/components/profile-sidebar2.js +2 -2
- package/dist/components/prompt-exit-group.js +26 -3
- package/dist/components/prompt-exit-group.js.map +1 -1
- package/dist/components/reaction-container.js +2 -2
- package/dist/components/reply-block2.js +1 -1
- package/dist/components/reply-message-container2.js +12 -2
- package/dist/components/reply-message-container2.js.map +1 -1
- package/dist/components/searchable-list2.js +3 -3
- package/dist/components/send-media.js +242 -33
- package/dist/components/send-media.js.map +1 -1
- package/dist/components/share-popup.js +1 -1
- package/dist/components/signup-page.js +2 -2
- package/dist/components/spinner-loader2.js +1 -1
- package/dist/components/storage-manager.js +125 -0
- package/dist/components/storage-manager.js.map +1 -0
- package/dist/components/storage-quota.js +223 -0
- package/dist/components/storage-quota.js.map +1 -0
- package/dist/components/storage-quota2.js +248 -0
- package/dist/components/storage-quota2.js.map +1 -0
- package/dist/components/theme-provider2.js +1 -1
- package/dist/components/video-message2.js +19 -3
- package/dist/components/video-message2.js.map +1 -1
- package/dist/components/web-chat-storage.d.ts +11 -0
- package/dist/components/web-chat-storage.js +8 -0
- package/dist/components/web-chat-storage.js.map +1 -0
- package/dist/esm/admin-transfer-dialog.entry.js +2 -2
- package/dist/esm/{app-globals-e3f4717b.js → app-globals-eba1ca0c.js} +3 -3
- package/dist/esm/{app-globals-e3f4717b.js.map → app-globals-eba1ca0c.js.map} +1 -1
- package/dist/esm/{attachment-preview_22.entry.js → attachment-preview_23.entry.js} +657 -354
- package/dist/esm/attachment-preview_23.entry.js.map +1 -0
- package/dist/esm/audio-bubble_4.entry.js +66 -22
- package/dist/esm/audio-bubble_4.entry.js.map +1 -1
- 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-tile_3.entry.js +15 -11
- package/dist/esm/chat-tile_3.entry.js.map +1 -1
- package/dist/esm/chat-video-message-bubble.entry.js +1 -1
- package/dist/esm/confirm-dialog.entry.js +1 -1
- package/dist/esm/{content-fb138a93.js → content-fd0af283.js} +3 -1
- package/dist/esm/content-fd0af283.js.map +1 -0
- package/dist/esm/delete-message.entry.js +1 -1
- package/dist/esm/download-5368a10f.js +117 -0
- package/dist/esm/download-5368a10f.js.map +1 -0
- package/dist/esm/{drawer-7de04622.js → drawer-a457d820.js} +43 -6
- package/dist/esm/drawer-a457d820.js.map +1 -0
- package/dist/esm/forward-memebers.entry.js +59 -22
- package/dist/esm/forward-memebers.entry.js.map +1 -1
- package/dist/esm/forward-message.entry.js +2 -2
- package/dist/esm/group-chat-contacts.entry.js +2 -2
- package/dist/esm/{group-members-36cf9395.js → group-members-d603f29f.js} +2 -2
- package/dist/esm/{group-members-36cf9395.js.map → group-members-d603f29f.js.map} +1 -1
- package/dist/esm/{groupcast-5fb19ec3.js → groupcast-4f15b050.js} +14 -50
- package/dist/esm/groupcast-4f15b050.js.map +1 -0
- package/dist/esm/{groupcast-f96c1d9e.js → groupcast-c6da3918.js} +2 -2
- package/dist/esm/{groupcast-f96c1d9e.js.map → groupcast-c6da3918.js.map} +1 -1
- package/dist/esm/{helpers-f33b895c.js → helpers-1632a4c7.js} +29 -2
- package/dist/esm/helpers-1632a4c7.js.map +1 -0
- package/dist/esm/index.js +9 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{toast-a1531088.js → index.m-8c70037f.js} +2 -156
- package/dist/esm/{toast-a1531088.js.map → index.m-8c70037f.js.map} +1 -1
- package/dist/esm/info-panel-media_2.entry.js +239 -0
- package/dist/esm/info-panel-media_2.entry.js.map +1 -0
- package/dist/esm/isometrik-webchat.js +11 -9
- package/dist/esm/isometrik-webchat.js.map +1 -1
- package/dist/esm/loader.js +11 -9
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/{local-notification-4c1e166d.js → local-notification-f9ae9062.js} +3 -3
- package/dist/esm/local-notification-f9ae9062.js.map +1 -0
- package/dist/esm/login-page_3.entry.js +219 -65
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/esm/media-gallery.entry.js +10 -2
- package/dist/esm/media-gallery.entry.js.map +1 -1
- package/dist/esm/member-add.entry.js +20 -11
- package/dist/esm/member-add.entry.js.map +1 -1
- package/dist/esm/message-bubble.entry.js +2 -2
- package/dist/esm/{message-reaction-0d2ef75f.js → message-reaction-0a2bb115.js} +2 -2
- package/dist/esm/{message-reaction-0d2ef75f.js.map → message-reaction-0a2bb115.js.map} +1 -1
- package/dist/esm/messages-057dbecb.js +167 -0
- package/dist/esm/messages-057dbecb.js.map +1 -0
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/new-chat-sidebar.entry.js +2 -2
- package/dist/esm/play-05ae077a.js +9 -0
- package/dist/esm/play-05ae077a.js.map +1 -0
- package/dist/esm/profile-avatar.entry.js +1 -1
- package/dist/esm/reaction-container.entry.js +5 -4
- package/dist/esm/reaction-container.entry.js.map +1 -1
- package/dist/esm/{runtime-controls-ff81e90a.js → runtime-controls-bdb84aeb.js} +21 -3
- package/dist/esm/runtime-controls-bdb84aeb.js.map +1 -0
- package/dist/esm/{send-media-58e7145b.js → send-media-04f7ca0a.js} +533 -180
- package/dist/esm/send-media-04f7ca0a.js.map +1 -0
- package/dist/esm/share-popup.entry.js +1 -1
- package/dist/esm/signup-page.entry.js +2 -2
- package/dist/esm/spinner-loader.entry.js +1 -1
- package/dist/esm/storage-quota-6329fabe.js +578 -0
- package/dist/esm/storage-quota-6329fabe.js.map +1 -0
- package/dist/esm/toast-f681e916.js +157 -0
- package/dist/esm/toast-f681e916.js.map +1 -0
- package/dist/isometrik-webchat/index.esm.js +1 -1
- package/dist/isometrik-webchat/index.esm.js.map +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-0161f40b.js +2 -0
- package/dist/isometrik-webchat/p-0161f40b.js.map +1 -0
- package/dist/isometrik-webchat/{p-d892b4d4.entry.js → p-02db2116.entry.js} +2 -2
- package/dist/isometrik-webchat/p-03933431.entry.js +2 -0
- package/dist/isometrik-webchat/{p-352b589e.entry.js.map → p-03933431.entry.js.map} +1 -1
- package/dist/isometrik-webchat/{p-c591fa45.js → p-04fdbd0a.js} +2 -2
- package/dist/isometrik-webchat/p-0bb42151.entry.js +2 -0
- package/dist/isometrik-webchat/p-0bb42151.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-c5bff6a1.entry.js → p-119fc683.entry.js} +2 -2
- package/dist/isometrik-webchat/p-19d37e1f.js +2 -0
- package/dist/isometrik-webchat/p-19d37e1f.js.map +1 -0
- package/dist/isometrik-webchat/{p-925decda.js → p-1dc52239.js} +2 -2
- package/dist/isometrik-webchat/p-1f0e8230.entry.js +2 -0
- package/dist/isometrik-webchat/p-1f0e8230.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-7b25f234.entry.js → p-35f2b9ae.entry.js} +2 -2
- package/dist/isometrik-webchat/p-3a0409fc.js +2 -0
- package/dist/isometrik-webchat/p-3a0409fc.js.map +1 -0
- package/dist/isometrik-webchat/{p-9982fa21.js → p-3dca1e56.js} +2 -2
- package/dist/isometrik-webchat/p-3dca1e56.js.map +1 -0
- package/dist/isometrik-webchat/p-40217f22.js +2 -0
- package/dist/isometrik-webchat/p-40217f22.js.map +1 -0
- package/dist/isometrik-webchat/{p-3b3dc33e.js → p-46be73c5.js} +2 -2
- package/dist/isometrik-webchat/p-56521ea4.entry.js +2 -0
- package/dist/isometrik-webchat/{p-f7d05551.entry.js → p-57f97cef.entry.js} +2 -2
- package/dist/isometrik-webchat/p-5f7eebbf.entry.js +2 -0
- package/dist/isometrik-webchat/p-605cb14e.entry.js +2 -0
- package/dist/isometrik-webchat/p-605cb14e.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-640e2c03.entry.js +2 -0
- package/dist/isometrik-webchat/p-69d953cb.entry.js +2 -0
- package/dist/isometrik-webchat/p-69d953cb.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-6c5eb178.js +2 -0
- package/dist/isometrik-webchat/{p-d8b65cf4.entry.js → p-6eadaa6c.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-161fcb35.entry.js → p-7130f547.entry.js} +2 -2
- package/dist/isometrik-webchat/p-782d1bd2.js +2 -0
- package/dist/isometrik-webchat/p-782d1bd2.js.map +1 -0
- package/dist/isometrik-webchat/p-8142a54d.js +2 -0
- package/dist/isometrik-webchat/p-8142a54d.js.map +1 -0
- package/dist/isometrik-webchat/{p-cbb1179b.entry.js → p-89a8fc58.entry.js} +2 -2
- package/dist/isometrik-webchat/p-8f17345f.js +7 -0
- package/dist/isometrik-webchat/p-8f17345f.js.map +1 -0
- package/dist/isometrik-webchat/p-991d5437.js +2 -0
- package/dist/isometrik-webchat/p-991d5437.js.map +1 -0
- package/dist/isometrik-webchat/p-9b70e93f.entry.js +2 -0
- package/dist/isometrik-webchat/p-a5faa465.entry.js +2 -0
- package/dist/isometrik-webchat/p-a5faa465.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-a83932d4.js +2 -0
- package/dist/isometrik-webchat/p-a83932d4.js.map +1 -0
- package/dist/isometrik-webchat/p-b0f6f9ab.entry.js +2 -0
- package/dist/isometrik-webchat/p-b0f6f9ab.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-3664e0ad.entry.js → p-b431d864.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-0ccfbe90.entry.js → p-b516938b.entry.js} +2 -2
- package/dist/isometrik-webchat/p-be09cdc8.js +2 -0
- package/dist/isometrik-webchat/p-be09cdc8.js.map +1 -0
- package/dist/isometrik-webchat/{p-5b965e04.js → p-c4b7babb.js} +2 -2
- package/dist/isometrik-webchat/{p-5b965e04.js.map → p-c4b7babb.js.map} +1 -1
- package/dist/isometrik-webchat/p-d0f6679d.entry.js +2 -0
- package/dist/isometrik-webchat/p-d0f6679d.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-d44c612a.entry.js +2 -0
- package/dist/isometrik-webchat/p-dc963574.entry.js +2 -0
- package/dist/isometrik-webchat/{p-5d1877d1.entry.js.map → p-dc963574.entry.js.map} +1 -1
- package/dist/isometrik-webchat/p-eb1f3118.entry.js +2 -0
- package/dist/isometrik-webchat/p-f18fa23d.js +2 -0
- package/dist/isometrik-webchat/p-f18fa23d.js.map +1 -0
- package/dist/isometrik-webchat/{p-08ba6153.entry.js → p-f5502a63.entry.js} +2 -2
- package/dist/types/components/ChatUIComponent/ChatOwnProfile/Profile.d.ts +2 -0
- package/dist/types/components/ChatUIComponent/ChatSidebar/ChatSidebar.d.ts +10 -0
- package/dist/types/components/ChatUIComponent/Footer/ChatFooter.d.ts +3 -0
- package/dist/types/components/ChatUIComponent/Header/WebChatHeader.d.ts +3 -0
- package/dist/types/components/ChatUIComponent/WebChatBody/WebChatBody.d.ts +5 -0
- package/dist/types/components/ChatUIComponent/shared/ForwardMessageList/ForwardMessageList.d.ts +5 -2
- package/dist/types/components/ChatUIComponent/shared/chat-tile/chat-tile.d.ts +4 -1
- package/dist/types/components/ChatUIComponent/shared/contact-info/contact-info.d.ts +8 -22
- package/dist/types/components/ChatUIComponent/shared/image-message/image-message.d.ts +5 -0
- package/dist/types/components/ChatUIComponent/shared/info-panel-media/info-panel-media.d.ts +45 -0
- package/dist/types/components/ChatUIComponent/shared/media-gallery/media-gallery.d.ts +1 -0
- package/dist/types/components/ChatUIComponent/shared/profile-info/profile-info.d.ts +8 -0
- package/dist/types/components/ChatUIComponent/shared/reply-message-container/reply-message-container.d.ts +3 -0
- package/dist/types/components/ChatUIComponent/shared/storage/storage-manager.d.ts +17 -0
- package/dist/types/components/ChatUIComponent/shared/video-message/video-message.d.ts +3 -0
- package/dist/types/components/my-component/web-chat/WebChat.d.ts +22 -0
- package/dist/types/components/my-component/web-chat/WebchatRightSide.d.ts +7 -0
- package/dist/types/components/my-component/web-chat/conversation-ops.d.ts +10 -2
- package/dist/types/components/my-component/web-chat/event-handlers.d.ts +5 -0
- package/dist/types/components/my-component/web-chat/mutations.d.ts +2 -2
- package/dist/types/components.d.ts +133 -2
- package/dist/types/lib/chat/block-status.d.ts +11 -0
- package/dist/types/lib/chat/clipboard-paste.d.ts +16 -0
- package/dist/types/lib/chat/download-media.d.ts +11 -0
- package/dist/types/lib/chat/index.d.ts +6 -2
- package/dist/types/lib/chat/same-name-upload.d.ts +24 -0
- package/dist/types/lib/chat/send-media.d.ts +90 -0
- package/dist/types/lib/chat/storage-quota.d.ts +98 -0
- package/dist/types/lib/custom-ui/public-api.d.ts +1 -1
- package/dist/types/lib/drawer.d.ts +1 -0
- package/dist/types/sdk/headless-api.d.ts +7 -0
- package/dist/types/sdk/index.d.ts +1 -0
- package/dist/types/sdk/webchat-api.d.ts +14 -0
- package/dist/types/store/storage-quota.d.ts +64 -0
- package/docs/MEDIA_STORAGE_QUOTA.md +130 -0
- package/package.json +3 -2
- package/dist/cjs/attachment-preview_22.cjs.entry.js.map +0 -1
- package/dist/cjs/content-ebca062a.js.map +0 -1
- package/dist/cjs/drawer-00a2323a.js.map +0 -1
- package/dist/cjs/group-members-cef1198e.js.map +0 -1
- package/dist/cjs/groupcast-8441b4df.js.map +0 -1
- package/dist/cjs/helpers-154861e9.js.map +0 -1
- package/dist/cjs/link-preview.cjs.entry.js +0 -49
- package/dist/cjs/link-preview.cjs.entry.js.map +0 -1
- package/dist/cjs/local-notification-bdd04d7a.js.map +0 -1
- package/dist/cjs/runtime-controls-cfc8fc31.js.map +0 -1
- package/dist/cjs/send-media-4ee967d4.js.map +0 -1
- package/dist/components/group-members2.js +0 -37
- package/dist/components/group-members2.js.map +0 -1
- package/dist/esm/attachment-preview_22.entry.js.map +0 -1
- package/dist/esm/content-fb138a93.js.map +0 -1
- package/dist/esm/drawer-7de04622.js.map +0 -1
- package/dist/esm/group-members-7909941c.js.map +0 -1
- package/dist/esm/groupcast-5fb19ec3.js.map +0 -1
- package/dist/esm/helpers-f33b895c.js.map +0 -1
- package/dist/esm/link-preview.entry.js +0 -45
- package/dist/esm/link-preview.entry.js.map +0 -1
- package/dist/esm/local-notification-4c1e166d.js.map +0 -1
- package/dist/esm/runtime-controls-ff81e90a.js.map +0 -1
- package/dist/esm/send-media-58e7145b.js.map +0 -1
- package/dist/isometrik-webchat/p-09980c53.entry.js +0 -2
- package/dist/isometrik-webchat/p-09980c53.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-1eecc7c5.entry.js +0 -2
- package/dist/isometrik-webchat/p-1eecc7c5.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-2cf296e6.entry.js +0 -2
- package/dist/isometrik-webchat/p-2e9974e1.entry.js +0 -2
- package/dist/isometrik-webchat/p-343f50b4.js +0 -7
- package/dist/isometrik-webchat/p-343f50b4.js.map +0 -1
- package/dist/isometrik-webchat/p-352b589e.entry.js +0 -2
- package/dist/isometrik-webchat/p-44da28d3.entry.js +0 -2
- package/dist/isometrik-webchat/p-44da28d3.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-48ce4dca.entry.js +0 -2
- package/dist/isometrik-webchat/p-52a575c0.entry.js +0 -2
- package/dist/isometrik-webchat/p-52a575c0.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-5cfb953d.js +0 -2
- package/dist/isometrik-webchat/p-5cfb953d.js.map +0 -1
- package/dist/isometrik-webchat/p-5d1877d1.entry.js +0 -2
- package/dist/isometrik-webchat/p-6f5037b2.js +0 -2
- package/dist/isometrik-webchat/p-6f5037b2.js.map +0 -1
- package/dist/isometrik-webchat/p-78fb47c4.js +0 -2
- package/dist/isometrik-webchat/p-78fb47c4.js.map +0 -1
- package/dist/isometrik-webchat/p-9982fa21.js.map +0 -1
- package/dist/isometrik-webchat/p-a9efcf1c.entry.js +0 -2
- package/dist/isometrik-webchat/p-a9efcf1c.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-ad02a8ca.entry.js +0 -2
- package/dist/isometrik-webchat/p-b0baa9ad.entry.js +0 -2
- package/dist/isometrik-webchat/p-b0baa9ad.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-b385ac4b.js +0 -2
- package/dist/isometrik-webchat/p-b385ac4b.js.map +0 -1
- package/dist/isometrik-webchat/p-c83e2d5d.entry.js +0 -2
- package/dist/isometrik-webchat/p-d758e431.js +0 -2
- package/dist/isometrik-webchat/p-d864bb9f.entry.js +0 -2
- package/dist/isometrik-webchat/p-d864bb9f.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-dab06d54.js +0 -2
- package/dist/isometrik-webchat/p-dab06d54.js.map +0 -1
- package/dist/isometrik-webchat/p-e40e8866.js +0 -2
- package/dist/isometrik-webchat/p-e40e8866.js.map +0 -1
- package/dist/isometrik-webchat/p-e48a1217.entry.js +0 -2
- /package/dist/isometrik-webchat/{p-d892b4d4.entry.js.map → p-02db2116.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-c591fa45.js.map → p-04fdbd0a.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-c5bff6a1.entry.js.map → p-119fc683.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-925decda.js.map → p-1dc52239.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-7b25f234.entry.js.map → p-35f2b9ae.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-3b3dc33e.js.map → p-46be73c5.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-2cf296e6.entry.js.map → p-56521ea4.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-f7d05551.entry.js.map → p-57f97cef.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-ad02a8ca.entry.js.map → p-5f7eebbf.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-c83e2d5d.entry.js.map → p-640e2c03.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-d758e431.js.map → p-6c5eb178.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-d8b65cf4.entry.js.map → p-6eadaa6c.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-161fcb35.entry.js.map → p-7130f547.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-cbb1179b.entry.js.map → p-89a8fc58.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-e48a1217.entry.js.map → p-9b70e93f.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-3664e0ad.entry.js.map → p-b431d864.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-0ccfbe90.entry.js.map → p-b516938b.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-48ce4dca.entry.js.map → p-d44c612a.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-2e9974e1.entry.js.map → p-eb1f3118.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-08ba6153.entry.js.map → p-f5502a63.entry.js.map} +0 -0
|
@@ -436,14 +436,86 @@ function roundRect(ctx, x, y, width, height, radius) {
|
|
|
436
436
|
}
|
|
437
437
|
|
|
438
438
|
/**
|
|
439
|
-
*
|
|
440
|
-
* Conversation path only (groupcast keeps using ChatFooter).
|
|
439
|
+
* Same-name storage upload UX (quota feature).
|
|
441
440
|
*
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
*
|
|
441
|
+
* Contract: see SAME_NAME_UPLOAD_FRONTEND.md in product docs — presign returns
|
|
442
|
+
* `duplicate: true` without PUT URLs; user picks reshare vs `forceUpload: true`.
|
|
443
|
+
* Reused from send-media.ts, ChatFooter, and uploadAndPostMediaMessage.
|
|
445
444
|
*/
|
|
445
|
+
const SAME_NAME_UPLOAD_WARNING = 'A file with the same name is already in your storage.';
|
|
446
|
+
class SameNameUploadCancelledError extends Error {
|
|
447
|
+
constructor(message = 'Same-name upload cancelled') {
|
|
448
|
+
super(message);
|
|
449
|
+
this.name = 'SameNameUploadCancelledError';
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
function isSameNameUploadCancelledError(err) {
|
|
453
|
+
return err instanceof SameNameUploadCancelledError;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Modal: primary = new copy (forceUpload path), secondary = reshare older file.
|
|
457
|
+
* Drawer dismiss → cancel (caller removes optimistic message).
|
|
458
|
+
*
|
|
459
|
+
* Dynamic-imports drawer so unit tests that import send-media do not load Stencil shells.
|
|
460
|
+
*/
|
|
461
|
+
function promptSameNameUpload(args) {
|
|
462
|
+
const { fileName, warning } = args;
|
|
463
|
+
const description = (warning === null || warning === void 0 ? void 0 : warning.trim()) || `“${fileName}”\n\n${SAME_NAME_UPLOAD_WARNING}`;
|
|
464
|
+
return import('./drawer.js').then(({ drawerDialogService }) => {
|
|
465
|
+
return new Promise(resolve => {
|
|
466
|
+
const finish = (choice) => {
|
|
467
|
+
drawerDialogService.closeDialog('confirm-dialog');
|
|
468
|
+
resolve(choice);
|
|
469
|
+
};
|
|
470
|
+
let settled = false;
|
|
471
|
+
const settle = (choice) => {
|
|
472
|
+
if (settled)
|
|
473
|
+
return;
|
|
474
|
+
settled = true;
|
|
475
|
+
finish(choice);
|
|
476
|
+
};
|
|
477
|
+
drawerDialogService.openDialog('confirm-dialog', {
|
|
478
|
+
title: 'File already in storage',
|
|
479
|
+
description,
|
|
480
|
+
yesText: 'Upload a copy',
|
|
481
|
+
noText: 'Reshare older file',
|
|
482
|
+
handleConfirm: () => settle('forceUpload'),
|
|
483
|
+
handleCancel: () => settle('reshare'),
|
|
484
|
+
// Overlay / × close (drawer.ts calls onDismiss) → cancel send.
|
|
485
|
+
onDismiss: () => settle('cancel'),
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
492
|
+
var t = {};
|
|
493
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
494
|
+
t[p] = s[p];
|
|
495
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
496
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
497
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
498
|
+
t[p[i]] = s[p[i]];
|
|
499
|
+
}
|
|
500
|
+
return t;
|
|
501
|
+
};
|
|
446
502
|
const ATTACHMENT_BODY_PLACEHOLDER = 'AttachmentMessage:Multiple';
|
|
503
|
+
const DOCUMENT_ATTACHMENT_CUSTOM_TYPES = new Set(['AttachmentMessage:Doc', 'AttachmentMessage:File']);
|
|
504
|
+
/** Display/download filename on an attachment record (API may use `name` or `nameWithExtension`). */
|
|
505
|
+
function attachmentFileLabel(attachment) {
|
|
506
|
+
var _a, _b;
|
|
507
|
+
return String((_b = (_a = attachment === null || attachment === void 0 ? void 0 : attachment.name) !== null && _a !== void 0 ? _a : attachment === null || attachment === void 0 ? void 0 : attachment.nameWithExtension) !== null && _b !== void 0 ? _b : '').trim();
|
|
508
|
+
}
|
|
509
|
+
function labelsEqual(a, b) {
|
|
510
|
+
return a.localeCompare(b, undefined, { sensitivity: 'accent' }) === 0;
|
|
511
|
+
}
|
|
512
|
+
function attachmentFileLabels(attachments) {
|
|
513
|
+
return (attachments || []).map(a => attachmentFileLabel(a)).filter(Boolean);
|
|
514
|
+
}
|
|
515
|
+
/** Filename-only API body for a single document (e.g. `report.pdf`). */
|
|
516
|
+
function bodyLooksLikeStandaloneFileName(body) {
|
|
517
|
+
return /^[^\s/\\]+\.[^\s.]+$/i.test(body);
|
|
518
|
+
}
|
|
447
519
|
function mediaTypeFromMime(mime) {
|
|
448
520
|
if (!mime)
|
|
449
521
|
return 3;
|
|
@@ -477,8 +549,12 @@ function attachmentCaption(message) {
|
|
|
477
549
|
var _a, _b, _c, _d;
|
|
478
550
|
const meta = message === null || message === void 0 ? void 0 : message.metaData;
|
|
479
551
|
const fromMeta = String((_b = (_a = meta === null || meta === void 0 ? void 0 : meta.caption) !== null && _a !== void 0 ? _a : meta === null || meta === void 0 ? void 0 : meta.captionMessage) !== null && _b !== void 0 ? _b : '').trim();
|
|
480
|
-
|
|
552
|
+
const labels = attachmentFileLabels(message === null || message === void 0 ? void 0 : message.attachments);
|
|
553
|
+
if (fromMeta) {
|
|
554
|
+
if (labels.some(l => labelsEqual(l, fromMeta)))
|
|
555
|
+
return '';
|
|
481
556
|
return fromMeta;
|
|
557
|
+
}
|
|
482
558
|
const body = String((_c = message === null || message === void 0 ? void 0 : message.body) !== null && _c !== void 0 ? _c : '').trim();
|
|
483
559
|
const customType = String((_d = message === null || message === void 0 ? void 0 : message.customType) !== null && _d !== void 0 ? _d : '').trim();
|
|
484
560
|
// Multiple attachments: real caption lives in metaData only (Flutter/Swift/web); never use body text
|
|
@@ -486,8 +562,26 @@ function attachmentCaption(message) {
|
|
|
486
562
|
return '';
|
|
487
563
|
if (isAttachmentBodyPlaceholder(body))
|
|
488
564
|
return '';
|
|
565
|
+
// Single doc without caption: body is the filename for the API — already shown on the card
|
|
566
|
+
if (labels.some(l => labelsEqual(l, body)))
|
|
567
|
+
return '';
|
|
568
|
+
if (DOCUMENT_ATTACHMENT_CUSTOM_TYPES.has(customType) &&
|
|
569
|
+
bodyLooksLikeStandaloneFileName(body) &&
|
|
570
|
+
labels.length <= 1) {
|
|
571
|
+
return '';
|
|
572
|
+
}
|
|
489
573
|
return body;
|
|
490
574
|
}
|
|
575
|
+
/** Document bubble caption — drop text that only repeats the attachment filename. */
|
|
576
|
+
function suppressDuplicateFileCaption(caption, attachment) {
|
|
577
|
+
const text = String(caption !== null && caption !== void 0 ? caption : '').trim();
|
|
578
|
+
if (!text)
|
|
579
|
+
return '';
|
|
580
|
+
const label = attachmentFileLabel(attachment);
|
|
581
|
+
if (label && labelsEqual(text, label))
|
|
582
|
+
return '';
|
|
583
|
+
return text;
|
|
584
|
+
}
|
|
491
585
|
/** @deprecated Prefer attachmentBodyForOutgoing — kept for callers that only pass caption. */
|
|
492
586
|
function attachmentBodyForApi(caption) {
|
|
493
587
|
return (caption === null || caption === void 0 ? void 0 : caption.trim()) || ATTACHMENT_BODY_PLACEHOLDER;
|
|
@@ -643,6 +737,142 @@ function buildLocalMediaAttachments(files) {
|
|
|
643
737
|
};
|
|
644
738
|
});
|
|
645
739
|
}
|
|
740
|
+
function isPresignDuplicateSlot(slot) {
|
|
741
|
+
return (slot === null || slot === void 0 ? void 0 : slot.duplicate) === true;
|
|
742
|
+
}
|
|
743
|
+
function presignedSlotsByMediaId(slots) {
|
|
744
|
+
const map = new Map();
|
|
745
|
+
for (const slot of slots || []) {
|
|
746
|
+
if ((slot === null || slot === void 0 ? void 0 : slot.mediaId) != null)
|
|
747
|
+
map.set(String(slot.mediaId), slot);
|
|
748
|
+
}
|
|
749
|
+
return map;
|
|
750
|
+
}
|
|
751
|
+
function presignRequestAttachments(attachments, forceUploadMediaIds) {
|
|
752
|
+
return attachments.map(a => (Object.assign({ mediaId: a.mediaId, mediaType: a.mediaType, nameWithExtension: a.nameWithExtension }, ((forceUploadMediaIds === null || forceUploadMediaIds === void 0 ? void 0 : forceUploadMediaIds.has(a.mediaId)) ? { forceUpload: true } : {}))));
|
|
753
|
+
}
|
|
754
|
+
async function fetchPresignedUrlSlots(conversationId, attachments, forceUploadMediaIds) {
|
|
755
|
+
const res = await M.getInstance().message.postMessagesPresignedurls({
|
|
756
|
+
conversationId,
|
|
757
|
+
attachments: presignRequestAttachments(attachments, forceUploadMediaIds),
|
|
758
|
+
});
|
|
759
|
+
const presignedUrls = (res === null || res === void 0 ? void 0 : res.presignedUrls)
|
|
760
|
+
? res.presignedUrls
|
|
761
|
+
: (res === null || res === void 0 ? void 0 : res.presignedUrl)
|
|
762
|
+
? [res]
|
|
763
|
+
: null;
|
|
764
|
+
if (!(presignedUrls === null || presignedUrls === void 0 ? void 0 : presignedUrls.length)) {
|
|
765
|
+
throw new Error('No presigned URLs returned for media upload');
|
|
766
|
+
}
|
|
767
|
+
return presignedUrls;
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Build message attachment for reshare after `duplicate: true` — no PUT.
|
|
771
|
+
* Presign request uses client `attachment.mediaId` to match the slot; POST /chat/message
|
|
772
|
+
* must use `slot.existingMediaId` so the server reuses the stored object (0 quota bytes).
|
|
773
|
+
*/
|
|
774
|
+
function buildReshareAttachmentPayload(slot, attachment) {
|
|
775
|
+
const mediaUrl = String(slot.mediaUrl || '');
|
|
776
|
+
if (!mediaUrl) {
|
|
777
|
+
throw new Error('Duplicate file response missing mediaUrl');
|
|
778
|
+
}
|
|
779
|
+
const existingMediaId = String(slot.existingMediaId || '').trim();
|
|
780
|
+
if (!existingMediaId) {
|
|
781
|
+
throw new Error('Duplicate file response missing existingMediaId');
|
|
782
|
+
}
|
|
783
|
+
const isPdf = isPdfFileAttachment(attachment);
|
|
784
|
+
const isOffice = isOfficeFileAttachment(attachment);
|
|
785
|
+
const needsImageThumb = isPdf || isOffice;
|
|
786
|
+
const thumbnailUrl = needsImageThumb
|
|
787
|
+
? documentThumbnailUrl({ mediaUrl, thumbnailUrl: slot.thumbnailUrl })
|
|
788
|
+
: String(slot.thumbnailUrl || mediaUrl);
|
|
789
|
+
const fileExt = extensionFromFileName(attachment.nameWithExtension);
|
|
790
|
+
return {
|
|
791
|
+
mediaId: existingMediaId,
|
|
792
|
+
mediaUrl,
|
|
793
|
+
thumbnailUrl,
|
|
794
|
+
mediaType: attachment.mediaType,
|
|
795
|
+
nameWithExtension: attachment.nameWithExtension,
|
|
796
|
+
name: attachment.nameWithExtension,
|
|
797
|
+
mimeType: attachment.mimeType,
|
|
798
|
+
extension: fileExt,
|
|
799
|
+
size: attachment.size,
|
|
800
|
+
attachmentType: attachment.mediaType,
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
function mapOutgoingAttachmentsForApi(payloads) {
|
|
804
|
+
return payloads.map(p => {
|
|
805
|
+
if (p.forceUpload) {
|
|
806
|
+
const rest = __rest(p, ["forceUpload"]);
|
|
807
|
+
return Object.assign(Object.assign({}, rest), { forceUpload: true });
|
|
808
|
+
}
|
|
809
|
+
const rest = __rest(p, ["forceUpload"]);
|
|
810
|
+
return rest;
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* Presign → (optional same-name prompt) → PUT or reshare → payloads for postMessages.
|
|
815
|
+
* Processes duplicates sequentially so the user can choose per file.
|
|
816
|
+
*/
|
|
817
|
+
async function resolveAttachmentPayloads(args) {
|
|
818
|
+
var _a, _b, _c, _d;
|
|
819
|
+
const { conversationId, attachments, renderPdfThumbnail, renderOfficeThumbnail } = args;
|
|
820
|
+
const prompt = (_a = args.sameNameUploadPrompt) !== null && _a !== void 0 ? _a : promptSameNameUpload;
|
|
821
|
+
const slots = (_b = args.presignedSlots) !== null && _b !== void 0 ? _b : (await fetchPresignedUrlSlots(conversationId, attachments));
|
|
822
|
+
const slotById = presignedSlotsByMediaId(slots);
|
|
823
|
+
const payloads = [];
|
|
824
|
+
for (let index = 0; index < attachments.length; index++) {
|
|
825
|
+
const attachment = attachments[index];
|
|
826
|
+
const urlDetails = (_c = slotById.get(attachment.mediaId)) !== null && _c !== void 0 ? _c : slots[index];
|
|
827
|
+
if (!urlDetails)
|
|
828
|
+
continue;
|
|
829
|
+
if (isPresignDuplicateSlot(urlDetails)) {
|
|
830
|
+
const choice = await prompt({
|
|
831
|
+
fileName: attachment.nameWithExtension,
|
|
832
|
+
warning: urlDetails.warning,
|
|
833
|
+
});
|
|
834
|
+
if (choice === 'cancel') {
|
|
835
|
+
throw new SameNameUploadCancelledError();
|
|
836
|
+
}
|
|
837
|
+
if (choice === 'reshare') {
|
|
838
|
+
payloads.push(buildReshareAttachmentPayload(urlDetails, attachment));
|
|
839
|
+
continue;
|
|
840
|
+
}
|
|
841
|
+
const forced = await fetchPresignedUrlSlots(conversationId, [attachment], new Set([attachment.mediaId]));
|
|
842
|
+
const forceSlot = (_d = presignedSlotsByMediaId(forced).get(attachment.mediaId)) !== null && _d !== void 0 ? _d : forced[0];
|
|
843
|
+
if (!forceSlot || isPresignDuplicateSlot(forceSlot)) {
|
|
844
|
+
throw new Error('Could not get upload URL for duplicate file copy');
|
|
845
|
+
}
|
|
846
|
+
const uploaded = await uploadPresignedMediaAttachment({
|
|
847
|
+
urlDetails: forceSlot,
|
|
848
|
+
attachment,
|
|
849
|
+
conversationId,
|
|
850
|
+
renderPdfThumbnail,
|
|
851
|
+
renderOfficeThumbnail,
|
|
852
|
+
});
|
|
853
|
+
if (!uploaded) {
|
|
854
|
+
throw new Error('Upload failed for duplicate file copy');
|
|
855
|
+
}
|
|
856
|
+
payloads.push(Object.assign(Object.assign({}, uploaded), { forceUpload: true }));
|
|
857
|
+
continue;
|
|
858
|
+
}
|
|
859
|
+
const uploaded = await uploadPresignedMediaAttachment({
|
|
860
|
+
urlDetails,
|
|
861
|
+
attachment,
|
|
862
|
+
conversationId,
|
|
863
|
+
renderPdfThumbnail,
|
|
864
|
+
renderOfficeThumbnail,
|
|
865
|
+
});
|
|
866
|
+
if (!uploaded) {
|
|
867
|
+
throw new Error(`Upload failed for ${attachment.nameWithExtension}`);
|
|
868
|
+
}
|
|
869
|
+
payloads.push(uploaded);
|
|
870
|
+
}
|
|
871
|
+
if (!payloads.length) {
|
|
872
|
+
throw new Error('No attachments to send');
|
|
873
|
+
}
|
|
874
|
+
return payloads;
|
|
875
|
+
}
|
|
646
876
|
/** PDF (or a file named *.pdf). The app cannot paint these bytes with Image.network. */
|
|
647
877
|
function isPdfFileAttachment(file) {
|
|
648
878
|
const mime = String((file === null || file === void 0 ? void 0 : file.mimeType) || '').toLowerCase();
|
|
@@ -860,7 +1090,7 @@ async function uploadPresignedMediaAttachment(opts) {
|
|
|
860
1090
|
if (!attachment)
|
|
861
1091
|
return null;
|
|
862
1092
|
const mediaPresignedUrl = (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaPresignedUrl) || (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.presignedUrl);
|
|
863
|
-
const mediaId = (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaId) || (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl);
|
|
1093
|
+
const mediaId = attachment.mediaId || (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaId) || (urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl);
|
|
864
1094
|
const mediaUrl = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.mediaUrl;
|
|
865
1095
|
const thumbnailPresignedUrl = urlDetails === null || urlDetails === void 0 ? void 0 : urlDetails.thumbnailPresignedUrl;
|
|
866
1096
|
const isPdf = isPdfFileAttachment(attachment);
|
|
@@ -930,35 +1160,14 @@ async function uploadPresignedMediaAttachment(opts) {
|
|
|
930
1160
|
}
|
|
931
1161
|
/** Presign → PUT files → postMessages. Returns API messageId. */
|
|
932
1162
|
async function uploadAndPostMediaMessage(args) {
|
|
933
|
-
const { conversationId, deviceId, attachments, replyMessage, caption, mentionedUsers, pushContext } = args;
|
|
1163
|
+
const { conversationId, deviceId, attachments, replyMessage, caption, mentionedUsers, pushContext, sameNameUploadPrompt, } = args;
|
|
934
1164
|
if (!conversationId || !(attachments === null || attachments === void 0 ? void 0 : attachments.length))
|
|
935
1165
|
return null;
|
|
936
|
-
const
|
|
1166
|
+
const allPayloads = await resolveAttachmentPayloads({
|
|
937
1167
|
conversationId,
|
|
938
1168
|
attachments,
|
|
1169
|
+
sameNameUploadPrompt,
|
|
939
1170
|
});
|
|
940
|
-
const presignedUrls = (resForPresignedUrl === null || resForPresignedUrl === void 0 ? void 0 : resForPresignedUrl.presignedUrls)
|
|
941
|
-
? resForPresignedUrl.presignedUrls
|
|
942
|
-
: (resForPresignedUrl === null || resForPresignedUrl === void 0 ? void 0 : resForPresignedUrl.presignedUrl)
|
|
943
|
-
? [resForPresignedUrl]
|
|
944
|
-
: null;
|
|
945
|
-
if (!(presignedUrls === null || presignedUrls === void 0 ? void 0 : presignedUrls.length)) {
|
|
946
|
-
throw new Error('No presigned URLs returned for media upload');
|
|
947
|
-
}
|
|
948
|
-
/** Typed array so `postMessages` payload is not `any[]` (strict noImplicitAny). */
|
|
949
|
-
const allPayloads = [];
|
|
950
|
-
await Promise.all(presignedUrls.map(async (urlDetails, index) => {
|
|
951
|
-
const attachmentPayload = attachments[index];
|
|
952
|
-
if (!attachmentPayload)
|
|
953
|
-
return;
|
|
954
|
-
const payload = await uploadPresignedMediaAttachment({
|
|
955
|
-
urlDetails,
|
|
956
|
-
attachment: attachmentPayload,
|
|
957
|
-
conversationId,
|
|
958
|
-
});
|
|
959
|
-
if (payload)
|
|
960
|
-
allPayloads.push(payload);
|
|
961
|
-
}));
|
|
962
1171
|
const customType = resolveCustomTypeForUpload(attachments);
|
|
963
1172
|
const payload = {
|
|
964
1173
|
showInConversation: true,
|
|
@@ -968,7 +1177,7 @@ async function uploadAndPostMediaMessage(args) {
|
|
|
968
1177
|
conversationId,
|
|
969
1178
|
body: attachmentBodyForOutgoing(caption, attachments),
|
|
970
1179
|
customType,
|
|
971
|
-
attachments: allPayloads,
|
|
1180
|
+
attachments: mapOutgoingAttachmentsForApi(allPayloads),
|
|
972
1181
|
deviceId,
|
|
973
1182
|
metaData: buildReplyMetaData(replyMessage, caption),
|
|
974
1183
|
};
|
|
@@ -979,6 +1188,6 @@ async function uploadAndPostMediaMessage(args) {
|
|
|
979
1188
|
return (sendMessageRes === null || sendMessageRes === void 0 ? void 0 : sendMessageRes.messageId) || null;
|
|
980
1189
|
}
|
|
981
1190
|
|
|
982
|
-
export { ATTACHMENT_BODY_PLACEHOLDER as A, attachmentBodyForApi as a, buildReplyMetaData as b, customTypeFromMime as c,
|
|
1191
|
+
export { ATTACHMENT_BODY_PLACEHOLDER as A, attachmentBodyForApi as a, buildReplyMetaData as b, customTypeFromMime as c, isSameNameUploadCancelledError as d, buildLocalMediaAttachments as e, attachmentBodyForOutgoing as f, presignedSlotsByMediaId as g, uploadPresignedMediaAttachment as h, isAttachmentBodyPlaceholder as i, resolveAttachmentPayloads as j, mapOutgoingAttachmentsForApi as k, isPresignDuplicateSlot as l, mediaTypeFromMime as m, attachmentCaption as n, attachmentFileLabel as o, prepareMediaAttachments as p, resolveCustomTypeForUpload as r, suppressDuplicateFileCaption as s, uploadAndPostMediaMessage as u };
|
|
983
1192
|
|
|
984
1193
|
//# sourceMappingURL=send-media.js.map
|