isometrik-plugin-chat-sdk 1.0.8 → 1.3.13
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/LICENSE +21 -0
- package/dist/cjs/attachment-preview_22.cjs.entry.js +10 -9
- package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
- package/dist/cjs/audio-bubble_4.cjs.entry.js +1 -1
- package/dist/cjs/chat-assets-e32e80c0.js +73 -0
- package/dist/cjs/chat-assets-e32e80c0.js.map +1 -0
- package/dist/cjs/chat-tile_3.cjs.entry.js +1 -1
- package/dist/cjs/forward-memebers.cjs.entry.js +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 +23 -13
- 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/new-chat-sidebar.cjs.entry.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +6 -7
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +12 -12
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/WebChat.js +39 -6
- package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/shell-render.js +4 -2
- package/dist/collection/components/my-component/web-chat/shell-render.js.map +1 -1
- package/dist/collection/components/theme-provider.js +9 -9
- package/dist/collection/components/theme-provider.js.map +1 -1
- package/dist/collection/constants/chat-assets.js +39 -123
- package/dist/components/ChatSidebar.js +2 -2
- package/dist/components/ChatSidebar.js.map +1 -1
- package/dist/components/WebChat.js +15 -4
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/WebChatBody.js +9 -8
- package/dist/components/WebChatBody.js.map +1 -1
- package/dist/components/chat-assets.js +34 -82
- package/dist/components/chat-assets.js.map +1 -1
- package/dist/components/theme-provider2.js +9 -9
- package/dist/components/theme-provider2.js.map +1 -1
- package/dist/esm/attachment-preview_22.entry.js +10 -9
- package/dist/esm/attachment-preview_22.entry.js.map +1 -1
- package/dist/esm/audio-bubble_4.entry.js +1 -1
- package/dist/esm/chat-assets-4dfb1106.js +38 -0
- package/dist/esm/chat-assets-4dfb1106.js.map +1 -0
- package/dist/esm/chat-tile_3.entry.js +1 -1
- package/dist/esm/forward-memebers.entry.js +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 +23 -13
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/esm/member-add.entry.js +1 -1
- package/dist/esm/new-chat-sidebar.entry.js +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.css +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-188b2631.entry.js → p-0085b397.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-ab5e1e85.entry.js → p-1ad1127f.entry.js} +2 -2
- package/dist/isometrik-webchat/p-6d9f8cec.entry.js +2 -0
- package/dist/isometrik-webchat/p-6d9f8cec.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-b44f0bd1.entry.js → p-6ec350aa.entry.js} +2 -2
- package/dist/isometrik-webchat/p-6ffeb379.entry.js +2 -0
- package/dist/isometrik-webchat/p-6ffeb379.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-e589ff24.entry.js → p-71cc96a3.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-ff8f6bd2.entry.js → p-b8cef5e4.entry.js} +2 -2
- package/dist/isometrik-webchat/p-d424871c.js +2 -0
- package/dist/isometrik-webchat/p-d424871c.js.map +1 -0
- package/dist/types/components/ChatUIComponent/ChatSidebar/ChatSidebar.d.ts +2 -1
- package/dist/types/components/ChatUIComponent/WebChatBody/WebChatBody.d.ts +2 -2
- package/dist/types/components/theme-provider.d.ts +3 -2
- package/dist/types/components.d.ts +26 -8
- package/package.json +53 -10
- package/readme.md +428 -0
- package/dist/cjs/chat-assets-ff067e4d.js +0 -121
- package/dist/cjs/chat-assets-ff067e4d.js.map +0 -1
- package/dist/collection/assets/ExcelDocument.js +0 -2
- package/dist/collection/assets/IsometrikLogo.js +0 -38
- package/dist/collection/assets/Moon.svg +0 -1
- package/dist/collection/assets/New-Chat.svg +0 -5
- package/dist/collection/assets/NoChatPlaceholder.js +0 -16
- package/dist/collection/assets/NoContactsPlaceholder.js +0 -9
- package/dist/collection/assets/NoMessagePlaceholder.svg +0 -13
- package/dist/collection/assets/PdfDocument.js +0 -2
- package/dist/collection/assets/ProfilePlaceholder.js +0 -1
- package/dist/collection/assets/SelectChatPlaceholder.js +0 -13
- package/dist/collection/assets/Sun.svg +0 -1
- package/dist/collection/assets/add-user.svg +0 -6
- package/dist/collection/assets/attachment.svg +0 -4
- package/dist/collection/assets/avatar.svg +0 -1
- package/dist/collection/assets/block-user.svg +0 -4
- package/dist/collection/assets/camera-add.svg +0 -4
- package/dist/collection/assets/camera.svg +0 -17
- package/dist/collection/assets/cancel.svg +0 -12
- package/dist/collection/assets/chatBG.png +0 -0
- package/dist/collection/assets/chatdefaultbg.svg +0 -6140
- package/dist/collection/assets/clear-chat.svg +0 -4
- package/dist/collection/assets/close.svg +0 -4
- package/dist/collection/assets/dark-theme.svg +0 -12
- package/dist/collection/assets/delete.svg +0 -8
- package/dist/collection/assets/doc.png +0 -0
- package/dist/collection/assets/documents.svg +0 -15
- package/dist/collection/assets/doublecheck.svg +0 -1
- package/dist/collection/assets/download.svg +0 -4
- package/dist/collection/assets/drop-down.svg +0 -5
- package/dist/collection/assets/edit.svg +0 -4
- package/dist/collection/assets/equalizer.svg +0 -1
- package/dist/collection/assets/excel.svg +0 -2
- package/dist/collection/assets/forward.svg +0 -4
- package/dist/collection/assets/group-cast.svg +0 -1
- package/dist/collection/assets/group.svg +0 -13
- package/dist/collection/assets/imagePlaceholder.png +0 -0
- package/dist/collection/assets/imagePlaceholder.svg +0 -2
- package/dist/collection/assets/info.svg +0 -4
- package/dist/collection/assets/left-arrow.svg +0 -4
- package/dist/collection/assets/link.svg +0 -1
- package/dist/collection/assets/login.svg +0 -3051
- package/dist/collection/assets/logout.svg +0 -5
- package/dist/collection/assets/message-outline.svg +0 -5
- package/dist/collection/assets/message.svg +0 -1
- package/dist/collection/assets/microphone.svg +0 -2
- package/dist/collection/assets/new_group.svg +0 -9
- package/dist/collection/assets/odt-file.png +0 -0
- package/dist/collection/assets/onboarding.webp +0 -0
- package/dist/collection/assets/paper.svg +0 -5
- package/dist/collection/assets/pause.svg +0 -4
- package/dist/collection/assets/pdf.svg +0 -11
- package/dist/collection/assets/photos.svg +0 -4
- package/dist/collection/assets/play.svg +0 -19
- package/dist/collection/assets/profilePlaceholderImage.png +0 -0
- package/dist/collection/assets/reply.svg +0 -4
- package/dist/collection/assets/rtf.png +0 -0
- package/dist/collection/assets/search.svg +0 -4
- package/dist/collection/assets/send.svg +0 -4
- package/dist/collection/assets/singlecheck.svg +0 -1
- package/dist/collection/assets/smile.svg +0 -2
- package/dist/collection/assets/three-dots.svg +0 -5
- package/dist/collection/assets/txt.png +0 -0
- package/dist/collection/assets/videoPlaceholder.svg +0 -4
- package/dist/collection/assets/videoThumbnail.svg +0 -1
- package/dist/collection/components/ChatUIComponent/AudioBubble.js +0 -315
- package/dist/collection/components/ChatUIComponent/BlockChatList.js +0 -177
- package/dist/collection/components/ChatUIComponent/ForwardMessageList.js +0 -152
- package/dist/collection/components/ChatUIComponent/GroupCast.js +0 -461
- package/dist/collection/components/ChatUIComponent/shared/attachment-preview.js +0 -230
- package/dist/collection/components/ChatUIComponent/shared/chat-loading-placeholder.js +0 -70
- package/dist/collection/components/ChatUIComponent/shared/confirm-dialog.js +0 -51
- package/dist/collection/components/ChatUIComponent/shared/contact-info.js +0 -255
- package/dist/collection/components/ChatUIComponent/shared/context-menu.js +0 -112
- package/dist/collection/components/ChatUIComponent/shared/delete-message.js +0 -49
- package/dist/collection/components/ChatUIComponent/shared/document-message.js +0 -161
- package/dist/collection/components/ChatUIComponent/shared/forward-message.js +0 -139
- package/dist/collection/components/ChatUIComponent/shared/group-chat-contacts.js +0 -201
- package/dist/collection/components/ChatUIComponent/shared/group-info.js +0 -170
- package/dist/collection/components/ChatUIComponent/shared/image-message.js +0 -156
- package/dist/collection/components/ChatUIComponent/shared/incoming-text-message-bubble.js +0 -98
- package/dist/collection/components/ChatUIComponent/shared/link-preview.js +0 -125
- package/dist/collection/components/ChatUIComponent/shared/media-gallery.js +0 -152
- package/dist/collection/components/ChatUIComponent/shared/message-body-render.js +0 -19
- package/dist/collection/components/ChatUIComponent/shared/message-bubble.js +0 -189
- package/dist/collection/components/ChatUIComponent/shared/message-date-pill.js +0 -86
- package/dist/collection/components/ChatUIComponent/shared/message-info.js +0 -188
- package/dist/collection/components/ChatUIComponent/shared/message-search.js +0 -125
- package/dist/collection/components/ChatUIComponent/shared/new-chat-sidebar.js +0 -181
- package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble.js +0 -98
- package/dist/collection/components/ChatUIComponent/shared/profile-avatar.js +0 -136
- package/dist/collection/components/ChatUIComponent/shared/profile-info.js +0 -220
- package/dist/collection/components/ChatUIComponent/shared/reply-block.js +0 -162
- package/dist/collection/components/ChatUIComponent/shared/reply-message-container.js +0 -193
- package/dist/collection/components/ChatUIComponent/shared/share-popup.js +0 -69
- package/dist/collection/components/ChatUIComponent/shared/spinner-loader.js +0 -74
- package/dist/collection/components/ChatUIComponent/shared/toast-notification.js +0 -106
- package/dist/collection/components/ChatUIComponent/shared/video-message.js +0 -165
- package/dist/collection/components/my-component/my-component.e2e.js +0 -25
- package/dist/collection/components/my-component/my-component.spec.js +0 -34
- package/dist/collection/components/my-component/web-chat/web-chat-split.spec.js +0 -40
- package/dist/collection/lib/chat/chat.spec.js +0 -28
- package/dist/collection/lib/custom-ui/custom-ui.spec.js +0 -49
- package/dist/collection/lib/message-body-segments.spec.js +0 -21
- package/dist/collection/lib/message-dedup.spec.js +0 -17
- package/dist/collection/lib/mqtt/mqtt.spec.js +0 -39
- package/dist/collection/utils/utils.spec.js +0 -15
- package/dist/esm/chat-assets-95633770.js +0 -86
- package/dist/esm/chat-assets-95633770.js.map +0 -1
- package/dist/isometrik-webchat/assets/ExcelDocument.js +0 -2
- package/dist/isometrik-webchat/assets/IsometrikLogo.js +0 -38
- package/dist/isometrik-webchat/assets/Moon.svg +0 -1
- package/dist/isometrik-webchat/assets/New-Chat.svg +0 -5
- package/dist/isometrik-webchat/assets/NoChatPlaceholder.js +0 -16
- package/dist/isometrik-webchat/assets/NoContactsPlaceholder.js +0 -9
- package/dist/isometrik-webchat/assets/NoMessagePlaceholder.svg +0 -13
- package/dist/isometrik-webchat/assets/PdfDocument.js +0 -2
- package/dist/isometrik-webchat/assets/ProfilePlaceholder.js +0 -1
- package/dist/isometrik-webchat/assets/SelectChatPlaceholder.js +0 -13
- package/dist/isometrik-webchat/assets/Sun.svg +0 -1
- package/dist/isometrik-webchat/assets/add-user.svg +0 -6
- package/dist/isometrik-webchat/assets/attachment.svg +0 -4
- package/dist/isometrik-webchat/assets/avatar.svg +0 -1
- package/dist/isometrik-webchat/assets/block-user.svg +0 -4
- package/dist/isometrik-webchat/assets/camera-add.svg +0 -4
- package/dist/isometrik-webchat/assets/camera.svg +0 -17
- package/dist/isometrik-webchat/assets/cancel.svg +0 -12
- package/dist/isometrik-webchat/assets/chatBG.png +0 -0
- package/dist/isometrik-webchat/assets/chatdefaultbg.svg +0 -6140
- package/dist/isometrik-webchat/assets/clear-chat.svg +0 -4
- package/dist/isometrik-webchat/assets/close.svg +0 -4
- package/dist/isometrik-webchat/assets/dark-theme.svg +0 -12
- package/dist/isometrik-webchat/assets/delete.svg +0 -8
- package/dist/isometrik-webchat/assets/doc.png +0 -0
- package/dist/isometrik-webchat/assets/documents.svg +0 -15
- package/dist/isometrik-webchat/assets/doublecheck.svg +0 -1
- package/dist/isometrik-webchat/assets/download.svg +0 -4
- package/dist/isometrik-webchat/assets/drop-down.svg +0 -5
- package/dist/isometrik-webchat/assets/edit.svg +0 -4
- package/dist/isometrik-webchat/assets/equalizer.svg +0 -1
- package/dist/isometrik-webchat/assets/excel.svg +0 -2
- package/dist/isometrik-webchat/assets/forward.svg +0 -4
- package/dist/isometrik-webchat/assets/group-cast.svg +0 -1
- package/dist/isometrik-webchat/assets/group.svg +0 -13
- package/dist/isometrik-webchat/assets/imagePlaceholder.png +0 -0
- package/dist/isometrik-webchat/assets/imagePlaceholder.svg +0 -2
- package/dist/isometrik-webchat/assets/info.svg +0 -4
- package/dist/isometrik-webchat/assets/left-arrow.svg +0 -4
- package/dist/isometrik-webchat/assets/link.svg +0 -1
- package/dist/isometrik-webchat/assets/login.svg +0 -3051
- package/dist/isometrik-webchat/assets/logout.svg +0 -5
- package/dist/isometrik-webchat/assets/message-outline.svg +0 -5
- package/dist/isometrik-webchat/assets/message.svg +0 -1
- package/dist/isometrik-webchat/assets/microphone.svg +0 -2
- package/dist/isometrik-webchat/assets/new_group.svg +0 -9
- package/dist/isometrik-webchat/assets/odt-file.png +0 -0
- package/dist/isometrik-webchat/assets/onboarding.webp +0 -0
- package/dist/isometrik-webchat/assets/paper.svg +0 -5
- package/dist/isometrik-webchat/assets/pause.svg +0 -4
- package/dist/isometrik-webchat/assets/pdf.svg +0 -11
- package/dist/isometrik-webchat/assets/photos.svg +0 -4
- package/dist/isometrik-webchat/assets/play.svg +0 -19
- package/dist/isometrik-webchat/assets/profilePlaceholderImage.png +0 -0
- package/dist/isometrik-webchat/assets/reply.svg +0 -4
- package/dist/isometrik-webchat/assets/rtf.png +0 -0
- package/dist/isometrik-webchat/assets/search.svg +0 -4
- package/dist/isometrik-webchat/assets/send.svg +0 -4
- package/dist/isometrik-webchat/assets/singlecheck.svg +0 -1
- package/dist/isometrik-webchat/assets/smile.svg +0 -2
- package/dist/isometrik-webchat/assets/three-dots.svg +0 -5
- package/dist/isometrik-webchat/assets/txt.png +0 -0
- package/dist/isometrik-webchat/assets/videoPlaceholder.svg +0 -4
- package/dist/isometrik-webchat/assets/videoThumbnail.svg +0 -1
- package/dist/isometrik-webchat/p-4bad6da9.entry.js +0 -2
- package/dist/isometrik-webchat/p-4bad6da9.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-8c73a5d5.entry.js +0 -2
- package/dist/isometrik-webchat/p-8c73a5d5.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-d6f0838c.js +0 -2
- package/dist/isometrik-webchat/p-d6f0838c.js.map +0 -1
- /package/dist/isometrik-webchat/{p-188b2631.entry.js.map → p-0085b397.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-ab5e1e85.entry.js.map → p-1ad1127f.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-b44f0bd1.entry.js.map → p-6ec350aa.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-e589ff24.entry.js.map → p-71cc96a3.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-ff8f6bd2.entry.js.map → p-b8cef5e4.entry.js.map} +0 -0
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Component, Prop, h, Event } from '@stencil/core';
|
|
8
|
-
import './message-bubble';
|
|
9
|
-
import { renderMessageBody, emitTagUser } from './message-body-render';
|
|
10
|
-
let DocumentMessage = class DocumentMessage {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.borderRadius = '6px';
|
|
13
|
-
this.padding = '10px';
|
|
14
|
-
this.docType = '';
|
|
15
|
-
this.mentionedUsers = [];
|
|
16
|
-
this.reactions = {};
|
|
17
|
-
this.showReactionOnHover = false;
|
|
18
|
-
}
|
|
19
|
-
truncateDocName(docName) {
|
|
20
|
-
const lastDotIndex = docName.lastIndexOf('.');
|
|
21
|
-
const name = lastDotIndex !== -1 ? docName.slice(0, lastDotIndex) : docName;
|
|
22
|
-
const extension = lastDotIndex !== -1 ? docName.slice(lastDotIndex) : '';
|
|
23
|
-
const availableSpace = 40 - extension.length;
|
|
24
|
-
if (name.length <= availableSpace) {
|
|
25
|
-
return {
|
|
26
|
-
firstLine: name.slice(0, Math.min(20, name.length)),
|
|
27
|
-
secondLine: `${name.slice(20)}${extension}`,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
const truncatedName = name.slice(0, availableSpace - 3) + '...';
|
|
31
|
-
return {
|
|
32
|
-
firstLine: truncatedName.slice(0, 20),
|
|
33
|
-
secondLine: `${truncatedName.slice(20)}${extension}`,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
iconLabel() {
|
|
37
|
-
const t = this.docType || '';
|
|
38
|
-
if (t.includes('spreadsheet') || t.includes('excel'))
|
|
39
|
-
return '📊';
|
|
40
|
-
if (t.includes('pdf'))
|
|
41
|
-
return '📄';
|
|
42
|
-
return '📎';
|
|
43
|
-
}
|
|
44
|
-
render() {
|
|
45
|
-
const parts = this.truncateDocName(this.docName || 'Document');
|
|
46
|
-
const showCaption = this.message && !String(this.message).includes('AttachmentMessage:');
|
|
47
|
-
return (h("message-bubble", { isSelf: !!this.isSelf, time: this.time, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor || 'var(--bg-secondary-color)', borderRadius: this.borderRadius || '6px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover },
|
|
48
|
-
h("div", { class: "doc-container", style: {
|
|
49
|
-
backgroundColor: this.documentNameBg || 'var(--bg-primary-light)',
|
|
50
|
-
width: this.width || 'auto',
|
|
51
|
-
} },
|
|
52
|
-
h("div", { class: "document-name", style: { padding: this.documentNamePadding || '5px 10px 5px 0' } },
|
|
53
|
-
h("span", { class: "attachment-icon" }, this.iconLabel()),
|
|
54
|
-
h("span", null,
|
|
55
|
-
parts.firstLine,
|
|
56
|
-
h("br", null),
|
|
57
|
-
parts.secondLine)),
|
|
58
|
-
h("a", { href: this.href, download: this.fileName, target: "_blank", rel: "noopener noreferrer", "aria-label": "Download" }, "\u2193")),
|
|
59
|
-
showCaption ? (h("div", { style: { fontSize: '14px', color: this.textColor, marginTop: '4px' } }, renderMessageBody(this.message, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), !!this.isSelf))) : null));
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
__decorate([
|
|
63
|
-
Prop()
|
|
64
|
-
], DocumentMessage.prototype, "bgColor", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
Prop()
|
|
67
|
-
], DocumentMessage.prototype, "borderRadius", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
Prop()
|
|
70
|
-
], DocumentMessage.prototype, "padding", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
Prop()
|
|
73
|
-
], DocumentMessage.prototype, "docName", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
Prop()
|
|
76
|
-
], DocumentMessage.prototype, "width", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
Prop()
|
|
79
|
-
], DocumentMessage.prototype, "height", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
Prop()
|
|
82
|
-
], DocumentMessage.prototype, "documentNameBg", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
Prop()
|
|
85
|
-
], DocumentMessage.prototype, "documentNamePadding", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
Prop()
|
|
88
|
-
], DocumentMessage.prototype, "time", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
Prop()
|
|
91
|
-
], DocumentMessage.prototype, "href", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
Prop()
|
|
94
|
-
], DocumentMessage.prototype, "fileName", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
Prop()
|
|
97
|
-
], DocumentMessage.prototype, "isRead", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
Prop()
|
|
100
|
-
], DocumentMessage.prototype, "isSelf", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
Prop()
|
|
103
|
-
], DocumentMessage.prototype, "isDelivered", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
Prop()
|
|
106
|
-
], DocumentMessage.prototype, "docType", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
Prop()
|
|
109
|
-
], DocumentMessage.prototype, "textColor", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
Prop()
|
|
112
|
-
], DocumentMessage.prototype, "message", void 0);
|
|
113
|
-
__decorate([
|
|
114
|
-
Prop()
|
|
115
|
-
], DocumentMessage.prototype, "mentionedUsers", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
Prop()
|
|
118
|
-
], DocumentMessage.prototype, "messageId", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
Prop()
|
|
121
|
-
], DocumentMessage.prototype, "reactions", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
Prop()
|
|
124
|
-
], DocumentMessage.prototype, "userMetaData", void 0);
|
|
125
|
-
__decorate([
|
|
126
|
-
Prop()
|
|
127
|
-
], DocumentMessage.prototype, "messageType", void 0);
|
|
128
|
-
__decorate([
|
|
129
|
-
Prop()
|
|
130
|
-
], DocumentMessage.prototype, "timeColor", void 0);
|
|
131
|
-
__decorate([
|
|
132
|
-
Prop()
|
|
133
|
-
], DocumentMessage.prototype, "showReactionOnHover", void 0);
|
|
134
|
-
__decorate([
|
|
135
|
-
Prop()
|
|
136
|
-
], DocumentMessage.prototype, "borderWidth", void 0);
|
|
137
|
-
__decorate([
|
|
138
|
-
Prop()
|
|
139
|
-
], DocumentMessage.prototype, "borderColor", void 0);
|
|
140
|
-
__decorate([
|
|
141
|
-
Prop()
|
|
142
|
-
], DocumentMessage.prototype, "borderStyle", void 0);
|
|
143
|
-
__decorate([
|
|
144
|
-
Event({ eventName: 'tagUserClick', bubbles: true, composed: true })
|
|
145
|
-
], DocumentMessage.prototype, "tagUserClick", void 0);
|
|
146
|
-
DocumentMessage = __decorate([
|
|
147
|
-
Component({
|
|
148
|
-
tag: 'document-message',
|
|
149
|
-
shadow: true,
|
|
150
|
-
styles: `
|
|
151
|
-
:host { display: block; }
|
|
152
|
-
.doc-container {
|
|
153
|
-
display: flex; align-items: center; justify-content: space-between; gap: 8px;
|
|
154
|
-
border-radius: 8px; padding: 4px 8px;
|
|
155
|
-
}
|
|
156
|
-
.document-name { display: flex; align-items: center; gap: 8px; word-break: break-word; }
|
|
157
|
-
.attachment-icon { display: flex; flex-shrink: 0; font-size: 20px; }
|
|
158
|
-
`,
|
|
159
|
-
})
|
|
160
|
-
], DocumentMessage);
|
|
161
|
-
export { DocumentMessage };
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Component, Prop, h } from '@stencil/core';
|
|
8
|
-
/** Forwarded-message bubble shell (pure Stencil). */
|
|
9
|
-
let ForwardMessage = class ForwardMessage {
|
|
10
|
-
render() {
|
|
11
|
-
const attachments = Array.isArray(this.messageAttachment) ? this.messageAttachment : [];
|
|
12
|
-
return (h("div", { class: "forward-message-container", style: {
|
|
13
|
-
backgroundColor: this.bgColor || this.messageBodyBg || undefined,
|
|
14
|
-
color: this.color,
|
|
15
|
-
width: this.width,
|
|
16
|
-
height: this.height,
|
|
17
|
-
borderRadius: this.borderRadius || '8px',
|
|
18
|
-
fontSize: this.fontSize,
|
|
19
|
-
fontWeight: this.fontWeight,
|
|
20
|
-
padding: this.padding || '8px 10px',
|
|
21
|
-
alignSelf: this.isSelf ? 'flex-end' : 'flex-start',
|
|
22
|
-
} },
|
|
23
|
-
h("div", { class: "forward-label" }, "\u21AA Forwarded"),
|
|
24
|
-
this.messageBody ? h("div", { class: "body" }, this.messageBody) : null,
|
|
25
|
-
attachments.length > 0 ? (h("div", { class: "attachment" },
|
|
26
|
-
attachments.length,
|
|
27
|
-
" attachment",
|
|
28
|
-
attachments.length > 1 ? 's' : '')) : null,
|
|
29
|
-
h("div", { class: "meta" },
|
|
30
|
-
this.time ? h("span", null, this.time) : null,
|
|
31
|
-
this.isSelf ? h("span", null, this.isRead ? '✓✓' : this.isDelivered ? '✓✓' : '✓') : null)));
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
__decorate([
|
|
35
|
-
Prop()
|
|
36
|
-
], ForwardMessage.prototype, "bgColor", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
Prop()
|
|
39
|
-
], ForwardMessage.prototype, "width", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
Prop()
|
|
42
|
-
], ForwardMessage.prototype, "height", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
Prop()
|
|
45
|
-
], ForwardMessage.prototype, "borderWidth", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
Prop()
|
|
48
|
-
], ForwardMessage.prototype, "borderColor", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
Prop()
|
|
51
|
-
], ForwardMessage.prototype, "color", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
Prop()
|
|
54
|
-
], ForwardMessage.prototype, "fontSize", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
Prop()
|
|
57
|
-
], ForwardMessage.prototype, "borderRadius", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
Prop()
|
|
60
|
-
], ForwardMessage.prototype, "fontWeight", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
Prop()
|
|
63
|
-
], ForwardMessage.prototype, "progressBarBg", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
Prop()
|
|
66
|
-
], ForwardMessage.prototype, "progressBarHeight", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
Prop()
|
|
69
|
-
], ForwardMessage.prototype, "progressBarColor", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
Prop()
|
|
72
|
-
], ForwardMessage.prototype, "progressBarBorderRadius", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
Prop()
|
|
75
|
-
], ForwardMessage.prototype, "messageBody", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
Prop()
|
|
78
|
-
], ForwardMessage.prototype, "padding", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
Prop()
|
|
81
|
-
], ForwardMessage.prototype, "isRead", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
Prop()
|
|
84
|
-
], ForwardMessage.prototype, "isDelivered", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
Prop()
|
|
87
|
-
], ForwardMessage.prototype, "time", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
Prop()
|
|
90
|
-
], ForwardMessage.prototype, "messageBodyBg", void 0);
|
|
91
|
-
__decorate([
|
|
92
|
-
Prop()
|
|
93
|
-
], ForwardMessage.prototype, "messageAttachment", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
Prop()
|
|
96
|
-
], ForwardMessage.prototype, "isSelf", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
Prop()
|
|
99
|
-
], ForwardMessage.prototype, "messageId", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
Prop()
|
|
102
|
-
], ForwardMessage.prototype, "reactions", void 0);
|
|
103
|
-
__decorate([
|
|
104
|
-
Prop()
|
|
105
|
-
], ForwardMessage.prototype, "showConfirmationPopup", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
Prop()
|
|
108
|
-
], ForwardMessage.prototype, "selectedEmojiToRemove", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
Prop()
|
|
111
|
-
], ForwardMessage.prototype, "showAllReactionsPopup", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
Prop()
|
|
114
|
-
], ForwardMessage.prototype, "showReactionButton", void 0);
|
|
115
|
-
__decorate([
|
|
116
|
-
Prop()
|
|
117
|
-
], ForwardMessage.prototype, "showEmojiReactions", void 0);
|
|
118
|
-
__decorate([
|
|
119
|
-
Prop()
|
|
120
|
-
], ForwardMessage.prototype, "userMetaData", void 0);
|
|
121
|
-
ForwardMessage = __decorate([
|
|
122
|
-
Component({
|
|
123
|
-
tag: 'forward-message',
|
|
124
|
-
shadow: true,
|
|
125
|
-
styles: `
|
|
126
|
-
:host { display: block; max-width: 72%; }
|
|
127
|
-
.forward-message-container {
|
|
128
|
-
display: flex; flex-direction: column; position: relative; width: fit-content;
|
|
129
|
-
border-radius: 8px; padding: 8px 10px; background: var(--bg-outgoing-message, #dcf8c6);
|
|
130
|
-
color: var(--text-primary-color);
|
|
131
|
-
}
|
|
132
|
-
.forward-label { font-size: 11px; opacity: 0.7; margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
|
|
133
|
-
.body { white-space: pre-wrap; word-break: break-word; font-size: 14px; }
|
|
134
|
-
.meta { display: flex; justify-content: flex-end; gap: 6px; font-size: 11px; opacity: 0.65; margin-top: 4px; }
|
|
135
|
-
.attachment { font-size: 12px; opacity: 0.8; margin-top: 4px; }
|
|
136
|
-
`,
|
|
137
|
-
})
|
|
138
|
-
], ForwardMessage);
|
|
139
|
-
export { ForwardMessage };
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Component, Prop, State, Event, h } from '@stencil/core';
|
|
8
|
-
import { generateProfileImageByInitials } from '../../../lib/helpers';
|
|
9
|
-
import { WEB_CONTENT } from '../../../constants/content';
|
|
10
|
-
import './spinner-loader';
|
|
11
|
-
import './group-info';
|
|
12
|
-
let GroupChatContacts = class GroupChatContacts {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.label = 'Create New Group';
|
|
15
|
-
this.nonBlockedContacts = [];
|
|
16
|
-
this.isNoContactsFound = false;
|
|
17
|
-
this.isPaginationMember = false;
|
|
18
|
-
this.isLoadingMember = false;
|
|
19
|
-
this.hasMoreMembers = false;
|
|
20
|
-
this.isGroupCast = false;
|
|
21
|
-
this.selectedContacts = [];
|
|
22
|
-
this.showGroupInfo = false;
|
|
23
|
-
this.searchText = '';
|
|
24
|
-
this.onSearch = (e) => {
|
|
25
|
-
const inputValue = e.target.value;
|
|
26
|
-
this.searchText = inputValue;
|
|
27
|
-
clearTimeout(this.debounceTimer);
|
|
28
|
-
this.debounceTimer = setTimeout(() => {
|
|
29
|
-
this.inputChanged.emit({
|
|
30
|
-
inputValue,
|
|
31
|
-
isDebounced: true,
|
|
32
|
-
selectedUserIds: this.selectedContacts.map(c => c.userId),
|
|
33
|
-
});
|
|
34
|
-
}, 300);
|
|
35
|
-
if (!inputValue.trim()) {
|
|
36
|
-
clearTimeout(this.debounceTimer);
|
|
37
|
-
this.inputChanged.emit({
|
|
38
|
-
inputValue: '',
|
|
39
|
-
isDebounced: false,
|
|
40
|
-
selectedUserIds: this.selectedContacts.map(c => c.userId),
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
this.select = (contact) => {
|
|
45
|
-
if (this.selectedContacts.some(c => c.userId === contact.userId))
|
|
46
|
-
return;
|
|
47
|
-
this.selectedContacts = [...this.selectedContacts, contact];
|
|
48
|
-
this.searchText = '';
|
|
49
|
-
this.inputChanged.emit({ inputValue: '', selectedUserIds: this.selectedContacts.map(c => c.userId) });
|
|
50
|
-
};
|
|
51
|
-
this.remove = (contact) => {
|
|
52
|
-
this.selectedContacts = this.selectedContacts.filter(c => c.userId !== contact.userId);
|
|
53
|
-
};
|
|
54
|
-
this.onScroll = (e) => {
|
|
55
|
-
const el = e.target;
|
|
56
|
-
if (el.scrollHeight - Math.round(el.scrollTop) <= el.clientHeight + 1 &&
|
|
57
|
-
this.hasMoreMembers &&
|
|
58
|
-
!this.isPaginationMember) {
|
|
59
|
-
this.scrolledToBottom.emit();
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
this.goNext = () => {
|
|
63
|
-
const selectedUserIds = this.selectedContacts.map(c => c.userId);
|
|
64
|
-
this.contactsSelected.emit({ selectedUserIds });
|
|
65
|
-
this.showGroupInfo = true;
|
|
66
|
-
};
|
|
67
|
-
this.closeInfo = () => {
|
|
68
|
-
this.showGroupInfo = false;
|
|
69
|
-
};
|
|
70
|
-
this.closeAll = () => {
|
|
71
|
-
var _a, _b;
|
|
72
|
-
this.showGroupInfo = false;
|
|
73
|
-
this.closeAllOverlays.emit();
|
|
74
|
-
(_a = this.onCloseAll) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
75
|
-
(_b = this.closeGroupChatContacts) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
availableContacts() {
|
|
79
|
-
const selectedIds = new Set(this.selectedContacts.map(c => c.userId));
|
|
80
|
-
return (this.nonBlockedContacts || []).filter(c => !selectedIds.has(c.userId));
|
|
81
|
-
}
|
|
82
|
-
render() {
|
|
83
|
-
if (this.showGroupInfo) {
|
|
84
|
-
return (h("iso-group-info", { label: this.isGroupCast ? 'Create New Groupcast' : 'Create New Group', selectedUserIds: this.selectedContacts.map(c => c.userId), selectedUsers: this.selectedContacts, isGroupCast: this.isGroupCast, closeGroupInfo: this.closeInfo, afterCreate: this.closeAll }));
|
|
85
|
-
}
|
|
86
|
-
return (h("div", { class: "wrap" },
|
|
87
|
-
h("div", { class: "topbar" },
|
|
88
|
-
h("button", { type: "button", onClick: () => { var _a; return (_a = this.closeGroupChatContacts) === null || _a === void 0 ? void 0 : _a.call(this); }, "aria-label": "Back" },
|
|
89
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24", fill: "currentColor" },
|
|
90
|
-
h("path", { d: "m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z" }))),
|
|
91
|
-
h("span", null, this.label)),
|
|
92
|
-
h("div", { class: "search" },
|
|
93
|
-
h("input", { type: "search", placeholder: WEB_CONTENT.PLACEHOLDER_CONTENT.SEARCH_FOR_NAME_OR_NUMBER, value: this.searchText, onInput: this.onSearch })),
|
|
94
|
-
this.selectedContacts.length > 0 ? (h("div", { class: "chips" }, this.selectedContacts.map(c => (h("button", { type: "button", class: "chip", onClick: () => this.remove(c) },
|
|
95
|
-
h("img", { src: c.userProfileImageUrl || generateProfileImageByInitials(c.userName || '?', 40, 40), alt: "" }),
|
|
96
|
-
c.userName,
|
|
97
|
-
h("span", null, "\u00D7")))))) : null,
|
|
98
|
-
h("div", { class: "list", onScroll: this.onScroll },
|
|
99
|
-
this.isLoadingMember ? (h("div", { class: "loading" },
|
|
100
|
-
h("spinner-loader", { height: "15px", width: "15px" }))) : !this.availableContacts().length ? (h("div", { class: "empty" }, this.isNoContactsFound ? 'No contacts found' : 'No contacts available')) : (this.availableContacts().map(contact => (h("div", { class: "row", onClick: () => this.select(contact) },
|
|
101
|
-
h("img", { src: contact.userProfileImageUrl ||
|
|
102
|
-
generateProfileImageByInitials(contact.userName || '?', 80, 80), alt: "" }),
|
|
103
|
-
h("span", null, contact.userName))))),
|
|
104
|
-
this.isPaginationMember ? (h("div", { class: "loading" },
|
|
105
|
-
h("spinner-loader", { height: "15px", width: "15px" }))) : null),
|
|
106
|
-
h("button", { type: "button", class: { 'create-btn': true, show: this.selectedContacts.length > 0 }, onClick: this.goNext }, this.isGroupCast ? WEB_CONTENT.CHAT.GROUP_CAST.CREATE_GROUP_CAST : 'Add Members')));
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
__decorate([
|
|
110
|
-
Prop()
|
|
111
|
-
], GroupChatContacts.prototype, "label", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
Prop()
|
|
114
|
-
], GroupChatContacts.prototype, "closeGroupChatContacts", void 0);
|
|
115
|
-
__decorate([
|
|
116
|
-
Prop({ mutable: true })
|
|
117
|
-
], GroupChatContacts.prototype, "nonBlockedContacts", void 0);
|
|
118
|
-
__decorate([
|
|
119
|
-
Prop()
|
|
120
|
-
], GroupChatContacts.prototype, "isNoContactsFound", void 0);
|
|
121
|
-
__decorate([
|
|
122
|
-
Prop()
|
|
123
|
-
], GroupChatContacts.prototype, "isPaginationMember", void 0);
|
|
124
|
-
__decorate([
|
|
125
|
-
Prop()
|
|
126
|
-
], GroupChatContacts.prototype, "isLoadingMember", void 0);
|
|
127
|
-
__decorate([
|
|
128
|
-
Prop()
|
|
129
|
-
], GroupChatContacts.prototype, "hasMoreMembers", void 0);
|
|
130
|
-
__decorate([
|
|
131
|
-
Prop()
|
|
132
|
-
], GroupChatContacts.prototype, "onCloseAll", void 0);
|
|
133
|
-
__decorate([
|
|
134
|
-
Prop()
|
|
135
|
-
], GroupChatContacts.prototype, "isGroupCast", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
State()
|
|
138
|
-
], GroupChatContacts.prototype, "selectedContacts", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
State()
|
|
141
|
-
], GroupChatContacts.prototype, "showGroupInfo", void 0);
|
|
142
|
-
__decorate([
|
|
143
|
-
State()
|
|
144
|
-
], GroupChatContacts.prototype, "searchText", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
Event({ eventName: 'group-contacts-input-changed' })
|
|
147
|
-
], GroupChatContacts.prototype, "inputChanged", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
Event({ eventName: 'group-contacts-scrolled-to-bottom' })
|
|
150
|
-
], GroupChatContacts.prototype, "scrolledToBottom", void 0);
|
|
151
|
-
__decorate([
|
|
152
|
-
Event({ eventName: 'group-contacts-selected' })
|
|
153
|
-
], GroupChatContacts.prototype, "contactsSelected", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
Event({ eventName: 'close-all-overlays' })
|
|
156
|
-
], GroupChatContacts.prototype, "closeAllOverlays", void 0);
|
|
157
|
-
GroupChatContacts = __decorate([
|
|
158
|
-
Component({
|
|
159
|
-
tag: 'group-chat-contacts',
|
|
160
|
-
shadow: true,
|
|
161
|
-
styles: `
|
|
162
|
-
:host { display: block; height: 100%; }
|
|
163
|
-
.wrap {
|
|
164
|
-
display: flex; flex-direction: column; height: 100%;
|
|
165
|
-
background: var(--bg-primary-color); color: var(--text-primary-color);
|
|
166
|
-
}
|
|
167
|
-
.topbar {
|
|
168
|
-
display: flex; align-items: center; gap: 12px; padding: 12px;
|
|
169
|
-
font-size: var(--title-font-size, 18px); font-weight: 500;
|
|
170
|
-
}
|
|
171
|
-
.topbar button { background: none; border: none; cursor: pointer; color: inherit; padding: 0; display: flex; }
|
|
172
|
-
.search {
|
|
173
|
-
display: flex; align-items: center; gap: 8px; margin: 8px 12px; padding: 8px 10px;
|
|
174
|
-
border-radius: 8px; background: var(--bg-secondary-color);
|
|
175
|
-
}
|
|
176
|
-
.search input {
|
|
177
|
-
flex: 1; border: none; outline: none; background: transparent; color: var(--text-primary-color); font-size: 14px;
|
|
178
|
-
}
|
|
179
|
-
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
|
|
180
|
-
.chip {
|
|
181
|
-
display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px;
|
|
182
|
-
border-radius: 999px; background: var(--bg-secondary-color); font-size: 12px; cursor: pointer;
|
|
183
|
-
}
|
|
184
|
-
.chip img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
|
|
185
|
-
.list { flex: 1; min-height: 0; overflow-y: auto; }
|
|
186
|
-
.row {
|
|
187
|
-
display: flex; align-items: center; gap: 10px; padding: 12px; cursor: pointer;
|
|
188
|
-
border-bottom: 1px solid var(--bg-secondary-color);
|
|
189
|
-
}
|
|
190
|
-
.row img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--bg-primary-light); }
|
|
191
|
-
.empty, .loading { padding: 24px; text-align: center; opacity: 0.7; }
|
|
192
|
-
.create-btn {
|
|
193
|
-
margin: 12px; padding: 12px; border: none; border-radius: 8px; cursor: pointer;
|
|
194
|
-
background: var(--base-color, #4A76FD); color: #fff; font-weight: 600;
|
|
195
|
-
display: none;
|
|
196
|
-
}
|
|
197
|
-
.create-btn.show { display: block; }
|
|
198
|
-
`,
|
|
199
|
-
})
|
|
200
|
-
], GroupChatContacts);
|
|
201
|
-
export { GroupChatContacts };
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Component, Prop, State, Event, Element, h } from '@stencil/core';
|
|
8
|
-
let GroupInfo = class GroupInfo {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.label = 'Create New Group';
|
|
11
|
-
this.selectedUserIds = [];
|
|
12
|
-
this.selectedUsers = [];
|
|
13
|
-
this.isGroupCast = false;
|
|
14
|
-
this.groupTitle = '';
|
|
15
|
-
this.imageSrc = '';
|
|
16
|
-
this.imageFile = null;
|
|
17
|
-
this.onTitle = (e) => {
|
|
18
|
-
this.groupTitle = e.target.value;
|
|
19
|
-
};
|
|
20
|
-
this.onFile = (e) => {
|
|
21
|
-
var _a;
|
|
22
|
-
const file = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
23
|
-
if (!file)
|
|
24
|
-
return;
|
|
25
|
-
this.imageFile = file;
|
|
26
|
-
const reader = new FileReader();
|
|
27
|
-
reader.onload = ev => {
|
|
28
|
-
this.imageSrc = String(ev.target.result || '');
|
|
29
|
-
};
|
|
30
|
-
reader.readAsDataURL(file);
|
|
31
|
-
};
|
|
32
|
-
this.triggerFile = () => {
|
|
33
|
-
var _a, _b;
|
|
34
|
-
(_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.image-upload-input')) === null || _b === void 0 ? void 0 : _b.click();
|
|
35
|
-
};
|
|
36
|
-
this.submit = () => {
|
|
37
|
-
var _a;
|
|
38
|
-
if (!this.groupTitle.trim())
|
|
39
|
-
return;
|
|
40
|
-
const detail = {
|
|
41
|
-
conversationTitle: this.groupTitle.trim(),
|
|
42
|
-
imageFile: this.imageFile,
|
|
43
|
-
selectedUserIds: this.selectedUserIds,
|
|
44
|
-
selectedUsers: this.selectedUsers,
|
|
45
|
-
isGroupCast: this.isGroupCast,
|
|
46
|
-
closeAll: true,
|
|
47
|
-
};
|
|
48
|
-
if (this.isGroupCast)
|
|
49
|
-
this.createGroupCastSubmitted.emit(detail);
|
|
50
|
-
else
|
|
51
|
-
this.createGroupSubmitted.emit(detail);
|
|
52
|
-
// afterCreate closes the whole create flow; do not call closeGroupInfo
|
|
53
|
-
// (that only goes back to the member picker).
|
|
54
|
-
if (this.afterCreate)
|
|
55
|
-
this.afterCreate();
|
|
56
|
-
else
|
|
57
|
-
(_a = this.closeGroupInfo) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
render() {
|
|
61
|
-
return (h("div", { class: "group-info-container" },
|
|
62
|
-
h("div", { class: "group-info-topbar" },
|
|
63
|
-
h("button", { type: "button", onClick: () => { var _a; return (_a = this.closeGroupInfo) === null || _a === void 0 ? void 0 : _a.call(this); }, "aria-label": "Back" },
|
|
64
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24", fill: "currentColor" },
|
|
65
|
-
h("path", { d: "m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z" }))),
|
|
66
|
-
h("span", null, this.label)),
|
|
67
|
-
h("div", { class: "group-info-content" },
|
|
68
|
-
h("div", { class: "group-info-image", onClick: this.triggerFile },
|
|
69
|
-
this.imageSrc ? (h("img", { class: "preview-image", src: this.imageSrc, alt: "Group" })) : (h("div", { class: "upload-hint" },
|
|
70
|
-
"Add ",
|
|
71
|
-
this.isGroupCast ? 'Groupcast' : 'Group',
|
|
72
|
-
h("br", null),
|
|
73
|
-
"Photo")),
|
|
74
|
-
h("input", { type: "file", class: "image-upload-input", accept: "image/*", onChange: this.onFile })),
|
|
75
|
-
h("div", { class: "group-info-title" },
|
|
76
|
-
h("input", { type: "text", placeholder: this.isGroupCast ? 'Groupcast Name' : 'Group Name', value: this.groupTitle, onInput: this.onTitle })),
|
|
77
|
-
h("div", { class: "create-group-button" },
|
|
78
|
-
h("button", { type: "button", disabled: !this.groupTitle.trim(), onClick: this.submit },
|
|
79
|
-
"Create ",
|
|
80
|
-
this.isGroupCast ? 'Groupcast' : 'Group')))));
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
__decorate([
|
|
84
|
-
Element()
|
|
85
|
-
], GroupInfo.prototype, "el", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
Prop()
|
|
88
|
-
], GroupInfo.prototype, "label", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
Prop()
|
|
91
|
-
], GroupInfo.prototype, "selectedUserIds", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
Prop()
|
|
94
|
-
], GroupInfo.prototype, "selectedUsers", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
Prop()
|
|
97
|
-
], GroupInfo.prototype, "isGroupCast", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
Prop()
|
|
100
|
-
], GroupInfo.prototype, "closeGroupInfo", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
Prop()
|
|
103
|
-
], GroupInfo.prototype, "afterCreate", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
State()
|
|
106
|
-
], GroupInfo.prototype, "groupTitle", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
State()
|
|
109
|
-
], GroupInfo.prototype, "imageSrc", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
State()
|
|
112
|
-
], GroupInfo.prototype, "imageFile", void 0);
|
|
113
|
-
__decorate([
|
|
114
|
-
Event({ eventName: 'create-group-submitted' })
|
|
115
|
-
], GroupInfo.prototype, "createGroupSubmitted", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
Event({ eventName: 'create-group-cast-submitted' })
|
|
118
|
-
], GroupInfo.prototype, "createGroupCastSubmitted", void 0);
|
|
119
|
-
GroupInfo = __decorate([
|
|
120
|
-
Component({
|
|
121
|
-
tag: 'iso-group-info',
|
|
122
|
-
shadow: true,
|
|
123
|
-
styles: `
|
|
124
|
-
:host { display: block; height: var(--h-full, 100%); }
|
|
125
|
-
.group-info-container {
|
|
126
|
-
display: flex; flex-direction: column; height: 100%;
|
|
127
|
-
background: var(--bg-primary, var(--bg-primary-color));
|
|
128
|
-
color: var(--text-primary, var(--text-primary-color));
|
|
129
|
-
}
|
|
130
|
-
.group-info-topbar {
|
|
131
|
-
display: flex; align-items: center; gap: var(--gap-12, 12px);
|
|
132
|
-
height: 4rem; box-sizing: border-box; padding: 0 var(--space-16, 16px);
|
|
133
|
-
border-bottom: 1px solid var(--border, transparent);
|
|
134
|
-
font-size: var(--text-16, 16px); font-weight: 600;
|
|
135
|
-
}
|
|
136
|
-
.group-info-topbar button {
|
|
137
|
-
background: none; border: none; cursor: pointer; color: inherit; padding: 0; display: flex;
|
|
138
|
-
}
|
|
139
|
-
.group-info-content {
|
|
140
|
-
display: flex; flex-direction: column; align-items: center; gap: var(--space-16, 16px);
|
|
141
|
-
padding: var(--space-16, 20px);
|
|
142
|
-
}
|
|
143
|
-
.group-info-image {
|
|
144
|
-
position: relative; width: 10rem; height: 10rem; border-radius: var(--rounded-full, 50%);
|
|
145
|
-
overflow: hidden; background: var(--bg-secondary, var(--bg-secondary-color)); cursor: pointer;
|
|
146
|
-
display: flex; align-items: center; justify-content: center;
|
|
147
|
-
border: 2px dashed var(--border, var(--bg-primary-light, #ccc));
|
|
148
|
-
}
|
|
149
|
-
.preview-image { width: 100%; height: 100%; object-fit: cover; }
|
|
150
|
-
.upload-hint { text-align: center; font-size: var(--text-13, 13px); color: var(--text-secondary); }
|
|
151
|
-
.image-upload-input { display: none; }
|
|
152
|
-
.group-info-title {
|
|
153
|
-
width: 100%; border-bottom: 1px solid var(--border, var(--text-primary-color)); padding-bottom: 4px;
|
|
154
|
-
}
|
|
155
|
-
.group-info-title input {
|
|
156
|
-
width: 100%; border: none; outline: none; background: transparent;
|
|
157
|
-
color: var(--text-primary, var(--text-primary-color)); font-size: var(--text-16, 16px); padding: 8px 0;
|
|
158
|
-
font-family: inherit;
|
|
159
|
-
}
|
|
160
|
-
.create-group-button { width: 100%; }
|
|
161
|
-
.create-group-button button {
|
|
162
|
-
width: 100%; padding: 12px; border: none; border-radius: var(--rounded-8, 8px); cursor: pointer;
|
|
163
|
-
background: var(--brand, var(--base-color, #4A76FD)); color: var(--text-on-brand, #fff); font-weight: 600;
|
|
164
|
-
font-family: inherit;
|
|
165
|
-
}
|
|
166
|
-
.create-group-button button:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
167
|
-
`,
|
|
168
|
-
})
|
|
169
|
-
], GroupInfo);
|
|
170
|
-
export { GroupInfo };
|