react-pro-messenger 1.0.27 → 1.0.28

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.
@@ -2,7 +2,7 @@
2
2
  import { SymbolAssignmentInterface } from "../../ts/interfaces";
3
3
  declare const ChatInput: ({ onSendMessage, onSendVoice, onImageSend, onVideoSend, onFileSend, dynamicSymbolAssignments, }: {
4
4
  onSendMessage: (newMessage: string) => void;
5
- onSendVoice: (voiceBlobUrl: string) => void;
5
+ onSendVoice: (voiceBlobUrl: Blob) => void;
6
6
  onFileSend: (blob: Blob) => void;
7
7
  onImageSend: (blob: Blob) => void;
8
8
  onVideoSend: (blob: Blob) => void;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { AttachmentTypeEnum } from "../../ts/enum";
3
3
  interface MediaProps {
4
- attachment: string;
4
+ attachmentUrl: string;
5
5
  attachmentType?: AttachmentTypeEnum;
6
6
  attachmentFormat?: string;
7
7
  }
8
- declare const Media: ({ attachment, attachmentType, attachmentFormat, }: MediaProps) => JSX.Element | null;
8
+ declare const Media: ({ attachmentUrl, attachmentType, attachmentFormat, }: MediaProps) => JSX.Element | null;
9
9
  export default Media;
@@ -4,7 +4,8 @@ export declare class MessageEntity {
4
4
  id: string;
5
5
  text: string;
6
6
  createdDate: string;
7
- attachment: undefined | string;
7
+ attachmentUrl: undefined | string;
8
+ attachmentBlob: Blob | undefined;
8
9
  attachmentType: AttachmentTypeEnum | undefined;
9
10
  attachmentFormat: string | undefined;
10
11
  user: UserInterface;
@@ -17,13 +18,14 @@ export declare class MessageEntity {
17
18
  };
18
19
  } | undefined;
19
20
  isSending?: boolean;
20
- constructor({ id, text, createdDate, attachment, attachmentType, attachmentFormat, user, isRightSided, symbols, isSending, }: {
21
+ constructor({ id, text, createdDate, attachmentUrl, attachmentType, attachmentFormat, attachmentBlob, user, isRightSided, symbols, isSending, }: {
21
22
  id: string;
22
23
  text: string;
23
24
  createdDate: string;
24
- attachment?: string;
25
+ attachmentUrl?: string;
25
26
  attachmentType?: AttachmentTypeEnum;
26
27
  attachmentFormat?: string;
28
+ attachmentBlob?: Blob;
27
29
  user: UserInterface;
28
30
  isRightSided?: boolean;
29
31
  symbols?: {
@@ -15,7 +15,7 @@ declare const Logic: ({ user, messages, updateMessages, onMessageSent, onEditMes
15
15
  handleCloseContextMenu: () => void;
16
16
  contextMenuItems: ContextMenuItem[];
17
17
  handleSendFile: (file: Blob, type: AttachmentTypeEnum) => void;
18
- handleSendVoice: (voiceBlobUrl: string) => void;
18
+ handleSendVoice: (voiceBlob: Blob) => void;
19
19
  handleSendMessage: (text: string) => void;
20
20
  handleContextMenu: (event: React.MouseEvent, message: MessageEntity) => void;
21
21
  isModalOpen: boolean;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "react-pro-messenger",
3
3
  "description": "Telegram-style chat component for React",
4
4
  "private": false,
5
- "version": "1.0.27",
5
+ "version": "1.0.28",
6
6
  "type": "module",
7
7
  "main": "dist/index.umd.js",
8
8
  "module": "dist/index.es.js",