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,156 +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, State } from '@stencil/core';
|
|
8
|
-
import './message-bubble';
|
|
9
|
-
import { renderMessageBody, emitTagUser } from './message-body-render';
|
|
10
|
-
let ImageMessage = class ImageMessage {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.borderRadius = '10px';
|
|
13
|
-
this.padding = '10px';
|
|
14
|
-
this.height = '220px';
|
|
15
|
-
this.width = '250px';
|
|
16
|
-
this.mentionedUsers = [];
|
|
17
|
-
this.totalMedia = 0;
|
|
18
|
-
this.reactions = {};
|
|
19
|
-
this.showReactionOnHover = false;
|
|
20
|
-
this.galleryOpen = false;
|
|
21
|
-
this.openGallery = (e) => {
|
|
22
|
-
var _a;
|
|
23
|
-
(_a = this.onImageClick) === null || _a === void 0 ? void 0 : _a.call(this, e);
|
|
24
|
-
this.galleryOpen = true;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
const showCaption = this.message && !String(this.message).includes('AttachmentMessage:');
|
|
29
|
-
return (h("div", null,
|
|
30
|
-
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, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover },
|
|
31
|
-
h("div", { class: "image-container", style: { width: this.width || '250px', height: this.height || '220px', borderRadius: this.borderRadius }, onClick: this.openGallery },
|
|
32
|
-
h("img", { src: this.imageSrc, alt: "image" }),
|
|
33
|
-
this.totalMedia > 0 ? h("span", { class: "mediaCount" },
|
|
34
|
-
" + ",
|
|
35
|
-
this.totalMedia) : null),
|
|
36
|
-
showCaption ? (h("div", { style: { fontSize: '14px', color: this.textColor, marginTop: '4px' } }, renderMessageBody(this.message, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), !!this.isSelf))) : null),
|
|
37
|
-
this.galleryOpen ? (h("div", { class: "gallery-overlay", onClick: () => (this.galleryOpen = false) },
|
|
38
|
-
h("button", { type: "button", class: "gallery-close", "aria-label": "Close" }, "\u00D7"),
|
|
39
|
-
h("img", { src: this.imageSrc, alt: "full", onClick: e => e.stopPropagation() }))) : null));
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
__decorate([
|
|
43
|
-
Prop()
|
|
44
|
-
], ImageMessage.prototype, "bgColor", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
Prop()
|
|
47
|
-
], ImageMessage.prototype, "borderRadius", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
Prop()
|
|
50
|
-
], ImageMessage.prototype, "padding", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
Prop()
|
|
53
|
-
], ImageMessage.prototype, "imageSrc", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
Prop()
|
|
56
|
-
], ImageMessage.prototype, "message", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
Prop()
|
|
59
|
-
], ImageMessage.prototype, "height", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
Prop()
|
|
62
|
-
], ImageMessage.prototype, "width", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
Prop()
|
|
65
|
-
], ImageMessage.prototype, "time", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
Prop()
|
|
68
|
-
], ImageMessage.prototype, "isRead", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
Prop()
|
|
71
|
-
], ImageMessage.prototype, "isSelf", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
Prop()
|
|
74
|
-
], ImageMessage.prototype, "isDelivered", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
Prop()
|
|
77
|
-
], ImageMessage.prototype, "textColor", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
Prop()
|
|
80
|
-
], ImageMessage.prototype, "allAttachments", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
Prop()
|
|
83
|
-
], ImageMessage.prototype, "isMediaGalleryOpen", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
Prop()
|
|
86
|
-
], ImageMessage.prototype, "onImageClick", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
Prop()
|
|
89
|
-
], ImageMessage.prototype, "mentionedUsers", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
Prop()
|
|
92
|
-
], ImageMessage.prototype, "totalMedia", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
Prop()
|
|
95
|
-
], ImageMessage.prototype, "mediaType", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
Prop()
|
|
98
|
-
], ImageMessage.prototype, "loadingMediaGallery", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
Prop()
|
|
101
|
-
], ImageMessage.prototype, "messageId", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
Prop()
|
|
104
|
-
], ImageMessage.prototype, "reactions", void 0);
|
|
105
|
-
__decorate([
|
|
106
|
-
Prop()
|
|
107
|
-
], ImageMessage.prototype, "userMetaData", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
Prop()
|
|
110
|
-
], ImageMessage.prototype, "messageType", void 0);
|
|
111
|
-
__decorate([
|
|
112
|
-
Prop()
|
|
113
|
-
], ImageMessage.prototype, "timeColor", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
Prop()
|
|
116
|
-
], ImageMessage.prototype, "showReactionOnHover", void 0);
|
|
117
|
-
__decorate([
|
|
118
|
-
Prop()
|
|
119
|
-
], ImageMessage.prototype, "borderWidth", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
Prop()
|
|
122
|
-
], ImageMessage.prototype, "borderColor", void 0);
|
|
123
|
-
__decorate([
|
|
124
|
-
Prop()
|
|
125
|
-
], ImageMessage.prototype, "borderStyle", void 0);
|
|
126
|
-
__decorate([
|
|
127
|
-
State()
|
|
128
|
-
], ImageMessage.prototype, "galleryOpen", void 0);
|
|
129
|
-
__decorate([
|
|
130
|
-
Event({ eventName: 'tagUserClick', bubbles: true, composed: true })
|
|
131
|
-
], ImageMessage.prototype, "tagUserClick", void 0);
|
|
132
|
-
ImageMessage = __decorate([
|
|
133
|
-
Component({
|
|
134
|
-
tag: 'image-message',
|
|
135
|
-
shadow: true,
|
|
136
|
-
styles: `
|
|
137
|
-
:host { display: block; }
|
|
138
|
-
.image-container { cursor: pointer; overflow: hidden; position: relative; }
|
|
139
|
-
.image-container img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
|
140
|
-
.mediaCount {
|
|
141
|
-
position: absolute; right: 8px; bottom: 8px;
|
|
142
|
-
background: rgba(0,0,0,0.55); color: #fff; padding: 2px 6px; border-radius: 8px; font-size: 12px;
|
|
143
|
-
}
|
|
144
|
-
.gallery-overlay {
|
|
145
|
-
position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 9999;
|
|
146
|
-
display: flex; align-items: center; justify-content: center;
|
|
147
|
-
}
|
|
148
|
-
.gallery-overlay img { max-width: 90vw; max-height: 90vh; object-fit: contain; }
|
|
149
|
-
.gallery-close {
|
|
150
|
-
position: absolute; top: 16px; right: 16px; color: #fff; font-size: 28px;
|
|
151
|
-
background: transparent; border: none; cursor: pointer;
|
|
152
|
-
}
|
|
153
|
-
`,
|
|
154
|
-
})
|
|
155
|
-
], ImageMessage);
|
|
156
|
-
export { ImageMessage };
|
|
@@ -1,98 +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 IncomingTextMessageBubble = class IncomingTextMessageBubble {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.bgColor = '#EFF1FA';
|
|
13
|
-
this.borderRadius = '7px';
|
|
14
|
-
this.padding = '10px';
|
|
15
|
-
this.textContent = '';
|
|
16
|
-
this.mentionedUsers = [];
|
|
17
|
-
this.reactions = {};
|
|
18
|
-
this.timeColor = 'var(--text-secondary-color)';
|
|
19
|
-
this.showReactionOnHover = false;
|
|
20
|
-
}
|
|
21
|
-
render() {
|
|
22
|
-
return (h("message-bubble", { isSelf: false, time: this.time, timeColor: this.timeColor, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, isForwarded: this.messageType === 1, backgroundColor: this.bgColor || '#EFF1FA', borderRadius: this.borderRadius || '7px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover },
|
|
23
|
-
h("div", { style: { fontFamily: this.fontFamily, color: this.color, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, renderMessageBody(this.textContent, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), false))));
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
__decorate([
|
|
27
|
-
Prop()
|
|
28
|
-
], IncomingTextMessageBubble.prototype, "bgColor", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
Prop()
|
|
31
|
-
], IncomingTextMessageBubble.prototype, "borderWidth", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
Prop()
|
|
34
|
-
], IncomingTextMessageBubble.prototype, "borderColor", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
Prop()
|
|
37
|
-
], IncomingTextMessageBubble.prototype, "borderStyle", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
Prop()
|
|
40
|
-
], IncomingTextMessageBubble.prototype, "borderRadius", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
Prop()
|
|
43
|
-
], IncomingTextMessageBubble.prototype, "padding", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
Prop()
|
|
46
|
-
], IncomingTextMessageBubble.prototype, "height", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
Prop()
|
|
49
|
-
], IncomingTextMessageBubble.prototype, "width", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
Prop()
|
|
52
|
-
], IncomingTextMessageBubble.prototype, "time", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
Prop()
|
|
55
|
-
], IncomingTextMessageBubble.prototype, "textContent", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
Prop()
|
|
58
|
-
], IncomingTextMessageBubble.prototype, "alignSelf", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
Prop()
|
|
61
|
-
], IncomingTextMessageBubble.prototype, "fontFamily", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
Prop()
|
|
64
|
-
], IncomingTextMessageBubble.prototype, "color", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
Prop()
|
|
67
|
-
], IncomingTextMessageBubble.prototype, "mentionedUsers", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
Prop()
|
|
70
|
-
], IncomingTextMessageBubble.prototype, "reactions", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
Prop()
|
|
73
|
-
], IncomingTextMessageBubble.prototype, "messageId", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
Prop()
|
|
76
|
-
], IncomingTextMessageBubble.prototype, "userMetaData", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
Prop()
|
|
79
|
-
], IncomingTextMessageBubble.prototype, "messageType", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
Prop()
|
|
82
|
-
], IncomingTextMessageBubble.prototype, "timeColor", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
Prop()
|
|
85
|
-
], IncomingTextMessageBubble.prototype, "showReactionOnHover", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
Event({ eventName: 'tagUserClick', bubbles: true, composed: true })
|
|
88
|
-
], IncomingTextMessageBubble.prototype, "tagUserClick", void 0);
|
|
89
|
-
IncomingTextMessageBubble = __decorate([
|
|
90
|
-
Component({
|
|
91
|
-
tag: 'incoming-text-message-bubble',
|
|
92
|
-
shadow: true,
|
|
93
|
-
styles: `
|
|
94
|
-
:host { display: block; max-width: 80%; margin-left: 10px; }
|
|
95
|
-
`,
|
|
96
|
-
})
|
|
97
|
-
], IncomingTextMessageBubble);
|
|
98
|
-
export { IncomingTextMessageBubble };
|
|
@@ -1,125 +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
|
-
/** Link / URL preview bubble — Stencil (simplified from Lit link-preview-ui). */
|
|
11
|
-
let LinkPreview = class LinkPreview {
|
|
12
|
-
constructor() {
|
|
13
|
-
this.url = '';
|
|
14
|
-
this.mentionedUsers = [];
|
|
15
|
-
this.isShowFooter = true;
|
|
16
|
-
this.reactions = {};
|
|
17
|
-
this.showReactionOnHover = false;
|
|
18
|
-
this.openUrl = () => {
|
|
19
|
-
if (this.url)
|
|
20
|
-
window.open(this.url, '_blank', 'noopener,noreferrer');
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
const p = this.preview || {};
|
|
25
|
-
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.backgroundColor, showReactionOnHover: this.showReactionOnHover },
|
|
26
|
-
(p.title || p.image || p.description) && (h("div", { class: "preview-card", onClick: this.openUrl },
|
|
27
|
-
p.image ? h("img", { src: p.image, alt: "" }) : null,
|
|
28
|
-
h("div", { class: "preview-meta" },
|
|
29
|
-
p.title ? h("div", { class: "preview-title" }, p.title) : null,
|
|
30
|
-
p.description ? h("div", { class: "preview-desc" }, p.description) : null,
|
|
31
|
-
h("div", { class: "preview-url" }, this.url || p.url)))),
|
|
32
|
-
h("div", { style: { color: this.textColor, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, renderMessageBody(this.message || this.url, this.mentionedUsers, u => emitTagUser(this.tagUserClick, u), !!this.isSelf))));
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
__decorate([
|
|
36
|
-
Prop()
|
|
37
|
-
], LinkPreview.prototype, "url", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
Prop()
|
|
40
|
-
], LinkPreview.prototype, "isRead", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
Prop()
|
|
43
|
-
], LinkPreview.prototype, "isDelivered", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
Prop()
|
|
46
|
-
], LinkPreview.prototype, "time", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
Prop()
|
|
49
|
-
], LinkPreview.prototype, "textColor", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
Prop()
|
|
52
|
-
], LinkPreview.prototype, "message", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
Prop()
|
|
55
|
-
], LinkPreview.prototype, "backgroundColor", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
Prop()
|
|
58
|
-
], LinkPreview.prototype, "isSelf", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
Prop()
|
|
61
|
-
], LinkPreview.prototype, "mentionedUsers", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
Prop()
|
|
64
|
-
], LinkPreview.prototype, "preview", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
Prop()
|
|
67
|
-
], LinkPreview.prototype, "isMessageInfo", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
Prop()
|
|
70
|
-
], LinkPreview.prototype, "isShowFooter", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
Prop()
|
|
73
|
-
], LinkPreview.prototype, "showReactionButton", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
Prop()
|
|
76
|
-
], LinkPreview.prototype, "showEmojiReactions", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
Prop()
|
|
79
|
-
], LinkPreview.prototype, "messageId", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
Prop()
|
|
82
|
-
], LinkPreview.prototype, "reactions", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
Prop()
|
|
85
|
-
], LinkPreview.prototype, "showConfirmationPopup", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
Prop()
|
|
88
|
-
], LinkPreview.prototype, "selectedEmojiToRemove", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
Prop()
|
|
91
|
-
], LinkPreview.prototype, "showAllReactionsPopup", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
Prop()
|
|
94
|
-
], LinkPreview.prototype, "userMetaData", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
Prop()
|
|
97
|
-
], LinkPreview.prototype, "messageType", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
Prop()
|
|
100
|
-
], LinkPreview.prototype, "timeColor", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
Prop()
|
|
103
|
-
], LinkPreview.prototype, "showReactionOnHover", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
Event({ eventName: 'tagUserClick', bubbles: true, composed: true })
|
|
106
|
-
], LinkPreview.prototype, "tagUserClick", void 0);
|
|
107
|
-
LinkPreview = __decorate([
|
|
108
|
-
Component({
|
|
109
|
-
tag: 'link-preview',
|
|
110
|
-
shadow: true,
|
|
111
|
-
styles: `
|
|
112
|
-
:host { display: block; }
|
|
113
|
-
.preview-card {
|
|
114
|
-
display: flex; gap: 8px; border-radius: 8px; overflow: hidden;
|
|
115
|
-
background: var(--bg-primary-light, #f0f0f0); cursor: pointer; margin-bottom: 6px;
|
|
116
|
-
}
|
|
117
|
-
.preview-card img { width: 72px; height: 72px; object-fit: cover; flex-shrink: 0; }
|
|
118
|
-
.preview-meta { padding: 8px; min-width: 0; }
|
|
119
|
-
.preview-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
120
|
-
.preview-desc { font-size: 12px; opacity: 0.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
121
|
-
.preview-url { font-size: 11px; opacity: 0.6; margin-top: 2px; }
|
|
122
|
-
`,
|
|
123
|
-
})
|
|
124
|
-
], LinkPreview);
|
|
125
|
-
export { LinkPreview };
|
|
@@ -1,152 +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, Element, Prop, State, h, Event } from '@stencil/core';
|
|
8
|
-
import { getCustomPartTag } from '../../../lib/custom-ui';
|
|
9
|
-
import './spinner-loader';
|
|
10
|
-
let MediaGallery = class MediaGallery {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.allAttachments = [];
|
|
13
|
-
this.mainImageIndex = 0;
|
|
14
|
-
this.loadingMediaGallery = false;
|
|
15
|
-
this.zoomLevel = 1;
|
|
16
|
-
this.index = 0;
|
|
17
|
-
}
|
|
18
|
-
componentWillLoad() {
|
|
19
|
-
this.index = this.mainImageIndex || 0;
|
|
20
|
-
}
|
|
21
|
-
attachments() {
|
|
22
|
-
return Array.isArray(this.allAttachments) ? this.allAttachments : [];
|
|
23
|
-
}
|
|
24
|
-
current() {
|
|
25
|
-
const list = this.attachments();
|
|
26
|
-
return list[this.index] || list[0];
|
|
27
|
-
}
|
|
28
|
-
urlOf(item) {
|
|
29
|
-
return (item === null || item === void 0 ? void 0 : item.mediaUrl) || (item === null || item === void 0 ? void 0 : item.thumbnailUrl) || (item === null || item === void 0 ? void 0 : item.url) || '';
|
|
30
|
-
}
|
|
31
|
-
isVideo(item) {
|
|
32
|
-
const mime = (item === null || item === void 0 ? void 0 : item.mimeType) || '';
|
|
33
|
-
return mime.startsWith('video/') || (item === null || item === void 0 ? void 0 : item.mediaType) === 1;
|
|
34
|
-
}
|
|
35
|
-
setIndex(i) {
|
|
36
|
-
const list = this.attachments();
|
|
37
|
-
if (!list.length)
|
|
38
|
-
return;
|
|
39
|
-
this.index = ((i % list.length) + list.length) % list.length;
|
|
40
|
-
this.mainImageIndex = this.index;
|
|
41
|
-
}
|
|
42
|
-
close() {
|
|
43
|
-
this.closeGallery.emit();
|
|
44
|
-
this.dispatchEventSafe('close-right-Sidebar', { type: 'close-right-Sidebar' });
|
|
45
|
-
}
|
|
46
|
-
dispatchEventSafe(name, detail) {
|
|
47
|
-
this.el.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));
|
|
48
|
-
}
|
|
49
|
-
render() {
|
|
50
|
-
const tag = getCustomPartTag('mediaGallery', this.el);
|
|
51
|
-
if (tag) {
|
|
52
|
-
return h(tag, {
|
|
53
|
-
allAttachments: this.allAttachments,
|
|
54
|
-
mainImageIndex: this.mainImageIndex,
|
|
55
|
-
topbarBgColor: this.topbarBgColor,
|
|
56
|
-
iconColor: this.iconColor,
|
|
57
|
-
galleryImageSize: this.galleryImageSize,
|
|
58
|
-
isZoomed: this.isZoomed,
|
|
59
|
-
loadingMediaGallery: this.loadingMediaGallery,
|
|
60
|
-
zoomLevel: this.zoomLevel,
|
|
61
|
-
isSharePopupOpen: this.isSharePopupOpen,
|
|
62
|
-
shareLink: this.shareLink,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
const list = this.attachments();
|
|
66
|
-
const cur = this.current();
|
|
67
|
-
const zoom = this.zoomLevel || 1;
|
|
68
|
-
return (h("div", { class: "media-gallery-container" },
|
|
69
|
-
h("div", { class: "topbar", style: { backgroundColor: this.topbarBgColor || undefined } },
|
|
70
|
-
h("button", { class: "icon", type: "button", style: { color: this.iconColor }, onClick: () => (this.zoomLevel = Math.min(3, zoom + 0.25)) }, "+"),
|
|
71
|
-
h("button", { class: "icon", type: "button", style: { color: this.iconColor }, onClick: () => (this.zoomLevel = Math.max(1, zoom - 0.25)) }, "\u2212"),
|
|
72
|
-
h("button", { class: "icon", type: "button", style: { color: this.iconColor }, onClick: () => this.close() }, "\u2715")),
|
|
73
|
-
this.loadingMediaGallery ? (h("div", { class: "empty" },
|
|
74
|
-
h("spinner-loader", { height: "30px", width: "30px" }))) : !list.length || !cur ? (h("div", { class: "empty" }, "No media")) : (h("div", { class: "main" },
|
|
75
|
-
list.length > 1 ? (h("button", { class: "nav prev", type: "button", onClick: () => this.setIndex(this.index - 1) }, "\u2039")) : null,
|
|
76
|
-
this.isVideo(cur) ? (h("video", { src: this.urlOf(cur), controls: true, style: { transform: `scale(${zoom})` } })) : (h("img", { src: this.urlOf(cur), alt: "", style: { transform: `scale(${zoom})` } })),
|
|
77
|
-
list.length > 1 ? (h("button", { class: "nav next", type: "button", onClick: () => this.setIndex(this.index + 1) }, "\u203A")) : null)),
|
|
78
|
-
list.length > 1 ? (h("div", { class: "thumbs" }, list.map((item, i) => (h("img", { class: `thumb ${i === this.index ? 'active' : ''}`, src: item.thumbnailUrl || this.urlOf(item), alt: "", onClick: () => this.setIndex(i) }))))) : null));
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
__decorate([
|
|
82
|
-
Element()
|
|
83
|
-
], MediaGallery.prototype, "el", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
Prop()
|
|
86
|
-
], MediaGallery.prototype, "allAttachments", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
Prop({ mutable: true })
|
|
89
|
-
], MediaGallery.prototype, "mainImageIndex", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
Prop()
|
|
92
|
-
], MediaGallery.prototype, "topbarBgColor", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
Prop()
|
|
95
|
-
], MediaGallery.prototype, "iconColor", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
Prop()
|
|
98
|
-
], MediaGallery.prototype, "galleryImageSize", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
Prop()
|
|
101
|
-
], MediaGallery.prototype, "isZoomed", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
Prop()
|
|
104
|
-
], MediaGallery.prototype, "loadingMediaGallery", void 0);
|
|
105
|
-
__decorate([
|
|
106
|
-
Prop({ mutable: true })
|
|
107
|
-
], MediaGallery.prototype, "zoomLevel", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
Prop()
|
|
110
|
-
], MediaGallery.prototype, "isSharePopupOpen", void 0);
|
|
111
|
-
__decorate([
|
|
112
|
-
Prop()
|
|
113
|
-
], MediaGallery.prototype, "shareLink", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
State()
|
|
116
|
-
], MediaGallery.prototype, "index", void 0);
|
|
117
|
-
__decorate([
|
|
118
|
-
Event({ eventName: 'close-gallery', bubbles: true, composed: true })
|
|
119
|
-
], MediaGallery.prototype, "closeGallery", void 0);
|
|
120
|
-
MediaGallery = __decorate([
|
|
121
|
-
Component({
|
|
122
|
-
tag: 'media-gallery',
|
|
123
|
-
shadow: true,
|
|
124
|
-
styles: `
|
|
125
|
-
:host { display: block; height: 100%; width: 100%; }
|
|
126
|
-
.media-gallery-container { width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--bg-primary-color); color: var(--text-primary-color); }
|
|
127
|
-
.topbar { display: flex; justify-content: flex-end; background: var(--bg-secondary-color); padding: 10px; gap: 12px; }
|
|
128
|
-
.icon { cursor: pointer; color: var(--text-primary-color); background: none; border: none; font-size: 18px; }
|
|
129
|
-
.main {
|
|
130
|
-
flex: 1; display: flex; align-items: center; justify-content: center; position: relative;
|
|
131
|
-
background: var(--bg-primary-color); overflow: hidden; min-height: 200px;
|
|
132
|
-
}
|
|
133
|
-
.main img, .main video { max-width: 100%; max-height: 100%; object-fit: contain; }
|
|
134
|
-
.nav {
|
|
135
|
-
position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4);
|
|
136
|
-
color: #fff; border: none; border-radius: 50%; width: 36px; height: 36px; cursor: pointer;
|
|
137
|
-
}
|
|
138
|
-
.nav.prev { left: 12px; }
|
|
139
|
-
.nav.next { right: 12px; }
|
|
140
|
-
.thumbs {
|
|
141
|
-
display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: var(--bg-secondary-color);
|
|
142
|
-
}
|
|
143
|
-
.thumb {
|
|
144
|
-
width: 64px; height: 64px; border-radius: 6px; object-fit: cover; cursor: pointer;
|
|
145
|
-
border: 2px solid transparent; flex-shrink: 0; background: var(--bg-primary-light);
|
|
146
|
-
}
|
|
147
|
-
.thumb.active { border-color: var(--base-color, #4A76FD); }
|
|
148
|
-
.empty { padding: 40px; text-align: center; opacity: 0.7; }
|
|
149
|
-
`,
|
|
150
|
-
})
|
|
151
|
-
], MediaGallery);
|
|
152
|
-
export { MediaGallery };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { h } from '@stencil/core';
|
|
2
|
-
import { parseMessageBodySegments } from '../../../lib/message-body-segments';
|
|
3
|
-
/** Render mention/link body segments as Stencil VNodes. */
|
|
4
|
-
export function renderMessageBody(text, mentionedUsers, onMention, isSelf = false) {
|
|
5
|
-
const segments = parseMessageBodySegments(text || '', mentionedUsers || []);
|
|
6
|
-
const mentionColor = isSelf ? 'var(--text-outgoing-message)' : 'var(--text-incoming-message)';
|
|
7
|
-
return segments.map((segment, i) => {
|
|
8
|
-
if (segment.type === 'mention') {
|
|
9
|
-
return (h("span", { key: i, style: { fontWeight: 'bold', cursor: 'pointer', color: mentionColor }, onClick: () => onMention(segment.user) }, segment.content));
|
|
10
|
-
}
|
|
11
|
-
if (segment.type === 'link') {
|
|
12
|
-
return (h("a", { key: i, href: segment.url, target: "_blank", rel: "noopener noreferrer", style: { color: mentionColor } }, segment.content));
|
|
13
|
-
}
|
|
14
|
-
return h("span", { key: i }, segment.content);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
export function emitTagUser(emitter, user) {
|
|
18
|
-
emitter.emit({ userId: user === null || user === void 0 ? void 0 : user.userId, userName: user === null || user === void 0 ? void 0 : user.userName });
|
|
19
|
-
}
|