@azure/communication-react 1.10.1-alpha-202311290014 → 1.11.0-alpha-202312020013
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/communication-react.d.ts +79 -75
- package/dist/dist-cjs/communication-react/index.js +82 -56
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.d.ts +37 -0
- package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.js +21 -0
- package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.js.map +1 -0
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +3 -2
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +3 -2
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -2
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +23 -17
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -2
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +12 -12
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +8 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +6 -6
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +36 -37
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +6 -5
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -5
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +9 -3
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +5 -6
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +4 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +1 -3
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +5 -5
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUpload.d.ts +11 -11
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUpload.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +2 -2
- package/package.json +3 -3
@@ -238,7 +238,7 @@ export declare type AreParamEqual<A extends (props: any) => JSX.Element | undefi
|
|
238
238
|
export declare type AreTypeEqual<A, B> = A extends B ? (B extends A ? true : false) : false;
|
239
239
|
|
240
240
|
/**
|
241
|
-
*
|
241
|
+
* Metadata of the attachment object returned by the ACS SDK.
|
242
242
|
* @beta
|
243
243
|
*/
|
244
244
|
export declare interface AttachmentDownloadResult {
|
@@ -246,6 +246,12 @@ export declare interface AttachmentDownloadResult {
|
|
246
246
|
blobUrl: string;
|
247
247
|
}
|
248
248
|
|
249
|
+
/**
|
250
|
+
* Metadata containing information about the uploaded file.
|
251
|
+
* @beta
|
252
|
+
*/
|
253
|
+
export declare type AttachmentMetadata = FileMetadata | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ InlineImageMetadata;
|
254
|
+
|
249
255
|
/**
|
250
256
|
* Custom data attributes for displaying avatar for a user.
|
251
257
|
*
|
@@ -425,36 +431,6 @@ export declare interface BaseCustomStyles {
|
|
425
431
|
root?: IStyle;
|
426
432
|
}
|
427
433
|
|
428
|
-
/**
|
429
|
-
* Base interface that all Meta Data should extend.
|
430
|
-
* Typically used for ACS to ACS file transfers.
|
431
|
-
* @beta
|
432
|
-
*/
|
433
|
-
export declare interface BaseFileMetadata {
|
434
|
-
/**
|
435
|
-
* File name to be displayed.
|
436
|
-
*/
|
437
|
-
name: string;
|
438
|
-
/**
|
439
|
-
* Extension is used for rendering the file icon.
|
440
|
-
* An unknown extension will be rendered as a generic icon.
|
441
|
-
* Example: `jpeg`
|
442
|
-
*/
|
443
|
-
extension: string;
|
444
|
-
/**
|
445
|
-
* Download URL for the file.
|
446
|
-
*/
|
447
|
-
url: string;
|
448
|
-
/**
|
449
|
-
* Unique ID of the file.
|
450
|
-
*/
|
451
|
-
id: string;
|
452
|
-
/**
|
453
|
-
* Attachment Type
|
454
|
-
*/
|
455
|
-
attachmentType: FileMetadataAttachmentType;
|
456
|
-
}
|
457
|
-
|
458
434
|
/**
|
459
435
|
* Content blocked message type.
|
460
436
|
*
|
@@ -2862,7 +2838,7 @@ export declare interface CallWithChatAdapterManagement {
|
|
2862
2838
|
/** @beta */
|
2863
2839
|
registerActiveFileUploads: (files: File[]) => FileUploadManager[];
|
2864
2840
|
/** @beta */
|
2865
|
-
registerCompletedFileUploads: (metadata:
|
2841
|
+
registerCompletedFileUploads: (metadata: AttachmentMetadata[]) => FileUploadManager[];
|
2866
2842
|
/** @beta */
|
2867
2843
|
clearFileUploads: () => void;
|
2868
2844
|
/** @beta */
|
@@ -2872,7 +2848,7 @@ export declare interface CallWithChatAdapterManagement {
|
|
2872
2848
|
/** @beta */
|
2873
2849
|
updateFileUploadErrorMessage: (id: string, errorMessage: string) => void;
|
2874
2850
|
/** @beta */
|
2875
|
-
updateFileUploadMetadata: (id: string, metadata:
|
2851
|
+
updateFileUploadMetadata: (id: string, metadata: AttachmentMetadata) => void;
|
2876
2852
|
downloadAttachments: (options: {
|
2877
2853
|
attachmentUrls: Record<string, string>;
|
2878
2854
|
}) => Promise<AttachmentDownloadResult[]>;
|
@@ -4041,7 +4017,7 @@ export declare interface ChatAdapterThreadManagement {
|
|
4041
4017
|
* Update a message content.
|
4042
4018
|
*/
|
4043
4019
|
updateMessage(messageId: string, content: string, metadata?: Record<string, string>, options?: {
|
4044
|
-
|
4020
|
+
attachmentMetadata?: AttachmentMetadata[];
|
4045
4021
|
}): Promise<void>;
|
4046
4022
|
/**
|
4047
4023
|
* Delete a message in the thread.
|
@@ -4076,6 +4052,12 @@ export declare type ChatAdapterUiState = {
|
|
4076
4052
|
fileUploads?: FileUploadsUiState;
|
4077
4053
|
};
|
4078
4054
|
|
4055
|
+
/**
|
4056
|
+
* Represents the type of attachment
|
4057
|
+
* @beta
|
4058
|
+
*/
|
4059
|
+
export declare type ChatAttachmentType = 'file' | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ 'inlineImage' | 'unknown';
|
4060
|
+
|
4079
4061
|
/**
|
4080
4062
|
* Common props for selectors for {@link ChatClientState}.
|
4081
4063
|
*
|
@@ -4332,7 +4314,7 @@ export declare type ChatHandlers = {
|
|
4332
4314
|
onLoadPreviousChatMessages: (messagesToLoad: number) => Promise<boolean>;
|
4333
4315
|
onUpdateMessage: (messageId: string, content: string, options?: {
|
4334
4316
|
metadata?: Record<string, string>;
|
4335
|
-
|
4317
|
+
attachmentMetadata?: AttachmentMetadata[];
|
4336
4318
|
}) => Promise<void>;
|
4337
4319
|
onDeleteMessage: (messageId: string) => Promise<void>;
|
4338
4320
|
};
|
@@ -4362,10 +4344,16 @@ export declare interface ChatMessage extends MessageCommon {
|
|
4362
4344
|
metadata?: Record<string, string>;
|
4363
4345
|
/**
|
4364
4346
|
* @beta
|
4365
|
-
* A list of
|
4347
|
+
* A list of file attachments for the message.
|
4366
4348
|
* {@link FileMetadata}
|
4367
4349
|
*/
|
4368
|
-
|
4350
|
+
files?: FileMetadata[];
|
4351
|
+
/**
|
4352
|
+
* @beta
|
4353
|
+
* A list of inline images embedded in the message.
|
4354
|
+
* {@link InlineImageMetadata}
|
4355
|
+
*/
|
4356
|
+
inlineImages?: InlineImageMetadata[];
|
4369
4357
|
}
|
4370
4358
|
|
4371
4359
|
/**
|
@@ -6573,28 +6561,35 @@ export declare interface FileDownloadError {
|
|
6573
6561
|
*
|
6574
6562
|
* ```
|
6575
6563
|
* @param userId - The user ID of the user downloading the file.
|
6576
|
-
* @param fileMetadata - The {@link
|
6564
|
+
* @param fileMetadata - The {@link AttachmentMetadata} containing file `url`, `extension` and `name`.
|
6577
6565
|
*/
|
6578
|
-
export declare type FileDownloadHandler = (userId: string, fileMetadata:
|
6566
|
+
export declare type FileDownloadHandler = (userId: string, fileMetadata: AttachmentMetadata) => Promise<URL | FileDownloadError>;
|
6579
6567
|
|
6580
6568
|
/**
|
6581
|
-
*
|
6582
|
-
*
|
6583
|
-
*/
|
6584
|
-
export declare type FileMetadata = FileSharingMetadata | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ ImageFileMetadata;
|
6585
|
-
|
6586
|
-
/**
|
6587
|
-
* @beta
|
6588
|
-
*/
|
6589
|
-
export declare type FileMetadataAttachmentType = 'fileSharing' | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ 'inlineImage' | 'unknown';
|
6590
|
-
|
6591
|
-
/**
|
6592
|
-
* Meta Data containing basic information about the uploaded file.
|
6593
|
-
* Typically used for ACS to ACS file transfers.
|
6569
|
+
* Metadata containing basic information about the uploaded file.
|
6570
|
+
*
|
6594
6571
|
* @beta
|
6595
6572
|
*/
|
6596
|
-
export declare interface
|
6597
|
-
attachmentType: '
|
6573
|
+
export declare interface FileMetadata {
|
6574
|
+
attachmentType: 'file';
|
6575
|
+
/**
|
6576
|
+
* Extension hint, useful for rendering a specific icon.
|
6577
|
+
* An unknown or empty extension will be rendered as a generic icon.
|
6578
|
+
* Example: `pdf`
|
6579
|
+
*/
|
6580
|
+
extension: string;
|
6581
|
+
/**
|
6582
|
+
* Unique ID of the file.
|
6583
|
+
*/
|
6584
|
+
id: string;
|
6585
|
+
/**
|
6586
|
+
* File name to be displayed.
|
6587
|
+
*/
|
6588
|
+
name: string;
|
6589
|
+
/**
|
6590
|
+
* Download URL for the file.
|
6591
|
+
*/
|
6592
|
+
url: string;
|
6598
6593
|
payload?: Record<string, string>;
|
6599
6594
|
}
|
6600
6595
|
|
@@ -6635,12 +6630,12 @@ export declare interface FileSharingOptions {
|
|
6635
6630
|
*/
|
6636
6631
|
export declare interface FileUploadAdapter {
|
6637
6632
|
registerActiveFileUploads: (files: File[]) => FileUploadManager[];
|
6638
|
-
registerCompletedFileUploads: (metadata:
|
6633
|
+
registerCompletedFileUploads: (metadata: AttachmentMetadata[]) => FileUploadManager[];
|
6639
6634
|
clearFileUploads: () => void;
|
6640
6635
|
cancelFileUpload: (id: string) => void;
|
6641
6636
|
updateFileUploadProgress: (id: string, progress: number) => void;
|
6642
6637
|
updateFileUploadErrorMessage: (id: string, errorMessage: string) => void;
|
6643
|
-
updateFileUploadMetadata: (id: string, metadata:
|
6638
|
+
updateFileUploadMetadata: (id: string, metadata: AttachmentMetadata) => void;
|
6644
6639
|
}
|
6645
6640
|
|
6646
6641
|
/**
|
@@ -6663,7 +6658,7 @@ export declare type FileUploadHandler = (userId: string, fileUploads: FileUpload
|
|
6663
6658
|
|
6664
6659
|
/**
|
6665
6660
|
* A wrapper object for a file that is being uploaded.
|
6666
|
-
* Allows
|
6661
|
+
* Allows managing file uploads by providing common functions for updating the
|
6667
6662
|
* upload progress, canceling an upload, completing an upload etc.
|
6668
6663
|
* @beta
|
6669
6664
|
*/
|
@@ -6684,9 +6679,9 @@ export declare interface FileUploadManager {
|
|
6684
6679
|
/**
|
6685
6680
|
* Mark the upload as complete.
|
6686
6681
|
* Requires the `metadata` param containing uploaded file information.
|
6687
|
-
* @param metadata - {@link
|
6682
|
+
* @param metadata - {@link AttachmentMetadata}
|
6688
6683
|
*/
|
6689
|
-
notifyUploadCompleted: (metadata:
|
6684
|
+
notifyUploadCompleted: (metadata: AttachmentMetadata) => void;
|
6690
6685
|
/**
|
6691
6686
|
* Mark the upload as failed.
|
6692
6687
|
* @param message - An error message that can be displayed to the user.
|
@@ -6695,7 +6690,7 @@ export declare interface FileUploadManager {
|
|
6695
6690
|
}
|
6696
6691
|
|
6697
6692
|
/**
|
6698
|
-
* Contains the state
|
6693
|
+
* Contains the state attributes of a file upload like name, progress etc.
|
6699
6694
|
* @beta
|
6700
6695
|
*/
|
6701
6696
|
export declare interface FileUploadState {
|
@@ -6713,9 +6708,9 @@ export declare interface FileUploadState {
|
|
6713
6708
|
*/
|
6714
6709
|
progress: number;
|
6715
6710
|
/**
|
6716
|
-
*
|
6711
|
+
* Metadata {@link AttachmentMetadata} containing information about the uploaded file.
|
6717
6712
|
*/
|
6718
|
-
metadata?:
|
6713
|
+
metadata?: AttachmentMetadata;
|
6719
6714
|
/**
|
6720
6715
|
* Error message to be displayed to the user if the upload fails.
|
6721
6716
|
*/
|
@@ -6976,15 +6971,6 @@ export declare interface _Identifiers {
|
|
6976
6971
|
mentionSuggestionItem: string;
|
6977
6972
|
}
|
6978
6973
|
|
6979
|
-
/**
|
6980
|
-
* Meta Data containing data for images.
|
6981
|
-
* @beta
|
6982
|
-
*/
|
6983
|
-
export declare interface ImageFileMetadata extends BaseFileMetadata {
|
6984
|
-
attachmentType: 'inlineImage';
|
6985
|
-
previewUrl?: string;
|
6986
|
-
}
|
6987
|
-
|
6988
6974
|
/**
|
6989
6975
|
* Component to render a fullscreen modal for a selected image.
|
6990
6976
|
*
|
@@ -7104,6 +7090,24 @@ export declare interface IncomingCallState {
|
|
7104
7090
|
endTime?: Date;
|
7105
7091
|
}
|
7106
7092
|
|
7093
|
+
/**
|
7094
|
+
* Metadata for rendering images inline with a message.
|
7095
|
+
* This does not include images attached as files.
|
7096
|
+
* @beta
|
7097
|
+
*/
|
7098
|
+
export declare interface InlineImageMetadata {
|
7099
|
+
attachmentType: 'inlineImage';
|
7100
|
+
/**
|
7101
|
+
* Unique ID of the attachment.
|
7102
|
+
*/
|
7103
|
+
id: string;
|
7104
|
+
previewUrl?: string;
|
7105
|
+
/**
|
7106
|
+
* Download URL for the full resolution version.
|
7107
|
+
*/
|
7108
|
+
url: string;
|
7109
|
+
}
|
7110
|
+
|
7107
7111
|
/**
|
7108
7112
|
* Callback for {@link CallAdapterSubscribers} 'isCaptionLanguageChanged' event.
|
7109
7113
|
*
|
@@ -7708,16 +7712,16 @@ export declare type MessageThreadProps = {
|
|
7708
7712
|
*/
|
7709
7713
|
onRenderMessage?: (messageProps: MessageProps, messageRenderer?: MessageRenderer) => JSX.Element;
|
7710
7714
|
/**
|
7711
|
-
* Optional callback to render
|
7715
|
+
* Optional callback to render attached files in the message component.
|
7712
7716
|
* @beta
|
7713
7717
|
*/
|
7714
7718
|
onRenderFileDownloads?: (userId: string, message: ChatMessage) => JSX.Element;
|
7715
7719
|
/**
|
7716
7720
|
* Optional callback to retrieve the inline image in a message.
|
7717
|
-
* @param attachment -
|
7721
|
+
* @param attachment - AttachmentMetadata object we want to render
|
7718
7722
|
* @beta
|
7719
7723
|
*/
|
7720
|
-
onFetchAttachments?: (attachments:
|
7724
|
+
onFetchAttachments?: (attachments: AttachmentMetadata[]) => Promise<AttachmentDownloadResult[]>;
|
7721
7725
|
/**
|
7722
7726
|
* Optional callback to edit a message.
|
7723
7727
|
*
|
@@ -9818,7 +9822,7 @@ export declare interface UnsupportedOperatingSystemStrings {
|
|
9818
9822
|
*/
|
9819
9823
|
export declare type UpdateMessageCallback = (messageId: string, content: string, options?: {
|
9820
9824
|
metadata?: Record<string, string>;
|
9821
|
-
|
9825
|
+
attachmentMetadata?: AttachmentMetadata[];
|
9822
9826
|
}) => Promise<void>;
|
9823
9827
|
|
9824
9828
|
/**
|