isometrik-plugin-chat-sdk 2.0.19 → 2.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-170f9e71.js → app-globals-2824b330.js} +3 -3
- package/dist/cjs/{app-globals-170f9e71.js.map → app-globals-2824b330.js.map} +1 -1
- package/dist/cjs/attachment-preview_22.cjs.entry.js +114 -141
- 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-686620e7.js → chat-assets-8c4dc04f.js} +22 -3
- package/dist/cjs/chat-assets-8c4dc04f.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/{groupcast-4239cbfc.js → groupcast-8441b4df.js} +2 -2
- package/dist/cjs/{groupcast-4239cbfc.js.map → groupcast-8441b4df.js.map} +1 -1
- package/dist/cjs/{groupcast-3cb44a25.js → groupcast-f24da720.js} +14 -4
- package/dist/cjs/groupcast-f24da720.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/isometrik-webchat.cjs.js +6 -6
- package/dist/cjs/loader.cjs.js +6 -6
- package/dist/cjs/login-page_3.cjs.entry.js +7 -7
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/cjs/member-add.cjs.entry.js +2 -2
- package/dist/cjs/new-chat-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/{runtime-controls-99f378d4.js → runtime-controls-cfc8fc31.js} +3 -3
- package/dist/cjs/{runtime-controls-99f378d4.js.map → runtime-controls-cfc8fc31.js.map} +1 -1
- package/dist/cjs/send-media-4ee967d4.js +1194 -0
- package/dist/cjs/send-media-4ee967d4.js.map +1 -0
- package/dist/collection/api/groupcast.js +13 -3
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +102 -100
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +25 -47
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/GroupCast/GroupCast.js +3 -16
- package/dist/collection/components/ChatUIComponent/shared/GroupCast/GroupCast.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-info/message-info.js +10 -4
- package/dist/collection/components/ChatUIComponent/shared/message-info/message-info.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/public-send.js +4 -4
- package/dist/collection/components/my-component/web-chat/public-send.js.map +1 -1
- package/dist/collection/constants/chat-assets.js +21 -2
- package/dist/collection/lib/chat/document-thumbnail.js +433 -0
- package/dist/collection/lib/chat/document-thumbnail.js.map +1 -0
- package/dist/collection/lib/chat/index.js +1 -1
- package/dist/collection/lib/chat/index.js.map +1 -1
- package/dist/collection/lib/chat/send-media.js +348 -25
- package/dist/collection/lib/chat/send-media.js.map +1 -1
- package/dist/components/ChatFooter.js +25 -47
- package/dist/components/ChatFooter.js.map +1 -1
- package/dist/components/ChatSidebar.js +78 -73
- package/dist/components/ChatSidebar.js.map +1 -1
- package/dist/components/GroupCast2.js +3 -16
- package/dist/components/GroupCast2.js.map +1 -1
- package/dist/components/WebChat.js +4 -4
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/WebChatBody.js +1 -1
- package/dist/components/chat-assets.js +21 -2
- package/dist/components/chat-assets.js.map +1 -1
- package/dist/components/groupcast.js +13 -3
- package/dist/components/groupcast.js.map +1 -1
- package/dist/components/message-info2.js +10 -4
- package/dist/components/message-info2.js.map +1 -1
- package/dist/components/send-media.js +780 -26
- package/dist/components/send-media.js.map +1 -1
- package/dist/esm/{app-globals-15a6ef50.js → app-globals-e3f4717b.js} +3 -3
- package/dist/esm/{app-globals-15a6ef50.js.map → app-globals-e3f4717b.js.map} +1 -1
- package/dist/esm/attachment-preview_22.entry.js +114 -141
- 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-bb056958.js → chat-assets-27beb552.js} +22 -3
- package/dist/esm/chat-assets-27beb552.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/{groupcast-ea2466c8.js → groupcast-5fb19ec3.js} +2 -2
- package/dist/esm/{groupcast-ea2466c8.js.map → groupcast-5fb19ec3.js.map} +1 -1
- package/dist/esm/{groupcast-cc10c6a4.js → groupcast-f96c1d9e.js} +14 -4
- package/dist/esm/groupcast-f96c1d9e.js.map +1 -0
- package/dist/esm/index.js +5 -5
- package/dist/esm/isometrik-webchat.js +6 -6
- package/dist/esm/loader.js +6 -6
- package/dist/esm/login-page_3.entry.js +7 -7
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/esm/member-add.entry.js +2 -2
- package/dist/esm/new-chat-sidebar.entry.js +1 -1
- package/dist/esm/{runtime-controls-8a22625e.js → runtime-controls-ff81e90a.js} +3 -3
- package/dist/esm/{runtime-controls-8a22625e.js.map → runtime-controls-ff81e90a.js.map} +1 -1
- package/dist/esm/send-media-58e7145b.js +1166 -0
- package/dist/esm/send-media-58e7145b.js.map +1 -0
- package/dist/isometrik-webchat/index.esm.js +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-fd6ce589.entry.js → p-09980c53.entry.js} +2 -2
- package/dist/isometrik-webchat/p-352b589e.entry.js +2 -0
- package/dist/isometrik-webchat/p-352b589e.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-3b3dc33e.js +2 -0
- package/dist/isometrik-webchat/p-3b3dc33e.js.map +1 -0
- package/dist/isometrik-webchat/{p-ffbbe278.entry.js → p-44da28d3.entry.js} +2 -2
- package/dist/isometrik-webchat/p-6f5037b2.js +2 -0
- package/dist/isometrik-webchat/p-6f5037b2.js.map +1 -0
- package/dist/isometrik-webchat/{p-6fc95e0e.js → p-78fb47c4.js} +2 -2
- package/dist/isometrik-webchat/{p-3120b9d3.entry.js → p-a9efcf1c.entry.js} +2 -2
- package/dist/isometrik-webchat/p-b0baa9ad.entry.js +2 -0
- package/dist/isometrik-webchat/p-b0baa9ad.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-c08055fe.js → p-b385ac4b.js} +2 -2
- package/dist/isometrik-webchat/p-c06ad586.js +2 -0
- package/dist/isometrik-webchat/p-c06ad586.js.map +1 -0
- package/dist/isometrik-webchat/p-d758e431.js +2 -0
- package/dist/isometrik-webchat/{p-c49de274.entry.js → p-d864bb9f.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-39b626ed.entry.js → p-f7d05551.entry.js} +2 -2
- package/dist/types/components/ChatUIComponent/ChatSidebar/ChatSidebar.d.ts +3 -2
- package/dist/types/components.d.ts +17 -17
- package/dist/types/js.d.ts +3 -0
- package/dist/types/lib/chat/document-thumbnail.d.ts +38 -0
- package/dist/types/lib/chat/index.d.ts +1 -1
- package/dist/types/lib/chat/send-media.d.ts +58 -1
- package/package.json +1 -1
- package/dist/cjs/chat-assets-686620e7.js.map +0 -1
- package/dist/cjs/groupcast-3cb44a25.js.map +0 -1
- package/dist/cjs/send-media-7c865c19.js +0 -438
- package/dist/cjs/send-media-7c865c19.js.map +0 -1
- package/dist/esm/chat-assets-bb056958.js.map +0 -1
- package/dist/esm/groupcast-cc10c6a4.js.map +0 -1
- package/dist/esm/send-media-5527ee9f.js +0 -412
- package/dist/esm/send-media-5527ee9f.js.map +0 -1
- package/dist/isometrik-webchat/p-1db79cfb.js +0 -2
- package/dist/isometrik-webchat/p-4671fe73.js +0 -2
- package/dist/isometrik-webchat/p-4671fe73.js.map +0 -1
- package/dist/isometrik-webchat/p-643457b8.js +0 -2
- package/dist/isometrik-webchat/p-643457b8.js.map +0 -1
- package/dist/isometrik-webchat/p-a5707f12.js +0 -2
- package/dist/isometrik-webchat/p-a5707f12.js.map +0 -1
- package/dist/isometrik-webchat/p-a9380fb3.entry.js +0 -2
- package/dist/isometrik-webchat/p-a9380fb3.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-fc3fd090.entry.js +0 -2
- package/dist/isometrik-webchat/p-fc3fd090.entry.js.map +0 -1
- /package/dist/isometrik-webchat/{p-fd6ce589.entry.js.map → p-09980c53.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-ffbbe278.entry.js.map → p-44da28d3.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-6fc95e0e.js.map → p-78fb47c4.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-3120b9d3.entry.js.map → p-a9efcf1c.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-c08055fe.js.map → p-b385ac4b.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-1db79cfb.js.map → p-d758e431.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-c49de274.entry.js.map → p-d864bb9f.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-39b626ed.entry.js.map → p-f7d05551.entry.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import { g as getDeviceID, a as getGroupcastUrlQuery } from './helpers.js';
|
|
|
6
6
|
import { d as defineCustomElement$1 } from './reply-block2.js';
|
|
7
7
|
import { s as showToast } from './toast.js';
|
|
8
8
|
import { t as takeMediaFiles, m as mediaLimitToastMessage, M as MAX_MEDIA_PER_MESSAGE } from './media-limits.js';
|
|
9
|
-
import {
|
|
9
|
+
import { p as prepareMediaAttachments, r as resolveCustomTypeForUpload, e as attachmentBodyForOutgoing, b as buildReplyMetaData, f as uploadPresignedMediaAttachment } from './send-media.js';
|
|
10
10
|
import { m as messagePushContextFrom, w as withHostMessagePushFields } from './local-notification.js';
|
|
11
11
|
import { c as getPresignedUrlForGroupcastMedia, p as postGroupCastMessage } from './groupcast.js';
|
|
12
12
|
import { D as Delete, d as Send, A as Attachment, S as Smile, M as Microphone } from './chat-assets.js';
|
|
@@ -532,6 +532,8 @@ const ChatFooter = /*@__PURE__*/ proxyCustomElement(class ChatFooter extends HTM
|
|
|
532
532
|
// Prepare the message details
|
|
533
533
|
const messageDetails = {
|
|
534
534
|
body: localMessage.body,
|
|
535
|
+
customType: localMessage.customType,
|
|
536
|
+
metaData: localMessage.metaData,
|
|
535
537
|
updatedAt: localMessage.sentAt || Date.now(),
|
|
536
538
|
userName: (_a = this.userMetaData) === null || _a === void 0 ? void 0 : _a.userName,
|
|
537
539
|
userProfileImageUrl: ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userProfileImageUrl) || '',
|
|
@@ -685,35 +687,24 @@ const ChatFooter = /*@__PURE__*/ proxyCustomElement(class ChatFooter extends HTM
|
|
|
685
687
|
this.changeMessageSendingState(false);
|
|
686
688
|
return;
|
|
687
689
|
}
|
|
688
|
-
const attachments = files
|
|
689
|
-
nameWithExtension: file.name,
|
|
690
|
-
mediaType: file.type.startsWith('image/') ? 0 : file.type.startsWith('video/') ? 1 : file.type.startsWith('audio/') ? 2 : 3,
|
|
691
|
-
mediaId: String(file.lastModified || Date.now()) + Math.random().toString(36).slice(2, 6),
|
|
692
|
-
mimeType: file.type,
|
|
693
|
-
size: file.size,
|
|
694
|
-
file,
|
|
695
|
-
}));
|
|
690
|
+
const attachments = prepareMediaAttachments(files);
|
|
696
691
|
const localAttachments = this.mediaPreviews
|
|
697
692
|
.filter(p => files.includes(p.file))
|
|
698
693
|
.slice(0, MAX_MEDIA_PER_MESSAGE)
|
|
699
|
-
.map(preview =>
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
? 'AttachmentMessage:Video'
|
|
711
|
-
: files[0].type.startsWith('audio/')
|
|
712
|
-
? 'AttachmentMessage:Audio'
|
|
713
|
-
: 'AttachmentMessage:File'
|
|
714
|
-
: ATTACHMENT_BODY_PLACEHOLDER;
|
|
694
|
+
.map(preview => {
|
|
695
|
+
const prepared = attachments.find(a => a.file === preview.file);
|
|
696
|
+
return {
|
|
697
|
+
name: preview.file.name,
|
|
698
|
+
size: preview.file.size,
|
|
699
|
+
type: preview.type,
|
|
700
|
+
mediaUrl: preview.src,
|
|
701
|
+
mimeType: (prepared === null || prepared === void 0 ? void 0 : prepared.mimeType) || preview.file.type,
|
|
702
|
+
mediaType: prepared === null || prepared === void 0 ? void 0 : prepared.mediaType,
|
|
703
|
+
};
|
|
704
|
+
});
|
|
715
705
|
const caption = ((_a = this.messageBody) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
716
|
-
const
|
|
706
|
+
const customType = resolveCustomTypeForUpload(attachments);
|
|
707
|
+
const localMessage = Object.assign(Object.assign({}, this.createLocalMessage(attachmentBodyForOutgoing(caption, attachments), localAttachments, messageId)), { customType, metaData: buildReplyMetaData(this.replyMessage, caption) });
|
|
717
708
|
try {
|
|
718
709
|
await this.updateConversationListOnMessageSend(localMessage);
|
|
719
710
|
}
|
|
@@ -755,7 +746,7 @@ const ChatFooter = /*@__PURE__*/ proxyCustomElement(class ChatFooter extends HTM
|
|
|
755
746
|
}
|
|
756
747
|
}
|
|
757
748
|
async uploadAndSendMedia(presignedUrls, attachments, conversationId, oldMessageId) {
|
|
758
|
-
var _a, _b
|
|
749
|
+
var _a, _b;
|
|
759
750
|
const allPayloads = [];
|
|
760
751
|
const uploadPromises = presignedUrls.map(async (urlDetails, index) => {
|
|
761
752
|
const attachmentPayload = attachments[index];
|
|
@@ -767,28 +758,15 @@ const ChatFooter = /*@__PURE__*/ proxyCustomElement(class ChatFooter extends HTM
|
|
|
767
758
|
const payload = await uploadPresignedMediaAttachment({
|
|
768
759
|
urlDetails: normalized,
|
|
769
760
|
attachment: attachmentPayload,
|
|
761
|
+
// Groupcast uses a different presign API; the image fallback is conversation-only.
|
|
762
|
+
conversationId: this.isGroupcast ? undefined : conversationId,
|
|
770
763
|
});
|
|
771
764
|
if (payload)
|
|
772
765
|
allPayloads.push(payload);
|
|
773
766
|
});
|
|
774
767
|
await Promise.all(uploadPromises);
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
if ((attachments === null || attachments === void 0 ? void 0 : attachments.length) === 1 && ((_a = attachments[0]) === null || _a === void 0 ? void 0 : _a.mimeType)) {
|
|
778
|
-
if (attachments[0].mimeType.startsWith('image/')) {
|
|
779
|
-
customType = 'AttachmentMessage:Image';
|
|
780
|
-
}
|
|
781
|
-
else if (attachments[0].mimeType.startsWith('video/')) {
|
|
782
|
-
customType = 'AttachmentMessage:Video';
|
|
783
|
-
}
|
|
784
|
-
else if (attachments[0].mimeType.startsWith('audio/')) {
|
|
785
|
-
customType = 'AttachmentMessage:Audio';
|
|
786
|
-
}
|
|
787
|
-
else if (attachments[0].mimeType.startsWith('application/')) {
|
|
788
|
-
customType = 'AttachmentMessage:Doc';
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
const caption = ((_b = this.messageBody) === null || _b === void 0 ? void 0 : _b.trim()) || '';
|
|
768
|
+
const customType = resolveCustomTypeForUpload(attachments);
|
|
769
|
+
const caption = ((_a = this.messageBody) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
792
770
|
const pushContext = messagePushContextFrom({
|
|
793
771
|
userMetaData: this.userMetaData,
|
|
794
772
|
conversation: this.conversationDetails,
|
|
@@ -796,11 +774,11 @@ const ChatFooter = /*@__PURE__*/ proxyCustomElement(class ChatFooter extends HTM
|
|
|
796
774
|
let payload = withHostMessagePushFields({
|
|
797
775
|
showInConversation: true,
|
|
798
776
|
messageType: this.replyMessage ? 2 : 0,
|
|
799
|
-
parentMessageId: (
|
|
777
|
+
parentMessageId: (_b = this.replyMessage) === null || _b === void 0 ? void 0 : _b.messageId,
|
|
800
778
|
encrypted: false,
|
|
801
779
|
conversationId,
|
|
802
780
|
// API rejects empty body; caption text or placeholder. Real caption also in metaData.caption
|
|
803
|
-
body:
|
|
781
|
+
body: attachmentBodyForOutgoing(caption, attachments),
|
|
804
782
|
customType: customType,
|
|
805
783
|
attachments: allPayloads,
|
|
806
784
|
deviceId: this.deviceId,
|
|
@@ -872,7 +850,7 @@ const ChatFooter = /*@__PURE__*/ proxyCustomElement(class ChatFooter extends HTM
|
|
|
872
850
|
const webChat = findWebChatHost(this.el);
|
|
873
851
|
const hasCustomReply = (webChat ? hasNamedSlot(webChat, 'reply-preview') : false) || hasNamedSlot(this.el, 'reply-preview');
|
|
874
852
|
const showAttachment = this.attachmentDetails || this.showCamera;
|
|
875
|
-
return (h(Host, { key: '
|
|
853
|
+
return (h(Host, { key: '6f5ee0cb4fa473754a4aec4c2bdbd25d81901b57', class: { 'attachment-open': !!showAttachment } }, h("div", { key: '822b4da560d9db469a068419bb4b30e47eb6241e', class: "chat-footer-container" }, showAttachment ? (h("slot", { name: "attachment-preview" }, h("attachment-preview", { showCamera: this.showCamera, onClose: this.handleClearAttachment, width: "150px", height: "150px", bgColor: "var(--bg-primary-light)", padding: "3px", margin: "10px 0 0 0", contentType: contentType, content: this.mediaPreviews, onSend: this.handleSendMessage, "onfile-uploaded": this.handleFileUpload, "onattachment-removed": this.handleRemoveAttachment, "oncamera-retake": this.handleCameraRetake, key: this.inputKey, inputValue: this.messageBody, "oninput-change": this.handleInputChange, backgroundColor: "var(--bg-primary-color)", containerBoxShadow: "none", inputFontColor: "var(--text-primary-color)", inputBorderRadius: "10px", conversationDetails: this.conversationDetails, userMetaData: this.userMetaData }))) : (h(Fragment, null, hasCustomReply ? h("slot", { name: "reply-preview" }) : null, h("slot", { name: "composer-input" }, !hasCustomReply && this.replyMessage ? (h("reply-block", { messageBody: (_a = this.replyMessage) === null || _a === void 0 ? void 0 : _a.body, messageInfo: this.replyMessage, senderName: ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userId) === ((_d = (_c = this.replyMessage) === null || _c === void 0 ? void 0 : _c.senderInfo) === null || _d === void 0 ? void 0 : _d.userId)
|
|
876
854
|
? 'You'
|
|
877
855
|
: (_f = (_e = this.replyMessage) === null || _e === void 0 ? void 0 : _e.senderInfo) === null || _f === void 0 ? void 0 : _f.userName, onIconClick: this.handleremoveReplyMessage })) : null, h("div", { class: "composer-wrap", key: this.inputKey, ref: el => (this.composerWrapRef = el) }, this.showEmojiPicker ? (h("div", { class: "emoji-panel", style: this.emojiPanelStyle }, h("div", { class: "emoji-panel-header" }, h("span", null, "Emoji"), h("button", { class: "emoji-panel-close", type: "button", "aria-label": "Close", onClick: this.handleEmojiToggle }, "\u00D7")), h("emoji-picker", { class: "emoji-picker light", ref: this.bindEmojiPicker }))) : null, h("div", { class: { composer: true, recording: this.isRecording } }, this.isRecording ? (h("div", { class: "rec-body" }, h("div", { class: "rec-left" }, h("button", { class: "rec-icon-btn danger", type: "button", title: "Delete recording", "aria-label": "Delete recording", onClick: this.handleRecDelete }, h("img", { class: "theme-icon", src: Delete, alt: "" })), h("div", { class: "rec-timer-wrap" }, h("span", { class: { 'rec-dot': true, live: !this.isPaused } }), h("span", { class: "rec-timer" }, this.formatRecTime(this.recordingSeconds)))), h("div", { class: "rec-wave" }, h("audio-bubble", { liveRecord: true, audioProgressColor: "#2563eb", audioWaveColor: "#2563eb", ref: el => (this.recBubble = el), onRecordingProgress: this.onRecordingProgress, onRecordingError: this.onRecordingError })), h("button", { class: { 'rec-icon-btn': true, 'rec-toggle': true, pause: !this.isPaused }, type: "button", title: this.isPaused ? 'Resume recording' : 'Pause recording', "aria-label": this.isPaused ? 'Resume recording' : 'Pause recording', onClick: this.handleRecPauseToggle }, h("img", { class: "theme-icon", src: this.isPaused ? PlayIcon : PauseIcon, alt: "" })), h("button", { class: "rec-send", type: "button", title: "Send voice note", "aria-label": "Send voice note", onClick: this.handleRecSend }, h("img", { src: Send, alt: "" })))) : (h(Fragment, null, h("div", { class: "attach-wrap" }, h("button", { class: "icon-btn", type: "button", title: "Attach file", "aria-label": "Attach", onClick: this.handleAttachClick }, h("img", { src: Attachment, alt: "" })), this.showAttachMenu ? (h("div", { class: "attach-menu", style: this.attachMenuStyle }, h("button", { class: "attach-opt", type: "button", onClick: this.pickDocument }, h("span", { class: "attach-opt-icon attach-opt-icon--doc" }, h("img", { src: DocumentsIcon, alt: "" })), h("span", null, "Document")), h("button", { class: "attach-opt", type: "button", onClick: this.pickPhotos }, h("span", { class: "attach-opt-icon attach-opt-icon--photos" }, h("img", { class: "theme-icon", src: PhotosIcon, alt: "" })), h("span", null, "Photos & videos")), h("button", { class: "attach-opt", type: "button", onClick: this.pickCamera }, h("span", { class: "attach-opt-icon attach-opt-icon--camera" }, h("img", { class: "theme-icon", src: CameraIcon, alt: "" })), h("span", null, "Camera")))) : null), h("button", { class: "icon-btn", type: "button", title: "Emojis", "aria-label": "Emojis", onClick: this.handleEmojiToggle }, h("img", { src: Smile, alt: "" })), h("input", { class: "file-input", type: "file", multiple: true, accept: ".jpg,.jpeg,.png,.gif,.webp,.bmp,.heic,.mp4,.mov,.webm,.mkv,.mp3,.wav,.m4a,.aac,.ogg", ref: el => (this.mediaInputRef = el), onChange: this.handleNativeFileChange }), h("input", { class: "file-input", type: "file", multiple: true, accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,.rtf,application/*", ref: el => (this.docInputRef = el), onChange: this.handleNativeFileChange }), h("textarea", { class: "composer-input", rows: 1, placeholder: "Type a message", value: this.messageBody, ref: el => (this.inputRef = el), onInput: this.handleComposerInput, onKeyDown: this.handleComposerKeyDown }), this.messageBody.trim() ? (h("button", { class: "icon-btn", type: "button", title: "Send", "aria-label": "Send", onClick: this.handleSendMessage }, h("img", { src: Send, alt: "" }))) : (h("button", { class: "icon-btn", type: "button", title: "Voice note", "aria-label": "Voice note", onClick: this.handleMicClick }, h("img", { src: Microphone, alt: "" })))))))))))));
|
|
878
856
|
}
|