isometrik-plugin-chat-sdk 1.3.19 → 2.0.1
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
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# Integration guide (any framework)
|
|
2
|
+
|
|
3
|
+
Isometrik WebChat is a **web-component SDK**. React, Angular, Vue, Svelte, and plain HTML all use the same contract.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import {
|
|
7
|
+
initializeIsometrikWebchat,
|
|
8
|
+
destroyIsometrikWebchat,
|
|
9
|
+
isometrikWebchatApi,
|
|
10
|
+
THEME_TOKEN_NAMES,
|
|
11
|
+
createSlotHost,
|
|
12
|
+
setWebChatSlot,
|
|
13
|
+
} from 'isometrik-plugin-chat-sdk';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`initializeChat` / `destroyChat` remain as deprecated aliases.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 1. Minimal mount
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
const chat = initializeIsometrikWebchat({
|
|
24
|
+
containerId: 'chat-root',
|
|
25
|
+
licenseKey, appSecret, userSecret,
|
|
26
|
+
userToken, isometrikUserId,
|
|
27
|
+
accountId, projectId, keysetId,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// later
|
|
31
|
+
chat.destroy();
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Returns `{ themeProvider, chatComponent, api, destroy }` or `null` if creds are missing.
|
|
35
|
+
|
|
36
|
+
### Avoid double API calls (React / SPA)
|
|
37
|
+
|
|
38
|
+
`initializeIsometrikWebchat` **always** tears down and bootstraps (user, conversations, MQTT…).
|
|
39
|
+
On every page remount / React 18 Strict Mode that means **duplicate API calls**.
|
|
40
|
+
|
|
41
|
+
Use retain/release instead:
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
import { useEffect } from 'react';
|
|
45
|
+
import {
|
|
46
|
+
retainIsometrikWebchat,
|
|
47
|
+
releaseIsometrikWebchat,
|
|
48
|
+
} from 'isometrik-plugin-chat-sdk';
|
|
49
|
+
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
retainIsometrikWebchat({ containerId: 'chat-root', /* creds */ });
|
|
52
|
+
return () => releaseIsometrikWebchat(); // deferred destroy — Strict Mode safe
|
|
53
|
+
}, [userToken, isometrikUserId]); // only remount when identity changes
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
| Helper | When |
|
|
57
|
+
|--------|------|
|
|
58
|
+
| `retainIsometrikWebchat` + `releaseIsometrikWebchat` | React / SPA (recommended) |
|
|
59
|
+
| `ensureIsometrikWebchat` | Reuse if same user/token/container already live |
|
|
60
|
+
| `initializeIsometrikWebchat` | Force fresh mount (logout → login, tests) |
|
|
61
|
+
|
|
62
|
+
Full page reload = one bootstrap is **expected**. Faulty = **two bootstraps without reload**.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 2. UI composition (show / custom / default)
|
|
67
|
+
|
|
68
|
+
For every major region:
|
|
69
|
+
|
|
70
|
+
| Flag | Slot | Result |
|
|
71
|
+
|------|------|--------|
|
|
72
|
+
| `showX: false` | anything | Hidden (flag wins) |
|
|
73
|
+
| `true` / default | `slots['…']` provided | Host element |
|
|
74
|
+
| `true` / default | omitted | SDK default UI |
|
|
75
|
+
|
|
76
|
+
**Flags:** `showProfileSidebar` (alias `showProfileRail`), `showHeader`, `showComposer`, `showEmptyState`, `showConversationList`, `showRightPanel`, `showChatWallpaper`, `groupcastEnabled`
|
|
77
|
+
|
|
78
|
+
**Slots:** see `WEB_CHAT_SLOTS` / [CUSTOMIZATION.md](./CUSTOMIZATION.md)
|
|
79
|
+
|
|
80
|
+
```js
|
|
81
|
+
const rail = document.createElement('div');
|
|
82
|
+
rail.textContent = 'My rail';
|
|
83
|
+
|
|
84
|
+
initializeIsometrikWebchat({
|
|
85
|
+
/* creds */,
|
|
86
|
+
showProfileSidebar: true,
|
|
87
|
+
showHeader: true,
|
|
88
|
+
slots: { 'profile-rail': rail },
|
|
89
|
+
});
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Rows / overlays** use `customParts` (CE tag names), not slots — SDK passes props + callbacks.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 3. Theme & fonts
|
|
97
|
+
|
|
98
|
+
Token list: `THEME_TOKEN_NAMES`
|
|
99
|
+
Copyable CSS: [theme-tokens.template.css](./theme-tokens.template.css)
|
|
100
|
+
|
|
101
|
+
```js
|
|
102
|
+
initializeIsometrikWebchat({
|
|
103
|
+
/* creds */,
|
|
104
|
+
themeUrl: 'https://cdn.example.com/my-chat-theme.css',
|
|
105
|
+
// object wins on conflicting keys:
|
|
106
|
+
theme: {
|
|
107
|
+
'--brand': '#0a7',
|
|
108
|
+
'--font-primary': 'Georgia, serif',
|
|
109
|
+
'--text-16': '15px',
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 4. APIs for custom UI
|
|
117
|
+
|
|
118
|
+
### Live instance (`chat.api`)
|
|
119
|
+
|
|
120
|
+
```js
|
|
121
|
+
const { api } = initializeIsometrikWebchat({ /* creds */ });
|
|
122
|
+
|
|
123
|
+
api.on('conversationsChange', e => console.log(e.detail));
|
|
124
|
+
await api.selectConversation(id);
|
|
125
|
+
await api.sendText('hello');
|
|
126
|
+
const state = await api.getChatState();
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Methods: `selectConversation`, `sendText`, `sendMedia`, `setReply`, `clearReply`, `loadMoreMessages`, `loadMoreConversations`, `getChatState`, `setCustomParts`
|
|
130
|
+
|
|
131
|
+
### Headless (`isometrikWebchatApi`)
|
|
132
|
+
|
|
133
|
+
Same REST helpers the shell uses — for fully custom chrome:
|
|
134
|
+
|
|
135
|
+
```js
|
|
136
|
+
isometrikWebchatApi.session.init({ baseUrl, licenseKey, appSecret, userSecret, userToken });
|
|
137
|
+
const me = await isometrikWebchatApi.session.fetchUserDetails();
|
|
138
|
+
const list = await isometrikWebchatApi.conversations.list({ skip: 0 });
|
|
139
|
+
const msgs = await isometrikWebchatApi.messages.list({ conversationId: id });
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 5. Framework snippets
|
|
145
|
+
|
|
146
|
+
### Vanilla
|
|
147
|
+
|
|
148
|
+
```html
|
|
149
|
+
<div id="chat-root" style="height:100vh"></div>
|
|
150
|
+
<script type="module">
|
|
151
|
+
import { initializeIsometrikWebchat } from 'isometrik-plugin-chat-sdk';
|
|
152
|
+
initializeIsometrikWebchat({ containerId: 'chat-root', /* creds */ });
|
|
153
|
+
</script>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### React / Next.js (client only) — pass React components
|
|
157
|
+
|
|
158
|
+
The SDK is web components. Use the React bridge to convert your components:
|
|
159
|
+
|
|
160
|
+
```tsx
|
|
161
|
+
'use client';
|
|
162
|
+
import { useEffect, useRef } from 'react';
|
|
163
|
+
import { createElement } from 'react';
|
|
164
|
+
import { createRoot } from 'react-dom/client';
|
|
165
|
+
import {
|
|
166
|
+
retainIsometrikWebchat,
|
|
167
|
+
releaseIsometrikWebchat,
|
|
168
|
+
defineReactCustomPart,
|
|
169
|
+
mountReactInSlot,
|
|
170
|
+
} from 'isometrik-plugin-chat-sdk';
|
|
171
|
+
|
|
172
|
+
function MyProfileRail({ badge }: { badge?: number }) {
|
|
173
|
+
return <div>My rail {badge}</div>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function MyChatTile({ conversation, onSelect }: any) {
|
|
177
|
+
return (
|
|
178
|
+
<button type="button" onClick={() => onSelect?.(conversation.conversationId)}>
|
|
179
|
+
{conversation?.conversationTitle}
|
|
180
|
+
</button>
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export function Chat({ creds }) {
|
|
185
|
+
const rootRef = useRef<HTMLDivElement>(null);
|
|
186
|
+
|
|
187
|
+
useEffect(() => {
|
|
188
|
+
// Rows / bubbles → custom element tag
|
|
189
|
+
defineReactCustomPart('app-chat-tile', MyChatTile, {
|
|
190
|
+
react: { createElement },
|
|
191
|
+
createRoot,
|
|
192
|
+
propKeys: ['conversation', 'isSelected', 'unreadCount', 'previewText', 'onSelect'],
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
// Panels → slot host with React mounted inside
|
|
196
|
+
const rail = mountReactInSlot('profile-rail', MyProfileRail, {
|
|
197
|
+
react: { createElement },
|
|
198
|
+
createRoot,
|
|
199
|
+
props: { badge: 0 },
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
retainIsometrikWebchat({
|
|
203
|
+
...creds,
|
|
204
|
+
containerId: 'isometrik-chat-root',
|
|
205
|
+
slots: { 'profile-rail': rail },
|
|
206
|
+
customParts: { chatTile: 'app-chat-tile' },
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
return () => {
|
|
210
|
+
rail.unmount();
|
|
211
|
+
releaseIsometrikWebchat(); // do not call destroy() here — avoids Strict Mode double APIs
|
|
212
|
+
};
|
|
213
|
+
}, [creds.userToken, creds.isometrikUserId]);
|
|
214
|
+
|
|
215
|
+
return <div id="isometrik-chat-root" ref={rootRef} style={{ height: '100%' }} />;
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
| Want | Use |
|
|
220
|
+
|------|-----|
|
|
221
|
+
| Replace profile rail / header / composer panel | `mountReactInSlot(slotName, Component, …)` → `slots` |
|
|
222
|
+
| Replace chat tile / message bubble / row | `defineReactCustomPart(tag, Component, { propKeys })` → `customParts` |
|
|
223
|
+
|
|
224
|
+
You still pass **tag strings** / **HTMLElements** into init — the bridge turns React into those.
|
|
225
|
+
|
|
226
|
+
### Angular
|
|
227
|
+
|
|
228
|
+
```ts
|
|
229
|
+
ngOnInit() {
|
|
230
|
+
this.instance = initializeIsometrikWebchat({
|
|
231
|
+
containerId: 'chat-root',
|
|
232
|
+
...this.creds,
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
ngOnDestroy() {
|
|
236
|
+
this.instance?.destroy();
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
```html
|
|
241
|
+
<div id="chat-root" style="height:100%"></div>
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Custom panels: create an `HTMLElement`, set `slots`, or project into a host created with `createSlotHost`.
|
|
245
|
+
|
|
246
|
+
### Vue 3
|
|
247
|
+
|
|
248
|
+
```vue
|
|
249
|
+
<script setup>
|
|
250
|
+
import { onMounted, onBeforeUnmount } from 'vue';
|
|
251
|
+
import { initializeIsometrikWebchat } from 'isometrik-plugin-chat-sdk';
|
|
252
|
+
|
|
253
|
+
let instance;
|
|
254
|
+
onMounted(() => {
|
|
255
|
+
instance = initializeIsometrikWebchat({ containerId: 'chat-root', /* creds */ });
|
|
256
|
+
});
|
|
257
|
+
onBeforeUnmount(() => instance?.destroy());
|
|
258
|
+
</script>
|
|
259
|
+
<template>
|
|
260
|
+
<div id="chat-root" style="height:100%" />
|
|
261
|
+
</template>
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## 6. Rules that prevent bugs
|
|
267
|
+
|
|
268
|
+
1. Mount **client-side only** (no SSR init).
|
|
269
|
+
2. Call `destroy()` on unmount / logout.
|
|
270
|
+
3. Do not `querySelector` into shadow children to set props — use init props / `api` / `setCustomParts`.
|
|
271
|
+
4. Empty slot nodes suppress defaults — only attach a slot when you have real UI (helpers clear/replace safely).
|
|
272
|
+
5. Prefer `chat.api` / `resolveWebChat(el)` over bare `document.querySelector('web-chat')`.
|
|
273
|
+
6. Theme is **scoped** to `theme-provider` (does not restyle `<html>` unless `mirrorToDocument`).
|
|
274
|
+
|
|
275
|
+
## 7. Local demos (`npm start`)
|
|
276
|
+
|
|
277
|
+
| URL | What it proves |
|
|
278
|
+
|-----|----------------|
|
|
279
|
+
| [/sdk-demos.html](http://localhost:3333/sdk-demos.html) | Two themes on one page; host page colors untouched |
|
|
280
|
+
| [/react-host-demo.html](http://localhost:3333/react-host-demo.html) | `mountReactInSlot` + `defineReactCustomPart` with CDN React |
|
|
281
|
+
| [/custom-ui-demo.html](http://localhost:3333/custom-ui-demo.html) | customParts guide |
|
|
282
|
+
|
|
283
|
+
```js
|
|
284
|
+
switchChatTheme('dark', themeProviderEl); // optional 2nd arg = instance scope
|
|
285
|
+
applyCustomTheme({ themeObject: { '--brand': '#0a7' } }, themeProviderEl);
|
|
286
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Reliability & offline
|
|
2
|
+
|
|
3
|
+
This SDK aims for **message trust**: nothing silent-drops when the network blips.
|
|
4
|
+
|
|
5
|
+
## What you get
|
|
6
|
+
|
|
7
|
+
| Capability | Behavior |
|
|
8
|
+
|------------|----------|
|
|
9
|
+
| **MQTT reconnect** | Auto-reconnect (~2s), resubscribe, soft gap-fill (merge, no wipe) |
|
|
10
|
+
| **Offline poll** | While MQTT is down, light REST refresh of the open thread |
|
|
11
|
+
| **IndexedDB cache** | Conversations + messages persisted per user (`isometrik-webchat-v1`) |
|
|
12
|
+
| **Instant paint** | Boot / open chat hydrates from cache, then network syncs |
|
|
13
|
+
| **Text outbox** | Offline or failed sends stay in the bubble and queue; flush on `online` + MQTT connect |
|
|
14
|
+
| **Multi-tab** | `BroadcastChannel` shares conversation/message updates across tabs |
|
|
15
|
+
|
|
16
|
+
Media send outbox (blob queue) is intentionally **not** in v1 — text reliability first.
|
|
17
|
+
|
|
18
|
+
## Host tips
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
retainIsometrikWebchat({ /* creds */ });
|
|
22
|
+
// …user uses chat normally…
|
|
23
|
+
// logout:
|
|
24
|
+
destroyIsometrikWebchat();
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- Prefer `retain` / `release` so remounts don’t wipe the live session.
|
|
28
|
+
- Full page reload still rehydrates from IndexedDB (same browser profile).
|
|
29
|
+
- Private / blocked IndexedDB → automatic **memory** fallback (session-only).
|
|
30
|
+
|
|
31
|
+
## Delivery states (text)
|
|
32
|
+
|
|
33
|
+
Optimistic local row:
|
|
34
|
+
|
|
35
|
+
- `deliveryStatus: 'sending' | 'outbox' | 'sent'`
|
|
36
|
+
- `deliveredToAll: 'pending' | false | true` (server / MQTT updates)
|
|
37
|
+
|
|
38
|
+
Outboxed rows keep `outbox: true` until flush succeeds.
|
|
39
|
+
|
|
40
|
+
## Limits (honest)
|
|
41
|
+
|
|
42
|
+
- No cross-device offline sync (that’s server-side).
|
|
43
|
+
- No encrypted-at-rest beyond what the browser provides for IndexedDB.
|
|
44
|
+
- Very large histories: we store what the SDK has fetched (paginate still applies).
|
|
45
|
+
- Clearing site data wipes the cache/outbox.
|
|
46
|
+
|
|
47
|
+
## Debugging
|
|
48
|
+
|
|
49
|
+
DevTools → Application → IndexedDB → `isometrik-webchat-v1`:
|
|
50
|
+
|
|
51
|
+
- `conversations`, `messages`, `outbox`, `meta`
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Isometrik WebChat — host theme template
|
|
3
|
+
*
|
|
4
|
+
* 1. Copy this file (or host it on your CDN).
|
|
5
|
+
* 2. Change only the values you care about.
|
|
6
|
+
* 3. Pass the URL: initializeIsometrikWebchat({ themeUrl: 'https://…/my-theme.css' })
|
|
7
|
+
* Or pass inline: { theme: { '--brand': '#0a7', '--font-primary': 'Georgia, serif' } }
|
|
8
|
+
*
|
|
9
|
+
* Apply order: package defaults → themeUrl → theme object (object wins).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
:root,
|
|
13
|
+
.theme-light {
|
|
14
|
+
--font-primary: 'Plus Jakarta Sans', sans-serif;
|
|
15
|
+
|
|
16
|
+
--bg-primary: #ffffff;
|
|
17
|
+
--bg-secondary: #e1ecf6;
|
|
18
|
+
--bg-tertiary: #f0f2f5;
|
|
19
|
+
--bg-input: #f1f5f9;
|
|
20
|
+
--bg-row-hover: #e2effb;
|
|
21
|
+
|
|
22
|
+
--text-primary: #111827;
|
|
23
|
+
--text-secondary: #64748b;
|
|
24
|
+
--text-tertiary: #94a3b8;
|
|
25
|
+
--text-on-brand: #ffffff;
|
|
26
|
+
|
|
27
|
+
--brand: #2563eb;
|
|
28
|
+
--brand-soft: rgba(37, 99, 235, 0.1);
|
|
29
|
+
--brand-muted: rgba(239, 246, 255, 0.7);
|
|
30
|
+
|
|
31
|
+
--border: #e5e7eb;
|
|
32
|
+
--border-subtle: #f1f5f9;
|
|
33
|
+
--success: #10b981;
|
|
34
|
+
--danger: #fa0000;
|
|
35
|
+
--hover-overlay: rgba(0, 0, 0, 0.05);
|
|
36
|
+
--overlay: rgba(0, 0, 0, 0.3);
|
|
37
|
+
--focus-ring: rgba(37, 99, 235, 0.4);
|
|
38
|
+
--icon: #54656f;
|
|
39
|
+
--svg-icon-filter: none;
|
|
40
|
+
|
|
41
|
+
--text-12: 0.75rem;
|
|
42
|
+
--text-14: 0.875rem;
|
|
43
|
+
--text-16: 1rem;
|
|
44
|
+
--text-18: 1.125rem;
|
|
45
|
+
--rail-width: 4rem;
|
|
46
|
+
--rounded-8: 0.5rem;
|
|
47
|
+
--rounded-12: 0.75rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.theme-dark {
|
|
51
|
+
--bg-primary: #0e0a1f;
|
|
52
|
+
--bg-secondary: #212936;
|
|
53
|
+
--bg-tertiary: #1a1529;
|
|
54
|
+
--bg-input: #1d182f;
|
|
55
|
+
--bg-row-hover: #231e36;
|
|
56
|
+
|
|
57
|
+
--text-primary: #ffffff;
|
|
58
|
+
--text-secondary: #9ea4c3;
|
|
59
|
+
--text-tertiary: #c5c0ff;
|
|
60
|
+
|
|
61
|
+
--brand: #7062e9;
|
|
62
|
+
--brand-soft: rgba(112, 98, 233, 0.25);
|
|
63
|
+
--brand-muted: rgba(62, 51, 97, 0.7);
|
|
64
|
+
|
|
65
|
+
--border: #293343;
|
|
66
|
+
--border-subtle: #231e36;
|
|
67
|
+
--hover-overlay: rgba(255, 255, 255, 0.06);
|
|
68
|
+
--overlay: rgba(0, 0, 0, 0.5);
|
|
69
|
+
--focus-ring: rgba(112, 98, 233, 0.5);
|
|
70
|
+
--icon: #9ea4c3;
|
|
71
|
+
--svg-icon-filter: brightness(0) invert(1);
|
|
72
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isometrik-plugin-chat-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Isometrik WebChat SDK — embeddable real-time chat web components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -42,7 +42,13 @@
|
|
|
42
42
|
"url": "https://bitbucket.org/rsharma87/isometrik-webchat.git"
|
|
43
43
|
},
|
|
44
44
|
"files": [
|
|
45
|
-
"dist/"
|
|
45
|
+
"dist/",
|
|
46
|
+
"readme.md",
|
|
47
|
+
"docs/CUSTOMIZATION.md",
|
|
48
|
+
"docs/INTEGRATION.md",
|
|
49
|
+
"docs/RELIABILITY.md",
|
|
50
|
+
"docs/theme-tokens.template.css",
|
|
51
|
+
"docs/ARCHITECTURE.md"
|
|
46
52
|
],
|
|
47
53
|
"scripts": {
|
|
48
54
|
"build": "stencil build && node scripts/copy-www-assets.mjs && node scripts/copy-loader-assets.mjs",
|
package/readme.md
CHANGED
|
@@ -37,10 +37,10 @@ whole `dist/isometrik-webchat/` folder (or load from unpkg / jsDelivr).
|
|
|
37
37
|
```html
|
|
38
38
|
<link
|
|
39
39
|
rel="stylesheet"
|
|
40
|
-
href="https://unpkg.com/isometrik-plugin-chat-sdk@
|
|
40
|
+
href="https://unpkg.com/isometrik-plugin-chat-sdk@2.0.1/dist/isometrik-webchat/isometrik-webchat.css"
|
|
41
41
|
/>
|
|
42
42
|
<script type="module">
|
|
43
|
-
import { initializeChat } from 'https://unpkg.com/isometrik-plugin-chat-sdk@
|
|
43
|
+
import { initializeChat } from 'https://unpkg.com/isometrik-plugin-chat-sdk@2.0.1/dist/isometrik-webchat/isometrik-webchat.esm.js';
|
|
44
44
|
// …
|
|
45
45
|
</script>
|
|
46
46
|
```
|
|
@@ -50,7 +50,7 @@ Optional override before load:
|
|
|
50
50
|
```html
|
|
51
51
|
<script>
|
|
52
52
|
globalThis.ISOMETRIK_WEBCHAT_ASSET_BASE =
|
|
53
|
-
'https://unpkg.com/isometrik-plugin-chat-sdk@
|
|
53
|
+
'https://unpkg.com/isometrik-plugin-chat-sdk@2.0.1/dist/isometrik-webchat';
|
|
54
54
|
</script>
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -62,9 +62,12 @@ Optional override before load:
|
|
|
62
62
|
<div id="chat-root" style="height: 100vh; width: 100%;"></div>
|
|
63
63
|
|
|
64
64
|
<script type="module">
|
|
65
|
-
import {
|
|
65
|
+
import {
|
|
66
|
+
initializeIsometrikWebchat,
|
|
67
|
+
destroyIsometrikWebchat,
|
|
68
|
+
} from 'isometrik-plugin-chat-sdk';
|
|
66
69
|
|
|
67
|
-
|
|
70
|
+
const chat = initializeIsometrikWebchat({
|
|
68
71
|
containerId: 'chat-root',
|
|
69
72
|
licenseKey: 'YOUR_LICENSE_KEY',
|
|
70
73
|
appSecret: 'YOUR_APP_SECRET',
|
|
@@ -78,17 +81,27 @@ Optional override before load:
|
|
|
78
81
|
baseUrl: 'https://apis.isometrik.io',
|
|
79
82
|
hostUrl: 'wss://connections.isometrik.io:2053/mqtt',
|
|
80
83
|
defaultTheme: 'light',
|
|
84
|
+
theme: { '--brand': '#2563eb' },
|
|
81
85
|
});
|
|
82
86
|
|
|
83
|
-
//
|
|
84
|
-
// destroyChat
|
|
87
|
+
// chat.api.sendText('hello') · chat.destroy()
|
|
88
|
+
// aliases: initializeChat / destroyChat still work
|
|
85
89
|
</script>
|
|
86
90
|
```
|
|
87
91
|
|
|
92
|
+
Guides: [docs/INTEGRATION.md](./docs/INTEGRATION.md) · [docs/CUSTOMIZATION.md](./docs/CUSTOMIZATION.md) · [docs/theme-tokens.template.css](./docs/theme-tokens.template.css)
|
|
93
|
+
|
|
94
|
+
**React components:** use `mountReactInSlot` (panels) and `defineReactCustomPart` (tiles/bubbles) — pass your `createElement` + `createRoot`; the SDK stays framework-agnostic.
|
|
95
|
+
|
|
96
|
+
**Local demos** (`npm start`): [/sdk-demos.html](http://localhost:3333/sdk-demos.html) (scoped themes) · [/react-host-demo.html](http://localhost:3333/react-host-demo.html) (React bridge)
|
|
97
|
+
|
|
98
|
+
**Reliability:** IndexedDB cache, text outbox, MQTT reconnect + gap-fill, multi-tab sync — see [docs/RELIABILITY.md](./docs/RELIABILITY.md).
|
|
99
|
+
|
|
88
100
|
When the ESM bundle is loaded on the page, the same helpers are also available on `window`:
|
|
89
101
|
|
|
90
|
-
- `window.initializeChat`
|
|
91
|
-
- `window.destroyChat`
|
|
102
|
+
- `window.initializeIsometrikWebchat` / `window.initializeChat`
|
|
103
|
+
- `window.destroyIsometrikWebchat` / `window.destroyChat`
|
|
104
|
+
- `window.isometrikWebchatApi`
|
|
92
105
|
- `window.switchChatTheme`
|
|
93
106
|
- `window.applyCustomTheme`
|
|
94
107
|
- `window.toggleTheme`
|
|
@@ -98,7 +111,7 @@ When the ESM bundle is loaded on the page, the same helpers are also available o
|
|
|
98
111
|
|
|
99
112
|
## API reference
|
|
100
113
|
|
|
101
|
-
### `
|
|
114
|
+
### `initializeIsometrikWebchat(props)` (alias: `initializeChat`)
|
|
102
115
|
|
|
103
116
|
Creates `<theme-provider>` + `<web-chat>`, mounts into `containerId` (or `document.body`), connects Chat SDK + MQTT, and loads conversations.
|
|
104
117
|
|
|
@@ -117,17 +130,25 @@ Creates `<theme-provider>` + `<web-chat>`, mounts into `containerId` (or `docume
|
|
|
117
130
|
| `containerId` | no | DOM id to mount into |
|
|
118
131
|
| `defaultTheme` | no | `'light'` \| `'dark'` |
|
|
119
132
|
| `themeUrl` | no | Custom theme CSS URL |
|
|
120
|
-
| `
|
|
121
|
-
| `
|
|
122
|
-
| `
|
|
123
|
-
| `
|
|
133
|
+
| `theme` | no | Inline CSS var map (e.g. `{ '--brand': '#0a7' }`). Wins over `themeUrl` for same keys |
|
|
134
|
+
| `slots` | no | Optional panel HTMLElements (`sidebar`, `profile-rail`, `header`, …) |
|
|
135
|
+
| `customParts` | no | Optional CE tags: bubbles, tiles, overlays (`messageBubble`, `chatTile`, …) |
|
|
136
|
+
| `showProfileRail` / `showProfileSidebar` | no | Hide/show profile icon rail (default `true`) |
|
|
137
|
+
| `showHeader` / `showComposer` / `showEmptyState` / `showConversationList` / `showRightPanel` | no | Region visibility (default `true`) |
|
|
138
|
+
| `showChatWallpaper` | no | `false` uses a flat pane (default `true`) |
|
|
139
|
+
| `groupcastEnabled` | no | `false` disables groupcast (default `true`) |
|
|
124
140
|
|
|
125
|
-
Returns `{ themeProvider, chatComponent, destroy }` or `null` if required props are missing. Calling again is **idempotent** — it destroys the previous instance first.
|
|
141
|
+
Returns `{ themeProvider, chatComponent, api, destroy }` or `null` if required props are missing. Calling again is **idempotent** — it destroys the previous instance first.
|
|
126
142
|
|
|
127
|
-
### `
|
|
143
|
+
### `destroyIsometrikWebchat()` (alias: `destroyChat`)
|
|
128
144
|
|
|
129
145
|
Tears down MQTT (via component disconnect), removes chat DOM, and cleans empty theme providers.
|
|
130
146
|
|
|
147
|
+
### `chat.api` / `isometrikWebchatApi`
|
|
148
|
+
|
|
149
|
+
- **Instance:** `chat.api.selectConversation`, `sendText`, `sendMedia`, `getChatState`, `on(event, handler)`, …
|
|
150
|
+
- **Headless:** `isometrikWebchatApi.conversations.list()`, `messages.list()`, `session.init()`, …
|
|
151
|
+
|
|
131
152
|
### Theme helpers
|
|
132
153
|
|
|
133
154
|
```js
|
|
@@ -150,7 +171,7 @@ import { customChatSidebar } from 'isometrik-webchat';
|
|
|
150
171
|
customChatSidebar({ isChatFilter: true });
|
|
151
172
|
```
|
|
152
173
|
|
|
153
|
-
### Custom UI
|
|
174
|
+
### Custom UI
|
|
154
175
|
|
|
155
176
|
**Primary:** `customParts` — host custom elements; SDK passes **props + callbacks** (text, status, `metaData`, `onSelect` / `onTap` / `onReply`). Functionality stays in the SDK.
|
|
156
177
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"app-globals-3a1e7e63.js","mappings":";;AAAY,MAAC,aAAa,GAAG,MAAM;;;;","names":[],"sources":["@stencil/core/internal/app-globals"],"sourcesContent":["export const globalScripts = () => {};\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"chat-creds-cf537d4b.js","mappings":";;AAAA;AACY,MAAC,UAAU,GAAG;AAC1B,EAAE,SAAS,EAAE,sIAAsI;AACnJ;AACA;AACA,EAAE,SAAS,EAAE,iTAAiT;AAC9T;AACA;AACA,EAAE,UAAU,EAAE,yCAAyC;AACvD;AACA,EAAE,UAAU,EAAE,iTAAiT;AAC/T;AACA,EAAE,SAAS,EAAE,0BAA0B;AACvC,EAAE,QAAQ,EAAE,sCAAsC;AAClD,EAAE,SAAS,EAAE,sCAAsC;AACnD,EAAE,OAAO,EAAE,2BAA2B;AACtC,EAAE,eAAe,EAAE,0BAA0B;AAC7C,EAAE;AACF;AACY,MAAC,UAAU,GAAG;AAC1B,EAAE,GAAG,EAAE,0CAA0C;AACjD,EAAE,QAAQ,EAAE,iTAAiT;AAC7T,EAAE,QAAQ,EAAE,yCAAyC;AACrD,EAAE;AACF;AACY,MAAC,0BAA0B,GAAG;AAC1C,EAAE,UAAU,EAAE,yCAAyC;AACvD,EAAE,SAAS,EAAE,iTAAiT;AAC9T,EAAE,UAAU,EAAE,iTAAiT;AAC/T,EAAE,SAAS,EAAE,0BAA0B;AACvC,EAAE,QAAQ,EAAE,sCAAsC;AAClD,EAAE,SAAS,EAAE,sCAAsC;AACnD;;;;;;","names":[],"sources":["src/constants/chat-creds.js"],"sourcesContent":["// for fancy\nexport const CHAT_CREDS = {\n userToken: 'SFMyNTY.g3QAAAACZAAEZGF0YW0AAAAYNjZmMjVkMWU3Zjc1NTkwMDM3MjNjN2QxZAAGc2lnbmVkbgYArMC7IpIB.ECtG8Fio6sLZbpNQcM1tFCZcVyCRPpFG9BwWMOEpCTA', // rounit\n\n // appSecret : will be same for a single applicaton\n appSecret: 'SFMyNTY.g3QAAAACZAAEZGF0YXQAAAADbQAAAAlhY2NvdW50SWRtAAAAGDYxMjUwNDAzMDg4MDg1MDAwMWFhM2Y1Y20AAAAIa2V5c2V0SWRtAAAAJGFlYTkzY2YxLTY5MTYtNDA1MS1iM2I4LWRkMDAyMGViMTU3MW0AAAAJcHJvamVjdElkbQAAACQ3MjNjOTFlYS0xNTdkLTQ2YzMtYTljZS1iNWJiZGYwYmZjN2RkAAZzaWduZWRuBgDXqeZ4hgE.sbacYYKGfKuj-iJnkeV2rFlX6MFDtWOcoLcKL3uW8ic',\n\n // licenseKey : will be same for a single applicaton\n licenseKey: 'lic-IMKRrezOZJXtmmiUtyJk5ed4ptzoWWa4fU9',\n\n userSecret: \"SFMyNTY.g3QAAAACZAAEZGF0YXQAAAADbQAAAAlhY2NvdW50SWRtAAAAGDY2YjM1ZWI4YTkyODU2MDAzMzFlYjg2Nm0AAAAIa2V5c2V0SWRtAAAAJGExMTdjZmM0LTFiZGQtNDM2Yy1iYTA1LWY4MjZkNDcwNzIyZm0AAAAJcHJvamVjdElkbQAAACQ4ZThjMzM0OS1iMWI0LTRhMTgtOWQ2MS1mNDdkMDA3ODRhZDZkAAZzaWduZWRuBgD3Jq8skQE.1xAAsWeZyLGLkzddin2e8uG-s6qKyPs7EIx4jZnCIb0\",\n\n accountId: \"612504030880850001aa3f5c\",\n keysetId: \"aea93cf1-6916-4051-b3b8-dd0020eb1571\",\n projectId: '723c91ea-157d-46c3-a9ce-b5bbdf0bfc7d',\n baseUrl: 'https://apis.isometrik.io',\n isometrikUserId: '66f25d1e7f7559003723c7d1' // rounit\n};\n\nexport const MQTT_CREDS = {\n URL: \"wss://connections.isometrik.io:2053/mqtt\",\n UserName: \"SFMyNTY.g3QAAAACZAAEZGF0YXQAAAADbQAAAAlhY2NvdW50SWRtAAAAGDY2YjM1ZWI4YTkyODU2MDAzMzFlYjg2Nm0AAAAIa2V5c2V0SWRtAAAAJGExMTdjZmM0LTFiZGQtNDM2Yy1iYTA1LWY4MjZkNDcwNzIyZm0AAAAJcHJvamVjdElkbQAAACQ4ZThjMzM0OS1iMWI0LTRhMTgtOWQ2MS1mNDdkMDA3ODRhZDZkAAZzaWduZWRuBgD3Jq8skQE.dhMCO0iqyKWtfSLQqzUWigBhOQHHe539zcb393bPa1s\",\n Password: 'lic-IMK76kZNa/x3Q3mOeC0mwBRy9Fz2dxcqq72'\n};\n\nexport const isometrikFlutterAppSecrets = {\n licenseKey: 'lic-IMKPioj9hM3hMCh5eoeRC+d+l2TuxWOyPK3',\n appSecret: 'SFMyNTY.g3QAAAACZAAEZGF0YXQAAAADbQAAAAlhY2NvdW50SWRtAAAAGDVlYjNkYjliYTkyNTIwMDAwMTRmODJmZm0AAAAIa2V5c2V0SWRtAAAAJDQwMDYzYWJiLTVhZjEtNGZkNC1hN2YwLWFkYzQ3Njc4MTBiMW0AAAAJcHJvamVjdElkbQAAACRlMTI0MTAzOS0yZmVmLTQ4MzAtYjkyNy01YmIzNDI0ZjE3NjRkAAZzaWduZWRuBgAyRZTfiQE.Cd8oTBl0_bylLMQ45YXxUYqyIhbxstGEwCRIgLlQC3Y',\n userSecret: 'SFMyNTY.g3QAAAACZAAEZGF0YXQAAAADbQAAAAlhY2NvdW50SWRtAAAAGDVlYjNkYjliYTkyNTIwMDAwMTRmODJmZm0AAAAIa2V5c2V0SWRtAAAAJDQwMDYzYWJiLTVhZjEtNGZkNC1hN2YwLWFkYzQ3Njc4MTBiMW0AAAAJcHJvamVjdElkbQAAACRlMTI0MTAzOS0yZmVmLTQ4MzAtYjkyNy01YmIzNDI0ZjE3NjRkAAZzaWduZWRuBgA2RZTfiQE.ci4LzhsWp_E8bTTFVymYqWrCfCBm92uJ1QlczU1PvbY',\n accountId: '5eb3db9ba9252000014f82ff',\n keysetId: '40063abb-5af1-4fd4-a7f0-adc4767810b1',\n projectId: 'e1241039-2fef-4830-b927-5bb3424f1764',\n};\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"contracts-31632812.js","mappings":";;AAAA;;;;;;;SAWgB,mBAAmB,CAAC,OAAY;IAC9C,IAAI,CAAC,OAAO;QAAE,OAAO,MAAM,CAAC;IAC5B,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,IAAI,OAAO,CAAC,SAAS;QAAE,OAAO,SAAS,CAAC;IAChF,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,kBAAkB;QAAE,OAAO,MAAM,CAAC;IACnE,IAAI,OAAO,CAAC,cAAc,KAAK,IAAI,IAAI,OAAO,CAAC,cAAc,KAAK,MAAM,IAAI,OAAO,CAAC,uBAAuB,EAAE;QAC3G,OAAO,WAAW,CAAC;KACpB;IACD,OAAO,MAAM,CAAC;AAChB;;;;","names":[],"sources":["src/lib/custom-ui/contracts.ts"],"sourcesContent":["/**\n * Rounit-style prop contracts for customParts.\n *\n * Primary customization model:\n * customParts = host UI; SDK passes data + callbacks (functionality stays in SDK).\n * Slots remain secondary (layout panels only).\n */\n\n/** Delivery/read status derived from Isometrik message fields. */\nexport type MessageDeliveryStatus = 'pending' | 'sent' | 'delivered' | 'read';\n\nexport function deriveMessageStatus(message: any): MessageDeliveryStatus {\n if (!message) return 'sent';\n if (message.deliveredToAll === 'pending' || message.isPending) return 'pending';\n if (message.readByAll || message.isReadByAllMembers) return 'read';\n if (message.deliveredToAll === true || message.deliveredToAll === 'true' || message.isDeliveredToAllMembers) {\n return 'delivered';\n }\n return 'sent';\n}\n\n/**\n * Props SDK assigns on customParts.messageBubble custom elements.\n * Host CE should read these as properties (not only attributes).\n * Prefer property setters / `.render()` so Stencil prop updates re-paint.\n */\nexport type MessageBubbleProps = {\n /** Full Isometrik message (body, attachments, metaData, reactions, …). */\n message: any;\n isSelf: boolean;\n status: MessageDeliveryStatus;\n userMetaData: any;\n conversationDetails: any;\n allAttachments?: any;\n /** SDK opens default message actions sheet (reply/forward/delete/info). */\n onTap?: (message: any) => void;\n /** SDK enters reply mode for this message. */\n onReply?: (message: any) => void;\n /** SDK opens forward dialog. */\n onForward?: (message: any) => void;\n /** SDK opens delete dialog. */\n onDelete?: (message: any) => void;\n /** SDK opens read/delivery info (self messages). */\n onInfo?: (message: any) => void;\n};\n\n/** Props SDK assigns on customParts.chatTile custom elements. */\nexport type ChatTileProps = {\n /** Full Isometrik conversation (includes metaData). */\n conversation: any;\n isSelected: boolean;\n userMetaData: any;\n unreadCount: number | string;\n previewText: string;\n isTyping?: boolean;\n typingUserName?: string | null;\n /** SDK selects this conversation (same as default tile click). */\n onSelect?: (conversationId: string) => void;\n};\n\n/** Props for customParts.groupcastTile. */\nexport type GroupcastTileProps = {\n groupcast: any;\n conversation: any;\n isSelected: boolean;\n userMetaData?: any;\n unreadCount?: number | string;\n previewText?: string;\n onSelect?: (groupcastId: string) => void;\n};\n\n/** customParts.messageDatePill */\nexport type MessageDatePillProps = {\n content: string;\n textColor?: string;\n borderRadius?: string;\n bgColor?: string;\n padding?: string;\n fontSize?: string;\n fontWeight?: string;\n};\n\n/** customParts.searchResult */\nexport type SearchResultProps = {\n message: any;\n onSelect?: () => void;\n};\n\n/** customParts.memberRow */\nexport type MemberRowProps = {\n member: any;\n userMetaData: any;\n isGroupcast?: boolean;\n showActions?: boolean;\n};\n\n/** customParts.contactRow — New Chat contact list. */\nexport type ContactRowProps = {\n contact: any;\n name: string;\n imageUrl?: string;\n meta?: string;\n onSelect?: (contact: any) => void;\n};\n\n/** Overlay: customParts.forwardDialog / addMember (drawer clone or CE). */\nexport type OverlayDialogProps = {\n dialogData?: any;\n onClose?: () => void;\n isMobile?: boolean;\n};\n\n/** customParts.mediaGallery */\nexport type MediaGalleryProps = {\n allAttachments?: any;\n mainImageIndex?: number;\n topbarBgColor?: string;\n iconColor?: string;\n galleryImageSize?: string;\n isZoomed?: boolean;\n loadingMediaGallery?: boolean;\n zoomLevel?: number;\n isSharePopupOpen?: boolean;\n shareLink?: string;\n};\n\n/** customParts.contextMenu */\nexport type ContextMenuProps = {\n x?: number;\n y?: number;\n isOpen?: boolean;\n menuItems?: any[];\n onMenuItemSelected?: (e: any) => void;\n onMenuClosed?: () => void;\n};\n\n/** customParts.blockList */\nexport type BlockListProps = {\n blockedUsers?: any[];\n isLoading?: boolean;\n handleUnblock?: (user: any) => void;\n goBack?: () => void;\n height?: string;\n};\n\n/** customParts.toast — also accepted by showToast when tag is set. */\nexport type ToastPartProps = {\n message: string;\n duration?: number;\n type?: 'success' | 'error' | 'warning' | 'info';\n position?: string;\n};\n"],"version":3}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/** DOM teardown helpers shared by public SDK API and logout. */
|
|
4
|
-
|
|
5
|
-
function destroyChatDom() {
|
|
6
|
-
if (typeof document === 'undefined') return;
|
|
7
|
-
|
|
8
|
-
if (typeof window !== 'undefined') {
|
|
9
|
-
const stored = window.__isometrikChatComponents || {};
|
|
10
|
-
const chatComponent = stored.chatComponent;
|
|
11
|
-
const themeProvider = stored.themeProvider;
|
|
12
|
-
if (chatComponent && chatComponent.parentNode) {
|
|
13
|
-
chatComponent.parentNode.removeChild(chatComponent);
|
|
14
|
-
}
|
|
15
|
-
if (themeProvider && themeProvider.parentNode) {
|
|
16
|
-
themeProvider.parentNode.removeChild(themeProvider);
|
|
17
|
-
}
|
|
18
|
-
window.__isometrikChatComponents = {};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
document.querySelectorAll('web-chat').forEach(el => el.remove());
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
exports.destroyChatDom = destroyChatDom;
|
|
25
|
-
|
|
26
|
-
//# sourceMappingURL=destroy-chat-be25dec7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"destroy-chat-be25dec7.js","mappings":";;AAAA;AACA;AACO,SAAS,cAAc,GAAG;AACjC,EAAE,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,OAAO;AAC9C;AACA,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACrC,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,yBAAyB,IAAI,EAAE,CAAC;AAC1D,IAAI,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AAC/C,IAAI,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AAC/C,IAAI,IAAI,aAAa,IAAI,aAAa,CAAC,UAAU,EAAE;AACnD,MAAM,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;AAC1D,KAAK;AACL,IAAI,IAAI,aAAa,IAAI,aAAa,CAAC,UAAU,EAAE;AACnD,MAAM,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;AAC1D,KAAK;AACL,IAAI,MAAM,CAAC,yBAAyB,GAAG,EAAE,CAAC;AAC1C,GAAG;AACH;AACA,EAAE,QAAQ,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;AACnE;;;;","names":[],"sources":["src/lib/destroy-chat.js"],"sourcesContent":["/** DOM teardown helpers shared by public SDK API and logout. */\n\nexport function destroyChatDom() {\n if (typeof document === 'undefined') return;\n\n if (typeof window !== 'undefined') {\n const stored = window.__isometrikChatComponents || {};\n const chatComponent = stored.chatComponent;\n const themeProvider = stored.themeProvider;\n if (chatComponent && chatComponent.parentNode) {\n chatComponent.parentNode.removeChild(chatComponent);\n }\n if (themeProvider && themeProvider.parentNode) {\n themeProvider.parentNode.removeChild(themeProvider);\n }\n window.__isometrikChatComponents = {};\n }\n\n document.querySelectorAll('web-chat').forEach(el => el.remove());\n}\n"],"version":3}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const doublecheckSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02LjAwMDA0IDE2LjI5MjlMMTUuNjQ2NSA2LjY0NjQ1TDE2LjM1MzYgNy4zNTM1Nkw2LjM1MzU5IDE3LjM1MzZDNi4yNTk4MiAxNy40NDczIDYuMTMyNjUgMTcuNSA2LjAwMDA0IDE3LjVDNS44Njc0MyAxNy41IDUuNzQwMjUgMTcuNDQ3MyA1LjY0NjQ4IDE3LjM1MzZMMS42NDY0OCAxMy4zNTM2TDIuMzUzNTkgMTIuNjQ2NUw2LjAwMDA0IDE2LjI5MjlaIiBmaWxsPSJjdXJyZW50Q29sb3IiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEyLjAwMDQgMTYuMjkzTDIxLjY0NjQgNi42NDY0N0wyMi4zNTM1IDcuMzUzNTZMMTIuMzU0IDE3LjM1MzZDMTIuMTU4NyAxNy41NDg4IDExLjg0MjIgMTcuNTQ4OCAxMS42NDY5IDE3LjM1MzZMMTAuMTQ2NSAxNS44NTM2TDEwLjg1MzUgMTUuMTQ2NEwxMi4wMDA0IDE2LjI5M1oiIGZpbGw9ImN1cnJlbnRDb2xvciIvPjwvc3ZnPgo=';const DoubleCheck = doublecheckSvg;
|
|
4
|
-
|
|
5
|
-
exports.DoubleCheck = DoubleCheck;
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=doublecheck-997afc94.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"doublecheck-997afc94.js","mappings":";;AAAA,MAAM,cAAc,GAAG,oyBAAoyB,CAAC,oBAAe,cAAc;;;;","names":[],"sources":["src/assets/svg/doublecheck.svg"],"sourcesContent":["<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.00004 16.2929L15.6465 6.64645L16.3536 7.35356L6.35359 17.3536C6.25982 17.4473 6.13265 17.5 6.00004 17.5C5.86743 17.5 5.74025 17.4473 5.64648 17.3536L1.64648 13.3536L2.35359 12.6465L6.00004 16.2929Z\" fill=\"currentColor\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.0004 16.293L21.6464 6.64647L22.3535 7.35356L12.354 17.3536C12.1587 17.5488 11.8422 17.5488 11.6469 17.3536L10.1465 15.8536L10.8535 15.1464L12.0004 16.293Z\" fill=\"currentColor\"/></svg>\n"],"version":3}
|