isometrik-plugin-chat-sdk 2.0.7 → 2.0.9
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 +46 -15
- package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
- package/dist/cjs/login-page_3.cjs.entry.js +17 -2
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/cjs/member-add.cjs.entry.js +1 -1
- package/dist/cjs/reaction-container.cjs.entry.js +1 -1
- package/dist/cjs/toast-75ef0607.js +159 -0
- package/dist/cjs/toast-75ef0607.js.map +1 -0
- package/dist/cjs/toast-notification.cjs.entry.js +21 -15
- package/dist/cjs/toast-notification.cjs.entry.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js +21 -3
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +14 -11
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js +10 -1
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/toast-notification/toast-notification.js +32 -26
- package/dist/collection/components/ChatUIComponent/shared/toast-notification/toast-notification.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/mqtt-host.js +16 -1
- package/dist/collection/components/my-component/web-chat/mqtt-host.js.map +1 -1
- package/dist/collection/lib/friendly-toast-message.js +38 -0
- package/dist/collection/lib/friendly-toast-message.js.map +1 -0
- package/dist/collection/lib/toast.js +76 -21
- package/dist/collection/lib/toast.js.map +1 -1
- package/dist/components/WebChat.js +16 -1
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/WebChatBody.js +14 -11
- package/dist/components/WebChatBody.js.map +1 -1
- package/dist/components/WebChatHeader.js +21 -3
- package/dist/components/WebChatHeader.js.map +1 -1
- package/dist/components/contact-info2.js +11 -1
- package/dist/components/contact-info2.js.map +1 -1
- package/dist/components/toast-notification.js +21 -15
- package/dist/components/toast-notification.js.map +1 -1
- package/dist/components/toast.js +112 -21
- package/dist/components/toast.js.map +1 -1
- package/dist/esm/attachment-preview_22.entry.js +47 -16
- package/dist/esm/attachment-preview_22.entry.js.map +1 -1
- package/dist/esm/login-page_3.entry.js +17 -2
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/esm/member-add.entry.js +1 -1
- package/dist/esm/reaction-container.entry.js +1 -1
- package/dist/esm/toast-45ac7913.js +157 -0
- package/dist/esm/toast-45ac7913.js.map +1 -0
- package/dist/esm/toast-notification.entry.js +21 -15
- package/dist/esm/toast-notification.entry.js.map +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
- package/dist/isometrik-webchat/p-0c06a021.js +2 -0
- package/dist/isometrik-webchat/p-0c06a021.js.map +1 -0
- package/dist/isometrik-webchat/{p-76341adb.entry.js → p-6024bf2a.entry.js} +2 -2
- package/dist/isometrik-webchat/p-63ff4eea.entry.js +2 -0
- package/dist/isometrik-webchat/p-63ff4eea.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-9f036163.entry.js +2 -0
- package/dist/isometrik-webchat/p-9f036163.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-2195b0c0.entry.js → p-ba6de4e2.entry.js} +2 -2
- package/dist/isometrik-webchat/p-d6fd2dd7.entry.js +2 -0
- package/dist/isometrik-webchat/p-d6fd2dd7.entry.js.map +1 -0
- package/dist/types/components/ChatUIComponent/Header/WebChatHeader.d.ts +1 -0
- package/dist/types/components/ChatUIComponent/shared/contact-info/contact-info.d.ts +1 -0
- package/dist/types/lib/friendly-toast-message.d.ts +5 -0
- package/dist/types/lib/toast.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/toast-f810e550.js +0 -68
- package/dist/cjs/toast-f810e550.js.map +0 -1
- package/dist/esm/toast-533dd183.js +0 -66
- package/dist/esm/toast-533dd183.js.map +0 -1
- package/dist/isometrik-webchat/p-4cb54460.js +0 -2
- package/dist/isometrik-webchat/p-4cb54460.js.map +0 -1
- package/dist/isometrik-webchat/p-84424caa.entry.js +0 -2
- package/dist/isometrik-webchat/p-84424caa.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-e1d632b0.entry.js +0 -2
- package/dist/isometrik-webchat/p-e1d632b0.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-ff023d39.entry.js +0 -2
- package/dist/isometrik-webchat/p-ff023d39.entry.js.map +0 -1
- /package/dist/isometrik-webchat/{p-76341adb.entry.js.map → p-6024bf2a.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-2195b0c0.entry.js.map → p-ba6de4e2.entry.js.map} +0 -0
|
@@ -11,7 +11,7 @@ import { c as createStore, g as groupMembersStore } from './group-members-05414d
|
|
|
11
11
|
import { d as getGroupcastMessage, r as removeGroupcastMember, e as deleteGroupCast } from './groupcast-9c7d2a32.js';
|
|
12
12
|
import { t as takeMediaFiles, M as MAX_MEDIA_PER_MESSAGE, j as attachmentBodyForApi, p as prepareMediaAttachments, u as uploadAndPostMediaMessage, k as isAttachmentBodyPlaceholder, f as fetchMessagesPage, s as searchMessages, b as fetchLinkMessages, c as fetchMediaCount, d as fetchMediaAttachments, l as mediaLimitToastMessage, n as buildLocalMediaAttachments, h as customTypeFromMime, A as ATTACHMENT_BODY_PLACEHOLDER, i as buildReplyMetaData, m as markConversationRead } from './send-media-a946c6dd.js';
|
|
13
13
|
import { g as getOfflineClient, m as mergeMessagesById, i as isBrowserOnline } from './client-4a3e00da.js';
|
|
14
|
-
import { s as showToast } from './toast-
|
|
14
|
+
import { s as showToast } from './toast-45ac7913.js';
|
|
15
15
|
import { r as removeConversationMember, g as getConversationEligibleMembers } from './group-members-d603f29f.js';
|
|
16
16
|
import { h as hasNamedSlot } from './index-4c865e34.js';
|
|
17
17
|
import './destroy-chat-d0ee28d6.js';
|
|
@@ -1781,9 +1781,24 @@ function createMqttContext(host) {
|
|
|
1781
1781
|
* - inbound messages processed on a per-host serial queue
|
|
1782
1782
|
*/
|
|
1783
1783
|
/** Soft REST merge while MQTT is down OR zombie-connected (looks up, drops msgs). */
|
|
1784
|
-
const SOFT_GAP_FILL_MS =
|
|
1784
|
+
const SOFT_GAP_FILL_MS = 15000;
|
|
1785
|
+
function chatBodyNearBottom(host, thresholdPx = 100) {
|
|
1786
|
+
var _a, _b;
|
|
1787
|
+
try {
|
|
1788
|
+
const body = (_b = (_a = host.chatBodyRef) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.chat-body');
|
|
1789
|
+
if (!body)
|
|
1790
|
+
return true;
|
|
1791
|
+
return body.scrollHeight - body.scrollTop - body.clientHeight <= thresholdPx;
|
|
1792
|
+
}
|
|
1793
|
+
catch (_c) {
|
|
1794
|
+
return true;
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1785
1797
|
function hostAppendInboundMessage(host, parsedMessage) {
|
|
1798
|
+
const pin = chatBodyNearBottom(host);
|
|
1786
1799
|
host.allMessages = appendUniqueById(host.allMessages, parsedMessage);
|
|
1800
|
+
if (pin)
|
|
1801
|
+
host.isScrollToBottom = true;
|
|
1787
1802
|
void hostPersistMessages(host);
|
|
1788
1803
|
}
|
|
1789
1804
|
/**
|