isometrik-plugin-chat-sdk 1.3.18 → 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 +708 -376
- 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 +152 -41
- 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 +643 -312
- 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 +691 -359
- 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 +13 -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-09fc122b.entry.js +0 -2
- package/dist/isometrik-webchat/p-09fc122b.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-render.js","sourceRoot":"","sources":["../../../../src/components/my-component/web-chat/shell-render.tsx"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,wDAAwD,CAAC;AAIhE,MAAM,UAAU,gBAAgB,CAAC,IAAsB;IACrD,OAAO,CACL,WAAK,KAAK,EAAC,mBAAmB;QAC5B,YAAM,IAAI,EAAC,aAAa;YACtB,gCAA0B,QAAQ,EAAE,IAAI,CAAC,eAAe,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,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import { selectChatPlaceholderSvg } from '../../../assets/svg/SelectChatPlaceholder.js';\nimport { WEB_CONTENT } from '../../../constants/content';\nimport { hasNamedSlot } from '../../../lib/custom-ui';\nimport { ChatBg } from '../../../constants/chat-assets.js';\nimport '../../ChatUIComponent/shared/message-info/message-info';\n\nexport type WebChatShellHost = any;\n\nexport function renderBootLoader(host: WebChatShellHost) {\n return (\n <div class=\"boot-loader-shell\">\n <slot name=\"boot-loader\">\n <chat-loading-placeholder progress={host.loadingProgress} loadingStatus={host.loadingStatus} />\n </slot>\n </div>\n );\n}\n\nexport function renderBusyOverlay(host: WebChatShellHost) {\n if (!host.isConversationLoading) return null;\n return (\n <div class=\"loaderoverlay\">\n <spinner-loader\n height=\"30px\"\n width=\"30px\"\n spinTime=\"1s\"\n spinnerPrimaryColor=\"var(--bg-primary-color)\"\n spinnerSecondaryColor=\"var(--text-primary-color)\"\n spinnerBorderWidth=\"2px\"\n ></spinner-loader>\n </div>\n );\n}\n\nexport function renderDefaultConversationList(host: WebChatShellHost) {\n return (\n <chat-side-bar\n conversationDetails={host.conversationMetaData}\n isMqttConnected={host.isMqttConnected}\n unreadConversationsCount={host.unreadConversationsCount}\n hasMoreConversations={host.hasMoreConversations}\n userMetaData={host.userMetaData}\n onChatTileSelected={(e: CustomEvent) => host.handleChatSelect(e.detail)}\n onDeleteConversation={(conversationId: string) => host.deleteConversation(conversationId)}\n conversationList={host.allConversationList}\n isTyping={host.isTyping}\n typingUserName={host.typingUserName}\n typingConversationId={host.typingConversationId}\n //@ts-ignore\n isChatFilter={host.isChatFilter}\n customParts={host.customParts ?? {}}\n customTypes={[\n { type: 'Test conversations', label: 'Unread' },\n { type: 'SingleChat', label: 'Past' },\n { type: 'Chatbot', label: 'Present' },\n ]}\n isAllChatButton={host.isAllChatButton}\n filterTabsContainer={{\n display: 'flex',\n gap: '10px',\n width: '100%',\n flexWrap: 'wrap',\n marginBottom: '10px',\n }}\n filterTab={{\n padding: '10px 15px',\n border: '1px solid var(--bg-primary-light)',\n borderRadius: '25px',\n backgroundColor: 'transparent',\n cursor: 'pointer',\n transition: 'background-color 0.3s',\n color: 'var(--text-tertiary-color)',\n fontSize: '12px',\n textTransform: 'uppercase',\n }}\n filterTabHover={{\n backgroundColor: 'var(--bg-primary-light)',\n }}\n isSidebarHeaderLabel={host.isSidebarHeaderLabel}\n isSidebarHeaderSearch={host.isSidebarHeaderSearch}\n sidebarHeaderLabel={host.sidebarHeaderLabel}\n sidebarColor={host.sidebarColor}\n sidebarSelectedColor={host.sidebarSelectedColor}\n onGroupExited={(e: CustomEvent) => host.handleGroupExited(e)}\n handleSearchData={(searchTag: string) => host.getConversations(0, searchTag, true)}\n allMessages={host.allMessages}\n isConversationLoading={host.isLoadingConversationList}\n ></chat-side-bar>\n );\n}\n\nexport function renderSidebarTab(host: WebChatShellHost) {\n if (host.activeTab === 'GroupCast') {\n return (\n <slot name=\"group-cast\">\n <group-cast\n isLoadingMore={host.isLoadingMoreGroupcast}\n groupCastData={host.allGroupCastContacts}\n userMetaData={host.userMetaData}\n onGroupcastTileSelected={(e: CustomEvent) => host.handleChatSelect(e.detail)}\n onCreated={(g: any) => {\n if (!g?.groupcastId) return;\n host.allGroupCastContacts = [g, ...(host.allGroupCastContacts || [])];\n }}\n ></group-cast>\n </slot>\n );\n }\n if (host.activeTab === 'Profile') {\n return (\n <slot name=\"profile-page\">\n <profile-page\n getUserDetails={host.getUserDetails}\n name={host.userMetaData.userName}\n profilePhotoUrl={host.userMetaData.userProfileImageUrl}\n closeDrawer={() => (host.activeTab = 'Chat')}\n toggleTheme={host.toggleTheme}\n defaultTheme={host.defaultTheme}\n ></profile-page>\n </slot>\n );\n }\n return <slot name=\"conversation-list\">{renderDefaultConversationList(host)}</slot>;\n}\n\nexport function renderDefaultSidebar(host: WebChatShellHost) {\n // Hosts can pass showProfileRail={false} — no DOM poke / empty slots needed.\n const showRail = host.showProfileRail !== false;\n return (\n <Fragment>\n {showRail ? (\n <slot name=\"profile-rail\">\n <profile-sidebar\n userMetaData={host.userMetaData}\n activeTab={host.activeTab}\n openChat={() => (host.activeTab = 'Chat')}\n openProfile={() => (host.activeTab = 'Profile')}\n openGroupCast={() => host.getGroupCastContacts()}\n unreadConversationsCount={host.unreadConversationsCount}\n ></profile-sidebar>\n </slot>\n ) : null}\n <div class=\"sidebar-tab\">{renderSidebarTab(host)}</div>\n </Fragment>\n );\n}\n\nexport function renderLeftRail(host: WebChatShellHost) {\n return (\n <div\n class={{\n 'chat-sidebar-container': true,\n 'hidden': host.isMobileView && !host.showSidebar,\n }}\n >\n {/* slot=\"sidebar\" replaces entire left rail; else use profile-rail / conversation-list / profile-page / group-cast */}\n <slot name=\"sidebar\">{renderDefaultSidebar(host)}</slot>\n </div>\n );\n}\n\nexport function renderDefaultComposer(host: WebChatShellHost) {\n if (host.exitedGroupIds.has(host.selectedConversationId)) {\n return (\n <div\n style={{\n padding: '1rem',\n textAlign: 'center',\n backgroundColor: 'var(--bg-secondary-color)',\n color: 'var(--text-primary-color)',\n borderTop: '1px solid var(--bg-secondary-color)',\n }}\n >\n You are no longer a member of this group\n </div>\n );\n }\n if (host.isBlocked === 'loading') {\n return <p class=\"blockMessageContainer\">{WEB_CONTENT.PLEASE_WAIT}</p>;\n }\n if (host.conversationMetaData?.messagingDisabled) {\n return <p class=\"blockMessageContainer\">{WEB_CONTENT.BLOCK_CHAT_MESSAGE}</p>;\n }\n // Only re-project when the host actually filled the slot. An empty\n // <slot slot=\"composer-input\"> still counts as assigned content and\n // suppresses chat-footer's default <my-test-footer-ui> fallback.\n const el = host.el as HTMLElement;\n return (\n <chat-footer\n userMetaData={host.userMetaData}\n updateAllMessages={host.updateAllMessages}\n changeMessageSendingState={host.changeMessageSendingState}\n changeScrollToBottomState={host.changeScrollToBottomState}\n refetchMessages={host.refetchMessages}\n allMessages={host.allMessages}\n selectedConversationId={host.selectedConversationId}\n replyMessage={host.replyMessage}\n handleremoveReplyMessage={host.handleremoveReplyMessage}\n conversationDetails={host.conversationMetaData}\n allConversationList={host.allConversationList}\n updateConversationListProp={host.updateConversationList}\n >\n {hasNamedSlot(el, 'reply-preview') ? <slot name=\"reply-preview\" slot=\"reply-preview\" /> : null}\n {hasNamedSlot(el, 'attachment-preview') ? <slot name=\"attachment-preview\" slot=\"attachment-preview\" /> : null}\n {hasNamedSlot(el, 'composer-input') ? <slot name=\"composer-input\" slot=\"composer-input\" /> : null}\n </chat-footer>\n );\n}\n\n/** slot=\"composer\" replaces whole footer; else reply-preview / attachment-preview / composer-input */\nexport function renderComposerOrBanner(host: WebChatShellHost) {\n return <slot name=\"composer\">{renderDefaultComposer(host)}</slot>;\n}\n\nexport function renderDefaultEmptyChat(_host: WebChatShellHost) {\n return (\n <div style={{ backgroundColor: 'var(--bg-secondary-color)', color: 'var(--text-tertiary-color)' }} class=\"noChatSelectedPlaceholder\">\n <div innerHTML={selectChatPlaceholderSvg}></div>\n <span>\"Start a Conversation\"</span>\n <span>\n Select a name from the list to begin chatting.\n <br />\n Connect easily and stay in touch!\n </span>\n </div>\n );\n}\n\nexport function renderDefaultHeader(host: WebChatShellHost) {\n return (\n <web-chat-header\n searchedMessageDetails={host.searchedMessageDetails}\n onSearchHandler={(text: string) => host.getMessagesByQuery(text)}\n onSearchResultClick={host.handleSearchResultClick}\n headerBgColor=\"var(--bg-primary-color)\"\n headerLastSeenColor=\"var(--text-last-seen)\"\n headerSvgColor=\"var(--text-primary-color)\"\n headerUsernameColor=\"var(--text-primary-color)\"\n onClearConversation={() => host.clearConversation()}\n conversationDetails={host.conversationMetaData}\n isTyping={host.isTyping && host.selectedConversationId === host.typingConversationId}\n typingUserName={host.typingUserName}\n chatBodyRef={host.chatBodyRef}\n onTextClick={() => host.getAllAttachments(host.selectedConversationId)}\n allAttachments={host.allAttachments}\n lastSeen={host.conversationMetaData?.opponentDetails?.lastSeen}\n userMetaData={host.userMetaData}\n selectedConversationId={host.selectedConversationId}\n messageAction={host.messageAction}\n eligibleMembers={host.eligibleMembers}\n hasMoreEligibleMembers={host.hasMoreEligibleMembers}\n handleCloseChat={() => host.handleCloseChat()}\n typingConversationId={host.typingConversationId}\n isBlocked={host.isBlocked}\n onBackButtonClick={() => host.handleBackButton()}\n />\n );\n}\n\nexport function renderDefaultMessages(host: WebChatShellHost) {\n return (\n <web-chat-body\n ref={el => (host.chatBodyRef = el as HTMLWebChatBodyElement)}\n allAttachments={host.allAttachments}\n isMessagesLoading={host.isMessagesLoading}\n updateSkip={host.updateSkip}\n isMessageLimitEnd={host.isMessageLimitEnd}\n allMessages={host.allMessages}\n userMetaData={host.userMetaData}\n skip={host.skip}\n isScrollToBottom={host.isScrollToBottom}\n changeScrollToBottomState={host.changeScrollToBottomState}\n isMessageSending={host.isMessageSending}\n isScrollToTop={host.isScrollToTop}\n changeScrollToTopState={host.changeScrollToTopState}\n deleteForSelf={host.deleteMessageFromSelf}\n deleteForAll={host.deleteMeassageFromEveryOne}\n isChatClosed={host.isChatClosed}\n isChatMinimized={host.isChatMinimized}\n updateAllMessages={host.updateAllMessages}\n selectedConversationId={host.selectedConversationId}\n highlightedMessageId={host.highlightedMessageId}\n onMediaClick={() => host.getAllAttachments(host.selectedConversationId)}\n onReplyMessageDetails={host.handleReplyMessage}\n conversationList={host.allConversationList}\n newMessageNotification={host.newMessageNotification}\n onNewMessageCountReset={() => host.resetNewMessageNotification()}\n conversationDetails={host.conversationMetaData}\n loadingMediaGallery={host.loadingMediaGallery}\n customParts={host.customParts ?? {}}\n >\n {hasNamedSlot(host.el, 'message-info') ? <slot name=\"message-info\" slot=\"message-info\" /> : null}\n </web-chat-body>\n );\n}\n\nexport function renderActiveChat(host: WebChatShellHost) {\n const info = host.messageInfoPanel;\n return (\n <div class={{ 'chat-pane-row': true, 'info-open': !!info?.open }}>\n <div class=\"chat-main-stack\">\n {/* Custom UI: slot=\"header\" | slot=\"messages\" | slot=\"composer\" */}\n <slot name=\"header\">{renderDefaultHeader(host)}</slot>\n <slot name=\"messages\">{renderDefaultMessages(host)}</slot>\n {renderComposerOrBanner(host)}\n </div>\n {info?.open ? (\n <div class=\"message-info-dock\">\n {info.isLoading ? (\n <div class=\"message-info-loading\">\n <spinner-loader height=\"20px\" width=\"20px\" spinTime=\"1s\" spinnerPrimaryColor=\"var(--brand, #2563eb)\" spinnerSecondaryColor=\"var(--border, #e5e7eb)\" spinnerBorderWidth=\"2px\" />\n </div>\n ) : (\n <message-info\n selectedMessage={info.selectedMessage}\n messageDeliveryTime={info.messageDeliveryTime}\n messageReadTime={info.messageReadTime}\n readUserList={info.readUserList || []}\n deliveryUserList={info.deliveryUserList || []}\n isGroup={info.isGroup}\n pendingReadCount={info.pendingReadCount}\n pendingDeliveryCount={info.pendingDeliveryCount}\n allAttachments={host.allAttachments}\n onMediaClick={() => host.getAllAttachments(host.selectedConversationId)}\n closePopup={() => {\n host.messageInfoPanel = null;\n host.chatBodyRef?.closeMessageInfo?.();\n }}\n />\n )}\n </div>\n ) : null}\n </div>\n );\n}\n\nexport function renderChatPane(host: WebChatShellHost) {\n const wallpaper = host.showChatWallpaper !== false && host.selectedConversationId;\n return (\n <div\n class={{\n 'chat-body-container': true,\n 'show': host.isMobileView && !!host.selectedConversationId && !host.showSidebar,\n }}\n style={\n wallpaper\n ? {\n backgroundImage: `url(${ChatBg})`,\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n }\n : host.selectedConversationId\n ? { background: 'var(--bg-tertiary, #f4f4f5)' }\n : undefined\n }\n >\n {host.selectedConversationId ? (\n renderActiveChat(host)\n ) : (\n <slot name=\"empty\">{renderDefaultEmptyChat(host)}</slot>\n )}\n </div>\n );\n}\n\nexport function renderDefaultRightPanel(host: WebChatShellHost) {\n return (\n <web-chat-right-sidebar\n conversationMetaData={host.isProfileInfoOpen ? host.selctConversationMetaData : host.conversationMetaData}\n selectedConversationId={host.selectedConversationId}\n hasMoreEligibleMembers={host.hasMoreEligibleMembers}\n eligibleMembers={host.eligibleMembers}\n allAttachments={host.isProfileInfoOpen ? host.selectConverSationAttachments : host.allAttachments}\n userMetaData={host.userMetaData}\n messageAction={host.messageAction}\n searchedMessageDetails={host.searchedMessageDetails}\n onSearchHandler={(text: string) => host.getMessagesByQuery(text)}\n onSearchResultClick={host.handleSearchResultClick}\n isContactInfoOpen={host.isContactInfoOpen}\n isProfileInfoOpen={host.isProfileInfoOpen}\n isOpenSearchBar={host.isOpenSearchBar}\n chatBodyRef={host.chatBodyRef}\n isLoadingMessage={host.isLoadingMessage}\n conversationIdFromContactinfo={host.conversationIdFromContactinfo}\n openOwnProfile={() => (host.activeTab = 'Profile')}\n handleChatSelect={conversationId => host.handleChatSelect(conversationId)}\n allLinks={host.allLinks}\n allLinksCount={host.allLinksCount}\n isBlocked={host.isBlocked}\n groupcastMembers={host.groupcastMembers}\n >\n {hasNamedSlot(host.el, 'contact-info') ? <slot name=\"contact-info\" slot=\"contact-info\" /> : null}\n {hasNamedSlot(host.el, 'profile-info') ? <slot name=\"profile-info\" slot=\"profile-info\" /> : null}\n {hasNamedSlot(host.el, 'message-search') ? <slot name=\"message-search\" slot=\"message-search\" /> : null}\n </web-chat-right-sidebar>\n );\n}\n\nexport function renderRightRail(host: WebChatShellHost) {\n if (!host.showRightSideBar) return null;\n return (\n <div class=\"chat-sidebar-right\">\n {/* slot=\"right-panel\" replaces entire rail; else contact-info / profile-info / message-search */}\n <slot name=\"right-panel\">{renderDefaultRightPanel(host)}</slot>\n </div>\n );\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"shell-render.js","sourceRoot":"","sources":["../../../../src/components/my-component/web-chat/shell-render.tsx"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAwB,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,i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AE,aAAa,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC,CACzE,CACP,CAAC;AACJ,CAAC","sourcesContent":["/** Presentational shell tree for <web-chat> — keeps WebChat.tsx thin. */\nimport { Fragment, h } from '@stencil/core';\nimport { selectChatPlaceholderSvg } from '../../../assets/svg/SelectChatPlaceholder.js';\nimport { WEB_CONTENT } from '../../../constants/content';\nimport { hasNamedSlot, type WebChatSlotName } from '../../../lib/custom-ui';\nimport { resolveRegionMode } from '../../../sdk/composition';\nimport { ChatBg } from '../../../constants/chat-assets.js';\nimport '../../ChatUIComponent/shared/message-info/message-info';\n\nexport type WebChatShellHost = any;\n\n/** show / custom-slot / default matrix for any named region. */\nfunction renderRegion(\n host: WebChatShellHost,\n slotName: WebChatSlotName,\n show: boolean | undefined,\n renderDefault: () => any,\n): any {\n const mode = resolveRegionMode({\n show,\n hasCustomSlot: hasNamedSlot(host.el as HTMLElement, slotName),\n });\n if (mode === 'hidden') return null;\n if (mode === 'custom') return <slot name={slotName} />;\n return renderDefault();\n}\n\nexport function renderBootLoader(host: WebChatShellHost) {\n return (\n <div class=\"boot-loader-shell\">\n {renderRegion(host, 'boot-loader', true, () => (\n <chat-loading-placeholder progress={host.loadingProgress} loadingStatus={host.loadingStatus} />\n ))}\n </div>\n );\n}\n\nexport function renderBusyOverlay(host: WebChatShellHost) {\n if (!host.isConversationLoading) return null;\n return (\n <div class=\"loaderoverlay\">\n <spinner-loader\n height=\"30px\"\n width=\"30px\"\n spinTime=\"1s\"\n spinnerPrimaryColor=\"var(--bg-primary)\"\n spinnerSecondaryColor=\"var(--text-primary)\"\n spinnerBorderWidth=\"2px\"\n ></spinner-loader>\n </div>\n );\n}\n\nexport function renderDefaultConversationList(host: WebChatShellHost) {\n return (\n <chat-side-bar\n conversationDetails={host.conversationMetaData}\n isMqttConnected={host.isMqttConnected}\n unreadConversationsCount={host.unreadConversationsCount}\n hasMoreConversations={host.hasMoreConversations}\n userMetaData={host.userMetaData}\n onChatTileSelected={(e: CustomEvent) => host.handleChatSelect(e.detail)}\n onDeleteConversation={(conversationId: string) => host.deleteConversation(conversationId)}\n conversationList={host.allConversationList}\n isTyping={host.isTyping}\n typingUserName={host.typingUserName}\n typingConversationId={host.typingConversationId}\n //@ts-ignore\n isChatFilter={host.isChatFilter}\n customParts={host.customParts ?? {}}\n customTypes={[\n { type: 'Test conversations', label: 'Unread' },\n { type: 'SingleChat', label: 'Past' },\n { type: 'Chatbot', label: 'Present' },\n ]}\n isAllChatButton={host.isAllChatButton}\n filterTabsContainer={{\n display: 'flex',\n gap: '10px',\n width: '100%',\n flexWrap: 'wrap',\n marginBottom: '10px',\n }}\n filterTab={{\n padding: '10px 15px',\n border: '1px solid var(--brand-soft)',\n borderRadius: '25px',\n backgroundColor: 'transparent',\n cursor: 'pointer',\n transition: 'background-color 0.3s',\n color: 'var(--text-tertiary)',\n fontSize: '12px',\n textTransform: 'uppercase',\n }}\n filterTabHover={{\n backgroundColor: 'var(--brand-soft)',\n }}\n isSidebarHeaderLabel={host.isSidebarHeaderLabel}\n isSidebarHeaderSearch={host.isSidebarHeaderSearch}\n sidebarHeaderLabel={host.sidebarHeaderLabel}\n sidebarColor={host.sidebarColor}\n sidebarSelectedColor={host.sidebarSelectedColor}\n onGroupExited={(e: CustomEvent) => host.handleGroupExited(e)}\n handleSearchData={(searchTag: string) => host.getConversations(0, searchTag, true)}\n allMessages={host.allMessages}\n isConversationLoading={host.isLoadingConversationList}\n ></chat-side-bar>\n );\n}\n\nexport function renderSidebarTab(host: WebChatShellHost) {\n const groupcastOn = host.groupcastEnabled !== false;\n const tab = host.activeTab === 'GroupCast' && !groupcastOn ? 'Chat' : host.activeTab;\n\n if (tab === 'GroupCast') {\n return renderRegion(host, 'group-cast', true, () => (\n <group-cast\n isLoadingMore={host.isLoadingMoreGroupcast}\n groupCastData={host.allGroupCastContacts}\n userMetaData={host.userMetaData}\n onGroupcastTileSelected={(e: CustomEvent) => host.handleChatSelect(e.detail)}\n onCreated={(g: any) => {\n if (!g?.groupcastId) return;\n host.allGroupCastContacts = [g, ...(host.allGroupCastContacts || [])];\n }}\n ></group-cast>\n ));\n }\n if (tab === 'Profile') {\n return renderRegion(host, 'profile-page', true, () => (\n <profile-page\n getUserDetails={host.getUserDetails}\n name={host.userMetaData.userName}\n profilePhotoUrl={host.userMetaData.userProfileImageUrl}\n closeDrawer={() => (host.activeTab = 'Chat')}\n toggleTheme={host.toggleTheme}\n defaultTheme={host.defaultTheme}\n ></profile-page>\n ));\n }\n return renderRegion(host, 'conversation-list', host.showConversationList, () =>\n renderDefaultConversationList(host),\n );\n}\n\nfunction renderProfileRail(host: WebChatShellHost) {\n return renderRegion(host, 'profile-rail', host.showProfileRail, () => (\n <profile-sidebar\n userMetaData={host.userMetaData}\n activeTab={host.activeTab}\n openChat={() => (host.activeTab = 'Chat')}\n openProfile={() => (host.activeTab = 'Profile')}\n openGroupCast={() => {\n if (host.groupcastEnabled === false) return;\n host.getGroupCastContacts();\n }}\n unreadConversationsCount={host.unreadConversationsCount}\n ></profile-sidebar>\n ));\n}\n\nexport function renderDefaultSidebar(host: WebChatShellHost) {\n return (\n <Fragment>\n {renderProfileRail(host)}\n <div class=\"sidebar-tab\">{renderSidebarTab(host)}</div>\n </Fragment>\n );\n}\n\nexport function renderLeftRail(host: WebChatShellHost) {\n return (\n <div\n class={{\n 'chat-sidebar-container': true,\n 'hidden': host.isMobileView && !host.showSidebar,\n }}\n >\n {renderRegion(host, 'sidebar', true, () => renderDefaultSidebar(host))}\n </div>\n );\n}\n\nexport function renderDefaultComposer(host: WebChatShellHost) {\n if (host.exitedGroupIds.has(host.selectedConversationId)) {\n return (\n <div\n style={{\n padding: '1rem',\n textAlign: 'center',\n backgroundColor: 'var(--bg-secondary)',\n color: 'var(--text-primary)',\n borderTop: '1px solid var(--bg-secondary)',\n }}\n >\n You are no longer a member of this group\n </div>\n );\n }\n if (host.isBlocked === 'loading') {\n return <p class=\"blockMessageContainer\">{WEB_CONTENT.PLEASE_WAIT}</p>;\n }\n if (host.conversationMetaData?.messagingDisabled) {\n return <p class=\"blockMessageContainer\">{WEB_CONTENT.BLOCK_CHAT_MESSAGE}</p>;\n }\n const el = host.el as HTMLElement;\n return (\n <chat-footer\n userMetaData={host.userMetaData}\n updateAllMessages={host.updateAllMessages}\n changeMessageSendingState={host.changeMessageSendingState}\n changeScrollToBottomState={host.changeScrollToBottomState}\n refetchMessages={host.refetchMessages}\n allMessages={host.allMessages}\n selectedConversationId={host.selectedConversationId}\n replyMessage={host.replyMessage}\n handleremoveReplyMessage={host.handleremoveReplyMessage}\n conversationDetails={host.conversationMetaData}\n allConversationList={host.allConversationList}\n updateConversationListProp={host.updateConversationList}\n >\n {hasNamedSlot(el, 'reply-preview') ? <slot name=\"reply-preview\" slot=\"reply-preview\" /> : null}\n {hasNamedSlot(el, 'attachment-preview') ? <slot name=\"attachment-preview\" slot=\"attachment-preview\" /> : null}\n {hasNamedSlot(el, 'composer-input') ? <slot name=\"composer-input\" slot=\"composer-input\" /> : null}\n </chat-footer>\n );\n}\n\n/** slot=\"composer\" replaces whole footer; else reply-preview / attachment-preview / composer-input */\nexport function renderComposerOrBanner(host: WebChatShellHost) {\n return renderRegion(host, 'composer', host.showComposer, () => renderDefaultComposer(host));\n}\n\nexport function renderDefaultEmptyChat(_host: WebChatShellHost) {\n return (\n <div style={{ backgroundColor: 'var(--bg-secondary)', color: 'var(--text-tertiary)' }} class=\"noChatSelectedPlaceholder\">\n <div innerHTML={selectChatPlaceholderSvg}></div>\n <span>\"Start a Conversation\"</span>\n <span>\n Select a name from the list to begin chatting.\n <br />\n Connect easily and stay in touch!\n </span>\n </div>\n );\n}\n\nexport function renderDefaultHeader(host: WebChatShellHost) {\n return (\n <web-chat-header\n searchedMessageDetails={host.searchedMessageDetails}\n onSearchHandler={(text: string) => host.getMessagesByQuery(text)}\n onSearchResultClick={host.handleSearchResultClick}\n headerBgColor=\"var(--bg-primary)\"\n headerLastSeenColor=\"var(--text-secondary)\"\n headerSvgColor=\"var(--text-primary)\"\n headerUsernameColor=\"var(--text-primary)\"\n onClearConversation={() => host.clearConversation()}\n conversationDetails={host.conversationMetaData}\n isTyping={host.isTyping && host.selectedConversationId === host.typingConversationId}\n typingUserName={host.typingUserName}\n chatBodyRef={host.chatBodyRef}\n onTextClick={() => host.getAllAttachments(host.selectedConversationId)}\n allAttachments={host.allAttachments}\n lastSeen={host.conversationMetaData?.opponentDetails?.lastSeen}\n userMetaData={host.userMetaData}\n selectedConversationId={host.selectedConversationId}\n messageAction={host.messageAction}\n eligibleMembers={host.eligibleMembers}\n hasMoreEligibleMembers={host.hasMoreEligibleMembers}\n handleCloseChat={() => host.handleCloseChat()}\n typingConversationId={host.typingConversationId}\n isBlocked={host.isBlocked}\n onBackButtonClick={() => host.handleBackButton()}\n />\n );\n}\n\nexport function renderDefaultMessages(host: WebChatShellHost) {\n return (\n <web-chat-body\n ref={el => (host.chatBodyRef = el as HTMLWebChatBodyElement)}\n allAttachments={host.allAttachments}\n isMessagesLoading={host.isMessagesLoading}\n updateSkip={host.updateSkip}\n isMessageLimitEnd={host.isMessageLimitEnd}\n allMessages={host.allMessages}\n userMetaData={host.userMetaData}\n skip={host.skip}\n isScrollToBottom={host.isScrollToBottom}\n changeScrollToBottomState={host.changeScrollToBottomState}\n isMessageSending={host.isMessageSending}\n isScrollToTop={host.isScrollToTop}\n changeScrollToTopState={host.changeScrollToTopState}\n deleteForSelf={host.deleteMessageFromSelf}\n deleteForAll={host.deleteMeassageFromEveryOne}\n isChatClosed={host.isChatClosed}\n isChatMinimized={host.isChatMinimized}\n updateAllMessages={host.updateAllMessages}\n selectedConversationId={host.selectedConversationId}\n highlightedMessageId={host.highlightedMessageId}\n onMediaClick={() => host.getAllAttachments(host.selectedConversationId)}\n onReplyMessageDetails={host.handleReplyMessage}\n conversationList={host.allConversationList}\n newMessageNotification={host.newMessageNotification}\n onNewMessageCountReset={() => host.resetNewMessageNotification()}\n conversationDetails={host.conversationMetaData}\n loadingMediaGallery={host.loadingMediaGallery}\n customParts={host.customParts ?? {}}\n >\n {hasNamedSlot(host.el, 'message-info') ? <slot name=\"message-info\" slot=\"message-info\" /> : null}\n </web-chat-body>\n );\n}\n\nexport function renderActiveChat(host: WebChatShellHost) {\n const info = host.messageInfoView;\n return (\n <div class={{ 'chat-pane-row': true, 'info-open': !!info?.open }}>\n <div class=\"chat-main-stack\">\n {renderRegion(host, 'header', host.showHeader, () => renderDefaultHeader(host))}\n {renderRegion(host, 'messages', true, () => renderDefaultMessages(host))}\n {renderComposerOrBanner(host)}\n </div>\n {info?.open ? (\n <div class=\"message-info-dock\">\n {info.isLoading ? (\n <div class=\"message-info-loading\">\n <spinner-loader height=\"20px\" width=\"20px\" spinTime=\"1s\" spinnerPrimaryColor=\"var(--brand, #2563eb)\" spinnerSecondaryColor=\"var(--border, #e5e7eb)\" spinnerBorderWidth=\"2px\" />\n </div>\n ) : (\n <message-info\n selectedMessage={info.selectedMessage}\n messageDeliveryTime={info.messageDeliveryTime}\n messageReadTime={info.messageReadTime}\n readUserList={info.readUserList || []}\n deliveryUserList={info.deliveryUserList || []}\n isGroup={info.isGroup}\n pendingReadCount={info.pendingReadCount}\n pendingDeliveryCount={info.pendingDeliveryCount}\n allAttachments={host.allAttachments}\n onMediaClick={() => host.getAllAttachments(host.selectedConversationId)}\n closePopup={() => {\n host.messageInfoView = null;\n host.chatBodyRef?.closeMessageInfo?.();\n }}\n />\n )}\n </div>\n ) : null}\n </div>\n );\n}\n\nexport function renderChatPane(host: WebChatShellHost) {\n const wallpaper = host.showChatWallpaper !== false && host.selectedConversationId;\n return (\n <div\n class={{\n 'chat-body-container': true,\n 'show': host.isMobileView && !!host.selectedConversationId && !host.showSidebar,\n }}\n style={\n wallpaper\n ? {\n backgroundImage: `url(${ChatBg})`,\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n }\n : host.selectedConversationId\n ? { background: 'var(--bg-tertiary, #f4f4f5)' }\n : undefined\n }\n >\n {host.selectedConversationId ? (\n renderActiveChat(host)\n ) : (\n renderRegion(host, 'empty', host.showEmptyState, () => renderDefaultEmptyChat(host))\n )}\n </div>\n );\n}\n\nexport function renderDefaultRightPanel(host: WebChatShellHost) {\n return (\n <web-chat-right-sidebar\n conversationMetaData={host.isProfileInfoOpen ? host.selctConversationMetaData : host.conversationMetaData}\n selectedConversationId={host.selectedConversationId}\n hasMoreEligibleMembers={host.hasMoreEligibleMembers}\n eligibleMembers={host.eligibleMembers}\n allAttachments={host.isProfileInfoOpen ? host.selectConverSationAttachments : host.allAttachments}\n userMetaData={host.userMetaData}\n messageAction={host.messageAction}\n searchedMessageDetails={host.searchedMessageDetails}\n onSearchHandler={(text: string) => host.getMessagesByQuery(text)}\n onSearchResultClick={host.handleSearchResultClick}\n isContactInfoOpen={host.isContactInfoOpen}\n isProfileInfoOpen={host.isProfileInfoOpen}\n isOpenSearchBar={host.isOpenSearchBar}\n chatBodyRef={host.chatBodyRef}\n isLoadingMessage={host.isLoadingMessage}\n conversationIdFromContactinfo={host.conversationIdFromContactinfo}\n openOwnProfile={() => (host.activeTab = 'Profile')}\n handleChatSelect={conversationId => host.handleChatSelect(conversationId)}\n allLinks={host.allLinks}\n allLinksCount={host.allLinksCount}\n isBlocked={host.isBlocked}\n groupcastMembers={host.groupcastMembers}\n >\n {hasNamedSlot(host.el, 'contact-info') ? <slot name=\"contact-info\" slot=\"contact-info\" /> : null}\n {hasNamedSlot(host.el, 'profile-info') ? <slot name=\"profile-info\" slot=\"profile-info\" /> : null}\n {hasNamedSlot(host.el, 'message-search') ? <slot name=\"message-search\" slot=\"message-search\" /> : null}\n </web-chat-right-sidebar>\n );\n}\n\nexport function renderRightRail(host: WebChatShellHost) {\n if (host.showRightPanel === false) return null;\n if (!host.showRightSideBar) return null;\n return (\n <div class=\"chat-sidebar-right\">\n {renderRegion(host, 'right-panel', true, () => renderDefaultRightPanel(host))}\n </div>\n );\n}\n"]}
|
|
@@ -1,84 +1,89 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { applyThemeObjectToElement, normalizeThemeObject } from "../sdk/theme-tokens";
|
|
2
3
|
export class ThemeProvider {
|
|
3
4
|
constructor() {
|
|
5
|
+
this.stylesheetId = `isometrik-theme-stylesheet-${Math.random().toString(36).slice(2, 9)}`;
|
|
4
6
|
this.themePath = undefined;
|
|
5
7
|
this.mode = 'light';
|
|
8
|
+
this.themeObject = undefined;
|
|
9
|
+
this.mirrorToDocument = false;
|
|
6
10
|
this.styleElement = null;
|
|
7
11
|
}
|
|
8
|
-
/**
|
|
9
|
-
* Watch for changes to the theme path and update the stylesheet
|
|
10
|
-
*/
|
|
11
12
|
handleThemePathChange(newPath) {
|
|
12
13
|
if (newPath) {
|
|
13
14
|
this.loadThemeFromPath(newPath);
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Watch for changes to theme mode
|
|
18
|
-
*/
|
|
19
17
|
handleModeChange(newMode) {
|
|
20
18
|
this.updateThemeClass(newMode);
|
|
21
19
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
handleThemeObjectChange(next) {
|
|
21
|
+
this.applyThemeObject(next);
|
|
22
|
+
}
|
|
23
|
+
handleMirrorChange() {
|
|
24
|
+
this.updateThemeClass(this.mode);
|
|
25
|
+
}
|
|
25
26
|
componentDidLoad() {
|
|
26
|
-
// Load theme from path if provided
|
|
27
27
|
if (this.themePath) {
|
|
28
28
|
this.loadThemeFromPath(this.themePath);
|
|
29
29
|
}
|
|
30
|
-
// Set initial theme class
|
|
31
30
|
this.updateThemeClass(this.mode);
|
|
31
|
+
this.applyThemeObject(this.themeObject);
|
|
32
|
+
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
var _a;
|
|
35
|
+
if ((_a = this.styleElement) === null || _a === void 0 ? void 0 : _a.parentNode) {
|
|
36
|
+
this.styleElement.parentNode.removeChild(this.styleElement);
|
|
37
|
+
this.styleElement = null;
|
|
38
|
+
}
|
|
39
|
+
if (this.mirrorToDocument) {
|
|
40
|
+
document.documentElement.classList.remove('theme-light', 'theme-dark');
|
|
41
|
+
}
|
|
32
42
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
43
|
+
applyThemeObject(theme) {
|
|
44
|
+
applyThemeObjectToElement(this.hostElement, theme || null);
|
|
45
|
+
}
|
|
46
|
+
/** Mode class on this host only — CSS vars inherit into <web-chat> shadow. */
|
|
36
47
|
updateThemeClass(mode) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
48
|
+
this.hostElement.classList.remove('theme-light', 'theme-dark');
|
|
49
|
+
this.hostElement.classList.add(`theme-${mode}`);
|
|
50
|
+
if (this.mirrorToDocument) {
|
|
51
|
+
document.documentElement.classList.remove('theme-light', 'theme-dark');
|
|
52
|
+
document.documentElement.classList.add(`theme-${mode}`);
|
|
53
|
+
}
|
|
54
|
+
this.hostElement.dispatchEvent(new CustomEvent('themechange', {
|
|
55
|
+
detail: { mode, scoped: !this.mirrorToDocument },
|
|
44
56
|
bubbles: true,
|
|
45
|
-
composed: true
|
|
46
|
-
});
|
|
47
|
-
this.hostElement.dispatchEvent(themeChangeEvent);
|
|
57
|
+
composed: true,
|
|
58
|
+
}));
|
|
48
59
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Load a theme from a CSS file path
|
|
51
|
-
*/
|
|
52
60
|
loadThemeFromPath(path) {
|
|
53
|
-
|
|
54
|
-
if (this.styleElement) {
|
|
55
|
-
|
|
61
|
+
var _a;
|
|
62
|
+
if ((_a = this.styleElement) === null || _a === void 0 ? void 0 : _a.parentNode) {
|
|
63
|
+
this.styleElement.parentNode.removeChild(this.styleElement);
|
|
56
64
|
}
|
|
57
|
-
// Create a new link element for the CSS file
|
|
58
65
|
this.styleElement = document.createElement('link');
|
|
59
66
|
this.styleElement.rel = 'stylesheet';
|
|
60
67
|
this.styleElement.href = path;
|
|
61
|
-
|
|
62
|
-
this.styleElement.
|
|
63
|
-
// Append the stylesheet to the document head
|
|
68
|
+
this.styleElement.id = this.stylesheetId;
|
|
69
|
+
this.styleElement.setAttribute('data-isometrik-theme', '1');
|
|
64
70
|
document.head.appendChild(this.styleElement);
|
|
65
71
|
}
|
|
66
|
-
/**
|
|
67
|
-
* Public method to toggle between light and dark themes
|
|
68
|
-
*/
|
|
69
72
|
async toggleTheme() {
|
|
70
73
|
this.mode = this.mode === 'light' ? 'dark' : 'light';
|
|
71
74
|
return this.mode;
|
|
72
75
|
}
|
|
73
|
-
/**
|
|
74
|
-
* Public method to set theme explicitly
|
|
75
|
-
*/
|
|
76
76
|
async setTheme(mode) {
|
|
77
77
|
this.mode = mode;
|
|
78
78
|
return this.mode;
|
|
79
79
|
}
|
|
80
|
+
async setThemeObject(theme) {
|
|
81
|
+
const normalized = normalizeThemeObject(theme || undefined);
|
|
82
|
+
applyThemeObjectToElement(this.hostElement, normalized);
|
|
83
|
+
return normalized;
|
|
84
|
+
}
|
|
80
85
|
render() {
|
|
81
|
-
return (h("div", { key: '
|
|
86
|
+
return (h("div", { key: 'eda588f5d70658cdbb4d2c112b87e967e26851f4', class: `theme-provider-container theme-${this.mode}` }, h("slot", { key: '1c0c507b5f4380353fb5af4332f1873eecd84d5c' })));
|
|
82
87
|
}
|
|
83
88
|
static get is() { return "theme-provider"; }
|
|
84
89
|
static get encapsulation() { return "shadow"; }
|
|
@@ -96,7 +101,7 @@ export class ThemeProvider {
|
|
|
96
101
|
"optional": false,
|
|
97
102
|
"docs": {
|
|
98
103
|
"tags": [],
|
|
99
|
-
"text": "Path to
|
|
104
|
+
"text": "Path / URL to a CSS theme file (CDN or local)."
|
|
100
105
|
},
|
|
101
106
|
"attribute": "theme-path",
|
|
102
107
|
"reflect": false
|
|
@@ -113,11 +118,44 @@ export class ThemeProvider {
|
|
|
113
118
|
"optional": false,
|
|
114
119
|
"docs": {
|
|
115
120
|
"tags": [],
|
|
116
|
-
"text": "
|
|
121
|
+
"text": "light | dark \u2014 drives `.theme-*` class on this host only (scoped)."
|
|
117
122
|
},
|
|
118
123
|
"attribute": "mode",
|
|
119
124
|
"reflect": true,
|
|
120
125
|
"defaultValue": "'light'"
|
|
126
|
+
},
|
|
127
|
+
"themeObject": {
|
|
128
|
+
"type": "unknown",
|
|
129
|
+
"mutable": false,
|
|
130
|
+
"complexType": {
|
|
131
|
+
"original": "{ [key: string]: string }",
|
|
132
|
+
"resolved": "{ [key: string]: string; }",
|
|
133
|
+
"references": {}
|
|
134
|
+
},
|
|
135
|
+
"required": false,
|
|
136
|
+
"optional": true,
|
|
137
|
+
"docs": {
|
|
138
|
+
"tags": [],
|
|
139
|
+
"text": "Inline CSS variable overrides. Keys may be `--brand` or `brand`.\nApplied on this host so values inherit into nested shadow trees."
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"mirrorToDocument": {
|
|
143
|
+
"type": "boolean",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "boolean",
|
|
147
|
+
"resolved": "boolean",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": false,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": "When true, also mirror mode onto <html> (legacy). Default false so\nembeds do not restyle the host page or fight sibling chats."
|
|
155
|
+
},
|
|
156
|
+
"attribute": "mirror-to-document",
|
|
157
|
+
"reflect": false,
|
|
158
|
+
"defaultValue": "false"
|
|
121
159
|
}
|
|
122
160
|
};
|
|
123
161
|
}
|
|
@@ -141,7 +179,7 @@ export class ThemeProvider {
|
|
|
141
179
|
"return": "Promise<\"dark\" | \"light\">"
|
|
142
180
|
},
|
|
143
181
|
"docs": {
|
|
144
|
-
"text": "
|
|
182
|
+
"text": "",
|
|
145
183
|
"tags": []
|
|
146
184
|
}
|
|
147
185
|
},
|
|
@@ -162,7 +200,32 @@ export class ThemeProvider {
|
|
|
162
200
|
"return": "Promise<\"dark\" | \"light\">"
|
|
163
201
|
},
|
|
164
202
|
"docs": {
|
|
165
|
-
"text": "
|
|
203
|
+
"text": "",
|
|
204
|
+
"tags": []
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"setThemeObject": {
|
|
208
|
+
"complexType": {
|
|
209
|
+
"signature": "(theme: { [key: string]: string; } | null) => Promise<Record<string, string>>",
|
|
210
|
+
"parameters": [{
|
|
211
|
+
"name": "theme",
|
|
212
|
+
"type": "{ [key: string]: string; }",
|
|
213
|
+
"docs": ""
|
|
214
|
+
}],
|
|
215
|
+
"references": {
|
|
216
|
+
"Promise": {
|
|
217
|
+
"location": "global",
|
|
218
|
+
"id": "global::Promise"
|
|
219
|
+
},
|
|
220
|
+
"Record": {
|
|
221
|
+
"location": "global",
|
|
222
|
+
"id": "global::Record"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"return": "Promise<Record<string, string>>"
|
|
226
|
+
},
|
|
227
|
+
"docs": {
|
|
228
|
+
"text": "",
|
|
166
229
|
"tags": []
|
|
167
230
|
}
|
|
168
231
|
}
|
|
@@ -176,6 +239,12 @@ export class ThemeProvider {
|
|
|
176
239
|
}, {
|
|
177
240
|
"propName": "mode",
|
|
178
241
|
"methodName": "handleModeChange"
|
|
242
|
+
}, {
|
|
243
|
+
"propName": "themeObject",
|
|
244
|
+
"methodName": "handleThemeObjectChange"
|
|
245
|
+
}, {
|
|
246
|
+
"propName": "mirrorToDocument",
|
|
247
|
+
"methodName": "handleMirrorChange"
|
|
179
248
|
}];
|
|
180
249
|
}
|
|
181
250
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-provider.js","sourceRoot":"","sources":["../../src/components/theme-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, State, Watch, Element, Method } from '@stencil/core';\nimport { applyThemeObjectToElement, normalizeThemeObject } from '../sdk/theme-tokens';\n\n@Component({\n tag: 'theme-provider',\n shadow: true,\n})\nexport class ThemeProvider {\n @Element() hostElement: HTMLElement;\n\n /** Path / URL to a CSS theme file (CDN or local). */\n @Prop() themePath: string;\n\n /** light | dark — drives `.theme-*` class on this host only (scoped). */\n @Prop({ mutable: true, reflect: true }) mode: 'light' | 'dark' = 'light';\n\n /**\n * Inline CSS variable overrides. Keys may be `--brand` or `brand`.\n * Applied on this host so values inherit into nested shadow trees.\n */\n @Prop() themeObject?: { [key: string]: string };\n\n /**\n * When true, also mirror mode onto <html> (legacy). Default false so\n * embeds do not restyle the host page or fight sibling chats.\n */\n @Prop() mirrorToDocument: boolean = false;\n\n @State() styleElement: HTMLLinkElement | null = null;\n\n private stylesheetId = `isometrik-theme-stylesheet-${Math.random().toString(36).slice(2, 9)}`;\n\n @Watch('themePath')\n handleThemePathChange(newPath: string) {\n if (newPath) {\n this.loadThemeFromPath(newPath);\n }\n }\n\n @Watch('mode')\n handleModeChange(newMode: 'light' | 'dark') {\n this.updateThemeClass(newMode);\n }\n\n @Watch('themeObject')\n handleThemeObjectChange(next?: { [key: string]: string }) {\n this.applyThemeObject(next);\n }\n\n @Watch('mirrorToDocument')\n handleMirrorChange() {\n this.updateThemeClass(this.mode);\n }\n\n componentDidLoad() {\n if (this.themePath) {\n this.loadThemeFromPath(this.themePath);\n }\n this.updateThemeClass(this.mode);\n this.applyThemeObject(this.themeObject);\n }\n\n disconnectedCallback() {\n if (this.styleElement?.parentNode) {\n this.styleElement.parentNode.removeChild(this.styleElement);\n this.styleElement = null;\n }\n if (this.mirrorToDocument) {\n document.documentElement.classList.remove('theme-light', 'theme-dark');\n }\n }\n\n private applyThemeObject(theme?: { [key: string]: string }) {\n applyThemeObjectToElement(this.hostElement, theme || null);\n }\n\n /** Mode class on this host only — CSS vars inherit into <web-chat> shadow. */\n private updateThemeClass(mode: 'light' | 'dark') {\n this.hostElement.classList.remove('theme-light', 'theme-dark');\n this.hostElement.classList.add(`theme-${mode}`);\n\n if (this.mirrorToDocument) {\n document.documentElement.classList.remove('theme-light', 'theme-dark');\n document.documentElement.classList.add(`theme-${mode}`);\n }\n\n this.hostElement.dispatchEvent(\n new CustomEvent('themechange', {\n detail: { mode, scoped: !this.mirrorToDocument },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private loadThemeFromPath(path: string) {\n if (this.styleElement?.parentNode) {\n this.styleElement.parentNode.removeChild(this.styleElement);\n }\n\n this.styleElement = document.createElement('link');\n this.styleElement.rel = 'stylesheet';\n this.styleElement.href = path;\n this.styleElement.id = this.stylesheetId;\n this.styleElement.setAttribute('data-isometrik-theme', '1');\n document.head.appendChild(this.styleElement);\n }\n\n @Method()\n async toggleTheme() {\n this.mode = this.mode === 'light' ? 'dark' : 'light';\n return this.mode;\n }\n\n @Method()\n async setTheme(mode: 'light' | 'dark') {\n this.mode = mode;\n return this.mode;\n }\n\n @Method()\n async setThemeObject(theme: { [key: string]: string } | null) {\n const normalized = normalizeThemeObject(theme || undefined);\n applyThemeObjectToElement(this.hostElement, normalized);\n return normalized;\n }\n\n render() {\n return (\n <div class={`theme-provider-container theme-${this.mode}`}>\n <slot></slot>\n </div>\n );\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// for fancy
|
|
2
2
|
export const CHAT_CREDS = {
|
|
3
|
-
userToken: 'SFMyNTY.g3QAAAACZAAEZGF0YW0AAAAYNjZmMjVkMWU3Zjc1NTkwMDM3MjNjN2QxZAAGc2lnbmVkbgYArMC7IpIB.ECtG8Fio6sLZbpNQcM1tFCZcVyCRPpFG9BwWMOEpCTA',
|
|
3
|
+
userToken: 'SFMyNTY.g3QAAAACZAAEZGF0YW0AAAAYNjZmMjVkMWU3Zjc1NTkwMDM3MjNjN2QxZAAGc2lnbmVkbgYArMC7IpIB.ECtG8Fio6sLZbpNQcM1tFCZcVyCRPpFG9BwWMOEpCTA',
|
|
4
4
|
|
|
5
5
|
// appSecret : will be same for a single applicaton
|
|
6
6
|
appSecret: 'SFMyNTY.g3QAAAACZAAEZGF0YXQAAAADbQAAAAlhY2NvdW50SWRtAAAAGDYxMjUwNDAzMDg4MDg1MDAwMWFhM2Y1Y20AAAAIa2V5c2V0SWRtAAAAJGFlYTkzY2YxLTY5MTYtNDA1MS1iM2I4LWRkMDAyMGViMTU3MW0AAAAJcHJvamVjdElkbQAAACQ3MjNjOTFlYS0xNTdkLTQ2YzMtYTljZS1iNWJiZGYwYmZjN2RkAAZzaWduZWRuBgDXqeZ4hgE.sbacYYKGfKuj-iJnkeV2rFlX6MFDtWOcoLcKL3uW8ic',
|
|
@@ -14,7 +14,7 @@ export const CHAT_CREDS = {
|
|
|
14
14
|
keysetId: "aea93cf1-6916-4051-b3b8-dd0020eb1571",
|
|
15
15
|
projectId: '723c91ea-157d-46c3-a9ce-b5bbdf0bfc7d',
|
|
16
16
|
baseUrl: 'https://apis.isometrik.io',
|
|
17
|
-
isometrikUserId: '66f25d1e7f7559003723c7d1'
|
|
17
|
+
isometrikUserId: '66f25d1e7f7559003723c7d1'
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export const MQTT_CREDS = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Demo customParts CEs for ?demoCustomUi=1 —
|
|
2
|
+
* Demo customParts CEs for ?demoCustomUi=1 — props + callbacks showcase.
|
|
3
3
|
* Property setters call render() so Stencil/Lit prop updates re-paint.
|
|
4
4
|
*/
|
|
5
5
|
export function registerCustomUiDemoElements() {
|
|
@@ -159,7 +159,7 @@ export function buildDemoEmptySlot() {
|
|
|
159
159
|
el.slot = 'empty';
|
|
160
160
|
el.style.cssText =
|
|
161
161
|
'height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:var(--bg-secondary-color);color:var(--text-primary-color);padding:24px;text-align:center';
|
|
162
|
-
el.innerHTML = `<strong>Custom empty slot (layout-only)</strong><span style="opacity:.75">
|
|
162
|
+
el.innerHTML = `<strong>Custom empty slot (layout-only)</strong><span style="opacity:.75">Tiles/bubbles use customParts props. Slots = panels.</span>`;
|
|
163
163
|
return el;
|
|
164
164
|
}
|
|
165
165
|
/** Log public events so hosts can see the fully-functional data bus. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-ui-demo-elements.js","sourceRoot":"","sources":["../../src/demos/custom-ui-demo-elements.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,4BAA4B;IAC1C,IAAI,OAAO,cAAc,KAAK,WAAW;QAAE,OAAO;IAElD,MAAM,mBAAmB,GAAG,CAAC,KAAU,EAAE,IAAc,EAAE,EAAE;QACzD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACjB,MAAM,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;YACxB,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE;gBAChC,GAAG;oBACD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;gBACrB,CAAC;gBACD,GAAG,CAAC,KAAK;oBACP,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK;wBAAE,OAAO;oBAClC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;oBACpB,IAAI,IAAI,CAAC,WAAW,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,UAAU;wBAAE,IAAI,CAAC,MAAM,EAAE,CAAC;gBAC3E,CAAC;gBACD,YAAY,EAAE,IAAI;aACnB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAC1C,MAAM,YAAa,SAAQ,WAAW;YAGpC,iBAAiB;g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AAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACzC,EAAE,CAAC,IAAI,GAAG,OAAO,CAAC;IAClB,EAAE,CAAC,KAAK,CAAC,OAAO;QACd,sMAAsM,CAAC;IACzM,EAAE,CAAC,SAAS,GAAG,qJAAqJ,CAAC;IACrK,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,0BAA0B,CAAC,IAAiB;IAC1D,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,CAAQ,EAAE,EAAE;QACzC,MAAM,MAAM,GAAI,CAAiB,CAAC,MAAM,CAAC;QACzC,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,GAAG,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC,CAAC;IACF,CAAC,WAAW,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,OAAO,CAC9G,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAC/C,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Demo customParts CEs for ?demoCustomUi=1 — Rounit-style props showcase.\n * Property setters call render() so Stencil/Lit prop updates re-paint.\n */\nexport function registerCustomUiDemoElements() {\n if (typeof customElements === 'undefined') return;\n\n const defineReactiveProps = (proto: any, keys: string[]) => {\n keys.forEach(key => {\n const store = `_${key}`;\n Object.defineProperty(proto, key, {\n get() {\n return this[store];\n },\n set(value) {\n if (this[store] === value) return;\n this[store] = value;\n if (this.isConnected && typeof this.render === 'function') this.render();\n },\n configurable: true,\n });\n });\n };\n\n if (!customElements.get('demo-chat-tile')) {\n class DemoChatTile extends HTMLElement {\n onSelect: (conversationId: string) => void;\n\n connectedCallback() {\n this.render();\n this.onclick = () => {\n const c = (this as any).conversation || {};\n const id = c.conversationId || c.groupcastId;\n if (typeof this.onSelect === 'function' && id) this.onSelect(id);\n };\n }\n\n render() {\n const c = (this as any).conversation || {};\n const meta = c.metaData || {};\n const title = c.isGroup\n ? c.conversationTitle\n : c.groupcastTitle ||\n c.opponentDetails?.userName ||\n c.lastMessageDetails?.userName ||\n 'Chat';\n const preview = (this as any).previewText || c.lastMessageDetails?.body || c.lastMessageDetails?.customType || '';\n const unread = (this as any).unreadCount || c.unreadMessagesCount || '';\n const isSelected = !!(this as any).isSelected;\n const isTyping = !!(this as any).isTyping;\n const typingUserName = (this as any).typingUserName;\n\n this.style.display = 'block';\n this.style.padding = '12px 14px';\n this.style.margin = '4px 8px';\n this.style.borderRadius = '10px';\n this.style.cursor = 'pointer';\n this.style.border = isSelected\n ? '2px solid var(--bg-primary-light)'\n : '1px solid var(--bg-secondary-color)';\n this.style.background = isSelected\n ? 'var(--bg-primary-light)'\n : 'var(--bg-primary-color)';\n\n this.innerHTML = `\n <div style=\"display:flex;justify-content:space-between;gap:8px;align-items:flex-start\">\n <div>\n <div style=\"font-weight:600;color:var(--text-primary-color)\">${title || 'Untitled'}</div>\n ${meta.orderId ? `<div style=\"font-size:11px;color:var(--text-info-color);margin-top:2px\">Order #${meta.orderId}</div>` : ''}\n <div style=\"font-size:12px;color:var(--text-tertiary-color);margin-top:4px\">\n ${isTyping ? `typing${typingUserName ? `: ${typingUserName}` : '…'}` : `[demo tile] ${preview || 'No messages'}`}\n </div>\n </div>\n ${unread ? `<span style=\"background:var(--bg-primary-light);border-radius:999px;padding:2px 8px;font-size:11px\">${unread}</span>` : ''}\n </div>`;\n }\n }\n defineReactiveProps(DemoChatTile.prototype, [\n 'conversation',\n 'isSelected',\n 'userMetaData',\n 'unreadCount',\n 'previewText',\n 'isTyping',\n 'typingUserName',\n ]);\n customElements.define('demo-chat-tile', DemoChatTile);\n }\n\n if (!customElements.get('demo-message-bubble')) {\n class DemoMessageBubble extends HTMLElement {\n onTap: (message: any) => void;\n onReply: (message: any) => void;\n onForward: (message: any) => void;\n onDelete: (message: any) => void;\n onInfo: (message: any) => void;\n\n connectedCallback() {\n this.render();\n }\n\n render() {\n const m = (this as any).message || {};\n const meta = m.metaData || {};\n const isSelf = !!(this as any).isSelf;\n const status = (this as any).status || 'sent';\n const align = isSelf ? 'flex-end' : 'flex-start';\n const bg = isSelf ? 'var(--bg-outgoing-message)' : 'var(--bg-incoming-message)';\n this.style.display = 'flex';\n this.style.justifyContent = align;\n this.style.width = '100%';\n this.style.margin = '6px 0';\n\n this.innerHTML = `\n <div class=\"demo-bubble\" style=\"max-width:75%;padding:10px 12px;border-radius:12px;background:${bg};color:var(--text-primary-color)\">\n <div style=\"font-size:11px;opacity:.7;margin-bottom:4px\">demo · ${status}${meta.orderId ? ` · #${meta.orderId}` : ''}</div>\n <div style=\"cursor:pointer\" data-action=\"tap\">${m.body || m.customType || '[media/system]'}</div>\n <div style=\"margin-top:6px;display:flex;gap:8px;flex-wrap:wrap\">\n <button type=\"button\" data-action=\"reply\" style=\"font-size:11px;border:none;background:transparent;color:inherit;text-decoration:underline;cursor:pointer\">Reply</button>\n <button type=\"button\" data-action=\"forward\" style=\"font-size:11px;border:none;background:transparent;color:inherit;text-decoration:underline;cursor:pointer\">Forward</button>\n <button type=\"button\" data-action=\"delete\" style=\"font-size:11px;border:none;background:transparent;color:inherit;text-decoration:underline;cursor:pointer\">Delete</button>\n ${isSelf ? `<button type=\"button\" data-action=\"info\" style=\"font-size:11px;border:none;background:transparent;color:inherit;text-decoration:underline;cursor:pointer\">Info</button>` : ''}\n </div>\n </div>`;\n\n this.querySelector('.demo-bubble')?.addEventListener('click', (e: Event) => {\n const t = e.target as HTMLElement;\n const action = t?.dataset?.action;\n const msg = (this as any).message;\n if (action === 'reply') {\n e.stopPropagation();\n this.onReply?.(msg);\n return;\n }\n if (action === 'forward') {\n e.stopPropagation();\n this.onForward?.(msg);\n return;\n }\n if (action === 'delete') {\n e.stopPropagation();\n this.onDelete?.(msg);\n return;\n }\n if (action === 'info') {\n e.stopPropagation();\n this.onInfo?.(msg);\n return;\n }\n if (action === 'tap' || t?.classList?.contains('demo-bubble')) {\n this.onTap?.(msg);\n }\n });\n }\n }\n defineReactiveProps(DemoMessageBubble.prototype, [\n 'message',\n 'isSelf',\n 'status',\n 'userMetaData',\n 'conversationDetails',\n 'allAttachments',\n ]);\n customElements.define('demo-message-bubble', DemoMessageBubble);\n }\n}\n\nexport function buildDemoEmptySlot(): HTMLElement {\n const el = document.createElement('div');\n el.slot = 'empty';\n el.style.cssText =\n 'height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:var(--bg-secondary-color);color:var(--text-primary-color);padding:24px;text-align:center';\n el.innerHTML = `<strong>Custom empty slot (layout-only)</strong><span style=\"opacity:.75\">Rounit-first: tiles/bubbles use customParts props. Slots = panels.</span>`;\n return el;\n}\n\n/** Log public events so hosts can see the fully-functional data bus. */\nexport function attachCustomUiDemoEventLog(chat: HTMLElement) {\n const log = (name: string) => (e: Event) => {\n const detail = (e as CustomEvent).detail;\n // eslint-disable-next-line no-console\n console.log(`[web-chat:${name}]`, detail);\n };\n ['chatReady', 'conversationsChange', 'messagesChange', 'conversationSelect', 'replyChange', 'chatError'].forEach(\n name => chat.addEventListener(name, log(name)),\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"custom-ui-demo-elements.js","sourceRoot":"","sources":["../../src/demos/custom-ui-demo-elements.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,4BAA4B;IAC1C,IAAI,OAAO,cAAc,KAAK,WAAW;QAAE,OAAO;IAElD,MAAM,mBAAmB,GAAG,CAAC,KAAU,EAAE,IAAc,EAAE,EAAE;QACzD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACjB,MAAM,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;YACxB,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE;gBAChC,GAAG;oBACD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;gBACrB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ts CEs for ?demoCustomUi=1 — props + callbacks showcase.\n * Property setters call render() so Stencil/Lit prop updates re-paint.\n */\nexport function registerCustomUiDemoElements() {\n if (typeof customElements === 'undefined') return;\n\n const defineReactiveProps = (proto: any, keys: string[]) => {\n keys.forEach(key => {\n const store = `_${key}`;\n Object.defineProperty(proto, key, {\n get() {\n return this[store];\n },\n set(value) {\n if (this[store] === value) return;\n this[store] = value;\n if (this.isConnected && typeof this.render === 'function') this.render();\n },\n configurable: true,\n });\n });\n };\n\n if (!customElements.get('demo-chat-tile')) {\n class DemoChatTile extends HTMLElement {\n onSelect: (conversationId: string) => void;\n\n connectedCallback() {\n this.render();\n this.onclick = () => {\n const c = (this as any).conversation || {};\n const id = c.conversationId || c.groupcastId;\n if (typeof this.onSelect === 'function' && id) this.onSelect(id);\n };\n }\n\n render() {\n const c = (this as any).conversation || {};\n const meta = c.metaData || {};\n const title = c.isGroup\n ? c.conversationTitle\n : c.groupcastTitle ||\n c.opponentDetails?.userName ||\n c.lastMessageDetails?.userName ||\n 'Chat';\n const preview = (this as any).previewText || c.lastMessageDetails?.body || c.lastMessageDetails?.customType || '';\n const unread = (this as any).unreadCount || c.unreadMessagesCount || '';\n const isSelected = !!(this as any).isSelected;\n const isTyping = !!(this as any).isTyping;\n const typingUserName = (this as any).typingUserName;\n\n this.style.display = 'block';\n this.style.padding = '12px 14px';\n this.style.margin = '4px 8px';\n this.style.borderRadius = '10px';\n this.style.cursor = 'pointer';\n this.style.border = isSelected\n ? '2px solid var(--bg-primary-light)'\n : '1px solid var(--bg-secondary-color)';\n this.style.background = isSelected\n ? 'var(--bg-primary-light)'\n : 'var(--bg-primary-color)';\n\n this.innerHTML = `\n <div style=\"display:flex;justify-content:space-between;gap:8px;align-items:flex-start\">\n <div>\n <div style=\"font-weight:600;color:var(--text-primary-color)\">${title || 'Untitled'}</div>\n ${meta.orderId ? `<div style=\"font-size:11px;color:var(--text-info-color);margin-top:2px\">Order #${meta.orderId}</div>` : ''}\n <div style=\"font-size:12px;color:var(--text-tertiary-color);margin-top:4px\">\n ${isTyping ? `typing${typingUserName ? `: ${typingUserName}` : '…'}` : `[demo tile] ${preview || 'No messages'}`}\n </div>\n </div>\n ${unread ? `<span style=\"background:var(--bg-primary-light);border-radius:999px;padding:2px 8px;font-size:11px\">${unread}</span>` : ''}\n </div>`;\n }\n }\n defineReactiveProps(DemoChatTile.prototype, [\n 'conversation',\n 'isSelected',\n 'userMetaData',\n 'unreadCount',\n 'previewText',\n 'isTyping',\n 'typingUserName',\n ]);\n customElements.define('demo-chat-tile', DemoChatTile);\n }\n\n if (!customElements.get('demo-message-bubble')) {\n class DemoMessageBubble extends HTMLElement {\n onTap: (message: any) => void;\n onReply: (message: any) => void;\n onForward: (message: any) => void;\n onDelete: (message: any) => void;\n onInfo: (message: any) => void;\n\n connectedCallback() {\n this.render();\n }\n\n render() {\n const m = (this as any).message || {};\n const meta = m.metaData || {};\n const isSelf = !!(this as any).isSelf;\n const status = (this as any).status || 'sent';\n const align = isSelf ? 'flex-end' : 'flex-start';\n const bg = isSelf ? 'var(--bg-outgoing-message)' : 'var(--bg-incoming-message)';\n this.style.display = 'flex';\n this.style.justifyContent = align;\n this.style.width = '100%';\n this.style.margin = '6px 0';\n\n this.innerHTML = `\n <div class=\"demo-bubble\" style=\"max-width:75%;padding:10px 12px;border-radius:12px;background:${bg};color:var(--text-primary-color)\">\n <div style=\"font-size:11px;opacity:.7;margin-bottom:4px\">demo · ${status}${meta.orderId ? ` · #${meta.orderId}` : ''}</div>\n <div style=\"cursor:pointer\" data-action=\"tap\">${m.body || m.customType || '[media/system]'}</div>\n <div style=\"margin-top:6px;display:flex;gap:8px;flex-wrap:wrap\">\n <button type=\"button\" data-action=\"reply\" style=\"font-size:11px;border:none;background:transparent;color:inherit;text-decoration:underline;cursor:pointer\">Reply</button>\n <button type=\"button\" data-action=\"forward\" style=\"font-size:11px;border:none;background:transparent;color:inherit;text-decoration:underline;cursor:pointer\">Forward</button>\n <button type=\"button\" data-action=\"delete\" style=\"font-size:11px;border:none;background:transparent;color:inherit;text-decoration:underline;cursor:pointer\">Delete</button>\n ${isSelf ? `<button type=\"button\" data-action=\"info\" style=\"font-size:11px;border:none;background:transparent;color:inherit;text-decoration:underline;cursor:pointer\">Info</button>` : ''}\n </div>\n </div>`;\n\n this.querySelector('.demo-bubble')?.addEventListener('click', (e: Event) => {\n const t = e.target as HTMLElement;\n const action = t?.dataset?.action;\n const msg = (this as any).message;\n if (action === 'reply') {\n e.stopPropagation();\n this.onReply?.(msg);\n return;\n }\n if (action === 'forward') {\n e.stopPropagation();\n this.onForward?.(msg);\n return;\n }\n if (action === 'delete') {\n e.stopPropagation();\n this.onDelete?.(msg);\n return;\n }\n if (action === 'info') {\n e.stopPropagation();\n this.onInfo?.(msg);\n return;\n }\n if (action === 'tap' || t?.classList?.contains('demo-bubble')) {\n this.onTap?.(msg);\n }\n });\n }\n }\n defineReactiveProps(DemoMessageBubble.prototype, [\n 'message',\n 'isSelf',\n 'status',\n 'userMetaData',\n 'conversationDetails',\n 'allAttachments',\n ]);\n customElements.define('demo-message-bubble', DemoMessageBubble);\n }\n}\n\nexport function buildDemoEmptySlot(): HTMLElement {\n const el = document.createElement('div');\n el.slot = 'empty';\n el.style.cssText =\n 'height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:var(--bg-secondary-color);color:var(--text-primary-color);padding:24px;text-align:center';\n el.innerHTML = `<strong>Custom empty slot (layout-only)</strong><span style=\"opacity:.75\">Tiles/bubbles use customParts props. Slots = panels.</span>`;\n return el;\n}\n\n/** Log public events so hosts can see the fully-functional data bus. */\nexport function attachCustomUiDemoEventLog(chat: HTMLElement) {\n const log = (name: string) => (e: Event) => {\n const detail = (e as CustomEvent).detail;\n // eslint-disable-next-line no-console\n console.log(`[web-chat:${name}]`, detail);\n };\n ['chatReady', 'conversationsChange', 'messagesChange', 'conversationSelect', 'replyChange', 'chatError'].forEach(\n name => chat.addEventListener(name, log(name)),\n );\n}\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Expose public SDK helpers on window for www demos / script-tag hosts.
|
|
3
|
+
* Bundlers should prefer named ESM imports from the package entry.
|
|
4
|
+
*/
|
|
5
|
+
import { initializeIsometrikWebchat, destroyIsometrikWebchat, ensureIsometrikWebchat, retainIsometrikWebchat, releaseIsometrikWebchat, mountReactInSlot, defineReactCustomPart, unmountReactSlot, createWebChatApi, isometrikWebchatApi, THEME_TOKEN_NAMES, switchChatTheme, applyCustomTheme, toggleTheme, resolveThemeProvider, resolveWebChat, } from "../sdk";
|
|
6
|
+
export default function () {
|
|
7
|
+
if (typeof window === 'undefined')
|
|
8
|
+
return;
|
|
9
|
+
const w = window;
|
|
10
|
+
w.initializeIsometrikWebchat = initializeIsometrikWebchat;
|
|
11
|
+
w.destroyIsometrikWebchat = destroyIsometrikWebchat;
|
|
12
|
+
w.ensureIsometrikWebchat = ensureIsometrikWebchat;
|
|
13
|
+
w.retainIsometrikWebchat = retainIsometrikWebchat;
|
|
14
|
+
w.releaseIsometrikWebchat = releaseIsometrikWebchat;
|
|
15
|
+
w.initializeChat = initializeIsometrikWebchat;
|
|
16
|
+
w.destroyChat = destroyIsometrikWebchat;
|
|
17
|
+
w.isometrikWebchatApi = isometrikWebchatApi;
|
|
18
|
+
w.createWebChatApi = createWebChatApi;
|
|
19
|
+
w.THEME_TOKEN_NAMES = THEME_TOKEN_NAMES;
|
|
20
|
+
w.mountReactInSlot = mountReactInSlot;
|
|
21
|
+
w.defineReactCustomPart = defineReactCustomPart;
|
|
22
|
+
w.unmountReactSlot = unmountReactSlot;
|
|
23
|
+
w.switchChatTheme = switchChatTheme;
|
|
24
|
+
w.applyCustomTheme = applyCustomTheme;
|
|
25
|
+
w.toggleTheme = toggleTheme;
|
|
26
|
+
w.resolveThemeProvider = resolveThemeProvider;
|
|
27
|
+
w.resolveWebChat = resolveWebChat;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=expose-sdk.js.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IAC5B,CAAC,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IAC9C,CAAC,CAAC,cAAc,GAAG,cAAc,CAAC;AACpC,CAAC","sourcesContent":["/**\n * Expose public SDK helpers on window for www demos / script-tag hosts.\n * Bundlers should prefer named ESM imports from the package entry.\n */\nimport {\n initializeIsometrikWebchat,\n destroyIsometrikWebchat,\n ensureIsometrikWebchat,\n retainIsometrikWebchat,\n releaseIsometrikWebchat,\n mountReactInSlot,\n defineReactCustomPart,\n unmountReactSlot,\n createWebChatApi,\n isometrikWebchatApi,\n THEME_TOKEN_NAMES,\n switchChatTheme,\n applyCustomTheme,\n toggleTheme,\n resolveThemeProvider,\n resolveWebChat,\n} from '../sdk';\n\nexport default function () {\n if (typeof window === 'undefined') return;\n const w = window as any;\n w.initializeIsometrikWebchat = initializeIsometrikWebchat;\n w.destroyIsometrikWebchat = destroyIsometrikWebchat;\n w.ensureIsometrikWebchat = ensureIsometrikWebchat;\n w.retainIsometrikWebchat = retainIsometrikWebchat;\n w.releaseIsometrikWebchat = releaseIsometrikWebchat;\n w.initializeChat = initializeIsometrikWebchat;\n w.destroyChat = destroyIsometrikWebchat;\n w.isometrikWebchatApi = isometrikWebchatApi;\n w.createWebChatApi = createWebChatApi;\n w.THEME_TOKEN_NAMES = THEME_TOKEN_NAMES;\n w.mountReactInSlot = mountReactInSlot;\n w.defineReactCustomPart = defineReactCustomPart;\n w.unmountReactSlot = unmountReactSlot;\n w.switchChatTheme = switchChatTheme;\n w.applyCustomTheme = applyCustomTheme;\n w.toggleTheme = toggleTheme;\n w.resolveThemeProvider = resolveThemeProvider;\n w.resolveWebChat = resolveWebChat;\n}\n"]}
|