@azure/communication-react 1.20.0-alpha-202409241651 → 1.20.0-alpha-202409260015
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 +15 -14
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-4h-naDvk.js → ChatMessageComponentAsRichTextEditBox-D42-cJxc.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-4h-naDvk.js.map → ChatMessageComponentAsRichTextEditBox-D42-cJxc.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-ChJjJ010.js → RichTextSendBoxWrapper-BkOCT0LJ.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-ChJjJ010.js.map → RichTextSendBoxWrapper-BkOCT0LJ.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-DwDfOjtr.js → index-Bb1hVEre.js} +157 -344
- package/dist/dist-cjs/communication-react/index-Bb1hVEre.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +2 -2
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -3
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -5
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +3 -12
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +2 -7
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +3 -0
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +8 -22
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/incomingCallStackSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +3 -8
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +7 -3
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +8 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +3 -2
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +2 -4
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +1 -6
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +3 -3
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -2
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +0 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +0 -4
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js +2 -1
- package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.js +0 -2
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/IncomingCallNotification.js +7 -30
- package/dist/dist-esm/react-components/src/components/IncomingCallNotification.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/IncomingCallStack.js +1 -5
- package/dist/dist-esm/react-components/src/components/IncomingCallStack.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/InputBoxButton.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/InputBoxButton.js +8 -9
- package/dist/dist-esm/react-components/src/components/InputBoxButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +0 -2
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.js +1 -4
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +5 -7
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +14 -18
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.js +11 -21
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/StreamMedia.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/StreamMedia.js +5 -3
- package/dist/dist-esm/react-components/src/components/StreamMedia.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +1 -6
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +1 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/VideoTile.js +3 -11
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.js +0 -2
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +1 -4
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +2 -4
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.d.ts +8 -0
- package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.js +27 -0
- package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +3 -3
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +0 -8
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +1 -1
- package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +1 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +2 -10
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +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/CallArrangement.js +3 -15
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -11
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +8 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +1 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +0 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +7 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js +1 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +1 -8
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +5 -15
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -6
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +3 -14
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +1 -3
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +1 -7
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +6 -19
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +0 -4
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +0 -3
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +2 -13
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -4
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +4 -4
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-DwDfOjtr.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":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AAE,MAAM,CAAC,CAAC;QAC3E,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,IAAI,KAAK,CAAC,UAAU,EAAE,IAAI,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,CAAuB,CAAC;AACpG,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CACvB,2BAAyD,EACzD,OAA2B,EACR,EAAE;;IACrB,MAAM,IAAI,GAAG,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,0CAAE,IAAI,mCAAI,EAAE,CAAC;IAC9C,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,CAAC,CAAC;IAC1D,uCACK,OAAO,KACV,WAAW,kCACN,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KACvB,IAAI,OAEN;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { deviceManagerDeclaratify } from './DeviceManagerDeclarative';\nimport { CallClient, CallClientOptions, CreateViewOptions, DeviceManager } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { Features } from '@azure/communication-calling';\nimport { CallClientState, LocalVideoStreamState, RemoteVideoStreamState } from './CallClientState';\nimport { CallContext } from './CallContext';\nimport { callAgentDeclaratify, DeclarativeCallAgent } from './CallAgentDeclarative';\nimport { InternalCallContext } from './InternalCallContext';\nimport { createView, disposeView, CreateViewResult } from './StreamUtils';\nimport { CommunicationIdentifier, CommunicationUserIdentifier, getIdentifierKind } from '@azure/communication-common';\nimport {\n toFlatCommunicationIdentifier,\n _getApplicationId,\n _TelemetryImplementationHint\n} from '@internal/acs-ui-common';\nimport { callingStatefulLogger } from './Logger';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { DeclarativeTeamsCallAgent, teamsCallAgentDeclaratify } from './TeamsCallAgentDeclarative';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { MicrosoftTeamsUserIdentifier } from '@azure/communication-common';\nimport { videoStreamRendererViewDeclaratify } from './VideoStreamRendererViewDeclarative';\n\n/**\n * Defines the methods that allow CallClient {@link @azure/communication-calling#CallClient} to be used statefully.\n * The interface provides access to proxied state and also allows registering a handler for state change events. For\n * state definition see {@link CallClientState}.\n *\n * State change events are driven by:\n * - Returned data from {@link @azure/communication-calling#DeviceManager} APIs.\n * - Returned data from {@link @azure/communication-calling#CallAgent} APIs.\n * - Listeners automatically attached to various azure communication-calling objects:\n * - CallAgent 'incomingCall'\n * - CallAgent 'callsUpdated'\n * - DeviceManager 'videoDevicesUpdated'\n * - DeviceManager 'audioDevicesUpdated\n * - DeviceManager 'selectedMicrophoneChanged'\n * - DeviceManager 'selectedSpeakerChanged'\n * - Call 'stateChanged'\n * - Call 'idChanged'\n * - Call 'isMutedChanged'\n * - Call 'isScreenSharingOnChanged'\n * - Call 'remoteParticipantsUpdated'\n * - Call 'localVideoStreamsUpdated'\n * - IncomingCall 'callEnded'\n * - RemoteParticipant 'stateChanged'\n * - RemoteParticipant 'isMutedChanged'\n * - RemoteParticipant 'displayNameChanged'\n * - RemoteParticipant 'isSpeakingChanged'\n * - RemoteParticipant 'videoStreamsUpdated'\n * - RemoteVideoStream 'isAvailableChanged'\n * - TranscriptionCallFeature 'isTranscriptionActiveChanged'\n * - RecordingCallFeature 'isRecordingActiveChanged'\n * - LocalRecordingCallFeature 'isLocalRecordingActiveChanged'\n * - RaiseHandCallFeature 'raisedHandEvent'\n * - RaiseHandCallFeature 'loweredHandEvent'\n * - PPTLiveCallFeature 'isAciveChanged'\n * - ReactionCallFeature 'reaction'\n *\n * @public\n */\nexport interface StatefulCallClient extends CallClient {\n /**\n * Holds all the state that we could proxy from CallClient {@link @azure/communication-calling#CallClient} as\n * CallClientState {@link CallClientState}.\n */\n getState(): CallClientState;\n /**\n * Allows a handler to be registered for 'stateChanged' events.\n *\n * @param handler - Callback to receive the state.\n */\n onStateChange(handler: (state: CallClientState) => void): void;\n /**\n * Allows unregistering for 'stateChanged' events.\n *\n * @param handler - Original callback to be unsubscribed.\n */\n offStateChange(handler: (state: CallClientState) => void): void;\n /**\n * Renders a {@link RemoteVideoStreamState} or {@link LocalVideoStreamState} and stores the resulting\n * {@link VideoStreamRendererViewState} under the relevant {@link RemoteVideoStreamState} or\n * {@link LocalVideoStreamState} or as unparented view in the state. Under the hood calls\n * {@link @azure/communication-calling#VideoStreamRenderer.createView}.\n *\n * Scenario 1: Render RemoteVideoStreamState\n * - CallId is required, participantId is required, and stream of type RemoteVideoStreamState is required\n * - Resulting {@link VideoStreamRendererViewState} is stored in the given callId and participantId in\n * {@link CallClientState}\n *\n * Scenario 2: Render LocalVideoStreamState for a call\n * - CallId is required, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n * - The {@link @azure/communication-calling#Call.localVideoStreams} must already be started using\n * {@link @azure/communication-calling#Call.startVideo}.\n * - Resulting {@link VideoStreamRendererViewState} is stored in the given callId {@link CallState.localVideoStreams}\n * in {@link CallClientState}.\n *\n * - Scenario 2: Render LocalVideoStreamState not part of a call (example rendering camera for local preview)\n * - CallId must be undefined, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n * - Resulting {@link VideoStreamRendererViewState} is stored in under the given LocalVideoStreamState in\n * {@link CallClientState.deviceManager.unparentedViews}\n *\n * @param callId - CallId for the given stream. Can be undefined if the stream is not part of any call.\n * @param participantId - {@link RemoteParticipant.identifier} associated with the given RemoteVideoStreamState. Could\n * be undefined if rendering LocalVideoStreamState.\n * @param stream - The LocalVideoStreamState or RemoteVideoStreamState to start rendering.\n * @param options - Options that are passed to the {@link @azure/communication-calling#VideoStreamRenderer}.\n */\n createView(\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState,\n options?: CreateViewOptions\n ): Promise<CreateViewResult | undefined>;\n /**\n * Stops rendering a {@link RemoteVideoStreamState} or {@link LocalVideoStreamState} and removes the\n * {@link VideoStreamRendererView} from the relevant {@link RemoteVideoStreamState} in {@link CallClientState} or\n * {@link LocalVideoStream} in {@link CallClientState} or appropriate\n * {@link CallClientState.deviceManager.unparentedViews} Under the hood calls\n * {@link @azure/communication-calling#VideoStreamRenderer.dispose}.\n *\n * Its important to disposeView to clean up resources properly.\n *\n * Scenario 1: Dispose RemoteVideoStreamState\n * - CallId is required, participantId is required, and stream of type RemoteVideoStreamState is required\n *\n * Scenario 2: Dispose LocalVideoStreamState for a call\n * - CallId is required, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n *\n * - Scenario 2: Dispose LocalVideoStreamState not part of a call\n * - CallId must be undefined, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n * - LocalVideoStreamState must be the original one passed to createView.\n *\n * @param callId - CallId for the given stream. Can be undefined if the stream is not part of any call.\n * @param participantId - {@link RemoteParticipant.identifier} associated with the given RemoteVideoStreamState. Could\n * be undefined if disposing LocalVideoStreamState.\n * @param stream - The LocalVideoStreamState or RemoteVideoStreamState to dispose.\n */\n disposeView(\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState\n ): void;\n\n /** @conditional-compile-remove(one-to-n-calling) */\n /**\n * The CallAgent is used to handle calls.\n * To create the CallAgent, pass a CommunicationTokenCredential object provided from SDK.\n * - The CallClient can only have one active CallAgent instance at a time.\n * - You can create a new CallClient instance to create a new CallAgent.\n * - You can dispose of a CallClient's current active CallAgent, and call the CallClient's\n * createCallAgent() method again to create a new CallAgent.\n * @param tokenCredential - The token credential. Use AzureCommunicationTokenCredential from `@azure/communication-common` to create a credential.\n * @param options - The CallAgentOptions for additional options like display name.\n * @public\n */\n createCallAgent(...args: Parameters<CallClient['createCallAgent']>): Promise<DeclarativeCallAgent>;\n\n /* @conditional-compile-remove(teams-identity-support) */\n /**\n * The TeamsCallAgent is used to handle calls.\n * To create the TeamsCallAgent, pass a CommunicationTokenCredential object provided from SDK.\n * - The CallClient can only have one active TeamsCallAgent instance at a time.\n * - You can create a new CallClient instance to create a new TeamsCallAgent.\n * - You can dispose of a CallClient's current active TeamsCallAgent, and call the CallClient's\n * createTeamsCallAgent() method again to create a new TeamsCallAgent.\n * @param tokenCredential - The token credential. Use AzureCommunicationTokenCredential from `@azure/communication-common` to create a credential.\n * @param options - The TeamsCallAgentOptions for additional options like display name.\n * @public\n */\n createTeamsCallAgent(...args: Parameters<CallClient['createTeamsCallAgent']>): Promise<DeclarativeTeamsCallAgent>;\n}\n\n/**\n * A function to modify the state of the StatefulCallClient.\n *\n * Provided as a callback to the {@link StatefulCallClient.modifyState} method.\n *\n * The function must modify the provided state in place as much as possible.\n * Making large modifications can lead to bad performance by causing spurious rerendering of the UI.\n *\n * Consider using commonly used modifier functions exported from this package.\n */\nexport type CallStateModifier = (state: CallClientState) => void;\n\n/**\n * ProxyCallClient proxies CallClient {@link @azure/communication-calling#CallClient} and subscribes to all events that\n * affect state. ProxyCallClient keeps its own copy of the call state and when state is updated, ProxyCallClient emits\n * the event 'stateChanged'.\n */\nclass ProxyCallClient implements ProxyHandler<CallClient> {\n private _context: CallContext;\n private _internalContext: InternalCallContext;\n private _callAgent:\n | DeclarativeCallAgent\n | /* @conditional-compile-remove(teams-identity-support) */ DeclarativeTeamsCallAgent\n | undefined;\n private _deviceManager: DeviceManager | undefined;\n private _sdkDeviceManager: DeviceManager | undefined;\n\n constructor(context: CallContext, internalContext: InternalCallContext) {\n this._context = context;\n this._internalContext = internalContext;\n }\n\n public get<P extends keyof CallClient>(target: CallClient, prop: P): any {\n switch (prop) {\n case 'createCallAgent': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<CallClient['createCallAgent']>): Promise<DeclarativeCallAgent> => {\n // createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous\n // callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative\n // callAgent if the createCallAgent succeeds.\n const callAgent = await target.createCallAgent(...args);\n this._callAgent = callAgentDeclaratify(callAgent, this._context, this._internalContext);\n this._context.setCallAgent({\n displayName: this._callAgent.displayName\n });\n return this._callAgent;\n },\n 'CallClient.createCallAgent'\n );\n }\n case 'createTeamsCallAgent': {\n /* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<CallClient['createTeamsCallAgent']>): Promise<DeclarativeTeamsCallAgent> => {\n // createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous\n // callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative\n // callAgent if the createCallAgent succeeds.\n const callAgent = await target.createTeamsCallAgent(...args);\n this._callAgent = teamsCallAgentDeclaratify(callAgent, this._context, this._internalContext);\n this._context.setCallAgent({\n displayName: undefined\n });\n return this._callAgent;\n },\n 'CallClient.createTeamsCallAgent'\n );\n return Reflect.get(target, prop);\n }\n case 'getDeviceManager': {\n return this._context.withAsyncErrorTeedToState(async () => {\n // As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of\n // DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll\n // throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.\n const deviceManager = await target.getDeviceManager();\n if (this._sdkDeviceManager) {\n if (this._sdkDeviceManager === deviceManager) {\n return this._deviceManager;\n } else {\n throw new Error(\n 'Multiple DeviceManager not supported. This means a incompatible version of communication-calling is ' +\n 'used OR calling declarative was not properly updated to communication-calling version.'\n );\n }\n } else {\n this._sdkDeviceManager = deviceManager;\n }\n this._deviceManager = deviceManagerDeclaratify(deviceManager, this._context, this._internalContext);\n return this._deviceManager;\n }, 'CallClient.getDeviceManager');\n }\n case 'feature': {\n /* @conditional-compile-remove(unsupported-browser) */\n return this._context.withErrorTeedToState((...args: Parameters<CallClient['feature']>) => {\n if (args[0] === Features.DebugInfo) {\n const feature = target.feature(Features.DebugInfo);\n /**\n * add to this object if we want to proxy anything else off the DebugInfo feature object.\n */\n return {\n ...feature,\n getEnvironmentInfo: async () => {\n const environmentInfo = await feature.getEnvironmentInfo();\n this._context.setEnvironmentInfo(environmentInfo);\n return environmentInfo;\n }\n };\n }\n return Reflect.get(target, prop);\n }, 'CallClient.feature');\n }\n default:\n return Reflect.get(target, prop);\n }\n }\n}\n\n/**\n * Arguments to construct the StatefulCallClient.\n *\n * @public\n */\nexport type StatefulCallClientArgs = {\n /**\n * UserId from SDK. This is provided for developer convenience to easily access the userId from the\n * state. It is not used by StatefulCallClient.\n */\n userId:\n | CommunicationUserIdentifier\n | /* @conditional-compile-remove(teams-identity-support) */ MicrosoftTeamsUserIdentifier;\n};\n\n/**\n * Options to construct the StatefulCallClient with.\n *\n * @public\n */\nexport type StatefulCallClientOptions = {\n /**\n * Options to construct the {@link @axure/communication-calling#CallClient} with.\n */\n callClientOptions: CallClientOptions;\n /**\n * Sets the max listeners limit of the 'stateChange' event. Defaults to the node.js EventEmitter.defaultMaxListeners\n * if not specified.\n */\n maxStateChangeListeners?: number;\n};\n\n/**\n * Creates a StatefulCallClient {@link StatefulCallClient} by proxying CallClient\n * {@link @azure/communication-calling#CallClient} with ProxyCallClient {@link ProxyCallClient} which then allows access\n * to state in a declarative way.\n *\n * It is important to use the {@link @azure/communication-calling#DeviceManager} and\n * {@link @azure/communication-calling#CallAgent} and {@link @azure/communication-calling#Call} (and etc.) that are\n * obtained from the StatefulCallClient in order for their state changes to be proxied properly.\n *\n * @param args - {@link StatefulCallClientArgs}\n * @param options - {@link StatefulCallClientOptions}\n *\n * @public\n */\nexport const createStatefulCallClient = (\n args: StatefulCallClientArgs,\n options?: StatefulCallClientOptions\n): StatefulCallClient => {\n return _createStatefulCallClientInner(args, options);\n};\n\n/**\n * This inner function is used to allow injection of TelemetryImplementationHint without changing the public API.\n *\n * @internal\n */\nexport const _createStatefulCallClientInner = (\n args: StatefulCallClientArgs,\n options?: StatefulCallClientOptions,\n telemetryImplementationHint: _TelemetryImplementationHint = 'StatefulComponents'\n): StatefulCallClient => {\n callingStatefulLogger.info(\n `Creating calling stateful client using library version: ${_getApplicationId(telemetryImplementationHint)}`\n );\n return createStatefulCallClientWithDeps(\n new CallClient(withTelemetryTag(telemetryImplementationHint, options?.callClientOptions)),\n new CallContext(getIdentifierKind(args.userId), options?.maxStateChangeListeners),\n new InternalCallContext()\n );\n};\n\n/**\n * Package-internal version of createStatefulCallClient that allows dependency injection.\n *\n * This function should not be exported from the package.\n */\nexport const createStatefulCallClientWithDeps = (\n callClient: CallClient,\n context: CallContext,\n internalContext: InternalCallContext\n): StatefulCallClient => {\n Object.defineProperty(callClient, 'getState', {\n configurable: false,\n value: () => context.getState()\n });\n Object.defineProperty(callClient, 'onStateChange', {\n configurable: false,\n value: (handler: (state: CallClientState) => void) => context.onStateChange(handler)\n });\n Object.defineProperty(callClient, 'offStateChange', {\n configurable: false,\n value: (handler: (state: CallClientState) => void) => context.offStateChange(handler)\n });\n Object.defineProperty(callClient, 'createView', {\n configurable: false,\n value: async (\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState,\n options?: CreateViewOptions\n ): Promise<CreateViewResult | undefined> => {\n const participantIdKind = participantId ? getIdentifierKind(participantId) : undefined;\n const result = await createView(context, internalContext, callId, participantIdKind, stream, options);\n // We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.\n if ('id' in stream && callId && participantId && result) {\n const participantKey = toFlatCommunicationIdentifier(participantId);\n result.view = videoStreamRendererViewDeclaratify(result.view, context, callId, participantKey, stream.id);\n }\n return result;\n }\n });\n Object.defineProperty(callClient, 'disposeView', {\n configurable: false,\n value: (\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState\n ): void => {\n const participantIdKind = participantId ? getIdentifierKind(participantId) : undefined;\n disposeView(context, internalContext, callId, participantIdKind, stream);\n }\n });\n\n return new Proxy(callClient, new ProxyCallClient(context, internalContext)) as StatefulCallClient;\n};\n\nconst withTelemetryTag = (\n telemetryImplementationHint: _TelemetryImplementationHint,\n options?: CallClientOptions\n): CallClientOptions => {\n const tags = options?.diagnostics?.tags ?? [];\n tags.push(_getApplicationId(telemetryImplementationHint));\n return {\n ...options,\n diagnostics: {\n ...options?.diagnostics,\n tags\n }\n };\n};\n"]}
|
1
|
+
{"version":3,"file":"StatefulCallClient.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/StatefulCallClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,UAAU,EAAuD,MAAM,8BAA8B,CAAC;AAC/G,sDAAsD;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAwB,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAwD,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACtH,OAAO,EACL,6BAA6B,EAC7B,iBAAiB,EAElB,gCAAgC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,yDAAyD;AACzD,OAAO,EAA6B,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGnG,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAmK1F;;;;GAIG;AACH,MAAM,eAAe;IAUnB,YAAY,OAAoB,EAAE,eAAoC;QACpE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAC1C,CAAC;IAEM,GAAG,CAA6B,MAAkB,EAAE,IAAO;QAChE,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,iBAAiB,CAAC,CAAC,CAAC;gBACvB,OAAO,IAAI,CAAC,QAAQ,CAAC,yBAAyB,C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C,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACvF,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,CAAC,CAAC;QAC3E,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,IAAI,KAAK,CAAC,UAAU,EAAE,IAAI,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,CAAuB,CAAC;AACpG,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CACvB,2BAAyD,EACzD,OAA2B,EACR,EAAE;;IACrB,MAAM,IAAI,GAAG,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,0CAAE,IAAI,mCAAI,EAAE,CAAC;IAC9C,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,CAAC,CAAC;IAC1D,uCACK,OAAO,KACV,WAAW,kCACN,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KACvB,IAAI,OAEN;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { deviceManagerDeclaratify } from './DeviceManagerDeclarative';\nimport { CallClient, CallClientOptions, CreateViewOptions, DeviceManager } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { Features } from '@azure/communication-calling';\nimport { CallClientState, LocalVideoStreamState, RemoteVideoStreamState } from './CallClientState';\nimport { CallContext } from './CallContext';\nimport { callAgentDeclaratify, DeclarativeCallAgent } from './CallAgentDeclarative';\nimport { InternalCallContext } from './InternalCallContext';\nimport { createView, disposeView, CreateViewResult } from './StreamUtils';\nimport { CommunicationIdentifier, CommunicationUserIdentifier, getIdentifierKind } from '@azure/communication-common';\nimport {\n toFlatCommunicationIdentifier,\n _getApplicationId,\n _TelemetryImplementationHint\n} from '@internal/acs-ui-common';\nimport { callingStatefulLogger } from './Logger';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { DeclarativeTeamsCallAgent, teamsCallAgentDeclaratify } from './TeamsCallAgentDeclarative';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { MicrosoftTeamsUserIdentifier } from '@azure/communication-common';\nimport { videoStreamRendererViewDeclaratify } from './VideoStreamRendererViewDeclarative';\n\n/**\n * Defines the methods that allow CallClient {@link @azure/communication-calling#CallClient} to be used statefully.\n * The interface provides access to proxied state and also allows registering a handler for state change events. For\n * state definition see {@link CallClientState}.\n *\n * State change events are driven by:\n * - Returned data from {@link @azure/communication-calling#DeviceManager} APIs.\n * - Returned data from {@link @azure/communication-calling#CallAgent} APIs.\n * - Listeners automatically attached to various azure communication-calling objects:\n * - CallAgent 'incomingCall'\n * - CallAgent 'callsUpdated'\n * - DeviceManager 'videoDevicesUpdated'\n * - DeviceManager 'audioDevicesUpdated\n * - DeviceManager 'selectedMicrophoneChanged'\n * - DeviceManager 'selectedSpeakerChanged'\n * - Call 'stateChanged'\n * - Call 'idChanged'\n * - Call 'isMutedChanged'\n * - Call 'isScreenSharingOnChanged'\n * - Call 'remoteParticipantsUpdated'\n * - Call 'localVideoStreamsUpdated'\n * - IncomingCall 'callEnded'\n * - RemoteParticipant 'stateChanged'\n * - RemoteParticipant 'isMutedChanged'\n * - RemoteParticipant 'displayNameChanged'\n * - RemoteParticipant 'isSpeakingChanged'\n * - RemoteParticipant 'videoStreamsUpdated'\n * - RemoteVideoStream 'isAvailableChanged'\n * - TranscriptionCallFeature 'isTranscriptionActiveChanged'\n * - RecordingCallFeature 'isRecordingActiveChanged'\n * - LocalRecordingCallFeature 'isLocalRecordingActiveChanged'\n * - RaiseHandCallFeature 'raisedHandEvent'\n * - RaiseHandCallFeature 'loweredHandEvent'\n * - PPTLiveCallFeature 'isAciveChanged'\n * - ReactionCallFeature 'reaction'\n *\n * @public\n */\nexport interface StatefulCallClient extends CallClient {\n /**\n * Holds all the state that we could proxy from CallClient {@link @azure/communication-calling#CallClient} as\n * CallClientState {@link CallClientState}.\n */\n getState(): CallClientState;\n /**\n * Allows a handler to be registered for 'stateChanged' events.\n *\n * @param handler - Callback to receive the state.\n */\n onStateChange(handler: (state: CallClientState) => void): void;\n /**\n * Allows unregistering for 'stateChanged' events.\n *\n * @param handler - Original callback to be unsubscribed.\n */\n offStateChange(handler: (state: CallClientState) => void): void;\n /**\n * Renders a {@link RemoteVideoStreamState} or {@link LocalVideoStreamState} and stores the resulting\n * {@link VideoStreamRendererViewState} under the relevant {@link RemoteVideoStreamState} or\n * {@link LocalVideoStreamState} or as unparented view in the state. Under the hood calls\n * {@link @azure/communication-calling#VideoStreamRenderer.createView}.\n *\n * Scenario 1: Render RemoteVideoStreamState\n * - CallId is required, participantId is required, and stream of type RemoteVideoStreamState is required\n * - Resulting {@link VideoStreamRendererViewState} is stored in the given callId and participantId in\n * {@link CallClientState}\n *\n * Scenario 2: Render LocalVideoStreamState for a call\n * - CallId is required, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n * - The {@link @azure/communication-calling#Call.localVideoStreams} must already be started using\n * {@link @azure/communication-calling#Call.startVideo}.\n * - Resulting {@link VideoStreamRendererViewState} is stored in the given callId {@link CallState.localVideoStreams}\n * in {@link CallClientState}.\n *\n * - Scenario 2: Render LocalVideoStreamState not part of a call (example rendering camera for local preview)\n * - CallId must be undefined, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n * - Resulting {@link VideoStreamRendererViewState} is stored in under the given LocalVideoStreamState in\n * {@link CallClientState.deviceManager.unparentedViews}\n *\n * @param callId - CallId for the given stream. Can be undefined if the stream is not part of any call.\n * @param participantId - {@link RemoteParticipant.identifier} associated with the given RemoteVideoStreamState. Could\n * be undefined if rendering LocalVideoStreamState.\n * @param stream - The LocalVideoStreamState or RemoteVideoStreamState to start rendering.\n * @param options - Options that are passed to the {@link @azure/communication-calling#VideoStreamRenderer}.\n */\n createView(\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState,\n options?: CreateViewOptions\n ): Promise<CreateViewResult | undefined>;\n /**\n * Stops rendering a {@link RemoteVideoStreamState} or {@link LocalVideoStreamState} and removes the\n * {@link VideoStreamRendererView} from the relevant {@link RemoteVideoStreamState} in {@link CallClientState} or\n * {@link LocalVideoStream} in {@link CallClientState} or appropriate\n * {@link CallClientState.deviceManager.unparentedViews} Under the hood calls\n * {@link @azure/communication-calling#VideoStreamRenderer.dispose}.\n *\n * Its important to disposeView to clean up resources properly.\n *\n * Scenario 1: Dispose RemoteVideoStreamState\n * - CallId is required, participantId is required, and stream of type RemoteVideoStreamState is required\n *\n * Scenario 2: Dispose LocalVideoStreamState for a call\n * - CallId is required, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n *\n * - Scenario 2: Dispose LocalVideoStreamState not part of a call\n * - CallId must be undefined, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n * - LocalVideoStreamState must be the original one passed to createView.\n *\n * @param callId - CallId for the given stream. Can be undefined if the stream is not part of any call.\n * @param participantId - {@link RemoteParticipant.identifier} associated with the given RemoteVideoStreamState. Could\n * be undefined if disposing LocalVideoStreamState.\n * @param stream - The LocalVideoStreamState or RemoteVideoStreamState to dispose.\n */\n disposeView(\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState\n ): void;\n\n /**\n * The CallAgent is used to handle calls.\n * To create the CallAgent, pass a CommunicationTokenCredential object provided from SDK.\n * - The CallClient can only have one active CallAgent instance at a time.\n * - You can create a new CallClient instance to create a new CallAgent.\n * - You can dispose of a CallClient's current active CallAgent, and call the CallClient's\n * createCallAgent() method again to create a new CallAgent.\n * @param tokenCredential - The token credential. Use AzureCommunicationTokenCredential from `@azure/communication-common` to create a credential.\n * @param options - The CallAgentOptions for additional options like display name.\n * @public\n */\n createCallAgent(...args: Parameters<CallClient['createCallAgent']>): Promise<DeclarativeCallAgent>;\n\n /* @conditional-compile-remove(teams-identity-support) */\n /**\n * The TeamsCallAgent is used to handle calls.\n * To create the TeamsCallAgent, pass a CommunicationTokenCredential object provided from SDK.\n * - The CallClient can only have one active TeamsCallAgent instance at a time.\n * - You can create a new CallClient instance to create a new TeamsCallAgent.\n * - You can dispose of a CallClient's current active TeamsCallAgent, and call the CallClient's\n * createTeamsCallAgent() method again to create a new TeamsCallAgent.\n * @param tokenCredential - The token credential. Use AzureCommunicationTokenCredential from `@azure/communication-common` to create a credential.\n * @param options - The TeamsCallAgentOptions for additional options like display name.\n * @public\n */\n createTeamsCallAgent(...args: Parameters<CallClient['createTeamsCallAgent']>): Promise<DeclarativeTeamsCallAgent>;\n}\n\n/**\n * A function to modify the state of the StatefulCallClient.\n *\n * Provided as a callback to the {@link StatefulCallClient.modifyState} method.\n *\n * The function must modify the provided state in place as much as possible.\n * Making large modifications can lead to bad performance by causing spurious rerendering of the UI.\n *\n * Consider using commonly used modifier functions exported from this package.\n */\nexport type CallStateModifier = (state: CallClientState) => void;\n\n/**\n * ProxyCallClient proxies CallClient {@link @azure/communication-calling#CallClient} and subscribes to all events that\n * affect state. ProxyCallClient keeps its own copy of the call state and when state is updated, ProxyCallClient emits\n * the event 'stateChanged'.\n */\nclass ProxyCallClient implements ProxyHandler<CallClient> {\n private _context: CallContext;\n private _internalContext: InternalCallContext;\n private _callAgent:\n | DeclarativeCallAgent\n | /* @conditional-compile-remove(teams-identity-support) */ DeclarativeTeamsCallAgent\n | undefined;\n private _deviceManager: DeviceManager | undefined;\n private _sdkDeviceManager: DeviceManager | undefined;\n\n constructor(context: CallContext, internalContext: InternalCallContext) {\n this._context = context;\n this._internalContext = internalContext;\n }\n\n public get<P extends keyof CallClient>(target: CallClient, prop: P): any {\n switch (prop) {\n case 'createCallAgent': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<CallClient['createCallAgent']>): Promise<DeclarativeCallAgent> => {\n // createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous\n // callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative\n // callAgent if the createCallAgent succeeds.\n const callAgent = await target.createCallAgent(...args);\n this._callAgent = callAgentDeclaratify(callAgent, this._context, this._internalContext);\n this._context.setCallAgent({\n displayName: this._callAgent.displayName\n });\n return this._callAgent;\n },\n 'CallClient.createCallAgent'\n );\n }\n case 'createTeamsCallAgent': {\n /* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<CallClient['createTeamsCallAgent']>): Promise<DeclarativeTeamsCallAgent> => {\n // createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous\n // callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative\n // callAgent if the createCallAgent succeeds.\n const callAgent = await target.createTeamsCallAgent(...args);\n this._callAgent = teamsCallAgentDeclaratify(callAgent, this._context, this._internalContext);\n this._context.setCallAgent({\n displayName: undefined\n });\n return this._callAgent;\n },\n 'CallClient.createTeamsCallAgent'\n );\n return Reflect.get(target, prop);\n }\n case 'getDeviceManager': {\n return this._context.withAsyncErrorTeedToState(async () => {\n // As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of\n // DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll\n // throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.\n const deviceManager = await target.getDeviceManager();\n if (this._sdkDeviceManager) {\n if (this._sdkDeviceManager === deviceManager) {\n return this._deviceManager;\n } else {\n throw new Error(\n 'Multiple DeviceManager not supported. This means a incompatible version of communication-calling is ' +\n 'used OR calling declarative was not properly updated to communication-calling version.'\n );\n }\n } else {\n this._sdkDeviceManager = deviceManager;\n }\n this._deviceManager = deviceManagerDeclaratify(deviceManager, this._context, this._internalContext);\n return this._deviceManager;\n }, 'CallClient.getDeviceManager');\n }\n case 'feature': {\n /* @conditional-compile-remove(unsupported-browser) */\n return this._context.withErrorTeedToState((...args: Parameters<CallClient['feature']>) => {\n if (args[0] === Features.DebugInfo) {\n const feature = target.feature(Features.DebugInfo);\n /**\n * add to this object if we want to proxy anything else off the DebugInfo feature object.\n */\n return {\n ...feature,\n getEnvironmentInfo: async () => {\n const environmentInfo = await feature.getEnvironmentInfo();\n this._context.setEnvironmentInfo(environmentInfo);\n return environmentInfo;\n }\n };\n }\n return Reflect.get(target, prop);\n }, 'CallClient.feature');\n }\n default:\n return Reflect.get(target, prop);\n }\n }\n}\n\n/**\n * Arguments to construct the StatefulCallClient.\n *\n * @public\n */\nexport type StatefulCallClientArgs = {\n /**\n * UserId from SDK. This is provided for developer convenience to easily access the userId from the\n * state. It is not used by StatefulCallClient.\n */\n userId:\n | CommunicationUserIdentifier\n | /* @conditional-compile-remove(teams-identity-support) */ MicrosoftTeamsUserIdentifier;\n};\n\n/**\n * Options to construct the StatefulCallClient with.\n *\n * @public\n */\nexport type StatefulCallClientOptions = {\n /**\n * Options to construct the {@link @axure/communication-calling#CallClient} with.\n */\n callClientOptions: CallClientOptions;\n /**\n * Sets the max listeners limit of the 'stateChange' event. Defaults to the node.js EventEmitter.defaultMaxListeners\n * if not specified.\n */\n maxStateChangeListeners?: number;\n};\n\n/**\n * Creates a StatefulCallClient {@link StatefulCallClient} by proxying CallClient\n * {@link @azure/communication-calling#CallClient} with ProxyCallClient {@link ProxyCallClient} which then allows access\n * to state in a declarative way.\n *\n * It is important to use the {@link @azure/communication-calling#DeviceManager} and\n * {@link @azure/communication-calling#CallAgent} and {@link @azure/communication-calling#Call} (and etc.) that are\n * obtained from the StatefulCallClient in order for their state changes to be proxied properly.\n *\n * @param args - {@link StatefulCallClientArgs}\n * @param options - {@link StatefulCallClientOptions}\n *\n * @public\n */\nexport const createStatefulCallClient = (\n args: StatefulCallClientArgs,\n options?: StatefulCallClientOptions\n): StatefulCallClient => {\n return _createStatefulCallClientInner(args, options);\n};\n\n/**\n * This inner function is used to allow injection of TelemetryImplementationHint without changing the public API.\n *\n * @internal\n */\nexport const _createStatefulCallClientInner = (\n args: StatefulCallClientArgs,\n options?: StatefulCallClientOptions,\n telemetryImplementationHint: _TelemetryImplementationHint = 'StatefulComponents'\n): StatefulCallClient => {\n callingStatefulLogger.info(\n `Creating calling stateful client using library version: ${_getApplicationId(telemetryImplementationHint)}`\n );\n return createStatefulCallClientWithDeps(\n new CallClient(withTelemetryTag(telemetryImplementationHint, options?.callClientOptions)),\n new CallContext(getIdentifierKind(args.userId), options?.maxStateChangeListeners),\n new InternalCallContext()\n );\n};\n\n/**\n * Package-internal version of createStatefulCallClient that allows dependency injection.\n *\n * This function should not be exported from the package.\n */\nexport const createStatefulCallClientWithDeps = (\n callClient: CallClient,\n context: CallContext,\n internalContext: InternalCallContext\n): StatefulCallClient => {\n Object.defineProperty(callClient, 'getState', {\n configurable: false,\n value: () => context.getState()\n });\n Object.defineProperty(callClient, 'onStateChange', {\n configurable: false,\n value: (handler: (state: CallClientState) => void) => context.onStateChange(handler)\n });\n Object.defineProperty(callClient, 'offStateChange', {\n configurable: false,\n value: (handler: (state: CallClientState) => void) => context.offStateChange(handler)\n });\n Object.defineProperty(callClient, 'createView', {\n configurable: false,\n value: async (\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState,\n options?: CreateViewOptions\n ): Promise<CreateViewResult | undefined> => {\n const participantIdKind = participantId ? getIdentifierKind(participantId) : undefined;\n const result = await createView(context, internalContext, callId, participantIdKind, stream, options);\n // We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.\n if ('id' in stream && callId && participantId && result) {\n const participantKey = toFlatCommunicationIdentifier(participantId);\n result.view = videoStreamRendererViewDeclaratify(result.view, context, callId, participantKey, stream.id);\n }\n return result;\n }\n });\n Object.defineProperty(callClient, 'disposeView', {\n configurable: false,\n value: (\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState\n ): void => {\n const participantIdKind = participantId ? getIdentifierKind(participantId) : undefined;\n disposeView(context, internalContext, callId, participantIdKind, stream);\n }\n });\n\n return new Proxy(callClient, new ProxyCallClient(context, internalContext)) as StatefulCallClient;\n};\n\nconst withTelemetryTag = (\n telemetryImplementationHint: _TelemetryImplementationHint,\n options?: CallClientOptions\n): CallClientOptions => {\n const tags = options?.diagnostics?.tags ?? [];\n tags.push(_getApplicationId(telemetryImplementationHint));\n return {\n ...options,\n diagnostics: {\n ...options?.diagnostics,\n tags\n }\n };\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TeamsCallAgentDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TeamsCallAgentDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
1
|
+
{"version":3,"file":"TeamsCallAgentDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TeamsCallAgentDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,qBAAqB,EAAyB,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAElH,yDAAyD;AACzD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE/D,yDAAyD;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAqB9D;;;;GAIG;AACH,MAAM,mBAAoB,SAAQ,oBAAoB;IAIpD,YAAY,SAAyB,EAAE,OAAoB,EAAE,eAAoC;QAC/F,KAAK,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QAM1B,cAAS,GAAG,GAAS,EAAE;YAC7B,yDAAyD;YACzD,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;YACtD,yDAAyD;YACzD,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;YAEtD,yDAAyD;YACzD,4HAA4H;YAC5H,0EAA0E;YAC1E,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;gBACzC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC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,EAAE,CAAC;YAC7B,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;YAClB,OAAO;QACT,CAAC;QACD,MAAM,IAAI,KAAK,CACb,qGAAqG,CACtG,CAAC;IACJ,CAAC;IAES,gBAAgB,CAAC,KAAsB,EAAE,IAAuC;QACxF,yDAAyD;QACzD,IAAI,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;YACnB,OAAO;QACT,CAAC;QACD,MAAM,IAAI,KAAK,CACb,uGAAuG,CACxG,CAAC;IACJ,CAAC;IAEM,GAAG,CAAkC,MAAsB,EAAE,IAAO;QACzE,yDAAyD;QACzD,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACvC,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,SAAyB,EACzB,OAAoB,EACpB,eAAoC,EACT,EAAE;IAC7B,qBAAqB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAChD,OAAO,IAAI,KAAK,CACd,SAAS,EACT,IAAI,mBAAmB,CAAC,SAAS,EAAE,OAAO,EAAE,eAAe,CAAC,CAChC,CAAC;AACjC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TeamsCallAgent } from '@azure/communication-calling';\nimport { TeamsIncomingCall } from '@azure/communication-calling';\nimport { CallCommon, CallAgentCommon } from './BetaToStableTypes';\nimport { clearCallRelatedState, DeclarativeCallCommon, ProxyCallAgentCommon } from './CallAgentDeclarativeCommon';\nimport { CallContext } from './CallContext';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { _isTeamsCall, _isTeamsCallAgent } from './TypeGuards';\nimport { InternalCallContext } from './InternalCallContext';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { teamsCallDeclaratify } from './TeamsCallDeclarative';\n\n/**\n * @public\n * Proxies the {@link @azure/communication-calling#TeamsIncomingCall} interface.\n */\nexport type TeamsIncomingCallManagement = {\n /**\n * @beta\n * @Remark This attribute doesn't exist on the {@link @azure/communication-calling#TeamsCallAgent} interface.\n * @returns readonly array of {@link DeclarativeTeamsIncomingCall}\n */\n incomingCalls: ReadonlyArray<TeamsIncomingCall>;\n};\n\n/**\n * @public\n * `DeclarativeTeamsCallAgent` extends and proxies the {@link @azure/communication-calling#TeamsCallAgent}\n */\nexport type DeclarativeTeamsCallAgent = TeamsCallAgent & TeamsIncomingCallManagement;\n\n/**\n * ProxyTeamsCallAgent proxies TeamsCallAgent and saves any returned state in the given context. It will subscribe to all state\n * updates in the TeamsCallAgent and in the contained TeamsCalls and RemoteParticipants. When dispose is called it will\n * unsubscribe from all state updates.\n */\nclass ProxyTeamsCallAgent extends ProxyCallAgentCommon implements ProxyHandler<DeclarativeTeamsCallAgent> {\n /* @conditional-compile-remove(teams-identity-support) */\n private _callAgent: TeamsCallAgent;\n\n constructor(callAgent: TeamsCallAgent, context: CallContext, internalContext: InternalCallContext) {\n super(context, internalContext);\n /* @conditional-compile-remove(teams-identity-support) */\n this._callAgent = callAgent;\n this.subscribe();\n }\n\n private subscribe = (): void => {\n /* @conditional-compile-remove(teams-identity-support) */\n this._callAgent.on('callsUpdated', this.callsUpdated);\n /* @conditional-compile-remove(teams-identity-support) */\n this._callAgent.on('incomingCall', this.incomingCall);\n\n /* @conditional-compile-remove(teams-identity-support) */\n // There could be scenario that when ProxyTeamsCallAgent is created that the given CallAgent already has TeamsCalls. In this\n // case we need to make sure to subscribe to those already existing Calls.\n for (const call of this._callAgent.calls) {\n this.addCall(call);\n }\n };\n\n protected unsubscribe = (): void => {\n /* @conditional-compile-remove(teams-identity-support) */\n this._callAgent.off('callsUpdated', this.callsUpdated);\n /* @conditional-compile-remove(teams-identity-support) */\n this._callAgent.off('incomingCall', this.incomingCall);\n\n this.unregisterSubscriber();\n };\n\n protected callDeclaratify(call: CallCommon, context: CallContext): DeclarativeCallCommon {\n /* @conditional-compile-remove(teams-identity-support) */\n if (_isTeamsCall(call)) {\n return teamsCallDeclaratify(call, context);\n }\n throw new Error('Not reachable code, DeclarativeTeamsCallAgent.callDeclaratify must be called with an TeamsCall.');\n }\n\n protected startCall(agent: TeamsCallAgent, args: Parameters<TeamsCallAgent['startCall']>): CallCommon {\n /* @conditional-compile-remove(teams-identity-support) */\n if (_isTeamsCallAgent(agent)) {\n return agent.startCall(...args);\n }\n throw new Error('Not reachable code, DeclarativeTeamsCallAgent.startCall must be called with an TeamsCallAgent.');\n }\n\n protected joinCall(agent: CallAgentCommon, args: Parameters<TeamsCallAgent['join']>): CallCommon {\n /* @conditional-compile-remove(teams-identity-support) */\n if (_isTeamsCallAgent(agent)) {\n return agent.join(...args);\n }\n throw new Error('Not reachable code, DeclarativeTeamsCallAgent.joinCall must be called with an TeamsCallAgent.');\n }\n\n protected agentSubscribe(agent: CallAgentCommon, args: Parameters<TeamsCallAgent['on']>): void {\n /* @conditional-compile-remove(teams-identity-support) */\n if (_isTeamsCallAgent(agent)) {\n agent.on(...args);\n return;\n }\n throw new Error(\n 'Not reachable code, DeclarativeTeamsCallAgent.agentSubscribe must be called with an TeamsCallAgent.'\n );\n }\n\n protected agentUnsubscribe(agent: CallAgentCommon, args: Parameters<TeamsCallAgent['off']>): void {\n /* @conditional-compile-remove(teams-identity-support) */\n if (_isTeamsCallAgent(agent)) {\n agent.off(...args);\n return;\n }\n throw new Error(\n 'Not reachable code, DeclarativeTeamsCallAgent.agentUnsubscribe must be called with an TeamsCallAgent.'\n );\n }\n\n public get<P extends keyof CallAgentCommon>(target: TeamsCallAgent, prop: P): any {\n /* @conditional-compile-remove(teams-identity-support) */\n return super.getCommon(target, prop);\n }\n}\n\n/**\n * Creates a declarative CallAgent by proxying TeamsCallAgent with ProxyTeamsCallAgent which will track state updates by updating\n * the given context.\n *\n * @param callAgent - TeamsCallAgent from SDK\n * @param context - CallContext from StatefulCallClient\n * @param internalContext- InternalCallContext from StatefulCallClient\n */\nexport const teamsCallAgentDeclaratify = (\n callAgent: TeamsCallAgent,\n context: CallContext,\n internalContext: InternalCallContext\n): DeclarativeTeamsCallAgent => {\n clearCallRelatedState(context, internalContext);\n return new Proxy(\n callAgent,\n new ProxyTeamsCallAgent(callAgent, context, internalContext)\n ) as DeclarativeTeamsCallAgent;\n};\n"]}
|
@@ -36,16 +36,12 @@ export const _isTeamsCallAgent = (callAgent) => {
|
|
36
36
|
* @internal
|
37
37
|
*/
|
38
38
|
export const _isTeamsIncomingCall = (call) => {
|
39
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
40
39
|
return call.kind === 'TeamsIncomingCall';
|
41
|
-
return false;
|
42
40
|
};
|
43
41
|
/**
|
44
42
|
* @internal
|
45
43
|
*/
|
46
44
|
export const _isACSIncomingCall = (call) => {
|
47
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
48
45
|
return call.kind === 'IncomingCall';
|
49
|
-
return false;
|
50
46
|
};
|
51
47
|
//# sourceMappingURL=TypeGuards.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TypeGuards.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TypeGuards.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAgB,EAAgB,EAAE;IAC3D,yDAAyD;IACzD,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC;IAC1C,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAA0B,EAA0B,EAAE;IACpF,yDAAyD;IACzD,OAAO,CAAC,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,KAAK,WAAW,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;GAEG;AACH,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,yDAAyD;IACzD,OAAO,SAAS,CAAC,IAAI,KAAK,gBAAgB,CAAC;IAC3C,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAwB,EAAW,EAAE;IACxE,OAAO,IAAI,CAAC,IAAI,KAAK,mBAAmB,CAAC;AAC3C,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAwB,EAAW,EAAE;IACtE,OAAO,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC;AACtC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Call, CallAgent, TeamsCallAgent, IncomingCallCommon } from '@azure/communication-calling';\nimport { CallAgentCommon, CallCommon, TeamsCall } from './BetaToStableTypes';\n\n/**\n * @internal\n */\nexport const _isACSCall = (call: CallCommon): call is Call => {\n /* @conditional-compile-remove(teams-identity-support) */\n return !call.kind || call.kind === 'Call';\n return true;\n};\n\n/**\n * @internal\n */\nexport const _isACSCallAgent = (callAgent: CallAgentCommon): callAgent is CallAgent => {\n /* @conditional-compile-remove(teams-identity-support) */\n return !callAgent.kind || callAgent.kind === 'CallAgent';\n return true;\n};\n\n/**\n * @internal\n */\nexport const _isTeamsCall = (call: CallCommon): call is TeamsCall => {\n /* @conditional-compile-remove(teams-identity-support) */\n return call.kind === 'TeamsCall';\n return false;\n};\n\n/**\n * @internal\n */\nexport const _isTeamsCallAgent = (callAgent: CallAgentCommon): callAgent is TeamsCallAgent => {\n /* @conditional-compile-remove(teams-identity-support) */\n return callAgent.kind === 'TeamsCallAgent';\n return false;\n};\n\n/**\n * @internal\n */\nexport const _isTeamsIncomingCall = (call: IncomingCallCommon): boolean => {\n return call.kind === 'TeamsIncomingCall';\n};\n\n/**\n * @internal\n */\nexport const _isACSIncomingCall = (call: IncomingCallCommon): boolean => {\n return call.kind === 'IncomingCall';\n};\n"]}
|
@@ -63,8 +63,9 @@ export class UserFacingDiagnosticsSubscriber {
|
|
63
63
|
for (const diagnostic of args.diagnostics) {
|
64
64
|
const { remoteParticipant: _, rawId } = diagnostic, participantDiagnostic = __rest(diagnostic, ["remoteParticipant", "rawId"]);
|
65
65
|
const participant = call.remoteParticipants[rawId];
|
66
|
+
participant.diagnostics = participant.diagnostics || {};
|
66
67
|
if (participant) {
|
67
|
-
participant.diagnostic = participantDiagnostic;
|
68
|
+
participant.diagnostics[participantDiagnostic.diagnostic] = participantDiagnostic;
|
68
69
|
}
|
69
70
|
}
|
70
71
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UserFacingDiagnosticsSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/UserFacingDiagnosticsSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;;;AAclC;;GAEG;AACH,MAAM,OAAO,+BAA+B;IAK1C,YAAY,SAAoB,EAAE,OAAoB,EAAE,WAAyC;QAS1F,gBAAW,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAC9F,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5F,CAAC,CAAC;QAXA,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAEhC,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7B,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAOO,qBAAqB;QAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,C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MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACjD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACvB,OAAO;YACT,CAAC;YACD,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;gBAC1C,MAAM,EAAE,iBAAiB,EAAE,CAAC,EAAE,KAAK,KAA+B,UAAU,EAApC,qBAAqB,UAAK,UAAU,EAAtE,8BAAyD,CAAa,CAAC;gBAC7E,MAAM,WAAW,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;gBACnD,IAAI,WAAW,EAAE,CAAC;oBAChB,WAAW,CAAC,UAAU,GAAG,qBAAqB,CAAC;
|
1
|
+
{"version":3,"file":"UserFacingDiagnosticsSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/UserFacingDiagnosticsSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;;;AAclC;;GAEG;AACH,MAAM,OAAO,+BAA+B;IAK1C,YAAY,SAAoB,EAAE,OAAoB,EAAE,WAAyC;QAS1F,gBAAW,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAC9F,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5F,CAAC,CAAC;QAXA,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAEhC,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7B,IAAI,CAAC,S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AqC;QACnE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,EAAE;;YAClC,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACjD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACvB,OAAO;YACT,CAAC;YACD,MAAM,KAAK,GAAG,MAAA,IAAI,CAAC,WAAW,0CAAE,KAAK,CAAC,MAAM,CAAC;YAC7C,IAAI,KAAK,EAAE,CAAC;gBACV,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;YACjD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,eAAe,GAAG,CAAC,IAAgC,EAAyB,EAAE,CAAC,CAAC;IACpF,KAAK,EAAE,IAAI,CAAC,KAAK;IACjB,SAAS,EAAE,IAAI,CAAC,SAAS;CAC1B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n UserFacingDiagnosticsFeature,\n DiagnosticChangedEventArgs,\n LatestDiagnosticValue,\n MediaDiagnosticChangedEventArgs,\n NetworkDiagnosticChangedEventArgs\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(remote-ufd) */\nimport { RemoteParticipantDiagnosticsData } from '@azure/communication-calling';\nimport { CallContext } from './CallContext';\nimport { CallIdRef } from './CallIdRef';\n\n/**\n * @private\n */\nexport class UserFacingDiagnosticsSubscriber {\n private _callIdRef: CallIdRef;\n private _context: CallContext;\n private _diagnostics: UserFacingDiagnosticsFeature;\n\n constructor(callIdRef: CallIdRef, context: CallContext, diagnostics: UserFacingDiagnosticsFeature) {\n this._callIdRef = callIdRef;\n this._context = context;\n this._diagnostics = diagnostics;\n\n this.setInitialDiagnostics();\n this.subscribe();\n }\n\n public unsubscribe = (): void => {\n this._diagnostics.network.off('diagnosticChanged', this.networkDiagnosticsChanged.bind(this));\n this._diagnostics.media.off('diagnosticChanged', this.mediaDiagnosticsChanged.bind(this));\n };\n\n private setInitialDiagnostics(): void {\n const network = this._diagnostics.network.getLatest();\n const media = this._diagnostics.media.getLatest();\n if (Object.entries(network).length === 0 && Object.entries(media).length === 0) {\n return;\n }\n\n this._context.modifyState((state) => {\n const call = state.calls[this._callIdRef.callId];\n if (call === undefined) {\n return;\n }\n call.diagnostics = {\n network: {\n latest: network\n },\n media: {\n latest: media\n }\n };\n });\n }\n\n private subscribe(): void {\n this._diagnostics.network.on('diagnosticChanged', this.networkDiagnosticsChanged.bind(this));\n this._diagnostics.media.on('diagnosticChanged', this.mediaDiagnosticsChanged.bind(this));\n /* @conditional-compile-remove(remote-ufd) */\n this._diagnostics.remote.on('diagnosticChanged', this.remoteDiagnosticsChanged.bind(this));\n }\n /* @conditional-compile-remove(remote-ufd) */\n private remoteDiagnosticsChanged(args: RemoteParticipantDiagnosticsData): void {\n this._context.modifyState((state) => {\n const call = state.calls[this._callIdRef.callId];\n if (call === undefined) {\n return;\n }\n for (const diagnostic of args.diagnostics) {\n const { remoteParticipant: _, rawId, ...participantDiagnostic } = diagnostic;\n const participant = call.remoteParticipants[rawId];\n participant.diagnostics = participant.diagnostics || {};\n if (participant) {\n participant.diagnostics[participantDiagnostic.diagnostic] = participantDiagnostic;\n }\n }\n });\n }\n\n private networkDiagnosticsChanged(args: NetworkDiagnosticChangedEventArgs): void {\n this._context.modifyState((state) => {\n const call = state.calls[this._callIdRef.callId];\n if (call === undefined) {\n return;\n }\n const network = call.diagnostics?.network.latest;\n if (network) {\n network[args.diagnostic] = latestFromEvent(args);\n }\n });\n }\n\n private mediaDiagnosticsChanged(args: MediaDiagnosticChangedEventArgs): void {\n this._context.modifyState((state) => {\n const call = state.calls[this._callIdRef.callId];\n if (call === undefined) {\n return;\n }\n const media = call.diagnostics?.media.latest;\n if (media) {\n media[args.diagnostic] = latestFromEvent(args);\n }\n });\n }\n}\n\nconst latestFromEvent = (args: DiagnosticChangedEventArgs): LatestDiagnosticValue => ({\n value: args.value,\n valueType: args.valueType\n});\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-public.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/index-public.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { createStatefulCallClient } from './StatefulCallClient';\nexport type { StatefulCallClient, StatefulCallClientArgs, StatefulCallClientOptions } from './StatefulCallClient';\nexport type { StatefulDeviceManager } from './DeviceManagerDeclarative';\nexport type {\n CallAgentState,\n CallClientState,\n CallError,\n CallErrors,\n CallErrorTarget,\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n IncomingCallState,\n LocalVideoStreamState,\n MediaDiagnosticsState,\n NetworkDiagnosticsState,\n RecordingCallFeatureState as RecordingCallFeature,\n RemoteParticipantState,\n RemoteVideoStreamState,\n TranscriptionCallFeatureState as TranscriptionCallFeature,\n VideoStreamRendererViewState,\n CallInfoState\n} from './CallClientState';\n/* @conditional-compile-remove(breakout-rooms) */\nexport type { CallNotification, CallNotifications, NotificationTarget } from './CallClientState';\
|
1
|
+
{"version":3,"file":"index-public.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/index-public.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { createStatefulCallClient } from './StatefulCallClient';\nexport type { StatefulCallClient, StatefulCallClientArgs, StatefulCallClientOptions } from './StatefulCallClient';\nexport type { StatefulDeviceManager } from './DeviceManagerDeclarative';\nexport type {\n CallAgentState,\n CallClientState,\n CallError,\n CallErrors,\n CallErrorTarget,\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n IncomingCallState,\n LocalVideoStreamState,\n MediaDiagnosticsState,\n NetworkDiagnosticsState,\n RecordingCallFeatureState as RecordingCallFeature,\n RemoteParticipantState,\n RemoteVideoStreamState,\n TranscriptionCallFeatureState as TranscriptionCallFeature,\n VideoStreamRendererViewState,\n CallInfoState\n} from './CallClientState';\n/* @conditional-compile-remove(breakout-rooms) */\nexport type { CallNotification, CallNotifications, NotificationTarget } from './CallClientState';\nexport type { TeamsIncomingCallState } from './CallClientState';\n/* @conditional-compile-remove(remote-ufd) */\nexport type { RemoteDiagnosticState } from './CallClientState';\nexport type { CreateViewResult } from './StreamUtils';\nexport type { RaiseHandCallFeatureState as RaiseHandCallFeature } from './CallClientState';\nexport type { RaisedHandState } from './CallClientState';\nexport type { DeclarativeCallAgent, IncomingCallManagement } from './CallAgentDeclarative';\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { DeclarativeTeamsCallAgent } from './TeamsCallAgentDeclarative';\nexport type { TeamsIncomingCallManagement } from './TeamsCallAgentDeclarative';\nexport type { LocalVideoStreamVideoEffectsState } from './CallClientState';\n\nexport type { CapabilitiesFeatureState } from './CallClientState';\nexport type { CaptionsCallFeatureState, CaptionsInfo } from './CallClientState';\nexport type { AcceptedTransfer, TransferFeatureState as TransferFeature } from './CallClientState';\nexport type { OptimalVideoCountFeatureState } from './CallClientState';\nexport type { PPTLiveCallFeatureState } from './CallClientState';\nexport type { ReactionState } from './CallClientState';\nexport type { SpotlightCallFeatureState, SpotlightState } from './CallClientState';\n/* @conditional-compile-remove(local-recording-notification) */\nexport type { LocalRecordingCallFeatureState } from './CallClientState';\nexport type { ConferencePhoneInfo } from './CallClientState';\n/* @conditional-compile-remove(breakout-rooms) */\nexport type { BreakoutRoomsState } from './CallClientState';\n"]}
|
@@ -23,11 +23,9 @@ export { useTeamsCallAgent, useTeamsCall, createDefaultTeamsCallingHandlers } fr
|
|
23
23
|
export { ChatClientProvider, ChatThreadClientProvider, useChatClient, useChatThreadClient, getChatSelector, createDefaultChatHandlers } from '../../chat-component-bindings/src';
|
24
24
|
export { _IdentifierProvider, CameraButton, ControlBar, ControlBarButton, DevicesButton, EndCallButton, ErrorBar, GridLayout, LocalizationProvider, MessageStatusIndicator, MessageThread, MicrophoneButton, ParticipantItem, ParticipantList, ParticipantsButton, ScreenShareButton, SendBox, StreamMedia, TypingIndicator, VideoGallery, VideoTile, COMPONENT_LOCALE_EN_GB, COMPONENT_LOCALE_AR_SA, COMPONENT_LOCALE_CS_CZ, COMPONENT_LOCALE_DE_DE, COMPONENT_LOCALE_ES_ES, COMPONENT_LOCALE_FI_FI, COMPONENT_LOCALE_FR_FR, COMPONENT_LOCALE_HE_IL, COMPONENT_LOCALE_IT_IT, COMPONENT_LOCALE_JA_JP, COMPONENT_LOCALE_KO_KR, COMPONENT_LOCALE_NB_NO, COMPONENT_LOCALE_NL_NL, COMPONENT_LOCALE_PL_PL, COMPONENT_LOCALE_PT_BR, COMPONENT_LOCALE_RU_RU, COMPONENT_LOCALE_SV_SE, COMPONENT_LOCALE_TR_TR, COMPONENT_LOCALE_ZH_CN, COMPONENT_LOCALE_ZH_TW } from '../../react-components/src';
|
25
25
|
export { ImageOverlay } from '../../react-components/src';
|
26
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
27
26
|
export { HoldButton } from '../../react-components/src';
|
28
27
|
export { RaiseHandButton } from '../../react-components/src';
|
29
28
|
export { Dialpad } from '../../react-components/src';
|
30
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
31
29
|
export { IncomingCallNotification, IncomingCallStack } from '../../react-components/src';
|
32
30
|
/* @conditional-compile-remove(call-readiness) */
|
33
31
|
export { CameraAndMicrophoneSitePermissions, MicrophoneSitePermissions, CameraSitePermissions } from '../../react-components/src';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;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E,MAAM,4BAA4B,CAAC;AAErD,mDAAmD;AACnD,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAUzF,iDAAiD;AACjD,OAAO,EACL,kCAAkC,EAClC,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AA0IpC,mDAAmD;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAsC7D,mDAAmD;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAkBzE,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAG/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAiB1E,cAAc,yCAAyC,CAAC;AACxD,cAAc,eAAe,CAAC;AAE9B,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,sDAAsD;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,sDAAsD;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAiBxE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type {\n AreEqual,\n CommonProperties,\n MessageStatus,\n Common,\n AreTypeEqual,\n AreParamEqual\n} from '../../acs-ui-common/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type {\n CallClientProviderProps,\n CallAgentProviderProps,\n CallProviderProps,\n GetCallingSelector,\n CallingHandlers,\n CallingBaseSelectorProps,\n CommonCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport type { VideoBackgroundEffectsDependency, CallingHandlersOptions } from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(DNS) */\nexport type { DeepNoiseSuppressionEffectDependency } from '../../calling-component-bindings/src';\n\nexport type { CaptionsOptions } from '../../calling-component-bindings/src';\n\nexport type {\n ChatClientProviderProps,\n ChatThreadClientProviderProps,\n GetChatSelector,\n ChatHandlers,\n ChatBaseSelectorProps\n} from '../../chat-component-bindings/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { MessageOptions, ChatMessageType } from '../../acs-ui-common/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { UploadChatImageResult } from '../../acs-ui-common/src';\n\nexport {\n CallClientProvider,\n CallAgentProvider,\n CallProvider,\n useCallClient,\n useCallAgent,\n useCall,\n useDeviceManager,\n getCallingSelector,\n createDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n useTeamsCallAgent,\n useTeamsCall,\n createDefaultTeamsCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\n\nexport type {\n ScreenShareButtonSelector,\n CameraButtonSelector,\n VideoGallerySelector,\n DevicesButtonSelector,\n EmptySelector,\n ErrorBarSelector as CallErrorBarSelector,\n ParticipantListSelector,\n MicrophoneButtonSelector,\n ParticipantsButtonSelector,\n CreateDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { NotificationStackSelector } from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { IncomingCallStackSelector } from '../../calling-component-bindings/src';\n\nexport {\n ChatClientProvider,\n ChatThreadClientProvider,\n useChatClient,\n useChatThreadClient,\n getChatSelector,\n createDefaultChatHandlers\n} from '../../chat-component-bindings/src';\n\nexport type {\n MessageThreadSelector,\n TypingIndicatorSelector,\n ChatParticipantListSelector,\n SendBoxSelector,\n ErrorBarSelector as ChatErrorBarSelector\n} from '../../chat-component-bindings/src';\n\nexport {\n _IdentifierProvider,\n CameraButton,\n ControlBar,\n ControlBarButton,\n DevicesButton,\n EndCallButton,\n ErrorBar,\n GridLayout,\n LocalizationProvider,\n MessageStatusIndicator,\n MessageThread,\n MicrophoneButton,\n ParticipantItem,\n ParticipantList,\n ParticipantsButton,\n ScreenShareButton,\n SendBox,\n StreamMedia,\n TypingIndicator,\n VideoGallery,\n VideoTile,\n COMPONENT_LOCALE_EN_GB,\n COMPONENT_LOCALE_AR_SA,\n COMPONENT_LOCALE_CS_CZ,\n COMPONENT_LOCALE_DE_DE,\n COMPONENT_LOCALE_ES_ES,\n COMPONENT_LOCALE_FI_FI,\n COMPONENT_LOCALE_FR_FR,\n COMPONENT_LOCALE_HE_IL,\n COMPONENT_LOCALE_IT_IT,\n COMPONENT_LOCALE_JA_JP,\n COMPONENT_LOCALE_KO_KR,\n COMPONENT_LOCALE_NB_NO,\n COMPONENT_LOCALE_NL_NL,\n COMPONENT_LOCALE_PL_PL,\n COMPONENT_LOCALE_PT_BR,\n COMPONENT_LOCALE_RU_RU,\n COMPONENT_LOCALE_SV_SE,\n COMPONENT_LOCALE_TR_TR,\n COMPONENT_LOCALE_ZH_CN,\n COMPONENT_LOCALE_ZH_TW\n} from '../../react-components/src';\nexport { ImageOverlay } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from '../../react-components/src';\n\nexport { RaiseHandButton } from '../../react-components/src';\n\nexport { Dialpad } from '../../react-components/src';\n\n/* @conditional-compile-remove(one-to-n-calling) */\nexport { IncomingCallNotification, IncomingCallStack } from '../../react-components/src';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type {\n IncomingCallNotificationProps,\n IncomingCallNotificationStrings,\n IncomingCallNotificationStyles,\n IncomingCallStackProps,\n IncomingCallStackCall\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n SitePermissionsStrings,\n SitePermissionsStyles,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from '../../react-components/src';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n MentionOptions,\n MentionDisplayOptions,\n MentionLookupOptions,\n Mention,\n MentionPopoverStrings\n} from '../../react-components/src';\n\nexport type {\n _IdentifierProviderProps,\n _Identifiers,\n ActiveErrorMessage,\n BaseCustomStyles,\n CallParticipantListParticipant,\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles,\n ChatMessage,\n CommunicationParticipant,\n ComponentLocale,\n ComponentSlotStyle,\n ComponentStrings,\n ContentSystemMessage,\n ControlBarButtonProps,\n ControlBarButtonStrings,\n ControlBarButtonStyles,\n ControlBarLayout,\n ControlBarProps,\n CreateVideoStreamViewResult,\n CustomAvatarOptions,\n CustomMessage,\n DevicesButtonContextualMenuStyles,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n EndCallButtonProps,\n EndCallButtonStrings,\n ErrorBarProps,\n ErrorBarStrings,\n ErrorType,\n GridLayoutProps,\n GridLayoutStyles,\n HorizontalGalleryStyles,\n JumpToNewMessageButtonProps,\n LocalizationProviderProps,\n LocalVideoCameraCycleButtonProps,\n LoadingState,\n Message,\n MessageAttachedStatus,\n MessageCommon,\n MessageContentType,\n MessageProps,\n MessageRenderer,\n MessageStatusIndicatorProps,\n MessageStatusIndicatorStrings,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings,\n MicrophoneButtonStyles,\n OnRenderAvatarCallback,\n OptionsDevice,\n ParticipantAddedSystemMessage,\n ParticipantItemProps,\n ParticipantItemStrings,\n ParticipantItemStyles,\n ParticipantListItemStyles,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback,\n ParticipantRemovedSystemMessage,\n ParticipantState,\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles,\n ReadReceiptsBySenderId,\n ScreenShareButtonProps,\n ScreenShareButtonStrings,\n SendBoxProps,\n SendBoxStrings,\n SendBoxStylesProps,\n StreamMediaProps,\n SystemMessage,\n SystemMessageCommon,\n TopicUpdatedSystemMessage,\n TypingIndicatorProps,\n TypingIndicatorStrings,\n TypingIndicatorStylesProps,\n UpdateMessageCallback,\n CancelEditCallback,\n VideoGalleryLayout,\n VideoGalleryLocalParticipant,\n VideoGalleryParticipant,\n VideoGalleryProps,\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoStreamOptions,\n VideoTileProps,\n VideoTileStylesProps,\n ViewScalingMode,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from '../../react-components/src';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\nexport type {\n ReactionButtonStrings,\n Reaction,\n ReactionButtonProps,\n ReactionResources,\n ReactionSprite\n} from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from '../../react-components/src';\nexport type { Spotlight } from '../../react-components/src';\nexport type { ImageOverlayProps, ImageOverlayStrings } from '../../react-components/src';\n/* @conditional-compile-remove(data-loss-prevention) */\nexport type { BlockedMessage } from '../../react-components/src';\nexport type {\n DialpadMode,\n DialpadProps,\n DialpadStrings,\n DialpadStyles,\n DtmfTone,\n LongPressTrigger\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { SendBoxErrorBarError } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { SendBoxErrorBarType } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentActionHandler } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type {\n AttachmentSelectionHandler,\n AttachmentRemovalHandler,\n AttachmentUploadOptions,\n AttachmentUploadTask\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadata } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadataInProgress, AttachmentProgressError } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport { defaultAttachmentMenuAction } from '../../react-components/src';\nexport type { ChatAttachmentType } from '../../react-components/src';\nexport type { InlineImageOptions, InlineImage } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextEditorOptions, RichTextEditBoxOptions } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from '../../react-components/src';\nexport type { VideoTileStrings } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedIOSProps\n} from '../../react-components/src';\nexport type { OverflowGalleryPosition } from '../../react-components/src';\nexport type { LocalVideoTileSize } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type {\n StatefulChatClient,\n StatefulChatClientArgs,\n StatefulChatClientOptions,\n ChatMessageWithStatus,\n ChatClientState,\n ChatError,\n ChatErrors,\n ChatThreadClientState,\n ChatThreadProperties,\n ChatErrorTarget\n} from '../../chat-stateful-client/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { MessagingPolicy } from '../../chat-stateful-client/src';\n\nexport type { ResourceFetchResult } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowser } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowserVersion } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedOperatingSystem } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';\nexport type {\n VerticalGalleryStyles,\n VerticalGalleryStrings,\n VerticalGalleryControlBarStyles\n} from '../../react-components/src';\n\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';\n\nexport type { SurveyIssues } from '../../react-components/src';\n\nexport type { SurveyIssuesHeadingStrings } from '../../react-components/src';\n\nexport type { CallSurveyImprovementSuggestions } from '../../react-components/src';\n\nexport { NotificationStack, Notification } from '../../react-components/src';\n\nexport type {\n NotificationStackProps,\n NotificationProps,\n NotificationStrings,\n NotificationStackStrings,\n NotificationType,\n ActiveNotification\n} from '../../react-components/src';\nexport type { MeetingConferencePhoneInfoModalStrings } from '../../react-components/src';\n"]}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAyCzG,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,sCAAsC,CAAC;AAE9C,yDAAyD;AACzD,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,iCAAiC,EA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AAiBzE,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAE/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAiB1E,cAAc,yCAAyC,CAAC;AACxD,cAAc,eAAe,CAAC;AAE9B,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,sDAAsD;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,sDAAsD;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAiBxE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type {\n AreEqual,\n CommonProperties,\n MessageStatus,\n Common,\n AreTypeEqual,\n AreParamEqual\n} from '../../acs-ui-common/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type {\n CallClientProviderProps,\n CallAgentProviderProps,\n CallProviderProps,\n GetCallingSelector,\n CallingHandlers,\n CallingBaseSelectorProps,\n CommonCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport type { VideoBackgroundEffectsDependency, CallingHandlersOptions } from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(DNS) */\nexport type { DeepNoiseSuppressionEffectDependency } from '../../calling-component-bindings/src';\n\nexport type { CaptionsOptions } from '../../calling-component-bindings/src';\n\nexport type {\n ChatClientProviderProps,\n ChatThreadClientProviderProps,\n GetChatSelector,\n ChatHandlers,\n ChatBaseSelectorProps\n} from '../../chat-component-bindings/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { MessageOptions, ChatMessageType } from '../../acs-ui-common/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { UploadChatImageResult } from '../../acs-ui-common/src';\n\nexport {\n CallClientProvider,\n CallAgentProvider,\n CallProvider,\n useCallClient,\n useCallAgent,\n useCall,\n useDeviceManager,\n getCallingSelector,\n createDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n useTeamsCallAgent,\n useTeamsCall,\n createDefaultTeamsCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\n\nexport type {\n ScreenShareButtonSelector,\n CameraButtonSelector,\n VideoGallerySelector,\n DevicesButtonSelector,\n EmptySelector,\n ErrorBarSelector as CallErrorBarSelector,\n ParticipantListSelector,\n MicrophoneButtonSelector,\n ParticipantsButtonSelector,\n CreateDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { NotificationStackSelector } from '../../calling-component-bindings/src';\nexport type { IncomingCallStackSelector } from '../../calling-component-bindings/src';\n\nexport {\n ChatClientProvider,\n ChatThreadClientProvider,\n useChatClient,\n useChatThreadClient,\n getChatSelector,\n createDefaultChatHandlers\n} from '../../chat-component-bindings/src';\n\nexport type {\n MessageThreadSelector,\n TypingIndicatorSelector,\n ChatParticipantListSelector,\n SendBoxSelector,\n ErrorBarSelector as ChatErrorBarSelector\n} from '../../chat-component-bindings/src';\n\nexport {\n _IdentifierProvider,\n CameraButton,\n ControlBar,\n ControlBarButton,\n DevicesButton,\n EndCallButton,\n ErrorBar,\n GridLayout,\n LocalizationProvider,\n MessageStatusIndicator,\n MessageThread,\n MicrophoneButton,\n ParticipantItem,\n ParticipantList,\n ParticipantsButton,\n ScreenShareButton,\n SendBox,\n StreamMedia,\n TypingIndicator,\n VideoGallery,\n VideoTile,\n COMPONENT_LOCALE_EN_GB,\n COMPONENT_LOCALE_AR_SA,\n COMPONENT_LOCALE_CS_CZ,\n COMPONENT_LOCALE_DE_DE,\n COMPONENT_LOCALE_ES_ES,\n COMPONENT_LOCALE_FI_FI,\n COMPONENT_LOCALE_FR_FR,\n COMPONENT_LOCALE_HE_IL,\n COMPONENT_LOCALE_IT_IT,\n COMPONENT_LOCALE_JA_JP,\n COMPONENT_LOCALE_KO_KR,\n COMPONENT_LOCALE_NB_NO,\n COMPONENT_LOCALE_NL_NL,\n COMPONENT_LOCALE_PL_PL,\n COMPONENT_LOCALE_PT_BR,\n COMPONENT_LOCALE_RU_RU,\n COMPONENT_LOCALE_SV_SE,\n COMPONENT_LOCALE_TR_TR,\n COMPONENT_LOCALE_ZH_CN,\n COMPONENT_LOCALE_ZH_TW\n} from '../../react-components/src';\nexport { ImageOverlay } from '../../react-components/src';\nexport { HoldButton } from '../../react-components/src';\n\nexport { RaiseHandButton } from '../../react-components/src';\n\nexport { Dialpad } from '../../react-components/src';\n\nexport { IncomingCallNotification, IncomingCallStack } from '../../react-components/src';\nexport type {\n IncomingCallNotificationProps,\n IncomingCallNotificationStrings,\n IncomingCallNotificationStyles,\n IncomingCallStackProps,\n IncomingCallStackCall\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n SitePermissionsStrings,\n SitePermissionsStyles,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from '../../react-components/src';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n MentionOptions,\n MentionDisplayOptions,\n MentionLookupOptions,\n Mention,\n MentionPopoverStrings\n} from '../../react-components/src';\n\nexport type {\n _IdentifierProviderProps,\n _Identifiers,\n ActiveErrorMessage,\n BaseCustomStyles,\n CallParticipantListParticipant,\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles,\n ChatMessage,\n CommunicationParticipant,\n ComponentLocale,\n ComponentSlotStyle,\n ComponentStrings,\n ContentSystemMessage,\n ControlBarButtonProps,\n ControlBarButtonStrings,\n ControlBarButtonStyles,\n ControlBarLayout,\n ControlBarProps,\n CreateVideoStreamViewResult,\n CustomAvatarOptions,\n CustomMessage,\n DevicesButtonContextualMenuStyles,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n EndCallButtonProps,\n EndCallButtonStrings,\n ErrorBarProps,\n ErrorBarStrings,\n ErrorType,\n GridLayoutProps,\n GridLayoutStyles,\n HorizontalGalleryStyles,\n JumpToNewMessageButtonProps,\n LocalizationProviderProps,\n LocalVideoCameraCycleButtonProps,\n LoadingState,\n Message,\n MessageAttachedStatus,\n MessageCommon,\n MessageContentType,\n MessageProps,\n MessageRenderer,\n MessageStatusIndicatorProps,\n MessageStatusIndicatorStrings,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings,\n MicrophoneButtonStyles,\n OnRenderAvatarCallback,\n OptionsDevice,\n ParticipantAddedSystemMessage,\n ParticipantItemProps,\n ParticipantItemStrings,\n ParticipantItemStyles,\n ParticipantListItemStyles,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback,\n ParticipantRemovedSystemMessage,\n ParticipantState,\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles,\n ReadReceiptsBySenderId,\n ScreenShareButtonProps,\n ScreenShareButtonStrings,\n SendBoxProps,\n SendBoxStrings,\n SendBoxStylesProps,\n StreamMediaProps,\n SystemMessage,\n SystemMessageCommon,\n TopicUpdatedSystemMessage,\n TypingIndicatorProps,\n TypingIndicatorStrings,\n TypingIndicatorStylesProps,\n UpdateMessageCallback,\n CancelEditCallback,\n VideoGalleryLayout,\n VideoGalleryLocalParticipant,\n VideoGalleryParticipant,\n VideoGalleryProps,\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoStreamOptions,\n VideoTileProps,\n VideoTileStylesProps,\n ViewScalingMode,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from '../../react-components/src';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\nexport type {\n ReactionButtonStrings,\n Reaction,\n ReactionButtonProps,\n ReactionResources,\n ReactionSprite\n} from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from '../../react-components/src';\nexport type { Spotlight } from '../../react-components/src';\nexport type { ImageOverlayProps, ImageOverlayStrings } from '../../react-components/src';\n/* @conditional-compile-remove(data-loss-prevention) */\nexport type { BlockedMessage } from '../../react-components/src';\nexport type {\n DialpadMode,\n DialpadProps,\n DialpadStrings,\n DialpadStyles,\n DtmfTone,\n LongPressTrigger\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { SendBoxErrorBarError } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { SendBoxErrorBarType } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentActionHandler } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type {\n AttachmentSelectionHandler,\n AttachmentRemovalHandler,\n AttachmentUploadOptions,\n AttachmentUploadTask\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadata } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadataInProgress, AttachmentProgressError } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport { defaultAttachmentMenuAction } from '../../react-components/src';\nexport type { ChatAttachmentType } from '../../react-components/src';\nexport type { InlineImageOptions, InlineImage } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextEditorOptions, RichTextEditBoxOptions } from '../../react-components/src';\nexport type { HoldButtonProps, HoldButtonStrings } from '../../react-components/src';\nexport type { VideoTileStrings } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedIOSProps\n} from '../../react-components/src';\nexport type { OverflowGalleryPosition } from '../../react-components/src';\nexport type { LocalVideoTileSize } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type {\n StatefulChatClient,\n StatefulChatClientArgs,\n StatefulChatClientOptions,\n ChatMessageWithStatus,\n ChatClientState,\n ChatError,\n ChatErrors,\n ChatThreadClientState,\n ChatThreadProperties,\n ChatErrorTarget\n} from '../../chat-stateful-client/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { MessagingPolicy } from '../../chat-stateful-client/src';\n\nexport type { ResourceFetchResult } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowser } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowserVersion } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedOperatingSystem } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';\nexport type {\n VerticalGalleryStyles,\n VerticalGalleryStrings,\n VerticalGalleryControlBarStyles\n} from '../../react-components/src';\n\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';\n\nexport type { SurveyIssues } from '../../react-components/src';\n\nexport type { SurveyIssuesHeadingStrings } from '../../react-components/src';\n\nexport type { CallSurveyImprovementSuggestions } from '../../react-components/src';\n\nexport { NotificationStack, Notification } from '../../react-components/src';\n\nexport type {\n NotificationStackProps,\n NotificationProps,\n NotificationStrings,\n NotificationStackStrings,\n NotificationType,\n ActiveNotification\n} from '../../react-components/src';\nexport type { MeetingConferencePhoneInfoModalStrings } from '../../react-components/src';\n"]}
|
@@ -2,7 +2,6 @@
|
|
2
2
|
// Licensed under the MIT License.
|
3
3
|
import { DefaultButton, IconButton, Persona, PersonaSize, PrimaryButton, Stack, Text, useTheme } from '@fluentui/react';
|
4
4
|
import React from 'react';
|
5
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
6
5
|
import { useLocale } from '../localization';
|
7
6
|
import { _formatString } from "../../../acs-ui-common/src";
|
8
7
|
/**
|
@@ -12,32 +11,23 @@ import { _formatString } from "../../../acs-ui-common/src";
|
|
12
11
|
*/
|
13
12
|
export const IncomingCallNotification = (props) => {
|
14
13
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
15
|
-
const { callerName, alertText, avatarImage, onAcceptWithAudio,
|
16
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
17
|
-
onAcceptWithVideo, onReject, onDismiss, personaSize, styles, strings,
|
18
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
19
|
-
acceptOptions } = props;
|
14
|
+
const { callerName, alertText, avatarImage, onAcceptWithAudio, onAcceptWithVideo, onReject, onDismiss, personaSize, styles, strings, acceptOptions } = props;
|
20
15
|
const theme = useTheme();
|
21
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
22
16
|
const localeStrings = useLocale().strings.IncomingCallNotification;
|
23
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
24
17
|
const formattedMessageString = localeStrings.incomingCallNotificationPlaceholderAlert && callerName
|
25
18
|
? _formatString(localeStrings.incomingCallNotificationPlaceholderAlert, { callerName: callerName })
|
26
19
|
: callerName;
|
27
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
28
20
|
const acceptManuOptions = acceptOptions.showAcceptWithVideo
|
29
21
|
? {
|
30
22
|
items: [
|
31
23
|
{
|
32
24
|
key: 'audio',
|
33
|
-
text:
|
34
|
-
/* @conditional-compile-remove(one-to-n-calling) */ (_a = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationAcceptButtonLabel) !== null && _a !== void 0 ? _a : localeStrings.incomingCallNotificationAcceptButtonLabel,
|
25
|
+
text: (_a = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationAcceptButtonLabel) !== null && _a !== void 0 ? _a : localeStrings.incomingCallNotificationAcceptButtonLabel,
|
35
26
|
onClick: () => onAcceptWithAudio()
|
36
27
|
},
|
37
28
|
{
|
38
29
|
key: 'video',
|
39
|
-
text:
|
40
|
-
/* @conditional-compile-remove(one-to-n-calling) */ (_b = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationAccceptWithVideoButtonLabel) !== null && _b !== void 0 ? _b : localeStrings.incomingCallNotificationAccceptWithVideoButtonLabel,
|
30
|
+
text: (_b = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationAccceptWithVideoButtonLabel) !== null && _b !== void 0 ? _b : localeStrings.incomingCallNotificationAccceptWithVideoButtonLabel,
|
41
31
|
onClick: () => onAcceptWithVideo()
|
42
32
|
}
|
43
33
|
]
|
@@ -48,24 +38,11 @@ export const IncomingCallNotification = (props) => {
|
|
48
38
|
React.createElement(Stack, { horizontalAlign: "start", styles: (styles === null || styles === void 0 ? void 0 : styles.avatarContainer) ? styles.avatarContainer : incomingCallToastAvatarContainerStyle },
|
49
39
|
React.createElement(Persona, { imageUrl: avatarImage, text: callerName, size: PersonaSize.size24, coinSize: personaSize, hidePersonaDetails: true, "aria-label": callerName })),
|
50
40
|
React.createElement(Stack, { grow: true, horizontalAlign: "center", style: { alignItems: 'flex-start', fontFamily: 'Segoe UI' } },
|
51
|
-
React.createElement(Text, { tabIndex: 0, "aria-live": 'assertive', "aria-label": alertText !== null && alertText !== void 0 ? alertText : formattedMessageString }, (_c = alertText !== null && alertText !== void 0 ? alertText : strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationPlaceholderAlert) !== null && _c !== void 0 ? _c :
|
52
|
-
|
53
|
-
React.createElement(IconButton
|
54
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
55
|
-
, {
|
56
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
57
|
-
ariaLabel: (_d = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationDismissButtonAriaLabel) !== null && _d !== void 0 ? _d : localeStrings.incomingCallNotificationDismissButtonAriaLabel, iconProps: { iconName: 'cancel' }, onClick: onDismiss, styles: dismissButtonStyle(theme) })),
|
41
|
+
React.createElement(Text, { tabIndex: 0, "aria-live": 'assertive', "aria-label": alertText !== null && alertText !== void 0 ? alertText : formattedMessageString }, (_c = alertText !== null && alertText !== void 0 ? alertText : strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationPlaceholderAlert) !== null && _c !== void 0 ? _c : formattedMessageString)),
|
42
|
+
React.createElement(IconButton, { ariaLabel: (_d = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationDismissButtonAriaLabel) !== null && _d !== void 0 ? _d : localeStrings.incomingCallNotificationDismissButtonAriaLabel, iconProps: { iconName: 'cancel' }, onClick: onDismiss, styles: dismissButtonStyle(theme) })),
|
58
43
|
React.createElement(Stack, { horizontal: true, horizontalAlign: 'center', tokens: { childrenGap: '0.5rem' } },
|
59
|
-
React.createElement(PrimaryButton, { styles: (styles === null || styles === void 0 ? void 0 : styles.acceptButton) ? styles.acceptButton : incomingCallAcceptButtonStyle(theme), onClick: () => onAcceptWithAudio(), iconProps: { iconName: 'IncomingCallNotificationAcceptIcon', style: { lineHeight: '1rem' } },
|
60
|
-
|
61
|
-
ariaLabel: (_e = strings === null || strings === void 0 ? void 0 : strings.incomingCallNoticicationAcceptWithAudioAriaLabel) !== null && _e !== void 0 ? _e : localeStrings.incomingCallNoticicationAcceptWithAudioAriaLabel,
|
62
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
63
|
-
menuProps: acceptManuOptions },
|
64
|
-
/* @conditional-compile-remove(one-to-n-calling) */ (_f = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationAcceptButtonLabel) !== null && _f !== void 0 ? _f : localeStrings.incomingCallNotificationAcceptButtonLabel),
|
65
|
-
React.createElement(DefaultButton, { styles: (styles === null || styles === void 0 ? void 0 : styles.rejectButton) ? styles.rejectButton : incomingCallRejectButtonStyle(theme), onClick: () => onReject(), iconProps: { iconName: 'IncomingCallNotificationRejectIcon' },
|
66
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
67
|
-
ariaLabel: (_g = strings === null || strings === void 0 ? void 0 : strings.incomingCallNoticicationRejectAriaLabel) !== null && _g !== void 0 ? _g : localeStrings.incomingCallNoticicationRejectAriaLabel },
|
68
|
-
/* @conditional-compile-remove(one-to-n-calling) */ (_h = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationRejectButtonLabel) !== null && _h !== void 0 ? _h : localeStrings.incomingCallNotificationRejectButtonLabel))));
|
44
|
+
React.createElement(PrimaryButton, { styles: (styles === null || styles === void 0 ? void 0 : styles.acceptButton) ? styles.acceptButton : incomingCallAcceptButtonStyle(theme), onClick: () => onAcceptWithAudio(), iconProps: { iconName: 'IncomingCallNotificationAcceptIcon', style: { lineHeight: '1rem' } }, ariaLabel: (_e = strings === null || strings === void 0 ? void 0 : strings.incomingCallNoticicationAcceptWithAudioAriaLabel) !== null && _e !== void 0 ? _e : localeStrings.incomingCallNoticicationAcceptWithAudioAriaLabel, menuProps: acceptManuOptions }, (_f = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationAcceptButtonLabel) !== null && _f !== void 0 ? _f : localeStrings.incomingCallNotificationAcceptButtonLabel),
|
45
|
+
React.createElement(DefaultButton, { styles: (styles === null || styles === void 0 ? void 0 : styles.rejectButton) ? styles.rejectButton : incomingCallRejectButtonStyle(theme), onClick: () => onReject(), iconProps: { iconName: 'IncomingCallNotificationRejectIcon' }, ariaLabel: (_g = strings === null || strings === void 0 ? void 0 : strings.incomingCallNoticicationRejectAriaLabel) !== null && _g !== void 0 ? _g : localeStrings.incomingCallNoticicationRejectAriaLabel }, (_h = strings === null || strings === void 0 ? void 0 : strings.incomingCallNotificationRejectButtonLabel) !== null && _h !== void 0 ? _h : localeStrings.incomingCallNotificationRejectButtonLabel))));
|
69
46
|
};
|
70
47
|
const incomingCallToastStyle = (theme) => {
|
71
48
|
return {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IncomingCallNotification.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/IncomingCallNotification.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,aAAa,EAEb,UAAU,EAEV,OAAO,EACP,WAAW,EACX,aAAa,EACb,KAAK,EACL,IAAI,EAEJ,QAAQ,EACT,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,mDAAmD;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,mCAAgC;AAgIxD;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAoC,EAAe,EAAE;;IAC5F,MAAM,EACJ,UAAU,EACV,SAAS,EACT,WAAW,EACX,iBAAiB;IACjB,mDAAmD;IACnD,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,WAAW,EACX,MAAM,EACN,OAAO;IACP,mDAAmD;IACnD,aAAa,EACd,GAAG,KAAK,CAAC;IACV,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,mDAAmD;IACnD,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,wBAAwB,CAAC;IACnE,mDAAmD;IACnD,MAAM,sBAAsB,GAC1B,aAAa,CAAC,wCAAwC,IAAI,UAA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AAEF,MAAM,kBAAkB,GAAG,CAAC,KAAY,EAAiB,EAAE;IACzD,OAAO;QACL,IAAI,EAAE;YACJ,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;YACnC,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,MAAM;SACf;QACD,WAAW,EAAE;YACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;SACjC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,CAAC,KAAY,EAAiB,EAAE;IACpE,OAAO;QACL,IAAI,EAAE;YACJ,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;YAC1B,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;YAC1C,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,UAAU;SACrB;QACD,WAAW,EAAE;YACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;SAC3B;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,SAAS;SAClB;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,CAAC,KAAY,EAAiB,EAAE;IACpE,OAAO;QACL,IAAI,EAAE;YACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;YAC1C,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,MAAM;SACd;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,SAAS;SAClB;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n DefaultButton,\n IButtonStyles,\n IconButton,\n IStackStyles,\n Persona,\n PersonaSize,\n PrimaryButton,\n Stack,\n Text,\n Theme,\n useTheme\n} from '@fluentui/react';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { IContextualMenuProps } from '@fluentui/react';\nimport React from 'react';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useLocale } from '../localization';\nimport { _formatString } from '@internal/acs-ui-common';\n\n/**\n * Strings for the incoming call notification component.\n *\n * @public\n */\nexport interface IncomingCallNotificationStrings {\n /**\n * Placeholder CallerID for the incoming call notification.\n */\n incomingCallNotificationPlaceholderId?: string;\n /**\n * Placeholder Alert for the incoming call notification.\n */\n incomingCallNotificationPlaceholderAlert?: string;\n /**\n * Aria label for the accept with audio button in the incoming call notification.\n */\n incomingCallNoticicationAcceptWithAudioAriaLabel?: string;\n /**\n * Aria label for the accept with video button in the incoming call notification.\n */\n incomingCallNoticicationAcceptWithVideoAriaLabel?: string;\n /**\n * Aria label for the reject button in the incoming call notification.\n */\n incomingCallNoticicationRejectAriaLabel?: string;\n /**\n * Label for the accept button in the incoming call notification.\n */\n incomingCallNotificationAcceptButtonLabel?: string;\n /**\n * Label for the accept with video button in the incoming call notification.\n */\n incomingCallNotificationAccceptWithVideoButtonLabel?: string;\n /**\n * label for the reject button in the incoming call notification.\n */\n incomingCallNotificationRejectButtonLabel?: string;\n /**\n * Aria label for the incoming call dismiss button\n */\n incomingCallNotificationDismissButtonAriaLabel?: string;\n}\n\n/**\n * Styles for the incoming call notification component.\n *\n * @public\n */\nexport interface IncomingCallNotificationStyles {\n /**\n * Styles for the accept buttons.\n */\n acceptButton?: IButtonStyles;\n /**\n * Styles for the reject button.\n */\n rejectButton?: IButtonStyles;\n /**\n * Styles for the root container.\n */\n root?: IStackStyles;\n /**\n * Styles for the avatar container.\n */\n avatarContainer?: IStackStyles;\n}\n\n/**\n * Properties for the incoming call notification component.\n *\n * @public\n */\nexport interface IncomingCallNotificationProps {\n /**\n * Caller's Name\n */\n callerName?: string;\n /**\n * Alert Text\"\n */\n alertText?: string;\n /**\n * URL to the avatar image for the user\n */\n avatarImage?: string;\n /**\n * Size of the persona coin\n */\n personaSize?: number;\n /**\n * Callback to render the avatar\n */\n onRenderAvatar?: () => JSX.Element;\n /**\n * Callback to accept the call with audio\n */\n onAcceptWithAudio: () => void;\n /**\n * Callback to accept the call with Video\n */\n onAcceptWithVideo: () => void;\n /**\n * Callback to reject the call\n */\n onReject: () => void;\n /**\n * Callback when the notification is dismissed\n */\n onDismiss?: () => void;\n /**\n * Styles for the incoming call notification component.\n */\n styles?: IncomingCallNotificationStyles;\n /**\n * Strings for the incoming call notification component.\n */\n strings?: IncomingCallNotificationStrings;\n /**\n * Options for whether to show the accept with video button\n */\n acceptOptions: {\n showAcceptWithVideo: boolean;\n };\n}\n\n/**\n * A Notification component that is to be used to represent incoming calls to the end user.\n * Allows the user to accept or reject the incoming call.\n * @public\n */\nexport const IncomingCallNotification = (props: IncomingCallNotificationProps): JSX.Element => {\n const {\n callerName,\n alertText,\n avatarImage,\n onAcceptWithAudio,\n /* @conditional-compile-remove(one-to-n-calling) */\n onAcceptWithVideo,\n onReject,\n onDismiss,\n personaSize,\n styles,\n strings,\n /* @conditional-compile-remove(one-to-n-calling) */\n acceptOptions\n } = props;\n const theme = useTheme();\n /* @conditional-compile-remove(one-to-n-calling) */\n const localeStrings = useLocale().strings.IncomingCallNotification;\n /* @conditional-compile-remove(one-to-n-calling) */\n const formattedMessageString =\n localeStrings.incomingCallNotificationPlaceholderAlert && callerName\n ? _formatString(localeStrings.incomingCallNotificationPlaceholderAlert, { callerName: callerName })\n : callerName;\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const acceptManuOptions: IContextualMenuProps | undefined = acceptOptions.showAcceptWithVideo\n ? {\n items: [\n {\n key: 'audio',\n text:\n /* @conditional-compile-remove(one-to-n-calling) */ strings?.incomingCallNotificationAcceptButtonLabel ??\n localeStrings.incomingCallNotificationAcceptButtonLabel,\n onClick: () => onAcceptWithAudio()\n },\n {\n key: 'video',\n text:\n /* @conditional-compile-remove(one-to-n-calling) */ strings?.incomingCallNotificationAccceptWithVideoButtonLabel ??\n localeStrings.incomingCallNotificationAccceptWithVideoButtonLabel,\n onClick: () => onAcceptWithVideo()\n }\n ]\n }\n : undefined;\n\n return (\n <Stack\n tokens={{ childrenGap: '0.5rem' }}\n verticalAlign=\"center\"\n styles={styles?.root ? styles.root : incomingCallToastStyle(theme)}\n >\n <Stack horizontal verticalAlign=\"center\" tokens={{ childrenGap: personaSize ? '0.5rem' : '0rem' }}>\n <Stack\n horizontalAlign=\"start\"\n styles={styles?.avatarContainer ? styles.avatarContainer : incomingCallToastAvatarContainerStyle}\n >\n <Persona\n imageUrl={avatarImage}\n text={callerName}\n size={PersonaSize.size24}\n coinSize={personaSize}\n hidePersonaDetails={true}\n aria-label={callerName}\n />\n </Stack>\n\n <Stack grow horizontalAlign=\"center\" style={{ alignItems: 'flex-start', fontFamily: 'Segoe UI' }}>\n <Text\n tabIndex={0}\n aria-live={'assertive'}\n aria-label={alertText ?? /* @conditional-compile-remove(one-to-n-calling) */ formattedMessageString}\n >\n {alertText ??\n strings?.incomingCallNotificationPlaceholderAlert ??\n /* @conditional-compile-remove(one-to-n-calling) */ formattedMessageString}\n </Text>\n </Stack>\n <IconButton\n /* @conditional-compile-remove(one-to-n-calling) */\n ariaLabel={\n strings?.incomingCallNotificationDismissButtonAriaLabel ??\n localeStrings.incomingCallNotificationDismissButtonAriaLabel\n }\n iconProps={{ iconName: 'cancel' }}\n onClick={onDismiss}\n styles={dismissButtonStyle(theme)}\n />\n </Stack>\n\n <Stack horizontal horizontalAlign={'center'} tokens={{ childrenGap: '0.5rem' }}>\n <PrimaryButton\n styles={styles?.acceptButton ? styles.acceptButton : incomingCallAcceptButtonStyle(theme)}\n onClick={() => onAcceptWithAudio()}\n iconProps={{ iconName: 'IncomingCallNotificationAcceptIcon', style: { lineHeight: '1rem' } }}\n /* @conditional-compile-remove(one-to-n-calling) */\n ariaLabel={\n strings?.incomingCallNoticicationAcceptWithAudioAriaLabel ??\n localeStrings.incomingCallNoticicationAcceptWithAudioAriaLabel\n }\n /* @conditional-compile-remove(one-to-n-calling) */\n menuProps={acceptManuOptions}\n >\n {\n /* @conditional-compile-remove(one-to-n-calling) */ strings?.incomingCallNotificationAcceptButtonLabel ??\n localeStrings.incomingCallNotificationAcceptButtonLabel\n }\n </PrimaryButton>\n <DefaultButton\n styles={styles?.rejectButton ? styles.rejectButton : incomingCallRejectButtonStyle(theme)}\n onClick={() => onReject()}\n iconProps={{ iconName: 'IncomingCallNotificationRejectIcon' }}\n /* @conditional-compile-remove(one-to-n-calling) */\n ariaLabel={\n strings?.incomingCallNoticicationRejectAriaLabel ?? localeStrings.incomingCallNoticicationRejectAriaLabel\n }\n >\n {\n /* @conditional-compile-remove(one-to-n-calling) */ strings?.incomingCallNotificationRejectButtonLabel ??\n localeStrings.incomingCallNotificationRejectButtonLabel\n }\n </DefaultButton>\n </Stack>\n </Stack>\n );\n};\n\nconst incomingCallToastStyle = (theme: Theme): IStackStyles => {\n return {\n root: {\n width: '20rem',\n background: theme.palette.white,\n opacity: 0.95,\n borderRadius: '0.5rem',\n boxShadow: theme.effects.elevation8,\n padding: '1rem'\n }\n };\n};\n\nconst incomingCallToastAvatarContainerStyle: IStackStyles = {\n root: {\n marginRight: '0.5rem'\n }\n};\n\nconst dismissButtonStyle = (theme: Theme): IButtonStyles => {\n return {\n root: {\n color: theme.palette.neutralPrimary,\n width: '1rem',\n height: '1rem'\n },\n rootHovered: {\n color: theme.palette.neutralDark\n }\n };\n};\n\nconst incomingCallAcceptButtonStyle = (theme: Theme): IButtonStyles => {\n return {\n root: {\n color: theme.palette.white,\n border: 'none',\n borderRadius: theme.effects.roundedCorner4,\n width: '100%',\n maxWidth: '8.875rem'\n },\n rootHovered: {\n color: theme.palette.white\n },\n icon: {\n height: '1.25rem'\n }\n };\n};\n\nconst incomingCallRejectButtonStyle = (theme: Theme): IButtonStyles => {\n return {\n root: {\n borderRadius: theme.effects.roundedCorner4,\n maxWidth: '8.875rem',\n width: '100%'\n },\n icon: {\n height: '1.25rem'\n }\n };\n};\n"]}
|
1
|
+
{"version":3,"file":"IncomingCallNotification.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/IncomingCallNotification.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,k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AY,EAAiB,EAAE;IACpE,OAAO;QACL,IAAI,EAAE;YACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;YAC1C,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,MAAM;SACd;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,SAAS;SAClB;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n DefaultButton,\n IButtonStyles,\n IconButton,\n IStackStyles,\n Persona,\n PersonaSize,\n PrimaryButton,\n Stack,\n Text,\n Theme,\n useTheme\n} from '@fluentui/react';\nimport { IContextualMenuProps } from '@fluentui/react';\nimport React from 'react';\nimport { useLocale } from '../localization';\nimport { _formatString } from '@internal/acs-ui-common';\n\n/**\n * Strings for the incoming call notification component.\n *\n * @public\n */\nexport interface IncomingCallNotificationStrings {\n /**\n * Placeholder CallerID for the incoming call notification.\n */\n incomingCallNotificationPlaceholderId?: string;\n /**\n * Placeholder Alert for the incoming call notification.\n */\n incomingCallNotificationPlaceholderAlert?: string;\n /**\n * Aria label for the accept with audio button in the incoming call notification.\n */\n incomingCallNoticicationAcceptWithAudioAriaLabel?: string;\n /**\n * Aria label for the accept with video button in the incoming call notification.\n */\n incomingCallNoticicationAcceptWithVideoAriaLabel?: string;\n /**\n * Aria label for the reject button in the incoming call notification.\n */\n incomingCallNoticicationRejectAriaLabel?: string;\n /**\n * Label for the accept button in the incoming call notification.\n */\n incomingCallNotificationAcceptButtonLabel?: string;\n /**\n * Label for the accept with video button in the incoming call notification.\n */\n incomingCallNotificationAccceptWithVideoButtonLabel?: string;\n /**\n * label for the reject button in the incoming call notification.\n */\n incomingCallNotificationRejectButtonLabel?: string;\n /**\n * Aria label for the incoming call dismiss button\n */\n incomingCallNotificationDismissButtonAriaLabel?: string;\n}\n\n/**\n * Styles for the incoming call notification component.\n *\n * @public\n */\nexport interface IncomingCallNotificationStyles {\n /**\n * Styles for the accept buttons.\n */\n acceptButton?: IButtonStyles;\n /**\n * Styles for the reject button.\n */\n rejectButton?: IButtonStyles;\n /**\n * Styles for the root container.\n */\n root?: IStackStyles;\n /**\n * Styles for the avatar container.\n */\n avatarContainer?: IStackStyles;\n}\n\n/**\n * Properties for the incoming call notification component.\n *\n * @public\n */\nexport interface IncomingCallNotificationProps {\n /**\n * Caller's Name\n */\n callerName?: string;\n /**\n * Alert Text\"\n */\n alertText?: string;\n /**\n * URL to the avatar image for the user\n */\n avatarImage?: string;\n /**\n * Size of the persona coin\n */\n personaSize?: number;\n /**\n * Callback to render the avatar\n */\n onRenderAvatar?: () => JSX.Element;\n /**\n * Callback to accept the call with audio\n */\n onAcceptWithAudio: () => void;\n /**\n * Callback to accept the call with Video\n */\n onAcceptWithVideo: () => void;\n /**\n * Callback to reject the call\n */\n onReject: () => void;\n /**\n * Callback when the notification is dismissed\n */\n onDismiss?: () => void;\n /**\n * Styles for the incoming call notification component.\n */\n styles?: IncomingCallNotificationStyles;\n /**\n * Strings for the incoming call notification component.\n */\n strings?: IncomingCallNotificationStrings;\n /**\n * Options for whether to show the accept with video button\n */\n acceptOptions: {\n showAcceptWithVideo: boolean;\n };\n}\n\n/**\n * A Notification component that is to be used to represent incoming calls to the end user.\n * Allows the user to accept or reject the incoming call.\n * @public\n */\nexport const IncomingCallNotification = (props: IncomingCallNotificationProps): JSX.Element => {\n const {\n callerName,\n alertText,\n avatarImage,\n onAcceptWithAudio,\n onAcceptWithVideo,\n onReject,\n onDismiss,\n personaSize,\n styles,\n strings,\n acceptOptions\n } = props;\n const theme = useTheme();\n\n const localeStrings = useLocale().strings.IncomingCallNotification;\n\n const formattedMessageString =\n localeStrings.incomingCallNotificationPlaceholderAlert && callerName\n ? _formatString(localeStrings.incomingCallNotificationPlaceholderAlert, { callerName: callerName })\n : callerName;\n\n const acceptManuOptions: IContextualMenuProps | undefined = acceptOptions.showAcceptWithVideo\n ? {\n items: [\n {\n key: 'audio',\n text:\n strings?.incomingCallNotificationAcceptButtonLabel ??\n localeStrings.incomingCallNotificationAcceptButtonLabel,\n onClick: () => onAcceptWithAudio()\n },\n {\n key: 'video',\n text:\n strings?.incomingCallNotificationAccceptWithVideoButtonLabel ??\n localeStrings.incomingCallNotificationAccceptWithVideoButtonLabel,\n onClick: () => onAcceptWithVideo()\n }\n ]\n }\n : undefined;\n\n return (\n <Stack\n tokens={{ childrenGap: '0.5rem' }}\n verticalAlign=\"center\"\n styles={styles?.root ? styles.root : incomingCallToastStyle(theme)}\n >\n <Stack horizontal verticalAlign=\"center\" tokens={{ childrenGap: personaSize ? '0.5rem' : '0rem' }}>\n <Stack\n horizontalAlign=\"start\"\n styles={styles?.avatarContainer ? styles.avatarContainer : incomingCallToastAvatarContainerStyle}\n >\n <Persona\n imageUrl={avatarImage}\n text={callerName}\n size={PersonaSize.size24}\n coinSize={personaSize}\n hidePersonaDetails={true}\n aria-label={callerName}\n />\n </Stack>\n\n <Stack grow horizontalAlign=\"center\" style={{ alignItems: 'flex-start', fontFamily: 'Segoe UI' }}>\n <Text tabIndex={0} aria-live={'assertive'} aria-label={alertText ?? formattedMessageString}>\n {alertText ?? strings?.incomingCallNotificationPlaceholderAlert ?? formattedMessageString}\n </Text>\n </Stack>\n <IconButton\n ariaLabel={\n strings?.incomingCallNotificationDismissButtonAriaLabel ??\n localeStrings.incomingCallNotificationDismissButtonAriaLabel\n }\n iconProps={{ iconName: 'cancel' }}\n onClick={onDismiss}\n styles={dismissButtonStyle(theme)}\n />\n </Stack>\n\n <Stack horizontal horizontalAlign={'center'} tokens={{ childrenGap: '0.5rem' }}>\n <PrimaryButton\n styles={styles?.acceptButton ? styles.acceptButton : incomingCallAcceptButtonStyle(theme)}\n onClick={() => onAcceptWithAudio()}\n iconProps={{ iconName: 'IncomingCallNotificationAcceptIcon', style: { lineHeight: '1rem' } }}\n ariaLabel={\n strings?.incomingCallNoticicationAcceptWithAudioAriaLabel ??\n localeStrings.incomingCallNoticicationAcceptWithAudioAriaLabel\n }\n menuProps={acceptManuOptions}\n >\n {strings?.incomingCallNotificationAcceptButtonLabel ??\n localeStrings.incomingCallNotificationAcceptButtonLabel}\n </PrimaryButton>\n <DefaultButton\n styles={styles?.rejectButton ? styles.rejectButton : incomingCallRejectButtonStyle(theme)}\n onClick={() => onReject()}\n iconProps={{ iconName: 'IncomingCallNotificationRejectIcon' }}\n ariaLabel={\n strings?.incomingCallNoticicationRejectAriaLabel ?? localeStrings.incomingCallNoticicationRejectAriaLabel\n }\n >\n {strings?.incomingCallNotificationRejectButtonLabel ??\n localeStrings.incomingCallNotificationRejectButtonLabel}\n </DefaultButton>\n </Stack>\n </Stack>\n );\n};\n\nconst incomingCallToastStyle = (theme: Theme): IStackStyles => {\n return {\n root: {\n width: '20rem',\n background: theme.palette.white,\n opacity: 0.95,\n borderRadius: '0.5rem',\n boxShadow: theme.effects.elevation8,\n padding: '1rem'\n }\n };\n};\n\nconst incomingCallToastAvatarContainerStyle: IStackStyles = {\n root: {\n marginRight: '0.5rem'\n }\n};\n\nconst dismissButtonStyle = (theme: Theme): IButtonStyles => {\n return {\n root: {\n color: theme.palette.neutralPrimary,\n width: '1rem',\n height: '1rem'\n },\n rootHovered: {\n color: theme.palette.neutralDark\n }\n };\n};\n\nconst incomingCallAcceptButtonStyle = (theme: Theme): IButtonStyles => {\n return {\n root: {\n color: theme.palette.white,\n border: 'none',\n borderRadius: theme.effects.roundedCorner4,\n width: '100%',\n maxWidth: '8.875rem'\n },\n rootHovered: {\n color: theme.palette.white\n },\n icon: {\n height: '1.25rem'\n }\n };\n};\n\nconst incomingCallRejectButtonStyle = (theme: Theme): IButtonStyles => {\n return {\n root: {\n borderRadius: theme.effects.roundedCorner4,\n maxWidth: '8.875rem',\n width: '100%'\n },\n icon: {\n height: '1.25rem'\n }\n };\n};\n"]}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT License.
|
3
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
4
3
|
import { IncomingCallNotification } from './IncomingCallNotification';
|
5
4
|
import { Stack } from '@fluentui/react';
|
6
5
|
import React from 'react';
|
@@ -11,11 +10,8 @@ import React from 'react';
|
|
11
10
|
* @public
|
12
11
|
*/
|
13
12
|
export const IncomingCallStack = (props) => {
|
14
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
15
13
|
const { activeIncomingCalls, removedIncomingCalls, onAcceptCall, onRejectCall, styles, strings, tabIndex } = props;
|
16
|
-
return (React.createElement(Stack, { tokens: { childrenGap: '0.25rem' }, role: 'group',
|
17
|
-
/* @conditional-compile-remove(one-to-n-calling) */ tabIndex: tabIndex },
|
18
|
-
/* @conditional-compile-remove(one-to-n-calling) */ activeIncomingCalls
|
14
|
+
return (React.createElement(Stack, { tokens: { childrenGap: '0.25rem' }, role: 'group', tabIndex: tabIndex }, activeIncomingCalls
|
19
15
|
.filter((incomingCall) => !removedIncomingCalls.some((call) => call.id === incomingCall.id))
|
20
16
|
.map((incomingCall) => {
|
21
17
|
return (React.createElement(IncomingCallNotification, { key: incomingCall.id, callerName: incomingCall.callerInfo.displayName, onAcceptWithAudio: () => onAcceptCall(incomingCall.id), onAcceptWithVideo: () => onAcceptCall(incomingCall.id, true), onReject: () => onRejectCall(incomingCall.id), onDismiss: () => onRejectCall(incomingCall.id), styles: styles, strings: strings, acceptOptions: { showAcceptWithVideo: incomingCall.videoAvailable } }));
|