isometrik-plugin-chat-sdk 2.0.5 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/admin-transfer-dialog.cjs.entry.js +44 -0
- package/dist/cjs/admin-transfer-dialog.cjs.entry.js.map +1 -0
- package/dist/cjs/{app-globals-dba84d07.js → app-globals-c433d8a6.js} +2 -2
- package/dist/cjs/{app-globals-dba84d07.js.map → app-globals-c433d8a6.js.map} +1 -1
- package/dist/cjs/attachment-preview_22.cjs.entry.js +201 -61
- package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
- package/dist/cjs/audio-bubble_4.cjs.entry.js +9 -9
- package/dist/cjs/chat-app.cjs.entry.js +1 -1
- package/dist/cjs/chat-document-message-bubble.cjs.entry.js +1 -1
- package/dist/cjs/chat-image-message-bubble.cjs.entry.js +1 -1
- package/dist/cjs/chat-video-message-bubble.cjs.entry.js +1 -1
- package/dist/cjs/delete-message.cjs.entry.js +1 -1
- package/dist/cjs/{drawer-811d2ce8.js → drawer-960b3f5d.js} +3 -1
- package/dist/cjs/drawer-960b3f5d.js.map +1 -0
- package/dist/cjs/forward-memebers.cjs.entry.js +3 -3
- package/dist/cjs/forward-message.cjs.entry.js +2 -2
- package/dist/cjs/group-admin-leave-b5cfdb33.js +55 -0
- package/dist/cjs/group-admin-leave-b5cfdb33.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/isometrik-webchat.cjs.js +4 -4
- package/dist/cjs/link-preview.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/login-page_3.cjs.entry.js +30 -11
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/cjs/member-add.cjs.entry.js +4 -4
- package/dist/cjs/message-bubble.cjs.entry.js +2 -2
- package/dist/cjs/my-component.cjs.entry.js +1 -1
- package/dist/cjs/{profile-avatar_2.cjs.entry.js → profile-avatar.cjs.entry.js} +1 -25
- package/dist/cjs/profile-avatar.cjs.entry.js.map +1 -0
- package/dist/cjs/reaction-container.cjs.entry.js +2 -2
- package/dist/cjs/{runtime-controls-b5a3836e.js → runtime-controls-95f6cb3b.js} +4 -2
- package/dist/cjs/runtime-controls-95f6cb3b.js.map +1 -0
- package/dist/cjs/{send-media-2c02bba7.js → send-media-37e09e83.js} +39 -1
- package/dist/cjs/send-media-37e09e83.js.map +1 -0
- package/dist/cjs/share-popup.cjs.entry.js +1 -1
- package/dist/cjs/spinner-loader.cjs.entry.js +32 -0
- package/dist/cjs/spinner-loader.cjs.entry.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ChatUIComponent/AddMember.js +3 -3
- package/dist/collection/components/ChatUIComponent/ChatDocumentMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatImageMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +20 -0
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/ChatVideoMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +1 -1
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js +41 -8
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/ReactionContainer.js +2 -2
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +44 -23
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/AudioBubble/AudioBubble.js +3 -3
- package/dist/collection/components/ChatUIComponent/shared/ForwardMessageList/ForwardMessageList.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/admin-transfer-dialog/admin-transfer-dialog.js +101 -0
- package/dist/collection/components/ChatUIComponent/shared/admin-transfer-dialog/admin-transfer-dialog.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/shared/attachment-preview/attachment-preview.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/block chatlist/BlockChatList.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/chat-loading-placeholder/chat-loading-placeholder.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js +20 -5
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/delete-message/delete-message.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/document-message/document-message.js +3 -3
- package/dist/collection/components/ChatUIComponent/shared/forward-message/forward-message.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/image-message/image-message.js +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/index.js +1 -0
- package/dist/collection/components/ChatUIComponent/shared/index.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/link-preview/link-preview.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-bubble/message-bubble.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/message-date-pill/message-date-pill.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-info/message-info.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-search/message-search.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/profile sidebar/profile-sidebar.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/profile-info/profile-info.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/reply-block/reply-block.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/reply-message-container/reply-message-container.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/share-popup/share-popup.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js +2 -2
- package/dist/collection/components/chat-main.js +1 -1
- package/dist/collection/components/my-component/my-component.js +1 -1
- package/dist/collection/components/my-component/web-chat/event-handlers.js +5 -0
- package/dist/collection/components/my-component/web-chat/event-handlers.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/mqtt-host.js +24 -9
- package/dist/collection/components/my-component/web-chat/mqtt-host.js.map +1 -1
- package/dist/collection/lib/chat/index.js +1 -1
- package/dist/collection/lib/chat/index.js.map +1 -1
- package/dist/collection/lib/chat/messages.js +36 -0
- package/dist/collection/lib/chat/messages.js.map +1 -1
- package/dist/collection/lib/drawer.js +3 -0
- package/dist/collection/lib/drawer.js.map +1 -1
- package/dist/collection/lib/group-admin-leave.js +47 -0
- package/dist/collection/lib/group-admin-leave.js.map +1 -0
- package/dist/collection/lib/prompt-exit-group.js +59 -0
- package/dist/collection/lib/prompt-exit-group.js.map +1 -0
- package/dist/collection/sdk/headless-api.js +3 -1
- package/dist/collection/sdk/headless-api.js.map +1 -1
- package/dist/components/AudioBubble.js +3 -3
- package/dist/components/BlockChatList.js +1 -1
- package/dist/components/ChatFooter.js +1 -1
- package/dist/components/ChatSidebar.js +21 -1
- package/dist/components/ChatSidebar.js.map +1 -1
- package/dist/components/WebChat.js +32 -13
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/WebChatBody.js +44 -23
- package/dist/components/WebChatBody.js.map +1 -1
- package/dist/components/WebChatHeader.js +42 -9
- package/dist/components/WebChatHeader.js.map +1 -1
- package/dist/components/WebchatRightSide.js +4 -35
- package/dist/components/WebchatRightSide.js.map +1 -1
- package/dist/components/admin-transfer-dialog.d.ts +11 -0
- package/dist/components/admin-transfer-dialog.js +69 -0
- package/dist/components/admin-transfer-dialog.js.map +1 -0
- package/dist/components/attachment-preview2.js +1 -1
- package/dist/components/chat-app.js +1 -1
- package/dist/components/chat-document-message-bubble.js +1 -1
- package/dist/components/chat-image-message-bubble.js +1 -1
- package/dist/components/chat-loading-placeholder2.js +1 -1
- package/dist/components/chat-video-message-bubble.js +1 -1
- package/dist/components/contact-info2.js +22 -6
- package/dist/components/contact-info2.js.map +1 -1
- package/dist/components/conversation.js +2 -283
- package/dist/components/conversation.js.map +1 -1
- package/dist/components/delete-message.js +1 -1
- package/dist/components/document-message2.js +3 -3
- package/dist/components/drawer.js +2 -0
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/forward-memebers.js +2 -2
- package/dist/components/forward-message.js +2 -2
- package/dist/components/group-admin-leave.js +50 -0
- package/dist/components/group-admin-leave.js.map +1 -0
- package/dist/components/group-members.js +298 -26
- package/dist/components/group-members.js.map +1 -1
- package/dist/components/group-members2.js +37 -0
- package/dist/components/group-members2.js.map +1 -0
- package/dist/components/image-message2.js +1 -1
- package/dist/components/incoming-text-message-bubble2.js +1 -1
- package/dist/components/index.js +3 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/link-preview2.js +1 -1
- package/dist/components/member-add.js +4 -4
- package/dist/components/message-bubble2.js +2 -2
- package/dist/components/message-date-pill2.js +1 -1
- package/dist/components/message-info2.js +1 -1
- package/dist/components/message-search2.js +1 -1
- package/dist/components/messages.js +37 -1
- package/dist/components/messages.js.map +1 -1
- package/dist/components/my-component.js +1 -1
- package/dist/components/outgoing-text-message-bubble2.js +1 -1
- package/dist/components/profile-info2.js +2 -2
- package/dist/components/profile-sidebar2.js +1 -1
- package/dist/components/prompt-exit-group.js +73 -0
- package/dist/components/prompt-exit-group.js.map +1 -0
- package/dist/components/reaction-container.js +2 -2
- package/dist/components/reply-block2.js +1 -1
- package/dist/components/reply-message-container2.js +1 -1
- package/dist/components/share-popup.js +1 -1
- package/dist/components/video-message2.js +2 -2
- package/dist/esm/admin-transfer-dialog.entry.js +40 -0
- package/dist/esm/admin-transfer-dialog.entry.js.map +1 -0
- package/dist/esm/{app-globals-8fea092d.js → app-globals-dfce8a5b.js} +2 -2
- package/dist/esm/{app-globals-8fea092d.js.map → app-globals-dfce8a5b.js.map} +1 -1
- package/dist/esm/attachment-preview_22.entry.js +202 -62
- package/dist/esm/attachment-preview_22.entry.js.map +1 -1
- package/dist/esm/audio-bubble_4.entry.js +9 -9
- package/dist/esm/chat-app.entry.js +1 -1
- package/dist/esm/chat-document-message-bubble.entry.js +1 -1
- package/dist/esm/chat-image-message-bubble.entry.js +1 -1
- package/dist/esm/chat-video-message-bubble.entry.js +1 -1
- package/dist/esm/delete-message.entry.js +1 -1
- package/dist/esm/{drawer-74c188f1.js → drawer-d54c2f10.js} +3 -1
- package/dist/esm/drawer-d54c2f10.js.map +1 -0
- package/dist/esm/forward-memebers.entry.js +3 -3
- package/dist/esm/forward-message.entry.js +2 -2
- package/dist/esm/group-admin-leave-a60b9b1a.js +50 -0
- package/dist/esm/group-admin-leave-a60b9b1a.js.map +1 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/isometrik-webchat.js +4 -4
- package/dist/esm/link-preview.entry.js +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm/login-page_3.entry.js +30 -11
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/esm/member-add.entry.js +4 -4
- package/dist/esm/message-bubble.entry.js +2 -2
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/{profile-avatar_2.entry.js → profile-avatar.entry.js} +2 -25
- package/dist/esm/profile-avatar.entry.js.map +1 -0
- package/dist/esm/reaction-container.entry.js +2 -2
- package/dist/esm/{runtime-controls-c5ba5009.js → runtime-controls-ec6d5c75.js} +4 -2
- package/dist/esm/runtime-controls-ec6d5c75.js.map +1 -0
- package/dist/esm/{send-media-588837c7.js → send-media-a946c6dd.js} +38 -2
- package/dist/esm/send-media-a946c6dd.js.map +1 -0
- package/dist/esm/share-popup.entry.js +1 -1
- package/dist/esm/spinner-loader.entry.js +28 -0
- package/dist/esm/spinner-loader.entry.js.map +1 -0
- package/dist/isometrik-webchat/index.esm.js +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-a876991d.entry.js → p-0ccfbe90.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-1854b156.entry.js → p-161fcb35.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-a43ad157.entry.js → p-1eecc7c5.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-fdd327f5.entry.js → p-2195b0c0.entry.js} +2 -2
- package/dist/isometrik-webchat/p-2e9974e1.entry.js +2 -0
- package/dist/isometrik-webchat/p-30dc94e0.js +2 -0
- package/dist/isometrik-webchat/p-30dc94e0.js.map +1 -0
- package/dist/isometrik-webchat/p-35d9ecdc.entry.js +2 -0
- package/dist/isometrik-webchat/p-35d9ecdc.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-c1e8c38e.entry.js → p-3664e0ad.entry.js} +2 -2
- package/dist/isometrik-webchat/p-3f355f9e.js +2 -0
- package/dist/isometrik-webchat/p-3f355f9e.js.map +1 -0
- package/dist/isometrik-webchat/p-46dcd38f.js +2 -0
- package/dist/isometrik-webchat/p-46dcd38f.js.map +1 -0
- package/dist/isometrik-webchat/p-46e0048e.js +2 -0
- package/dist/isometrik-webchat/p-46e0048e.js.map +1 -0
- package/dist/isometrik-webchat/p-48ce4dca.entry.js +2 -0
- package/dist/isometrik-webchat/{p-d720cf14.entry.js → p-76341adb.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-2d3e8cd4.entry.js → p-7af9a7f3.entry.js} +2 -2
- package/dist/isometrik-webchat/p-7b25f234.entry.js +2 -0
- package/dist/isometrik-webchat/p-7b25f234.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-86be30fe.js +2 -0
- package/dist/isometrik-webchat/p-9db196a4.entry.js +2 -0
- package/dist/isometrik-webchat/p-9db196a4.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-a119be75.entry.js +2 -0
- package/dist/isometrik-webchat/p-a119be75.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-ad02a8ca.entry.js +2 -0
- package/dist/isometrik-webchat/p-c5bff6a1.entry.js +2 -0
- package/dist/isometrik-webchat/p-c5bff6a1.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-c83e2d5d.entry.js +2 -0
- package/dist/isometrik-webchat/{p-fb705915.entry.js → p-cc5b86e6.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-f1fbf3be.entry.js → p-d8b65cf4.entry.js} +2 -2
- package/dist/isometrik-webchat/p-e48a1217.entry.js +2 -0
- package/dist/types/components/ChatUIComponent/Header/WebChatHeader.d.ts +1 -0
- package/dist/types/components/ChatUIComponent/shared/admin-transfer-dialog/admin-transfer-dialog.d.ts +13 -0
- package/dist/types/components/ChatUIComponent/shared/contact-info/contact-info.d.ts +1 -0
- package/dist/types/components/ChatUIComponent/shared/index.d.ts +1 -0
- package/dist/types/components.d.ts +27 -0
- package/dist/types/lib/chat/index.d.ts +1 -1
- package/dist/types/lib/drawer.d.ts +1 -0
- package/dist/types/lib/group-admin-leave.d.ts +20 -0
- package/dist/types/lib/prompt-exit-group.d.ts +9 -0
- package/dist/types/sdk/headless-api.d.ts +3 -1
- package/package.json +1 -1
- package/dist/cjs/drawer-811d2ce8.js.map +0 -1
- package/dist/cjs/profile-avatar_2.cjs.entry.js.map +0 -1
- package/dist/cjs/runtime-controls-b5a3836e.js.map +0 -1
- package/dist/cjs/send-media-2c02bba7.js.map +0 -1
- package/dist/esm/drawer-74c188f1.js.map +0 -1
- package/dist/esm/profile-avatar_2.entry.js.map +0 -1
- package/dist/esm/runtime-controls-c5ba5009.js.map +0 -1
- package/dist/esm/send-media-588837c7.js.map +0 -1
- package/dist/isometrik-webchat/p-0392c7be.entry.js +0 -2
- package/dist/isometrik-webchat/p-1a6e6524.js +0 -2
- package/dist/isometrik-webchat/p-1a6e6524.js.map +0 -1
- package/dist/isometrik-webchat/p-3c70c22c.entry.js +0 -2
- package/dist/isometrik-webchat/p-5d243250.entry.js +0 -2
- package/dist/isometrik-webchat/p-70f66001.js +0 -2
- package/dist/isometrik-webchat/p-70f66001.js.map +0 -1
- package/dist/isometrik-webchat/p-8816acc1.js +0 -2
- package/dist/isometrik-webchat/p-92eec03b.entry.js +0 -2
- package/dist/isometrik-webchat/p-92eec03b.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-b16c3db0.entry.js +0 -2
- package/dist/isometrik-webchat/p-b16c3db0.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-b857775d.entry.js +0 -2
- package/dist/isometrik-webchat/p-c0c19621.entry.js +0 -2
- package/dist/isometrik-webchat/p-dd62bd69.js +0 -2
- package/dist/isometrik-webchat/p-dd62bd69.js.map +0 -1
- package/dist/isometrik-webchat/p-ed4699a0.entry.js +0 -2
- package/dist/isometrik-webchat/p-ed4699a0.entry.js.map +0 -1
- /package/dist/isometrik-webchat/{p-a876991d.entry.js.map → p-0ccfbe90.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-1854b156.entry.js.map → p-161fcb35.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-a43ad157.entry.js.map → p-1eecc7c5.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-fdd327f5.entry.js.map → p-2195b0c0.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-3c70c22c.entry.js.map → p-2e9974e1.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-c1e8c38e.entry.js.map → p-3664e0ad.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-b857775d.entry.js.map → p-48ce4dca.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-d720cf14.entry.js.map → p-76341adb.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-2d3e8cd4.entry.js.map → p-7af9a7f3.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-8816acc1.js.map → p-86be30fe.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-5d243250.entry.js.map → p-ad02a8ca.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-c0c19621.entry.js.map → p-c83e2d5d.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-fb705915.entry.js.map → p-cc5b86e6.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-f1fbf3be.entry.js.map → p-d8b65cf4.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-0392c7be.entry.js.map → p-e48a1217.entry.js.map} +0 -0
|
@@ -1,37 +1,309 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as StencilCore from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
if (searchTag) {
|
|
11
|
-
params.searchTag = searchTag;
|
|
3
|
+
const appendToMap = (map, refsByValue, propName, value) => {
|
|
4
|
+
let ref = refsByValue.get(value);
|
|
5
|
+
if (!ref) {
|
|
6
|
+
ref = new WeakRef(value);
|
|
7
|
+
refsByValue.set(value, ref);
|
|
12
8
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
let refs = map.get(propName);
|
|
10
|
+
if (!refs) {
|
|
11
|
+
refs = new Set();
|
|
12
|
+
map.set(propName, refs);
|
|
13
|
+
}
|
|
14
|
+
refs.add(ref);
|
|
15
|
+
};
|
|
16
|
+
const debounce = (fn, ms) => {
|
|
17
|
+
let timeoutId;
|
|
18
|
+
return (...args) => {
|
|
19
|
+
if (timeoutId) {
|
|
20
|
+
clearTimeout(timeoutId);
|
|
21
|
+
}
|
|
22
|
+
timeoutId = setTimeout(() => {
|
|
23
|
+
timeoutId = 0;
|
|
24
|
+
fn(...args);
|
|
25
|
+
}, ms);
|
|
26
|
+
};
|
|
16
27
|
};
|
|
17
28
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Check if a possible element isConnected.
|
|
31
|
+
* The property might not be there, so we check for it.
|
|
32
|
+
*
|
|
33
|
+
* We want it to return true if isConnected is not a property,
|
|
34
|
+
* otherwise we would remove these elements and would not update.
|
|
35
|
+
*
|
|
36
|
+
* Better leak in Edge than to be useless.
|
|
37
|
+
*/
|
|
38
|
+
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
|
39
|
+
const cleanupElements = debounce((map) => {
|
|
40
|
+
map.forEach((refs, key) => {
|
|
41
|
+
const nextRefs = new Set();
|
|
42
|
+
refs.forEach((ref) => {
|
|
43
|
+
const elm = ref.deref();
|
|
44
|
+
if (elm && isConnected(elm))
|
|
45
|
+
nextRefs.add(ref);
|
|
46
|
+
});
|
|
47
|
+
map.set(key, nextRefs);
|
|
23
48
|
});
|
|
24
|
-
|
|
49
|
+
}, 2_000);
|
|
50
|
+
const core = StencilCore;
|
|
51
|
+
const forceUpdate = core.forceUpdate;
|
|
52
|
+
const getRenderingRef = core.getRenderingRef;
|
|
53
|
+
const stencilSubscription = () => {
|
|
54
|
+
if (typeof getRenderingRef !== 'function' || typeof forceUpdate !== 'function') {
|
|
55
|
+
// If we are not in a stencil project, we do nothing.
|
|
56
|
+
// This function is not really exported by @stencil/core.
|
|
57
|
+
return {};
|
|
58
|
+
}
|
|
59
|
+
const ensureForceUpdate = forceUpdate;
|
|
60
|
+
const ensureGetRenderingRef = getRenderingRef;
|
|
61
|
+
const refsByElement = new WeakMap();
|
|
62
|
+
const elmsToUpdate = new Map();
|
|
63
|
+
return {
|
|
64
|
+
dispose: () => elmsToUpdate.clear(),
|
|
65
|
+
get: (propName) => {
|
|
66
|
+
const elm = ensureGetRenderingRef();
|
|
67
|
+
if (elm) {
|
|
68
|
+
appendToMap(elmsToUpdate, refsByElement, propName, elm);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
set: (propName) => {
|
|
72
|
+
const refs = elmsToUpdate.get(propName);
|
|
73
|
+
if (refs) {
|
|
74
|
+
const nextRefs = new Set();
|
|
75
|
+
refs.forEach((ref) => {
|
|
76
|
+
const elm = ref.deref();
|
|
77
|
+
if (elm && ensureForceUpdate(elm))
|
|
78
|
+
nextRefs.add(ref);
|
|
79
|
+
});
|
|
80
|
+
elmsToUpdate.set(propName, nextRefs);
|
|
81
|
+
}
|
|
82
|
+
cleanupElements(elmsToUpdate);
|
|
83
|
+
},
|
|
84
|
+
reset: () => {
|
|
85
|
+
elmsToUpdate.forEach((refs) => {
|
|
86
|
+
refs.forEach((ref) => {
|
|
87
|
+
const elm = ref.deref();
|
|
88
|
+
if (elm)
|
|
89
|
+
ensureForceUpdate(elm);
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
cleanupElements(elmsToUpdate);
|
|
93
|
+
},
|
|
94
|
+
};
|
|
25
95
|
};
|
|
26
96
|
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
97
|
+
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
|
98
|
+
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
|
99
|
+
const resolveDefaultState = () => (unwrap(defaultState) ?? {});
|
|
100
|
+
const initialState = resolveDefaultState();
|
|
101
|
+
let states = new Map(Object.entries(initialState));
|
|
102
|
+
const proxyAvailable = typeof Proxy !== 'undefined';
|
|
103
|
+
const plainState = proxyAvailable ? null : {};
|
|
104
|
+
const handlers = {
|
|
105
|
+
dispose: [],
|
|
106
|
+
get: [],
|
|
107
|
+
set: [],
|
|
108
|
+
reset: [],
|
|
109
|
+
};
|
|
110
|
+
// Track onChange listeners to enable removeListener functionality
|
|
111
|
+
const changeListeners = new Map();
|
|
112
|
+
const reset = () => {
|
|
113
|
+
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
|
114
|
+
// otherwise, the state won't be properly reset
|
|
115
|
+
states = new Map(Object.entries(resolveDefaultState()));
|
|
116
|
+
if (!proxyAvailable) {
|
|
117
|
+
syncPlainStateKeys();
|
|
118
|
+
}
|
|
119
|
+
handlers.reset.forEach((cb) => cb());
|
|
120
|
+
};
|
|
121
|
+
const dispose = () => {
|
|
122
|
+
// Call first dispose as resetting the state would
|
|
123
|
+
// cause less updates ;)
|
|
124
|
+
handlers.dispose.forEach((cb) => cb());
|
|
125
|
+
reset();
|
|
126
|
+
};
|
|
127
|
+
const get = (propName) => {
|
|
128
|
+
handlers.get.forEach((cb) => cb(propName));
|
|
129
|
+
return states.get(propName);
|
|
130
|
+
};
|
|
131
|
+
const set = (propName, value) => {
|
|
132
|
+
const oldValue = states.get(propName);
|
|
133
|
+
if (shouldUpdate(value, oldValue, propName)) {
|
|
134
|
+
states.set(propName, value);
|
|
135
|
+
if (!proxyAvailable) {
|
|
136
|
+
ensurePlainProperty(propName);
|
|
137
|
+
}
|
|
138
|
+
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
const state = (proxyAvailable
|
|
142
|
+
? new Proxy(initialState, {
|
|
143
|
+
get(_, propName) {
|
|
144
|
+
return get(propName);
|
|
145
|
+
},
|
|
146
|
+
ownKeys(_) {
|
|
147
|
+
return Array.from(states.keys());
|
|
148
|
+
},
|
|
149
|
+
getOwnPropertyDescriptor() {
|
|
150
|
+
return {
|
|
151
|
+
enumerable: true,
|
|
152
|
+
configurable: true,
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
has(_, propName) {
|
|
156
|
+
return states.has(propName);
|
|
157
|
+
},
|
|
158
|
+
set(_, propName, value) {
|
|
159
|
+
set(propName, value);
|
|
160
|
+
return true;
|
|
161
|
+
},
|
|
162
|
+
})
|
|
163
|
+
: (() => {
|
|
164
|
+
syncPlainStateKeys();
|
|
165
|
+
return plainState;
|
|
166
|
+
})());
|
|
167
|
+
const on = (eventName, callback) => {
|
|
168
|
+
handlers[eventName].push(callback);
|
|
169
|
+
return () => {
|
|
170
|
+
removeFromArray(handlers[eventName], callback);
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
const onChange = (propName, cb) => {
|
|
174
|
+
const setHandler = (key, newValue) => {
|
|
175
|
+
if (key === propName) {
|
|
176
|
+
cb(newValue);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
const resetHandler = () => {
|
|
180
|
+
const snapshot = resolveDefaultState();
|
|
181
|
+
cb(snapshot[propName]);
|
|
182
|
+
};
|
|
183
|
+
// Register the handlers
|
|
184
|
+
const unSet = on('set', setHandler);
|
|
185
|
+
const unReset = on('reset', resetHandler);
|
|
186
|
+
// Track the relationship between the user callback and internal handlers
|
|
187
|
+
changeListeners.set(cb, { setHandler, resetHandler, propName });
|
|
188
|
+
return () => {
|
|
189
|
+
unSet();
|
|
190
|
+
unReset();
|
|
191
|
+
changeListeners.delete(cb);
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
const use = (...subscriptions) => {
|
|
195
|
+
const unsubs = subscriptions.reduce((unsubs, subscription) => {
|
|
196
|
+
if (subscription.set) {
|
|
197
|
+
unsubs.push(on('set', subscription.set));
|
|
198
|
+
}
|
|
199
|
+
if (subscription.get) {
|
|
200
|
+
unsubs.push(on('get', subscription.get));
|
|
201
|
+
}
|
|
202
|
+
if (subscription.reset) {
|
|
203
|
+
unsubs.push(on('reset', subscription.reset));
|
|
204
|
+
}
|
|
205
|
+
if (subscription.dispose) {
|
|
206
|
+
unsubs.push(on('dispose', subscription.dispose));
|
|
207
|
+
}
|
|
208
|
+
return unsubs;
|
|
209
|
+
}, []);
|
|
210
|
+
return () => unsubs.forEach((unsub) => unsub());
|
|
211
|
+
};
|
|
212
|
+
const forceUpdate = (key) => {
|
|
213
|
+
const oldValue = states.get(key);
|
|
214
|
+
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
|
215
|
+
};
|
|
216
|
+
const removeListener = (propName, listener) => {
|
|
217
|
+
const listenerInfo = changeListeners.get(listener);
|
|
218
|
+
if (listenerInfo && listenerInfo.propName === propName) {
|
|
219
|
+
// Remove the specific handlers that were created for this listener
|
|
220
|
+
removeFromArray(handlers.set, listenerInfo.setHandler);
|
|
221
|
+
removeFromArray(handlers.reset, listenerInfo.resetHandler);
|
|
222
|
+
changeListeners.delete(listener);
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
function ensurePlainProperty(key) {
|
|
226
|
+
if (proxyAvailable || !plainState) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
if (Object.prototype.hasOwnProperty.call(plainState, key)) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
Object.defineProperty(plainState, key, {
|
|
233
|
+
configurable: true,
|
|
234
|
+
enumerable: true,
|
|
235
|
+
get() {
|
|
236
|
+
return get(key);
|
|
237
|
+
},
|
|
238
|
+
set(value) {
|
|
239
|
+
set(key, value);
|
|
240
|
+
},
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
function syncPlainStateKeys() {
|
|
244
|
+
if (proxyAvailable || !plainState) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
const knownKeys = new Set(states.keys());
|
|
248
|
+
for (const key of Object.keys(plainState)) {
|
|
249
|
+
if (!knownKeys.has(key)) {
|
|
250
|
+
delete plainState[key];
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
for (const key of knownKeys) {
|
|
254
|
+
ensurePlainProperty(key);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return {
|
|
258
|
+
state,
|
|
259
|
+
get,
|
|
260
|
+
set,
|
|
261
|
+
on,
|
|
262
|
+
onChange,
|
|
263
|
+
use,
|
|
264
|
+
dispose,
|
|
265
|
+
reset,
|
|
266
|
+
forceUpdate,
|
|
267
|
+
removeListener,
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
const removeFromArray = (array, item) => {
|
|
271
|
+
const index = array.indexOf(item);
|
|
272
|
+
if (index >= 0) {
|
|
273
|
+
array[index] = array[array.length - 1];
|
|
274
|
+
array.length--;
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
const createStore = (defaultState, shouldUpdate) => {
|
|
279
|
+
const map = createObservableMap(defaultState, shouldUpdate);
|
|
280
|
+
map.use(stencilSubscription());
|
|
281
|
+
return map;
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
const { state } = createStore({
|
|
285
|
+
members: [],
|
|
286
|
+
currentConversationId: null
|
|
287
|
+
});
|
|
288
|
+
const groupMembersStore = {
|
|
289
|
+
state,
|
|
290
|
+
initializeMembers(members, conversationId) {
|
|
291
|
+
state.members = members;
|
|
292
|
+
state.currentConversationId = conversationId;
|
|
293
|
+
},
|
|
294
|
+
updateAdminStatus(userId, isAdmin) {
|
|
295
|
+
state.members = state.members.map(member => {
|
|
296
|
+
return member.userId === userId ? Object.assign(Object.assign({}, member), { isAdmin }) : member;
|
|
297
|
+
});
|
|
298
|
+
},
|
|
299
|
+
getMembers() {
|
|
300
|
+
return state.members;
|
|
301
|
+
},
|
|
302
|
+
getCurrentConversationId() {
|
|
303
|
+
return state.currentConversationId;
|
|
304
|
+
}
|
|
33
305
|
};
|
|
34
306
|
|
|
35
|
-
export {
|
|
307
|
+
export { createStore as c, groupMembersStore as g };
|
|
36
308
|
|
|
37
309
|
//# sourceMappingURL=group-members.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"group-members.js","mappings":";;AAEY,MAAC,8BAA8B,GAAG,OAAO,CAAC,cAAc,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK;AAC9G,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,cAAc,EAAE,cAAc;AACtC,QAAQ,KAAK,EAAE,KAAK;AACpB,QAAQ,IAAI,EAAE,IAAI;AAClB,KAAK,CAAC;AACN;AACA,IAAI,IAAI,SAAS,EAAE;AACnB,QAAQ,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;AACrC,KAAK;AACL;AACA,IAAI,MAAM,QAAQ,GAAG,MAAMA,CAAO,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,8BAA8B,CAAC,MAAM,CAAC,CAAC;AACrG,IAAI,OAAO,QAAQ,CAAC;AACpB,EAAC;AACD;AACA;AACY,MAAC,qBAAqB,GAAG,OAAO,cAAc,EAAE,SAAS,GAAG,EAAE,KAAK;AAC/E,IAAI,MAAM,QAAQ,GAAG,MAAMA,CAAO,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC;AACzE,QAAQ,cAAc,EAAE,cAAc;AACtC,QAAQ,OAAO,EAAE,SAAS;AAC1B,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,QAAQ,CAAC;AACpB,EAAC;AACD;AACY,MAAC,wBAAwB,GAAG,OAAO,cAAc,EAAE,QAAQ,KAAK;AAC5E,IAAI,MAAM,QAAQ,GAAG,MAAMA,CAAO,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,yBAAyB,CAAC;AACxF,QAAQ,cAAc,EAAE,cAAc;AACtC,QAAQ,OAAO,EAAE,QAAQ;AACzB,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,QAAQ,CAAC;AACpB;;;;","names":["ChatSDK"],"sources":["src/api/group-members.js"],"sourcesContent":["import ChatSDK from 'test-iso-chat-sdk';\n\nexport const getConversationEligibleMembers = async ({conversationId, searchTag = null, limit=20, skip=0}) => {\n const params = {\n conversationId: conversationId,\n limit: limit,\n skip: skip\n };\n \n if (searchTag) {\n params.searchTag = searchTag;\n }\n \n const response = await ChatSDK.getInstance().Conversation.getConversationEligibleMembers(params);\n return response;\n}\n\n\nexport const addConversationMember = async (conversationId, memberIds = []) => {\n const response = await ChatSDK.getInstance().Conversation.putMembers({\n conversationId: conversationId, \n members: memberIds\n });\n return response;\n}\n\nexport const removeConversationMember = async (conversationId, memberId) => {\n const response = await ChatSDK.getInstance().Conversation.deleteConversationMembers({\n conversationId: conversationId,\n members: memberId\n });\n return response;\n}\n\n\n\n"],"version":3}
|
|
1
|
+
{"file":"group-members.js","mappings":";;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC3D,IAAI,IAAI,GAAG,GAAG,WAAW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CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAC,CAAC;AACnC,IAAI,OAAO,GAAG,CAAC;AACf;;AC3QA,MAAM,EAAE,KAAK,EAAE,GAAG,WAAW,CAAoB;IAC/C,OAAO,EAAE,EAAE;IACX,qBAAqB,EAAE,IAAI;CAC5B,CAAC,CAAC;MAEU,iBAAiB,GAAG;IAC/B,KAAK;IAEL,iBAAiB,CAAC,OAAsB,EAAE,cAAsB;QAC9D,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QACxB,KAAK,CAAC,qBAAqB,GAAG,cAAc,CAAC;KAC9C;IAED,iBAAiB,CAAC,MAAc,EAAE,OAAgB;QAChD,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM;YACtC,OAAO,MAAM,CAAC,MAAM,KAAK,MAAM,mCAAQ,MAAM,KAAE,OAAO,MAAK,MAAM,CAAC;SACnE,CAAC,CAAC;KACJ;IAED,UAAU;QACR,OAAO,KAAK,CAAC,OAAO,CAAC;KACtB;IAED,wBAAwB;QACtB,OAAO,KAAK,CAAC,qBAAqB,CAAC;KACpC;;;;;","names":[],"sources":["node_modules/@stencil/store/dist/index.js","src/store/group-members.ts"],"sourcesContent":["import * as StencilCore from '@stencil/core';\n\nconst appendToMap = (map, refsByValue, propName, value) => {\n let ref = refsByValue.get(value);\n if (!ref) {\n ref = new WeakRef(value);\n refsByValue.set(value, ref);\n }\n let refs = map.get(propName);\n if (!refs) {\n refs = new Set();\n map.set(propName, refs);\n }\n refs.add(ref);\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n map.forEach((refs, key) => {\n const nextRefs = new Set();\n refs.forEach((ref) => {\n const elm = ref.deref();\n if (elm && isConnected(elm))\n nextRefs.add(ref);\n });\n map.set(key, nextRefs);\n });\n}, 2_000);\nconst core = StencilCore;\nconst forceUpdate = core.forceUpdate;\nconst getRenderingRef = core.getRenderingRef;\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function' || typeof forceUpdate !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const ensureForceUpdate = forceUpdate;\n const ensureGetRenderingRef = getRenderingRef;\n const refsByElement = new WeakMap();\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = ensureGetRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, refsByElement, propName, elm);\n }\n },\n set: (propName) => {\n const refs = elmsToUpdate.get(propName);\n if (refs) {\n const nextRefs = new Set();\n refs.forEach((ref) => {\n const elm = ref.deref();\n if (elm && ensureForceUpdate(elm))\n nextRefs.add(ref);\n });\n elmsToUpdate.set(propName, nextRefs);\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((refs) => {\n refs.forEach((ref) => {\n const elm = ref.deref();\n if (elm)\n ensureForceUpdate(elm);\n });\n });\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const resolveDefaultState = () => (unwrap(defaultState) ?? {});\n const initialState = resolveDefaultState();\n let states = new Map(Object.entries(initialState));\n const proxyAvailable = typeof Proxy !== 'undefined';\n const plainState = proxyAvailable ? null : {};\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n // Track onChange listeners to enable removeListener functionality\n const changeListeners = new Map();\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(resolveDefaultState()));\n if (!proxyAvailable) {\n syncPlainStateKeys();\n }\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n if (!proxyAvailable) {\n ensurePlainProperty(propName);\n }\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (proxyAvailable\n ? new Proxy(initialState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n })\n : (() => {\n syncPlainStateKeys();\n return plainState;\n })());\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const setHandler = (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n };\n const resetHandler = () => {\n const snapshot = resolveDefaultState();\n cb(snapshot[propName]);\n };\n // Register the handlers\n const unSet = on('set', setHandler);\n const unReset = on('reset', resetHandler);\n // Track the relationship between the user callback and internal handlers\n changeListeners.set(cb, { setHandler, resetHandler, propName });\n return () => {\n unSet();\n unReset();\n changeListeners.delete(cb);\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n const removeListener = (propName, listener) => {\n const listenerInfo = changeListeners.get(listener);\n if (listenerInfo && listenerInfo.propName === propName) {\n // Remove the specific handlers that were created for this listener\n removeFromArray(handlers.set, listenerInfo.setHandler);\n removeFromArray(handlers.reset, listenerInfo.resetHandler);\n changeListeners.delete(listener);\n }\n };\n function ensurePlainProperty(key) {\n if (proxyAvailable || !plainState) {\n return;\n }\n if (Object.prototype.hasOwnProperty.call(plainState, key)) {\n return;\n }\n Object.defineProperty(plainState, key, {\n configurable: true,\n enumerable: true,\n get() {\n return get(key);\n },\n set(value) {\n set(key, value);\n },\n });\n }\n function syncPlainStateKeys() {\n if (proxyAvailable || !plainState) {\n return;\n }\n const knownKeys = new Set(states.keys());\n for (const key of Object.keys(plainState)) {\n if (!knownKeys.has(key)) {\n delete plainState[key];\n }\n }\n for (const key of knownKeys) {\n ensurePlainProperty(key);\n }\n }\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n removeListener,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from \"@stencil/store\";\n\ninterface GroupMember {\n userId: string;\n userName: string;\n userProfileImageUrl: string;\n isAdmin: boolean;\n}\n\ninterface GroupMembersState {\n members: GroupMember[];\n currentConversationId: string | null;\n}\n\nconst { state } = createStore<GroupMembersState>({\n members: [],\n currentConversationId: null\n});\n\nexport const groupMembersStore = {\n state,\n\n initializeMembers(members: GroupMember[], conversationId: string) {\n state.members = members;\n state.currentConversationId = conversationId;\n },\n\n updateAdminStatus(userId: string, isAdmin: boolean) {\n state.members = state.members.map(member => {\n return member.userId === userId ? { ...member, isAdmin } : member;\n });\n },\n\n getMembers() {\n return state.members;\n },\n\n getCurrentConversationId() {\n return state.currentConversationId;\n }\n};"],"version":3}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { M } from './index.m.js';
|
|
2
|
+
|
|
3
|
+
const getConversationEligibleMembers = async ({conversationId, searchTag = null, limit=20, skip=0}) => {
|
|
4
|
+
const params = {
|
|
5
|
+
conversationId: conversationId,
|
|
6
|
+
limit: limit,
|
|
7
|
+
skip: skip
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
if (searchTag) {
|
|
11
|
+
params.searchTag = searchTag;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const response = await M.getInstance().Conversation.getConversationEligibleMembers(params);
|
|
15
|
+
return response;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
const addConversationMember = async (conversationId, memberIds = []) => {
|
|
20
|
+
const response = await M.getInstance().Conversation.putMembers({
|
|
21
|
+
conversationId: conversationId,
|
|
22
|
+
members: memberIds
|
|
23
|
+
});
|
|
24
|
+
return response;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const removeConversationMember = async (conversationId, memberId) => {
|
|
28
|
+
const response = await M.getInstance().Conversation.deleteConversationMembers({
|
|
29
|
+
conversationId: conversationId,
|
|
30
|
+
members: memberId
|
|
31
|
+
});
|
|
32
|
+
return response;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { addConversationMember as a, getConversationEligibleMembers as g, removeConversationMember as r };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=group-members2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"group-members2.js","mappings":";;AAEY,MAAC,8BAA8B,GAAG,OAAO,CAAC,cAAc,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK;AAC9G,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,cAAc,EAAE,cAAc;AACtC,QAAQ,KAAK,EAAE,KAAK;AACpB,QAAQ,IAAI,EAAE,IAAI;AAClB,KAAK,CAAC;AACN;AACA,IAAI,IAAI,SAAS,EAAE;AACnB,QAAQ,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;AACrC,KAAK;AACL;AACA,IAAI,MAAM,QAAQ,GAAG,MAAMA,CAAO,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,8BAA8B,CAAC,MAAM,CAAC,CAAC;AACrG,IAAI,OAAO,QAAQ,CAAC;AACpB,EAAC;AACD;AACA;AACY,MAAC,qBAAqB,GAAG,OAAO,cAAc,EAAE,SAAS,GAAG,EAAE,KAAK;AAC/E,IAAI,MAAM,QAAQ,GAAG,MAAMA,CAAO,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC;AACzE,QAAQ,cAAc,EAAE,cAAc;AACtC,QAAQ,OAAO,EAAE,SAAS;AAC1B,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,QAAQ,CAAC;AACpB,EAAC;AACD;AACY,MAAC,wBAAwB,GAAG,OAAO,cAAc,EAAE,QAAQ,KAAK;AAC5E,IAAI,MAAM,QAAQ,GAAG,MAAMA,CAAO,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,yBAAyB,CAAC;AACxF,QAAQ,cAAc,EAAE,cAAc;AACtC,QAAQ,OAAO,EAAE,QAAQ;AACzB,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,QAAQ,CAAC;AACpB;;;;","names":["ChatSDK"],"sources":["src/api/group-members.js"],"sourcesContent":["import ChatSDK from 'test-iso-chat-sdk';\n\nexport const getConversationEligibleMembers = async ({conversationId, searchTag = null, limit=20, skip=0}) => {\n const params = {\n conversationId: conversationId,\n limit: limit,\n skip: skip\n };\n \n if (searchTag) {\n params.searchTag = searchTag;\n }\n \n const response = await ChatSDK.getInstance().Conversation.getConversationEligibleMembers(params);\n return response;\n}\n\n\nexport const addConversationMember = async (conversationId, memberIds = []) => {\n const response = await ChatSDK.getInstance().Conversation.putMembers({\n conversationId: conversationId, \n members: memberIds\n });\n return response;\n}\n\nexport const removeConversationMember = async (conversationId, memberId) => {\n const response = await ChatSDK.getInstance().Conversation.deleteConversationMembers({\n conversationId: conversationId,\n members: memberId\n });\n return response;\n}\n\n\n\n"],"version":3}
|
|
@@ -46,7 +46,7 @@ const ImageMessage = /*@__PURE__*/ proxyCustomElement(class ImageMessage extends
|
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
48
|
const showCaption = this.message && !String(this.message).includes('AttachmentMessage:');
|
|
49
|
-
return (h("div", { key: '
|
|
49
|
+
return (h("div", { key: 'b3c7b9f8e05923e0955bff3e8f71740baf5e42b7' }, h("message-bubble", { key: '7bca9fc47d0dde8e111bdc445a3fa65a90322def', isSelf: !!this.isSelf, time: this.time, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, deliveryStatus: this.deliveryStatus, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover }, h("div", { key: 'fb3cf820d1ba04c2e73024700016660ddcffee3a', class: "image-container", style: { width: this.width || '250px', height: this.height || '220px', borderRadius: this.borderRadius }, onClick: this.openGallery }, h("img", { key: '883f683d9833d06ae7c1c7a375ac3208385cc8c7', src: this.imageSrc, alt: "image" }), this.totalMedia > 0 ? h("span", { class: "mediaCount" }, " + ", this.totalMedia) : null), showCaption ? (h("div", { style: { fontSize: '14px', color: this.textColor, marginTop: '4px' } }, renderMessageBody(this.message, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), !!this.isSelf))) : null), this.galleryOpen ? (h("div", { class: "gallery-overlay", onClick: () => (this.galleryOpen = false) }, h("button", { type: "button", class: "gallery-close", "aria-label": "Close" }, "\u00D7"), h("img", { src: this.imageSrc, alt: "full", onClick: e => e.stopPropagation() }))) : null));
|
|
50
50
|
}
|
|
51
51
|
static get style() { return ":host { display: block; font-family: var(--font-primary); }\n .image-container { cursor: pointer; overflow: hidden; position: relative; }\n .image-container img { width: var(--w-full); height: var(--h-full); object-fit: cover; display: block; }\n .mediaCount {\n position: absolute; right: var(--space-8); bottom: var(--space-8);\n background: var(--overlay); color: var(--text-on-brand);\n padding: var(--gap-2) var(--gap-6); border-radius: var(--rounded-8); font-size: var(--text-12);\n }\n .gallery-overlay {\n position: fixed; inset: 0; background: var(--overlay); z-index: 9999;\n display: flex; align-items: center; justify-content: center;\n }\n .gallery-overlay img { max-width: 90vw; max-height: 90vh; object-fit: contain; }\n .gallery-close {\n position: absolute; top: var(--space-16); right: var(--space-16);\n color: var(--text-on-brand); font-size: var(--text-24);\n background: transparent; border: none; cursor: pointer;\n }"; }
|
|
52
52
|
}, [1, "image-message", {
|
|
@@ -30,7 +30,7 @@ const IncomingTextMessageBubble = /*@__PURE__*/ proxyCustomElement(class Incomin
|
|
|
30
30
|
this.showReactionOnHover = false;
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
return (h("message-bubble", { key: '
|
|
33
|
+
return (h("message-bubble", { key: '918370c86bf0b7e135e67b3b86e41331269cc98f', isSelf: false, time: this.time, timeColor: this.timeColor, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor || '#EFF1FA', borderRadius: this.borderRadius || '7px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover }, h("div", { key: 'a69f51b6c043a1baec73ed1b068792ff2ccacce6', style: { fontFamily: this.fontFamily, color: this.color, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, renderMessageBody(this.textContent, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), false))));
|
|
34
34
|
}
|
|
35
35
|
static get style() { return ":host { display: block; max-width: 80%; margin-left: 10px; }"; }
|
|
36
36
|
}, [1, "incoming-text-message-bubble", {
|
package/dist/components/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { r as resolveShowProfileRailProp, i as initializeChatSdk, f as fetchUser
|
|
|
5
5
|
export { n as canUseIndexedDb, j as getOfflineClient, l as isBrowserOnline, k as mergeMessagesById, h as resolveProfileRailMode, g as resolveRegionMode, r as resolveShowProfileRailProp } from './client.js';
|
|
6
6
|
import { f as findWebChatHost } from './index2.js';
|
|
7
7
|
export { W as WEB_CHAT_SLOTS, a as applyCustomPartProps, f as findWebChatHost } from './index2.js';
|
|
8
|
-
import { f as fetchMessagesPage, s as searchMessages,
|
|
8
|
+
import { f as fetchMessagesPage, m as markConversationRead, a as mergeMessagesById, s as searchMessages, b as fetchLinkMessages, c as fetchMediaCount, d as fetchMediaAttachments, e as filterMediaMessages } from './messages.js';
|
|
9
9
|
import { m as mediaTypeFromMime, c as customTypeFromMime, p as prepareMediaAttachments, b as buildReplyMetaData } from './send-media.js';
|
|
10
10
|
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
11
11
|
export { d as deriveMessageStatus } from './contracts.js';
|
|
@@ -446,6 +446,8 @@ const isometrikWebchatApi = {
|
|
|
446
446
|
},
|
|
447
447
|
messages: {
|
|
448
448
|
list: fetchMessagesPage,
|
|
449
|
+
markRead: markConversationRead,
|
|
450
|
+
mergeById: mergeMessagesById,
|
|
449
451
|
search: searchMessages,
|
|
450
452
|
links: fetchLinkMessages,
|
|
451
453
|
mediaCount: fetchMediaCount,
|