isometrik-plugin-chat-sdk 2.0.16 → 2.0.18
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-95486d77.js → app-globals-170f9e71.js} +3 -3
- package/dist/cjs/{app-globals-95486d77.js.map → app-globals-170f9e71.js.map} +1 -1
- package/dist/cjs/attachment-preview_22.cjs.entry.js +111 -47
- package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
- package/dist/cjs/contracts-dfc84075.js.map +1 -1
- package/dist/cjs/{drawer-960b3f5d.js → drawer-00a2323a.js} +2 -2
- package/dist/cjs/{drawer-960b3f5d.js.map → drawer-00a2323a.js.map} +1 -1
- package/dist/cjs/forward-memebers.cjs.entry.js +15 -9
- package/dist/cjs/forward-memebers.cjs.entry.js.map +1 -1
- package/dist/cjs/{group-members-1205fc4c.js → group-members-b3bea06e.js} +5 -5
- package/dist/cjs/{group-members-1205fc4c.js.map → group-members-b3bea06e.js.map} +1 -1
- package/dist/cjs/{group-members-5a82ec8a.js → group-members-cef1198e.js} +29 -1
- package/dist/cjs/group-members-cef1198e.js.map +1 -0
- package/dist/cjs/{groupcast-c93d4a7d.js → groupcast-3cb44a25.js} +16 -16
- package/dist/cjs/{groupcast-c93d4a7d.js.map → groupcast-3cb44a25.js.map} +1 -1
- package/dist/cjs/{groupcast-5e3d49c4.js → groupcast-4239cbfc.js} +7 -7
- package/dist/cjs/{groupcast-5e3d49c4.js.map → groupcast-4239cbfc.js.map} +1 -1
- package/dist/cjs/{index-66f98408.js → index-3411923c.js} +2 -1
- package/dist/cjs/index-3411923c.js.map +1 -0
- package/dist/cjs/index.cjs.js +7 -6
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/isometrik-webchat.cjs.js +9 -8
- package/dist/cjs/isometrik-webchat.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +9 -8
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/local-notification-bdd04d7a.js +259 -0
- package/dist/cjs/local-notification-bdd04d7a.js.map +1 -0
- package/dist/cjs/login-page_3.cjs.entry.js +78 -31
- 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/member-add.cjs.entry.js +5 -6
- package/dist/cjs/member-add.cjs.entry.js.map +1 -1
- package/dist/cjs/{message-reaction-8f93a048.js → message-reaction-82a4f93c.js} +5 -5
- package/dist/cjs/{message-reaction-8f93a048.js.map → message-reaction-82a4f93c.js.map} +1 -1
- package/dist/cjs/reaction-container.cjs.entry.js +3 -4
- package/dist/cjs/reaction-container.cjs.entry.js.map +1 -1
- package/dist/cjs/{runtime-controls-959fe6ed.js → runtime-controls-99f378d4.js} +9 -4
- package/dist/cjs/runtime-controls-99f378d4.js.map +1 -0
- package/dist/cjs/{send-media-2dadbb03.js → send-media-7c865c19.js} +13 -11
- package/dist/cjs/send-media-7c865c19.js.map +1 -0
- package/dist/cjs/signup-page.cjs.entry.js +2 -2
- package/dist/cjs/spinner-loader.cjs.entry.js +1 -1
- package/dist/cjs/{index.m-ff115b26.js → toast-91093c84.js} +156 -1
- package/dist/cjs/{index.m-ff115b26.js.map → toast-91093c84.js.map} +1 -1
- package/dist/cjs/toast-notification.cjs.entry.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +22 -8
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/ForwardMessageList/ForwardMessageList.js +10 -4
- package/dist/collection/components/ChatUIComponent/shared/ForwardMessageList/ForwardMessageList.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/chat-tile/chat-tile.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js +64 -3
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/new chat/new-chat.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/spinner-loader/spinner-loader.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/toast-notification/toast-notification.js +3 -3
- package/dist/collection/components/Login.js +1 -1
- package/dist/collection/components/Signup.js +2 -2
- package/dist/collection/components/my-component/web-chat/WebChat.js +61 -2
- package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/event-handlers.js +16 -3
- package/dist/collection/components/my-component/web-chat/event-handlers.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/offline-host.js +11 -0
- package/dist/collection/components/my-component/web-chat/offline-host.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/public-send.js +10 -0
- package/dist/collection/components/my-component/web-chat/public-send.js.map +1 -1
- package/dist/collection/components/theme-provider.js +1 -1
- package/dist/collection/lib/chat/conversation-notifications.js +26 -0
- package/dist/collection/lib/chat/conversation-notifications.js.map +1 -0
- package/dist/collection/lib/chat/index.js +3 -0
- package/dist/collection/lib/chat/index.js.map +1 -1
- package/dist/collection/lib/chat/local-notification.js +118 -0
- package/dist/collection/lib/chat/local-notification.js.map +1 -0
- package/dist/collection/lib/chat/message-notification.js +134 -0
- package/dist/collection/lib/chat/message-notification.js.map +1 -0
- package/dist/collection/lib/chat/send-media.js +3 -1
- package/dist/collection/lib/chat/send-media.js.map +1 -1
- package/dist/collection/lib/custom-ui/contracts.js.map +1 -1
- package/dist/collection/lib/custom-ui/index.js.map +1 -1
- package/dist/collection/lib/mqtt/dispatch.js +17 -1
- package/dist/collection/lib/mqtt/dispatch.js.map +1 -1
- package/dist/collection/sdk/init.js +5 -0
- package/dist/collection/sdk/init.js.map +1 -1
- package/dist/components/ChatFooter.js +21 -8
- package/dist/components/ChatFooter.js.map +1 -1
- package/dist/components/GroupCast2.js +1 -1
- package/dist/components/Login.js +1 -1
- package/dist/components/WebChat.js +55 -4
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/contact-info2.js +88 -6
- package/dist/components/contact-info2.js.map +1 -1
- package/dist/components/context-menu2.js +1 -1
- package/dist/components/contracts.js.map +1 -1
- package/dist/components/forward-memebers.js +10 -4
- package/dist/components/forward-memebers.js.map +1 -1
- package/dist/components/index.js +5 -0
- 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/local-notification.js +254 -0
- package/dist/components/local-notification.js.map +1 -0
- package/dist/components/media-gallery.js +1 -1
- package/dist/components/send-media.js +3 -1
- package/dist/components/send-media.js.map +1 -1
- package/dist/components/signup-page.js +2 -2
- package/dist/components/spinner-loader2.js +1 -1
- package/dist/components/theme-provider2.js +1 -1
- package/dist/components/toast-notification.js +3 -3
- package/dist/esm/{app-globals-879c137f.js → app-globals-15a6ef50.js} +3 -3
- package/dist/esm/{app-globals-879c137f.js.map → app-globals-15a6ef50.js.map} +1 -1
- package/dist/esm/attachment-preview_22.entry.js +83 -19
- package/dist/esm/attachment-preview_22.entry.js.map +1 -1
- package/dist/esm/contracts-50f4ddae.js.map +1 -1
- package/dist/esm/{drawer-d54c2f10.js → drawer-7de04622.js} +2 -2
- package/dist/esm/{drawer-d54c2f10.js.map → drawer-7de04622.js.map} +1 -1
- package/dist/esm/forward-memebers.entry.js +13 -7
- package/dist/esm/forward-memebers.entry.js.map +1 -1
- package/dist/esm/{group-members-d603f29f.js → group-members-36cf9395.js} +2 -2
- package/dist/esm/{group-members-d603f29f.js.map → group-members-36cf9395.js.map} +1 -1
- package/dist/esm/{group-members-05414da2.js → group-members-7909941c.js} +28 -2
- package/dist/esm/group-members-7909941c.js.map +1 -0
- package/dist/esm/{groupcast-9c7d2a32.js → groupcast-cc10c6a4.js} +2 -2
- package/dist/esm/{groupcast-9c7d2a32.js.map → groupcast-cc10c6a4.js.map} +1 -1
- package/dist/esm/{groupcast-58a59d64.js → groupcast-ea2466c8.js} +3 -3
- package/dist/esm/{groupcast-58a59d64.js.map → groupcast-ea2466c8.js.map} +1 -1
- package/dist/esm/{index-4c865e34.js → index-142896ce.js} +2 -2
- package/dist/esm/index-142896ce.js.map +1 -0
- package/dist/esm/index.js +8 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/isometrik-webchat.js +9 -8
- package/dist/esm/isometrik-webchat.js.map +1 -1
- package/dist/esm/loader.js +9 -8
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/local-notification-4c1e166d.js +254 -0
- package/dist/esm/local-notification-4c1e166d.js.map +1 -0
- package/dist/esm/login-page_3.entry.js +61 -14
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/esm/media-gallery.entry.js +1 -1
- package/dist/esm/member-add.entry.js +5 -6
- package/dist/esm/member-add.entry.js.map +1 -1
- package/dist/esm/{message-reaction-0a2bb115.js → message-reaction-0d2ef75f.js} +2 -2
- package/dist/esm/{message-reaction-0a2bb115.js.map → message-reaction-0d2ef75f.js.map} +1 -1
- package/dist/esm/reaction-container.entry.js +3 -4
- package/dist/esm/reaction-container.entry.js.map +1 -1
- package/dist/esm/{runtime-controls-6b7c852a.js → runtime-controls-8a22625e.js} +9 -4
- package/dist/esm/runtime-controls-8a22625e.js.map +1 -0
- package/dist/esm/{send-media-ac360d8e.js → send-media-5527ee9f.js} +5 -3
- package/dist/esm/send-media-5527ee9f.js.map +1 -0
- package/dist/esm/signup-page.entry.js +2 -2
- package/dist/esm/spinner-loader.entry.js +1 -1
- package/dist/esm/{index.m-8c70037f.js → toast-a1531088.js} +156 -2
- package/dist/esm/{index.m-8c70037f.js.map → toast-a1531088.js.map} +1 -1
- package/dist/esm/toast-notification.entry.js +3 -3
- package/dist/isometrik-webchat/index.esm.js +1 -1
- package/dist/isometrik-webchat/index.esm.js.map +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js.map +1 -1
- package/dist/isometrik-webchat/{p-586f6978.entry.js → p-08ba6153.entry.js} +2 -2
- package/dist/isometrik-webchat/p-1db79cfb.js +2 -0
- package/dist/isometrik-webchat/p-343f50b4.js +7 -0
- package/dist/isometrik-webchat/p-343f50b4.js.map +1 -0
- package/dist/isometrik-webchat/{p-5d98a8a0.js → p-4671fe73.js} +2 -2
- package/dist/isometrik-webchat/{p-ca47d693.entry.js → p-52a575c0.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-b1330793.js → p-54267fe0.js} +2 -2
- package/dist/isometrik-webchat/p-54267fe0.js.map +1 -0
- package/dist/isometrik-webchat/p-5b965e04.js +2 -0
- package/dist/isometrik-webchat/p-5b965e04.js.map +1 -0
- package/dist/isometrik-webchat/p-5cfb953d.js +2 -0
- package/dist/isometrik-webchat/p-5cfb953d.js.map +1 -0
- package/dist/isometrik-webchat/p-5d1877d1.entry.js +2 -0
- package/dist/isometrik-webchat/{p-ba6de4e2.entry.js.map → p-5d1877d1.entry.js.map} +1 -1
- package/dist/isometrik-webchat/p-643457b8.js +2 -0
- package/dist/isometrik-webchat/p-643457b8.js.map +1 -0
- package/dist/isometrik-webchat/p-6fc95e0e.js +2 -0
- package/dist/isometrik-webchat/p-6fc95e0e.js.map +1 -0
- package/dist/isometrik-webchat/{p-d6fd2dd7.entry.js → p-925da2c0.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-1dc52239.js → p-925decda.js} +2 -2
- package/dist/isometrik-webchat/p-a9380fb3.entry.js +2 -0
- package/dist/isometrik-webchat/p-a9380fb3.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-adc45831.js.map +1 -1
- package/dist/isometrik-webchat/{p-1953573d.js → p-c08055fe.js} +2 -2
- package/dist/isometrik-webchat/p-c49de274.entry.js +2 -0
- package/dist/isometrik-webchat/{p-6024bf2a.entry.js.map → p-c49de274.entry.js.map} +1 -1
- package/dist/isometrik-webchat/{p-04fdbd0a.js → p-c591fa45.js} +2 -2
- package/dist/isometrik-webchat/{p-9db196a4.entry.js → p-cbb1179b.entry.js} +2 -2
- package/dist/isometrik-webchat/p-ceb08a13.entry.js +2 -0
- package/dist/isometrik-webchat/p-ceb08a13.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-46e0048e.js → p-dab06d54.js} +2 -2
- package/dist/isometrik-webchat/p-ffbbe278.entry.js +2 -0
- package/dist/isometrik-webchat/p-ffbbe278.entry.js.map +1 -0
- package/dist/types/components/ChatUIComponent/shared/contact-info/contact-info.d.ts +5 -0
- package/dist/types/components/my-component/web-chat/WebChat.d.ts +21 -0
- package/dist/types/components.d.ts +36 -0
- package/dist/types/lib/chat/conversation-notifications.d.ts +12 -0
- package/dist/types/lib/chat/index.d.ts +3 -0
- package/dist/types/lib/chat/local-notification.d.ts +39 -0
- package/dist/types/lib/chat/message-notification.d.ts +37 -0
- package/dist/types/lib/chat/send-media.d.ts +3 -0
- package/dist/types/lib/custom-ui/contracts.d.ts +10 -0
- package/dist/types/lib/custom-ui/index.d.ts +6 -1
- package/dist/types/sdk/init.d.ts +21 -0
- package/docs/CUSTOMIZATION.md +30 -0
- package/docs/INTEGRATION.md +20 -4
- package/package.json +1 -1
- package/dist/cjs/group-members-5a82ec8a.js.map +0 -1
- package/dist/cjs/index-66f98408.js.map +0 -1
- package/dist/cjs/runtime-controls-959fe6ed.js.map +0 -1
- package/dist/cjs/send-media-2dadbb03.js.map +0 -1
- package/dist/cjs/toast-75ef0607.js +0 -159
- package/dist/cjs/toast-75ef0607.js.map +0 -1
- package/dist/esm/group-members-05414da2.js.map +0 -1
- package/dist/esm/index-4c865e34.js.map +0 -1
- package/dist/esm/runtime-controls-6b7c852a.js.map +0 -1
- package/dist/esm/send-media-ac360d8e.js.map +0 -1
- package/dist/esm/toast-45ac7913.js +0 -157
- package/dist/esm/toast-45ac7913.js.map +0 -1
- package/dist/isometrik-webchat/p-0c06a021.js +0 -2
- package/dist/isometrik-webchat/p-0c06a021.js.map +0 -1
- package/dist/isometrik-webchat/p-217b9dc2.js +0 -2
- package/dist/isometrik-webchat/p-217b9dc2.js.map +0 -1
- package/dist/isometrik-webchat/p-30855ba7.js +0 -2
- package/dist/isometrik-webchat/p-30855ba7.js.map +0 -1
- package/dist/isometrik-webchat/p-39b6adef.entry.js +0 -2
- package/dist/isometrik-webchat/p-39b6adef.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-57d958b8.entry.js +0 -2
- package/dist/isometrik-webchat/p-57d958b8.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-6024bf2a.entry.js +0 -2
- package/dist/isometrik-webchat/p-79d1a171.js +0 -2
- package/dist/isometrik-webchat/p-7af9a7f3.entry.js +0 -2
- package/dist/isometrik-webchat/p-7af9a7f3.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-8f17345f.js +0 -7
- package/dist/isometrik-webchat/p-8f17345f.js.map +0 -1
- package/dist/isometrik-webchat/p-b1330793.js.map +0 -1
- package/dist/isometrik-webchat/p-b667a9fc.js +0 -2
- package/dist/isometrik-webchat/p-b667a9fc.js.map +0 -1
- package/dist/isometrik-webchat/p-ba6de4e2.entry.js +0 -2
- /package/dist/isometrik-webchat/{p-586f6978.entry.js.map → p-08ba6153.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-79d1a171.js.map → p-1db79cfb.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-5d98a8a0.js.map → p-4671fe73.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-ca47d693.entry.js.map → p-52a575c0.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-d6fd2dd7.entry.js.map → p-925da2c0.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-1dc52239.js.map → p-925decda.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-1953573d.js.map → p-c08055fe.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-04fdbd0a.js.map → p-c591fa45.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-9db196a4.entry.js.map → p-cbb1179b.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-46e0048e.js.map → p-dab06d54.js.map} +0 -0
|
@@ -128,11 +128,11 @@ const Signup = class {
|
|
|
128
128
|
img.src = this.profilePlaceholderImage;
|
|
129
129
|
}
|
|
130
130
|
render() {
|
|
131
|
-
return (index.h("div", { key: '
|
|
131
|
+
return (index.h("div", { key: '21ad0959d8e603b328ab87874d59ad9a500dfb0e', class: "signup-page-container" }, index.h("div", { key: '678e4f2983b415eb6ea843de1756d9e9b7b2eede', class: "signup-banner-container" }, index.h("div", { key: '23acd0be8e03dc20ae0105e8130e17e3842a4d53', class: "signup-banner-logo", innerHTML: IsometrikLogo.isometrikLogo }), index.h("div", { key: '9562e8e5839c9990c61b16bb14b7308dcd203478', class: "signup-banner-text" }, index.h("h1", { key: '57da487e7456ab98ca749ed5d266e142c0fa608d' }, "\"Revolutionizing How You Chat.\""), index.h("p", { key: '46a5d75ade5dc76d2c5a2dc7708108b573c15bfd' }, "\"Welcome to the future of chatting \u2013 simple, fast, and inclusive. Start connecting like never before!\"")), index.h("img", { key: '565b354dde5c94942ec37febb155bee57e10e2ba', src: onboardingImagePath, alt: "signup Page", style: { width: '68%', height: '52%', position: 'absolute', bottom: '0', right: '0' } }), index.h("div", { key: 'e9ede2d3e7ab71f3656c59a261e2d503db58857b', class: "signup-image-overlay" }, index.h("div", { key: '7c66dce4de7f5a1ed1994fd24015e8ef03aa6052' }), index.h("div", { key: '039d0ebdc69c0e61d7fb0a1d14e3df1a1627b91a' }))), index.h("div", { key: '268b8edba52c0e632dccfdfc6596d210cb1aeec8', class: "signup-container" }, index.h("div", { key: '1f9815d967b4d78a833d932f87afa337c3534e4f', class: "signup-container-logo", innerHTML: IsometrikLogo.isometrikLogo }), index.h("div", { key: '20ef320e78ebe27030fb6116308d9e9486e9cd05', class: "signup-container-inner" }, index.h("div", { key: '8ac10bf53b94c7d8898e191452a6327d5161a7fc', class: "signup-header" }, index.h("h2", { key: '550caa0ab29a2296317d8b179ebba954cfb5c529' }, "Join the Conversation!"), index.h("p", { key: 'fe623b53075934ea6183ea7bbd4068ad77501a4f' }, "Create your free account and connect with everyone in just one click!")), index.h("form", { key: 'c63b396d0c49cb3a4eccaf575900b2ffa4859243', class: "signup-form", onSubmit: this.handleSubmit }, index.h("div", { key: 'a38db79dded4e56a673470ab2496e91fd7f587e0', class: "form-group" }, index.h("label", { key: '89132d9980977b4d4f7e37e7444eaf034d974678', htmlFor: "profileImage" }, "Profile Image"), index.h("div", { key: '61280e6f551f9a9539585a5c4f20caa7a09a6a4c', class: "profile-image-container" }, index.h("div", { key: '95498ecca434def97533eebacdc05d6563599378', class: "profile-image-circle", onClick: () => {
|
|
132
132
|
if (this.profileImageInputRef) {
|
|
133
133
|
this.profileImageInputRef.click();
|
|
134
134
|
}
|
|
135
|
-
} }, this.profileImageUrl ? (index.h("img", { src: this.profileImageUrl, alt: "Profile", class: "profile-image", onError: (e) => this.handleImageError(e) })) : (index.h("span", { class: "upload-placeholder" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "44px", viewBox: "0 -960 960 960", width: "44px", fill: "#e8eaed" }, index.h("path", { d: "M440-440ZM120-120q-33 0-56.5-23.5T40-200v-480q0-33 23.5-56.5T120-760h126l74-80h240v80H355l-73 80H120v480h640v-360h80v360q0 33-23.5 56.5T760-120H120Zm640-560v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80ZM440-260q75 0 127.5-52.5T620-440q0-75-52.5-127.5T440-620q-75 0-127.5 52.5T260-440q0 75 52.5 127.5T440-260Zm0-80q-42 0-71-29t-29-71q0-42 29-71t71-29q42 0 71 29t29 71q0 42-29 71t-71 29Z" })), ' '))), index.h("input", { key: '
|
|
135
|
+
} }, this.profileImageUrl ? (index.h("img", { src: this.profileImageUrl, alt: "Profile", class: "profile-image", onError: (e) => this.handleImageError(e) })) : (index.h("span", { class: "upload-placeholder" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "44px", viewBox: "0 -960 960 960", width: "44px", fill: "#e8eaed" }, index.h("path", { d: "M440-440ZM120-120q-33 0-56.5-23.5T40-200v-480q0-33 23.5-56.5T120-760h126l74-80h240v80H355l-73 80H120v480h640v-360h80v360q0 33-23.5 56.5T760-120H120Zm640-560v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80ZM440-260q75 0 127.5-52.5T620-440q0-75-52.5-127.5T440-620q-75 0-127.5 52.5T260-440q0 75 52.5 127.5T440-260Zm0-80q-42 0-71-29t-29-71q0-42 29-71t71-29q42 0 71 29t29 71q0 42-29 71t-71 29Z" })), ' '))), index.h("input", { key: '4a8e911958a93b77cb1305567feb0f2a87465af2', type: "file", id: "profileImage", accept: "image/*", ref: el => (this.profileImageInputRef = el), onChange: (e) => this.handleImageUpload(e), style: { display: 'none' } }), index.h("span", { key: '4bc76f556fe2002147842d3f86cf24b0ceb7ee91', class: "upload-text" }, "Click to upload profile picture"), this.profileImageUrl && (index.h("div", { key: 'ce9a13329bb00ce4b9a9f447cc7ac79c3826d5c1', class: "pencil-icon" }, index.h("svg", { key: '3d44ba1073e79b8efbcf0d00d54a655710b93cb2', xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "#e8eaed" }, index.h("path", { key: '60c5c2b37832a489c0ea726a8ce3604442a90291', d: "M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z" })))))), index.h("div", { key: '8f455f41507b963aeb0556265e21d98ef6ea762e', class: "form-group" }, index.h("label", { key: 'c4d3777915a77bff666c5addadf054207ddd6073', htmlFor: "username" }, "Username"), index.h("input", { key: 'b2fe10531b4cf45d4e783c27744c4ff649fec951', type: "text", id: "username", value: this.username, onInput: (e) => (this.username = e.target.value), placeholder: "Enter your username" })), index.h("div", { key: '4d0ff9dd7b23eba3074a79a33b19c6971a7abf68', class: "form-group" }, index.h("label", { key: '8d16365611e4831c18e1b86900f7c122562cd846', htmlFor: "email" }, "Email"), index.h("input", { key: 'bbad24cadfacc70803ee0958bc272fc279e7fa6b', type: "email", id: "email", value: this.email, onInput: (e) => (this.email = e.target.value), placeholder: "Enter your email" })), index.h("div", { key: '1b13a5fbc67e40c3b6793f1810ab5ae55abdbedc', class: "form-group" }, index.h("label", { key: 'ca74161c7982b84a36f363f9b41004007b988a4a', htmlFor: "password" }, "Password"), index.h("input", { key: 'b7d228f135c79d97e93cf70cd1a56dc95ebb6edf', type: "password", id: "password", value: this.password, onInput: (e) => (this.password = e.target.value), placeholder: "Enter your password" })), this.errorMessage && index.h("div", { key: 'be88636767142b023773d34597da51cd6b031a88', class: "error-message" }, this.errorMessage), index.h("button", { key: 'cd5dac30bf56915fe2a537f79ae182d8ab44364b', type: "submit", class: "signup-button", disabled: this.isLoading }, this.isLoading ? 'Signing up...' : 'Sign Up'))), index.h("div", { key: 'c29a5aaf8fa464eb62cba6675cecdc3d220def75', class: "signup-footer" }, "Already have an account? ", index.h("a", { key: '2f1ddf7c74cff4e8bd7e9ce759b9b5a5ecacb8d2', onClick: () => this.tryLogin.emit() }, "Log In")))));
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
Signup.style = ":host {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100dvh;\n background: var(--bg-primary-color);\n font-family: 'Simpli Norm', sans-serif;\n }\n\n .signup-container {\n padding: 2rem;\n border-radius: 10px;\n width: 50vw;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-evenly;\n align-items: center;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n }\n\n .signup-header {\n text-align: center;\n margin-bottom: 2rem;\n color: var(--text-primary-color);\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n\n .signup-form {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n\n .form-group {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n }\n\n .form-group label {\n color: #333;\n font-size: 1rem;\n }\n\n .form-group input {\n padding: 0.75rem;\n border: 1px solid #EEE;\n border-radius: 4px;\n background: white;\n color: #333;\n outline: none;\n }\n\n .form-group input:focus {\n border-color: #EEE;\n }\n\n .signup-button {\n background: #414bac;\n color: white;\n padding: 0.75rem;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-weight: 500;\n transition: background-color 0.2s;\n }\n\n .signup-button:hover {\n background: #363f8f;\n }\n\n .error-message {\n color: #ff4444;\n font-size: 0.9rem;\n text-align: center;\n margin-top: 1rem;\n }\n\n .signup-page-container {\n display: flex;\n align-items: center;\n height: 100%;\n width: 100%;\n }\n .signup-banner-container {\n background: #e5e6fb;\n width: 50vw;\n height: 100%;\n position: relative;\n padding: 20px;\n overflow: hidden;\n }\n\n .signup-banner-logo {\n padding: 30px 20px;\n }\n\n .signup-container-logo {\n padding: 30px 20px;\n position: absolute;\n top: 0;\n margin:auto;\n display: none;\n }\n\n\n .signup-header h2 {\n font-size: 2rem;\n font-weight: 600;\n color: #000;\n margin: 0;\n }\n\n .signup-header p {\n font-size: 1rem;\n font-weight: 400;\n color: #333333;\n width: 70%;\n text-align: center;\n }\n .signup-banner-text {\n margin-top: 20px;\n z-index: 999;\n padding: 20px;\n position: absolute;\n }\n .signup-banner-text h1 {\n font-size: 2.5rem;\n font-weight: 600;\n color: #414ba6;\n width: 50%;\n }\n\n .signup-banner-text p {\n font-size: 1.5rem;\n font-weight: 400;\n color: #333333;\n width: 70%;\n line-height: 2rem;\n }\n\n \n\n .signup-image-overlay div {\n position: absolute;\n width: 187px;\n height: 187px;\n filter: blur(14px);\n border-radius: 50%;\n background: linear-gradient(225.81deg, #d8dffe 15.93%, #7a90f7 100%);\n \n \n }\n\n .signup-image-overlay div:first-child {\n top: -52px;\n right: -63px;\n }\n\n .signup-container-inner {\n \n }\n\n .signup-image-overlay div:nth-child(2) {\n bottom: -102px;\n left: -103px;\n height: 359px;\n width: 359px;\n }\n\n .signup-footer {\n text-align: center; \n font-size: 14px;\n }\n\n .signup-footer a {\n cursor: pointer;\n text-decoration: underline;\n }\n\n @media (max-width: 768px) {\n .signup-banner-container {\n display: none;\n }\n\n .signup-container {\n width: 100%;\n background: #e5e6fb;\n }\n\n .signup-container-logo {\n display: block;\n }\n }\n\n\n.profile-image-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.5rem;\n margin: 1rem 0;\n position: relative;\n width: 100%;\n}\n\n.profile-image-circle {\n width: 128px;\n height: 128px;\n border-radius: 50%;\n border: 2px solid #e2e8f0;\n overflow: hidden;\n cursor: pointer;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #f8fafc;\n transition: background-color 0.2s;\n}\n\n.profile-image-circle:hover {\n background-color: #f1f5f9;\n}\n\n.profile-image {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.upload-placeholder {\n font-size: 2rem;\n}\n\n.pencil-icon {\n position: absolute;\n bottom: 18px;\n right: 18px;\n border-radius: 50%;\n padding: 8px;\n}\n\n.upload-text {\n font-size: 0.875rem;\n color: #666;\n}";
|
|
@@ -15,7 +15,7 @@ const SpinnerLoader = class {
|
|
|
15
15
|
this.spinnerBorderWidth = '2px';
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (index.h("div", { key: '
|
|
18
|
+
return (index.h("div", { key: '6fe083eab0a3b87c0b13f33c9ec3128358dbfb49', class: "main-container" }, index.h("div", { key: 'c957263d3b73cc4fa965f5bd34590d810f80931a', class: "spinner", style: {
|
|
19
19
|
height: this.height,
|
|
20
20
|
width: this.width,
|
|
21
21
|
borderWidth: this.spinnerBorderWidth,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const index = require('./index-3411923c.js');
|
|
4
|
+
|
|
3
5
|
function getAugmentedNamespace(n) {
|
|
4
6
|
if (n.__esModule) return n;
|
|
5
7
|
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
@@ -39,6 +41,159 @@ var ys=Object.defineProperty;var Kg=Object.getOwnPropertyDescriptor;var Gg=Objec
|
|
|
39
41
|
|
|
40
42
|
function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s(e,t);}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function o(e,t,n){return o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&s(o,n.prototype),o},o.apply(null,arguments)}function i(e){var t="function"==typeof Map?new Map:void 0;return i=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n);}function n(){return o(e,arguments,r(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,e)},i(e)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c=/*#__PURE__*/function(e){function t(n,r){var s;return (s=e.call(this,r)||this).statusCode=void 0,Object.setPrototypeOf(a(s),(this instanceof t?this.constructor:void 0).prototype),s.name=Error.name,s.statusCode=n,Error.captureStackTrace(a(s)),s}return n(t,e),t}(/*#__PURE__*/i(Error)),u=/*#__PURE__*/function(e){function t(t,n){var r;return (r=e.call(this,400,"Conversation not found or not allowed to fetch messages count")||this).errorMsg=void 0,r.errorCode=void 0,r.errorMsg=t,r.errorCode=n||0,r}return n(t,e),t}(c),h=/*#__PURE__*/function(e){function t(t,n){var r;return (r=e.call(this,404,t)||this).errorMsg=void 0,r.errorCode=void 0,r.errorMsg=t,r.errorCode=n,r}return n(t,e),t}(c),p=/*#__PURE__*/function(e){function t(t){var n;return (n=e.call(this,503,"Service Unavailable")||this).errorMsg=void 0,n.errorMsg=t,n}return n(t,e),t}(c),f=/*#__PURE__*/function(e){function t(t,n){var r;return (r=e.call(this,422,"Unprocessable entity")||this).errorProperties=void 0,r.errorCode=void 0,r.errorProperties=t,r.errorCode=n||0,r}return n(t,e),t}(c),d=/*#__PURE__*/function(e){function t(t,n){var r;return (r=e.call(this,t,"Unknown Error Caught")||this).errorMsg=void 0,r.errorMsg=n,r}return n(t,e),t}(c),l=/*#__PURE__*/function(e){function t(t,n){var r;return (r=e.call(this,403,t)||this).errorMsg=void 0,r.errorCode=void 0,r.errorMsg=t,r.errorCode=n,r}return n(t,e),t}(c),b=/*#__PURE__*/function(e){function t(t,n){var r;return (r=e.call(this,403,t)||this).errorMsg=void 0,r.errorCode=void 0,r.errorMsg=t,r.errorCode=n,r}return n(t,e),t}(c),v=/*#__PURE__*/function(e){function t(t,n){var r;return (r=e.call(this,400,"Conversation not found or not allowed to fetch messages count")||this).errorMsg=void 0,r.errorCode=void 0,r.errorMsg=t,r.errorCode=n||0,r}return n(t,e),t}(c),g=/*#__PURE__*/function(){function t(e){this.baseUrl=void 0,this.licenseKey=void 0,this.appSecret=void 0,this.userSecret=void 0,this.userToken=void 0,this.baseUrl=e.baseUrl,this.licenseKey=e.licenseKey,this.appSecret=e.appSecret,this.userSecret=e.userSecret,this.userToken=e.userToken||void 0;}var n=t.prototype;return n.updateUserToken=function(e){this.userToken=e;},n.invoke=function(t,n){try{return Promise.resolve(function(r,s){try{var o=Promise.resolve(browser(t,n)).then(function(e){if(e.ok)return e.json();var t=new Error(e.statusText);throw t.response=e,t});}catch(e){return s(e)}return o&&o.then?o.then(void 0,s):o}(0,function(e){var t=e.response.status;return Promise.resolve(e.response.json()).then(function(e){switch(t){case 400:throw new u(e.error);case 401:throw new b(e.error,e.errorCode);case 403:throw new l(e.error,e.errorCode);case 404:throw new h(e.error,e.errorCode);case 409:throw new v(e.error,e.errorCode);case 422:throw new f(e.errors);case 503:throw new p(e.error);default:throw new d(t,e.error)}})}))}catch(e){return Promise.reject(e)}},n.get=function(e,t){void 0===t&&(t=!1);var n=""+this.baseUrl+e,r={"Content-type":"application/json",licenseKey:this.licenseKey,appSecret:this.appSecret,userToken:this.userToken};return t&&(r.userSecret=this.userSecret),this.invoke(n,{headers:r})},n.post=function(e,t,n){void 0===n&&(n=!1);var r=""+this.baseUrl+e,s={"Content-type":"application/json",licenseKey:this.licenseKey,appSecret:this.appSecret,userToken:this.userToken};n&&(s.userSecret=this.userSecret);var o={method:"POST",body:JSON.stringify(t),headers:s};return this.invoke(r,o)},n.put=function(e,t,n){void 0===n&&(n=!1);var r=""+this.baseUrl+e,s={"Content-type":"application/json",licenseKey:this.licenseKey,appSecret:this.appSecret,userToken:this.userToken};n&&(s.userSecret=this.userSecret);var o={method:"PUT",body:JSON.stringify(t),headers:s};return this.invoke(r,o)},n.patch=function(e,t,n){void 0===n&&(n=!1);var r=""+this.baseUrl+e,s={"Content-type":"application/json",licenseKey:this.licenseKey,appSecret:this.appSecret,userToken:this.userToken};n&&(s.userSecret=this.userSecret);var o={method:"PATCH",body:JSON.stringify(t),headers:s};return this.invoke(r,o)},n.delete=function(e,t,n){void 0===n&&(n=!1);var r=""+this.baseUrl+e,s={"Content-type":"application/json",licenseKey:this.licenseKey,appSecret:this.appSecret,userToken:this.userToken};n&&(s.userSecret=this.userSecret);var o={method:"DELETE",body:JSON.stringify(t),headers:s};return this.invoke(r,o)},t}(),m="chat/messages",y=/*#__PURE__*/function(){function e(e){this.base=void 0,this.base=new g(e);}var t=e.prototype;return t.getMessagesForUser=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/"+m+"/user?"+t)},t.getMessagesForMentioned=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/"+m+"/user?"+t)},t.getMessagesCount=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/"+m+"/count?"+t)},t.getMessages=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/"+m+"?"+t)},t.postMessages=function(e){return this.base.post("/chat/message",e)},t.patchMessages=function(e){return this.base.patch("/chat/message",e)},t.postMessagesPresignedurls=function(e){return this.base.post("/chat/messages/presignedurls",e)},t.getMessageReactionType=function(e,t){var n=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/reaction/"+t+"?"+n)},t.postReaction=function(e){return this.base.post("/chat/reaction",e)},t.deleteReactionType=function(e,t){var n=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.delete("/chat/reaction/"+t+"?"+n)},t.postMessagesForward=function(e){return this.base.post("/chat/message/forward",e)},t.postMessagesbroadcast=function(e){return this.base.post("/chat/message/broadcast",e)},t.getStatus=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/"+m+"/status?"+t)},t.getStatusReadPending=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/message/status/read/pending?"+t)},t.getStatusRead=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/message/status/read?"+t)},t.getStatusDeliveryPending=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/message/status/delivery/pending?"+t)},t.getStatusDelivery=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/message/status/delivery?"+t)},t.postIndicateTyping=function(e){return this.base.post("/chat/indicator/typing",e)},t.putIndicateRead=function(e){return this.base.put("/chat/indicator/read",e)},t.putIndicateDelivered=function(e){return this.base.put("/chat/indicator/delivered",e)},t.getUnreadCount=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/"+m+"/unread/count?"+t)},t.getUnread=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/"+m+"/unread?"+t)},t.putRead=function(e){return this.base.put("/"+m+"/read",e)},t.deleteMessageSelf=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.delete("/"+m+"/self?"+t)},t.deleteMessagesEveryone=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.delete("/"+m+"/everyone?"+t)},e}(),j="chat/conversations",k=/*#__PURE__*/function(){function e(e){this.base=void 0,this.base=new g(e);}var t=e.prototype;return t.getWatchers=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/"+j+"/watchers?"+t)},t.getPublicOrOpen=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/"+j+"/watchers?"+t)},t.getConversationDetails=function(e,t){var n=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/conversation/details/"+t+"?"+n)},t.getConversationCount=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/"+j+"/count?"+t)},t.getConversations=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/"+j+"?"+t)},t.getUnreadConversations=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/"+j+"/unread?"+t)},t.getMessagingStatus=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/conversation/messaging/status?"+t)},t.postConversation=function(e){return this.base.post("/chat/conversation",e)},t.patchTitle=function(e){return this.base.patch("/chat/conversation/title",e)},t.patchSettings=function(e){return this.base.patch("/chat/conversation/settings",e)},t.patchImage=function(e){return this.base.patch("/chat/conversation/image",e)},t.patchDetails=function(e){return this.base.patch("/chat/conversation/details",e)},t.getConversationPresignedurl=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/conversation/presignedurl?"+t)},t.getStatusRead=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/conversation/status/read?"+t)},t.getObserver=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/conversation/members?"+t)},t.deleteObserverLeave=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.delete("/chat/conversation/observer/leave?"+t)},t.putObserverJoin=function(e){return this.base.put("/chat/conversation/observer/join",e)},t.putMembers=function(e){return this.base.put("/chat/conversation/members",e)},t.getConversationMembers=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/conversation/members?"+t)},t.deleteConversationMembers=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.delete("/chat/conversation/members?"+t)},t.getConversationMemberDetails=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/conversation/member/details?"+t)},t.getConversationEligibleMembers=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/conversation/eligible/members?"+t)},t.deleteConversationLeave=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.delete("/chat/conversation/leave?"+t)},t.putConversationJoin=function(e){return this.base.put("/chat/conversation/join",e)},t.putConversationAdmin=function(e){return this.base.put("/chat/conversation/admin",e)},t.deleteConversationAdmin=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.delete("/chat/conversation/admin?"+t)},t.getConversationUnreadCount=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/"+j+"/unread/count?"+t)},t.putConversationLastread=function(e){return this.base.put("/chat/conversation/lastread",e)},t.deleteConversationClear=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.delete("/chat/conversation/local?"+t)},t.deleteConversationLocal=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.delete("/chat/conversation/clear?"+t)},e}(),O=/*#__PURE__*/function(){function e(e){this.base=void 0,this.base=new g(e);}var t=e.prototype;return t.getUsers=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/users?"+t,!0)},t.getUserDetails=function(){return this.base.get("/chat/user/details")},t.postUserAuthenticate=function(e){var t=this,n=this.base.post("/chat/user/authenticate",e,!0);return n.then(function(e){t.base.updateUserToken(e.userToken);}),n},t.setUserToken=function(e){this.base.updateUserToken(e);},t.postUser=function(e){return this.base.post("/chat/user",e,!0)},t.patchUser=function(e){return this.base.patch("/chat/user",e)},t.deleteUser=function(){return this.base.delete("/chat/user")},t.postUserUnblock=function(e){return this.base.post("/chat/user/unblock",e)},t.getUserNonblock=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/user/nonblock?"+t)},t.getUserblockCount=function(){return this.base.get("/chat/user/block/count")},t.postUserBlock=function(e){return this.base.post("/chat/user/block",e)},t.getUserBlock=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/user/block?"+t)},t.getPresignedurlUpdate=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/user/presignedurl/update?"+t)},t.getPresignedurlCreate=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/user/presignedurl/update?"+t)},e}(),C=/*#__PURE__*/function(){function e(e){var n=this;this.hostUri=void 0,this.clientId=void 0,this.client=void 0,this.licenseKey=void 0,this.projectId=void 0,this.keysetId=void 0,this.accountId=void 0,this.deviceId=void 0,this.customUsername=void 0,this.customPassword=void 0,this.hostUri=e.hostUri,this.clientId=e.clientId,this.deviceId=e.deviceId,this.licenseKey=e.licenseKey,this.projectId=e.projectId,this.keysetId=e.keysetId,this.accountId=e.accountId,this.customUsername=e.customUsername||"",this.customPassword=e.customPassword||"",this.client=t.connect(this.hostUri,{clientId:this.clientId+this.deviceId,username:this.customUsername||"2"+this.accountId+this.projectId,password:this.customPassword||this.licenseKey+this.keysetId,keepalive:30,clean:!0}),this.client.on("connect",function(){console.log("Isometrick MQTT Connected !!",n.client);try{n.client.subscribe("/"+n.accountId+"/"+n.projectId+"/Message/"+n.clientId,{qos:0},function(e,t){e||console.log("Subscribed Successfully:: =>> Message",t),e&&console.log("Subscribed Failed || >>",e);}),n.client.subscribe("/"+n.accountId+"/"+n.projectId+"/Status/"+n.clientId,{qos:0},function(e,t){e||console.log("Subscribed Successfully:: =>> Message",t),e&&console.log("Subscribed Failed || >>",e);});}catch(e){console.error(e);}}),this.client.on("error",function(e){console.log("Isometrick MQTT Connection ERROR !!",e,{clientId:n.clientId+n.deviceId,username:n.customUsername||"2"+n.accountId+n.projectId,password:n.customPassword||n.licenseKey+n.keysetId,keepalive:30,clean:!0},n.hostUri);});}var n=e.prototype;return n.on=function(e,t){var n=this;switch(e){case"MESSAGE_RECEIVED":this.client.on("message",function(e,n){var r=Buffer.from(n).toString("utf8"),s=JSON.parse(r||"{}");t(s,e);});break;case"CONNECTION_LOST":this.client.stream.on("error",function(e){console.log("connection error",e),t(e),n.client.end();});}},n.disconnect=function(){this.client.end();},n.getInstance=function(){return this.client},e}(),S=/*#__PURE__*/function(){function e(e){this.base=void 0,this.base=new g(e);}var t=e.prototype;return t.getGroupCasts=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/groupcasts?"+t)},t.postGroupCast=function(e){return this.base.post("/chat/groupcast",e)},t.patchGroupCast=function(e){return this.base.patch("/chat/groupcast",e)},t.deleteGroupCastConversation=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.delete("/chat/groupcast?"+t)},t.getGroupcastStatus=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/groupcast/messages/status}?"+t)},t.getGroupCastStatusReadPending=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/groupcast/message/status/read/pending?"+t)},t.getGroupCastStatusRead=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/groupcast/message/status/read?"+t)},t.getGroupCastStatusDeliveryPending=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/groupcast/message/status/delivery/pending?"+t)},t.getGroupCastStatusDelivery=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/groupcast/message/status/delivery?"+t)},t.getGroupCastMessages=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/groupcast/messages?"+t)},t.postGroupCastMessage=function(e){return this.base.post("/chat/groupcast/message",e)},t.deleteMessageSelf=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.delete("/chat/groupcast/message/self?"+t)},t.deleteMessageEveryone=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.delete("/chat/groupcast/message/everyone?"+t)},t.getGroupCastMembers=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/groupcast/members?"+t)},t.addMembersToGroupCast=function(e){return this.base.put("/chat/groupcast/members",e)},t.removeMemebersFromGroupCast=function(e){return this.base.delete("/chat/groupcast/members",e)},t.getEligibleMembersForGroupCast=function(e){var t=e?Object.keys(e).map(function(t){return t+"="+e[t]}).join("&"):"";return this.base.get("/chat/groupcast/eligible/members?"+t)},e}(),w={BadRequestError:u,ConflictError:v,ForbiddenErrorRequest:l,NotFoundError:h,ServiceUnavailableError:p,UnauthorizedError:b,UnknownError:d,UnprocessableEntityError:f},M=/*#__PURE__*/function(){function e(e){this.message=void 0,this.Conversation=void 0,this.user=void 0,this.groupcast=void 0,this.error=void 0,this.message=new y(e),this.Conversation=new k(e),this.user=new O(e),this.error=w,this.groupcast=new S(e);}return e.getInstance=function(){if(null!==e.instance)return e.instance;throw new Error("Need to initialize instance first!")},e.getMqttInstance=function(){if(null!==e.mqttInstance)return e.mqttInstance;throw new Error("Need to initialize MQTT instance first!")},e.initializeInstance=function(t){return null===e.instance&&(e.instance=new e(t)),e.instance},e.prototype.initializeMqtt=function(t){return null===e.mqttInstance&&(e.mqttInstance=new C(t)),e.mqttInstance},e}();M.instance=null,M.mqttInstance=null;
|
|
41
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Map raw API / SDK errors to short user-facing copy.
|
|
46
|
+
* Never surface HTTP status phrases like "Unprocessable entity".
|
|
47
|
+
*/
|
|
48
|
+
function friendlyToastMessage(raw, fallback = 'Something went wrong. Try again.') {
|
|
49
|
+
var _a, _b;
|
|
50
|
+
const s = String((_b = (_a = raw === null || raw === void 0 ? void 0 : raw.message) !== null && _a !== void 0 ? _a : raw) !== null && _b !== void 0 ? _b : '')
|
|
51
|
+
.trim()
|
|
52
|
+
.replace(/\s+/g, ' ');
|
|
53
|
+
if (!s)
|
|
54
|
+
return fallback;
|
|
55
|
+
const lower = s.toLowerCase();
|
|
56
|
+
if (lower.includes('unprocessable') ||
|
|
57
|
+
lower.includes('422') ||
|
|
58
|
+
lower === 'bad request' ||
|
|
59
|
+
lower.includes('invalid payload')) {
|
|
60
|
+
return "Couldn't send that message. Please try again.";
|
|
61
|
+
}
|
|
62
|
+
if (lower.includes('network') ||
|
|
63
|
+
lower.includes('failed to fetch') ||
|
|
64
|
+
lower.includes('timeout')) {
|
|
65
|
+
return 'Network issue. Check your connection and try again.';
|
|
66
|
+
}
|
|
67
|
+
if (lower.includes('unauthorized') ||
|
|
68
|
+
lower.includes('401') ||
|
|
69
|
+
lower.includes('forbidden') ||
|
|
70
|
+
lower.includes('403')) {
|
|
71
|
+
return 'Session expired. Please refresh and try again.';
|
|
72
|
+
}
|
|
73
|
+
if (lower.includes('not found') || lower.includes('404')) {
|
|
74
|
+
return 'That chat is no longer available.';
|
|
75
|
+
}
|
|
76
|
+
// Keep short human messages; truncate giant stack/JSON blobs.
|
|
77
|
+
if (s.length > 120 || s.startsWith('{') || s.includes('\n'))
|
|
78
|
+
return fallback;
|
|
79
|
+
return s;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
class ToastHelper {
|
|
83
|
+
constructor() {
|
|
84
|
+
this.container = document.createElement('div');
|
|
85
|
+
this.container.id = 'isometrik-toast-root';
|
|
86
|
+
Object.assign(this.container.style, {
|
|
87
|
+
position: 'fixed',
|
|
88
|
+
zIndex: '100000',
|
|
89
|
+
display: 'flex',
|
|
90
|
+
flexDirection: 'column',
|
|
91
|
+
gap: '8px',
|
|
92
|
+
pointerEvents: 'none',
|
|
93
|
+
maxWidth: 'min(22rem, calc(100vw - 2rem))',
|
|
94
|
+
});
|
|
95
|
+
document.body.appendChild(this.container);
|
|
96
|
+
}
|
|
97
|
+
static getInstance() {
|
|
98
|
+
if (!ToastHelper.instance)
|
|
99
|
+
ToastHelper.instance = new ToastHelper();
|
|
100
|
+
return ToastHelper.instance;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Solid fallbacks — host themes often leave --danger / --bg-primary unset
|
|
104
|
+
* or map --bg-primary to a light surface (white-on-white toast).
|
|
105
|
+
*/
|
|
106
|
+
getTypeStyles(type = 'info') {
|
|
107
|
+
const styles = {
|
|
108
|
+
success: {
|
|
109
|
+
bgColor: 'var(--success, #15803d)',
|
|
110
|
+
color: '#ffffff',
|
|
111
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
112
|
+
borderColor: 'transparent',
|
|
113
|
+
},
|
|
114
|
+
error: {
|
|
115
|
+
bgColor: 'var(--danger, #b91c1c)',
|
|
116
|
+
color: '#ffffff',
|
|
117
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
118
|
+
borderColor: 'transparent',
|
|
119
|
+
},
|
|
120
|
+
warning: {
|
|
121
|
+
bgColor: 'var(--text-warning-color, #c2410c)',
|
|
122
|
+
color: '#ffffff',
|
|
123
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
124
|
+
borderColor: 'transparent',
|
|
125
|
+
},
|
|
126
|
+
info: {
|
|
127
|
+
bgColor: 'var(--hoa-chat-ink, #18181b)',
|
|
128
|
+
color: '#ffffff',
|
|
129
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
130
|
+
borderColor: 'transparent',
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
return styles[type] || styles.info;
|
|
134
|
+
}
|
|
135
|
+
setPosition(position = 'top-right') {
|
|
136
|
+
// Clear previous transform so center variants don't stick.
|
|
137
|
+
this.container.style.transform = '';
|
|
138
|
+
const positions = {
|
|
139
|
+
'top-right': { top: '1rem', right: '1rem', bottom: 'auto', left: 'auto' },
|
|
140
|
+
'top-left': { top: '1rem', right: 'auto', bottom: 'auto', left: '1rem' },
|
|
141
|
+
// Sit above typical chat composer (~5.5rem).
|
|
142
|
+
'bottom-right': { top: 'auto', right: '1rem', bottom: '5.5rem', left: 'auto' },
|
|
143
|
+
'bottom-left': { top: 'auto', right: 'auto', bottom: '5.5rem', left: '1rem' },
|
|
144
|
+
'top-center': {
|
|
145
|
+
top: '1rem',
|
|
146
|
+
right: 'auto',
|
|
147
|
+
bottom: 'auto',
|
|
148
|
+
left: '50%',
|
|
149
|
+
transform: 'translateX(-50%)',
|
|
150
|
+
},
|
|
151
|
+
'bottom-center': {
|
|
152
|
+
top: 'auto',
|
|
153
|
+
right: 'auto',
|
|
154
|
+
bottom: '5.5rem',
|
|
155
|
+
left: '50%',
|
|
156
|
+
transform: 'translateX(-50%)',
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
Object.assign(this.container.style, positions[position] || positions['top-right']);
|
|
160
|
+
}
|
|
161
|
+
show(options) {
|
|
162
|
+
const { duration = 3500, type = 'info', position = 'top-right' } = options;
|
|
163
|
+
const message = friendlyToastMessage(options.message);
|
|
164
|
+
this.setPosition(position);
|
|
165
|
+
const toast = document.createElement('toast-notification');
|
|
166
|
+
const styles = this.getTypeStyles(type);
|
|
167
|
+
toast.bgColor = styles.bgColor;
|
|
168
|
+
toast.color = styles.color;
|
|
169
|
+
toast.progressBarColor = styles.progressBarColor;
|
|
170
|
+
toast.progressBarBg = 'transparent';
|
|
171
|
+
toast.borderColor = styles.borderColor;
|
|
172
|
+
toast.borderWidth = '0';
|
|
173
|
+
toast.toastMessage = message;
|
|
174
|
+
toast.padding = '12px 14px';
|
|
175
|
+
toast.borderRadius = '0.5rem';
|
|
176
|
+
toast.width = '100%';
|
|
177
|
+
toast.fontWeight = '600';
|
|
178
|
+
toast.style.pointerEvents = 'auto';
|
|
179
|
+
toast.style.display = 'block';
|
|
180
|
+
toast.style.boxShadow = '0 8px 24px rgba(24, 24, 27, 0.18)';
|
|
181
|
+
this.container.appendChild(toast);
|
|
182
|
+
setTimeout(() => toast.remove(), duration);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const showToast = (options) => {
|
|
186
|
+
var _a;
|
|
187
|
+
const custom = index.createCustomPartElement('toast', Object.assign(Object.assign({}, options), { message: friendlyToastMessage(options.message) }));
|
|
188
|
+
if (custom) {
|
|
189
|
+
document.body.appendChild(custom);
|
|
190
|
+
setTimeout(() => custom.remove(), (_a = options.duration) !== null && _a !== void 0 ? _a : 3500);
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
ToastHelper.getInstance().show(options);
|
|
194
|
+
};
|
|
195
|
+
|
|
42
196
|
exports.M = M;
|
|
197
|
+
exports.showToast = showToast;
|
|
43
198
|
|
|
44
|
-
//# sourceMappingURL=
|
|
199
|
+
//# sourceMappingURL=toast-91093c84.js.map
|