isometrik-plugin-chat-sdk 1.3.15 → 1.3.16
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 +20 -2
- package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
- package/dist/cjs/contracts-31632812.js.map +1 -1
- package/dist/cjs/index-1a26d11d.js.map +1 -1
- package/dist/cjs/index.cjs.js +3 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/isometrik-webchat.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/login-page_3.cjs.entry.js +6 -2
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +3 -3
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/new chat/new-chat.js +40 -1
- package/dist/collection/components/ChatUIComponent/shared/new chat/new-chat.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/WebChat.js +21 -2
- package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/shell-render.js +5 -2
- package/dist/collection/components/my-component/web-chat/shell-render.js.map +1 -1
- package/dist/collection/index.js +3 -0
- package/dist/collection/index.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/components/ChatSidebar.js +1 -1
- package/dist/components/ChatSidebar.js.map +1 -1
- package/dist/components/WebChat.js +7 -2
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/contracts.js.map +1 -1
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/new-chat2.js +20 -1
- package/dist/components/new-chat2.js.map +1 -1
- package/dist/esm/attachment-preview_22.entry.js +20 -2
- package/dist/esm/attachment-preview_22.entry.js.map +1 -1
- package/dist/esm/contracts-614be4db.js.map +1 -1
- package/dist/esm/index-beb184c6.js.map +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/isometrik-webchat.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/login-page_3.entry.js +6 -2
- package/dist/esm/login-page_3.entry.js.map +1 -1
- 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-37e3ab26.entry.js +2 -0
- package/dist/isometrik-webchat/p-37e3ab26.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-1f9b855a.entry.js → p-4fd74f21.entry.js} +2 -2
- package/dist/isometrik-webchat/p-4fd74f21.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-7b80b0b2.js.map +1 -1
- package/dist/isometrik-webchat/p-a6897edc.js.map +1 -1
- package/dist/types/components/ChatUIComponent/ChatSidebar/ChatSidebar.d.ts +2 -0
- package/dist/types/components/ChatUIComponent/shared/new chat/new-chat.d.ts +3 -0
- package/dist/types/components.d.ts +20 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/lib/custom-ui/contracts.d.ts +8 -0
- package/dist/types/lib/custom-ui/index.d.ts +3 -1
- package/package.json +1 -1
- package/dist/isometrik-webchat/p-1f9b855a.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-c544329c.entry.js +0 -2
- package/dist/isometrik-webchat/p-c544329c.entry.js.map +0 -1
|
@@ -56,6 +56,7 @@ const NewChat = class {
|
|
|
56
56
|
this.onSearch = undefined;
|
|
57
57
|
this.onSelect = undefined;
|
|
58
58
|
this.onClose = undefined;
|
|
59
|
+
this.customParts = undefined;
|
|
59
60
|
this.searchText = '';
|
|
60
61
|
}
|
|
61
62
|
nameOf(item) {
|
|
@@ -72,7 +73,24 @@ const NewChat = class {
|
|
|
72
73
|
}
|
|
73
74
|
render() {
|
|
74
75
|
const items = this.contactList || [];
|
|
75
|
-
return (index.h("div", { key: '
|
|
76
|
+
return (index.h("div", { key: '1b6b8f6adc28f33d2368ad2e7dbb9cbcf21996ad', class: "new-chat" }, index.h("div", { key: 'de0ec058d8db7ea9985502bae905e443bfab9e2c', class: "header" }, index.h("button", { key: 'a3941f76e90195466865260f086dc72c39df11b0', type: "button", class: "back-btn", onClick: () => { var _a; return (_a = this.onClose) === null || _a === void 0 ? void 0 : _a.call(this); }, "aria-label": "Back" }, index.h("img", { key: '5a0c6260c6e78db338dcd8797e5a30888768944a', class: "theme-icon", src: chatAssets.Left_Arrow, alt: "" })), index.h("h2", { key: '3da6b40688a04c05e654e1565ddc81f6262b0494', class: "title" }, "New Chat")), index.h("div", { key: 'e34cd9034f165989884f2eb3ce466b65bb68437b', class: "search-wrap" }, index.h("div", { key: '5a7cdd6d49d338dd2ed8ea9dc50730f5234686ff', class: "search-bar" }, index.h("input", { key: '0edc10f2fa8b6fb7513b49f010efc6c88f953081', type: "text", placeholder: "Search name or number", value: this.searchText, onInput: this.handleSearch }))), this.isLoading ? (index.h("div", { class: "empty" }, index.h("spinner-loader", { height: "24px", width: "24px" }))) : (index.h("div", { class: "list", onScroll: this.handleScroll }, index.h("div", { class: "row", onClick: this.openGroup }, index.h("div", { class: "action-icon" }, index.h("img", { class: "theme-icon", src: chatAssets.New_Group, alt: "" })), index.h("span", { class: "action-label" }, "New Group")), index.h("div", { class: "row", onClick: this.openGroupCast }, index.h("div", { class: "action-icon" }, index.h("img", { class: "theme-icon", src: chatAssets.Group_cast, alt: "" })), index.h("span", { class: "action-label" }, "New Group Cast")), index.h("div", { class: "section-label" }, "Contacts"), items.length === 0 ? (index.h("div", { class: "empty" }, "No results")) : (items.map(item => {
|
|
77
|
+
var _a, _b;
|
|
78
|
+
const name = this.nameOf(item);
|
|
79
|
+
const imageUrl = this.imageOf(item) || '';
|
|
80
|
+
const meta = this.metaOf(item);
|
|
81
|
+
const rowTag = ((_a = this.customParts) === null || _a === void 0 ? void 0 : _a.contactRow) || ((_b = this.customParts) === null || _b === void 0 ? void 0 : _b.memberRow);
|
|
82
|
+
if (rowTag) {
|
|
83
|
+
return index.h(rowTag, {
|
|
84
|
+
contact: item,
|
|
85
|
+
member: item,
|
|
86
|
+
name,
|
|
87
|
+
imageUrl,
|
|
88
|
+
meta,
|
|
89
|
+
onSelect: () => { var _a; return (_a = this.onSelect) === null || _a === void 0 ? void 0 : _a.call(this, item); },
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
return (index.h("div", { class: "row", onClick: () => { var _a; return (_a = this.onSelect) === null || _a === void 0 ? void 0 : _a.call(this, item); } }, index.h("profile-avatar", { src: imageUrl, name: name, size: "var(--avatar)" }), index.h("div", { class: "row-meta" }, index.h("div", { class: "row-top" }, index.h("span", { class: "row-name" }, name), meta ? index.h("span", { class: "row-side" }, meta) : null))));
|
|
93
|
+
})), this.paginationLoading ? (index.h("div", { class: "empty" }, index.h("spinner-loader", { height: "20px", width: "20px" }))) : null))));
|
|
76
94
|
}
|
|
77
95
|
};
|
|
78
96
|
NewChat.style = ":host {\n display: block;\n height: var(--h-full);\n }\n .new-chat {\n display: flex;\n flex-direction: column;\n height: var(--h-full);\n min-height: 0;\n background: var(--bg-primary);\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .header {\n height: 4rem;\n padding: 0 var(--space-16);\n border-bottom: 1px solid var(--border);\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n flex-shrink: 0;\n box-sizing: border-box;\n }\n .back-btn {\n width: 2.25rem;\n height: 2.25rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n background: transparent;\n color: var(--icon);\n border-radius: var(--rounded-full);\n cursor: pointer;\n padding: 0;\n }\n .back-btn img {\n width: var(--icon-md);\n height: var(--icon-md);\n display: block;\n }\n .back-btn:hover {\n color: var(--text-primary);\n background: var(--hover-overlay);\n }\n .title {\n margin: 0;\n font-size: var(--text-16);\n font-weight: 600;\n color: var(--text-primary);\n font-family: var(--font-primary);\n }\n .search-wrap {\n padding: var(--space-8);\n }\n .search-bar {\n display: flex;\n align-items: center;\n gap: var(--gap-8);\n padding: var(--gap-6) var(--space-12);\n border-radius: var(--rounded-8);\n background: var(--bg-secondary);\n }\n .search-bar:focus-within {\n background: var(--bg-primary);\n box-shadow: 0 0 0 1px var(--border);\n }\n .search-bar input {\n border: none;\n outline: none;\n width: var(--w-full);\n background: transparent;\n color: var(--text-primary);\n font-size: var(--text-14);\n padding: var(--gap-4);\n }\n .search-bar input::placeholder {\n color: var(--text-tertiary);\n }\n .list {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n .row {\n display: flex;\n align-items: center;\n gap: var(--space-12);\n padding: var(--space-8) var(--space-16);\n cursor: pointer;\n transition: background-color 0.15s;\n }\n .row:hover {\n background: var(--bg-secondary);\n }\n .action-icon {\n width: var(--avatar);\n height: var(--avatar);\n border-radius: var(--rounded-full);\n background: var(--brand);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n .action-icon img {\n width: var(--icon-md);\n height: var(--icon-md);\n filter: brightness(0) invert(1);\n }\n .action-label {\n font-size: var(--text-18);\n font-weight: 500;\n }\n .section-label {\n padding: var(--space-16) var(--space-16) var(--space-8);\n font-size: var(--text-10);\n font-weight: 600;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--brand);\n }\n .avatar {\n width: var(--avatar);\n height: var(--avatar);\n border-radius: var(--rounded-full);\n object-fit: cover;\n background: var(--brand-soft);\n color: var(--brand);\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n font-size: var(--text-14);\n flex-shrink: 0;\n overflow: hidden;\n }\n .avatar img {\n width: var(--w-full);\n height: var(--h-full);\n object-fit: cover;\n }\n .row-meta {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n gap: var(--gap-2);\n padding-bottom: var(--gap-4);\n border-bottom: 1px solid var(--border);\n }\n .row-top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--gap-8);\n }\n .row-name {\n font-size: var(--text-16);\n font-weight: 600;\n color: var(--text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .row-side {\n font-size: var(--text-10);\n color: var(--text-tertiary);\n flex-shrink: 0;\n }\n .empty {\n padding: var(--space-16);\n text-align: center;\n color: var(--text-secondary);\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
|
|
@@ -1048,7 +1066,7 @@ const ChatSidebar = class {
|
|
|
1048
1066
|
const title = tile.isGroup ? tile.conversationTitle : (_a = tile === null || tile === void 0 ? void 0 : tile.opponentDetails) === null || _a === void 0 ? void 0 : _a.userName;
|
|
1049
1067
|
return (title || '').toLowerCase().includes(searchQuery);
|
|
1050
1068
|
});
|
|
1051
|
-
return (index.h("div", { class: "chat-sidebar-container", style: { backgroundColor: this.sidebarColor || undefined } }, this.isGroupCreationLoading && (index.h("div", { class: "loader" }, index.h("spinner-loader", { height: "30px", width: "30px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" }))), this.showGroupInfo ? (index.h("div", { class: "new-chat-panel" }, index.h("iso-group-info", { label: this.memberPickerIsGroupCast ? 'Create New Groupcast' : 'Create New Group', selectedUserIds: this.pendingGroupMembers.map(m => m.userId), selectedUsers: this.pendingGroupMembers, isGroupCast: this.memberPickerIsGroupCast, closeGroupInfo: this.closeGroupInfoStep, afterCreate: this.finishGroupInfoStep }))) : this.showMemberPicker ? (index.h("div", { class: "new-chat-panel" }, index.h("div", { class: "picker-back" }, index.h("button", { type: "button", onClick: this.closeMemberPicker, "aria-label": "Back" }, index.h("img", { class: "theme-icon", src: chatAssets.Left_Arrow, alt: "" })), index.h("h2", { class: "picker-title" }, this.memberPickerIsGroupCast ? 'New Group Cast' : 'New Group')), index.h("searchable-list", { label: this.memberPickerIsGroupCast ? 'New Group Cast' : 'New Group', hideTopbar: true, contactList: this.nonBlockedContacts, isSearching: true, isLoading: this.isLoadingMember, hasMore: this.hasMoreMembers, skip: this.skip, paginationLoading: this.isPaginationMember, getForwardMessageMemberList: (query, skip) => this.getAllGroupMemeber(query || '', skip || 0), onSend: this.submitMemberPicker, height: "100%" }))) : this.showNewChat ? (index.h("div", { class: "new-chat-panel" }, index.h("new-chat", { contactList: this.nonBlockedContacts, isLoading: this.isLoadingMember, hasMore: this.hasMoreMembers, skip: this.skip, paginationLoading: this.isPaginationMember, onSearch: (query, skip) => this.getAllMemeber(query || '', skip || 0), onSelect: this.handleNewChatContactPick, onClose: () => this.closeNewChat() }))) : ([
|
|
1069
|
+
return (index.h("div", { class: "chat-sidebar-container", style: { backgroundColor: this.sidebarColor || undefined } }, this.isGroupCreationLoading && (index.h("div", { class: "loader" }, index.h("spinner-loader", { height: "30px", width: "30px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" }))), this.showGroupInfo ? (index.h("div", { class: "new-chat-panel" }, index.h("iso-group-info", { label: this.memberPickerIsGroupCast ? 'Create New Groupcast' : 'Create New Group', selectedUserIds: this.pendingGroupMembers.map(m => m.userId), selectedUsers: this.pendingGroupMembers, isGroupCast: this.memberPickerIsGroupCast, closeGroupInfo: this.closeGroupInfoStep, afterCreate: this.finishGroupInfoStep }))) : this.showMemberPicker ? (index.h("div", { class: "new-chat-panel" }, index.h("div", { class: "picker-back" }, index.h("button", { type: "button", onClick: this.closeMemberPicker, "aria-label": "Back" }, index.h("img", { class: "theme-icon", src: chatAssets.Left_Arrow, alt: "" })), index.h("h2", { class: "picker-title" }, this.memberPickerIsGroupCast ? 'New Group Cast' : 'New Group')), index.h("searchable-list", { label: this.memberPickerIsGroupCast ? 'New Group Cast' : 'New Group', hideTopbar: true, contactList: this.nonBlockedContacts, isSearching: true, isLoading: this.isLoadingMember, hasMore: this.hasMoreMembers, skip: this.skip, paginationLoading: this.isPaginationMember, getForwardMessageMemberList: (query, skip) => this.getAllGroupMemeber(query || '', skip || 0), onSend: this.submitMemberPicker, height: "100%" }))) : this.showNewChat ? (index.h("div", { class: "new-chat-panel" }, index.h("new-chat", { contactList: this.nonBlockedContacts, isLoading: this.isLoadingMember, hasMore: this.hasMoreMembers, skip: this.skip, paginationLoading: this.isPaginationMember, onSearch: (query, skip) => this.getAllMemeber(query || '', skip || 0), onSelect: this.handleNewChatContactPick, onClose: () => this.closeNewChat(), customParts: this.customParts }))) : ([
|
|
1052
1070
|
index.h("div", { class: "chat-sidebar-top" }, index.h("div", { class: "chat-sidebar-header-row" }, this.isSidebarHeaderLabel ? (index.h("h1", { class: "chat-sidebar-header" }, this.sidebarHeaderLabel || 'Chats')) : (index.h("span", null)), index.h("div", { class: "chat-sidebar-actions" }, index.h("button", { type: "button", class: "icon-btn", title: "New Chat", onClick: () => this.openNewChat() }, index.h("img", { src: chatAssets.New_Chat, alt: "New chat" })), index.h("div", { class: "more-wrap" }, index.h("button", { type: "button", class: "icon-btn", title: "More Options", "aria-label": "More options", "aria-haspopup": "menu", "aria-expanded": this.showMoreMenu ? 'true' : 'false', onClick: this.toggleMoreMenu }, index.h("img", { class: "theme-icon", src: chatAssets.Three_Dots, alt: "" })), this.showMoreMenu ? (index.h("div", { class: "more-menu", role: "menu" }, index.h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.onNewGroupFromMenu }, index.h("img", { class: "theme-icon", src: chatAssets.New_Group, alt: "" }), index.h("span", null, "New group")), index.h("div", { class: "more-divider" }), index.h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.onLogoutFromMenu }, index.h("img", { class: "theme-icon", src: chatAssets.Logout, alt: "" }), index.h("span", null, "Log out")))) : null))), this.isSidebarHeaderSearch !== false ? (index.h("div", { class: "chat-sidebar-search" }, index.h("input", { type: "search", placeholder: "Search or start new chat", value: this.searchQuery, onInput: (e) => this.handleSearch(e) }))) : null),
|
|
1053
1071
|
index.h("div", { class: "chat-sidebar-list", onScroll: (e) => this.handleListScroll(e) }, this.isConversationLoading ? (index.h("div", { class: "chat-sidebar-loading" }, index.h("spinner-loader", { height: "15px", width: "15px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" }))) : filteredConversations.length > 0 ? (filteredConversations.map((tile) => this.renderConversationTile(tile))) : (index.h("div", { class: "chat-sidebar-empty" }, "No conversation found")), this.isLoading && this.hasMoreConversations && (index.h("div", { class: "chat-sidebar-loading" }, index.h("spinner-loader", { height: "15px", width: "15px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" })))),
|
|
1054
1072
|
])));
|