@azure/communication-react 1.5.1-alpha-202305260013 → 1.5.1-alpha-202305270013
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 +2 -2
- package/dist/dist-cjs/communication-react/index.js +168 -42
- 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/react-components/src/components/DevicesButton.js +9 -0
- package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js +23 -5
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +127 -28
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +2 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
- package/package.json +8 -8
package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts
CHANGED
@@ -217,13 +217,13 @@ export declare type IsCaptionsActiveChangedListener = (event: {
|
|
217
217
|
*
|
218
218
|
* @beta
|
219
219
|
*/
|
220
|
-
export declare type SelectedVideoBackgroundEffect =
|
220
|
+
export declare type SelectedVideoBackgroundEffect = VideoBackgroundNoEffect | VideoBackgroundBlurEffect | VideoBackgroundReplacementEffect;
|
221
221
|
/**
|
222
222
|
* Contains the attibutes to remove video background effect
|
223
223
|
*
|
224
224
|
* @beta
|
225
225
|
*/
|
226
|
-
export interface
|
226
|
+
export interface VideoBackgroundNoEffect {
|
227
227
|
/**
|
228
228
|
* Name of effect to remove video background effect
|
229
229
|
*/
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/CallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAyDlC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB;IACjD,0BAA0B;IAC1B,8BAA8B;IAC9B,UAAU;IACV,wCAAwC,CAAC,wBAAwB;IACjE,iBAAiB;IACjB,wCAAwC,CAAC,cAAc;IACvD,sDAAsD,CAAC,wBAAwB;CAChF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CallState, DeviceManagerState } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionsInfo } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(video-background-effects) */\nimport { BackgroundBlurConfig, BackgroundReplacementConfig } from '@azure/communication-calling-effects';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall } from '@azure/communication-calling';\n/* @conditional-compile-remove(close-captions) */\nimport { StartCaptionsOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport type {\n AudioDeviceInfo,\n VideoDeviceInfo,\n Call,\n PermissionConstraints,\n RemoteParticipant,\n StartCallOptions,\n MediaDiagnosticChangedEventArgs,\n NetworkDiagnosticChangedEventArgs,\n PropertyChangedEvent\n} from '@azure/communication-calling';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { Role } from '@internal/react-components';\nimport type { CommunicationIdentifierKind } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions, DtmfTone } from '@azure/communication-calling';\n\n/* @conditional-compile-remove(PSTN-calls) */\nimport type {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n PhoneNumberIdentifier\n} from '@azure/communication-common';\nimport type { AdapterState, Disposable, AdapterError, AdapterErrors } from '../../common/adapters';\n\n/**\n * Major UI screens shown in the {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositePage =\n | 'accessDeniedTeamsMeeting'\n | 'call'\n | 'configuration'\n | /* @conditional-compile-remove(PSTN-calls) */ 'hold'\n | 'joinCallFailedDueToNoNetwork'\n | 'leftCall'\n | 'lobby'\n | /* @conditional-compile-remove(rooms) */ 'deniedPermissionToRoom'\n | 'removedFromCall'\n | /* @conditional-compile-remove(rooms) */ 'roomNotFound'\n | /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment';\n\n/**\n * Subset of CallCompositePages that represent an end call state.\n * @private\n */\nexport const END_CALL_PAGES: CallCompositePage[] = [\n 'accessDeniedTeamsMeeting',\n 'joinCallFailedDueToNoNetwork',\n 'leftCall',\n /* @conditional-compile-remove(rooms) */ 'deniedPermissionToRoom',\n 'removedFromCall',\n /* @conditional-compile-remove(rooms) */ 'roomNotFound',\n /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment'\n];\n\n/**\n * {@link CommonCallAdapter} state for pure UI purposes.\n *\n * @public\n */\nexport type CallAdapterUiState = {\n isLocalPreviewMicrophoneEnabled: boolean;\n page: CallCompositePage;\n /* @conditional-compile-remove(unsupported-browser) */\n unsupportedBrowserVersionsAllowed?: boolean;\n};\n\n/**\n * {@link CommonCallAdapter} state inferred from Azure Communication Services backend.\n *\n * @public\n */\nexport type CallAdapterClientState = {\n userId: CommunicationIdentifierKind;\n displayName?: string;\n call?: CallState;\n devices: DeviceManagerState;\n endedCall?: CallState;\n isTeamsCall: boolean;\n /**\n * Latest error encountered for each operation performed via the adapter.\n */\n latestErrors: AdapterErrors;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Azure communications Phone number to make PSTN calls with.\n */\n alternateCallerId?: string;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Environment information about system the adapter is made on\n */\n environmentInfo?: EnvironmentInfo;\n /* @conditional-compile-remove(rooms) */\n /**\n * Use this to hint the role of the user when the role is not available before a Rooms call is started. This value\n * should be obtained using the Rooms API. This role will determine permissions in the configuration page of the\n * {@link CallComposite}. The true role of the user will be synced with ACS services when a Rooms call starts.\n */\n roleHint?: Role;\n /**\n * State to track whether the local participant's camera is on. To be used when creating a custom\n * control bar with the CallComposite.\n */\n cameraStatus?: 'On' | 'Off';\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Default set of background images for background replacement effect.\n */\n videoBackgroundImages?: VideoBackgroundImage[];\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * State to track the selected video background effect.\n */\n selectedVideoBackgroundEffect?: SelectedVideoBackgroundEffect;\n};\n\n/**\n * {@link CommonCallAdapter} state.\n *\n * @public\n */\nexport type CallAdapterState = CallAdapterUiState & CallAdapterClientState;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsJoined' event.\n *\n * @public\n */\nexport type ParticipantsJoinedListener = (event: { joined: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsLeft' event.\n *\n * @public\n */\nexport type ParticipantsLeftListener = (event: { removed: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isMuted' event.\n *\n * @public\n */\nexport type IsMutedChangedListener = (event: { identifier: CommunicationIdentifierKind; isMuted: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callIdChanged' event.\n *\n * @public\n */\nexport type CallIdChangedListener = (event: { callId: string }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isLocalScreenSharingActiveChanged' event.\n *\n * @public\n */\nexport type IsLocalScreenSharingActiveChangedListener = (event: { isScreenSharingOn: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isSpeakingChanged' event.\n *\n * @public\n */\nexport type IsSpeakingChangedListener = (event: {\n identifier: CommunicationIdentifierKind;\n isSpeaking: boolean;\n}) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'displayNameChanged' event.\n *\n * @public\n */\nexport type DisplayNameChangedListener = (event: {\n participantId: CommunicationIdentifierKind;\n displayName: string;\n}) => void;\n\n/**\n * Payload for {@link CallEndedListener} containing details on the ended call.\n *\n * @public\n */\nexport type CallAdapterCallEndedEvent = { callId: string };\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callEnded' event.\n *\n * @public\n */\nexport type CallEndedListener = (event: CallAdapterCallEndedEvent) => void;\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a media diagnostic.\n *\n * @public\n */\nexport type MediaDiagnosticChangedEvent = MediaDiagnosticChangedEventArgs & {\n type: 'media';\n};\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a network diagnostic.\n *\n * @public\n */\nexport type NetworkDiagnosticChangedEvent = NetworkDiagnosticChangedEventArgs & {\n type: 'network';\n};\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'diagnosticChanged' event.\n *\n * @public\n */\nexport type DiagnosticChangedEventListner = (\n event: MediaDiagnosticChangedEvent | NetworkDiagnosticChangedEvent\n) => void;\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * Contains the attibutes of a background image like url, name etc.\n *\n * @beta\n */\nexport interface VideoBackgroundImage {\n /**\n * key for unique identification of the custom background\n */\n key: string;\n /**\n * URL of the uploaded background image.\n */\n url: string;\n /**\n * Image name to be displayed.\n */\n tooltipText?: string;\n}\n\n/* @conditional-compile-remove(close-captions) */\n/**\n * Callback for {@link CallAdapterSubscribers} 'captionsReceived' event.\n *\n * @beta\n */\nexport type CaptionsReceivedListener = (event: { captionsInfo: CaptionsInfo }) => void;\n\n/* @conditional-compile-remove(close-captions) */\n/**\n * Callback for {@link CallAdapterSubscribers} 'isCaptionsActiveChanged' event.\n *\n * @beta\n */\nexport type IsCaptionsActiveChangedListener = (event: { isActive: boolean }) => void;\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * Contains the attibutes of a selected video background effect\n *\n * @beta\n */\nexport type SelectedVideoBackgroundEffect =\n | VideoBackgroundNoneEffect\n | VideoBackgroundBlurEffect\n | VideoBackgroundReplacementEffect;\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * Contains the attibutes to remove video background effect\n *\n * @beta\n */\nexport interface VideoBackgroundNoneEffect {\n /**\n * Name of effect to remove video background effect\n */\n effectName: 'none';\n}\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * Contains the attibutes of the blur video background effect\n *\n * @beta\n */\nexport interface VideoBackgroundBlurEffect {\n /**\n * Name of effect to blur video background effect\n */\n effectName: 'blur';\n}\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * Contains the attibutes of a selected replacement video background effect\n *\n * @beta\n */\nexport interface VideoBackgroundReplacementEffect {\n /**\n * Name of effect to replace video background effect\n */\n effectName: 'replacement';\n /**\n * key for unique identification of the custom background\n */\n effectKey: string;\n /**\n * URL of the custom background image.\n */\n backgroundImageUrl: string;\n}\n\n/**\n * Functionality for managing the current call.\n *\n * @public\n */\nexport interface CallAdapterCallOperations {\n /**\n * Leave the call\n *\n * @param forEveryone - Whether to remove all participants when leaving\n *\n * @public\n */\n leaveCall(forEveryone?: boolean): Promise<void>;\n /**\n * Start the camera\n * This method will start rendering a local camera view when the call is not active\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n startCamera(options?: VideoStreamOptions): Promise<void>;\n /**\n * Stop the camera\n * This method will stop rendering a local camera view when the call is not active\n *\n * @public\n */\n stopCamera(): Promise<void>;\n /**\n * Mute the current user during the call or disable microphone locally\n *\n * @public\n */\n mute(): Promise<void>;\n /**\n * Unmute the current user during the call or enable microphone locally\n *\n * @public\n */\n unmute(): Promise<void>;\n /**\n * Start sharing the screen during a call.\n *\n * @public\n */\n startScreenShare(): Promise<void>;\n /**\n * Stop sharing the screen\n *\n * @public\n */\n stopScreenShare(): Promise<void>;\n /**\n * Remove a participant from the call.\n *\n * @param userId - Id of the participant to be removed\n *\n * @public\n */\n removeParticipant(userId: string): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Remove a participant from the call.\n * @param participant - {@link @azure/communication-common#CommunicationIdentifier} of the participant to be removed\n * @beta\n */\n removeParticipant(participant: CommunicationIdentifier): Promise<void>;\n /**\n * Create the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;\n /**\n * Dispose the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Holds the call.\n *\n * @beta\n */\n holdCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Resumes the call from a `LocalHold` state.\n *\n * @beta\n */\n resumeCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Add a participant to the call.\n *\n * @beta\n */\n addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * send dtmf tone to another participant in a 1:1 PSTN call\n *\n * @beta\n */\n sendDtmfTone(dtmfTone: DtmfTone): Promise<void>;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Continues into a call when the browser version is not supported.\n */\n allowUnsupportedBrowserVersion(): void;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Function to Start captions\n * @param options - options for start captions\n */\n startCaptions(options?: StartCaptionsOptions): Promise<void>;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Function to set caption language\n * @param language - language set for caption\n */\n setCaptionLanguage(language: string): Promise<void>;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Function to set spoken language\n * @param language - spoken language\n */\n setSpokenLanguage(language: string): Promise<void>;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Funtion to stop captions\n */\n stopCaptions(): Promise<void>;\n\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Start the blur video background effect.\n *\n * @beta\n */\n blurVideoBackground(backgroundBlurConfig?: BackgroundBlurConfig): Promise<void>;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Start the video background replacement effect.\n *\n * @beta\n */\n replaceVideoBackground(backgroundReplacementConfig: BackgroundReplacementConfig): Promise<void>;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Stop the video background effect.\n *\n * @beta\n */\n stopVideoBackgroundEffects(): Promise<void>;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Override the background picker images for background replacement effect.\n *\n * @param backgroundImages - Array of custom background images.\n *\n * @beta\n */\n updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Update the selected video background effect.\n *\n * @beta\n */\n updateSelectedVideoBackgroundEffect(selectedVideoBackground: SelectedVideoBackgroundEffect): void;\n}\n\n/**\n * Functionality for managing devices within a call.\n *\n * @public\n */\nexport interface CallAdapterDeviceManagement {\n /**\n * Ask for permissions of devices.\n *\n * @remarks\n * Browser permission window will pop up if permissions are not granted yet\n *\n * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n *\n * @public\n */\n askDevicePermission(constrain: PermissionConstraints): Promise<void>;\n /**\n * Query for available camera devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }\n *\n * @public\n */\n queryCameras(): Promise<VideoDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n queryMicrophones(): Promise<AudioDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n querySpeakers(): Promise<AudioDeviceInfo[]>;\n /**\n * Set the camera to use in the call.\n *\n * @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }\n * @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>;\n /**\n * Set the microphone to use in the call.\n *\n * @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }\n *\n * @public\n */\n setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>;\n /**\n * Set the speaker to use in the call.\n *\n * @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }\n *\n * @public\n */\n setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>;\n}\n\n/**\n * Call composite events that can be subscribed to.\n *\n * @public\n */\nexport interface CallAdapterSubscribers {\n /**\n * Subscribe function for 'participantsJoined' event.\n */\n on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Subscribe function for 'participantsLeft' event.\n */\n on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Subscribe function for 'isMutedChanged' event.\n *\n * @remarks\n * The event will be triggered whenever current user or remote user mute state changed\n *\n */\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Subscribe function for 'callIdChanged' event.\n *\n * @remarks\n * The event will be triggered when callId of current user changed.\n *\n */\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Subscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Subscribe function for 'displayNameChanged' event.\n */\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Subscribe function for 'isSpeakingChanged' event.\n */\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Subscribe function for 'callEnded' event.\n */\n on(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Subscribe function for 'diagnosticChanged' event.\n *\n * This event fires whenever there is a change in user facing diagnostics about the ongoing call.\n */\n on(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Subscribe function for 'selectedMicrophoneChanged' event.\n *\n * This event fires whenever the user selects a new microphone device.\n */\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'selectedSpeakerChanged' event.\n *\n * This event fires whenever the user selects a new speaker device.\n */\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'error' event.\n */\n on(event: 'error', listener: (e: AdapterError) => void): void;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Subscribe function for 'captionsReceived' event.\n */\n on(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Subscribe function for 'isCaptionsActiveChanged' event.\n */\n on(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n\n /**\n * Unsubscribe function for 'participantsJoined' event.\n */\n off(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Unsubscribe function for 'participantsLeft' event.\n */\n off(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Unsubscribe function for 'isMutedChanged' event.\n */\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Unsubscribe function for 'callIdChanged' event.\n */\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Unsubscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Unsubscribe function for 'displayNameChanged' event.\n */\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Unsubscribe function for 'isSpeakingChanged' event.\n */\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Unsubscribe function for 'callEnded' event.\n */\n off(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Unsubscribe function for 'diagnosticChanged' event.\n */\n off(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Unsubscribe function for 'selectedMicrophoneChanged' event.\n */\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'selectedSpeakerChanged' event.\n */\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'error' event.\n */\n off(event: 'error', listener: (e: AdapterError) => void): void;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Unsubscribe function for 'captionsReceived' event.\n */\n off(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Unsubscribe function for 'isCaptionsActiveChanged' event.\n */\n off(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n}\n\n// This type remains for non-breaking change reason\n/**\n * Functionality for managing the current call or start a new call\n * @deprecated CallAdapter interface will be flatten, consider using CallAdapter directly\n * @public\n */\nexport interface CallAdapterCallManagement extends CallAdapterCallOperations {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;\n}\n\n// TODO: Flatten the adapter structure\n/**\n * {@link CallComposite} Adapter interface.\n *\n * @public\n */\nexport interface CommonCallAdapter\n extends AdapterState<CallAdapterState>,\n Disposable,\n CallAdapterCallOperations,\n CallAdapterDeviceManagement,\n CallAdapterSubscribers {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): void;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): void;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): void;\n}\n\n/**\n * An Adapter interface specific for Azure Communication identity which extends {@link CommonCallAdapter}.\n *\n * @public\n */\nexport interface CallAdapter extends CommonCallAdapter {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;\n}\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * An Adapter interface specific for Teams identity which extends {@link CommonCallAdapter}.\n *\n * @beta\n */\nexport interface TeamsCallAdapter extends CommonCallAdapter {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @beta\n */\n joinCall(microphoneOn?: boolean): TeamsCall | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @beta\n */\n startCall(participants: string[], options?: StartCallOptions): TeamsCall | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): TeamsCall | undefined;\n}\n\"../../../../../calling-stateful-client/src\"\"../../../../../react-components/src\""]}
|
1
|
+
{"version":3,"file":"CallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/CallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAyDlC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB;IACjD,0BAA0B;IAC1B,8BAA8B;IAC9B,UAAU;IACV,wCAAwC,CAAC,wBAAwB;IACjE,iBAAiB;IACjB,wCAAwC,CAAC,cAAc;IACvD,sDAAsD,CAAC,wBAAwB;CAChF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CallState, DeviceManagerState } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionsInfo } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(video-background-effects) */\nimport { BackgroundBlurConfig, BackgroundReplacementConfig } from '@azure/communication-calling-effects';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall } from '@azure/communication-calling';\n/* @conditional-compile-remove(close-captions) */\nimport { StartCaptionsOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport type {\n AudioDeviceInfo,\n VideoDeviceInfo,\n Call,\n PermissionConstraints,\n RemoteParticipant,\n StartCallOptions,\n MediaDiagnosticChangedEventArgs,\n NetworkDiagnosticChangedEventArgs,\n PropertyChangedEvent\n} from '@azure/communication-calling';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { Role } from '@internal/react-components';\nimport type { CommunicationIdentifierKind } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions, DtmfTone } from '@azure/communication-calling';\n\n/* @conditional-compile-remove(PSTN-calls) */\nimport type {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n PhoneNumberIdentifier\n} from '@azure/communication-common';\nimport type { AdapterState, Disposable, AdapterError, AdapterErrors } from '../../common/adapters';\n\n/**\n * Major UI screens shown in the {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositePage =\n | 'accessDeniedTeamsMeeting'\n | 'call'\n | 'configuration'\n | /* @conditional-compile-remove(PSTN-calls) */ 'hold'\n | 'joinCallFailedDueToNoNetwork'\n | 'leftCall'\n | 'lobby'\n | /* @conditional-compile-remove(rooms) */ 'deniedPermissionToRoom'\n | 'removedFromCall'\n | /* @conditional-compile-remove(rooms) */ 'roomNotFound'\n | /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment';\n\n/**\n * Subset of CallCompositePages that represent an end call state.\n * @private\n */\nexport const END_CALL_PAGES: CallCompositePage[] = [\n 'accessDeniedTeamsMeeting',\n 'joinCallFailedDueToNoNetwork',\n 'leftCall',\n /* @conditional-compile-remove(rooms) */ 'deniedPermissionToRoom',\n 'removedFromCall',\n /* @conditional-compile-remove(rooms) */ 'roomNotFound',\n /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment'\n];\n\n/**\n * {@link CommonCallAdapter} state for pure UI purposes.\n *\n * @public\n */\nexport type CallAdapterUiState = {\n isLocalPreviewMicrophoneEnabled: boolean;\n page: CallCompositePage;\n /* @conditional-compile-remove(unsupported-browser) */\n unsupportedBrowserVersionsAllowed?: boolean;\n};\n\n/**\n * {@link CommonCallAdapter} state inferred from Azure Communication Services backend.\n *\n * @public\n */\nexport type CallAdapterClientState = {\n userId: CommunicationIdentifierKind;\n displayName?: string;\n call?: CallState;\n devices: DeviceManagerState;\n endedCall?: CallState;\n isTeamsCall: boolean;\n /**\n * Latest error encountered for each operation performed via the adapter.\n */\n latestErrors: AdapterErrors;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Azure communications Phone number to make PSTN calls with.\n */\n alternateCallerId?: string;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Environment information about system the adapter is made on\n */\n environmentInfo?: EnvironmentInfo;\n /* @conditional-compile-remove(rooms) */\n /**\n * Use this to hint the role of the user when the role is not available before a Rooms call is started. This value\n * should be obtained using the Rooms API. This role will determine permissions in the configuration page of the\n * {@link CallComposite}. The true role of the user will be synced with ACS services when a Rooms call starts.\n */\n roleHint?: Role;\n /**\n * State to track whether the local participant's camera is on. To be used when creating a custom\n * control bar with the CallComposite.\n */\n cameraStatus?: 'On' | 'Off';\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Default set of background images for background replacement effect.\n */\n videoBackgroundImages?: VideoBackgroundImage[];\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * State to track the selected video background effect.\n */\n selectedVideoBackgroundEffect?: SelectedVideoBackgroundEffect;\n};\n\n/**\n * {@link CommonCallAdapter} state.\n *\n * @public\n */\nexport type CallAdapterState = CallAdapterUiState & CallAdapterClientState;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsJoined' event.\n *\n * @public\n */\nexport type ParticipantsJoinedListener = (event: { joined: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsLeft' event.\n *\n * @public\n */\nexport type ParticipantsLeftListener = (event: { removed: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isMuted' event.\n *\n * @public\n */\nexport type IsMutedChangedListener = (event: { identifier: CommunicationIdentifierKind; isMuted: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callIdChanged' event.\n *\n * @public\n */\nexport type CallIdChangedListener = (event: { callId: string }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isLocalScreenSharingActiveChanged' event.\n *\n * @public\n */\nexport type IsLocalScreenSharingActiveChangedListener = (event: { isScreenSharingOn: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isSpeakingChanged' event.\n *\n * @public\n */\nexport type IsSpeakingChangedListener = (event: {\n identifier: CommunicationIdentifierKind;\n isSpeaking: boolean;\n}) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'displayNameChanged' event.\n *\n * @public\n */\nexport type DisplayNameChangedListener = (event: {\n participantId: CommunicationIdentifierKind;\n displayName: string;\n}) => void;\n\n/**\n * Payload for {@link CallEndedListener} containing details on the ended call.\n *\n * @public\n */\nexport type CallAdapterCallEndedEvent = { callId: string };\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callEnded' event.\n *\n * @public\n */\nexport type CallEndedListener = (event: CallAdapterCallEndedEvent) => void;\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a media diagnostic.\n *\n * @public\n */\nexport type MediaDiagnosticChangedEvent = MediaDiagnosticChangedEventArgs & {\n type: 'media';\n};\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a network diagnostic.\n *\n * @public\n */\nexport type NetworkDiagnosticChangedEvent = NetworkDiagnosticChangedEventArgs & {\n type: 'network';\n};\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'diagnosticChanged' event.\n *\n * @public\n */\nexport type DiagnosticChangedEventListner = (\n event: MediaDiagnosticChangedEvent | NetworkDiagnosticChangedEvent\n) => void;\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * Contains the attibutes of a background image like url, name etc.\n *\n * @beta\n */\nexport interface VideoBackgroundImage {\n /**\n * key for unique identification of the custom background\n */\n key: string;\n /**\n * URL of the uploaded background image.\n */\n url: string;\n /**\n * Image name to be displayed.\n */\n tooltipText?: string;\n}\n\n/* @conditional-compile-remove(close-captions) */\n/**\n * Callback for {@link CallAdapterSubscribers} 'captionsReceived' event.\n *\n * @beta\n */\nexport type CaptionsReceivedListener = (event: { captionsInfo: CaptionsInfo }) => void;\n\n/* @conditional-compile-remove(close-captions) */\n/**\n * Callback for {@link CallAdapterSubscribers} 'isCaptionsActiveChanged' event.\n *\n * @beta\n */\nexport type IsCaptionsActiveChangedListener = (event: { isActive: boolean }) => void;\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * Contains the attibutes of a selected video background effect\n *\n * @beta\n */\nexport type SelectedVideoBackgroundEffect =\n | VideoBackgroundNoEffect\n | VideoBackgroundBlurEffect\n | VideoBackgroundReplacementEffect;\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * Contains the attibutes to remove video background effect\n *\n * @beta\n */\nexport interface VideoBackgroundNoEffect {\n /**\n * Name of effect to remove video background effect\n */\n effectName: 'none';\n}\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * Contains the attibutes of the blur video background effect\n *\n * @beta\n */\nexport interface VideoBackgroundBlurEffect {\n /**\n * Name of effect to blur video background effect\n */\n effectName: 'blur';\n}\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * Contains the attibutes of a selected replacement video background effect\n *\n * @beta\n */\nexport interface VideoBackgroundReplacementEffect {\n /**\n * Name of effect to replace video background effect\n */\n effectName: 'replacement';\n /**\n * key for unique identification of the custom background\n */\n effectKey: string;\n /**\n * URL of the custom background image.\n */\n backgroundImageUrl: string;\n}\n\n/**\n * Functionality for managing the current call.\n *\n * @public\n */\nexport interface CallAdapterCallOperations {\n /**\n * Leave the call\n *\n * @param forEveryone - Whether to remove all participants when leaving\n *\n * @public\n */\n leaveCall(forEveryone?: boolean): Promise<void>;\n /**\n * Start the camera\n * This method will start rendering a local camera view when the call is not active\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n startCamera(options?: VideoStreamOptions): Promise<void>;\n /**\n * Stop the camera\n * This method will stop rendering a local camera view when the call is not active\n *\n * @public\n */\n stopCamera(): Promise<void>;\n /**\n * Mute the current user during the call or disable microphone locally\n *\n * @public\n */\n mute(): Promise<void>;\n /**\n * Unmute the current user during the call or enable microphone locally\n *\n * @public\n */\n unmute(): Promise<void>;\n /**\n * Start sharing the screen during a call.\n *\n * @public\n */\n startScreenShare(): Promise<void>;\n /**\n * Stop sharing the screen\n *\n * @public\n */\n stopScreenShare(): Promise<void>;\n /**\n * Remove a participant from the call.\n *\n * @param userId - Id of the participant to be removed\n *\n * @public\n */\n removeParticipant(userId: string): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Remove a participant from the call.\n * @param participant - {@link @azure/communication-common#CommunicationIdentifier} of the participant to be removed\n * @beta\n */\n removeParticipant(participant: CommunicationIdentifier): Promise<void>;\n /**\n * Create the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;\n /**\n * Dispose the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Holds the call.\n *\n * @beta\n */\n holdCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Resumes the call from a `LocalHold` state.\n *\n * @beta\n */\n resumeCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Add a participant to the call.\n *\n * @beta\n */\n addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * send dtmf tone to another participant in a 1:1 PSTN call\n *\n * @beta\n */\n sendDtmfTone(dtmfTone: DtmfTone): Promise<void>;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Continues into a call when the browser version is not supported.\n */\n allowUnsupportedBrowserVersion(): void;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Function to Start captions\n * @param options - options for start captions\n */\n startCaptions(options?: StartCaptionsOptions): Promise<void>;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Function to set caption language\n * @param language - language set for caption\n */\n setCaptionLanguage(language: string): Promise<void>;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Function to set spoken language\n * @param language - spoken language\n */\n setSpokenLanguage(language: string): Promise<void>;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Funtion to stop captions\n */\n stopCaptions(): Promise<void>;\n\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Start the blur video background effect.\n *\n * @beta\n */\n blurVideoBackground(backgroundBlurConfig?: BackgroundBlurConfig): Promise<void>;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Start the video background replacement effect.\n *\n * @beta\n */\n replaceVideoBackground(backgroundReplacementConfig: BackgroundReplacementConfig): Promise<void>;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Stop the video background effect.\n *\n * @beta\n */\n stopVideoBackgroundEffects(): Promise<void>;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Override the background picker images for background replacement effect.\n *\n * @param backgroundImages - Array of custom background images.\n *\n * @beta\n */\n updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Update the selected video background effect.\n *\n * @beta\n */\n updateSelectedVideoBackgroundEffect(selectedVideoBackground: SelectedVideoBackgroundEffect): void;\n}\n\n/**\n * Functionality for managing devices within a call.\n *\n * @public\n */\nexport interface CallAdapterDeviceManagement {\n /**\n * Ask for permissions of devices.\n *\n * @remarks\n * Browser permission window will pop up if permissions are not granted yet\n *\n * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n *\n * @public\n */\n askDevicePermission(constrain: PermissionConstraints): Promise<void>;\n /**\n * Query for available camera devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }\n *\n * @public\n */\n queryCameras(): Promise<VideoDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n queryMicrophones(): Promise<AudioDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n querySpeakers(): Promise<AudioDeviceInfo[]>;\n /**\n * Set the camera to use in the call.\n *\n * @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }\n * @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>;\n /**\n * Set the microphone to use in the call.\n *\n * @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }\n *\n * @public\n */\n setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>;\n /**\n * Set the speaker to use in the call.\n *\n * @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }\n *\n * @public\n */\n setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>;\n}\n\n/**\n * Call composite events that can be subscribed to.\n *\n * @public\n */\nexport interface CallAdapterSubscribers {\n /**\n * Subscribe function for 'participantsJoined' event.\n */\n on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Subscribe function for 'participantsLeft' event.\n */\n on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Subscribe function for 'isMutedChanged' event.\n *\n * @remarks\n * The event will be triggered whenever current user or remote user mute state changed\n *\n */\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Subscribe function for 'callIdChanged' event.\n *\n * @remarks\n * The event will be triggered when callId of current user changed.\n *\n */\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Subscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Subscribe function for 'displayNameChanged' event.\n */\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Subscribe function for 'isSpeakingChanged' event.\n */\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Subscribe function for 'callEnded' event.\n */\n on(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Subscribe function for 'diagnosticChanged' event.\n *\n * This event fires whenever there is a change in user facing diagnostics about the ongoing call.\n */\n on(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Subscribe function for 'selectedMicrophoneChanged' event.\n *\n * This event fires whenever the user selects a new microphone device.\n */\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'selectedSpeakerChanged' event.\n *\n * This event fires whenever the user selects a new speaker device.\n */\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'error' event.\n */\n on(event: 'error', listener: (e: AdapterError) => void): void;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Subscribe function for 'captionsReceived' event.\n */\n on(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Subscribe function for 'isCaptionsActiveChanged' event.\n */\n on(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n\n /**\n * Unsubscribe function for 'participantsJoined' event.\n */\n off(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Unsubscribe function for 'participantsLeft' event.\n */\n off(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Unsubscribe function for 'isMutedChanged' event.\n */\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Unsubscribe function for 'callIdChanged' event.\n */\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Unsubscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Unsubscribe function for 'displayNameChanged' event.\n */\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Unsubscribe function for 'isSpeakingChanged' event.\n */\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Unsubscribe function for 'callEnded' event.\n */\n off(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Unsubscribe function for 'diagnosticChanged' event.\n */\n off(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Unsubscribe function for 'selectedMicrophoneChanged' event.\n */\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'selectedSpeakerChanged' event.\n */\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'error' event.\n */\n off(event: 'error', listener: (e: AdapterError) => void): void;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Unsubscribe function for 'captionsReceived' event.\n */\n off(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Unsubscribe function for 'isCaptionsActiveChanged' event.\n */\n off(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n}\n\n// This type remains for non-breaking change reason\n/**\n * Functionality for managing the current call or start a new call\n * @deprecated CallAdapter interface will be flatten, consider using CallAdapter directly\n * @public\n */\nexport interface CallAdapterCallManagement extends CallAdapterCallOperations {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;\n}\n\n// TODO: Flatten the adapter structure\n/**\n * {@link CallComposite} Adapter interface.\n *\n * @public\n */\nexport interface CommonCallAdapter\n extends AdapterState<CallAdapterState>,\n Disposable,\n CallAdapterCallOperations,\n CallAdapterDeviceManagement,\n CallAdapterSubscribers {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): void;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): void;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): void;\n}\n\n/**\n * An Adapter interface specific for Azure Communication identity which extends {@link CommonCallAdapter}.\n *\n * @public\n */\nexport interface CallAdapter extends CommonCallAdapter {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;\n}\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * An Adapter interface specific for Teams identity which extends {@link CommonCallAdapter}.\n *\n * @beta\n */\nexport interface TeamsCallAdapter extends CommonCallAdapter {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @beta\n */\n joinCall(microphoneOn?: boolean): TeamsCall | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @beta\n */\n startCall(participants: string[], options?: StartCallOptions): TeamsCall | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): TeamsCall | undefined;\n}\n\"../../../../../calling-stateful-client/src\"\"../../../../../react-components/src\""]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js
CHANGED
@@ -98,7 +98,7 @@ export const CallReadinessModal = (props) => {
|
|
98
98
|
}
|
99
99
|
};
|
100
100
|
if (mobileView && modal !== undefined) {
|
101
|
-
return (React.createElement(React.Fragment, null, isPermissionsModalDismissed && (React.createElement(_DrawerSurface, { onLightDismiss: onLightDismissTriggered, styles: drawerContainerStyles(DRAWER_HIGH_Z_BAND) }, modal()))));
|
101
|
+
return (React.createElement(React.Fragment, null, isPermissionsModalDismissed && (React.createElement(_DrawerSurface, { disableMaxHeight: true, onLightDismiss: onLightDismissTriggered, styles: drawerContainerStyles(DRAWER_HIGH_Z_BAND) }, modal()))));
|
102
102
|
}
|
103
103
|
else if (!mobileView && modal !== undefined) {
|
104
104
|
return (React.createElement(_ModalClone, { styles: {
|
@@ -167,7 +167,7 @@ export const CallReadinessModalFallBack = (props) => {
|
|
167
167
|
};
|
168
168
|
if (mobileView) {
|
169
169
|
return (React.createElement(React.Fragment, null,
|
170
|
-
(checkPermissionModalShowing || audioState === 'prompt' || videoState === 'prompt') && (React.createElement(_DrawerSurface, { onLightDismiss: onLightDismissTriggered, styles: drawerContainerStyles(DRAWER_HIGH_Z_BAND) },
|
170
|
+
(checkPermissionModalShowing || audioState === 'prompt' || videoState === 'prompt') && (React.createElement(_DrawerSurface, { disableMaxHeight: true, onLightDismiss: onLightDismissTriggered, styles: drawerContainerStyles(DRAWER_HIGH_Z_BAND) },
|
171
171
|
React.createElement(CameraAndMicrophoneSitePermissions, { appName: 'app',
|
172
172
|
/* @conditional-compile-remove(unsupported-browser) */
|
173
173
|
browserHint: isSafari ? 'safari' : 'unset', onTroubleshootingClick: onPermissionsTroubleshootingClick
|
@@ -175,7 +175,7 @@ export const CallReadinessModalFallBack = (props) => {
|
|
175
175
|
onPermissionsTroubleshootingClick(permissionsState);
|
176
176
|
}
|
177
177
|
: undefined, kind: "check" }))),
|
178
|
-
isPermissionsModalDismissed && !checkPermissionModalShowing && modal !== undefined && (React.createElement(_DrawerSurface, { onLightDismiss: onLightDismissTriggered, styles: drawerContainerStyles(DRAWER_HIGH_Z_BAND) }, modal()))));
|
178
|
+
isPermissionsModalDismissed && !checkPermissionModalShowing && modal !== undefined && (React.createElement(_DrawerSurface, { disableMaxHeight: true, onLightDismiss: onLightDismissTriggered, styles: drawerContainerStyles(DRAWER_HIGH_Z_BAND) }, modal()))));
|
179
179
|
}
|
180
180
|
else {
|
181
181
|
return (React.createElement(React.Fragment, null,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallReadinessModal.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallReadinessModal.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EACL,kCAAkC,EAClC,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,EACf,4CAAmC;AACpC,iDAAiD;AACjD,OAAO,EAAE,WAAW,EAAE,4CAAmC;AACzD,iDAAiD;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAGvE,iDAAiD,CAAC,sDAAsD;AACxG,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC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C,EACD,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,EAAE;gBAEhE,oBAAC,kCAAkC,IACjC,OAAO,EAAE,KAAK;oBACd,sDAAsD;oBACtD,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAC1C,sBAAsB,EACpB,iCAAiC;wBAC/B,CAAC,CAAC,GAAG,EAAE;4BACH,iCAAiC,CAAC,gBAAgB,CAAC,CAAC;wBACtD,CAAC;wBACH,CAAC,CAAC,SAAS,EAEf,IAAI,EAAC,OAAO,GACZ,CACU,CACf;YAEA,CAAC,2BAA2B,IAAI,KAAK,KAAK,SAAS,IAAI,CACtD,oBAAC,WAAW,IACV,MAAM,EAAE;oBACN,IAAI,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE;oBAC3B,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,uBAAuB,EAAE;iBAC5F,EACD,UAAU,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,gBAAgB,EAAE,EAC9C,MAAM,EAAE,2BAA2B,EACnC,UAAU,EAAE,KAAK,EACjB,SAAS,EAAE,GAAG,EAAE;oBACd,8BAA8B,CAAC,KAAK,CAAC,CAAC;gBACxC,CAAC,EACD,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,EAAE,IAE/D,KAAK,EAAE,CACI,CACf,CACA,CACJ,CAAC;KACH;AACH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAgB,EAAE;IAC7D,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n CameraAndMicrophoneSitePermissions,\n CameraSitePermissions,\n MicrophoneSitePermissions,\n _DrawerSurface\n} from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { _ModalClone } from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { drawerContainerStyles } from '../styles/CallComposite.styles';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(unsupported-browser) */\nimport { _isSafari } from '../utils';\n/* @conditional-compile-remove(call-readiness) */\nconst DRAWER_HIGH_Z_BAND = 99; // setting z index to 99 so that it sit above all components\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * Modal that guides user through enabling their camera and mic access\n * @private\n */\nexport const CallReadinessModal = (props: {\n mobileView: boolean;\n modalLayerHostId: string;\n permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n };\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo?: EnvironmentInfo;\n isPermissionsModalDismissed: boolean;\n setIsPermissionsModalDismissed: (boolean) => void;\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n}): JSX.Element => {\n const {\n mobileView,\n permissionsState,\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo,\n isPermissionsModalDismissed,\n setIsPermissionsModalDismissed,\n onPermissionsTroubleshootingClick\n } = props;\n const onLightDismissTriggered = (): void => {\n // do nothing here\n // only way to dismiss this drawer is clicking on allow access which will leads to device permission prompt\n };\n\n // On Safari browser with 2 options: don't allow/never for this website again, when don't allow is clicked, permissionAPI returns prompt and PermissionGranted from calling sdk returns false (the right value)\n const videoState: PermissionState = permissionsState.camera;\n const audioState: PermissionState = permissionsState.microphone;\n\n const showModal =\n videoState === 'denied' || videoState === 'prompt' || audioState === 'denied' || audioState === 'prompt';\n /* @conditional-compile-remove(unsupported-browser) */\n const isSafari = _isSafari(environmentInfo);\n\n const modal: undefined | (() => JSX.Element) = !showModal\n ? undefined\n : () => {\n // if both video and audio permission are not set\n if (videoState === 'prompt' && audioState === 'prompt') {\n return (\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"request\"\n />\n );\n }\n // if audio permission is set up but video is not\n else if (videoState === 'prompt') {\n return (\n <CameraSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n onContinueAnywayClick={() => {\n setIsPermissionsModalDismissed(false);\n }}\n kind=\"request\"\n />\n );\n }\n // if video permission is set up but audio is not\n else if (audioState === 'prompt') {\n return (\n <MicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"request\"\n />\n );\n }\n // if both video and audio are denied\n else if (videoState === 'denied' && audioState === 'denied') {\n return (\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n }\n // if only video is denied\n else if (videoState === 'denied') {\n return (\n <CameraSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n onContinueAnywayClick={() => {\n setIsPermissionsModalDismissed(false);\n }}\n kind=\"denied\"\n />\n );\n }\n // if only audio is denied\n else {\n return (\n <MicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n }\n };\n\n if (mobileView && modal !== undefined) {\n return (\n <>\n {isPermissionsModalDismissed && (\n <_DrawerSurface onLightDismiss={onLightDismissTriggered} styles={drawerContainerStyles(DRAWER_HIGH_Z_BAND)}>\n {modal()}\n </_DrawerSurface>\n )}\n </>\n );\n } else if (!mobileView && modal !== undefined) {\n return (\n <_ModalClone\n styles={{\n root: { position: 'unset' },\n main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }\n }}\n layerProps={{ hostId: props.modalLayerHostId }}\n isOpen={isPermissionsModalDismissed}\n isBlocking={false}\n onDismiss={() => {\n setIsPermissionsModalDismissed(false);\n }}\n overlay={{ styles: { root: { background: 'rgba(0,0,0,0.9)' } } }}\n >\n {modal()}\n </_ModalClone>\n );\n } else {\n return <></>;\n }\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * Modal that guides user through enabling their camera and mic access\n * This is used when permission API is not supported\n * @private\n */\nexport const CallReadinessModalFallBack = (props: {\n mobileView: boolean;\n checkPermissionModalShowing: boolean;\n permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n };\n modalLayerHostId: string;\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo?: EnvironmentInfo;\n isPermissionsModalDismissed: boolean;\n setIsPermissionsModalDismissed: (boolean) => void;\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n}): JSX.Element => {\n const {\n mobileView,\n checkPermissionModalShowing,\n permissionsState,\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo,\n isPermissionsModalDismissed,\n setIsPermissionsModalDismissed,\n onPermissionsTroubleshootingClick\n } = props;\n const onLightDismissTriggered = (): void => {\n // do nothing here\n // only way to dismiss this drawer is clicking on allow access which will leads to device permission prompt\n };\n\n const videoState = permissionsState.camera;\n const audioState = permissionsState.microphone;\n\n // When permissions are not set, do nothing here\n // When permissions are set to denied, show helper screen\n const showModal = videoState === 'denied' || audioState === 'denied';\n\n /* @conditional-compile-remove(unsupported-browser) */\n const isSafari = _isSafari(environmentInfo);\n\n const modal: undefined | (() => JSX.Element) = !showModal\n ? undefined\n : () => {\n if (videoState === 'denied' && audioState === 'denied') {\n return (\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n } else if (videoState === 'denied' && audioState === 'granted') {\n return (\n <CameraSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n onContinueAnywayClick={() => {\n setIsPermissionsModalDismissed(false);\n }}\n kind=\"denied\"\n />\n );\n } else {\n return (\n <MicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n }\n };\n\n if (mobileView) {\n return (\n <>\n {(checkPermissionModalShowing || audioState === 'prompt' || videoState === 'prompt') && (\n <_DrawerSurface onLightDismiss={onLightDismissTriggered} styles={drawerContainerStyles(DRAWER_HIGH_Z_BAND)}>\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"check\"\n />\n </_DrawerSurface>\n )}\n {isPermissionsModalDismissed && !checkPermissionModalShowing && modal !== undefined && (\n <_DrawerSurface onLightDismiss={onLightDismissTriggered} styles={drawerContainerStyles(DRAWER_HIGH_Z_BAND)}>\n {modal()}\n </_DrawerSurface>\n )}\n </>\n );\n } else {\n return (\n <>\n {(checkPermissionModalShowing || audioState === 'prompt' || videoState === 'prompt') && (\n <_ModalClone\n styles={{\n root: { position: 'unset' },\n main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }\n }}\n layerProps={{ hostId: props.modalLayerHostId }}\n isOpen={isPermissionsModalDismissed}\n isBlocking={false}\n onDismiss={() => {\n setIsPermissionsModalDismissed(false);\n }}\n overlay={{ styles: { root: { background: 'rgba(0,0,0,0.9)' } } }}\n >\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"check\"\n />\n </_ModalClone>\n )}\n\n {!checkPermissionModalShowing && modal !== undefined && (\n <_ModalClone\n styles={{\n root: { position: 'unset' },\n main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }\n }}\n layerProps={{ hostId: props.modalLayerHostId }}\n isOpen={isPermissionsModalDismissed}\n isBlocking={false}\n onDismiss={() => {\n setIsPermissionsModalDismissed(false);\n }}\n overlay={{ styles: { root: { background: 'rgba(0,0,0,0.9)' } } }}\n >\n {modal()}\n </_ModalClone>\n )}\n </>\n );\n }\n};\n\n/**\n * Placeholder for conditional compile\n * @private\n */\nexport const CallReadinessModalPlaceHolder = (): JSX.Element => {\n return <></>;\n};\n\"../../../../../react-components/src\""]}
|
1
|
+
{"version":3,"file":"CallReadinessModal.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallReadinessModal.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EACL,kCAAkC,EAClC,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,EACf,4CAAmC;AACpC,iDAAiD;AACjD,OAAO,EAAE,WAAW,EAAE,4CAAmC;AACzD,iDAAiD;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAGvE,iDAAiD,CAAC,sDAAsD;AACxG,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,iDAAiD;AACjD,MAAM,kBAAkB,GAAG,EAAE,CAAC,CAAC,6DAA6D;AAE5F,iDAAiD;AACjD;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAelC,EAAe,EAAE;IAChB,MAAM,EACJ,UAAU,EACV,gBAAgB;IAChB,sDAAsD,CAAC,eAAe,EACtE,2BAA2B,EAC3B,8BAA8B,EAC9B,iCAAiC,EAClC,GAAG,KAAK,CAAC;IACV,MAAM,uBAAuB,GAAG,GAAS,EAAE;QACzC,kBAAkB;QAClB,2GAA2G;IAC7G,CAAC,CAAC;IAEF,+MAA+M;IAC/M,MAAM,UAAU,GAAoB,gBAAgB,CAAC,MAAM,CAAC;IAC5D,MAAM,UAAU,GAAoB,gBAAgB,CAAC,UAAU,CAAC;IAEhE,MAAM,SAAS,GACb,UAAU,KAAK,QAAQ,IAAI,UAAU,KAAK,QAAQ,IAAI,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V,MAAM,EAAE;oBACN,IAAI,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE;oBAC3B,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,uBAAuB,EAAE;iBAC5F,EACD,UAAU,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,gBAAgB,EAAE,EAC9C,MAAM,EAAE,2BAA2B,EACnC,UAAU,EAAE,KAAK,EACjB,SAAS,EAAE,GAAG,EAAE;oBACd,8BAA8B,CAAC,KAAK,CAAC,CAAC;gBACxC,CAAC,EACD,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,EAAE,IAE/D,KAAK,EAAE,CACI,CACf,CACA,CACJ,CAAC;KACH;AACH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAgB,EAAE;IAC7D,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n CameraAndMicrophoneSitePermissions,\n CameraSitePermissions,\n MicrophoneSitePermissions,\n _DrawerSurface\n} from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { _ModalClone } from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { drawerContainerStyles } from '../styles/CallComposite.styles';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(unsupported-browser) */\nimport { _isSafari } from '../utils';\n/* @conditional-compile-remove(call-readiness) */\nconst DRAWER_HIGH_Z_BAND = 99; // setting z index to 99 so that it sit above all components\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * Modal that guides user through enabling their camera and mic access\n * @private\n */\nexport const CallReadinessModal = (props: {\n mobileView: boolean;\n modalLayerHostId: string;\n permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n };\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo?: EnvironmentInfo;\n isPermissionsModalDismissed: boolean;\n setIsPermissionsModalDismissed: (boolean) => void;\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n}): JSX.Element => {\n const {\n mobileView,\n permissionsState,\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo,\n isPermissionsModalDismissed,\n setIsPermissionsModalDismissed,\n onPermissionsTroubleshootingClick\n } = props;\n const onLightDismissTriggered = (): void => {\n // do nothing here\n // only way to dismiss this drawer is clicking on allow access which will leads to device permission prompt\n };\n\n // On Safari browser with 2 options: don't allow/never for this website again, when don't allow is clicked, permissionAPI returns prompt and PermissionGranted from calling sdk returns false (the right value)\n const videoState: PermissionState = permissionsState.camera;\n const audioState: PermissionState = permissionsState.microphone;\n\n const showModal =\n videoState === 'denied' || videoState === 'prompt' || audioState === 'denied' || audioState === 'prompt';\n /* @conditional-compile-remove(unsupported-browser) */\n const isSafari = _isSafari(environmentInfo);\n\n const modal: undefined | (() => JSX.Element) = !showModal\n ? undefined\n : () => {\n // if both video and audio permission are not set\n if (videoState === 'prompt' && audioState === 'prompt') {\n return (\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"request\"\n />\n );\n }\n // if audio permission is set up but video is not\n else if (videoState === 'prompt') {\n return (\n <CameraSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n onContinueAnywayClick={() => {\n setIsPermissionsModalDismissed(false);\n }}\n kind=\"request\"\n />\n );\n }\n // if video permission is set up but audio is not\n else if (audioState === 'prompt') {\n return (\n <MicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"request\"\n />\n );\n }\n // if both video and audio are denied\n else if (videoState === 'denied' && audioState === 'denied') {\n return (\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n }\n // if only video is denied\n else if (videoState === 'denied') {\n return (\n <CameraSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n onContinueAnywayClick={() => {\n setIsPermissionsModalDismissed(false);\n }}\n kind=\"denied\"\n />\n );\n }\n // if only audio is denied\n else {\n return (\n <MicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n }\n };\n\n if (mobileView && modal !== undefined) {\n return (\n <>\n {isPermissionsModalDismissed && (\n <_DrawerSurface\n disableMaxHeight={true}\n onLightDismiss={onLightDismissTriggered}\n styles={drawerContainerStyles(DRAWER_HIGH_Z_BAND)}\n >\n {modal()}\n </_DrawerSurface>\n )}\n </>\n );\n } else if (!mobileView && modal !== undefined) {\n return (\n <_ModalClone\n styles={{\n root: { position: 'unset' },\n main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }\n }}\n layerProps={{ hostId: props.modalLayerHostId }}\n isOpen={isPermissionsModalDismissed}\n isBlocking={false}\n onDismiss={() => {\n setIsPermissionsModalDismissed(false);\n }}\n overlay={{ styles: { root: { background: 'rgba(0,0,0,0.9)' } } }}\n >\n {modal()}\n </_ModalClone>\n );\n } else {\n return <></>;\n }\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * Modal that guides user through enabling their camera and mic access\n * This is used when permission API is not supported\n * @private\n */\nexport const CallReadinessModalFallBack = (props: {\n mobileView: boolean;\n checkPermissionModalShowing: boolean;\n permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n };\n modalLayerHostId: string;\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo?: EnvironmentInfo;\n isPermissionsModalDismissed: boolean;\n setIsPermissionsModalDismissed: (boolean) => void;\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n}): JSX.Element => {\n const {\n mobileView,\n checkPermissionModalShowing,\n permissionsState,\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo,\n isPermissionsModalDismissed,\n setIsPermissionsModalDismissed,\n onPermissionsTroubleshootingClick\n } = props;\n const onLightDismissTriggered = (): void => {\n // do nothing here\n // only way to dismiss this drawer is clicking on allow access which will leads to device permission prompt\n };\n\n const videoState = permissionsState.camera;\n const audioState = permissionsState.microphone;\n\n // When permissions are not set, do nothing here\n // When permissions are set to denied, show helper screen\n const showModal = videoState === 'denied' || audioState === 'denied';\n\n /* @conditional-compile-remove(unsupported-browser) */\n const isSafari = _isSafari(environmentInfo);\n\n const modal: undefined | (() => JSX.Element) = !showModal\n ? undefined\n : () => {\n if (videoState === 'denied' && audioState === 'denied') {\n return (\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n } else if (videoState === 'denied' && audioState === 'granted') {\n return (\n <CameraSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n onContinueAnywayClick={() => {\n setIsPermissionsModalDismissed(false);\n }}\n kind=\"denied\"\n />\n );\n } else {\n return (\n <MicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n }\n };\n\n if (mobileView) {\n return (\n <>\n {(checkPermissionModalShowing || audioState === 'prompt' || videoState === 'prompt') && (\n <_DrawerSurface\n disableMaxHeight={true}\n onLightDismiss={onLightDismissTriggered}\n styles={drawerContainerStyles(DRAWER_HIGH_Z_BAND)}\n >\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"check\"\n />\n </_DrawerSurface>\n )}\n {isPermissionsModalDismissed && !checkPermissionModalShowing && modal !== undefined && (\n <_DrawerSurface\n disableMaxHeight={true}\n onLightDismiss={onLightDismissTriggered}\n styles={drawerContainerStyles(DRAWER_HIGH_Z_BAND)}\n >\n {modal()}\n </_DrawerSurface>\n )}\n </>\n );\n } else {\n return (\n <>\n {(checkPermissionModalShowing || audioState === 'prompt' || videoState === 'prompt') && (\n <_ModalClone\n styles={{\n root: { position: 'unset' },\n main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }\n }}\n layerProps={{ hostId: props.modalLayerHostId }}\n isOpen={isPermissionsModalDismissed}\n isBlocking={false}\n onDismiss={() => {\n setIsPermissionsModalDismissed(false);\n }}\n overlay={{ styles: { root: { background: 'rgba(0,0,0,0.9)' } } }}\n >\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"check\"\n />\n </_ModalClone>\n )}\n\n {!checkPermissionModalShowing && modal !== undefined && (\n <_ModalClone\n styles={{\n root: { position: 'unset' },\n main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }\n }}\n layerProps={{ hostId: props.modalLayerHostId }}\n isOpen={isPermissionsModalDismissed}\n isBlocking={false}\n onDismiss={() => {\n setIsPermissionsModalDismissed(false);\n }}\n overlay={{ styles: { root: { background: 'rgba(0,0,0,0.9)' } } }}\n >\n {modal()}\n </_ModalClone>\n )}\n </>\n );\n }\n};\n\n/**\n * Placeholder for conditional compile\n * @private\n */\nexport const CallReadinessModalPlaceHolder = (): JSX.Element => {\n return <></>;\n};\n\"../../../../../react-components/src\""]}
|
@@ -13,7 +13,7 @@ export type { AzureCommunicationCallAdapterArgs, CallAdapterLocator, CommonCallA
|
|
13
13
|
export type { AzureCommunicationCallAdapterOptions } from './adapter';
|
14
14
|
export type { CommonCallAdapterOptions } from './adapter';
|
15
15
|
export type { CallParticipantsLocator } from './adapter';
|
16
|
-
export type { VideoBackgroundImage, SelectedVideoBackgroundEffect,
|
16
|
+
export type { VideoBackgroundImage, SelectedVideoBackgroundEffect, VideoBackgroundNoEffect, VideoBackgroundBlurEffect, VideoBackgroundReplacementEffect } from './adapter/CallAdapter';
|
17
17
|
export type { CallAdapter, CallAdapterCallEndedEvent, CallAdapterCallManagement, CallAdapterClientState, CallAdapterDeviceManagement, CallAdapterState, CallAdapterSubscribers, CallAdapterUiState, CallCompositePage, CallEndedListener, CallIdChangedListener, DiagnosticChangedEventListner, DisplayNameChangedListener, IsLocalScreenSharingActiveChangedListener, IsMutedChangedListener, IsSpeakingChangedListener, MediaDiagnosticChangedEvent, NetworkDiagnosticChangedEvent, ParticipantsJoinedListener, ParticipantsLeftListener } from './adapter';
|
18
18
|
export type { CaptionsReceivedListener, IsCaptionsActiveChangedListener } from './adapter';
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAgBhD,cAAc,WAAW,CAAC;AAE1B,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,WAAW,CAAC;AAEnB,yDAAyD;AACzD,OAAO,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { CallComposite } from './CallComposite';\nexport type { CallCompositeOptions, CallCompositeProps } from './CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nexport type { DeviceCheckOptions } from './CallComposite';\n/* @conditional-compile-remove(pinned-participants) */\nexport type { RemoteVideoTileMenuOptions } from './CallComposite';\n/* @conditional-compile-remove(click-to-call) */\nexport type { LocalVideoTileOptions } from './CallComposite';\nexport type { CallControlOptions } from './types/CallControlOptions';\n/* @conditional-compile-remove(control-bar-button-injection) */\nexport type {\n CustomCallControlButtonCallbackArgs,\n CustomCallControlButtonProps,\n CustomControlButtonProps\n} from './types/CallControlOptions';\n\nexport * from './Strings';\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type {\n TeamsCallAdapter,\n TeamsCallAdapterArgs,\n TeamsAdapterOptions,\n OnFetchProfileCallback,\n Profile\n} from './adapter';\n\nexport type {\n AzureCommunicationCallAdapterArgs,\n CallAdapterLocator,\n CommonCallAdapter,\n CallAdapterCallOperations\n} from './adapter';\n\n/* @conditional-compile-remove(rooms) */\nexport type { AzureCommunicationCallAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(video-background-effects) */\nexport type { CommonCallAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-adhoc-call) */\nexport type { CallParticipantsLocator } from './adapter';\n\n/* @conditional-compile-remove(video-background-effects) */\nexport type {\n VideoBackgroundImage,\n SelectedVideoBackgroundEffect,\n
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAgBhD,cAAc,WAAW,CAAC;AAE1B,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,WAAW,CAAC;AAEnB,yDAAyD;AACzD,OAAO,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { CallComposite } from './CallComposite';\nexport type { CallCompositeOptions, CallCompositeProps } from './CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nexport type { DeviceCheckOptions } from './CallComposite';\n/* @conditional-compile-remove(pinned-participants) */\nexport type { RemoteVideoTileMenuOptions } from './CallComposite';\n/* @conditional-compile-remove(click-to-call) */\nexport type { LocalVideoTileOptions } from './CallComposite';\nexport type { CallControlOptions } from './types/CallControlOptions';\n/* @conditional-compile-remove(control-bar-button-injection) */\nexport type {\n CustomCallControlButtonCallbackArgs,\n CustomCallControlButtonProps,\n CustomControlButtonProps\n} from './types/CallControlOptions';\n\nexport * from './Strings';\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type {\n TeamsCallAdapter,\n TeamsCallAdapterArgs,\n TeamsAdapterOptions,\n OnFetchProfileCallback,\n Profile\n} from './adapter';\n\nexport type {\n AzureCommunicationCallAdapterArgs,\n CallAdapterLocator,\n CommonCallAdapter,\n CallAdapterCallOperations\n} from './adapter';\n\n/* @conditional-compile-remove(rooms) */\nexport type { AzureCommunicationCallAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(video-background-effects) */\nexport type { CommonCallAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-adhoc-call) */\nexport type { CallParticipantsLocator } from './adapter';\n\n/* @conditional-compile-remove(video-background-effects) */\nexport type {\n VideoBackgroundImage,\n SelectedVideoBackgroundEffect,\n VideoBackgroundNoEffect,\n VideoBackgroundBlurEffect,\n VideoBackgroundReplacementEffect\n} from './adapter/CallAdapter';\n\nexport type {\n CallAdapter,\n CallAdapterCallEndedEvent,\n CallAdapterCallManagement,\n CallAdapterClientState,\n CallAdapterDeviceManagement,\n CallAdapterState,\n CallAdapterSubscribers,\n CallAdapterUiState,\n CallCompositePage,\n CallEndedListener,\n CallIdChangedListener,\n DiagnosticChangedEventListner,\n DisplayNameChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsMutedChangedListener,\n IsSpeakingChangedListener,\n MediaDiagnosticChangedEvent,\n NetworkDiagnosticChangedEvent,\n ParticipantsJoinedListener,\n ParticipantsLeftListener\n} from './adapter';\n\n/* @conditional-compile-remove(close-captions) */\nexport type { CaptionsReceivedListener, IsCaptionsActiveChangedListener } from './adapter';\n"]}
|
@@ -83,7 +83,7 @@ export const AddPeopleDropdown = (props) => {
|
|
83
83
|
defaultMenuProps.items.length > 0 && (React.createElement(Stack.Item, { styles: copyLinkButtonContainerStyles },
|
84
84
|
React.createElement(PrimaryButton, { onClick: setDrawerMenuItemsForAddPeople, styles: copyLinkButtonStylesThemed, onRenderIcon: () => PeoplePaneAddPersonIconTrampoline(), text: strings.peoplePaneAddPeopleButtonLabel, "data-ui-id": "call-add-people-button" }))),
|
85
85
|
addPeopleDrawerMenuItems.length > 0 && (React.createElement(Stack, { styles: drawerContainerStyles(), "data-ui-id": "call-add-people-dropdown" },
|
86
|
-
React.createElement(_DrawerMenu, { onLightDismiss: () => setAddPeopleDrawerMenuItems([]), items: addPeopleDrawerMenuItems }))),
|
86
|
+
React.createElement(_DrawerMenu, { disableMaxHeight: true, onLightDismiss: () => setAddPeopleDrawerMenuItems([]), items: addPeopleDrawerMenuItems }))),
|
87
87
|
alternateCallerId && (React.createElement(CallingDialpad, { isMobile: true, strings: strings, showDialpad: showDialpad, onDismissDialpad: onDismissDialpad, onAddParticipant: onAddParticipant, alternateCallerId: alternateCallerId }))));
|
88
88
|
}
|
89
89
|
return (React.createElement(React.Fragment, null, React.createElement(Stack, null,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AddPeopleDropdown.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/AddPeopleDropdown.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AACl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BAAqB,GAAG,CAAC;IAEpE,OAAO,yCAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\nimport {\n DefaultButton,\n IContextualMenuItem,\n IContextualMenuProps,\n PrimaryButton,\n Stack,\n useTheme\n} from '@fluentui/react';\n\nimport { _DrawerMenu, _DrawerMenuItemProps, Announcer } from '@internal/react-components';\nimport copy from 'copy-to-clipboard';\nimport { useMemo, useState } from 'react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CallWithChatCompositeIcon } from './icons';\nimport { iconStyles, themedCopyLinkButtonStyles, themedMenuStyle } from './AddPeopleDropdown.styles';\nimport { CallingDialpad } from './CallingDialpad';\nimport { CallingDialpadStrings } from './CallingDialpad';\nimport { _preventDismissOnEvent as preventDismissOnEvent } from '@internal/acs-ui-common';\nimport { copyLinkButtonContainerStyles, copyLinkButtonStackStyles } from './styles/PeoplePaneContent.styles';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\nimport { convertContextualMenuItemToDrawerMenuItem } from './ConvertContextualMenuItemToDrawerMenuItem';\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n\n/** @private */\nexport interface AddPeopleDropdownStrings extends CallingDialpadStrings {\n copyInviteLinkButtonLabel: string;\n openDialpadButtonLabel: string;\n peoplePaneAddPeopleButtonLabel: string;\n copyInviteLinkActionedAriaLabel: string;\n}\n\n/** @private */\nexport interface AddPeopleDropdownProps {\n inviteLink?: string;\n mobileView?: boolean;\n strings: AddPeopleDropdownStrings;\n onAddParticipant: (participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions) => void;\n alternateCallerId?: string;\n}\n\n/** @private */\nexport const AddPeopleDropdown = (props: AddPeopleDropdownProps): JSX.Element => {\n const theme = useTheme();\n\n const { inviteLink, strings, mobileView, onAddParticipant, alternateCallerId } = props;\n\n const [showDialpad, setShowDialpad] = useState(false);\n\n const [announcerStrings, setAnnouncerStrings] = useState<string>();\n\n const menuStyleThemed = useMemo(() => themedMenuStyle(theme), [theme]);\n\n const copyLinkButtonStylesThemed = useMemo(() => themedCopyLinkButtonStyles(theme, mobileView), [mobileView, theme]);\n\n const defaultMenuProps = useMemo((): IContextualMenuProps => {\n const menuProps: IContextualMenuProps = {\n styles: menuStyleThemed,\n items: [],\n useTargetWidth: true,\n calloutProps: {\n preventDismissOnEvent\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onMenuOpened(contextualMenu?) {\n setAnnouncerStrings(undefined);\n }\n };\n\n if (inviteLink) {\n menuProps.items.push({\n key: 'InviteLinkKey',\n text: strings.copyInviteLinkButtonLabel,\n itemProps: { styles: copyLinkButtonStylesThemed },\n iconProps: { iconName: 'Link', style: iconStyles },\n onClick: () => {\n setAnnouncerStrings(strings.copyInviteLinkActionedAriaLabel);\n copy(inviteLink);\n }\n });\n }\n\n // only show the dialpad option when alternateCallerId is set\n if (alternateCallerId) {\n menuProps.items.push({\n key: 'DialpadKey',\n text: strings.openDialpadButtonLabel,\n itemProps: { styles: copyLinkButtonStylesThemed },\n iconProps: { iconName: PeoplePaneOpenDialpadIconNameTrampoline(), style: iconStyles },\n onClick: () => setShowDialpad(true),\n 'data-ui-id': 'call-dial-phone-number-button'\n });\n }\n\n return menuProps;\n }, [\n menuStyleThemed,\n inviteLink,\n alternateCallerId,\n strings.copyInviteLinkButtonLabel,\n strings.copyInviteLinkActionedAriaLabel,\n strings.openDialpadButtonLabel,\n copyLinkButtonStylesThemed\n ]);\n\n const onDismissDialpad = (): void => {\n setShowDialpad(false);\n };\n\n const [addPeopleDrawerMenuItems, setAddPeopleDrawerMenuItems] = useState<_DrawerMenuItemProps[]>([]);\n\n const setDrawerMenuItemsForAddPeople: () => void = useMemo(() => {\n return () => {\n const drawerMenuItems = defaultMenuProps.items.map((contextualMenu: IContextualMenuItem) =>\n convertContextualMenuItemToDrawerMenuItem(contextualMenu, () => setAddPeopleDrawerMenuItems([]))\n );\n setAddPeopleDrawerMenuItems(drawerMenuItems);\n };\n }, [defaultMenuProps, setAddPeopleDrawerMenuItems]);\n\n if (mobileView) {\n return (\n <Stack>\n <Announcer ariaLive={'assertive'} announcementString={announcerStrings} />\n {defaultMenuProps.items.length > 0 && (\n <Stack.Item styles={copyLinkButtonContainerStyles}>\n <PrimaryButton\n onClick={setDrawerMenuItemsForAddPeople}\n styles={copyLinkButtonStylesThemed}\n onRenderIcon={() => PeoplePaneAddPersonIconTrampoline()}\n text={strings.peoplePaneAddPeopleButtonLabel}\n data-ui-id=\"call-add-people-button\"\n />\n </Stack.Item>\n )}\n\n {addPeopleDrawerMenuItems.length > 0 && (\n <Stack styles={drawerContainerStyles()} data-ui-id=\"call-add-people-dropdown\">\n <_DrawerMenu onLightDismiss={() => setAddPeopleDrawerMenuItems([])} items={addPeopleDrawerMenuItems} />\n </Stack>\n )}\n {alternateCallerId && (\n <CallingDialpad\n isMobile\n strings={strings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n onAddParticipant={onAddParticipant}\n alternateCallerId={alternateCallerId}\n />\n )}\n </Stack>\n );\n }\n\n return (\n <>\n {\n <Stack>\n <Announcer ariaLive={'assertive'} announcementString={announcerStrings} />\n {alternateCallerId && (\n <CallingDialpad\n isMobile={false}\n strings={strings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n onAddParticipant={onAddParticipant}\n alternateCallerId={alternateCallerId}\n />\n )}\n\n {defaultMenuProps.items.length > 0 && (\n <Stack styles={copyLinkButtonStackStyles}>\n <DefaultButton\n onRenderIcon={() => PeoplePaneAddPersonIconTrampoline()}\n text={strings.peoplePaneAddPeopleButtonLabel}\n menuProps={defaultMenuProps}\n styles={copyLinkButtonStylesThemed}\n data-ui-id=\"call-add-people-button\"\n />\n </Stack>\n )}\n </Stack>\n }\n </>\n );\n};\n\nfunction PeoplePaneOpenDialpadIconNameTrampoline(): string {\n /* @conditional-compile-remove(PSTN-calls) */\n return 'PeoplePaneOpenDialpad';\n\n return '';\n}\n\nfunction PeoplePaneAddPersonIconTrampoline(): JSX.Element {\n /* @conditional-compile-remove(PSTN-calls) */\n return <CallWithChatCompositeIcon iconName=\"PeoplePaneAddPerson\" />;\n\n return <></>;\n}\n\"../../../../react-components/src\"\"../../../../acs-ui-common/src\""]}
|
1
|
+
{"version":3,"file":"AddPeopleDropdown.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/AddPeopleDropdown.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,aAAa,EAGb,aAAa,EACb,KAAK,EACL,QAAQ,EACT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,WAAW,EAAwB,SAAS,EAAE,yCAAmC;AAC1F,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1C,6CAA6C;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,sBAAsB,IAAI,qBAAqB,EAAE,sCAAgC;AAC1F,OAAO,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC7G,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAE,yCAAyC,EAAE,MAAM,6CAA6C,CAAC;AAqBxG,eAAe;AACf,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;IAC9E,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EA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AE,CAAC,iCAAiC,EAAE,EACvD,IAAI,EAAE,OAAO,CAAC,8BAA8B,EAC5C,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE,0BAA0B,gBACvB,wBAAwB,GACnC,CACI,CACT,CACK,CAET,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,uCAAuC;IAC9C,6CAA6C;IAC7C,OAAO,uBAAuB,CAAC;IAE/B,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAS,iCAAiC;IACxC,6CAA6C;IAC7C,OAAO,oBAAC,yBAAyB,IAAC,QAAQ,EAAC,qBAAqB,GAAG,CAAC;IAEpE,OAAO,yCAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\nimport {\n DefaultButton,\n IContextualMenuItem,\n IContextualMenuProps,\n PrimaryButton,\n Stack,\n useTheme\n} from '@fluentui/react';\n\nimport { _DrawerMenu, _DrawerMenuItemProps, Announcer } from '@internal/react-components';\nimport copy from 'copy-to-clipboard';\nimport { useMemo, useState } from 'react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CallWithChatCompositeIcon } from './icons';\nimport { iconStyles, themedCopyLinkButtonStyles, themedMenuStyle } from './AddPeopleDropdown.styles';\nimport { CallingDialpad } from './CallingDialpad';\nimport { CallingDialpadStrings } from './CallingDialpad';\nimport { _preventDismissOnEvent as preventDismissOnEvent } from '@internal/acs-ui-common';\nimport { copyLinkButtonContainerStyles, copyLinkButtonStackStyles } from './styles/PeoplePaneContent.styles';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\nimport { convertContextualMenuItemToDrawerMenuItem } from './ConvertContextualMenuItemToDrawerMenuItem';\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n\n/** @private */\nexport interface AddPeopleDropdownStrings extends CallingDialpadStrings {\n copyInviteLinkButtonLabel: string;\n openDialpadButtonLabel: string;\n peoplePaneAddPeopleButtonLabel: string;\n copyInviteLinkActionedAriaLabel: string;\n}\n\n/** @private */\nexport interface AddPeopleDropdownProps {\n inviteLink?: string;\n mobileView?: boolean;\n strings: AddPeopleDropdownStrings;\n onAddParticipant: (participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions) => void;\n alternateCallerId?: string;\n}\n\n/** @private */\nexport const AddPeopleDropdown = (props: AddPeopleDropdownProps): JSX.Element => {\n const theme = useTheme();\n\n const { inviteLink, strings, mobileView, onAddParticipant, alternateCallerId } = props;\n\n const [showDialpad, setShowDialpad] = useState(false);\n\n const [announcerStrings, setAnnouncerStrings] = useState<string>();\n\n const menuStyleThemed = useMemo(() => themedMenuStyle(theme), [theme]);\n\n const copyLinkButtonStylesThemed = useMemo(() => themedCopyLinkButtonStyles(theme, mobileView), [mobileView, theme]);\n\n const defaultMenuProps = useMemo((): IContextualMenuProps => {\n const menuProps: IContextualMenuProps = {\n styles: menuStyleThemed,\n items: [],\n useTargetWidth: true,\n calloutProps: {\n preventDismissOnEvent\n },\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onMenuOpened(contextualMenu?) {\n setAnnouncerStrings(undefined);\n }\n };\n\n if (inviteLink) {\n menuProps.items.push({\n key: 'InviteLinkKey',\n text: strings.copyInviteLinkButtonLabel,\n itemProps: { styles: copyLinkButtonStylesThemed },\n iconProps: { iconName: 'Link', style: iconStyles },\n onClick: () => {\n setAnnouncerStrings(strings.copyInviteLinkActionedAriaLabel);\n copy(inviteLink);\n }\n });\n }\n\n // only show the dialpad option when alternateCallerId is set\n if (alternateCallerId) {\n menuProps.items.push({\n key: 'DialpadKey',\n text: strings.openDialpadButtonLabel,\n itemProps: { styles: copyLinkButtonStylesThemed },\n iconProps: { iconName: PeoplePaneOpenDialpadIconNameTrampoline(), style: iconStyles },\n onClick: () => setShowDialpad(true),\n 'data-ui-id': 'call-dial-phone-number-button'\n });\n }\n\n return menuProps;\n }, [\n menuStyleThemed,\n inviteLink,\n alternateCallerId,\n strings.copyInviteLinkButtonLabel,\n strings.copyInviteLinkActionedAriaLabel,\n strings.openDialpadButtonLabel,\n copyLinkButtonStylesThemed\n ]);\n\n const onDismissDialpad = (): void => {\n setShowDialpad(false);\n };\n\n const [addPeopleDrawerMenuItems, setAddPeopleDrawerMenuItems] = useState<_DrawerMenuItemProps[]>([]);\n\n const setDrawerMenuItemsForAddPeople: () => void = useMemo(() => {\n return () => {\n const drawerMenuItems = defaultMenuProps.items.map((contextualMenu: IContextualMenuItem) =>\n convertContextualMenuItemToDrawerMenuItem(contextualMenu, () => setAddPeopleDrawerMenuItems([]))\n );\n setAddPeopleDrawerMenuItems(drawerMenuItems);\n };\n }, [defaultMenuProps, setAddPeopleDrawerMenuItems]);\n\n if (mobileView) {\n return (\n <Stack>\n <Announcer ariaLive={'assertive'} announcementString={announcerStrings} />\n {defaultMenuProps.items.length > 0 && (\n <Stack.Item styles={copyLinkButtonContainerStyles}>\n <PrimaryButton\n onClick={setDrawerMenuItemsForAddPeople}\n styles={copyLinkButtonStylesThemed}\n onRenderIcon={() => PeoplePaneAddPersonIconTrampoline()}\n text={strings.peoplePaneAddPeopleButtonLabel}\n data-ui-id=\"call-add-people-button\"\n />\n </Stack.Item>\n )}\n\n {addPeopleDrawerMenuItems.length > 0 && (\n <Stack styles={drawerContainerStyles()} data-ui-id=\"call-add-people-dropdown\">\n <_DrawerMenu\n disableMaxHeight={true}\n onLightDismiss={() => setAddPeopleDrawerMenuItems([])}\n items={addPeopleDrawerMenuItems}\n />\n </Stack>\n )}\n {alternateCallerId && (\n <CallingDialpad\n isMobile\n strings={strings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n onAddParticipant={onAddParticipant}\n alternateCallerId={alternateCallerId}\n />\n )}\n </Stack>\n );\n }\n\n return (\n <>\n {\n <Stack>\n <Announcer ariaLive={'assertive'} announcementString={announcerStrings} />\n {alternateCallerId && (\n <CallingDialpad\n isMobile={false}\n strings={strings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n onAddParticipant={onAddParticipant}\n alternateCallerId={alternateCallerId}\n />\n )}\n\n {defaultMenuProps.items.length > 0 && (\n <Stack styles={copyLinkButtonStackStyles}>\n <DefaultButton\n onRenderIcon={() => PeoplePaneAddPersonIconTrampoline()}\n text={strings.peoplePaneAddPeopleButtonLabel}\n menuProps={defaultMenuProps}\n styles={copyLinkButtonStylesThemed}\n data-ui-id=\"call-add-people-button\"\n />\n </Stack>\n )}\n </Stack>\n }\n </>\n );\n};\n\nfunction PeoplePaneOpenDialpadIconNameTrampoline(): string {\n /* @conditional-compile-remove(PSTN-calls) */\n return 'PeoplePaneOpenDialpad';\n\n return '';\n}\n\nfunction PeoplePaneAddPersonIconTrampoline(): JSX.Element {\n /* @conditional-compile-remove(PSTN-calls) */\n return <CallWithChatCompositeIcon iconName=\"PeoplePaneAddPerson\" />;\n\n return <></>;\n}\n\"../../../../react-components/src\"\"../../../../acs-ui-common/src\""]}
|
@@ -43,7 +43,7 @@ export const CallingDialpad = (props) => {
|
|
43
43
|
};
|
44
44
|
if (isMobile) {
|
45
45
|
return (React.createElement(Stack, { "data-ui-id": "call-with-chat-composite-dialpad" }, showDialpad && (React.createElement(Stack, { styles: drawerContainerStyles() },
|
46
|
-
React.createElement(_DrawerSurface, { onLightDismiss: onDismissTriggered },
|
46
|
+
React.createElement(_DrawerSurface, { onLightDismiss: onDismissTriggered, disableMaxHeight: true },
|
47
47
|
React.createElement(Stack, { style: { padding: '1rem' } }, dialpadComponent()))))));
|
48
48
|
}
|
49
49
|
return (React.createElement(React.Fragment, null, React.createElement(Modal, { titleAriaId: strings.dialpadModalAriaLabel, isOpen: showDialpad, onDismiss: onDismissTriggered, isBlocking: true, styles: dialpadModalStyle, "data-ui-id": "call-with-chat-composite-dialpad" },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallingDialpad.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/CallingDialpad.tsx"],"names":[],"mappings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|
+
{"version":3,"file":"CallingDialpad.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/CallingDialpad.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,OAAO,EAAiB,yCAAmC;AACpE,OAAO,EAAqC,cAAc,EAAE,yCAAmC;AAC/F,OAAO,EAAgB,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,EAAiB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACpF,6CAA6C;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAIpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAoBrF,eAAe;AACf,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAe,EAAE;IACxE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAC;IACxG,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEzD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,MAAM,kBAAkB,GAAG,GAAS,EAAE;QACpC,iBAAiB,CAAC,EAAE,CAAC,CAAC;QACtB,gBAAgB,EAAE,CAAC;IACrB,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,GAAS,EAAE;QAC7B,IAAI,gBAAgB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AC,KAAK,IAAC,MAAM,EAAE,qBAAqB,EAAE;YACpC,oBAAC,cAAc,IAAC,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,IAAI;gBACxE,oBAAC,KAAK,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAG,gBAAgB,EAAE,CAAS,CAChD,CACX,CACT,CACK,CACT,CAAC;KACH;IAED,OAAO,CACL,0CAEI,oBAAC,KAAK,IACJ,WAAW,EAAE,OAAO,CAAC,qBAAqB,EAC1C,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,kBAAkB,EAC7B,UAAU,EAAE,IAAI,EAChB,MAAM,EAAE,iBAAiB,gBACd,kCAAkC;QAE7C,oBAAC,KAAK,IAAC,UAAU,QAAC,eAAe,EAAC,eAAe,EAAC,aAAa,EAAC,QAAQ;YACtE,oBAAC,IAAI,QAAE,OAAO,CAAC,iBAAiB,CAAQ;YACxC,oBAAC,UAAU,IACT,SAAS,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EACjC,SAAS,EAAE,OAAO,CAAC,gCAAgC,EACnD,OAAO,EAAE,kBAAkB,EAC3B,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GACrC,CACI;QAER,oBAAC,KAAK,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAG,gBAAgB,EAAE,CAAS,CAC5D,CAET,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,8BAA8B;IACrC,6CAA6C;IAC7C,OAAO,oBAAC,yBAAyB,IAAC,QAAQ,EAAC,kBAAkB,GAAG,CAAC;IACjE,OAAO,yCAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\nimport { useState } from 'react';\nimport { useMemo } from 'react';\nimport { Dialpad, DialpadStyles } from '@internal/react-components';\nimport { _DrawerMenu, _DrawerMenuItemProps, _DrawerSurface } from '@internal/react-components';\nimport { IModalStyles, Modal, Stack, useTheme, Text, IconButton } from '@fluentui/react';\nimport { IButtonStyles, PrimaryButton } from '@fluentui/react';\n\nimport { themeddialpadModalStyle } from './CallingDialpad.styles';\nimport { themedCallButtonStyle, themedDialpadStyle } from './CallingDialpad.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CallWithChatCompositeIcon } from './icons';\n\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\n\n/** @private */\nexport interface CallingDialpadStrings {\n dialpadModalAriaLabel: string;\n dialpadModalTitle: string;\n dialpadCloseModalButtonAriaLabel: string;\n dialpadStartCallButtonLabel: string;\n}\n\n/** @private */\nexport interface CallingDialpadProps {\n isMobile: boolean;\n showDialpad: boolean;\n strings: CallingDialpadStrings;\n onDismissDialpad: () => void;\n onAddParticipant: (participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions) => void;\n alternateCallerId: string;\n}\n\n/** @private */\nexport const CallingDialpad = (props: CallingDialpadProps): JSX.Element => {\n const { strings, isMobile, showDialpad, onDismissDialpad, onAddParticipant, alternateCallerId } = props;\n const [textFieldInput, setTextFieldInput] = useState('');\n\n const theme = useTheme();\n\n const onDismissTriggered = (): void => {\n setTextFieldInput('');\n onDismissDialpad();\n };\n\n const onClickCall = (): void => {\n if (onAddParticipant) {\n /**\n * Format the phone number in dialpad textfield to make sure the phone number is in E.164 format.\n * We assume the input number always include countrycode\n */\n\n const phoneNumber = { phoneNumber: '+' + textFieldInput.replace(/\\D/g, '').replaceAll(' ', '') };\n\n onAddParticipant(phoneNumber, { alternateCallerId: { phoneNumber: alternateCallerId } });\n onDismissTriggered();\n }\n };\n\n const dialpadModalStyle: Partial<IModalStyles> = useMemo(() => themeddialpadModalStyle(theme), [theme]);\n\n const dialpadStyle: Partial<DialpadStyles> = useMemo(() => themedDialpadStyle(isMobile, theme), [theme, isMobile]);\n\n const callButtonStyle: Partial<IButtonStyles> = useMemo(() => themedCallButtonStyle(theme), [theme]);\n\n const dialpadComponent = (): JSX.Element => {\n return (\n <>\n <Dialpad styles={dialpadStyle} onChange={setTextFieldInput} isMobile={isMobile} />\n <PrimaryButton\n text={strings.dialpadStartCallButtonLabel}\n onRenderIcon={() => DialpadStartCallIconTrampoline()}\n onClick={onClickCall}\n styles={callButtonStyle}\n disabled={textFieldInput === ''}\n />\n </>\n );\n\n return <></>;\n };\n\n if (isMobile) {\n return (\n <Stack data-ui-id=\"call-with-chat-composite-dialpad\">\n {showDialpad && (\n <Stack styles={drawerContainerStyles()}>\n <_DrawerSurface onLightDismiss={onDismissTriggered} disableMaxHeight={true}>\n <Stack style={{ padding: '1rem' }}>{dialpadComponent()}</Stack>\n </_DrawerSurface>\n </Stack>\n )}\n </Stack>\n );\n }\n\n return (\n <>\n {\n <Modal\n titleAriaId={strings.dialpadModalAriaLabel}\n isOpen={showDialpad}\n onDismiss={onDismissTriggered}\n isBlocking={true}\n styles={dialpadModalStyle}\n data-ui-id=\"call-with-chat-composite-dialpad\"\n >\n <Stack horizontal horizontalAlign=\"space-between\" verticalAlign=\"center\">\n <Text>{strings.dialpadModalTitle}</Text>\n <IconButton\n iconProps={{ iconName: 'Cancel' }}\n ariaLabel={strings.dialpadCloseModalButtonAriaLabel}\n onClick={onDismissTriggered}\n style={{ color: theme.palette.black }}\n />\n </Stack>\n\n <Stack style={{ overflow: 'hidden' }}>{dialpadComponent()}</Stack>\n </Modal>\n }\n </>\n );\n};\n\nfunction DialpadStartCallIconTrampoline(): JSX.Element {\n /* @conditional-compile-remove(PSTN-calls) */\n return <CallWithChatCompositeIcon iconName=\"DialpadStartCall\" />;\n return <></>;\n}\n\"../../../../react-components/src\""]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SpokenLanguageDrawer.styles.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAGnD;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAY,EAAqB,EAAE,CAAC,CAAC;IAC9E,IAAI,EAAE;QACJ,
|
1
|
+
{"version":3,"file":"SpokenLanguageDrawer.styles.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAGnD;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAY,EAAqB,EAAE,CAAC,CAAC;IAC9E,IAAI,EAAE;QACJ,QAAQ,EAAE,MAAM;KACjB;IACD,mBAAmB,EAAE;QACnB,sBAAsB,EAAE;YACtB,IAAI,EAAE;gBACJ,IAAI,EAAE;oBACJ,UAAU,EAAE,GAAG;oBACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;oBACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;oBACxB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;iBACjC;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Theme } from '@fluentui/react';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { _DrawerMenuStyles } from '@internal/react-components';\n\n/**\n * @private\n */\nexport const spokenLanguageDrawerStyles = (theme: Theme): _DrawerMenuStyles => ({\n root: {\n overflow: 'auto'\n },\n drawerSurfaceStyles: {\n drawerContentContainer: {\n root: {\n span: {\n fontWeight: 600,\n fontSize: _pxToRem(17),\n lineHeight: _pxToRem(22),\n color: theme.palette.neutralDark\n }\n }\n }\n }\n});\n\"../../../../../acs-ui-common/src\"\"../../../../../react-components/src\""]}
|
@@ -29,7 +29,7 @@ export const SendDtmfDialpad = (props) => {
|
|
29
29
|
const dialpadStyle = useMemo(() => themedDialpadStyle(isMobile, theme), [theme, isMobile]);
|
30
30
|
if (isMobile) {
|
31
31
|
return (React.createElement(Stack, null, showDialpad && (React.createElement(Stack, { styles: drawerContainerStyles() },
|
32
|
-
React.createElement(_DrawerSurface, { onLightDismiss: onDismissTriggered },
|
32
|
+
React.createElement(_DrawerSurface, { disableMaxHeight: true, onLightDismiss: onDismissTriggered },
|
33
33
|
React.createElement(Stack, { style: { padding: '1rem' } },
|
34
34
|
React.createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { showDeleteButton: false, textFieldValue: textFieldValue, onChange: onChange, strings: strings, isMobile: isMobile }))))))));
|
35
35
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SendDtmfDialpad.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/SendDtmfDialpad.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,OAAO,EAAiB,yCAAmC;AACpE,OAAO,EAAqC,cAAc,EAAE,yCAAmC;AAC/F,OAAO,EAAgB,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAiBrF,eAAe;AACf,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAe,EAAE;IAC1E,MAAM,YAAY,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAE1C,MAAM,E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,CACI,CACF,CAET,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React, { useState } from 'react';\nimport { useMemo } from 'react';\nimport { Dialpad, DialpadStyles } from '@internal/react-components';\nimport { _DrawerMenu, _DrawerMenuItemProps, _DrawerSurface } from '@internal/react-components';\nimport { IModalStyles, Modal, Stack, useTheme, IconButton } from '@fluentui/react';\n\nimport { themeddialpadModalStyle, themedDialpadStyle } from './SendDtmfDialpad.styles';\nimport { usePropsFor } from '../CallComposite/hooks/usePropsFor';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\n\n/** @private */\nexport interface SendDtmfDialpadStrings {\n dialpadModalAriaLabel: string;\n dialpadCloseModalButtonAriaLabel: string;\n placeholderText: string;\n}\n\n/** @private */\nexport interface SendDtmfDialpadProps {\n isMobile: boolean;\n showDialpad: boolean;\n strings: SendDtmfDialpadStrings;\n onDismissDialpad: () => void;\n}\n\n/** @private */\nexport const SendDtmfDialpad = (props: SendDtmfDialpadProps): JSX.Element => {\n const dialpadProps = usePropsFor(Dialpad);\n\n const { strings, isMobile, showDialpad, onDismissDialpad } = props;\n\n const theme = useTheme();\n\n const onDismissTriggered = (): void => {\n onDismissDialpad();\n };\n\n const [textFieldValue, setTextFieldValue] = useState<string>();\n\n const onChange = (input: string): void => {\n if (input.length > 25) {\n setTextFieldValue(input.slice(1));\n } else {\n setTextFieldValue(input);\n }\n };\n\n const dialpadModalStyle: Partial<IModalStyles> = useMemo(() => themeddialpadModalStyle(theme), [theme]);\n\n const dialpadStyle: Partial<DialpadStyles> = useMemo(() => themedDialpadStyle(isMobile, theme), [theme, isMobile]);\n\n if (isMobile) {\n return (\n <Stack>\n {showDialpad && (\n <Stack styles={drawerContainerStyles()}>\n <_DrawerSurface disableMaxHeight={true} onLightDismiss={onDismissTriggered}>\n <Stack style={{ padding: '1rem' }}>\n <Dialpad\n styles={dialpadStyle}\n {...dialpadProps}\n showDeleteButton={false}\n textFieldValue={textFieldValue}\n onChange={onChange}\n strings={strings}\n isMobile={isMobile}\n />\n </Stack>\n </_DrawerSurface>\n </Stack>\n )}\n </Stack>\n );\n }\n\n return (\n <>\n {\n <Modal\n titleAriaId={strings.dialpadModalAriaLabel}\n isOpen={showDialpad}\n onDismiss={onDismissTriggered}\n isBlocking={true}\n styles={dialpadModalStyle}\n >\n <Stack horizontal horizontalAlign=\"end\" verticalAlign=\"center\">\n <IconButton\n iconProps={{ iconName: 'Cancel' }}\n ariaLabel={strings.dialpadCloseModalButtonAriaLabel}\n onClick={onDismissTriggered}\n style={{ color: theme.palette.black }}\n />\n </Stack>\n\n <Stack style={{ overflow: 'hidden' }}>\n <Dialpad\n styles={dialpadStyle}\n {...dialpadProps}\n textFieldValue={textFieldValue}\n onChange={onChange}\n showDeleteButton={false}\n strings={strings}\n isMobile={isMobile}\n />\n </Stack>\n </Modal>\n }\n </>\n );\n};\n\"../../../../react-components/src\""]}
|