isometrik-plugin-chat-sdk 1.3.19 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-61a8bfde.js +38 -0
- package/dist/cjs/app-globals-61a8bfde.js.map +1 -0
- package/dist/cjs/attachment-preview_22.cjs.entry.js +122 -44
- package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
- package/dist/cjs/audio-bubble_4.cjs.entry.js +38 -8
- package/dist/cjs/audio-bubble_4.cjs.entry.js.map +1 -1
- package/dist/cjs/chat-app.cjs.entry.js +2 -2
- package/dist/cjs/chat-app.cjs.entry.js.map +1 -1
- package/dist/cjs/{chat-creds-cf537d4b.js → chat-creds-2dbc4087.js} +3 -3
- package/dist/cjs/chat-creds-2dbc4087.js.map +1 -0
- 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/client-80851676.js +482 -0
- package/dist/cjs/client-80851676.js.map +1 -0
- package/dist/cjs/{contracts-31632812.js → contracts-dfc84075.js} +2 -2
- package/dist/cjs/contracts-dfc84075.js.map +1 -0
- package/dist/cjs/destroy-chat-7ae8fc99.js +24 -0
- package/dist/cjs/destroy-chat-7ae8fc99.js.map +1 -0
- package/dist/cjs/doublecheck-c2461adc.js +36 -0
- package/dist/cjs/doublecheck-c2461adc.js.map +1 -0
- package/dist/cjs/{drawer-28cc94a4.js → drawer-811d2ce8.js} +2 -2
- package/dist/cjs/{drawer-28cc94a4.js.map → drawer-811d2ce8.js.map} +1 -1
- package/dist/cjs/forward-memebers.cjs.entry.js +2 -2
- 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-73ad1074.js → group-members-5a82ec8a.js} +1 -125
- package/dist/cjs/group-members-5a82ec8a.js.map +1 -0
- package/dist/cjs/{helpers-8061ec7d.js → helpers-154861e9.js} +2 -2
- package/dist/cjs/{helpers-8061ec7d.js.map → helpers-154861e9.js.map} +1 -1
- package/dist/cjs/{index-1a26d11d.js → index-66f98408.js} +2 -2
- package/dist/cjs/index-66f98408.js.map +1 -0
- package/dist/cjs/index.cjs.js +55 -182
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/isometrik-webchat.cjs.js +10 -2
- package/dist/cjs/isometrik-webchat.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +10 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/login-page_3.cjs.entry.js +689 -369
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/cjs/media-gallery.cjs.entry.js +1 -1
- package/dist/cjs/media-limits-eba42629.js +165 -0
- package/dist/cjs/media-limits-eba42629.js.map +1 -0
- package/dist/cjs/member-add.cjs.entry.js +3 -3
- package/dist/cjs/message-bubble.cjs.entry.js +30 -8
- package/dist/cjs/message-bubble.cjs.entry.js.map +1 -1
- package/dist/cjs/my-component.cjs.entry.js +1 -1
- package/dist/cjs/new-chat-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/reaction-container.cjs.entry.js +4 -4
- package/dist/cjs/runtime-controls-201c71ba.js +650 -0
- package/dist/cjs/runtime-controls-201c71ba.js.map +1 -0
- package/dist/cjs/send-media-14908d4b.js +375 -0
- package/dist/cjs/send-media-14908d4b.js.map +1 -0
- package/dist/cjs/signup-page.cjs.entry.js +1 -1
- package/dist/cjs/{toast-0bf1e688.js → toast-f810e550.js} +8 -8
- package/dist/cjs/toast-f810e550.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/ChatUIComponent/ChatDocumentMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatImageMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatVideoMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +61 -14
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/ReactionContainer.js +2 -2
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +7 -6
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/attachment-preview/attachment-preview.js +39 -8
- package/dist/collection/components/ChatUIComponent/shared/attachment-preview/attachment-preview.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/document-message/document-message.js +53 -3
- 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/image-message/image-message.js +19 -1
- 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/message-bubble/message-bubble.js +47 -7
- package/dist/collection/components/ChatUIComponent/shared/message-bubble/message-bubble.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-date-pill/message-date-pill.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/new chat/new-chat.stories.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.js +19 -1
- package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/reply-message-container/reply-message-container.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js +20 -2
- package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js.map +1 -1
- package/dist/collection/components/my-component/my-component.js +1 -1
- package/dist/collection/components/my-component/web-chat/FLOW.js +1 -1
- package/dist/collection/components/my-component/web-chat/FLOW.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/WebChat.js +113 -12
- package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/bootstrap.js +7 -0
- package/dist/collection/components/my-component/web-chat/bootstrap.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/data-fetch.js +14 -5
- package/dist/collection/components/my-component/web-chat/data-fetch.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/mqtt-host.js +133 -34
- 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 +212 -0
- package/dist/collection/components/my-component/web-chat/offline-host.js.map +1 -0
- package/dist/collection/components/my-component/web-chat/public-send.js +96 -21
- 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 +47 -28
- package/dist/collection/components/my-component/web-chat/shell-render.js.map +1 -1
- package/dist/collection/components/theme-provider.js +114 -45
- package/dist/collection/components/theme-provider.js.map +1 -1
- package/dist/collection/constants/chat-creds.js +2 -2
- package/dist/collection/demos/custom-ui-demo-elements.js +2 -2
- package/dist/collection/demos/custom-ui-demo-elements.js.map +1 -1
- package/dist/collection/global/expose-sdk.js +29 -0
- package/dist/collection/global/expose-sdk.js.map +1 -0
- package/dist/collection/index.js +10 -141
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/lib/chat/index.js +3 -0
- package/dist/collection/lib/chat/index.js.map +1 -1
- package/dist/collection/lib/chat/media-limits.js +21 -0
- package/dist/collection/lib/chat/media-limits.js.map +1 -0
- package/dist/collection/lib/chat/media-outbox.js +43 -0
- package/dist/collection/lib/chat/media-outbox.js.map +1 -0
- package/dist/collection/lib/chat/preview-kind.js +41 -0
- package/dist/collection/lib/chat/preview-kind.js.map +1 -0
- package/dist/collection/lib/chat/send-media.js +5 -2
- package/dist/collection/lib/chat/send-media.js.map +1 -1
- package/dist/collection/lib/custom-ui/contracts.js +1 -1
- package/dist/collection/lib/custom-ui/contracts.js.map +1 -1
- package/dist/collection/lib/custom-ui/index.js +1 -1
- package/dist/collection/lib/custom-ui/index.js.map +1 -1
- package/dist/collection/lib/custom-ui/public-api.js +1 -0
- package/dist/collection/lib/custom-ui/public-api.js.map +1 -1
- package/dist/collection/lib/destroy-chat.js +15 -16
- package/dist/collection/lib/destroy-chat.js.map +1 -0
- package/dist/collection/lib/mqtt/inbound-queue.js +17 -0
- package/dist/collection/lib/mqtt/inbound-queue.js.map +1 -0
- package/dist/collection/lib/mqtt/index.js +2 -1
- package/dist/collection/lib/mqtt/index.js.map +1 -1
- package/dist/collection/lib/mqtt/session.js +50 -6
- package/dist/collection/lib/mqtt/session.js.map +1 -1
- package/dist/collection/lib/offline/client.js +167 -0
- package/dist/collection/lib/offline/client.js.map +1 -0
- package/dist/collection/lib/offline/idb.js +181 -0
- package/dist/collection/lib/offline/idb.js.map +1 -0
- package/dist/collection/lib/offline/index.js +10 -0
- package/dist/collection/lib/offline/index.js.map +1 -0
- package/dist/collection/lib/offline/memory-db.js +64 -0
- package/dist/collection/lib/offline/memory-db.js.map +1 -0
- package/dist/collection/lib/offline/merge.js +24 -0
- package/dist/collection/lib/offline/merge.js.map +1 -0
- package/dist/collection/lib/offline/multitab.js +47 -0
- package/dist/collection/lib/offline/multitab.js.map +1 -0
- package/dist/collection/lib/offline/types.js +2 -0
- package/dist/collection/lib/offline/types.js.map +1 -0
- package/dist/collection/lib/toast.js +6 -6
- package/dist/collection/lib/toast.js.map +1 -1
- package/dist/collection/sdk/api.js +4 -0
- package/dist/collection/sdk/api.js.map +1 -0
- package/dist/collection/sdk/composition.js +43 -0
- package/dist/collection/sdk/composition.js.map +1 -0
- package/dist/collection/sdk/headless-api.js +37 -0
- package/dist/collection/sdk/headless-api.js.map +1 -0
- package/dist/collection/sdk/index.js +11 -0
- package/dist/collection/sdk/index.js.map +1 -0
- package/dist/collection/sdk/init.js +207 -0
- package/dist/collection/sdk/init.js.map +1 -0
- package/dist/collection/sdk/instance.js +63 -0
- package/dist/collection/sdk/instance.js.map +1 -0
- package/dist/collection/sdk/react-bridge.js +145 -0
- package/dist/collection/sdk/react-bridge.js.map +1 -0
- package/dist/collection/sdk/runtime-controls.js +54 -0
- package/dist/collection/sdk/runtime-controls.js.map +1 -0
- package/dist/collection/sdk/slots.js +57 -0
- package/dist/collection/sdk/slots.js.map +1 -0
- package/dist/collection/sdk/theme-tokens.js +99 -0
- package/dist/collection/sdk/theme-tokens.js.map +1 -0
- package/dist/collection/sdk/webchat-api.js +36 -0
- package/dist/collection/sdk/webchat-api.js.map +1 -0
- package/dist/collection/testing/chat-assets-mock.js +45 -0
- package/dist/collection/testing/chat-creds-mock.js +18 -0
- package/dist/collection/testing/emoji-picker-mock.js +2 -0
- package/dist/collection/testing/file-mock.js +1 -0
- package/dist/collection/testing/groupcast-mock.js +7 -0
- package/dist/collection/testing/helpers-mock.js +4 -0
- package/dist/collection/testing/iso-chat-sdk-mock.js +19 -0
- package/dist/collection/testing/toast-mock.js +2 -0
- package/dist/components/ChatFooter.js +62 -15
- package/dist/components/ChatFooter.js.map +1 -1
- package/dist/components/ChatSidebar.js +1 -1
- package/dist/components/{GroupCast.js → GroupCast2.js} +2 -2
- package/dist/components/GroupCast2.js.map +1 -0
- package/dist/components/WebChat.js +624 -305
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/WebChatBody.js +8 -7
- package/dist/components/WebChatBody.js.map +1 -1
- package/dist/components/attachment-preview2.js +40 -9
- package/dist/components/attachment-preview2.js.map +1 -1
- package/dist/components/chat-app.js +3 -3
- package/dist/components/chat-app.js.map +1 -1
- package/dist/components/chat-assets.js +1 -1
- package/dist/components/chat-creds.js +2 -2
- package/dist/components/chat-creds.js.map +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-tile2.js +1 -1
- package/dist/components/chat-video-message-bubble.js +1 -1
- package/dist/components/client.js +728 -0
- package/dist/components/client.js.map +1 -0
- package/dist/components/contact-info2.js +2 -117
- package/dist/components/contact-info2.js.map +1 -1
- package/dist/components/contracts.js +1 -1
- package/dist/components/contracts.js.map +1 -1
- package/dist/components/destroy-chat.js +14 -16
- package/dist/components/destroy-chat.js.map +1 -1
- package/dist/components/document-message2.js +35 -5
- package/dist/components/document-message2.js.map +1 -1
- package/dist/components/forward-message.js +2 -2
- package/dist/components/group-cast.js +1 -1
- package/dist/components/{groupcast2.js → groupcast.js} +1 -1
- package/dist/components/groupcast.js.map +1 -0
- package/dist/components/image-message2.js +3 -1
- package/dist/components/image-message2.js.map +1 -1
- package/dist/components/incoming-text-message-bubble2.js +1 -1
- package/dist/components/index.js +551 -60
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/media-limits.js +24 -0
- package/dist/components/media-limits.js.map +1 -0
- package/dist/components/member-add.js +1 -1
- package/dist/components/message-bubble2.js +31 -7
- package/dist/components/message-bubble2.js.map +1 -1
- package/dist/components/message-date-pill2.js +1 -1
- package/dist/components/messages.js +131 -0
- package/dist/components/messages.js.map +1 -0
- package/dist/components/my-component.js +1 -1
- package/dist/components/outgoing-text-message-bubble2.js +3 -1
- package/dist/components/outgoing-text-message-bubble2.js.map +1 -1
- package/dist/components/preview-kind.js +30 -0
- package/dist/components/preview-kind.js.map +1 -0
- package/dist/components/reaction-container.js +2 -2
- package/dist/components/reply-message-container2.js +1 -1
- package/dist/components/theme-provider2.js +56 -44
- package/dist/components/theme-provider2.js.map +1 -1
- package/dist/components/theme-tokens.js +102 -0
- package/dist/components/theme-tokens.js.map +1 -0
- package/dist/components/toast.js +6 -6
- package/dist/components/toast.js.map +1 -1
- package/dist/components/video-message2.js +4 -2
- package/dist/components/video-message2.js.map +1 -1
- package/dist/esm/app-globals-2beecb81.js +36 -0
- package/dist/esm/app-globals-2beecb81.js.map +1 -0
- package/dist/esm/attachment-preview_22.entry.js +120 -42
- package/dist/esm/attachment-preview_22.entry.js.map +1 -1
- package/dist/esm/audio-bubble_4.entry.js +39 -9
- package/dist/esm/audio-bubble_4.entry.js.map +1 -1
- package/dist/esm/chat-app.entry.js +2 -2
- package/dist/esm/chat-app.entry.js.map +1 -1
- package/dist/esm/{chat-assets-e3173222.js → chat-assets-bb056958.js} +2 -2
- package/dist/esm/{chat-assets-e3173222.js.map → chat-assets-bb056958.js.map} +1 -1
- package/dist/esm/{chat-creds-5d0982fc.js → chat-creds-aafad4d0.js} +3 -3
- package/dist/esm/chat-creds-aafad4d0.js.map +1 -0
- 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 +1 -1
- package/dist/esm/chat-video-message-bubble.entry.js +1 -1
- package/dist/esm/client-4a3e00da.js +477 -0
- package/dist/esm/client-4a3e00da.js.map +1 -0
- package/dist/esm/{contracts-614be4db.js → contracts-50f4ddae.js} +2 -2
- package/dist/esm/contracts-50f4ddae.js.map +1 -0
- package/dist/esm/destroy-chat-d0ee28d6.js +22 -0
- package/dist/esm/destroy-chat-d0ee28d6.js.map +1 -0
- package/dist/esm/doublecheck-261763ef.js +32 -0
- package/dist/esm/doublecheck-261763ef.js.map +1 -0
- package/dist/esm/{drawer-8f721119.js → drawer-74c188f1.js} +2 -2
- package/dist/esm/{drawer-8f721119.js.map → drawer-74c188f1.js.map} +1 -1
- package/dist/esm/forward-memebers.entry.js +3 -3
- package/dist/esm/forward-message.entry.js +2 -2
- package/dist/esm/group-chat-contacts.entry.js +2 -2
- package/dist/esm/{group-members-806fd7a2.js → group-members-05414da2.js} +2 -118
- package/dist/esm/group-members-05414da2.js.map +1 -0
- package/dist/esm/{groupcast-2ce7187f.js → groupcast-9c7d2a32.js} +2 -2
- package/dist/esm/{groupcast-2ce7187f.js.map → groupcast-9c7d2a32.js.map} +1 -1
- package/dist/esm/{helpers-4c6d09a7.js → helpers-f33b895c.js} +2 -2
- package/dist/esm/{helpers-4c6d09a7.js.map → helpers-f33b895c.js.map} +1 -1
- package/dist/esm/{index-beb184c6.js → index-4c865e34.js} +2 -2
- package/dist/esm/index-4c865e34.js.map +1 -0
- package/dist/esm/index.js +17 -171
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/isometrik-webchat.js +10 -2
- package/dist/esm/isometrik-webchat.js.map +1 -1
- package/dist/esm/loader.js +10 -2
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/login-page_3.entry.js +672 -352
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/esm/media-gallery.entry.js +1 -1
- package/dist/esm/media-limits-3fa07c09.js +152 -0
- package/dist/esm/media-limits-3fa07c09.js.map +1 -0
- package/dist/esm/member-add.entry.js +5 -5
- package/dist/esm/message-bubble.entry.js +30 -8
- package/dist/esm/message-bubble.entry.js.map +1 -1
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/new-chat-sidebar.entry.js +3 -3
- package/dist/esm/reaction-container.entry.js +4 -4
- package/dist/esm/runtime-controls-cf599fe2.js +623 -0
- package/dist/esm/runtime-controls-cf599fe2.js.map +1 -0
- package/dist/esm/send-media-917dcc2f.js +353 -0
- package/dist/esm/send-media-917dcc2f.js.map +1 -0
- package/dist/esm/signup-page.entry.js +1 -1
- package/dist/esm/{toast-d8ea763c.js → toast-533dd183.js} +8 -8
- package/dist/esm/toast-533dd183.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.css +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-0731d488.js +2 -0
- package/dist/isometrik-webchat/p-0731d488.js.map +1 -0
- package/dist/isometrik-webchat/{p-a15092d9.entry.js → p-1854b156.entry.js} +2 -2
- package/dist/isometrik-webchat/p-1854b156.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-5fea3fd2.entry.js → p-2d3e8cd4.entry.js} +2 -2
- package/dist/isometrik-webchat/p-315eee9a.js +2 -0
- package/dist/isometrik-webchat/p-315eee9a.js.map +1 -0
- package/dist/isometrik-webchat/{p-e7f58d3f.entry.js → p-39b626ed.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-eb1f3118.entry.js → p-3c70c22c.entry.js} +2 -2
- package/dist/isometrik-webchat/p-4cb54460.js +2 -0
- package/dist/isometrik-webchat/p-4cb54460.js.map +1 -0
- package/dist/isometrik-webchat/{p-f24cdbbb.js → p-5162774c.js} +1 -1
- package/dist/isometrik-webchat/p-5162774c.js.map +1 -0
- package/dist/isometrik-webchat/p-53ee98a7.entry.js +2 -0
- package/dist/isometrik-webchat/p-53ee98a7.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-5cbc1a16.entry.js → p-586f6978.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-5f7eebbf.entry.js → p-5d243250.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-23df1c24.js → p-5d98a8a0.js} +2 -2
- package/dist/isometrik-webchat/p-7f415f28.js +2 -0
- package/dist/isometrik-webchat/p-7f415f28.js.map +1 -0
- package/dist/isometrik-webchat/{p-d386acfe.js → p-7fd2c1ad.js} +1 -1
- package/dist/isometrik-webchat/p-7fd2c1ad.js.map +1 -0
- package/dist/isometrik-webchat/{p-e5884258.js → p-9982fa21.js} +2 -2
- package/dist/isometrik-webchat/{p-4db39c93.js → p-a5707f12.js} +2 -2
- package/dist/isometrik-webchat/{p-af775c83.entry.js → p-a876991d.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-7b80b0b2.js → p-adc45831.js} +1 -1
- package/dist/isometrik-webchat/p-adc45831.js.map +1 -0
- package/dist/isometrik-webchat/p-ae168135.js +2 -0
- package/dist/isometrik-webchat/p-ae168135.js.map +1 -0
- package/dist/isometrik-webchat/{p-a6897edc.js → p-b1330793.js} +1 -1
- package/dist/isometrik-webchat/p-b1330793.js.map +1 -0
- package/dist/isometrik-webchat/p-b61d6c0c.entry.js +2 -0
- package/dist/isometrik-webchat/p-b61d6c0c.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-b667a9fc.js +2 -0
- package/dist/isometrik-webchat/p-b667a9fc.js.map +1 -0
- package/dist/isometrik-webchat/p-b857775d.entry.js +2 -0
- package/dist/isometrik-webchat/p-bdcdf1c5.js +2 -0
- package/dist/isometrik-webchat/p-bdcdf1c5.js.map +1 -0
- package/dist/isometrik-webchat/p-c0c19621.entry.js +2 -0
- package/dist/isometrik-webchat/{p-064d6200.entry.js → p-ca47d693.entry.js} +2 -2
- package/dist/isometrik-webchat/p-d720cf14.entry.js +2 -0
- package/dist/isometrik-webchat/{p-53695fc6.entry.js.map → p-d720cf14.entry.js.map} +1 -1
- package/dist/isometrik-webchat/{p-5c22ee37.entry.js → p-d892b4d4.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-7eb12da3.js → p-dd62bd69.js} +2 -2
- package/dist/isometrik-webchat/p-eb54f75d.js +2 -0
- package/dist/isometrik-webchat/p-eb54f75d.js.map +1 -0
- package/dist/isometrik-webchat/p-f1fbf3be.entry.js +2 -0
- package/dist/isometrik-webchat/p-f1fbf3be.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-fb705915.entry.js +2 -0
- package/dist/isometrik-webchat/p-fb705915.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-2f6bb0a4.entry.js → p-fd6ce589.entry.js} +2 -2
- package/dist/isometrik-webchat/p-fdd327f5.entry.js +2 -0
- package/dist/types/components/ChatUIComponent/Footer/ChatFooter.d.ts +1 -0
- package/dist/types/components/ChatUIComponent/shared/attachment-preview/attachment-preview.d.ts +2 -0
- package/dist/types/components/ChatUIComponent/shared/document-message/document-message.d.ts +5 -0
- package/dist/types/components/ChatUIComponent/shared/image-message/image-message.d.ts +1 -0
- package/dist/types/components/ChatUIComponent/shared/message-bubble/message-bubble.d.ts +3 -0
- package/dist/types/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.d.ts +1 -0
- package/dist/types/components/ChatUIComponent/shared/video-message/video-message.d.ts +1 -0
- package/dist/types/components/my-component/web-chat/FLOW.d.ts +1 -1
- package/dist/types/components/my-component/web-chat/mqtt-host.d.ts +5 -0
- package/dist/types/components/my-component/web-chat/offline-host.d.ts +22 -0
- package/dist/types/components/theme-provider.d.ts +22 -27
- package/dist/types/components.d.ts +84 -11
- package/dist/types/demos/custom-ui-demo-elements.d.ts +1 -1
- package/dist/types/global/expose-sdk.d.ts +1 -0
- package/dist/types/index.d.ts +3 -44
- package/dist/types/lib/chat/index.d.ts +3 -0
- package/dist/types/lib/chat/media-limits.d.ts +11 -0
- package/dist/types/lib/chat/media-outbox.d.ts +8 -0
- package/dist/types/lib/chat/preview-kind.d.ts +30 -0
- package/dist/types/lib/custom-ui/contracts.d.ts +1 -1
- package/dist/types/lib/custom-ui/index.d.ts +1 -1
- package/dist/types/lib/custom-ui/public-api.d.ts +1 -1
- package/dist/types/lib/destroy-chat.d.ts +2 -0
- package/dist/types/lib/mqtt/inbound-queue.d.ts +7 -0
- package/dist/types/lib/mqtt/index.d.ts +2 -1
- package/dist/types/lib/mqtt/session.d.ts +22 -0
- package/dist/types/lib/offline/client.d.ts +44 -0
- package/dist/types/lib/offline/idb.d.ts +36 -0
- package/dist/types/lib/offline/index.d.ts +10 -0
- package/dist/types/lib/offline/memory-db.d.ts +20 -0
- package/dist/types/lib/offline/merge.d.ts +3 -0
- package/dist/types/lib/offline/multitab.d.ts +13 -0
- package/dist/types/lib/offline/types.d.ts +63 -0
- package/dist/types/sdk/api.d.ts +3 -0
- package/dist/types/sdk/composition.d.ts +32 -0
- package/dist/types/sdk/headless-api.d.ts +37 -0
- package/dist/types/sdk/index.d.ts +10 -0
- package/dist/types/sdk/init.d.ts +87 -0
- package/dist/types/sdk/instance.d.ts +15 -0
- package/dist/types/sdk/react-bridge.d.ts +64 -0
- package/dist/types/sdk/runtime-controls.d.ts +14 -0
- package/dist/types/sdk/slots.d.ts +15 -0
- package/dist/types/sdk/theme-tokens.d.ts +22 -0
- package/dist/types/sdk/webchat-api.d.ts +22 -0
- package/docs/ARCHITECTURE.md +272 -0
- package/docs/CUSTOMIZATION.md +236 -0
- package/docs/INTEGRATION.md +286 -0
- package/docs/RELIABILITY.md +51 -0
- package/docs/theme-tokens.template.css +72 -0
- package/package.json +8 -2
- package/readme.md +38 -17
- package/dist/cjs/app-globals-3a1e7e63.js +0 -7
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/chat-creds-cf537d4b.js.map +0 -1
- package/dist/cjs/contracts-31632812.js.map +0 -1
- package/dist/cjs/destroy-chat-be25dec7.js +0 -26
- package/dist/cjs/destroy-chat-be25dec7.js.map +0 -1
- package/dist/cjs/doublecheck-997afc94.js +0 -7
- package/dist/cjs/doublecheck-997afc94.js.map +0 -1
- package/dist/cjs/group-members-73ad1074.js.map +0 -1
- package/dist/cjs/index-1a26d11d.js.map +0 -1
- package/dist/cjs/toast-0bf1e688.js.map +0 -1
- package/dist/components/GroupCast.js.map +0 -1
- package/dist/components/groupcast2.js.map +0 -1
- package/dist/esm/app-globals-0f993ce5.js +0 -5
- package/dist/esm/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm/chat-creds-5d0982fc.js.map +0 -1
- package/dist/esm/contracts-614be4db.js.map +0 -1
- package/dist/esm/destroy-chat-e2ebe165.js +0 -24
- package/dist/esm/destroy-chat-e2ebe165.js.map +0 -1
- package/dist/esm/doublecheck-5e208ef0.js +0 -5
- package/dist/esm/doublecheck-5e208ef0.js.map +0 -1
- package/dist/esm/group-members-806fd7a2.js.map +0 -1
- package/dist/esm/index-beb184c6.js.map +0 -1
- package/dist/esm/toast-d8ea763c.js.map +0 -1
- package/dist/isometrik-webchat/p-01fd0eb4.entry.js +0 -2
- package/dist/isometrik-webchat/p-01fd0eb4.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-0f9c3f95.entry.js +0 -2
- package/dist/isometrik-webchat/p-0f9c3f95.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-1c53e658.js +0 -2
- package/dist/isometrik-webchat/p-1c53e658.js.map +0 -1
- package/dist/isometrik-webchat/p-1df58381.entry.js +0 -2
- package/dist/isometrik-webchat/p-1df58381.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-3c690532.entry.js +0 -2
- package/dist/isometrik-webchat/p-3c690532.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-3c8cbd5f.js +0 -2
- package/dist/isometrik-webchat/p-3c8cbd5f.js.map +0 -1
- package/dist/isometrik-webchat/p-4e762019.js +0 -2
- package/dist/isometrik-webchat/p-4e762019.js.map +0 -1
- package/dist/isometrik-webchat/p-53695fc6.entry.js +0 -2
- package/dist/isometrik-webchat/p-7b80b0b2.js.map +0 -1
- package/dist/isometrik-webchat/p-9924b1bf.entry.js +0 -2
- package/dist/isometrik-webchat/p-a15092d9.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-a6897edc.js.map +0 -1
- package/dist/isometrik-webchat/p-b2bf55b1.entry.js +0 -2
- package/dist/isometrik-webchat/p-bfecfa97.entry.js +0 -2
- package/dist/isometrik-webchat/p-d386acfe.js.map +0 -1
- package/dist/isometrik-webchat/p-e1255160.js +0 -2
- package/dist/isometrik-webchat/p-e1255160.js.map +0 -1
- package/dist/isometrik-webchat/p-f24cdbbb.js.map +0 -1
- /package/dist/isometrik-webchat/{p-5fea3fd2.entry.js.map → p-2d3e8cd4.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-e7f58d3f.entry.js.map → p-39b626ed.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-eb1f3118.entry.js.map → p-3c70c22c.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-5cbc1a16.entry.js.map → p-586f6978.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-5f7eebbf.entry.js.map → p-5d243250.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-23df1c24.js.map → p-5d98a8a0.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-e5884258.js.map → p-9982fa21.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-4db39c93.js.map → p-a5707f12.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-af775c83.entry.js.map → p-a876991d.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-bfecfa97.entry.js.map → p-b857775d.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-9924b1bf.entry.js.map → p-c0c19621.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-064d6200.entry.js.map → p-ca47d693.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-5c22ee37.entry.js.map → p-d892b4d4.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-7eb12da3.js.map → p-dd62bd69.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-2f6bb0a4.entry.js.map → p-fd6ce589.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-b2bf55b1.entry.js.map → p-fdd327f5.entry.js.map} +0 -0
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { r as registerInstance, a as createEvent, h, g as getElement, F as Fragment, f as Host } from './index-bc463197.js';
|
|
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
|
|
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, m as mediaLimitToastMessage, e as mediaPreviewUrls, g as docIconKind, h as splitSharedMessages } from './media-limits-3fa07c09.js';
|
|
5
|
+
import { i as isPdfAttachment, D as DoubleCheck } from './doublecheck-261763ef.js';
|
|
4
6
|
import { M } from './index.m-8c70037f.js';
|
|
5
|
-
import { d as drawerDialogService } from './drawer-
|
|
6
|
-
import { c as clearAll, d as debounce, e as getFormattedTime, a as getDeviceID, b as getGroupcastUrlQuery, g as generateProfileImageByInitials, f as getFormattedDeliveryTime } from './helpers-
|
|
7
|
-
import { g as getCustomPartTag, f as findWebChatHost, h as hasNamedSlot } from './index-
|
|
8
|
-
import { s as showToast } from './toast-
|
|
9
|
-
import { p as postGroupCast, f as getPresignedUrlForGroupcastMedia, h as postGroupCastMessage, i as getGroupcastMessageReadStatus, j as getGroupcastMessageDeliveryStatus, k as deleteGroupcastMessageSelf, l as deleteGroupcastMessageEveryone } from './groupcast-
|
|
7
|
+
import { d as drawerDialogService } from './drawer-74c188f1.js';
|
|
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
|
+
import { g as getCustomPartTag, f as findWebChatHost, h as hasNamedSlot } from './index-4c865e34.js';
|
|
10
|
+
import { s as showToast } from './toast-533dd183.js';
|
|
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';
|
|
10
12
|
import { i as isometrikLogo } from './IsometrikLogo-36cb0542.js';
|
|
11
|
-
import { c as createStore,
|
|
13
|
+
import { c as createStore, g as groupMembersStore } from './group-members-05414da2.js';
|
|
12
14
|
import { r as renderMessageBody, e as emitTagUser } from './message-body-render-f5ab3a62.js';
|
|
13
|
-
import { D as DoubleCheck } from './doublecheck-5e208ef0.js';
|
|
14
15
|
import { W as WEB_CONTENT } from './content-fb138a93.js';
|
|
15
16
|
import { p as postReaction, d as deleteReaction } from './message-reaction-0a2bb115.js';
|
|
16
|
-
import { d as deriveMessageStatus } from './contracts-
|
|
17
|
-
import './destroy-chat-
|
|
17
|
+
import { d as deriveMessageStatus } from './contracts-50f4ddae.js';
|
|
18
|
+
import './destroy-chat-d0ee28d6.js';
|
|
18
19
|
|
|
19
20
|
const NewChat = class {
|
|
20
21
|
constructor(hostRef) {
|
|
@@ -4557,10 +4558,18 @@ const AttachmentPreview = class {
|
|
|
4557
4558
|
const files = Array.from(input.files || []);
|
|
4558
4559
|
if (!files.length)
|
|
4559
4560
|
return;
|
|
4561
|
+
const room = Math.max(0, MAX_MEDIA_PER_MESSAGE - this.items().length);
|
|
4562
|
+
const accepted = files.slice(0, room);
|
|
4563
|
+
if (!accepted.length) {
|
|
4564
|
+
input.value = '';
|
|
4565
|
+
return;
|
|
4566
|
+
}
|
|
4560
4567
|
this.fileUploaded.emit({
|
|
4561
|
-
files,
|
|
4562
|
-
fileTypes:
|
|
4563
|
-
totalFiles:
|
|
4568
|
+
files: accepted,
|
|
4569
|
+
fileTypes: accepted.map(f => f.type.split('/')[0]),
|
|
4570
|
+
totalFiles: accepted.length,
|
|
4571
|
+
rejected: Math.max(0, files.length - accepted.length),
|
|
4572
|
+
maxPerMessage: MAX_MEDIA_PER_MESSAGE,
|
|
4564
4573
|
});
|
|
4565
4574
|
input.value = '';
|
|
4566
4575
|
};
|
|
@@ -4675,10 +4684,19 @@ const AttachmentPreview = class {
|
|
|
4675
4684
|
var _a;
|
|
4676
4685
|
return ((_a = item === null || item === void 0 ? void 0 : item.file) === null || _a === void 0 ? void 0 : _a.name) || (item === null || item === void 0 ? void 0 : item.name) || 'Document';
|
|
4677
4686
|
}
|
|
4687
|
+
isPdf(item) {
|
|
4688
|
+
return isPdfAttachment({
|
|
4689
|
+
mimeType: item === null || item === void 0 ? void 0 : item.mimeType,
|
|
4690
|
+
name: this.fileName(item),
|
|
4691
|
+
file: item === null || item === void 0 ? void 0 : item.file,
|
|
4692
|
+
});
|
|
4693
|
+
}
|
|
4678
4694
|
fileIconSrc(item) {
|
|
4679
4695
|
var _a;
|
|
4680
4696
|
const mime = (((_a = item === null || item === void 0 ? void 0 : item.file) === null || _a === void 0 ? void 0 : _a.type) || (item === null || item === void 0 ? void 0 : item.mimeType) || '').toLowerCase();
|
|
4681
4697
|
const name = this.fileName(item).toLowerCase();
|
|
4698
|
+
if (mime.includes('pdf') || name.endsWith('.pdf'))
|
|
4699
|
+
return Icon_Doc;
|
|
4682
4700
|
if (mime.includes('spreadsheet') || mime.includes('excel') || /\.xlsx?$/.test(name) || name.endsWith('.csv'))
|
|
4683
4701
|
return Icon_Excel;
|
|
4684
4702
|
if (mime.includes('rtf') || name.endsWith('.rtf'))
|
|
@@ -4693,9 +4711,20 @@ const AttachmentPreview = class {
|
|
|
4693
4711
|
const name = this.fileName(item);
|
|
4694
4712
|
if (mime.includes('pdf') || /\.pdf$/i.test(name))
|
|
4695
4713
|
return 'PDF';
|
|
4714
|
+
if (mime.includes('presentation') || /\.pptx?$/i.test(name))
|
|
4715
|
+
return 'PPT';
|
|
4716
|
+
if (mime.includes('word') || /\.docx?$/i.test(name))
|
|
4717
|
+
return 'DOC';
|
|
4718
|
+
if (mime.includes('sheet') || mime.includes('excel') || /\.xlsx?$/i.test(name))
|
|
4719
|
+
return 'XLS';
|
|
4696
4720
|
const ext = name.includes('.') ? name.split('.').pop() : '';
|
|
4697
4721
|
return (ext || 'File').toUpperCase();
|
|
4698
4722
|
}
|
|
4723
|
+
openInNewTab(src) {
|
|
4724
|
+
if (!src)
|
|
4725
|
+
return;
|
|
4726
|
+
window.open(src, '_blank', 'noopener,noreferrer');
|
|
4727
|
+
}
|
|
4699
4728
|
formatSize(bytes) {
|
|
4700
4729
|
if (bytes == null || Number.isNaN(bytes))
|
|
4701
4730
|
return '';
|
|
@@ -4715,24 +4744,25 @@ const AttachmentPreview = class {
|
|
|
4715
4744
|
this.onSend();
|
|
4716
4745
|
}
|
|
4717
4746
|
render() {
|
|
4718
|
-
var _a, _b, _c;
|
|
4747
|
+
var _a, _b, _c, _d, _e;
|
|
4719
4748
|
const list = this.items();
|
|
4720
4749
|
const cur = this.current();
|
|
4721
4750
|
const type = this.typeOf(cur, this.localIndex);
|
|
4722
4751
|
const fileMode = this.isFilePreview(type);
|
|
4723
4752
|
const fileTitle = this.fileName(cur);
|
|
4724
|
-
return (h("div", { key: '
|
|
4753
|
+
return (h("div", { key: '14aeef8e84f9f619b43fe5749e6d6d061d4ba13b', class: "preview-container" }, h("div", { key: '7a6eb4eb7db969281b6b6342224774771370a535', 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: 'fba60287d74ec7a96ef6bef3bedd1076aec2336f', 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) => {
|
|
4725
4754
|
const t = this.typeOf(item, i);
|
|
4726
4755
|
const isFile = this.isFilePreview(t);
|
|
4756
|
+
const pdf = this.isPdf(item);
|
|
4727
4757
|
const select = () => {
|
|
4728
4758
|
this.localIndex = i;
|
|
4729
4759
|
this.selectedIndex = i;
|
|
4730
4760
|
};
|
|
4731
|
-
return (h("div", { class: "thumb-wrap" }, isFile ? (h("div", { class: `thumb file-thumb ${i === this.localIndex ? 'active' : ''}`, onClick: select }, h("img", { src: this.fileIconSrc(item), alt: "" }))) : t === 'video' ? (h("video", { class: `thumb ${i === this.localIndex ? 'active' : ''}`, src: this.srcOf(item), muted: true, playsInline: true, preload: "metadata", onClick: select })) : (h("img", { class: `thumb ${i === this.localIndex ? 'active' : ''}`, src: this.srcOf(item), alt: "", onClick: select })), h("button", { class: "thumb-x", type: "button", "aria-label": "Remove", onClick: e => {
|
|
4761
|
+
return (h("div", { class: "thumb-wrap", key: `thumb-${i}-${this.fileName(item)}` }, pdf ? (h("div", { class: `thumb file-thumb pdf-thumb ${i === this.localIndex ? 'active' : ''}`, onClick: select }, h("span", null, "PDF"))) : isFile ? (h("div", { class: `thumb file-thumb ${i === this.localIndex ? 'active' : ''}`, onClick: select }, h("img", { src: this.fileIconSrc(item), alt: "" }))) : t === 'video' ? (h("video", { class: `thumb ${i === this.localIndex ? 'active' : ''}`, src: this.srcOf(item), muted: true, playsInline: true, preload: "metadata", onClick: select })) : t === 'audio' ? (h("div", { class: `thumb file-thumb ${i === this.localIndex ? 'active' : ''}`, onClick: select }, "\u266A")) : (h("img", { class: `thumb ${i === this.localIndex ? 'active' : ''}`, src: this.srcOf(item), alt: "", onClick: select })), h("button", { class: "thumb-x", type: "button", "aria-label": "Remove", onClick: e => {
|
|
4732
4762
|
e.stopPropagation();
|
|
4733
4763
|
this.attachmentRemoved.emit(i);
|
|
4734
4764
|
} }, "\u00D7")));
|
|
4735
|
-
}), h("button", { class: "thumb add-thumb", type: "button", title:
|
|
4765
|
+
}), list.length < MAX_MEDIA_PER_MESSAGE ? (h("button", { class: "thumb add-thumb", type: "button", title: `Add (max ${MAX_MEDIA_PER_MESSAGE})`, "aria-label": "Add", onClick: this.openAddFiles }, "+")) : null, h("input", { class: "add-input", type: "file", multiple: true, accept: ".jpg,.jpeg,.png,.gif,.webp,.bmp,.heic,.mp4,.mov,.webm,.mkv,.mp3,.wav,.m4a,.aac,.ogg,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,.rtf", ref: el => (this.addInputRef = el), onChange: this.onAddFiles }))), h("p", { class: "limit-hint" }, list.length, "/", MAX_MEDIA_PER_MESSAGE, " files \u00B7 send together as one message"))) : null));
|
|
4736
4766
|
}
|
|
4737
4767
|
get el() { return getElement(this); }
|
|
4738
4768
|
static get watchers() { return {
|
|
@@ -4740,7 +4770,7 @@ const AttachmentPreview = class {
|
|
|
4740
4770
|
"showCamera": ["onShowCameraChange"]
|
|
4741
4771
|
}; }
|
|
4742
4772
|
};
|
|
4743
|
-
AttachmentPreview.style = ":host {\n display: block;\n width: var(--w-full);\n height: var(--h-full);\n background: var(--bg-primary);\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .preview-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n box-sizing: border-box;\n padding-bottom: var(--space-16, 1rem);\n }\n .topbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--space-12) var(--space-16);\n flex-shrink: 0;\n }\n .topbar-left {\n display: flex;\n align-items: center;\n gap: var(--gap-10);\n min-width: 0;\n }\n .topbar-title {\n font-size: var(--text-16);\n font-weight: var(--fw-400);\n color: var(--text-primary);\n }\n .icon-btn {\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--icon);\n }\n .icon-btn img {\n width: var(--icon-md);\n height: var(--icon-md);\n object-fit: contain;\n display: block;\n }\n .main {\n flex: 1;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-8) var(--space-16);\n overflow: hidden;\n }\n .main img,\n .main video.preview-media {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n border-radius: var(--rounded-4);\n box-shadow: 0 2px 12px var(--overlay);\n background: var(--text-primary);\n }\n .file-chip {\n padding: var(--space-16) var(--space-16);\n border-radius: var(--rounded-8);\n background: var(--bg-primary);\n max-width: 80%;\n color: var(--text-primary);\n }\n .file-preview {\n width: 100%;\n max-width: 36rem;\n background: color-mix(in srgb, var(--bg-secondary, #f1f5f9) 70%, transparent);\n border-radius: var(--rounded-16, 1rem);\n border: 1px solid color-mix(in srgb, var(--border, #e2e8f0) 50%, transparent);\n box-shadow: 0 1px 2px var(--overlay, rgba(0,0,0,0.05));\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 4rem var(--space-24, 1.5rem);\n box-sizing: border-box;\n text-align: center;\n }\n .file-preview-icon-wrap {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: var(--space-24, 1.5rem);\n }\n .file-preview-icon-wrap img,\n .file-preview-icon-wrap svg {\n width: 5.5rem;\n height: 5.5rem;\n max-width: none;\n max-height: none;\n object-fit: contain;\n display: block;\n background: transparent;\n box-shadow: none;\n border-radius: 0;\n }\n .file-preview-title {\n margin: 0 0 var(--gap-4, 0.25rem);\n font-size: var(--text-20, 1.25rem);\n font-weight: var(--fw-600, 600);\n color: var(--text-tertiary, #94a3b8);\n }\n .file-preview-meta {\n margin: 0;\n font-size: var(--text-12, 0.75rem);\n font-weight: 500;\n color: var(--text-tertiary, #94a3b8);\n }\n .thumb.file-thumb {\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--bg-primary);\n object-fit: contain;\n padding: var(--gap-6, 0.375rem);\n box-sizing: border-box;\n border-color: color-mix(in srgb, var(--brand) 40%, transparent);\n }\n .thumb.file-thumb.active {\n border-color: var(--brand);\n }\n .thumb.file-thumb img,\n .thumb.file-thumb svg {\n width: var(--icon-lg, 1.5rem);\n height: var(--icon-lg, 1.5rem);\n object-fit: contain;\n display: block;\n }\n .topbar-title.centered {\n flex: 1;\n text-align: center;\n font-weight: var(--fw-500, 500);\n font-size: var(--text-14, 0.875rem);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 0 var(--space-16);\n }\n .topbar-spacer {\n width: var(--control, 2.25rem);\n flex-shrink: 0;\n }\n .thumbs {\n display: flex;\n gap: var(--gap-12);\n overflow-x: auto;\n flex: 1;\n justify-content: center;\n align-items: center;\n min-width: 0;\n padding: 0;\n }\n .thumb {\n width: 3rem;\n height: 3rem;\n border-radius: var(--rounded-8);\n object-fit: cover;\n cursor: pointer;\n border: 2px solid var(--border);\n flex-shrink: 0;\n background: var(--bg-primary);\n box-sizing: border-box;\n }\n .thumb.active {\n border-color: var(--brand);\n }\n .thumb.add-thumb {\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--border);\n background: var(--bg-primary);\n color: var(--text-secondary);\n font-size: var(--text-20);\n line-height: 1;\n padding: 0;\n }\n .thumb.add-thumb:hover {\n border-color: var(--text-tertiary);\n background: var(--hover-overlay);\n }\n .thumb-wrap {\n position: relative;\n width: 3rem;\n height: 3rem;\n flex-shrink: 0;\n }\n .thumb-wrap > .thumb {\n width: 100%;\n height: 100%;\n }\n .thumb-x {\n display: none;\n position: absolute;\n top: 0.125rem;\n right: 0.125rem;\n width: 0.875rem;\n height: 0.875rem;\n border: none;\n border-radius: 999px;\n background: var(--text-primary);\n color: var(--bg-primary);\n font-size: 0.65rem;\n line-height: 1;\n padding: 0;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n z-index: 1;\n }\n .thumb-wrap:hover .thumb-x {\n display: flex;\n }\n .footer {\n display: flex;\n flex-direction: column;\n gap: var(--gap-8);\n padding: var(--space-16) var(--space-24) var(--space-24, 1.5rem);\n flex-shrink: 0;\n width: 100%;\n max-width: 48rem;\n margin: 0 auto;\n box-sizing: border-box;\n position: relative;\n }\n .composer {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n width: 100%;\n padding: 0;\n margin: 0;\n max-width: none;\n }\n .emoji-panel {\n position: absolute;\n bottom: calc(100% + var(--gap-8));\n right: calc(3.5rem + var(--gap-12));\n width: min(360px, calc(100vw - 32px));\n background: var(--bg-primary);\n border-radius: var(--rounded-12);\n box-shadow: 0 8px 32px var(--overlay);\n overflow: hidden;\n z-index: 20;\n }\n emoji-picker.emoji-picker {\n --background: var(--bg-primary);\n --border-color: transparent;\n --border-size: 0;\n --indicator-color: var(--brand);\n --indicator-height: 3px;\n --input-border-radius: var(--rounded-8);\n --input-border-color: var(--brand);\n --num-columns: 8;\n --emoji-size: 1.5rem;\n width: 100%;\n height: 320px;\n }\n .composer-pill {\n flex: 1;\n width: auto;\n display: flex;\n align-items: center;\n gap: var(--gap-8);\n background: var(--bg-input);\n border-radius: var(--rounded-12);\n padding: var(--space-12) var(--space-16);\n min-width: 0;\n box-sizing: border-box;\n }\n .composer-pill input {\n flex: 1;\n border: none;\n outline: none;\n background: transparent;\n color: var(--text-primary);\n font-size: var(--text-14);\n font-family: inherit;\n min-width: 0;\n }\n .composer-pill input::placeholder {\n color: var(--text-tertiary);\n }\n .composer-pill .smile-btn img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n }\n .action-row {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--gap-12);\n width: 100%;\n padding-bottom: var(--space-16, 1rem);\n box-sizing: border-box;\n }\n .send-btn {\n position: relative;\n width: 3.5rem;\n height: 3.5rem;\n border-radius: 50%;\n border: none;\n background: var(--brand);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n padding: 0;\n box-shadow: 0 2px 8px var(--overlay);\n }\n .send-btn img {\n width: var(--icon-md);\n height: var(--icon-md);\n filter: brightness(0) invert(1);\n display: block;\n }\n .send-btn:hover {\n opacity: 0.92;\n }\n .send-btn:hover img {\n filter: brightness(0) invert(1);\n }\n .send-badge {\n position: absolute;\n top: -0.25rem;\n right: -0.25rem;\n min-width: 1.125rem;\n height: 1.125rem;\n padding: 0 0.25rem;\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 border: 2px solid var(--bg-primary);\n line-height: 1;\n }\n .add-input {\n display: none;\n }\n .camera-view {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--space-16);\n width: 100%;\n height: 100%;\n min-height: 0;\n }\n .camera-view video {\n width: 100%;\n max-width: 720px;\n max-height: calc(100% - 88px);\n object-fit: cover;\n border-radius: var(--rounded-12);\n background: var(--bg-primary);\n transform: scaleX(-1);\n box-shadow: 0 2px 12px var(--overlay);\n }\n .camera-view video:not(.is-ready) {\n visibility: hidden;\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n pointer-events: none;\n }\n .camera-loading {\n color: var(--text-secondary);\n font-size: var(--text-14);\n }\n .snap-btn {\n width: 72px;\n height: 72px;\n border-radius: 50%;\n border: 3px solid var(--danger);\n background: var(--bg-primary);\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-sizing: border-box;\n }\n .snap-btn::after {\n content: '';\n width: 56px;\n height: 56px;\n border-radius: 50%;\n background: var(--danger);\n display: block;\n }\n .camera-error {\n color: var(--danger);\n font-size: var(--text-14);\n text-align: center;\n padding: 0 var(--space-16);\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
|
|
4773
|
+
AttachmentPreview.style = ":host {\n display: block;\n width: var(--w-full);\n height: var(--h-full);\n background: var(--bg-primary);\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .preview-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n box-sizing: border-box;\n padding-bottom: var(--space-16, 1rem);\n }\n .topbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--space-12) var(--space-16);\n flex-shrink: 0;\n }\n .topbar-left {\n display: flex;\n align-items: center;\n gap: var(--gap-10);\n min-width: 0;\n }\n .topbar-title {\n font-size: var(--text-16);\n font-weight: var(--fw-400);\n color: var(--text-primary);\n }\n .icon-btn {\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--icon);\n }\n .icon-btn img {\n width: var(--icon-md);\n height: var(--icon-md);\n object-fit: contain;\n display: block;\n }\n .main {\n flex: 1;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-8) var(--space-16);\n overflow: hidden;\n }\n .main img,\n .main video.preview-media {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n border-radius: var(--rounded-4);\n box-shadow: 0 2px 12px var(--overlay);\n background: var(--text-primary);\n }\n .pdf-stage {\n width: 100%;\n height: 100%;\n min-height: 0;\n display: flex;\n flex-direction: column;\n border-radius: var(--rounded-12, 0.75rem);\n overflow: hidden;\n background: var(--bg-secondary, #0f172a);\n box-shadow: 0 2px 16px var(--overlay, rgba(0,0,0,0.12));\n border: 1px solid color-mix(in srgb, var(--border, #e2e8f0) 40%, transparent);\n }\n .pdf-frame {\n flex: 1;\n width: 100%;\n min-height: 18rem;\n border: 0;\n background: #525659;\n }\n .pdf-fallback {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--gap-12, 0.75rem);\n padding: var(--space-24, 1.5rem);\n color: var(--text-secondary);\n text-align: center;\n }\n .pdf-fallback a,\n .file-preview-actions a,\n .file-preview-actions button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.35rem;\n padding: 0.55rem 1rem;\n border-radius: var(--rounded-8, 0.5rem);\n background: var(--brand);\n color: var(--text-on-brand, #fff);\n text-decoration: none;\n border: none;\n cursor: pointer;\n font-size: var(--text-13, 0.8125rem);\n font-weight: 600;\n font-family: inherit;\n }\n .file-preview-actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--gap-8, 0.5rem);\n justify-content: center;\n margin-top: var(--space-16, 1rem);\n }\n .file-preview-actions a.secondary,\n .file-preview-actions button.secondary {\n background: transparent;\n color: var(--text-primary);\n border: 1px solid var(--border, #e2e8f0);\n }\n .audio-stage {\n width: min(100%, 28rem);\n padding: var(--space-24, 1.5rem);\n border-radius: var(--rounded-16, 1rem);\n background: color-mix(in srgb, var(--bg-secondary, #f1f5f9) 80%, transparent);\n border: 1px solid color-mix(in srgb, var(--border, #e2e8f0) 50%, transparent);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--gap-16, 1rem);\n box-sizing: border-box;\n }\n .audio-stage audio {\n width: 100%;\n }\n .audio-stage .audio-title {\n margin: 0;\n font-size: var(--text-16, 1rem);\n font-weight: 600;\n color: var(--text-primary);\n text-align: center;\n word-break: break-word;\n }\n .thumb.pdf-thumb {\n position: relative;\n background: #b91c1c;\n color: #fff;\n font-size: 0.55rem;\n font-weight: 800;\n letter-spacing: 0.02em;\n }\n .thumb.pdf-thumb span {\n pointer-events: none;\n }\n .thumb.add-thumb:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n .limit-hint {\n width: 100%;\n text-align: center;\n font-size: var(--text-11, 0.6875rem);\n color: var(--text-tertiary, #94a3b8);\n margin: 0;\n }\n .file-chip {\n padding: var(--space-16) var(--space-16);\n border-radius: var(--rounded-8);\n background: var(--bg-primary);\n max-width: 80%;\n color: var(--text-primary);\n }\n .file-preview {\n width: 100%;\n max-width: 36rem;\n background: color-mix(in srgb, var(--bg-secondary, #f1f5f9) 70%, transparent);\n border-radius: var(--rounded-16, 1rem);\n border: 1px solid color-mix(in srgb, var(--border, #e2e8f0) 50%, transparent);\n box-shadow: 0 1px 2px var(--overlay, rgba(0,0,0,0.05));\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 4rem var(--space-24, 1.5rem);\n box-sizing: border-box;\n text-align: center;\n }\n .file-preview-icon-wrap {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: var(--space-24, 1.5rem);\n }\n .file-preview-icon-wrap img,\n .file-preview-icon-wrap svg {\n width: 5.5rem;\n height: 5.5rem;\n max-width: none;\n max-height: none;\n object-fit: contain;\n display: block;\n background: transparent;\n box-shadow: none;\n border-radius: 0;\n }\n .file-preview-title {\n margin: 0 0 var(--gap-4, 0.25rem);\n font-size: var(--text-20, 1.25rem);\n font-weight: var(--fw-600, 600);\n color: var(--text-tertiary, #94a3b8);\n }\n .file-preview-meta {\n margin: 0;\n font-size: var(--text-12, 0.75rem);\n font-weight: 500;\n color: var(--text-tertiary, #94a3b8);\n }\n .thumb.file-thumb {\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--bg-primary);\n object-fit: contain;\n padding: var(--gap-6, 0.375rem);\n box-sizing: border-box;\n border-color: color-mix(in srgb, var(--brand) 40%, transparent);\n }\n .thumb.file-thumb.active {\n border-color: var(--brand);\n }\n .thumb.file-thumb img,\n .thumb.file-thumb svg {\n width: var(--icon-lg, 1.5rem);\n height: var(--icon-lg, 1.5rem);\n object-fit: contain;\n display: block;\n }\n .topbar-title.centered {\n flex: 1;\n text-align: center;\n font-weight: var(--fw-500, 500);\n font-size: var(--text-14, 0.875rem);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 0 var(--space-16);\n }\n .topbar-spacer {\n width: var(--control, 2.25rem);\n flex-shrink: 0;\n }\n .thumbs {\n display: flex;\n gap: var(--gap-12);\n overflow-x: auto;\n flex: 1;\n justify-content: center;\n align-items: center;\n min-width: 0;\n padding: 0;\n }\n .thumb {\n width: 3rem;\n height: 3rem;\n border-radius: var(--rounded-8);\n object-fit: cover;\n cursor: pointer;\n border: 2px solid var(--border);\n flex-shrink: 0;\n background: var(--bg-primary);\n box-sizing: border-box;\n }\n .thumb.active {\n border-color: var(--brand);\n }\n .thumb.add-thumb {\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--border);\n background: var(--bg-primary);\n color: var(--text-secondary);\n font-size: var(--text-20);\n line-height: 1;\n padding: 0;\n }\n .thumb.add-thumb:hover {\n border-color: var(--text-tertiary);\n background: var(--hover-overlay);\n }\n .thumb-wrap {\n position: relative;\n width: 3rem;\n height: 3rem;\n flex-shrink: 0;\n }\n .thumb-wrap > .thumb {\n width: 100%;\n height: 100%;\n }\n .thumb-x {\n display: none;\n position: absolute;\n top: 0.125rem;\n right: 0.125rem;\n width: 0.875rem;\n height: 0.875rem;\n border: none;\n border-radius: 999px;\n background: var(--text-primary);\n color: var(--bg-primary);\n font-size: 0.65rem;\n line-height: 1;\n padding: 0;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n z-index: 1;\n }\n .thumb-wrap:hover .thumb-x {\n display: flex;\n }\n .footer {\n display: flex;\n flex-direction: column;\n gap: var(--gap-8);\n padding: var(--space-16) var(--space-24) var(--space-24, 1.5rem);\n flex-shrink: 0;\n width: 100%;\n max-width: 48rem;\n margin: 0 auto;\n box-sizing: border-box;\n position: relative;\n }\n .composer {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n width: 100%;\n padding: 0;\n margin: 0;\n max-width: none;\n }\n .emoji-panel {\n position: absolute;\n bottom: calc(100% + var(--gap-8));\n right: calc(3.5rem + var(--gap-12));\n width: min(360px, calc(100vw - 32px));\n background: var(--bg-primary);\n border-radius: var(--rounded-12);\n box-shadow: 0 8px 32px var(--overlay);\n overflow: hidden;\n z-index: 20;\n }\n emoji-picker.emoji-picker {\n --background: var(--bg-primary);\n --border-color: transparent;\n --border-size: 0;\n --indicator-color: var(--brand);\n --indicator-height: 3px;\n --input-border-radius: var(--rounded-8);\n --input-border-color: var(--brand);\n --num-columns: 8;\n --emoji-size: 1.5rem;\n width: 100%;\n height: 320px;\n }\n .composer-pill {\n flex: 1;\n width: auto;\n display: flex;\n align-items: center;\n gap: var(--gap-8);\n background: var(--bg-input);\n border-radius: var(--rounded-12);\n padding: var(--space-12) var(--space-16);\n min-width: 0;\n box-sizing: border-box;\n }\n .composer-pill input {\n flex: 1;\n border: none;\n outline: none;\n background: transparent;\n color: var(--text-primary);\n font-size: var(--text-14);\n font-family: inherit;\n min-width: 0;\n }\n .composer-pill input::placeholder {\n color: var(--text-tertiary);\n }\n .composer-pill .smile-btn img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n }\n .action-row {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--gap-12);\n width: 100%;\n padding-bottom: var(--space-16, 1rem);\n box-sizing: border-box;\n }\n .send-btn {\n position: relative;\n width: 3.5rem;\n height: 3.5rem;\n border-radius: 50%;\n border: none;\n background: var(--brand);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n padding: 0;\n box-shadow: 0 2px 8px var(--overlay);\n }\n .send-btn img {\n width: var(--icon-md);\n height: var(--icon-md);\n filter: brightness(0) invert(1);\n display: block;\n }\n .send-btn:hover {\n opacity: 0.92;\n }\n .send-btn:hover img {\n filter: brightness(0) invert(1);\n }\n .send-badge {\n position: absolute;\n top: -0.25rem;\n right: -0.25rem;\n min-width: 1.125rem;\n height: 1.125rem;\n padding: 0 0.25rem;\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 border: 2px solid var(--bg-primary);\n line-height: 1;\n }\n .add-input {\n display: none;\n }\n .camera-view {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--space-16);\n width: 100%;\n height: 100%;\n min-height: 0;\n }\n .camera-view video {\n width: 100%;\n max-width: 720px;\n max-height: calc(100% - 88px);\n object-fit: cover;\n border-radius: var(--rounded-12);\n background: var(--bg-primary);\n transform: scaleX(-1);\n box-shadow: 0 2px 12px var(--overlay);\n }\n .camera-view video:not(.is-ready) {\n visibility: hidden;\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n pointer-events: none;\n }\n .camera-loading {\n color: var(--text-secondary);\n font-size: var(--text-14);\n }\n .snap-btn {\n width: 72px;\n height: 72px;\n border-radius: 50%;\n border: 3px solid var(--danger);\n background: var(--bg-primary);\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-sizing: border-box;\n }\n .snap-btn::after {\n content: '';\n width: 56px;\n height: 56px;\n border-radius: 50%;\n background: var(--danger);\n display: block;\n }\n .camera-error {\n color: var(--danger);\n font-size: var(--text-14);\n text-align: center;\n padding: 0 var(--space-16);\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
|
|
4744
4774
|
|
|
4745
4775
|
const ReplyBlock = class {
|
|
4746
4776
|
constructor(hostRef) {
|
|
@@ -4846,16 +4876,33 @@ const ChatFooter = class {
|
|
|
4846
4876
|
return;
|
|
4847
4877
|
this.showCamera = false;
|
|
4848
4878
|
const existing = Array.isArray(this.attachmentDetails) ? this.attachmentDetails : [];
|
|
4849
|
-
|
|
4850
|
-
|
|
4879
|
+
const { accepted, rejected } = takeMediaFiles(incoming, existing.length);
|
|
4880
|
+
if (rejected > 0 || !accepted.length) {
|
|
4881
|
+
showToast({
|
|
4882
|
+
message: mediaLimitToastMessage(rejected || incoming.length, MAX_MEDIA_PER_MESSAGE),
|
|
4883
|
+
type: 'warning',
|
|
4884
|
+
position: 'bottom-right',
|
|
4885
|
+
});
|
|
4886
|
+
}
|
|
4887
|
+
if (!accepted.length)
|
|
4888
|
+
return;
|
|
4889
|
+
this.attachmentDetails = [...existing, ...accepted];
|
|
4890
|
+
// Keep a shared array so async FileReader callbacks don't clobber each other
|
|
4851
4891
|
const previews = [...this.mediaPreviews];
|
|
4852
|
-
|
|
4892
|
+
accepted.forEach((file) => {
|
|
4893
|
+
const mime = (file.type || '').toLowerCase();
|
|
4894
|
+
const fileType = mime.split('/')[0] || 'application';
|
|
4895
|
+
if (!['image', 'video', 'application', 'audio', 'text'].includes(fileType))
|
|
4896
|
+
return;
|
|
4897
|
+
// Blob URLs give native PDF / video / audio players a real source (data URLs often fail in iframes)
|
|
4898
|
+
if (mime.includes('pdf') || fileType === 'video' || fileType === 'audio' || fileType === 'application' || fileType === 'text') {
|
|
4899
|
+
previews.push({ type: fileType, src: URL.createObjectURL(file), file });
|
|
4900
|
+
this.mediaPreviews = [...previews];
|
|
4901
|
+
return;
|
|
4902
|
+
}
|
|
4853
4903
|
const reader = new FileReader();
|
|
4854
4904
|
reader.onload = (e) => {
|
|
4855
4905
|
var _a;
|
|
4856
|
-
const fileType = file.type.split('/')[0];
|
|
4857
|
-
if (!['image', 'video', 'application', 'audio', 'text'].includes(fileType))
|
|
4858
|
-
return;
|
|
4859
4906
|
previews.push({ type: fileType, src: (_a = e.target) === null || _a === void 0 ? void 0 : _a.result, file });
|
|
4860
4907
|
this.mediaPreviews = [...previews];
|
|
4861
4908
|
};
|
|
@@ -5151,12 +5198,14 @@ const ChatFooter = class {
|
|
|
5151
5198
|
const removed = this.mediaPreviews[event.detail];
|
|
5152
5199
|
if (!removed)
|
|
5153
5200
|
return;
|
|
5201
|
+
this.revokePreviewSrc(removed.src);
|
|
5154
5202
|
this.mediaPreviews = this.mediaPreviews.filter((_, i) => i !== event.detail);
|
|
5155
5203
|
this.attachmentDetails = (this.attachmentDetails || []).filter((file) => file !== removed.file);
|
|
5156
5204
|
if (!this.mediaPreviews.length)
|
|
5157
5205
|
this.handleClearAttachment();
|
|
5158
5206
|
};
|
|
5159
5207
|
this.handleClearAttachment = () => {
|
|
5208
|
+
this.mediaPreviews.forEach(p => this.revokePreviewSrc(p.src));
|
|
5160
5209
|
this.attachmentDetails = null;
|
|
5161
5210
|
this.mediaPreviews = [];
|
|
5162
5211
|
this.showCamera = false;
|
|
@@ -5377,22 +5426,39 @@ const ChatFooter = class {
|
|
|
5377
5426
|
var _a;
|
|
5378
5427
|
this.changeMessageSendingState(true);
|
|
5379
5428
|
let messageId = Date.now().toString() + Math.random() * 100;
|
|
5380
|
-
const
|
|
5429
|
+
const files = takeMediaFiles(this.attachmentDetails || [], 0).accepted;
|
|
5430
|
+
if (!files.length) {
|
|
5431
|
+
this.changeMessageSendingState(false);
|
|
5432
|
+
return;
|
|
5433
|
+
}
|
|
5434
|
+
const attachments = files.map(file => ({
|
|
5381
5435
|
nameWithExtension: file.name,
|
|
5382
5436
|
mediaType: file.type.startsWith('image/') ? 0 : file.type.startsWith('video/') ? 1 : file.type.startsWith('audio/') ? 2 : 3,
|
|
5383
|
-
mediaId: file.lastModified +
|
|
5437
|
+
mediaId: String(file.lastModified || Date.now()) + Math.random().toString(36).slice(2, 6),
|
|
5384
5438
|
mimeType: file.type,
|
|
5385
5439
|
size: file.size,
|
|
5386
5440
|
file,
|
|
5387
5441
|
}));
|
|
5388
|
-
const localAttachments = this.mediaPreviews
|
|
5442
|
+
const localAttachments = this.mediaPreviews
|
|
5443
|
+
.filter(p => files.includes(p.file))
|
|
5444
|
+
.slice(0, MAX_MEDIA_PER_MESSAGE)
|
|
5445
|
+
.map(preview => ({
|
|
5389
5446
|
name: preview.file.name,
|
|
5390
5447
|
size: preview.file.size,
|
|
5391
5448
|
type: preview.type,
|
|
5392
5449
|
mediaUrl: preview.src,
|
|
5393
5450
|
mimeType: preview.file.type,
|
|
5394
5451
|
}));
|
|
5395
|
-
const
|
|
5452
|
+
const customType = files.length === 1
|
|
5453
|
+
? files[0].type.startsWith('image/')
|
|
5454
|
+
? 'AttachmentMessage:Image'
|
|
5455
|
+
: files[0].type.startsWith('video/')
|
|
5456
|
+
? 'AttachmentMessage:Video'
|
|
5457
|
+
: files[0].type.startsWith('audio/')
|
|
5458
|
+
? 'AttachmentMessage:Audio'
|
|
5459
|
+
: 'AttachmentMessage:File'
|
|
5460
|
+
: 'AttachmentMessage:Multiple';
|
|
5461
|
+
const localMessage = Object.assign(Object.assign({}, this.createLocalMessage(this.messageBody || customType, localAttachments, messageId)), { customType });
|
|
5396
5462
|
try {
|
|
5397
5463
|
await this.updateConversationListOnMessageSend(localMessage);
|
|
5398
5464
|
}
|
|
@@ -5471,9 +5537,9 @@ const ChatFooter = class {
|
|
|
5471
5537
|
});
|
|
5472
5538
|
});
|
|
5473
5539
|
await Promise.all(uploadPromises);
|
|
5474
|
-
//
|
|
5540
|
+
// One attachment → typed; 2–5 together → Multiple (same message)
|
|
5475
5541
|
let customType = 'AttachmentMessage:Multiple';
|
|
5476
|
-
if ((
|
|
5542
|
+
if ((attachments === null || attachments === void 0 ? void 0 : attachments.length) === 1 && ((_a = attachments[0]) === null || _a === void 0 ? void 0 : _a.mimeType)) {
|
|
5477
5543
|
if (attachments[0].mimeType.startsWith('image/')) {
|
|
5478
5544
|
customType = 'AttachmentMessage:Image';
|
|
5479
5545
|
}
|
|
@@ -5536,6 +5602,16 @@ const ChatFooter = class {
|
|
|
5536
5602
|
parentMessageType: this.replyMessage.attachments[0].mimeType,
|
|
5537
5603
|
})), (((_k = this.messageBody) === null || _k === void 0 ? void 0 : _k.trim()) && { captionMessage: this.messageBody.trim() }));
|
|
5538
5604
|
}
|
|
5605
|
+
revokePreviewSrc(src) {
|
|
5606
|
+
if (src && typeof src === 'string' && src.startsWith('blob:')) {
|
|
5607
|
+
try {
|
|
5608
|
+
URL.revokeObjectURL(src);
|
|
5609
|
+
}
|
|
5610
|
+
catch (_a) {
|
|
5611
|
+
/* ignore */
|
|
5612
|
+
}
|
|
5613
|
+
}
|
|
5614
|
+
}
|
|
5539
5615
|
async handleDataChange() {
|
|
5540
5616
|
this.handleClearAttachment();
|
|
5541
5617
|
}
|
|
@@ -5557,9 +5633,9 @@ const ChatFooter = class {
|
|
|
5557
5633
|
const webChat = findWebChatHost(this.el);
|
|
5558
5634
|
const hasCustomReply = (webChat ? hasNamedSlot(webChat, 'reply-preview') : false) || hasNamedSlot(this.el, 'reply-preview');
|
|
5559
5635
|
const showAttachment = this.attachmentDetails || this.showCamera;
|
|
5560
|
-
return (h(Host, { key: '
|
|
5636
|
+
return (h(Host, { key: 'd6fd217a7f5a57cf16a0f54c6a6f9ae9b81efcab', class: { 'attachment-open': !!showAttachment } }, h("div", { key: '99ca88fbaabe52c1dbbf977bfe3a556f473e5118', 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)
|
|
5561
5637
|
? 'You'
|
|
5562
|
-
: (_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", 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,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: "" })))))))))))));
|
|
5638
|
+
: (_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: "" })))))))))))));
|
|
5563
5639
|
}
|
|
5564
5640
|
get el() { return getElement(this); }
|
|
5565
5641
|
static get watchers() { return {
|
|
@@ -6667,7 +6743,7 @@ const IncomingTextMessageBubble = class {
|
|
|
6667
6743
|
this.showReactionOnHover = false;
|
|
6668
6744
|
}
|
|
6669
6745
|
render() {
|
|
6670
|
-
return (h("message-bubble", { key: '
|
|
6746
|
+
return (h("message-bubble", { key: 'f16a583b4ef9fcb808e9ea7febebae93d6d1f31c', 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: '93855e0f79c423d8d3bbce91cf94a55e7fc477b5', style: { fontFamily: this.fontFamily, color: this.color, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, renderMessageBody(this.textContent, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), false))));
|
|
6671
6747
|
}
|
|
6672
6748
|
};
|
|
6673
6749
|
IncomingTextMessageBubble.style = ":host { display: block; max-width: 80%; margin-left: 10px; }";
|
|
@@ -6688,7 +6764,7 @@ const MessageDatePill = class {
|
|
|
6688
6764
|
this.content = '';
|
|
6689
6765
|
}
|
|
6690
6766
|
render() {
|
|
6691
|
-
return (h("span", { key: '
|
|
6767
|
+
return (h("span", { key: '07d81baf556c1f5345bbf8cf6a534865dc28400f', class: "pill", style: {
|
|
6692
6768
|
background: this.bgColor,
|
|
6693
6769
|
color: this.textColor,
|
|
6694
6770
|
width: this.width,
|
|
@@ -6722,6 +6798,7 @@ const OutgoingTextMessageBubble = class {
|
|
|
6722
6798
|
this.alignSelf = undefined;
|
|
6723
6799
|
this.isRead = undefined;
|
|
6724
6800
|
this.isDelivered = undefined;
|
|
6801
|
+
this.deliveryStatus = undefined;
|
|
6725
6802
|
this.textColor = undefined;
|
|
6726
6803
|
this.mentionedUsers = [];
|
|
6727
6804
|
this.messageType = undefined;
|
|
@@ -6732,7 +6809,7 @@ const OutgoingTextMessageBubble = class {
|
|
|
6732
6809
|
this.fontFamily = 'var(--font-primary)';
|
|
6733
6810
|
}
|
|
6734
6811
|
render() {
|
|
6735
|
-
return (h("message-bubble", { key: '
|
|
6812
|
+
return (h("message-bubble", { key: '2cc678a3f9f3ce8b2b5192d12f42282809b774d0', 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: '07d5f13d5572d8e41cc87657457d0f1443f435cb', style: { fontFamily: this.fontFamily, color: this.textColor, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, renderMessageBody(this.textContent, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), true))));
|
|
6736
6813
|
}
|
|
6737
6814
|
};
|
|
6738
6815
|
OutgoingTextMessageBubble.style = ":host { display: block; max-width: 80%; margin-right: 10px; }";
|
|
@@ -6790,7 +6867,7 @@ const ReplyMessageContainer = class {
|
|
|
6790
6867
|
render() {
|
|
6791
6868
|
const parentBody = this.parentMessageBody || this.parentmessageBody || this.repliedMessage || '';
|
|
6792
6869
|
const parentName = this.parentMessageSenderName || this.senderName || 'Reply';
|
|
6793
|
-
return (h("message-bubble", { key: '
|
|
6870
|
+
return (h("message-bubble", { key: '19d3d2dbd694b65061f9c1c625827a732636eee3', 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: 'c1d4c598c474602a6cd60ed4b3b7299c262481ed', class: "quote", onClick: e => { var _a; return (_a = this.onMediaClick) === null || _a === void 0 ? void 0 : _a.call(this, e); } }, h("div", { key: 'ae9d571587c21542aaa7d299d68896730c59d519', class: "quote-sender" }, parentName), h("div", { key: '2c7e75a12de5dea06f8c9e90d957bf2d077f89a3', class: "quote-body" }, parentBody), this.parentMessageMediaUrl ? (h("img", { class: "quote-media", src: this.parentMessageMediaUrl, alt: "" })) : null), h("div", { key: 'fdfdd4fffe9e2da10ea7b22f30f8ed2ffd55713b', class: "reply-body", style: { color: this.color, fontSize: this.fontSize, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, this.messageBody)));
|
|
6794
6871
|
}
|
|
6795
6872
|
};
|
|
6796
6873
|
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; }";
|
|
@@ -7163,6 +7240,7 @@ const WebChatBody = class {
|
|
|
7163
7240
|
isSelf: isSelf,
|
|
7164
7241
|
isRead: message === null || message === void 0 ? void 0 : message.readByAll,
|
|
7165
7242
|
isDelivered: `${message === null || message === void 0 ? void 0 : message.deliveredToAll}`,
|
|
7243
|
+
deliveryStatus: (message === null || message === void 0 ? void 0 : message.deliveryStatus) || '',
|
|
7166
7244
|
textColor: 'var(--text-outgoing-message)',
|
|
7167
7245
|
timeColor: 'var(--text-outgoing-time)',
|
|
7168
7246
|
message: message === null || message === void 0 ? void 0 : message.body,
|
|
@@ -7600,7 +7678,7 @@ const WebChatBody = class {
|
|
|
7600
7678
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7601
7679
|
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);
|
|
7602
7680
|
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'));
|
|
7603
|
-
return (h("div", { key: '
|
|
7681
|
+
return (h("div", { key: '41349e4779d95a79ef70c03dfae5cb49a2b45414', class: `chat-body ${this.isChatBodyUnscrollable ? 'unscrollable' : null}` }, this.showScrollButton || this.newMessageNotification && (h("div", { key: '961f05e545a0e143777387b0e47e4600641873c7', onClick: this.scrollToBottom, style: {
|
|
7604
7682
|
position: 'sticky',
|
|
7605
7683
|
top: '90%',
|
|
7606
7684
|
left: '95%',
|
|
@@ -7614,7 +7692,7 @@ const WebChatBody = class {
|
|
|
7614
7692
|
cursor: 'pointer',
|
|
7615
7693
|
boxShadow: '0 2px 5px rgba(0,0,0,0.2)',
|
|
7616
7694
|
zIndex: '100',
|
|
7617
|
-
} }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (h("div", { key: '
|
|
7695
|
+
} }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (h("div", { key: '5c19e65015c475122cebb6c534acefead6b34d42', style: {
|
|
7618
7696
|
position: 'absolute',
|
|
7619
7697
|
bottom: '22px',
|
|
7620
7698
|
right: '-2px',
|
|
@@ -7628,7 +7706,7 @@ const WebChatBody = class {
|
|
|
7628
7706
|
justifyContent: 'center',
|
|
7629
7707
|
fontSize: '12px',
|
|
7630
7708
|
padding: '0 4px',
|
|
7631
|
-
} })), h("svg", { key: '
|
|
7709
|
+
} })), h("svg", { key: '5b5ebe5fd78b4edeb07af288de25ef448c80c8da', width: "20px", height: "30px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'cdadce78ef4ea10c889e7e9dfe1af479c96e3928', 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: '179cc7c4014f96666cb435fa8367259df8a3cdbd', style: {
|
|
7632
7710
|
display: 'flex',
|
|
7633
7711
|
flexDirection: 'column',
|
|
7634
7712
|
alignItems: 'center',
|
|
@@ -7638,7 +7716,7 @@ const WebChatBody = class {
|
|
|
7638
7716
|
textAlign: 'center',
|
|
7639
7717
|
color: 'var(--text-secondary-color)',
|
|
7640
7718
|
marginTop: '20px',
|
|
7641
|
-
} }, h("img", { key: '
|
|
7719
|
+
} }, h("img", { key: 'b5378a6691d73fc077fd4cdfddcac75e8e58fe6a', src: NoMessagePlaceholder, alt: "No messages", style: { width: '200px', height: '200px' } }), h("div", { key: '46d0559e27bcc19835a4302a1cc309d54e3676d2', style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px' } }, h("span", { key: '6e98d5e69eb9d6bb7d02492d081d6b168551efd3', style: { fontSize: '24px', color: 'var(--text-primary-color)' } }, "No messages"), h("span", { key: '0bde23971bbf29e2e96aae4f6f9cd0842a665bdb', style: { fontSize: '16px', color: 'var(--text-secondary-color)' } }, "Send a \"Hi\" and make someone's day brighter!")))), this.isMessagesLoading && (h("spinner-loader", { key: '202bb3f336ff309f71611c60529e589371df0eaf', 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 &&
|
|
7642
7720
|
((_h = this.userMetaData) === null || _h === void 0 ? void 0 : _h.userId) &&
|
|
7643
7721
|
(() => {
|
|
7644
7722
|
const total = this.allMessages.length;
|
|
@@ -7657,7 +7735,7 @@ const WebChatBody = class {
|
|
|
7657
7735
|
const previousMessageDate = formatMessageDateFromTimestamp(((_d = (_c = this.allMessages) === null || _c === void 0 ? void 0 : _c[index - 1]) === null || _d === void 0 ? void 0 : _d.sentAt) || '');
|
|
7658
7736
|
const showDatePill = currentMessageDate !== previousMessageDate;
|
|
7659
7737
|
let isSelf = ((message === null || message === void 0 ? void 0 : message.senderId) || ((_e = message === null || message === void 0 ? void 0 : message.senderInfo) === null || _e === void 0 ? void 0 : _e.userId)) === ((_f = this.userMetaData) === null || _f === void 0 ? void 0 : _f.userId);
|
|
7660
|
-
//
|
|
7738
|
+
// Host CE + SDK props/callbacks (functionality stays in SDK)
|
|
7661
7739
|
const bubbleTag = (_g = this.customParts) === null || _g === void 0 ? void 0 : _g.messageBubble;
|
|
7662
7740
|
if (bubbleTag) {
|
|
7663
7741
|
const status = deriveMessageStatus(message);
|
|
@@ -7706,7 +7784,7 @@ const WebChatBody = class {
|
|
|
7706
7784
|
else {
|
|
7707
7785
|
// Existing code for regular text messages
|
|
7708
7786
|
if (isSelf) {
|
|
7709
|
-
return (h("div", { style: { display: 'flex', width: '100%', flexDirection: 'column', gap: '15px' }, "data-message-id": message.messageId }, showDatePill && (h("div", { style: { display: 'flex', width: '100%', justifyContent: 'center' } }, this.renderDatePill(currentMessageDate))), h("div", { id: "outgoing-message", style: { position: 'relative', display: 'flex', width: '100%', justifyContent: 'end' }, "data-message-id": message.messageId }, h("outgoing-text-message-bubble", { isRead: message.readByAll, padding: "10px 10px 10px 10px", borderRadius: "10px 10px 0 10px", textContent: message === null || message === void 0 ? void 0 : message.body, time: message === null || message === void 0 ? void 0 : message.sentAt, bgColor: "var(--bg-outgoing-message)", textColor: "var(--text-outgoing-message)", isDelivered: `${message === null || message === void 0 ? void 0 : message.deliveredToAll}`, mentionedUsers: message === null || message === void 0 ? void 0 : message.mentionedUsers, messageId: message === null || message === void 0 ? void 0 : message.messageId, reactions: message === null || message === void 0 ? void 0 : message.reactions, messageType: message === null || message === void 0 ? void 0 : message.messageType, timeColor: "var(--text-outgoing-time)" }), this.renderKebab(message === null || message === void 0 ? void 0 : message.messageId, isSelf), this.isMessageActionOpen === (message === null || message === void 0 ? void 0 : message.messageId) ? this.renderMessageAction(message, isSelf, 'top') : null)));
|
|
7787
|
+
return (h("div", { style: { display: 'flex', width: '100%', flexDirection: 'column', gap: '15px' }, "data-message-id": message.messageId }, showDatePill && (h("div", { style: { display: 'flex', width: '100%', justifyContent: 'center' } }, this.renderDatePill(currentMessageDate))), h("div", { id: "outgoing-message", style: { position: 'relative', display: 'flex', width: '100%', justifyContent: 'end' }, "data-message-id": message.messageId }, h("outgoing-text-message-bubble", { isRead: message.readByAll, padding: "10px 10px 10px 10px", borderRadius: "10px 10px 0 10px", textContent: message === null || message === void 0 ? void 0 : message.body, time: message === null || message === void 0 ? void 0 : message.sentAt, bgColor: "var(--bg-outgoing-message)", textColor: "var(--text-outgoing-message)", isDelivered: `${message === null || message === void 0 ? void 0 : message.deliveredToAll}`, deliveryStatus: (message === null || message === void 0 ? void 0 : message.deliveryStatus) || '', mentionedUsers: message === null || message === void 0 ? void 0 : message.mentionedUsers, messageId: message === null || message === void 0 ? void 0 : message.messageId, reactions: message === null || message === void 0 ? void 0 : message.reactions, messageType: message === null || message === void 0 ? void 0 : message.messageType, timeColor: "var(--text-outgoing-time)" }), this.renderKebab(message === null || message === void 0 ? void 0 : message.messageId, isSelf), this.isMessageActionOpen === (message === null || message === void 0 ? void 0 : message.messageId) ? this.renderMessageAction(message, isSelf, 'top') : null)));
|
|
7710
7788
|
}
|
|
7711
7789
|
else {
|
|
7712
7790
|
return (h("div", { style: { display: 'flex', width: '100%', flexDirection: 'column', gap: '15px' }, "data-message-id": message.messageId }, showDatePill && (h("div", { style: { display: 'flex', width: '100%', justifyContent: 'center' } }, this.renderDatePill(currentMessageDate))), h("div", { style: (currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.isGroup) ? { display: 'flex' } : {}, id: "incoming-message" }, (currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.isGroup) && this.renderSenderAvatar(message), h("incoming-text-message-bubble", { color: "var(--text-incoming-message)", bgColor: "var(--bg-incoming-message)", timeColor: "var(--text-incoming-time)", borderRadius: "10px 10px 10px 0", time: message === null || message === void 0 ? void 0 : message.sentAt, textContent: message === null || message === void 0 ? void 0 : message.body, mentionedUsers: message === null || message === void 0 ? void 0 : message.mentionedUsers, messageId: message === null || message === void 0 ? void 0 : message.messageId, reactions: message === null || message === void 0 ? void 0 : message.reactions, padding: "10px 10px 20px 10px", userMetaData: this.userMetaData, messageType: message === null || message === void 0 ? void 0 : message.messageType }), this.renderKebab(message === null || message === void 0 ? void 0 : message.messageId, isSelf), this.isMessageActionOpen === (message === null || message === void 0 ? void 0 : message.messageId) ? this.renderMessageAction(message, isSelf, 'top') : null)));
|