isometrik-plugin-chat-sdk 2.0.17 → 2.0.19
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/attachment-preview_22.cjs.entry.js +7 -32
- package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
- package/dist/cjs/{client-80851676.js → client-fef5fd3d.js} +29 -1
- package/dist/cjs/client-fef5fd3d.js.map +1 -0
- 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/index.cjs.js +1 -1
- package/dist/cjs/login-page_3.cjs.entry.js +56 -17
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js +4 -4
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/data-fetch.js +9 -3
- package/dist/collection/components/my-component/web-chat/data-fetch.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/mutations.js +7 -2
- package/dist/collection/components/my-component/web-chat/mutations.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/offline-host.js +21 -5
- package/dist/collection/components/my-component/web-chat/offline-host.js.map +1 -1
- package/dist/collection/lib/mqtt/dispatch.js +3 -3
- package/dist/collection/lib/mqtt/dispatch.js.map +1 -1
- package/dist/collection/lib/offline/client.js +11 -0
- package/dist/collection/lib/offline/client.js.map +1 -1
- package/dist/collection/lib/offline/idb.js +11 -0
- package/dist/collection/lib/offline/idb.js.map +1 -1
- package/dist/collection/lib/offline/memory-db.js +6 -0
- package/dist/collection/lib/offline/memory-db.js.map +1 -1
- package/dist/components/WebChat.js +55 -16
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/client.js +28 -0
- package/dist/components/client.js.map +1 -1
- package/dist/components/contact-info2.js +5 -5
- package/dist/components/contact-info2.js.map +1 -1
- package/dist/esm/attachment-preview_22.entry.js +5 -30
- package/dist/esm/attachment-preview_22.entry.js.map +1 -1
- package/dist/esm/{client-4a3e00da.js → client-de7fbead.js} +29 -1
- package/dist/esm/client-de7fbead.js.map +1 -0
- 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/index.js +1 -1
- package/dist/esm/login-page_3.entry.js +56 -17
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/isometrik-webchat/index.esm.js +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
- package/dist/isometrik-webchat/p-5cfb953d.js +2 -0
- package/dist/isometrik-webchat/p-5cfb953d.js.map +1 -0
- package/dist/isometrik-webchat/p-a9380fb3.entry.js +2 -0
- package/dist/isometrik-webchat/{p-e5ffe038.entry.js.map → p-a9380fb3.entry.js.map} +1 -1
- package/dist/isometrik-webchat/p-f0d4687f.js +2 -0
- package/dist/isometrik-webchat/p-f0d4687f.js.map +1 -0
- package/dist/isometrik-webchat/{p-bf71ce5e.entry.js → p-fc3fd090.entry.js} +2 -2
- package/dist/isometrik-webchat/p-fc3fd090.entry.js.map +1 -0
- package/dist/types/components/my-component/web-chat/offline-host.d.ts +2 -0
- package/dist/types/lib/offline/client.d.ts +2 -0
- package/dist/types/lib/offline/idb.d.ts +2 -0
- package/dist/types/lib/offline/memory-db.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/client-80851676.js.map +0 -1
- package/dist/cjs/group-members-5a82ec8a.js.map +0 -1
- package/dist/esm/client-4a3e00da.js.map +0 -1
- package/dist/esm/group-members-05414da2.js.map +0 -1
- package/dist/isometrik-webchat/p-ae168135.js +0 -2
- package/dist/isometrik-webchat/p-ae168135.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-bf71ce5e.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-e5ffe038.entry.js +0 -2
|
@@ -10,7 +10,7 @@ import { b as getCustomPartTag, f as findWebChatHost, h as hasNamedSlot } from '
|
|
|
10
10
|
import { m as messagePushContextFrom, w as withHostMessagePushFields } from './local-notification-4c1e166d.js';
|
|
11
11
|
import { p as postGroupCast, f as getPresignedUrlForGroupcastMedia, h as postGroupCastMessage, i as getGroupcastMessageReadStatus, j as getGroupcastMessageDeliveryStatus, k as deleteGroupcastMessageSelf, l as deleteGroupcastMessageEveryone } from './groupcast-cc10c6a4.js';
|
|
12
12
|
import { i as isometrikLogo } from './IsometrikLogo-36cb0542.js';
|
|
13
|
-
import { c as createStore, g as groupMembersStore } from './group-members-
|
|
13
|
+
import { c as createStore, g as groupMembersStore, u as updateConversationNotifications, w as withConversationPushFlag } from './group-members-7909941c.js';
|
|
14
14
|
import { n as needsAdminTransferBeforeLeave, b as adminTransferCandidates, m as memberDisplayName, a as memberUserId } from './group-admin-leave-a60b9b1a.js';
|
|
15
15
|
import { W as WEB_CONTENT } from './content-fb138a93.js';
|
|
16
16
|
import { r as renderMessageBody, e as emitTagUser } from './message-body-render-f5ab3a62.js';
|
|
@@ -85,31 +85,6 @@ function normalizeGroupTitle(raw, max = 100) {
|
|
|
85
85
|
.slice(0, max);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
/**
|
|
89
|
-
* Flutter `updateConversationNotifications` parity —
|
|
90
|
-
* PATCH /chat/conversation/settings with pushNotifications.
|
|
91
|
-
*/
|
|
92
|
-
/** Pure — body shape for ChatSDK.conversation.patchSettings. */
|
|
93
|
-
function buildConversationNotificationsPatch(args) {
|
|
94
|
-
const conversationId = String(args.conversationId || '').trim();
|
|
95
|
-
if (!conversationId) {
|
|
96
|
-
throw new Error('conversationId is required');
|
|
97
|
-
}
|
|
98
|
-
return Object.assign(Object.assign({ conversationId, pushNotifications: args.pushNotifications === true }, (typeof args.typingEvents === 'boolean' ? { typingEvents: args.typingEvents } : {})), (typeof args.readEvents === 'boolean' ? { readEvents: args.readEvents } : {}));
|
|
99
|
-
}
|
|
100
|
-
/** Mute / unmute remote + local push for a conversation (member setting). */
|
|
101
|
-
async function updateConversationNotifications(conversationId, pushNotifications) {
|
|
102
|
-
const body = buildConversationNotificationsPatch({ conversationId, pushNotifications });
|
|
103
|
-
return M.getInstance().Conversation.patchSettings(body);
|
|
104
|
-
}
|
|
105
|
-
/** Merge pushNotifications into a conversation / details object. */
|
|
106
|
-
function withConversationPushFlag(conversation, pushNotifications) {
|
|
107
|
-
if (!conversation || typeof conversation !== 'object')
|
|
108
|
-
return conversation;
|
|
109
|
-
const prevConfig = conversation.config && typeof conversation.config === 'object' ? conversation.config : {};
|
|
110
|
-
return Object.assign(Object.assign({}, conversation), { config: Object.assign(Object.assign({}, prevConfig), { pushNotifications }) });
|
|
111
|
-
}
|
|
112
|
-
|
|
113
88
|
const NewChat = class {
|
|
114
89
|
constructor(hostRef) {
|
|
115
90
|
registerInstance(this, hostRef);
|
|
@@ -6540,7 +6515,7 @@ const ContactInfo = class {
|
|
|
6540
6515
|
detail: { conversationId, type: 'settings', value: { pushNotifications: next } },
|
|
6541
6516
|
}));
|
|
6542
6517
|
showToast({
|
|
6543
|
-
message: next ? '
|
|
6518
|
+
message: next ? 'Chat unmuted' : 'Chat muted',
|
|
6544
6519
|
type: 'success',
|
|
6545
6520
|
position: 'bottom-right',
|
|
6546
6521
|
});
|
|
@@ -6712,9 +6687,9 @@ const ContactInfo = class {
|
|
|
6712
6687
|
const canManage = this.isSelfAdmin() && !isSelf;
|
|
6713
6688
|
const menuOpen = this.memberMenuUserId === m.userId;
|
|
6714
6689
|
return (h("div", { class: "member", "data-member-id": m.userId }, h("profile-avatar", { src: m.userProfileImageUrl || '', name: m.userName || '?', size: "2.25rem" }), h("div", { class: "member-text" }, h("p", { class: "member-name" }, h("span", null, isSelf ? 'You' : m.userName), m.isAdmin ? h("span", { class: "member-badge" }, "Admin") : null), m.userIdentifier || ((_b = m.metaData) === null || _b === void 0 ? void 0 : _b.status) ? (h("p", { class: "member-sub" }, ((_c = m.metaData) === null || _c === void 0 ? void 0 : _c.status) || m.userIdentifier)) : null), canManage ? (h("div", { class: "member-more-wrap" }, h("button", { type: "button", class: "member-more-btn", "aria-label": "Member actions", "aria-expanded": menuOpen ? 'true' : 'false', onClick: e => this.toggleMemberMenu(m.userId, e) }, "\u22EE"), menuOpen ? (h("div", { class: "member-menu", role: "menu" }, m.isAdmin ? (h("button", { type: "button", role: "menuitem", onClick: () => this.confirmRemoveAdmin(m) }, WEB_CONTENT.CHAT.GROUP_INFO.GROUP_MEMBERS.REMOVE_ADMIN)) : (h("button", { type: "button", role: "menuitem", onClick: () => this.confirmMakeAdmin(m) }, WEB_CONTENT.CHAT.GROUP_INFO.GROUP_MEMBERS.MAKE_ADMIN)), h("button", { type: "button", class: "danger", role: "menuitem", onClick: () => this.confirmRemoveMember(m) }, WEB_CONTENT.CHAT.GROUP_INFO.GROUP_MEMBERS.REMOVE_MEMBER))) : null)) : null));
|
|
6715
|
-
}))) : null, !this.isGroupcast ? (h("div", { class: "card" }, h("div", { class: "pref-row" }, h("div", { class: "pref-copy" }, h("p", { class: "pref-title" }, "
|
|
6716
|
-
? '
|
|
6717
|
-
: '
|
|
6690
|
+
}))) : null, !this.isGroupcast ? (h("div", { class: "card" }, h("div", { class: "pref-row" }, h("div", { class: "pref-copy" }, h("p", { class: "pref-title" }, "Mute notifications"), h("p", { class: "pref-sub" }, this.pushNotificationsEnabled
|
|
6691
|
+
? 'Off — you still get alerts for this chat'
|
|
6692
|
+
: 'On — alerts muted for this chat')), h("button", { type: "button", class: "switch", role: "switch", "aria-checked": this.pushNotificationsEnabled ? 'false' : 'true', "aria-label": "Mute chat notifications", disabled: this.pushNotificationsSaving, onClick: () => this.togglePushNotifications() }, h("span", { class: "switch-knob" }))))) : null, h("div", { class: "card actions" }, h("button", { class: "action", type: "button", onClick: this.confirmClearChat }, h("span", { class: "action-icon", style: { ['--action-mask']: `url(${ClearChatIcon})` } }), "Clear chat"), h("button", { class: "action danger", type: "button", onClick: this.confirmDeleteChat }, h("span", { class: "action-icon", style: { ['--action-mask']: `url(${DeleteIcon})` } }), "Delete chat"), isGroup ? (h("button", { class: "action", type: "button", onClick: this.confirmExitGroup }, h("span", { class: "action-icon", style: { ['--action-mask']: `url(${LogoutIcon})` } }), "Exit group")) : null))));
|
|
6718
6693
|
}
|
|
6719
6694
|
get el() { return getElement(this); }
|
|
6720
6695
|
static get watchers() { return {
|