isometrik-plugin-chat-sdk 2.0.0 → 2.0.2
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 +6 -2
- package/dist/cjs/attachment-preview_22.cjs.entry.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 +2 -2
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +20 -1
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/new chat/new-chat.js +22 -1
- package/dist/collection/components/ChatUIComponent/shared/new chat/new-chat.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/shell-render.js +1 -1
- package/dist/collection/components/my-component/web-chat/shell-render.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/web-chat.css +11 -9
- package/dist/components/ChatSidebar.js +3 -1
- package/dist/components/ChatSidebar.js.map +1 -1
- package/dist/components/WebChat.js +2 -2
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/new-chat2.js +5 -1
- package/dist/components/new-chat2.js.map +1 -1
- package/dist/esm/attachment-preview_22.entry.js +6 -2
- package/dist/esm/attachment-preview_22.entry.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 +2 -2
- package/dist/esm/login-page_3.entry.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-53ee98a7.entry.js → p-b9056542.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-53ee98a7.entry.js.map → p-b9056542.entry.js.map} +1 -1
- package/dist/isometrik-webchat/p-ee1c1648.entry.js +2 -0
- package/dist/isometrik-webchat/p-ee1c1648.entry.js.map +1 -0
- package/dist/types/components/ChatUIComponent/ChatSidebar/ChatSidebar.d.ts +2 -0
- package/dist/types/components/ChatUIComponent/shared/new chat/new-chat.d.ts +2 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
- package/readme.md +3 -3
- package/dist/isometrik-webchat/p-b61d6c0c.entry.js +0 -2
- package/dist/isometrik-webchat/p-b61d6c0c.entry.js.map +0 -1
|
@@ -47,6 +47,8 @@ const NewChat = class {
|
|
|
47
47
|
this.createGroupClicked.emit({ isGroup: true });
|
|
48
48
|
};
|
|
49
49
|
this.openGroupCast = () => {
|
|
50
|
+
if (this.groupcastEnabled === false)
|
|
51
|
+
return;
|
|
50
52
|
this.createGroupcastClicked.emit({ isGroup: true });
|
|
51
53
|
};
|
|
52
54
|
this.contactList = [];
|
|
@@ -58,6 +60,7 @@ const NewChat = class {
|
|
|
58
60
|
this.onSelect = undefined;
|
|
59
61
|
this.onClose = undefined;
|
|
60
62
|
this.customParts = undefined;
|
|
63
|
+
this.groupcastEnabled = true;
|
|
61
64
|
this.searchText = '';
|
|
62
65
|
}
|
|
63
66
|
nameOf(item) {
|
|
@@ -74,7 +77,7 @@ const NewChat = class {
|
|
|
74
77
|
}
|
|
75
78
|
render() {
|
|
76
79
|
const items = this.contactList || [];
|
|
77
|
-
return (index.h("div", { key: '
|
|
80
|
+
return (index.h("div", { key: '914bec8d4576c07426ec160b7517101b801f59ec', class: "new-chat" }, index.h("div", { key: '79e2a68476db37e955c25ebd0bf06bdf9cdf984a', class: "header" }, index.h("button", { key: '428ba8f1f71315ea8154033b8c86022553ab8e90', 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: '74f6d4abe4236b8ba64ab2125869d546d12065f7', class: "theme-icon", src: chatAssets.Left_Arrow, alt: "" })), index.h("h2", { key: 'e2cd4f5dea5ed4cf19074b5bf58c33c4867c7dc0', class: "title" }, "New Chat")), index.h("div", { key: '00b4e36ebd0e20cc324807df5f00686f087e63f0', class: "search-wrap" }, index.h("div", { key: '271c6a649a11f21f9e017f646931d9dcdc91568d', class: "search-bar" }, index.h("input", { key: '73cb814a62311992496e49a8cf47f923a74bf2f8', 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")), this.groupcastEnabled !== false ? (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"))) : null, index.h("div", { class: "section-label" }, "Contacts"), items.length === 0 ? (index.h("div", { class: "empty" }, "No results")) : (items.map(item => {
|
|
78
81
|
var _a, _b;
|
|
79
82
|
const name = this.nameOf(item);
|
|
80
83
|
const imageUrl = this.imageOf(item) || '';
|
|
@@ -361,6 +364,7 @@ const ChatSidebar = class {
|
|
|
361
364
|
this.hasMoreConversations = undefined;
|
|
362
365
|
this.unreadConversationsCount = undefined;
|
|
363
366
|
this.customParts = undefined;
|
|
367
|
+
this.groupcastEnabled = true;
|
|
364
368
|
this.conversationDetails = undefined;
|
|
365
369
|
this.sortedConversationList = [];
|
|
366
370
|
this.numberOfConversations = 0;
|
|
@@ -1067,7 +1071,7 @@ const ChatSidebar = class {
|
|
|
1067
1071
|
const title = tile.isGroup ? tile.conversationTitle : (_a = tile === null || tile === void 0 ? void 0 : tile.opponentDetails) === null || _a === void 0 ? void 0 : _a.userName;
|
|
1068
1072
|
return (title || '').toLowerCase().includes(searchQuery);
|
|
1069
1073
|
});
|
|
1070
|
-
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 }))) : ([
|
|
1074
|
+
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, groupcastEnabled: this.groupcastEnabled }))) : ([
|
|
1071
1075
|
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),
|
|
1072
1076
|
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" })))),
|
|
1073
1077
|
])));
|