@azure/communication-react 1.3.2-alpha-202207140015.0 → 1.3.2-alpha-202207190020.0
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/CHANGELOG.md +3 -0
- package/dist/communication-react.d.ts +25 -2
- package/dist/dist-cjs/communication-react/index.js +155 -92
- 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/calling-stateful-client/src/CallClientState.d.ts +4 -0
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +3 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +9 -0
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +5 -2
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +30 -7
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js +16 -2
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.js +3 -5
- package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +2 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -0
- package/dist/dist-esm/react-components/src/theming/icons.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +5 -1
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +40 -17
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +7 -7
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +28 -28
- 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/CallWithChatBackedChatAdapter.d.ts +7 -7
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +28 -28
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts.map +1 -1
- package/package.json +10 -9
package/CHANGELOG.md
CHANGED
@@ -32,6 +32,9 @@ Wed, 29 Jun 2022 17:31:05 GMT
|
|
32
32
|
- Fix loading spinner size in small containers ([PR #1995](https://github.com/azure/communication-ui-library/pull/1995) by 2684369+JamesBurnside@users.noreply.github.com)
|
33
33
|
- Add aria labels and announcer to file sharing components to make file sharing meet accessibility standards ([PR #1960](https://github.com/azure/communication-ui-library/pull/1960) by 97124699+prabhjot-msft@users.noreply.github.com)
|
34
34
|
- Update Participant pane to be an overlay on top of message thread so it can be tapped into when opened ([PR #1943](https://github.com/azure/communication-ui-library/pull/1943) by 97124699+prabhjot-msft@users.noreply.github.com)
|
35
|
+
- Fix bug where the "New Message" button was getting hidden under messages ([PR #2046](https://github.com/Azure/communication-ui-library/pull/2046) by carolinecao@microsoft.com)
|
36
|
+
- Fix bug where Chat participant pane in chat composite mobile view causing overflow ([PR #2038](https://github.com/Azure/communication-ui-library/pull/2038) by anjulgarg@live.com)
|
37
|
+
- Fix bug where Chat message thread size is wrong and shows scrollbar when a gif image is shared ([PR #2037](https://github.com/Azure/communication-ui-library/pull/2037) by anjulgarg@live.com)
|
35
38
|
|
36
39
|
|
37
40
|
### Improvements
|
@@ -75,6 +75,7 @@ import { PropertyChangedEvent } from '@azure/communication-calling';
|
|
75
75
|
import { default as React_2 } from 'react';
|
76
76
|
import type { RemoteParticipant } from '@azure/communication-calling';
|
77
77
|
import { RemoteParticipantState as RemoteParticipantState_2 } from '@azure/communication-calling';
|
78
|
+
import { RoomCallLocator } from '@azure/communication-calling';
|
78
79
|
import { ScalingMode } from '@azure/communication-calling';
|
79
80
|
import { SendMessageOptions } from '@azure/communication-chat';
|
80
81
|
import { StartCallOptions } from '@azure/communication-calling';
|
@@ -254,6 +255,7 @@ export declare type AzureCommunicationCallAdapterArgs = {
|
|
254
255
|
displayName: string;
|
255
256
|
credential: CommunicationTokenCredential;
|
256
257
|
locator: CallAdapterLocator;
|
258
|
+
alternativeCallerId?: string;
|
257
259
|
};
|
258
260
|
|
259
261
|
/**
|
@@ -496,6 +498,10 @@ export declare type CallAdapterClientState = {
|
|
496
498
|
* Latest error encountered for each operation performed via the adapter.
|
497
499
|
*/
|
498
500
|
latestErrors: AdapterErrors;
|
501
|
+
/**
|
502
|
+
* Azure communications Phone number to make PSTN calls with.
|
503
|
+
*/
|
504
|
+
alternativeCallerId?: string;
|
499
505
|
};
|
500
506
|
|
501
507
|
/**
|
@@ -580,7 +586,7 @@ export declare interface CallAdapterDeviceManagement {
|
|
580
586
|
*
|
581
587
|
* @public
|
582
588
|
*/
|
583
|
-
export declare type CallAdapterLocator = TeamsMeetingLinkLocator | GroupCallLocator | /* @conditional-compile-remove(teams-adhoc-call) */ CallParticipantsLocator;
|
589
|
+
export declare type CallAdapterLocator = TeamsMeetingLinkLocator | GroupCallLocator | /* @conditional-compile-remove(rooms) */ RoomCallLocator | /* @conditional-compile-remove(teams-adhoc-call) */ /* @conditional-compile-remove(PSTN-calls) */ CallParticipantsLocator;
|
584
590
|
|
585
591
|
/**
|
586
592
|
* {@link CallAdapter} state.
|
@@ -845,6 +851,10 @@ export declare interface CallClientState {
|
|
845
851
|
* See documentation of {@Link CallErrors} for details.
|
846
852
|
*/
|
847
853
|
latestErrors: CallErrors;
|
854
|
+
/**
|
855
|
+
* Stores an ACS aquired phone number for making PSTN calls.
|
856
|
+
*/
|
857
|
+
alternativeCallerId?: string;
|
848
858
|
}
|
849
859
|
|
850
860
|
/**
|
@@ -3329,7 +3339,7 @@ export declare interface ControlBarProps {
|
|
3329
3339
|
*
|
3330
3340
|
* @public
|
3331
3341
|
*/
|
3332
|
-
export declare const createAzureCommunicationCallAdapter: ({ userId, displayName, credential, locator }: AzureCommunicationCallAdapterArgs) => Promise<CallAdapter>;
|
3342
|
+
export declare const createAzureCommunicationCallAdapter: ({ userId, displayName, credential, locator, alternativeCallerId }: AzureCommunicationCallAdapterArgs) => Promise<CallAdapter>;
|
3333
3343
|
|
3334
3344
|
/**
|
3335
3345
|
* Create a {@link CallAdapter} using the provided {@link StatefulCallClient}.
|
@@ -3705,6 +3715,7 @@ export declare const DEFAULT_COMPONENT_ICONS: {
|
|
3705
3715
|
SendBoxSend: JSX.Element;
|
3706
3716
|
SendBoxSendHovered: JSX.Element;
|
3707
3717
|
VideoTileMicOff: JSX.Element;
|
3718
|
+
BackSpace: JSX.Element;
|
3708
3719
|
};
|
3709
3720
|
|
3710
3721
|
/**
|
@@ -3786,6 +3797,7 @@ export declare const DEFAULT_COMPOSITE_ICONS: {
|
|
3786
3797
|
MessageResend: JSX.Element;
|
3787
3798
|
HoldCall: JSX.Element;
|
3788
3799
|
ResumeCall: JSX.Element;
|
3800
|
+
BackSpace: JSX.Element;
|
3789
3801
|
};
|
3790
3802
|
|
3791
3803
|
/**
|
@@ -4049,6 +4061,7 @@ export declare interface DialpadProps {
|
|
4049
4061
|
*/
|
4050
4062
|
export declare interface DialpadStrings {
|
4051
4063
|
placeholderText: string;
|
4064
|
+
deleteButtonAriaLabel: string;
|
4052
4065
|
}
|
4053
4066
|
|
4054
4067
|
/**
|
@@ -4062,6 +4075,7 @@ export declare interface DialpadStyles {
|
|
4062
4075
|
textField?: Partial<ITextFieldStyles>;
|
4063
4076
|
primaryContent?: IStyle;
|
4064
4077
|
secondaryContent?: IStyle;
|
4078
|
+
deleteIcon?: IButtonStyles;
|
4065
4079
|
}
|
4066
4080
|
|
4067
4081
|
/**
|
@@ -6388,6 +6402,15 @@ export declare type StatefulCallClientArgs = {
|
|
6388
6402
|
* state. It is not used by StatefulCallClient.
|
6389
6403
|
*/
|
6390
6404
|
userId: CommunicationUserIdentifier;
|
6405
|
+
/**
|
6406
|
+
* A phone number in E.164 format that will be used to represent the callers identity. This number is required
|
6407
|
+
* to start a PSTN call.
|
6408
|
+
*
|
6409
|
+
* example: +11234567
|
6410
|
+
*
|
6411
|
+
* This is not a cached value from the headless calling client.
|
6412
|
+
*/
|
6413
|
+
alternativeCallerId?: string;
|
6391
6414
|
};
|
6392
6415
|
|
6393
6416
|
/**
|
@@ -191,7 +191,7 @@ const fromFlatCommunicationIdentifier = (id) => {
|
|
191
191
|
// Copyright (c) Microsoft Corporation.
|
192
192
|
// Licensed under the MIT license.
|
193
193
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
194
|
-
var telemetryVersion = '1.3.2-alpha-
|
194
|
+
var telemetryVersion = '1.3.2-alpha-202207190020.0';
|
195
195
|
|
196
196
|
// Copyright (c) Microsoft Corporation.
|
197
197
|
/**
|
@@ -931,7 +931,7 @@ const typingIndicatorStringStyle = react.mergeStyles({
|
|
931
931
|
wordBreak: 'break-word'
|
932
932
|
});
|
933
933
|
|
934
|
-
var participantItem$d={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed Participant"};var typingIndicator$d={singleUser:"{user} is typing ...",multipleUsers:"{users} are typing ...",multipleUsersAbbreviateOne:"{users} and 1 other are typing ...",multipleUsersAbbreviateMany:"{users} and {numOthers} others are typing ...",delimiter:", "};var sendBox$d={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",fileUploadsPendingError:"Uploading... Please wait.",removeFile:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed"};var messageStatusIndicator$d={deliveredAriaLabel:"Message sent",deliveredTooltipText:"Sent",seenAriaLabel:"Message seen by others",seenTooltipText:"Seen",readByTooltipText:"Read by {messageThreadReadCount} of {remoteParticipantsCount}",sendingAriaLabel:"Message sending",sendingTooltipText:"Sending",failedToSendAriaLabel:"Message failed to send",failedToSendTooltipText:"Failed to send"};var endCallButton$d={label:"Leave",tooltipContent:"Leave Call"};var cameraButton$d={onLabel:"Turn off",offLabel:"Turn on",tooltipDisabledContent:"Camera is disabled",tooltipOnContent:"Turn off camera",tooltipOffContent:"Turn on camera",tooltipVideoLoadingContent:"Video is loading",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose Camera",cameraButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Turn off camera and camera options",offSplitButtonAriaLabel:"Turn on camera and camera options",cameraActionTurnedOnAnnouncement:"Your camera has been turned on",cameraActionTurnedOffAnnouncement:"Your camera has been turned off"};var microphoneButton$d={onLabel:"Mute",offLabel:"Unmute",tooltipDisabledContent:"Microphone is disabled",tooltipOnContent:"Mute microphone",tooltipOffContent:"Unmute microphone",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose Microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose Speaker",microphoneButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Mute microphone and audio options",offSplitButtonAriaLabel:"Unmute microphone and audio options",microphoneActionTurnedOnAnnouncement:"Your microphone has been turned on",microphoneActionTurnedOffAnnouncement:"Your microphone has been turned off"};var devicesButton$d={label:"Devices",tooltipContent:"Manage devices",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose Camera",audioDeviceMenuTitle:"Audio Device",audioDeviceMenuTooltip:"Choose Audio Device",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose Microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose Speaker"};var participantsButton$d={label:"People",tooltipContent:"Show Participants",menuHeader:"In this call",participantsListButtonLabel:"{numParticipants} people",muteAllButtonLabel:"Mute all",copyInviteLinkButtonLabel:"Copy invite link"};var screenShareButton$d={onLabel:"Stop presenting",offLabel:"Present",tooltipDisabledContent:"Presenting is disabled",tooltipOnContent:"Presenting your screen",tooltipOffContent:"Present your screen"};var messageThread$d={yesterday:"Yesterday",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",participantJoined:"joined the chat.",participantLeft:"left the chat.",editMessage:"Edit",removeMessage:"Delete",resendMessage:"Try sending again",failToSendTag:"Failed to send",editedTag:"Edited",liveAuthorIntro:"{author} says",messageContentAriaText:"{author} said {message}",editBoxTextLimit:"Your message is over the limit of {limitNumber} characters",editBoxPlaceholderText:"Edit your message",newMessagesIndicator:"New messages",noDisplayNameSub:"No name",editBoxCancelButton:"Cancel",editBoxSubmitButton:"Submit",messageReadCount:"Read by {messageReadByCount} of {remoteParticipantsCount}",actionMenuMoreOptions:"More Options",downloadFile:"Download file"};var errorBar$d={unableToReachChatService:"You are offline",accessDenied:"Unable to access chat services - please check the user credentials provided",userNotInChatThread:"You are no longer in this chat thread",sendMessageNotInChatThread:"Failed to send message because you are no longer in this chat thread",sendMessageGeneric:"Failed to send message",callingNetworkFailure:"Troubling connecting call - you seem to be offline",startVideoGeneric:"Failed to start video",stopVideoGeneric:"Failed to stop video",muteGeneric:"Failed to mute microphone",unmuteGeneric:"Failed to unmute microphone",speakingWhileMuted:"Your microphone is muted",startScreenShareGeneric:"Failed to start screen sharing",stopScreenShareGeneric:"Failed to stop screen sharing",callNetworkQualityLow:"Network quality is low.",callNoSpeakerFound:"No speakers or headphones found. Connect an audio device to hear the call.",callNoMicrophoneFound:"No microphones found. Connect an audio input device.",callMicrophoneAccessDenied:"Unable to access microphone. Click the lock in the address bar to grant permission to this webpage.",callMicrophoneMutedBySystem:"You are muted by your system.",callMicrophoneUnmutedBySystem:"Your microphone recovered and you were unmuted by your system.",callMacOsMicrophoneAccessDenied:"Unable to access microphone. Grant microphone permission in your macOS privacy settings.",callLocalVideoFreeze:"Network bandwidth is poor. Your video may appear paused for others on the call.",callCameraAccessDenied:"Unable to access camera. Click the lock in the address bar to grant permission to this webpage.",callCameraAlreadyInUse:"Unable to access camera. It may already be in use by another application.",callVideoStoppedBySystem:"Your video has been stopped by your system.",callVideoRecoveredBySystem:"Your video has resumed.",callMacOsCameraAccessDenied:"MacOS is blocking access to your camera. Update your privacy settings to allow this browser to access your camera.",callMacOsScreenShareAccessDenied:"MacOS is blocking screen sharing. Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close",failedToJoinCallGeneric:"Failed to join call.",failedToJoinCallInvalidMeetingLink:"Unable to join Meeting. Invalid Link."};var videoGallery$d={screenIsBeingSharedMessage:"You are sharing your screen",screenShareLoadingMessage:"Loading {participant}'s screen",localVideoLabel:"You",localVideoCameraSwitcherLabel:"Switch camera",localVideoMovementLabel:"Movable Local Video Tile",localVideoSelectedDescription:"{cameraName} selected",displayNamePlaceholder:"Unnamed Participant"};var dialpad$d={placeholderText:"Enter a number"};var HoldButton$e={onLabel:"Resume",offLabel:"Hold",toolTipOnContent:"Resume call",toolTipOffContent:"Hold call"};var en_US$1 = {participantItem:participantItem$d,typingIndicator:typingIndicator$d,sendBox:sendBox$d,messageStatusIndicator:messageStatusIndicator$d,endCallButton:endCallButton$d,cameraButton:cameraButton$d,microphoneButton:microphoneButton$d,devicesButton:devicesButton$d,participantsButton:participantsButton$d,screenShareButton:screenShareButton$d,messageThread:messageThread$d,errorBar:errorBar$d,videoGallery:videoGallery$d,dialpad:dialpad$d,HoldButton:HoldButton$e};
|
934
|
+
var participantItem$d={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed Participant"};var typingIndicator$d={singleUser:"{user} is typing ...",multipleUsers:"{users} are typing ...",multipleUsersAbbreviateOne:"{users} and 1 other are typing ...",multipleUsersAbbreviateMany:"{users} and {numOthers} others are typing ...",delimiter:", "};var sendBox$d={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",fileUploadsPendingError:"Uploading... Please wait.",removeFile:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed"};var messageStatusIndicator$d={deliveredAriaLabel:"Message sent",deliveredTooltipText:"Sent",seenAriaLabel:"Message seen by others",seenTooltipText:"Seen",readByTooltipText:"Read by {messageThreadReadCount} of {remoteParticipantsCount}",sendingAriaLabel:"Message sending",sendingTooltipText:"Sending",failedToSendAriaLabel:"Message failed to send",failedToSendTooltipText:"Failed to send"};var endCallButton$d={label:"Leave",tooltipContent:"Leave Call"};var cameraButton$d={onLabel:"Turn off",offLabel:"Turn on",tooltipDisabledContent:"Camera is disabled",tooltipOnContent:"Turn off camera",tooltipOffContent:"Turn on camera",tooltipVideoLoadingContent:"Video is loading",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose Camera",cameraButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Turn off camera and camera options",offSplitButtonAriaLabel:"Turn on camera and camera options",cameraActionTurnedOnAnnouncement:"Your camera has been turned on",cameraActionTurnedOffAnnouncement:"Your camera has been turned off"};var microphoneButton$d={onLabel:"Mute",offLabel:"Unmute",tooltipDisabledContent:"Microphone is disabled",tooltipOnContent:"Mute microphone",tooltipOffContent:"Unmute microphone",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose Microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose Speaker",microphoneButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Mute microphone and audio options",offSplitButtonAriaLabel:"Unmute microphone and audio options",microphoneActionTurnedOnAnnouncement:"Your microphone has been turned on",microphoneActionTurnedOffAnnouncement:"Your microphone has been turned off"};var devicesButton$d={label:"Devices",tooltipContent:"Manage devices",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose Camera",audioDeviceMenuTitle:"Audio Device",audioDeviceMenuTooltip:"Choose Audio Device",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose Microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose Speaker"};var participantsButton$d={label:"People",tooltipContent:"Show Participants",menuHeader:"In this call",participantsListButtonLabel:"{numParticipants} people",muteAllButtonLabel:"Mute all",copyInviteLinkButtonLabel:"Copy invite link"};var screenShareButton$d={onLabel:"Stop presenting",offLabel:"Present",tooltipDisabledContent:"Presenting is disabled",tooltipOnContent:"Presenting your screen",tooltipOffContent:"Present your screen"};var messageThread$d={yesterday:"Yesterday",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",participantJoined:"joined the chat.",participantLeft:"left the chat.",editMessage:"Edit",removeMessage:"Delete",resendMessage:"Try sending again",failToSendTag:"Failed to send",editedTag:"Edited",liveAuthorIntro:"{author} says",messageContentAriaText:"{author} said {message}",editBoxTextLimit:"Your message is over the limit of {limitNumber} characters",editBoxPlaceholderText:"Edit your message",newMessagesIndicator:"New messages",noDisplayNameSub:"No name",editBoxCancelButton:"Cancel",editBoxSubmitButton:"Submit",messageReadCount:"Read by {messageReadByCount} of {remoteParticipantsCount}",actionMenuMoreOptions:"More Options",downloadFile:"Download file"};var errorBar$d={unableToReachChatService:"You are offline",accessDenied:"Unable to access chat services - please check the user credentials provided",userNotInChatThread:"You are no longer in this chat thread",sendMessageNotInChatThread:"Failed to send message because you are no longer in this chat thread",sendMessageGeneric:"Failed to send message",callingNetworkFailure:"Troubling connecting call - you seem to be offline",startVideoGeneric:"Failed to start video",stopVideoGeneric:"Failed to stop video",muteGeneric:"Failed to mute microphone",unmuteGeneric:"Failed to unmute microphone",speakingWhileMuted:"Your microphone is muted",startScreenShareGeneric:"Failed to start screen sharing",stopScreenShareGeneric:"Failed to stop screen sharing",callNetworkQualityLow:"Network quality is low.",callNoSpeakerFound:"No speakers or headphones found. Connect an audio device to hear the call.",callNoMicrophoneFound:"No microphones found. Connect an audio input device.",callMicrophoneAccessDenied:"Unable to access microphone. Click the lock in the address bar to grant permission to this webpage.",callMicrophoneMutedBySystem:"You are muted by your system.",callMicrophoneUnmutedBySystem:"Your microphone recovered and you were unmuted by your system.",callMacOsMicrophoneAccessDenied:"Unable to access microphone. Grant microphone permission in your macOS privacy settings.",callLocalVideoFreeze:"Network bandwidth is poor. Your video may appear paused for others on the call.",callCameraAccessDenied:"Unable to access camera. Click the lock in the address bar to grant permission to this webpage.",callCameraAlreadyInUse:"Unable to access camera. It may already be in use by another application.",callVideoStoppedBySystem:"Your video has been stopped by your system.",callVideoRecoveredBySystem:"Your video has resumed.",callMacOsCameraAccessDenied:"MacOS is blocking access to your camera. Update your privacy settings to allow this browser to access your camera.",callMacOsScreenShareAccessDenied:"MacOS is blocking screen sharing. Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close",failedToJoinCallGeneric:"Failed to join call.",failedToJoinCallInvalidMeetingLink:"Unable to join Meeting. Invalid Link."};var videoGallery$d={screenIsBeingSharedMessage:"You are sharing your screen",screenShareLoadingMessage:"Loading {participant}'s screen",localVideoLabel:"You",localVideoCameraSwitcherLabel:"Switch camera",localVideoMovementLabel:"Movable Local Video Tile",localVideoSelectedDescription:"{cameraName} selected",displayNamePlaceholder:"Unnamed Participant"};var dialpad$d={placeholderText:"Enter a number",deleteButtonAriaLabel:"Delete"};var HoldButton$e={onLabel:"Resume",offLabel:"Hold",toolTipOnContent:"Resume call",toolTipOffContent:"Hold call"};var en_US$1 = {participantItem:participantItem$d,typingIndicator:typingIndicator$d,sendBox:sendBox$d,messageStatusIndicator:messageStatusIndicator$d,endCallButton:endCallButton$d,cameraButton:cameraButton$d,microphoneButton:microphoneButton$d,devicesButton:devicesButton$d,participantsButton:participantsButton$d,screenShareButton:screenShareButton$d,messageThread:messageThread$d,errorBar:errorBar$d,videoGallery:videoGallery$d,dialpad:dialpad$d,HoldButton:HoldButton$e};
|
935
935
|
|
936
936
|
var participantItem$c={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed Participant"};var typingIndicator$c={singleUser:"{user} is typing ...",multipleUsers:"{users} are typing ...",multipleUsersAbbreviateOne:"{users} and 1 other are typing ...",multipleUsersAbbreviateMany:"{users} and {numOthers} others are typing ...",delimiter:", "};var sendBox$c={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",fileUploadsPendingError:"Uploading... Please wait."};var messageStatusIndicator$c={deliveredAriaLabel:"Message sent",deliveredTooltipText:"Sent",seenAriaLabel:"Message seen by others",seenTooltipText:"Seen",readByTooltipText:"Read by {messageThreadReadCount} of {remoteParticipantsCount}",sendingAriaLabel:"Message sending",sendingTooltipText:"Sending",failedToSendAriaLabel:"Message failed to send",failedToSendTooltipText:"Failed to send"};var endCallButton$c={label:"Leave",tooltipContent:"Leave Call"};var cameraButton$c={onLabel:"Turn off",offLabel:"Turn on",tooltipDisabledContent:"Camera is disabled",tooltipOnContent:"Turn off camera",tooltipOffContent:"Turn on camera",tooltipVideoLoadingContent:"Video is loading",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose Camera",cameraButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Turn off camera and camera options",offSplitButtonAriaLabel:"Turn on camera and camera options",cameraActionTurnedOnAnnouncement:"Your camera has been turned on",cameraActionTurnedOffAnnouncement:"Your camera has been turned off"};var microphoneButton$c={onLabel:"Mute",offLabel:"Unmute",tooltipDisabledContent:"Microphone is disabled",tooltipOnContent:"Mute microphone",tooltipOffContent:"Unmute microphone",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose Microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose Speaker",microphoneButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Mute microphone and audio options",offSplitButtonAriaLabel:"Unmute microphone and audio options",microphoneActionTurnedOnAnnouncement:"Your microphone has been turned on",microphoneActionTurnedOffAnnouncement:"Your microphone has been turned off"};var devicesButton$c={label:"Devices",tooltipContent:"Manage devices",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose Camera",audioDeviceMenuTitle:"Audio Device",audioDeviceMenuTooltip:"Choose Audio Device",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose Microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose Speaker"};var participantsButton$c={label:"People",tooltipContent:"Show Participants",menuHeader:"In this call",participantsListButtonLabel:"{numParticipants} people",muteAllButtonLabel:"Mute all",copyInviteLinkButtonLabel:"Copy invite link"};var screenShareButton$c={onLabel:"Stop presenting",offLabel:"Present",tooltipDisabledContent:"Presenting is disabled",tooltipOnContent:"Presenting your screen",tooltipOffContent:"Present your screen"};var messageThread$c={yesterday:"Yesterday",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",participantJoined:"joined the chat.",participantLeft:"left the chat.",editMessage:"Edit",removeMessage:"Delete",resendMessage:"Try sending again",failToSendTag:"Failed to send",editedTag:"Edited",liveAuthorIntro:"{author} says",editBoxTextLimit:"Your message is over the limit of {limitNumber} characters",editBoxPlaceholderText:"Edit your message",newMessagesIndicator:"New messages",noDisplayNameSub:"No name",editBoxCancelButton:"Cancel",editBoxSubmitButton:"Submit",messageReadCount:"Read by {messageReadByCount} of {remoteParticipantsCount}",actionMenuMoreOptions:"More Options"};var errorBar$c={unableToReachChatService:"You are offline",accessDenied:"Unable to access chat services - please check the user credentials provided",userNotInChatThread:"You are no longer in this chat thread",sendMessageNotInChatThread:"Failed to send message because you are no longer in this chat thread",sendMessageGeneric:"Failed to send message",callingNetworkFailure:"Troubling connecting call - you seem to be offline",startVideoGeneric:"Failed to start video",stopVideoGeneric:"Failed to stop video",muteGeneric:"Failed to mute microphone",unmuteGeneric:"Failed to unmute microphone",speakingWhileMuted:"Your microphone is muted",startScreenShareGeneric:"Failed to start screen sharing",stopScreenShareGeneric:"Failed to stop screen sharing",callNetworkQualityLow:"Network quality is low.",callNoSpeakerFound:"No speakers or headphones found. Connect an audio device to hear the call.",callNoMicrophoneFound:"No microphones found. Connect an audio input device.",callMicrophoneAccessDenied:"Unable to access microphone. Click the lock in the address bar to grant permission to this webpage.",callMicrophoneMutedBySystem:"You are muted by your system.",callMacOsMicrophoneAccessDenied:"Unable to access microphone. Grant microphone permission in your macOS privacy settings.",callLocalVideoFreeze:"Network bandwidth is poor. Your video may appear paused for others on the call.",callCameraAccessDenied:"Unable to access camera. Click the lock in the address bar to grant permission to this webpage.",callCameraAlreadyInUse:"Unable to access camera. It may already be in use by another application.",callMacOsCameraAccessDenied:"MacOS is blocking access to your camera. Update your privacy settings to allow this browser to access your camera.",callMacOsScreenShareAccessDenied:"MacOS is blocking screen sharing. Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close",failedToJoinCallGeneric:"Failed to join call.",failedToJoinCallInvalidMeetingLink:"Unable to join Meeting. Invalid Link."};var videoGallery$c={screenIsBeingSharedMessage:"You are sharing your screen",screenShareLoadingMessage:"Loading {participant}'s screen",localVideoLabel:"You",localVideoCameraSwitcherLabel:"Switch camera",localVideoMovementLabel:"Movable Local Video Tile",localVideoSelectedDescription:"{cameraName} selected",displayNamePlaceholder:"Unnamed Participant"};var dialpad$c={placeholderText:"Enter a number"};var HoldButton$d={onLabel:"Resume",offLabel:"Hold",toolTipOnContent:"Resume call",toolTipOffContent:"Hold call"};var en_GB$1 = {participantItem:participantItem$c,typingIndicator:typingIndicator$c,sendBox:sendBox$c,messageStatusIndicator:messageStatusIndicator$c,endCallButton:endCallButton$c,cameraButton:cameraButton$c,microphoneButton:microphoneButton$c,devicesButton:devicesButton$c,participantsButton:participantsButton$c,screenShareButton:screenShareButton$c,messageThread:messageThread$c,errorBar:errorBar$c,videoGallery:videoGallery$c,dialpad:dialpad$c,HoldButton:HoldButton$d};
|
937
937
|
|
@@ -1917,7 +1917,9 @@ const DEFAULT_COMPONENT_ICONS = {
|
|
1917
1917
|
ResumeCall: React__default['default'].createElement(reactIcons.Play20Filled, null),
|
1918
1918
|
SendBoxSend: React__default['default'].createElement(reactIcons.Send20Regular, null),
|
1919
1919
|
SendBoxSendHovered: React__default['default'].createElement(reactIcons.Send20Filled, null),
|
1920
|
-
VideoTileMicOff: React__default['default'].createElement(reactIcons.MicOff16Filled, null)
|
1920
|
+
VideoTileMicOff: React__default['default'].createElement(reactIcons.MicOff16Filled, null),
|
1921
|
+
/* @conditional-compile-remove(dialpad) */
|
1922
|
+
BackSpace: React__default['default'].createElement(reactIcons.Backspace20Regular, null)
|
1921
1923
|
};
|
1922
1924
|
|
1923
1925
|
// Copyright (c) Microsoft Corporation.
|
@@ -7530,8 +7532,9 @@ const primaryContentStyles = (theme) => {
|
|
7530
7532
|
const textFieldStyles = (theme) => ({
|
7531
7533
|
field: {
|
7532
7534
|
padding: 0,
|
7533
|
-
textAlign: '
|
7534
|
-
fontSize: '0.875rem'
|
7535
|
+
textAlign: 'left',
|
7536
|
+
fontSize: '0.875rem',
|
7537
|
+
paddingLeft: '0.5rem'
|
7535
7538
|
},
|
7536
7539
|
root: {
|
7537
7540
|
backgroundColor: `${theme.palette.neutralLighter}`,
|
@@ -7544,6 +7547,9 @@ const textFieldStyles = (theme) => ({
|
|
7544
7547
|
},
|
7545
7548
|
errorMessage: {
|
7546
7549
|
color: theme.semanticColors.errorText
|
7550
|
+
},
|
7551
|
+
suffix: {
|
7552
|
+
padding: 0
|
7547
7553
|
}
|
7548
7554
|
});
|
7549
7555
|
/**
|
@@ -7558,19 +7564,27 @@ const secondaryContentStyles = (theme) => {
|
|
7558
7564
|
minHeight: '0.75rem'
|
7559
7565
|
};
|
7560
7566
|
};
|
7567
|
+
/**
|
7568
|
+
* @private
|
7569
|
+
*/
|
7570
|
+
const iconButtonStyles = (theme) => {
|
7571
|
+
return {
|
7572
|
+
root: {
|
7573
|
+
color: `${theme.palette.black}`
|
7574
|
+
}
|
7575
|
+
};
|
7576
|
+
};
|
7561
7577
|
|
7562
7578
|
// Copyright (c) Microsoft Corporation.
|
7563
7579
|
// Licensed under the MIT license.
|
7564
7580
|
/**
|
7565
7581
|
* @private
|
7566
7582
|
*/
|
7567
|
-
const formatPhoneNumber = (
|
7583
|
+
const formatPhoneNumber = (phoneNumber) => {
|
7568
7584
|
// if input value is falsy eg if the user deletes the input, then just return
|
7569
|
-
if (!
|
7570
|
-
return
|
7585
|
+
if (!phoneNumber) {
|
7586
|
+
return phoneNumber;
|
7571
7587
|
}
|
7572
|
-
// clean the input for any non-digit values.
|
7573
|
-
let phoneNumber = value.replace(/[^\d*#+]/g, '');
|
7574
7588
|
// if phone number starts with 1, format like 1 (xxx)xxx-xxxx.
|
7575
7589
|
// if phone number starts with +, we format like +x (xxx)xxx-xxxx.
|
7576
7590
|
// For now we are only supporting NA phone number formatting with country code +x
|
@@ -7655,8 +7669,14 @@ const DialpadContainer = (props) => {
|
|
7655
7669
|
const theme = react.useTheme();
|
7656
7670
|
const [textValue, setTextValue] = React.useState('');
|
7657
7671
|
const { onSendDtmfTone, onClickDialpadButton, onDisplayDialpadInput, onChange } = props;
|
7672
|
+
const sanitizeInput = (input) => {
|
7673
|
+
// remove non-valid characters from input: letters,special characters excluding +, *,#
|
7674
|
+
return input.replace(/[^\d*#+]/g, '');
|
7675
|
+
};
|
7658
7676
|
const onClickDialpad = (input, index) => {
|
7659
|
-
|
7677
|
+
// remove non-valid characters from input: letters,special characters excluding +, *,#
|
7678
|
+
const value = sanitizeInput(textValue + input);
|
7679
|
+
setTextValue(value);
|
7660
7680
|
if (onSendDtmfTone) {
|
7661
7681
|
onSendDtmfTone(DtmfTones[index]);
|
7662
7682
|
}
|
@@ -7664,24 +7684,39 @@ const DialpadContainer = (props) => {
|
|
7664
7684
|
onClickDialpadButton(input, index);
|
7665
7685
|
}
|
7666
7686
|
if (onChange) {
|
7667
|
-
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(
|
7687
|
+
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(value) : formatPhoneNumber(value));
|
7668
7688
|
}
|
7669
7689
|
};
|
7670
7690
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
7671
7691
|
const setText = (e) => {
|
7672
|
-
|
7692
|
+
// remove non-valid characters from input: letters,special characters excluding +, *,#
|
7693
|
+
const input = sanitizeInput(e.target.value);
|
7694
|
+
setTextValue(input);
|
7673
7695
|
};
|
7696
|
+
// Potential Improvement:
|
7674
7697
|
// comment out the following line for now to disable customization for dialpad content
|
7675
7698
|
// const dialpadButtonsContent = props.dialpadButtons ?? dialPadButtonsDefault;
|
7699
|
+
const deleteNumbers = () => {
|
7700
|
+
const modifiedInput = textValue.substring(0, textValue.length - 1);
|
7701
|
+
setTextValue(modifiedInput);
|
7702
|
+
if (onChange) {
|
7703
|
+
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(modifiedInput) : formatPhoneNumber(modifiedInput));
|
7704
|
+
}
|
7705
|
+
};
|
7676
7706
|
return (React__default['default'].createElement("div", { className: react.mergeStyles(containerStyles$1(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root), "data-test-id": "dialpadContainer" },
|
7677
7707
|
React__default['default'].createElement(react.TextField, { styles: react.concatStyleSets(textFieldStyles(theme), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.textField), value: onDisplayDialpadInput ? onDisplayDialpadInput(textValue) : formatPhoneNumber(textValue),
|
7678
7708
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
7679
7709
|
onChange: (e) => {
|
7680
7710
|
setText(e);
|
7711
|
+
// remove non-valid characters from input: letters,special characters excluding +, *,#
|
7712
|
+
const input = sanitizeInput(e.target.value);
|
7681
7713
|
if (onChange) {
|
7682
|
-
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(
|
7714
|
+
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(input) : formatPhoneNumber(input));
|
7683
7715
|
}
|
7684
|
-
}, placeholder: props.placeholderText, "data-test-id": "dialpad-input"
|
7716
|
+
}, placeholder: props.strings.placeholderText, "data-test-id": "dialpad-input", onRenderSuffix: () => {
|
7717
|
+
var _a;
|
7718
|
+
return (React__default['default'].createElement(React__default['default'].Fragment, null, textValue.length !== 0 && (React__default['default'].createElement(react.IconButton, { ariaLabel: props.strings.deleteButtonAriaLabel, onClick: deleteNumbers, styles: react.concatStyleSets(iconButtonStyles(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.deleteIcon), iconProps: { iconName: 'BackSpace' } }))));
|
7719
|
+
} }),
|
7685
7720
|
React__default['default'].createElement(react.FocusZone, null, dialPadButtonsDefault.map((rows, rowIndex) => {
|
7686
7721
|
return (React__default['default'].createElement(react.Stack, { horizontal: true, key: `row_${rowIndex}`, horizontalAlign: "stretch" }, rows.map((button, columnIndex) => (React__default['default'].createElement(DialpadButton, { key: `button_${columnIndex}`,
|
7687
7722
|
/* row index = 0
|
@@ -7717,7 +7752,7 @@ const Dialpad = (props) => {
|
|
7717
7752
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
7718
7753
|
return (React__default['default'].createElement(React__default['default'].Fragment, null,
|
7719
7754
|
/* @conditional-compile-remove(dialpad) */
|
7720
|
-
React__default['default'].createElement(DialpadContainer, Object.assign({
|
7755
|
+
React__default['default'].createElement(DialpadContainer, Object.assign({ strings: strings }, props))));
|
7721
7756
|
};
|
7722
7757
|
|
7723
7758
|
// Copyright (c) Microsoft Corporation.
|
@@ -9192,7 +9227,8 @@ const MAX_CALL_HISTORY_LENGTH = 10;
|
|
9192
9227
|
* @private
|
9193
9228
|
*/
|
9194
9229
|
class CallContext$1 {
|
9195
|
-
constructor(userId, maxListeners = 50
|
9230
|
+
constructor(userId, maxListeners = 50,
|
9231
|
+
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId) {
|
9196
9232
|
this._callIdHistory = new CallIdHistory();
|
9197
9233
|
this._logger = logger.createClientLogger('communication-react:calling-context');
|
9198
9234
|
this._state = {
|
@@ -9209,6 +9245,7 @@ class CallContext$1 {
|
|
9209
9245
|
},
|
9210
9246
|
callAgent: undefined,
|
9211
9247
|
userId: userId,
|
9248
|
+
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId: alternativeCallerId,
|
9212
9249
|
latestErrors: {}
|
9213
9250
|
};
|
9214
9251
|
this._emitter = new EventEmitter__default['default']();
|
@@ -11189,7 +11226,9 @@ class ProxyCallClient {
|
|
11189
11226
|
// callAgent if the createCallAgent succeeds.
|
11190
11227
|
const callAgent = yield target.createCallAgent(...args);
|
11191
11228
|
this._callAgent = callAgentDeclaratify(callAgent, this._context, this._internalContext);
|
11192
|
-
this._context.setCallAgent({
|
11229
|
+
this._context.setCallAgent({
|
11230
|
+
displayName: this._callAgent.displayName
|
11231
|
+
});
|
11193
11232
|
return this._callAgent;
|
11194
11233
|
}), 'CallClient.createCallAgent');
|
11195
11234
|
}
|
@@ -11236,7 +11275,8 @@ class ProxyCallClient {
|
|
11236
11275
|
*/
|
11237
11276
|
const createStatefulCallClient = (args, options) => {
|
11238
11277
|
callingStatefulLogger.info(`Creating calling stateful client using library version: ${_getApplicationId()}`);
|
11239
|
-
return createStatefulCallClientWithDeps(new communicationCalling.CallClient(withTelemetryTag(options === null || options === void 0 ? void 0 : options.callClientOptions)), new CallContext$1(communicationCommon.getIdentifierKind(args.userId), options === null || options === void 0 ? void 0 : options.maxStateChangeListeners
|
11278
|
+
return createStatefulCallClientWithDeps(new communicationCalling.CallClient(withTelemetryTag(options === null || options === void 0 ? void 0 : options.callClientOptions)), new CallContext$1(communicationCommon.getIdentifierKind(args.userId), options === null || options === void 0 ? void 0 : options.maxStateChangeListeners,
|
11279
|
+
/* @conditional-compile-remove(PSTN-calls) */ args.alternativeCallerId), new InternalCallContext());
|
11240
11280
|
};
|
11241
11281
|
/**
|
11242
11282
|
* Package-internal version of createStatefulCallClient that allows dependency injection.
|
@@ -15935,28 +15975,44 @@ class AzureCommunicationCallAdapter {
|
|
15935
15975
|
throw new Error('You are already in the call!');
|
15936
15976
|
}
|
15937
15977
|
/* @conditional-compile-remove(teams-adhoc-call) */
|
15938
|
-
|
15939
|
-
if (
|
15940
|
-
|
15978
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
15979
|
+
if (isOutboundCall(this.locator)) {
|
15980
|
+
const phoneNumber = this.getState().alternativeCallerId;
|
15981
|
+
return this.startCall(this.locator.participantIDs, {
|
15982
|
+
alternateCallerId: phoneNumber ? { phoneNumber: phoneNumber } : undefined
|
15983
|
+
});
|
15941
15984
|
}
|
15942
15985
|
return this.teeErrorToEventEmitter(() => {
|
15943
15986
|
const audioOptions = { muted: microphoneOn !== null && microphoneOn !== void 0 ? microphoneOn : !this.getState().isLocalPreviewMicrophoneEnabled };
|
15944
15987
|
// TODO: find a way to expose stream to here
|
15945
15988
|
const videoOptions = { localVideoStreams: this.localStream ? [this.localStream] : undefined };
|
15946
|
-
const
|
15947
|
-
const call = isTeamsMeeting
|
15948
|
-
? this.callAgent.join(this.locator, {
|
15949
|
-
audioOptions,
|
15950
|
-
videoOptions
|
15951
|
-
})
|
15952
|
-
: this.callAgent.join(this.locator, {
|
15953
|
-
audioOptions,
|
15954
|
-
videoOptions
|
15955
|
-
});
|
15989
|
+
const call = this._joinCall(audioOptions, videoOptions);
|
15956
15990
|
this.processNewCall(call);
|
15957
15991
|
return call;
|
15958
15992
|
});
|
15959
15993
|
}
|
15994
|
+
_joinCall(audioOptions, videoOptions) {
|
15995
|
+
const isTeamsMeeting = !('groupId' in this.locator);
|
15996
|
+
/* @conditional-compile-remove(rooms) */
|
15997
|
+
const isRoomsCall = !('roomId' in this.locator);
|
15998
|
+
if (isTeamsMeeting) {
|
15999
|
+
return this.callAgent.join(this.locator, {
|
16000
|
+
audioOptions,
|
16001
|
+
videoOptions
|
16002
|
+
});
|
16003
|
+
}
|
16004
|
+
/* @conditional-compile-remove(rooms) */
|
16005
|
+
if (isRoomsCall) {
|
16006
|
+
return this.callAgent.join(this.locator, {
|
16007
|
+
audioOptions,
|
16008
|
+
videoOptions
|
16009
|
+
});
|
16010
|
+
}
|
16011
|
+
return this.callAgent.join(this.locator, {
|
16012
|
+
audioOptions,
|
16013
|
+
videoOptions
|
16014
|
+
});
|
16015
|
+
}
|
15960
16016
|
createStreamView(remoteUserId, options) {
|
15961
16017
|
return __awaiter$4(this, void 0, void 0, function* () {
|
15962
16018
|
if (remoteUserId === undefined) {
|
@@ -16239,9 +16295,15 @@ class AzureCommunicationCallAdapter {
|
|
16239
16295
|
*
|
16240
16296
|
* @public
|
16241
16297
|
*/
|
16242
|
-
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator
|
16243
|
-
|
16244
|
-
const
|
16298
|
+
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator,
|
16299
|
+
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId }) => __awaiter$4(void 0, void 0, void 0, function* () {
|
16300
|
+
const callClient = createStatefulCallClient({
|
16301
|
+
userId,
|
16302
|
+
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId
|
16303
|
+
});
|
16304
|
+
const callAgent = yield callClient.createCallAgent(credential, {
|
16305
|
+
displayName
|
16306
|
+
});
|
16245
16307
|
const adapter = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, locator);
|
16246
16308
|
return adapter;
|
16247
16309
|
});
|
@@ -16356,7 +16418,8 @@ const isCallError = (e) => {
|
|
16356
16418
|
return e['target'] !== undefined && e['innerError'] !== undefined;
|
16357
16419
|
};
|
16358
16420
|
/* @conditional-compile-remove(teams-adhoc-call) */
|
16359
|
-
|
16421
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
16422
|
+
const isOutboundCall = (callLocator) => {
|
16360
16423
|
return 'participantIDs' in callLocator;
|
16361
16424
|
};
|
16362
16425
|
|
@@ -16977,36 +17040,36 @@ class CallWithChatBackedChatAdapter {
|
|
16977
17040
|
this.setTopic = (topicName) => __awaiter$2(this, void 0, void 0, function* () {
|
16978
17041
|
throw new Error(`Chat Topics are not supported in CallWithChatComposite.`);
|
16979
17042
|
});
|
17043
|
+
/* @conditional-compile-remove(file-sharing) */
|
17044
|
+
this.registerActiveFileUploads = (files) => {
|
17045
|
+
return this.callWithChatAdapter.registerActiveFileUploads(files);
|
17046
|
+
};
|
17047
|
+
/* @conditional-compile-remove(file-sharing) */
|
17048
|
+
this.registerCompletedFileUploads = (metadata) => {
|
17049
|
+
return this.callWithChatAdapter.registerCompletedFileUploads(metadata);
|
17050
|
+
};
|
17051
|
+
/* @conditional-compile-remove(file-sharing) */
|
17052
|
+
this.clearFileUploads = () => {
|
17053
|
+
this.callWithChatAdapter.clearFileUploads();
|
17054
|
+
};
|
17055
|
+
/* @conditional-compile-remove(file-sharing) */
|
17056
|
+
this.cancelFileUpload = (id) => {
|
17057
|
+
this.callWithChatAdapter.cancelFileUpload(id);
|
17058
|
+
};
|
17059
|
+
/* @conditional-compile-remove(file-sharing) */
|
17060
|
+
this.updateFileUploadProgress = (id, progress) => {
|
17061
|
+
this.callWithChatAdapter.updateFileUploadProgress(id, progress);
|
17062
|
+
};
|
17063
|
+
/* @conditional-compile-remove(file-sharing) */
|
17064
|
+
this.updateFileUploadErrorMessage = (id, errorMessage) => {
|
17065
|
+
this.callWithChatAdapter.updateFileUploadErrorMessage(id, errorMessage);
|
17066
|
+
};
|
17067
|
+
/* @conditional-compile-remove(file-sharing) */
|
17068
|
+
this.updateFileUploadMetadata = (id, metadata) => {
|
17069
|
+
this.callWithChatAdapter.updateFileUploadMetadata(id, metadata);
|
17070
|
+
};
|
16980
17071
|
this.callWithChatAdapter = callWithChatAdapter;
|
16981
17072
|
}
|
16982
|
-
/* @conditional-compile-remove(file-sharing) */
|
16983
|
-
registerActiveFileUploads(files) {
|
16984
|
-
return this.callWithChatAdapter.registerActiveFileUploads(files);
|
16985
|
-
}
|
16986
|
-
/* @conditional-compile-remove(file-sharing) */
|
16987
|
-
registerCompletedFileUploads(metadata) {
|
16988
|
-
return this.callWithChatAdapter.registerCompletedFileUploads(metadata);
|
16989
|
-
}
|
16990
|
-
/* @conditional-compile-remove(file-sharing) */
|
16991
|
-
clearFileUploads() {
|
16992
|
-
this.callWithChatAdapter.clearFileUploads();
|
16993
|
-
}
|
16994
|
-
/* @conditional-compile-remove(file-sharing) */
|
16995
|
-
cancelFileUpload(id) {
|
16996
|
-
this.callWithChatAdapter.cancelFileUpload(id);
|
16997
|
-
}
|
16998
|
-
/* @conditional-compile-remove(file-sharing) */
|
16999
|
-
updateFileUploadProgress(id, progress) {
|
17000
|
-
this.callWithChatAdapter.updateFileUploadProgress(id, progress);
|
17001
|
-
}
|
17002
|
-
/* @conditional-compile-remove(file-sharing) */
|
17003
|
-
updateFileUploadErrorMessage(id, errorMessage) {
|
17004
|
-
this.callWithChatAdapter.updateFileUploadErrorMessage(id, errorMessage);
|
17005
|
-
}
|
17006
|
-
/* @conditional-compile-remove(file-sharing) */
|
17007
|
-
updateFileUploadMetadata(id, metadata) {
|
17008
|
-
this.callWithChatAdapter.updateFileUploadMetadata(id, metadata);
|
17009
|
-
}
|
17010
17073
|
}
|
17011
17074
|
function chatAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState) {
|
17012
17075
|
if (!callWithChatAdapterState.chat) {
|
@@ -17923,6 +17986,34 @@ class CallWithChatContext {
|
|
17923
17986
|
*/
|
17924
17987
|
class AzureCommunicationCallWithChatAdapter {
|
17925
17988
|
constructor(callAdapter, chatAdapter) {
|
17989
|
+
/* @conditional-compile-remove(file-sharing) */
|
17990
|
+
this.registerActiveFileUploads = (files) => {
|
17991
|
+
return this.chatAdapter.registerActiveFileUploads(files);
|
17992
|
+
};
|
17993
|
+
/* @conditional-compile-remove(file-sharing) */
|
17994
|
+
this.registerCompletedFileUploads = (metadata) => {
|
17995
|
+
return this.chatAdapter.registerCompletedFileUploads(metadata);
|
17996
|
+
};
|
17997
|
+
/* @conditional-compile-remove(file-sharing) */
|
17998
|
+
this.clearFileUploads = () => {
|
17999
|
+
this.chatAdapter.clearFileUploads();
|
18000
|
+
};
|
18001
|
+
/* @conditional-compile-remove(file-sharing) */
|
18002
|
+
this.cancelFileUpload = (id) => {
|
18003
|
+
this.chatAdapter.cancelFileUpload(id);
|
18004
|
+
};
|
18005
|
+
/* @conditional-compile-remove(file-sharing) */
|
18006
|
+
this.updateFileUploadProgress = (id, progress) => {
|
18007
|
+
this.chatAdapter.updateFileUploadProgress(id, progress);
|
18008
|
+
};
|
18009
|
+
/* @conditional-compile-remove(file-sharing) */
|
18010
|
+
this.updateFileUploadErrorMessage = (id, errorMessage) => {
|
18011
|
+
this.chatAdapter.updateFileUploadErrorMessage(id, errorMessage);
|
18012
|
+
};
|
18013
|
+
/* @conditional-compile-remove(file-sharing) */
|
18014
|
+
this.updateFileUploadMetadata = (id, metadata) => {
|
18015
|
+
this.chatAdapter.updateFileUploadMetadata(id, metadata);
|
18016
|
+
};
|
17926
18017
|
this.bindPublicMethods();
|
17927
18018
|
this.callAdapter = callAdapter;
|
17928
18019
|
this.chatAdapter = chatAdapter;
|
@@ -18169,34 +18260,6 @@ class AzureCommunicationCallWithChatAdapter {
|
|
18169
18260
|
return yield this.chatAdapter.deleteMessage(messageId);
|
18170
18261
|
});
|
18171
18262
|
}
|
18172
|
-
/* @conditional-compile-remove(file-sharing) */
|
18173
|
-
registerActiveFileUploads(files) {
|
18174
|
-
return this.chatAdapter.registerActiveFileUploads(files);
|
18175
|
-
}
|
18176
|
-
/* @conditional-compile-remove(file-sharing) */
|
18177
|
-
registerCompletedFileUploads(metadata) {
|
18178
|
-
return this.chatAdapter.registerCompletedFileUploads(metadata);
|
18179
|
-
}
|
18180
|
-
/* @conditional-compile-remove(file-sharing) */
|
18181
|
-
clearFileUploads() {
|
18182
|
-
this.chatAdapter.clearFileUploads();
|
18183
|
-
}
|
18184
|
-
/* @conditional-compile-remove(file-sharing) */
|
18185
|
-
cancelFileUpload(id) {
|
18186
|
-
this.chatAdapter.cancelFileUpload(id);
|
18187
|
-
}
|
18188
|
-
/* @conditional-compile-remove(file-sharing) */
|
18189
|
-
updateFileUploadProgress(id, progress) {
|
18190
|
-
this.chatAdapter.updateFileUploadProgress(id, progress);
|
18191
|
-
}
|
18192
|
-
/* @conditional-compile-remove(file-sharing) */
|
18193
|
-
updateFileUploadErrorMessage(id, errorMessage) {
|
18194
|
-
this.chatAdapter.updateFileUploadErrorMessage(id, errorMessage);
|
18195
|
-
}
|
18196
|
-
/* @conditional-compile-remove(file-sharing) */
|
18197
|
-
updateFileUploadMetadata(id, metadata) {
|
18198
|
-
this.chatAdapter.updateFileUploadMetadata(id, metadata);
|
18199
|
-
}
|
18200
18263
|
/* @conditional-compile-remove(PSTN-calls) */
|
18201
18264
|
holdCall() {
|
18202
18265
|
return __awaiter(this, void 0, void 0, function* () {
|