@azure/communication-react 1.17.0-alpha-202405310013 → 1.17.0-alpha-202406020014

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.
Files changed (93) hide show
  1. package/dist/communication-react.d.ts +19 -0
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-anI3y0oU.js → ChatMessageComponentAsRichTextEditBox-BQpOd_cF.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-anI3y0oU.js.map → ChatMessageComponentAsRichTextEditBox-BQpOd_cF.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CZ0LZbKA.js → RichTextSendBoxWrapper-CBQNEhRD.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CZ0LZbKA.js.map → RichTextSendBoxWrapper-CBQNEhRD.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-BqQ1gXi4.js → index-xYWFdTrM.js} +209 -110
  7. package/dist/dist-cjs/communication-react/index-xYWFdTrM.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -0
  12. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +15 -3
  13. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  14. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +18 -6
  15. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  16. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  17. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +1 -1
  18. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +2 -0
  20. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  21. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -0
  22. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +4 -2
  23. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  24. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +24 -4
  25. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +5 -2
  27. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +1 -1
  28. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +2 -2
  29. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
  30. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.d.ts +1 -0
  31. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +20 -2
  32. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -1
  33. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +4 -0
  34. package/dist/dist-esm/react-components/src/components/VideoGallery.js +7 -2
  35. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  36. package/dist/dist-esm/react-components/src/components/index.js +0 -3
  37. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  38. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +7 -1
  39. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  40. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +10 -16
  41. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
  42. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  43. package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -0
  44. package/dist/dist-esm/react-components/src/theming/icons.js +3 -4
  45. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  46. package/dist/dist-esm/react-components/src/theming/v9ThemeShim.js +1 -1
  47. package/dist/dist-esm/react-components/src/theming/v9ThemeShim.js.map +1 -1
  48. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +0 -2
  49. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  50. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  51. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +1 -0
  52. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +11 -5
  53. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  54. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +6 -0
  55. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  56. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +18 -4
  57. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  58. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +5 -1
  59. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  60. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.d.ts +2 -0
  61. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +36 -2
  62. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
  63. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +5 -2
  64. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  65. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.d.ts +1 -1
  66. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.js.map +1 -1
  67. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/SurveyPage.js +0 -8
  68. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/SurveyPage.js.map +1 -1
  69. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ThankYouForFeedbackPage.js +1 -9
  70. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ThankYouForFeedbackPage.js.map +1 -1
  71. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +1 -6
  72. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  73. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -0
  74. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +6 -1
  75. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  76. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +4 -0
  77. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  78. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -0
  79. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +6 -1
  80. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  81. package/dist/dist-esm/react-composites/src/composites/common/StarSurvey.js +1 -9
  82. package/dist/dist-esm/react-composites/src/composites/common/StarSurvey.js.map +1 -1
  83. package/dist/dist-esm/react-composites/src/composites/common/Survey.js +0 -19
  84. package/dist/dist-esm/react-composites/src/composites/common/Survey.js.map +1 -1
  85. package/dist/dist-esm/react-composites/src/composites/common/SurveyContent.js +1 -11
  86. package/dist/dist-esm/react-composites/src/composites/common/SurveyContent.js.map +1 -1
  87. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js +1 -8
  88. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js.map +1 -1
  89. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -0
  90. package/dist/dist-esm/react-composites/src/composites/common/styles/Survey.styles.js +0 -4
  91. package/dist/dist-esm/react-composites/src/composites/common/styles/Survey.styles.js.map +1 -1
  92. package/package.json +6 -6
  93. package/dist/dist-cjs/communication-react/index-BqQ1gXi4.js.map +0 -1
@@ -404,6 +404,10 @@ export interface CallWithChatAdapterManagement {
404
404
  * Stop all spotlights
405
405
  */
406
406
  stopAllSpotlight(): Promise<void>;
407
+ /**
408
+ * Mute a participant
409
+ */
410
+ muteParticipant(userIds: string): Promise<void>;
407
411
  }
408
412
  /**
409
413
  * Call and Chat events that can be subscribed to in the {@link CallWithChatAdapter}.
@@ -1 +1 @@
1
- {"version":3,"file":"CallWithChatAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/adjacent-overload-signatures */\n\nimport {\n CallIdChangedListener,\n DisplayNameChangedListener,\n IsMutedChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsSpeakingChangedListener,\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n CallEndedListener\n} from '../../CallComposite';\nimport {\n MessageDeletedListener,\n MessageEditedListener,\n MessageReadListener,\n MessageReceivedListener,\n MessageSentListener,\n ParticipantsAddedListener,\n ParticipantsRemovedListener\n} from '../../ChatComposite';\nimport { ResourceDetails } from '../../ChatComposite';\nimport { CallWithChatAdapterState } from '../state/CallWithChatAdapterState';\nimport type { AdapterError, AdapterState, Disposable } from '../../common/adapters';\nimport {\n AudioDeviceInfo,\n Call,\n PermissionConstraints,\n PropertyChangedEvent,\n StartCallOptions,\n VideoDeviceInfo\n} from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport { StartCaptionsOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\nimport { SendMessageOptions } from '@azure/communication-chat';\nimport { JoinCallOptions } from '../../CallComposite/adapter/CallAdapter';\n/* @conditional-compile-remove(attachment-upload) */\nimport { MessageOptions } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\nimport { UnknownIdentifier, MicrosoftTeamsAppIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { CommunicationUserIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(teams-adhoc-call) */\nimport { MicrosoftTeamsUserIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CommunicationIdentifier } from '@azure/communication-common';\nimport {\n CaptionsReceivedListener,\n IsCaptionsActiveChangedListener,\n IsCaptionLanguageChangedListener,\n IsSpokenLanguageChangedListener\n} from '../../CallComposite/adapter/CallAdapter';\n\nimport { CapabilitiesChangedListener } from '../../CallComposite/adapter/CallAdapter';\n/* @conditional-compile-remove(spotlight) */\nimport { SpotlightChangedListener } from '../../CallComposite/adapter/CallAdapter';\n\nimport { VideoBackgroundImage, VideoBackgroundEffect } from '../../CallComposite';\n\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n\n/**\n * Functionality for managing the current call with chat.\n * @public\n */\nexport interface CallWithChatAdapterManagement {\n // CallWithChat-specific Interface methods\n /**\n * Remove a participant from a Call.\n *\n * @param userId - UserId of the participant to remove.\n *\n * @public\n */\n removeParticipant(userId: string): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Remove a participant from the call.\n * @param participant - {@link @azure/communication-common#CommunicationIdentifier} of the participant to be removed\n * @beta\n */\n removeParticipant(participant: CommunicationIdentifier): Promise<void>;\n\n // Call Interface Methods\n /**\n * Join the call with microphone initially on/off.\n * @deprecated Use joinCall(options?:JoinCallOptions) instead.\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Join the call with options bag to set microphone/camera initial state when joining call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @param options - param to set microphone/camera initially on/off/use precall state.\n *\n * @public\n */\n joinCall(options?: JoinCallOptions): Call | undefined;\n /**\n * Leave the call.\n *\n * @param forEveryone - Whether to remove all participants when leaving\n *\n * @public\n */\n leaveCall(forEveryone?: boolean): Promise<void>;\n /**\n * Start the camera.\n *\n * This method will start rendering a local camera view when the call is not active.\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n startCamera(options?: VideoStreamOptions): Promise<void>;\n /**\n * Stop the camera.\n *\n * This method will stop rendering a local camera view when the call is not active.\n *\n * @public\n */\n stopCamera(): Promise<void>;\n /**\n * Mute the current user during the call or disable microphone locally.\n *\n * @public\n */\n mute(): Promise<void>;\n /**\n * Unmute the current user during the call or enable microphone locally.\n *\n * @public\n */\n unmute(): Promise<void>;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @public\n */\n startCall(\n participants: (\n | MicrosoftTeamsAppIdentifier\n | /* @conditional-compile-remove(PSTN-calls) */ PhoneNumberIdentifier\n | /* @conditional-compile-remove(one-to-n-calling) */ CommunicationUserIdentifier\n | /* @conditional-compile-remove(teams-adhoc-call) */ MicrosoftTeamsUserIdentifier\n | UnknownIdentifier\n )[],\n options?: StartCallOptions\n ): Call | undefined;\n /**\n * Start sharing the screen during a call.\n *\n * @public\n */\n startScreenShare(): Promise<void>;\n /**\n * Stop sharing the screen.\n *\n * @public\n */\n stopScreenShare(): Promise<void>;\n /**\n * Raise hand for local user.\n *\n * @public\n */\n raiseHand(): Promise<void>;\n /**\n * Lower hand for local user.\n *\n * @public\n */\n lowerHand(): Promise<void>;\n /**\n * Send Reaction to ongoing meeting.\n * @param reaction - A value of type {@link @azure/communication-calling#Reaction}\n *\n * @public\n */\n onReactionClick(reaction: Reaction): Promise<void>;\n /**\n * Create the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite.\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;\n /**\n * Dispose the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite.\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;\n /**\n * Dispose the html view for a screen share stream\n *\n * @remarks\n * this method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to dispose the screen share stream view for.\n *\n * @public\n */\n disposeScreenShareStreamView(remoteUserId: string): Promise<void>;\n /**\n * Dispose the html view for a remote video stream\n *\n * @param remoteUserId - Id of the participant to dispose\n *\n * @public\n */\n disposeRemoteVideoStreamView(remoteUserId: string): Promise<void>;\n /**\n * Dispose the html view for a local video stream\n *\n * @public\n */\n disposeLocalVideoStreamView(): Promise<void>;\n /**\n * Ask for permissions of devices.\n *\n * @remarks\n * Browser permission window will pop up if permissions are not granted yet.\n *\n * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n *\n * @public\n */\n askDevicePermission(constrain: PermissionConstraints): Promise<void>;\n /**\n * Query for available camera devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }\n *\n * @public\n */\n queryCameras(): Promise<VideoDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n queryMicrophones(): Promise<AudioDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n querySpeakers(): Promise<AudioDeviceInfo[]>;\n /**\n * Set the camera to use in the call.\n *\n * @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }\n * @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>;\n /**\n * Set the microphone to use in the call.\n *\n * @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }\n *\n * @public\n */\n setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>;\n /**\n * Set the speaker to use in the call.\n *\n * @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }\n *\n * @public\n */\n setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>;\n\n // Chat Interface Methods\n /**\n * Fetch initial state for the Chat adapter.\n *\n * Performs the minimal fetch necessary for ChatComposite and API methods.\n *\n * @public\n */\n fetchInitialData(): Promise<void>;\n /**\n * Send a message in the thread.\n *\n * @public\n */\n sendMessage(\n content: string,\n options?: SendMessageOptions | /* @conditional-compile-remove(attachment-upload) */ MessageOptions\n ): Promise<void>;\n /**\n * Send a read receipt for a message.\n *\n * @public\n */\n sendReadReceipt(chatMessageId: string): Promise<void>;\n /**\n * Send typing indicator in the thread.\n *\n * @public\n */\n sendTypingIndicator(): Promise<void>;\n /**\n * Update a message content.\n *\n * @public\n */\n updateMessage(\n messageId: string,\n content: string,\n options?: Record<string, string> | /* @conditional-compile-remove(attachment-upload) */ MessageOptions\n ): Promise<void>;\n /**\n * Delete a message in the thread.\n *\n * @public\n */\n deleteMessage(messageId: string): Promise<void>;\n /**\n * Load more previous messages in the chat thread history.\n *\n * @remarks\n * This method is usually used to control incremental fetch/infinite scroll.\n *\n * @public\n */\n loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;\n /** @public */\n downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void>;\n /** @public */\n removeResourceFromCache(resourceDetails: ResourceDetails): void;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Puts the Call in a Localhold.\n *\n * @beta\n */\n holdCall: () => Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Resumes the call from a LocalHold state.\n *\n * @beta\n */\n resumeCall: () => Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Adds a new Participant to the call.\n *\n * @beta\n */\n addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /**\n * send dtmf tone to another participant in the call in 1:1 calls\n *\n * @public\n */\n sendDtmfTone: (dtmfTone: DtmfTone) => Promise<void>;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Continues into a call when the browser version is not supported.\n */\n allowUnsupportedBrowserVersion(): void;\n /**\n * Function to Start captions\n * @param options - options for start captions\n */\n startCaptions(options?: StartCaptionsOptions): Promise<void>;\n /**\n * Function to set caption language\n * @param language - language set for caption\n */\n setCaptionLanguage(language: string): Promise<void>;\n /**\n * Function to set spoken language\n * @param language - spoken language\n */\n setSpokenLanguage(language: string): Promise<void>;\n /**\n * Funtion to stop captions\n */\n stopCaptions(): Promise<void>;\n\n /**\n * Start the video background effect.\n *\n * @public\n */\n startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void>;\n\n /**\n * Stop the video background effect.\n *\n * @public\n */\n stopVideoBackgroundEffects(): Promise<void>;\n\n /**\n * Override the background picker images for background replacement effect.\n *\n * @param backgroundImages - Array of custom background images.\n *\n * @public\n */\n updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void;\n\n /**\n * Update the selected video background effect\n *\n * @public\n */\n updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void;\n /* @conditional-compile-remove(end-of-call-survey) */\n /**\n * Send the end of call survey result\n *\n * @public\n */\n submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * Start spotlight\n */\n startSpotlight(userIds?: string[]): Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * Stop spotlight\n */\n stopSpotlight(userIds?: string[]): Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * Stop all spotlights\n */\n stopAllSpotlight(): Promise<void>;\n}\n\n/**\n * Call and Chat events that can be subscribed to in the {@link CallWithChatAdapter}.\n * @public\n */\nexport interface CallWithChatAdapterSubscriptions {\n // Call subscriptions\n on(event: 'callEnded', listener: CallEndedListener): void;\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n on(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;\n on(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n on(event: 'callError', listener: (e: AdapterError) => void): void;\n on(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n on(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n on(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;\n on(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;\n on(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;\n /* @conditional-compile-remove(spotlight) */\n on(event: 'spotlightChanged', listener: SpotlightChangedListener): void;\n off(event: 'callEnded', listener: CallEndedListener): void;\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n off(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;\n off(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n off(event: 'callError', listener: (e: AdapterError) => void): void;\n off(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n off(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n off(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;\n off(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;\n off(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;\n /* @conditional-compile-remove(spotlight) */\n off(event: 'spotlightChanged', listener: SpotlightChangedListener): void;\n\n // Chat subscriptions\n on(event: 'messageReceived', listener: MessageReceivedListener): void;\n on(event: 'messageEdited', listener: MessageEditedListener): void;\n on(event: 'messageDeleted', listener: MessageDeletedListener): void;\n on(event: 'messageSent', listener: MessageSentListener): void;\n on(event: 'messageRead', listener: MessageReadListener): void;\n on(event: 'chatParticipantsAdded', listener: ParticipantsAddedListener): void;\n on(event: 'chatParticipantsRemoved', listener: ParticipantsRemovedListener): void;\n on(event: 'chatError', listener: (e: AdapterError) => void): void;\n\n off(event: 'messageReceived', listener: MessageReceivedListener): void;\n off(event: 'messageEdited', listener: MessageEditedListener): void;\n off(event: 'messageDeleted', listener: MessageDeletedListener): void;\n off(event: 'messageSent', listener: MessageSentListener): void;\n off(event: 'messageRead', listener: MessageReadListener): void;\n off(event: 'chatParticipantsAdded', listener: ParticipantsAddedListener): void;\n off(event: 'chatParticipantsRemoved', listener: ParticipantsRemovedListener): void;\n off(event: 'chatError', listener: (e: AdapterError) => void): void;\n\n // CallWithChat subscriptions\n on(event: 'chatInitialized', listener: ChatInitializedListener): void;\n off(event: 'chatInitialized', listener: ChatInitializedListener): void;\n}\n\n/**\n * Callback for {@link CallWithChatAdapterSubscribers} 'chatInitialized' event.\n *\n * @public\n */\nexport type ChatInitializedListener = (event: { adapter: CallWithChatAdapter }) => void;\n\n/**\n * {@link CallWithChatComposite} Adapter interface.\n *\n * @public\n */\nexport interface CallWithChatAdapter\n extends CallWithChatAdapterManagement,\n AdapterState<CallWithChatAdapterState>,\n Disposable,\n CallWithChatAdapterSubscriptions {}\n\n/**\n * Events fired off by the {@link CallWithChatAdapter}.\n *\n * @public\n */\nexport type CallWithChatEvent =\n | 'callError'\n | 'chatError'\n | 'callEnded'\n | 'isMutedChanged'\n | 'callIdChanged'\n | 'isLocalScreenSharingActiveChanged'\n | 'displayNameChanged'\n | 'isSpeakingChanged'\n | 'callParticipantsJoined'\n | 'callParticipantsLeft'\n | 'selectedMicrophoneChanged'\n | 'selectedSpeakerChanged'\n | 'isCaptionsActiveChanged'\n | 'captionsReceived'\n | 'isCaptionLanguageChanged'\n | 'isSpokenLanguageChanged'\n | 'capabilitiesChanged'\n | /* @conditional-compile-remove(spotlight) */ 'spotlightChanged'\n | 'messageReceived'\n | 'messageEdited'\n | 'messageDeleted'\n | 'messageSent'\n | 'messageRead'\n | 'chatParticipantsAdded'\n | 'chatParticipantsRemoved'\n | 'chatInitialized';\n"]}
1
+ {"version":3,"file":"CallWithChatAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/adjacent-overload-signatures */\n\nimport {\n CallIdChangedListener,\n DisplayNameChangedListener,\n IsMutedChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsSpeakingChangedListener,\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n CallEndedListener\n} from '../../CallComposite';\nimport {\n MessageDeletedListener,\n MessageEditedListener,\n MessageReadListener,\n MessageReceivedListener,\n MessageSentListener,\n ParticipantsAddedListener,\n ParticipantsRemovedListener\n} from '../../ChatComposite';\nimport { ResourceDetails } from '../../ChatComposite';\nimport { CallWithChatAdapterState } from '../state/CallWithChatAdapterState';\nimport type { AdapterError, AdapterState, Disposable } from '../../common/adapters';\nimport {\n AudioDeviceInfo,\n Call,\n PermissionConstraints,\n PropertyChangedEvent,\n StartCallOptions,\n VideoDeviceInfo\n} from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport { StartCaptionsOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\nimport { SendMessageOptions } from '@azure/communication-chat';\nimport { JoinCallOptions } from '../../CallComposite/adapter/CallAdapter';\n/* @conditional-compile-remove(attachment-upload) */\nimport { MessageOptions } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\nimport { UnknownIdentifier, MicrosoftTeamsAppIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { CommunicationUserIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(teams-adhoc-call) */\nimport { MicrosoftTeamsUserIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CommunicationIdentifier } from '@azure/communication-common';\nimport {\n CaptionsReceivedListener,\n IsCaptionsActiveChangedListener,\n IsCaptionLanguageChangedListener,\n IsSpokenLanguageChangedListener\n} from '../../CallComposite/adapter/CallAdapter';\n\nimport { CapabilitiesChangedListener } from '../../CallComposite/adapter/CallAdapter';\n/* @conditional-compile-remove(spotlight) */\nimport { SpotlightChangedListener } from '../../CallComposite/adapter/CallAdapter';\n\nimport { VideoBackgroundImage, VideoBackgroundEffect } from '../../CallComposite';\n\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n\n/**\n * Functionality for managing the current call with chat.\n * @public\n */\nexport interface CallWithChatAdapterManagement {\n // CallWithChat-specific Interface methods\n /**\n * Remove a participant from a Call.\n *\n * @param userId - UserId of the participant to remove.\n *\n * @public\n */\n removeParticipant(userId: string): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Remove a participant from the call.\n * @param participant - {@link @azure/communication-common#CommunicationIdentifier} of the participant to be removed\n * @beta\n */\n removeParticipant(participant: CommunicationIdentifier): Promise<void>;\n\n // Call Interface Methods\n /**\n * Join the call with microphone initially on/off.\n * @deprecated Use joinCall(options?:JoinCallOptions) instead.\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Join the call with options bag to set microphone/camera initial state when joining call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @param options - param to set microphone/camera initially on/off/use precall state.\n *\n * @public\n */\n joinCall(options?: JoinCallOptions): Call | undefined;\n /**\n * Leave the call.\n *\n * @param forEveryone - Whether to remove all participants when leaving\n *\n * @public\n */\n leaveCall(forEveryone?: boolean): Promise<void>;\n /**\n * Start the camera.\n *\n * This method will start rendering a local camera view when the call is not active.\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n startCamera(options?: VideoStreamOptions): Promise<void>;\n /**\n * Stop the camera.\n *\n * This method will stop rendering a local camera view when the call is not active.\n *\n * @public\n */\n stopCamera(): Promise<void>;\n /**\n * Mute the current user during the call or disable microphone locally.\n *\n * @public\n */\n mute(): Promise<void>;\n /**\n * Unmute the current user during the call or enable microphone locally.\n *\n * @public\n */\n unmute(): Promise<void>;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @public\n */\n startCall(\n participants: (\n | MicrosoftTeamsAppIdentifier\n | /* @conditional-compile-remove(PSTN-calls) */ PhoneNumberIdentifier\n | /* @conditional-compile-remove(one-to-n-calling) */ CommunicationUserIdentifier\n | /* @conditional-compile-remove(teams-adhoc-call) */ MicrosoftTeamsUserIdentifier\n | UnknownIdentifier\n )[],\n options?: StartCallOptions\n ): Call | undefined;\n /**\n * Start sharing the screen during a call.\n *\n * @public\n */\n startScreenShare(): Promise<void>;\n /**\n * Stop sharing the screen.\n *\n * @public\n */\n stopScreenShare(): Promise<void>;\n /**\n * Raise hand for local user.\n *\n * @public\n */\n raiseHand(): Promise<void>;\n /**\n * Lower hand for local user.\n *\n * @public\n */\n lowerHand(): Promise<void>;\n /**\n * Send Reaction to ongoing meeting.\n * @param reaction - A value of type {@link @azure/communication-calling#Reaction}\n *\n * @public\n */\n onReactionClick(reaction: Reaction): Promise<void>;\n /**\n * Create the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite.\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;\n /**\n * Dispose the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite.\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;\n /**\n * Dispose the html view for a screen share stream\n *\n * @remarks\n * this method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to dispose the screen share stream view for.\n *\n * @public\n */\n disposeScreenShareStreamView(remoteUserId: string): Promise<void>;\n /**\n * Dispose the html view for a remote video stream\n *\n * @param remoteUserId - Id of the participant to dispose\n *\n * @public\n */\n disposeRemoteVideoStreamView(remoteUserId: string): Promise<void>;\n /**\n * Dispose the html view for a local video stream\n *\n * @public\n */\n disposeLocalVideoStreamView(): Promise<void>;\n /**\n * Ask for permissions of devices.\n *\n * @remarks\n * Browser permission window will pop up if permissions are not granted yet.\n *\n * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n *\n * @public\n */\n askDevicePermission(constrain: PermissionConstraints): Promise<void>;\n /**\n * Query for available camera devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }\n *\n * @public\n */\n queryCameras(): Promise<VideoDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n queryMicrophones(): Promise<AudioDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n querySpeakers(): Promise<AudioDeviceInfo[]>;\n /**\n * Set the camera to use in the call.\n *\n * @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }\n * @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>;\n /**\n * Set the microphone to use in the call.\n *\n * @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }\n *\n * @public\n */\n setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>;\n /**\n * Set the speaker to use in the call.\n *\n * @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }\n *\n * @public\n */\n setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>;\n\n // Chat Interface Methods\n /**\n * Fetch initial state for the Chat adapter.\n *\n * Performs the minimal fetch necessary for ChatComposite and API methods.\n *\n * @public\n */\n fetchInitialData(): Promise<void>;\n /**\n * Send a message in the thread.\n *\n * @public\n */\n sendMessage(\n content: string,\n options?: SendMessageOptions | /* @conditional-compile-remove(attachment-upload) */ MessageOptions\n ): Promise<void>;\n /**\n * Send a read receipt for a message.\n *\n * @public\n */\n sendReadReceipt(chatMessageId: string): Promise<void>;\n /**\n * Send typing indicator in the thread.\n *\n * @public\n */\n sendTypingIndicator(): Promise<void>;\n /**\n * Update a message content.\n *\n * @public\n */\n updateMessage(\n messageId: string,\n content: string,\n options?: Record<string, string> | /* @conditional-compile-remove(attachment-upload) */ MessageOptions\n ): Promise<void>;\n /**\n * Delete a message in the thread.\n *\n * @public\n */\n deleteMessage(messageId: string): Promise<void>;\n /**\n * Load more previous messages in the chat thread history.\n *\n * @remarks\n * This method is usually used to control incremental fetch/infinite scroll.\n *\n * @public\n */\n loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;\n /** @public */\n downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void>;\n /** @public */\n removeResourceFromCache(resourceDetails: ResourceDetails): void;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Puts the Call in a Localhold.\n *\n * @beta\n */\n holdCall: () => Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Resumes the call from a LocalHold state.\n *\n * @beta\n */\n resumeCall: () => Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Adds a new Participant to the call.\n *\n * @beta\n */\n addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /**\n * send dtmf tone to another participant in the call in 1:1 calls\n *\n * @public\n */\n sendDtmfTone: (dtmfTone: DtmfTone) => Promise<void>;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Continues into a call when the browser version is not supported.\n */\n allowUnsupportedBrowserVersion(): void;\n /**\n * Function to Start captions\n * @param options - options for start captions\n */\n startCaptions(options?: StartCaptionsOptions): Promise<void>;\n /**\n * Function to set caption language\n * @param language - language set for caption\n */\n setCaptionLanguage(language: string): Promise<void>;\n /**\n * Function to set spoken language\n * @param language - spoken language\n */\n setSpokenLanguage(language: string): Promise<void>;\n /**\n * Funtion to stop captions\n */\n stopCaptions(): Promise<void>;\n\n /**\n * Start the video background effect.\n *\n * @public\n */\n startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void>;\n\n /**\n * Stop the video background effect.\n *\n * @public\n */\n stopVideoBackgroundEffects(): Promise<void>;\n\n /**\n * Override the background picker images for background replacement effect.\n *\n * @param backgroundImages - Array of custom background images.\n *\n * @public\n */\n updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void;\n\n /**\n * Update the selected video background effect\n *\n * @public\n */\n updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void;\n /**\n * Send the end of call survey result\n *\n * @public\n */\n submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * Start spotlight\n */\n startSpotlight(userIds?: string[]): Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * Stop spotlight\n */\n stopSpotlight(userIds?: string[]): Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * Stop all spotlights\n */\n stopAllSpotlight(): Promise<void>;\n /* @conditional-compile-remove(soft-mute) */\n /**\n * Mute a participant\n */\n muteParticipant(userIds: string): Promise<void>;\n}\n\n/**\n * Call and Chat events that can be subscribed to in the {@link CallWithChatAdapter}.\n * @public\n */\nexport interface CallWithChatAdapterSubscriptions {\n // Call subscriptions\n on(event: 'callEnded', listener: CallEndedListener): void;\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n on(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;\n on(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n on(event: 'callError', listener: (e: AdapterError) => void): void;\n on(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n on(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n on(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;\n on(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;\n on(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;\n /* @conditional-compile-remove(spotlight) */\n on(event: 'spotlightChanged', listener: SpotlightChangedListener): void;\n off(event: 'callEnded', listener: CallEndedListener): void;\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n off(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;\n off(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n off(event: 'callError', listener: (e: AdapterError) => void): void;\n off(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n off(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n off(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;\n off(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;\n off(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;\n /* @conditional-compile-remove(spotlight) */\n off(event: 'spotlightChanged', listener: SpotlightChangedListener): void;\n\n // Chat subscriptions\n on(event: 'messageReceived', listener: MessageReceivedListener): void;\n on(event: 'messageEdited', listener: MessageEditedListener): void;\n on(event: 'messageDeleted', listener: MessageDeletedListener): void;\n on(event: 'messageSent', listener: MessageSentListener): void;\n on(event: 'messageRead', listener: MessageReadListener): void;\n on(event: 'chatParticipantsAdded', listener: ParticipantsAddedListener): void;\n on(event: 'chatParticipantsRemoved', listener: ParticipantsRemovedListener): void;\n on(event: 'chatError', listener: (e: AdapterError) => void): void;\n\n off(event: 'messageReceived', listener: MessageReceivedListener): void;\n off(event: 'messageEdited', listener: MessageEditedListener): void;\n off(event: 'messageDeleted', listener: MessageDeletedListener): void;\n off(event: 'messageSent', listener: MessageSentListener): void;\n off(event: 'messageRead', listener: MessageReadListener): void;\n off(event: 'chatParticipantsAdded', listener: ParticipantsAddedListener): void;\n off(event: 'chatParticipantsRemoved', listener: ParticipantsRemovedListener): void;\n off(event: 'chatError', listener: (e: AdapterError) => void): void;\n\n // CallWithChat subscriptions\n on(event: 'chatInitialized', listener: ChatInitializedListener): void;\n off(event: 'chatInitialized', listener: ChatInitializedListener): void;\n}\n\n/**\n * Callback for {@link CallWithChatAdapterSubscribers} 'chatInitialized' event.\n *\n * @public\n */\nexport type ChatInitializedListener = (event: { adapter: CallWithChatAdapter }) => void;\n\n/**\n * {@link CallWithChatComposite} Adapter interface.\n *\n * @public\n */\nexport interface CallWithChatAdapter\n extends CallWithChatAdapterManagement,\n AdapterState<CallWithChatAdapterState>,\n Disposable,\n CallWithChatAdapterSubscriptions {}\n\n/**\n * Events fired off by the {@link CallWithChatAdapter}.\n *\n * @public\n */\nexport type CallWithChatEvent =\n | 'callError'\n | 'chatError'\n | 'callEnded'\n | 'isMutedChanged'\n | 'callIdChanged'\n | 'isLocalScreenSharingActiveChanged'\n | 'displayNameChanged'\n | 'isSpeakingChanged'\n | 'callParticipantsJoined'\n | 'callParticipantsLeft'\n | 'selectedMicrophoneChanged'\n | 'selectedSpeakerChanged'\n | 'isCaptionsActiveChanged'\n | 'captionsReceived'\n | 'isCaptionLanguageChanged'\n | 'isSpokenLanguageChanged'\n | 'capabilitiesChanged'\n | /* @conditional-compile-remove(spotlight) */ 'spotlightChanged'\n | 'messageReceived'\n | 'messageEdited'\n | 'messageDeleted'\n | 'messageSent'\n | 'messageRead'\n | 'chatParticipantsAdded'\n | 'chatParticipantsRemoved'\n | 'chatInitialized';\n"]}
@@ -69,5 +69,6 @@ export declare class CallWithChatBackedCallAdapter implements CallAdapter {
69
69
  startSpotlight(userIds?: string[]): Promise<void>;
70
70
  stopSpotlight(userIds?: string[]): Promise<void>;
71
71
  stopAllSpotlight(): Promise<void>;
72
+ muteParticipant(userId: string): Promise<void>;
72
73
  }
73
74
  //# sourceMappingURL=CallWithChatBackedCallAdapter.d.ts.map
@@ -175,7 +175,6 @@ export class CallWithChatBackedCallAdapter {
175
175
  updateSelectedVideoBackgroundEffect(selectedVideoBackground) {
176
176
  return this.callWithChatAdapter.updateSelectedVideoBackgroundEffect(selectedVideoBackground);
177
177
  }
178
- /* @conditional-compile-remove(end-of-call-survey) */
179
178
  submitSurvey(survey) {
180
179
  return __awaiter(this, void 0, void 0, function* () {
181
180
  return this.callWithChatAdapter.submitSurvey(survey);
@@ -199,6 +198,12 @@ export class CallWithChatBackedCallAdapter {
199
198
  return this.callWithChatAdapter.stopAllSpotlight();
200
199
  });
201
200
  }
201
+ /* @conditional-compile-remove(soft-mute) */
202
+ muteParticipant(userId) {
203
+ return __awaiter(this, void 0, void 0, function* () {
204
+ return this.callWithChatAdapter.muteParticipant(userId);
205
+ });
206
+ }
202
207
  }
203
208
  function callAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState) {
204
209
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"CallWithChatBackedCallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAoBlC,6CAA6C;AAC7C,OAAO,EAA2B,uBAAuB,EAAyB,MAAM,6BAA6B,CAAC;AAGtH,OAAO,EAAE,0BAA0B,EAAE,yCAAgC;AAKrE,uDAAuD;AACvD,sEAAsE;AAEtE;;;;GAIG;AACH,MAAM,OAAO,6BAA6B;IAOxC,YAAY,mBAAwC;QAJpD,gJAAgJ;QAChJ,iJAAiJ;QACzI,eAA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,CAAC,OAAO,CAAC,CAAC;QAC1D,CAAC;KAAA;IAED,4CAA4C;IAC/B,aAAa,CAAC,OAAkB;;YAC3C,OAAO,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzD,CAAC;KAAA;IAED,4CAA4C;IAC/B,gBAAgB;;YAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,EAAE,CAAC;QACrD,CAAC;KAAA;CACF;AAED,SAAS,4CAA4C,CACnD,wBAAkD;IAElD,OAAO;QACL,+BAA+B,EAAE,wBAAwB,CAAC,+BAA+B;QACzF,IAAI,EAAE,wBAAwB,CAAC,IAAI;QACnC,MAAM,EAAE,wBAAwB,CAAC,MAAM;QACvC,WAAW,EAAE,wBAAwB,CAAC,WAAW;QACjD,IAAI,EAAE,wBAAwB,CAAC,IAAI;QACnC,OAAO,EAAE,wBAAwB,CAAC,OAAO;QACzC,WAAW,EAAE,wBAAwB,CAAC,WAAW;QACjD,cAAc,EAAE,wBAAwB,CAAC,cAAc;QACvD,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,wBAAwB,CAAC,gBAAgB;QACvD,6CAA6C;QAC7C,iBAAiB,EAAE,wBAAwB,CAAC,iBAAiB;QAC7D,sDAAsD;QACtD,eAAe,EAAE,wBAAwB,CAAC,eAAe;QAEzD,qBAAqB,EAAE,wBAAwB,CAAC,qBAAqB;QAErE,8BAA8B,EAAE,wBAAwB,CAAC,8BAA8B;QAEvF,6BAA6B,EAAE,wBAAwB,CAAC,6BAA6B;QACrF,SAAS,EAAE,wBAAwB,CAAC,SAAS;KAC9C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallWithChatAdapter } from './CallWithChatAdapter';\nimport { CallAdapter, CallAdapterState } from '../../CallComposite';\n\nimport { VideoBackgroundImage, VideoBackgroundEffect } from '../../CallComposite';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\nimport {\n AudioDeviceInfo,\n VideoDeviceInfo,\n Call,\n PermissionConstraints,\n StartCallOptions\n} from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport { StartCaptionsOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { CallWithChatAdapterState } from '../state/CallWithChatAdapterState';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CommunicationIdentifier, isPhoneNumberIdentifier, PhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { CommunicationUserIdentifier } from '@azure/communication-common';\nimport { _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { JoinCallOptions, StartCallIdentifier } from '../../CallComposite/adapter/CallAdapter';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/**\n * Facade around the CallWithChatAdapter to satisfy the call adapter interface.\n *\n * @private\n */\nexport class CallWithChatBackedCallAdapter implements CallAdapter {\n private callWithChatAdapter: CallWithChatAdapter;\n\n // For onStateChange we must convert CallWithChat state to chat state. This involves creating a new handler to be passed into the onStateChange.\n // In order to unsubscribe the handler when offStateChange is called we must have a mapping of the original handler to the newly created handler.\n private eventStore: Map<(state: CallAdapterState) => void, (state: CallWithChatAdapterState) => void> = new Map();\n\n constructor(callWithChatAdapter: CallWithChatAdapter) {\n this.callWithChatAdapter = callWithChatAdapter;\n }\n\n public on = (event: any, listener: any): void => {\n switch (event) {\n case 'error':\n return this.callWithChatAdapter.on('callError', listener);\n case 'participantsJoined':\n return this.callWithChatAdapter.on('callParticipantsJoined', listener);\n case 'participantsLeft':\n return this.callWithChatAdapter.on('callParticipantsLeft', listener);\n default:\n return this.callWithChatAdapter.on(event, listener);\n }\n };\n public off = (event: any, listener: any): void => {\n switch (event) {\n case 'error':\n return this.callWithChatAdapter.off('callError', listener);\n case 'participantsJoined':\n return this.callWithChatAdapter.off('callParticipantsJoined', listener);\n case 'participantsLeft':\n return this.callWithChatAdapter.off('callParticipantsLeft', listener);\n default:\n return this.callWithChatAdapter.off(event, listener);\n }\n };\n public onStateChange = (handler: (state: CallAdapterState) => void): void => {\n const convertedHandler = (state: CallWithChatAdapterState): void => {\n handler(callAdapterStateFromCallWithChatAdapterState(state));\n };\n this.callWithChatAdapter.onStateChange(convertedHandler);\n this.eventStore.set(handler, convertedHandler);\n };\n public offStateChange = (handler: (state: CallAdapterState) => void): void => {\n const convertedHandler = this.eventStore.get(handler);\n convertedHandler && this.callWithChatAdapter.offStateChange(convertedHandler);\n };\n public getState = (): CallAdapterState =>\n callAdapterStateFromCallWithChatAdapterState(this.callWithChatAdapter.getState());\n public dispose = (): void => this.callWithChatAdapter.dispose();\n public joinCall = (options?: boolean | JoinCallOptions): Call | undefined => {\n if (typeof options === 'boolean') {\n return this.callWithChatAdapter.joinCall(options);\n } else {\n return this.callWithChatAdapter.joinCall(options);\n }\n };\n public leaveCall = async (forEveryone?: boolean): Promise<void> =>\n await this.callWithChatAdapter.leaveCall(forEveryone);\n\n public startCall = (participants: (string | StartCallIdentifier)[], options: StartCallOptions): Call | undefined => {\n if (participants.every((participant: string | StartCallIdentifier) => typeof participant === 'string')) {\n return this.callWithChatAdapter.startCall(participants as string[], options);\n } else {\n return this.callWithChatAdapter.startCall(participants as StartCallIdentifier[], options);\n }\n };\n public setCamera = async (sourceId: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void> =>\n await this.callWithChatAdapter.setCamera(sourceId, options);\n public setMicrophone = async (sourceId: AudioDeviceInfo): Promise<void> =>\n await this.callWithChatAdapter.setMicrophone(sourceId);\n public setSpeaker = async (sourceId: AudioDeviceInfo): Promise<void> =>\n await this.callWithChatAdapter.setSpeaker(sourceId);\n public askDevicePermission = async (constraints: PermissionConstraints): Promise<void> =>\n await this.callWithChatAdapter.askDevicePermission(constraints);\n public queryCameras = async (): Promise<VideoDeviceInfo[]> => await this.callWithChatAdapter.queryCameras();\n public queryMicrophones = async (): Promise<AudioDeviceInfo[]> => await this.callWithChatAdapter.queryMicrophones();\n public querySpeakers = async (): Promise<AudioDeviceInfo[]> => await this.callWithChatAdapter.querySpeakers();\n public startCamera = async (options?: VideoStreamOptions): Promise<void> =>\n await this.callWithChatAdapter.startCamera(options);\n public stopCamera = async (): Promise<void> => await this.callWithChatAdapter.stopCamera();\n public mute = async (): Promise<void> => await this.callWithChatAdapter.mute();\n public unmute = async (): Promise<void> => await this.callWithChatAdapter.unmute();\n public startScreenShare = async (): Promise<void> => await this.callWithChatAdapter.startScreenShare();\n public stopScreenShare = async (): Promise<void> => await this.callWithChatAdapter.stopScreenShare();\n public raiseHand = async (): Promise<void> => await this.callWithChatAdapter.raiseHand();\n public lowerHand = async (): Promise<void> => await this.callWithChatAdapter.lowerHand();\n public onReactionClick = async (reaction: Reaction): Promise<void> =>\n await this.callWithChatAdapter.onReactionClick(reaction);\n public removeParticipant = async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ): Promise<void> => {\n let participant = userId;\n /* @conditional-compile-remove(PSTN-calls) */\n participant = _toCommunicationIdentifier(userId);\n await this.callWithChatAdapter.removeParticipant(participant);\n };\n public createStreamView = async (\n remoteUserId?: string,\n options?: VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> =>\n await this.callWithChatAdapter.createStreamView(remoteUserId, options);\n public disposeStreamView = async (remoteUserId?: string, options?: VideoStreamOptions): Promise<void> =>\n await this.callWithChatAdapter.disposeStreamView(remoteUserId, options);\n public disposeScreenShareStreamView(remoteUserId: string): Promise<void> {\n return this.callWithChatAdapter.disposeScreenShareStreamView(remoteUserId);\n }\n public disposeRemoteVideoStreamView(remoteUserId: string): Promise<void> {\n return this.callWithChatAdapter.disposeRemoteVideoStreamView(remoteUserId);\n }\n public disposeLocalVideoStreamView(): Promise<void> {\n return this.callWithChatAdapter.disposeLocalVideoStreamView();\n }\n /* @conditional-compile-remove(PSTN-calls) */\n public holdCall = async (): Promise<void> => {\n await this.callWithChatAdapter.holdCall();\n };\n /* @conditional-compile-remove(PSTN-calls) */\n public resumeCall = async (): Promise<void> => {\n await this.callWithChatAdapter.resumeCall();\n };\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(\n participant: PhoneNumberIdentifier | CommunicationUserIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> {\n if (isPhoneNumberIdentifier(participant) && options) {\n return this.callWithChatAdapter.addParticipant(participant as PhoneNumberIdentifier, options);\n } else {\n return this.callWithChatAdapter.addParticipant(participant as CommunicationUserIdentifier);\n }\n }\n\n /* @conditional-compile-remove(unsupported-browser) */\n public allowUnsupportedBrowserVersion(): void {\n return this.callWithChatAdapter.allowUnsupportedBrowserVersion();\n }\n\n public sendDtmfTone = async (dtmfTone: DtmfTone): Promise<void> => {\n await this.callWithChatAdapter.sendDtmfTone(dtmfTone);\n };\n\n public async startCaptions(options?: StartCaptionsOptions): Promise<void> {\n this.callWithChatAdapter.startCaptions(options);\n }\n\n public async stopCaptions(): Promise<void> {\n this.callWithChatAdapter.stopCaptions();\n }\n\n public async setCaptionLanguage(language: string): Promise<void> {\n this.callWithChatAdapter.setCaptionLanguage(language);\n }\n\n public async setSpokenLanguage(language: string): Promise<void> {\n this.callWithChatAdapter.setSpokenLanguage(language);\n }\n\n public async startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void> {\n await this.callWithChatAdapter.startVideoBackgroundEffect(videoBackgroundEffect);\n }\n\n public async stopVideoBackgroundEffects(): Promise<void> {\n await this.callWithChatAdapter.stopVideoBackgroundEffects();\n }\n\n public updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void {\n return this.callWithChatAdapter.updateBackgroundPickerImages(backgroundImages);\n }\n\n public updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void {\n return this.callWithChatAdapter.updateSelectedVideoBackgroundEffect(selectedVideoBackground);\n }\n /* @conditional-compile-remove(end-of-call-survey) */\n public async submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined> {\n return this.callWithChatAdapter.submitSurvey(survey);\n }\n /* @conditional-compile-remove(spotlight) */\n public async startSpotlight(userIds?: string[]): Promise<void> {\n return this.callWithChatAdapter.startSpotlight(userIds);\n }\n\n /* @conditional-compile-remove(spotlight) */\n public async stopSpotlight(userIds?: string[]): Promise<void> {\n return this.callWithChatAdapter.stopSpotlight(userIds);\n }\n\n /* @conditional-compile-remove(spotlight) */\n public async stopAllSpotlight(): Promise<void> {\n return this.callWithChatAdapter.stopAllSpotlight();\n }\n}\n\nfunction callAdapterStateFromCallWithChatAdapterState(\n callWithChatAdapterState: CallWithChatAdapterState\n): CallAdapterState {\n return {\n isLocalPreviewMicrophoneEnabled: callWithChatAdapterState.isLocalPreviewMicrophoneEnabled,\n page: callWithChatAdapterState.page,\n userId: callWithChatAdapterState.userId,\n displayName: callWithChatAdapterState.displayName,\n call: callWithChatAdapterState.call,\n devices: callWithChatAdapterState.devices,\n isTeamsCall: callWithChatAdapterState.isTeamsCall,\n isTeamsMeeting: callWithChatAdapterState.isTeamsMeeting,\n isRoomsCall: false,\n latestErrors: callWithChatAdapterState.latestCallErrors,\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId: callWithChatAdapterState.alternateCallerId,\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo: callWithChatAdapterState.environmentInfo,\n\n videoBackgroundImages: callWithChatAdapterState.videoBackgroundImages,\n\n onResolveVideoEffectDependency: callWithChatAdapterState.onResolveVideoEffectDependency,\n\n selectedVideoBackgroundEffect: callWithChatAdapterState.selectedVideoBackgroundEffect,\n reactions: callWithChatAdapterState.reactions\n };\n}\n"]}
1
+ {"version":3,"file":"CallWithChatBackedCallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAoBlC,6CAA6C;AAC7C,OAAO,EAA2B,uBAAuB,EAAyB,MAAM,6BAA6B,CAAC;AAGtH,OAAO,EAAE,0BAA0B,EAAE,yCAAgC;AAIrE,uDAAuD;AACvD,sEAAsE;AAEtE;;;;GAIG;AACH,MAAM,OAAO,6BAA6B;IAOxC,YAAY,mBAAwC;QAJpD,gJAAgJ;QAChJ,iJAAiJ;QACzI,eAAU,GAAsF,IAAI,GAAG,EAAE,CAAC;QAM3G,OAAE,GAAG,CAAC,KAAU,EAAE,QAAa,EAAQ,EAAE;YAC9C,QAAQ,KAAK,EAAE,CAAC;gBACd,KAAK,OAAO;oBACV,OAAO,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;gBAC5D,KAAK,oBAAoB;oBACvB,OAAO,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,wBAAwB,EAAE,QAAQ,CAAC,CAAC;gBACzE,KAAK,kBAAkB;oBACrB,OAAO,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC;gBACvE;oBACE,OAAO,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;YACxD,CAAC;QACH,CAAC,CAAC;QACK,QAAG,GAAG,CAAC,KAAU,EAAE,QAAa,EAAQ,EAAE;YAC/C,QAAQ,KAAK,EAAE,CAAC;gBACd,KAAK,OAAO;oBACV,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,WAAW,EAAE,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,cAAc,EAAE,wBAAwB,CAAC,cAAc;QACvD,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,wBAAwB,CAAC,gBAAgB;QACvD,6CAA6C;QAC7C,iBAAiB,EAAE,wBAAwB,CAAC,iBAAiB;QAC7D,sDAAsD;QACtD,eAAe,EAAE,wBAAwB,CAAC,eAAe;QAEzD,qBAAqB,EAAE,wBAAwB,CAAC,qBAAqB;QAErE,8BAA8B,EAAE,wBAAwB,CAAC,8BAA8B;QAEvF,6BAA6B,EAAE,wBAAwB,CAAC,6BAA6B;QACrF,SAAS,EAAE,wBAAwB,CAAC,SAAS;KAC9C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallWithChatAdapter } from './CallWithChatAdapter';\nimport { CallAdapter, CallAdapterState } from '../../CallComposite';\n\nimport { VideoBackgroundImage, VideoBackgroundEffect } from '../../CallComposite';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\nimport {\n AudioDeviceInfo,\n VideoDeviceInfo,\n Call,\n PermissionConstraints,\n StartCallOptions\n} from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport { StartCaptionsOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { CallWithChatAdapterState } from '../state/CallWithChatAdapterState';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CommunicationIdentifier, isPhoneNumberIdentifier, PhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { CommunicationUserIdentifier } from '@azure/communication-common';\nimport { _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { JoinCallOptions, StartCallIdentifier } from '../../CallComposite/adapter/CallAdapter';\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/**\n * Facade around the CallWithChatAdapter to satisfy the call adapter interface.\n *\n * @private\n */\nexport class CallWithChatBackedCallAdapter implements CallAdapter {\n private callWithChatAdapter: CallWithChatAdapter;\n\n // For onStateChange we must convert CallWithChat state to chat state. This involves creating a new handler to be passed into the onStateChange.\n // In order to unsubscribe the handler when offStateChange is called we must have a mapping of the original handler to the newly created handler.\n private eventStore: Map<(state: CallAdapterState) => void, (state: CallWithChatAdapterState) => void> = new Map();\n\n constructor(callWithChatAdapter: CallWithChatAdapter) {\n this.callWithChatAdapter = callWithChatAdapter;\n }\n\n public on = (event: any, listener: any): void => {\n switch (event) {\n case 'error':\n return this.callWithChatAdapter.on('callError', listener);\n case 'participantsJoined':\n return this.callWithChatAdapter.on('callParticipantsJoined', listener);\n case 'participantsLeft':\n return this.callWithChatAdapter.on('callParticipantsLeft', listener);\n default:\n return this.callWithChatAdapter.on(event, listener);\n }\n };\n public off = (event: any, listener: any): void => {\n switch (event) {\n case 'error':\n return this.callWithChatAdapter.off('callError', listener);\n case 'participantsJoined':\n return this.callWithChatAdapter.off('callParticipantsJoined', listener);\n case 'participantsLeft':\n return this.callWithChatAdapter.off('callParticipantsLeft', listener);\n default:\n return this.callWithChatAdapter.off(event, listener);\n }\n };\n public onStateChange = (handler: (state: CallAdapterState) => void): void => {\n const convertedHandler = (state: CallWithChatAdapterState): void => {\n handler(callAdapterStateFromCallWithChatAdapterState(state));\n };\n this.callWithChatAdapter.onStateChange(convertedHandler);\n this.eventStore.set(handler, convertedHandler);\n };\n public offStateChange = (handler: (state: CallAdapterState) => void): void => {\n const convertedHandler = this.eventStore.get(handler);\n convertedHandler && this.callWithChatAdapter.offStateChange(convertedHandler);\n };\n public getState = (): CallAdapterState =>\n callAdapterStateFromCallWithChatAdapterState(this.callWithChatAdapter.getState());\n public dispose = (): void => this.callWithChatAdapter.dispose();\n public joinCall = (options?: boolean | JoinCallOptions): Call | undefined => {\n if (typeof options === 'boolean') {\n return this.callWithChatAdapter.joinCall(options);\n } else {\n return this.callWithChatAdapter.joinCall(options);\n }\n };\n public leaveCall = async (forEveryone?: boolean): Promise<void> =>\n await this.callWithChatAdapter.leaveCall(forEveryone);\n\n public startCall = (participants: (string | StartCallIdentifier)[], options: StartCallOptions): Call | undefined => {\n if (participants.every((participant: string | StartCallIdentifier) => typeof participant === 'string')) {\n return this.callWithChatAdapter.startCall(participants as string[], options);\n } else {\n return this.callWithChatAdapter.startCall(participants as StartCallIdentifier[], options);\n }\n };\n public setCamera = async (sourceId: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void> =>\n await this.callWithChatAdapter.setCamera(sourceId, options);\n public setMicrophone = async (sourceId: AudioDeviceInfo): Promise<void> =>\n await this.callWithChatAdapter.setMicrophone(sourceId);\n public setSpeaker = async (sourceId: AudioDeviceInfo): Promise<void> =>\n await this.callWithChatAdapter.setSpeaker(sourceId);\n public askDevicePermission = async (constraints: PermissionConstraints): Promise<void> =>\n await this.callWithChatAdapter.askDevicePermission(constraints);\n public queryCameras = async (): Promise<VideoDeviceInfo[]> => await this.callWithChatAdapter.queryCameras();\n public queryMicrophones = async (): Promise<AudioDeviceInfo[]> => await this.callWithChatAdapter.queryMicrophones();\n public querySpeakers = async (): Promise<AudioDeviceInfo[]> => await this.callWithChatAdapter.querySpeakers();\n public startCamera = async (options?: VideoStreamOptions): Promise<void> =>\n await this.callWithChatAdapter.startCamera(options);\n public stopCamera = async (): Promise<void> => await this.callWithChatAdapter.stopCamera();\n public mute = async (): Promise<void> => await this.callWithChatAdapter.mute();\n public unmute = async (): Promise<void> => await this.callWithChatAdapter.unmute();\n public startScreenShare = async (): Promise<void> => await this.callWithChatAdapter.startScreenShare();\n public stopScreenShare = async (): Promise<void> => await this.callWithChatAdapter.stopScreenShare();\n public raiseHand = async (): Promise<void> => await this.callWithChatAdapter.raiseHand();\n public lowerHand = async (): Promise<void> => await this.callWithChatAdapter.lowerHand();\n public onReactionClick = async (reaction: Reaction): Promise<void> =>\n await this.callWithChatAdapter.onReactionClick(reaction);\n public removeParticipant = async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ): Promise<void> => {\n let participant = userId;\n /* @conditional-compile-remove(PSTN-calls) */\n participant = _toCommunicationIdentifier(userId);\n await this.callWithChatAdapter.removeParticipant(participant);\n };\n public createStreamView = async (\n remoteUserId?: string,\n options?: VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> =>\n await this.callWithChatAdapter.createStreamView(remoteUserId, options);\n public disposeStreamView = async (remoteUserId?: string, options?: VideoStreamOptions): Promise<void> =>\n await this.callWithChatAdapter.disposeStreamView(remoteUserId, options);\n public disposeScreenShareStreamView(remoteUserId: string): Promise<void> {\n return this.callWithChatAdapter.disposeScreenShareStreamView(remoteUserId);\n }\n public disposeRemoteVideoStreamView(remoteUserId: string): Promise<void> {\n return this.callWithChatAdapter.disposeRemoteVideoStreamView(remoteUserId);\n }\n public disposeLocalVideoStreamView(): Promise<void> {\n return this.callWithChatAdapter.disposeLocalVideoStreamView();\n }\n /* @conditional-compile-remove(PSTN-calls) */\n public holdCall = async (): Promise<void> => {\n await this.callWithChatAdapter.holdCall();\n };\n /* @conditional-compile-remove(PSTN-calls) */\n public resumeCall = async (): Promise<void> => {\n await this.callWithChatAdapter.resumeCall();\n };\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(\n participant: PhoneNumberIdentifier | CommunicationUserIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> {\n if (isPhoneNumberIdentifier(participant) && options) {\n return this.callWithChatAdapter.addParticipant(participant as PhoneNumberIdentifier, options);\n } else {\n return this.callWithChatAdapter.addParticipant(participant as CommunicationUserIdentifier);\n }\n }\n\n /* @conditional-compile-remove(unsupported-browser) */\n public allowUnsupportedBrowserVersion(): void {\n return this.callWithChatAdapter.allowUnsupportedBrowserVersion();\n }\n\n public sendDtmfTone = async (dtmfTone: DtmfTone): Promise<void> => {\n await this.callWithChatAdapter.sendDtmfTone(dtmfTone);\n };\n\n public async startCaptions(options?: StartCaptionsOptions): Promise<void> {\n this.callWithChatAdapter.startCaptions(options);\n }\n\n public async stopCaptions(): Promise<void> {\n this.callWithChatAdapter.stopCaptions();\n }\n\n public async setCaptionLanguage(language: string): Promise<void> {\n this.callWithChatAdapter.setCaptionLanguage(language);\n }\n\n public async setSpokenLanguage(language: string): Promise<void> {\n this.callWithChatAdapter.setSpokenLanguage(language);\n }\n\n public async startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void> {\n await this.callWithChatAdapter.startVideoBackgroundEffect(videoBackgroundEffect);\n }\n\n public async stopVideoBackgroundEffects(): Promise<void> {\n await this.callWithChatAdapter.stopVideoBackgroundEffects();\n }\n\n public updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void {\n return this.callWithChatAdapter.updateBackgroundPickerImages(backgroundImages);\n }\n\n public updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void {\n return this.callWithChatAdapter.updateSelectedVideoBackgroundEffect(selectedVideoBackground);\n }\n public async submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined> {\n return this.callWithChatAdapter.submitSurvey(survey);\n }\n /* @conditional-compile-remove(spotlight) */\n public async startSpotlight(userIds?: string[]): Promise<void> {\n return this.callWithChatAdapter.startSpotlight(userIds);\n }\n\n /* @conditional-compile-remove(spotlight) */\n public async stopSpotlight(userIds?: string[]): Promise<void> {\n return this.callWithChatAdapter.stopSpotlight(userIds);\n }\n\n /* @conditional-compile-remove(spotlight) */\n public async stopAllSpotlight(): Promise<void> {\n return this.callWithChatAdapter.stopAllSpotlight();\n }\n\n /* @conditional-compile-remove(soft-mute) */\n public async muteParticipant(userId: string): Promise<void> {\n return this.callWithChatAdapter.muteParticipant(userId);\n }\n}\n\nfunction callAdapterStateFromCallWithChatAdapterState(\n callWithChatAdapterState: CallWithChatAdapterState\n): CallAdapterState {\n return {\n isLocalPreviewMicrophoneEnabled: callWithChatAdapterState.isLocalPreviewMicrophoneEnabled,\n page: callWithChatAdapterState.page,\n userId: callWithChatAdapterState.userId,\n displayName: callWithChatAdapterState.displayName,\n call: callWithChatAdapterState.call,\n devices: callWithChatAdapterState.devices,\n isTeamsCall: callWithChatAdapterState.isTeamsCall,\n isTeamsMeeting: callWithChatAdapterState.isTeamsMeeting,\n isRoomsCall: false,\n latestErrors: callWithChatAdapterState.latestCallErrors,\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId: callWithChatAdapterState.alternateCallerId,\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo: callWithChatAdapterState.environmentInfo,\n\n videoBackgroundImages: callWithChatAdapterState.videoBackgroundImages,\n\n onResolveVideoEffectDependency: callWithChatAdapterState.onResolveVideoEffectDependency,\n\n selectedVideoBackgroundEffect: callWithChatAdapterState.selectedVideoBackgroundEffect,\n reactions: callWithChatAdapterState.reactions\n };\n}\n"]}
@@ -1,18 +1,12 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  import React from 'react';
4
- /* @conditional-compile-remove(end-of-call-survey) */
5
4
  import { _StarSurvey } from "../../../../react-components/src";
6
- /* @conditional-compile-remove(end-of-call-survey) */
7
5
  import { useLocale } from '../localization';
8
6
  /** @private */
9
- export const StarSurvey = (
10
- /* @conditional-compile-remove(end-of-call-survey) */ props) => {
11
- /* @conditional-compile-remove(end-of-call-survey) */
7
+ export const StarSurvey = (props) => {
12
8
  const { onStarRatingSelected } = props;
13
- /* @conditional-compile-remove(end-of-call-survey) */
14
9
  const strings = useLocale().strings.call;
15
- /* @conditional-compile-remove(end-of-call-survey) */
16
10
  const StarSurveyStrings = {
17
11
  starSurveyHelperText: strings.starSurveyHelperText,
18
12
  starSurveyOneStarText: strings.starSurveyOneStarText,
@@ -22,8 +16,6 @@ export const StarSurvey = (
22
16
  starSurveyFiveStarText: strings.starSurveyFiveStarText,
23
17
  starRatingAriaLabel: strings.starRatingAriaLabel
24
18
  };
25
- /* @conditional-compile-remove(end-of-call-survey) */
26
19
  return React.createElement(_StarSurvey, { strings: StarSurveyStrings, onStarRatingSelected: onStarRatingSelected });
27
- return React.createElement(React.Fragment, null);
28
20
  };
29
21
  //# sourceMappingURL=StarSurvey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StarSurvey.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/StarSurvey.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,qDAAqD;AACrD,OAAO,EAAE,WAAW,EAAwD,yCAAmC;AAG/G,qDAAqD;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,eAAe;AACf,MAAM,CAAC,MAAM,UAAU,GAAG;AACxB,qDAAqD,CAAC,KAErD,EACY,EAAE;IACf,qDAAqD;IACrD,MAAM,EAAE,oBAAoB,EAAE,GAAG,KAAK,CAAC;IACvC,qDAAqD;IACrD,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAEzC,qDAAqD;IACrD,MAAM,iBAAiB,GAAuB;QAC5C,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QAClD,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;QACpD,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;QACpD,uBAAuB,EAAE,OAAO,CAAC,uBAAuB;QACxD,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;QACtD,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;QACtD,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;KACjD,CAAC;IAEF,qDAAqD;IACrD,OAAO,oBAAC,WAAW,IAAC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,oBAAoB,GAAI,CAAC;IAE/F,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { _StarSurvey, _StarSurveyStrings, _CallSurvey, _CallSurveyResponse } from '@internal/react-components';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { _captionSettingsSelector } from '@internal/calling-component-bindings';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useLocale } from '../localization';\n\n/** @private */\nexport const StarSurvey = (\n /* @conditional-compile-remove(end-of-call-survey) */ props: {\n /* @conditional-compile-remove(end-of-call-survey) */ onStarRatingSelected: (ratings: number) => void;\n }\n): JSX.Element => {\n /* @conditional-compile-remove(end-of-call-survey) */\n const { onStarRatingSelected } = props;\n /* @conditional-compile-remove(end-of-call-survey) */\n const strings = useLocale().strings.call;\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const StarSurveyStrings: _StarSurveyStrings = {\n starSurveyHelperText: strings.starSurveyHelperText,\n starSurveyOneStarText: strings.starSurveyOneStarText,\n starSurveyTwoStarText: strings.starSurveyTwoStarText,\n starSurveyThreeStarText: strings.starSurveyThreeStarText,\n starSurveyFourStarText: strings.starSurveyFourStarText,\n starSurveyFiveStarText: strings.starSurveyFiveStarText,\n starRatingAriaLabel: strings.starRatingAriaLabel\n };\n\n /* @conditional-compile-remove(end-of-call-survey) */\n return <_StarSurvey strings={StarSurveyStrings} onStarRatingSelected={onStarRatingSelected} />;\n\n return <></>;\n};\n"]}
1
+ {"version":3,"file":"StarSurvey.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/StarSurvey.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAwD,yCAAmC;AAE/G,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,eAAe;AACf,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAA0D,EAAe,EAAE;IACpG,MAAM,EAAE,oBAAoB,EAAE,GAAG,KAAK,CAAC;IACvC,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAEzC,MAAM,iBAAiB,GAAuB;QAC5C,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QAClD,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;QACpD,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;QACpD,uBAAuB,EAAE,OAAO,CAAC,uBAAuB;QACxD,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;QACtD,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;QACtD,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;KACjD,CAAC;IAEF,OAAO,oBAAC,WAAW,IAAC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,oBAAoB,GAAI,CAAC;AACjG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { _StarSurvey, _StarSurveyStrings, _CallSurvey, _CallSurveyResponse } from '@internal/react-components';\nimport { _captionSettingsSelector } from '@internal/calling-component-bindings';\nimport { useLocale } from '../localization';\n\n/** @private */\nexport const StarSurvey = (props: { onStarRatingSelected: (ratings: number) => void }): JSX.Element => {\n const { onStarRatingSelected } = props;\n const strings = useLocale().strings.call;\n\n const StarSurveyStrings: _StarSurveyStrings = {\n starSurveyHelperText: strings.starSurveyHelperText,\n starSurveyOneStarText: strings.starSurveyOneStarText,\n starSurveyTwoStarText: strings.starSurveyTwoStarText,\n starSurveyThreeStarText: strings.starSurveyThreeStarText,\n starSurveyFourStarText: strings.starSurveyFourStarText,\n starSurveyFiveStarText: strings.starSurveyFiveStarText,\n starRatingAriaLabel: strings.starRatingAriaLabel\n };\n\n return <_StarSurvey strings={StarSurveyStrings} onStarRatingSelected={onStarRatingSelected} />;\n};\n"]}
@@ -10,43 +10,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  });
11
11
  };
12
12
  import React from 'react';
13
- /* @conditional-compile-remove(end-of-call-survey) */
14
13
  import { useState } from 'react';
15
- /* @conditional-compile-remove(end-of-call-survey) */
16
14
  import { useLocale } from '../localization';
17
- /* @conditional-compile-remove(end-of-call-survey) */
18
15
  import { Text, PrimaryButton, Stack, useTheme, DefaultButton } from '@fluentui/react';
19
- /* @conditional-compile-remove(end-of-call-survey) */
20
16
  import { SurveyContent } from './SurveyContent';
21
- /* @conditional-compile-remove(end-of-call-survey) */
22
17
  import { NoticePage } from '../CallComposite/pages/NoticePage';
23
- /* @conditional-compile-remove(end-of-call-survey) */
24
18
  import { ThankYouForFeedbackPage } from '../CallComposite/pages/ThankYouForFeedbackPage';
25
- /* @conditional-compile-remove(end-of-call-survey) */
26
19
  import { questionTextStyle, surveyContainerStyle } from './styles/Survey.styles';
27
20
  /** @private */
28
21
  export const Survey = (props) => {
29
- /* @conditional-compile-remove(end-of-call-survey) */
30
22
  const { onSubmitSurvey, onSurveySubmittedCustom, onSurveyClosed, iconName, title, moreDetails, disableStartCallButton, isMobile } = props;
31
- /* @conditional-compile-remove(end-of-call-survey) */
32
23
  const strings = useLocale().strings.call;
33
- /* @conditional-compile-remove(end-of-call-survey) */
34
24
  const [ratings, setRatings] = useState(0);
35
- /* @conditional-compile-remove(end-of-call-survey) */
36
25
  const [issuesSelected, setIssuesSelected] = useState();
37
- /* @conditional-compile-remove(end-of-call-survey) */
38
26
  const [showSubmitFeedbackButton, setShowSubmitFeedbackButton] = useState(false);
39
- /* @conditional-compile-remove(end-of-call-survey) */
40
27
  const [improvementSuggestions, setImprovementSuggestions] = useState({});
41
- /* @conditional-compile-remove(end-of-call-survey) */
42
28
  const [showDefaultAfterSubmitScreen, setShowDefaultAfterSubmitScreen] = useState(false);
43
- /* @conditional-compile-remove(end-of-call-survey) */
44
29
  const [showDefaultAfterDismissedScreen, setShowDefaultAfterDismissedScreen] = useState(false);
45
- /* @conditional-compile-remove(end-of-call-survey) */
46
30
  const [submitButtonDisabled, setSubmitButtonDisabled] = useState(false);
47
- /* @conditional-compile-remove(end-of-call-survey) */
48
31
  const theme = useTheme();
49
- /* @conditional-compile-remove(end-of-call-survey) */
50
32
  return (React.createElement(React.Fragment, null,
51
33
  showDefaultAfterSubmitScreen && React.createElement(ThankYouForFeedbackPage, { iconName: iconName }),
52
34
  showDefaultAfterDismissedScreen && (React.createElement(NoticePage, { iconName: iconName, title: title, moreDetails: moreDetails, dataUiId: 'left-call-page', disableStartCallButton: disableStartCallButton })),
@@ -124,6 +106,5 @@ export const Survey = (props) => {
124
106
  });
125
107
  }
126
108
  }) }, strings.surveyConfirmButtonLabel)))))));
127
- return React.createElement(React.Fragment, null);
128
109
  };
129
110
  //# sourceMappingURL=Survey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Survey.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/Survey.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,qDAAqD;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,qDAAqD;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,qDAAqD;AACrD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACtF,qDAAqD;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAOhD,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,qDAAqD;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AACzF,qDAAq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GAAG,EAAE,EAAE;;gCACZ,uGAAuG;gCACvG,IAAI,uBAAuB,EAAE,CAAC;oCAC5B,uBAAuB,CACrB,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,mCAAI,EAAE,EACjB,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,EAAE,mCAAI,EAAE,EACb,aAAa,EACb,sBAAsB,CACvB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,CAAC;gCAC/C,CAAC;qCAAM,CAAC;oCACN,kFAAkF;oCAClF,uBAAuB,CAAC,KAAK,CAAC,CAAC;gCACjC,CAAC;gCAED,yBAAyB;gCACzB,IAAI,cAAc,EAAE,CAAC;oCACnB,gEAAgE;oCAChE,cAAc,CAAC,MAAM,CAAC,CAAC;gCACzB,CAAC;qCAAM,CAAC;oCACN,wDAAwD;oCACxD,+BAA+B,CAAC,IAAI,CAAC,CAAC;gCACxC,CAAC;4BACH,CAAC,CAAC;iCACD,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;gCACX,2EAA2E;gCAC3E,OAAO,CAAC,GAAG,CAAC,gCAAgC,GAAG,CAAC,CAAC,CAAC;gCAClD,qHAAqH;gCACrH,IAAI,cAAc,EAAE,CAAC;oCACnB,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;gCAC7B,CAAC;4BACH,CAAC,CAAC,CAAC;wBACP,CAAC;oBACH,CAAC,CAAA,IAEA,OAAO,CAAC,wBAAwB,CACnB,CACjB,CACK,CACF,CACT,CACA,CACJ,CAAC;IACF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useState } from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { Text, PrimaryButton, Stack, useTheme, DefaultButton } from '@fluentui/react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { SurveyContent } from './SurveyContent';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurveyImprovementSuggestions } from '@internal/react-components';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { _pxToRem } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallCompositeIcons } from './icons';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { NoticePage } from '../CallComposite/pages/NoticePage';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { ThankYouForFeedbackPage } from '../CallComposite/pages/ThankYouForFeedbackPage';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { questionTextStyle, surveyContainerStyle } from './styles/Survey.styles';\n\n/** @private */\nexport const Survey = (props: {\n /* @conditional-compile-remove(end-of-call-survey) */\n iconName?: keyof CallCompositeIcons;\n /* @conditional-compile-remove(end-of-call-survey) */\n title: string;\n /* @conditional-compile-remove(end-of-call-survey) */\n moreDetails?: string;\n /* @conditional-compile-remove(end-of-call-survey) */\n disableStartCallButton?: boolean;\n /* @conditional-compile-remove(end-of-call-survey) */\n isMobile?: boolean;\n /* @conditional-compile-remove(end-of-call-survey) */\n onSubmitSurvey?: (survey: CallSurvey) => Promise<CallSurveyResponse | undefined>;\n /* @conditional-compile-remove(end-of-call-survey) */\n /**\n * Optional callback to redirect users to custom screens when survey is done, note that default end call screen will be shown if this callback is not provided\n * This callback can be used to redirect users to different screens depending on survey state, whether it is submitted, skipped or has a problem when submitting the survey\n */\n onSurveyClosed?: (surveyState: 'sent' | 'skipped' | 'error', surveyError?: string) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n onSurveySubmittedCustom?: (\n callId: string,\n surveyId: string,\n /**\n * This is the survey results containing star survey data and API tag survey data.\n * This part of the result will always be sent to the calling sdk\n * This callback provides user with the ability to gain access to survey data\n */\n submittedSurvey: CallSurvey,\n /**\n * This is the survey results containing free form text\n * This part of the result will not be handled by composites\n * User will need to collect and handle this information 100% on their own\n * Free form text survey is not going to show in the UI if onSurveySubmitted is not populated\n */\n improvementSuggestions: CallSurveyImprovementSuggestions\n ) => Promise<void>;\n}): JSX.Element => {\n /* @conditional-compile-remove(end-of-call-survey) */\n const {\n onSubmitSurvey,\n onSurveySubmittedCustom,\n onSurveyClosed,\n iconName,\n title,\n moreDetails,\n disableStartCallButton,\n isMobile\n } = props;\n /* @conditional-compile-remove(end-of-call-survey) */\n const strings = useLocale().strings.call;\n /* @conditional-compile-remove(end-of-call-survey) */\n const [ratings, setRatings] = useState(0);\n /* @conditional-compile-remove(end-of-call-survey) */\n const [issuesSelected, setIssuesSelected] = useState<CallSurvey | undefined>();\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showSubmitFeedbackButton, setShowSubmitFeedbackButton] = useState(false);\n /* @conditional-compile-remove(end-of-call-survey) */\n const [improvementSuggestions, setImprovementSuggestions] = useState<CallSurveyImprovementSuggestions>({});\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showDefaultAfterSubmitScreen, setShowDefaultAfterSubmitScreen] = useState<boolean>(false);\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showDefaultAfterDismissedScreen, setShowDefaultAfterDismissedScreen] = useState<boolean>(false);\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const [submitButtonDisabled, setSubmitButtonDisabled] = useState<boolean>(false);\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const theme = useTheme();\n\n /* @conditional-compile-remove(end-of-call-survey) */\n return (\n <>\n {showDefaultAfterSubmitScreen && <ThankYouForFeedbackPage iconName={iconName} />}\n {showDefaultAfterDismissedScreen && (\n <NoticePage\n iconName={iconName}\n title={title}\n moreDetails={moreDetails}\n dataUiId={'left-call-page'}\n disableStartCallButton={disableStartCallButton}\n />\n )}\n {!showDefaultAfterSubmitScreen && !showDefaultAfterDismissedScreen && (\n <Stack verticalAlign=\"center\" className={surveyContainerStyle(!!isMobile)}>\n <Text className={questionTextStyle(theme)}>{strings.surveyTitle}</Text>\n <SurveyContent\n setShowSubmitFeedbackButton={(showButton: boolean) => {\n setShowSubmitFeedbackButton(showButton);\n }}\n setRatings={(rating: number) => {\n setRatings(rating);\n }}\n setIssuesSelected={(issuesSelected: CallSurvey) => {\n setIssuesSelected(issuesSelected);\n }}\n setImprovementSuggestions={\n onSurveySubmittedCustom\n ? (improvementSuggestions: CallSurveyImprovementSuggestions) => {\n setImprovementSuggestions(improvementSuggestions);\n }\n : undefined\n }\n />\n <Stack horizontal horizontalAlign=\"end\">\n <DefaultButton\n style={{ marginTop: '1rem', marginRight: '0.5rem' }}\n onClick={() => {\n if (onSurveyClosed) {\n onSurveyClosed('skipped');\n } else {\n setShowDefaultAfterDismissedScreen(true);\n }\n }}\n >\n {strings.surveySkipButtonLabel}\n </DefaultButton>\n\n {showSubmitFeedbackButton && (\n <PrimaryButton\n disabled={submitButtonDisabled}\n style={{ marginTop: '1rem', marginLeft: '0.5rem' }}\n onClick={async () => {\n const surveyResults: CallSurvey = { overallRating: { score: ratings } };\n if (issuesSelected?.overallRating) {\n surveyResults.overallRating = { score: ratings, issues: issuesSelected.overallRating.issues };\n }\n if (issuesSelected?.audioRating) {\n surveyResults.audioRating = { score: ratings, issues: issuesSelected.audioRating.issues };\n }\n if (issuesSelected?.screenshareRating) {\n surveyResults.screenshareRating = {\n score: ratings,\n issues: issuesSelected.screenshareRating.issues\n };\n }\n if (issuesSelected?.videoRating) {\n surveyResults.videoRating = { score: ratings, issues: issuesSelected.videoRating.issues };\n }\n if (onSubmitSurvey) {\n // disable submit button while waiting for the survey to submit\n setSubmitButtonDisabled(true);\n // submitting survey results to calling\n onSubmitSurvey(surveyResults)\n .then((res) => {\n // if contoso provided callback to handle their own survey data, send over the submitted survey results\n if (onSurveySubmittedCustom) {\n onSurveySubmittedCustom(\n res?.callId ?? '',\n res?.id ?? '',\n surveyResults,\n improvementSuggestions\n ).then(() => setSubmitButtonDisabled(false));\n } else {\n // if callback is not provided, enable the submit button after survey is submitted\n setSubmitButtonDisabled(false);\n }\n\n // redirect to new screen\n if (onSurveyClosed) {\n // redirect to new screen according to contoso's callback set up\n onSurveyClosed('sent');\n } else {\n // if call back not provided, redirect to default screen\n setShowDefaultAfterSubmitScreen(true);\n }\n })\n .catch((e) => {\n // if there is an error submitting the survey, log the error in the console\n console.log('error when submitting survey: ' + e);\n // if contoso provided redirect callback, pass contoso the error so they can redirect to a corresponding error screen\n if (onSurveyClosed) {\n onSurveyClosed('error', e);\n }\n });\n }\n }}\n >\n {strings.surveyConfirmButtonLabel}\n </PrimaryButton>\n )}\n </Stack>\n </Stack>\n )}\n </>\n );\n return <></>;\n};\n"]}
1
+ {"version":3,"file":"Survey.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/Survey.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEjF,eAAe;AACf,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KA6BtB,EAAe,EAAE;IAChB,MAAM,EACJ,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,QAAQ,EACR,K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CAClF,uBAAuB,CAAC,KAAK,CAAC,CAAC;gCACjC,CAAC;gCAED,yBAAyB;gCACzB,IAAI,cAAc,EAAE,CAAC;oCACnB,gEAAgE;oCAChE,cAAc,CAAC,MAAM,CAAC,CAAC;gCACzB,CAAC;qCAAM,CAAC;oCACN,wDAAwD;oCACxD,+BAA+B,CAAC,IAAI,CAAC,CAAC;gCACxC,CAAC;4BACH,CAAC,CAAC;iCACD,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;gCACX,2EAA2E;gCAC3E,OAAO,CAAC,GAAG,CAAC,gCAAgC,GAAG,CAAC,CAAC,CAAC;gCAClD,qHAAqH;gCACrH,IAAI,cAAc,EAAE,CAAC;oCACnB,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;gCAC7B,CAAC;4BACH,CAAC,CAAC,CAAC;wBACP,CAAC;oBACH,CAAC,CAAA,IAEA,OAAO,CAAC,wBAAwB,CACnB,CACjB,CACK,CACF,CACT,CACA,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { useState } from 'react';\nimport { useLocale } from '../localization';\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\nimport { Text, PrimaryButton, Stack, useTheme, DefaultButton } from '@fluentui/react';\nimport { SurveyContent } from './SurveyContent';\nimport { CallSurveyImprovementSuggestions } from '@internal/react-components';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { CallCompositeIcons } from './icons';\nimport { NoticePage } from '../CallComposite/pages/NoticePage';\nimport { ThankYouForFeedbackPage } from '../CallComposite/pages/ThankYouForFeedbackPage';\nimport { questionTextStyle, surveyContainerStyle } from './styles/Survey.styles';\n\n/** @private */\nexport const Survey = (props: {\n iconName?: keyof CallCompositeIcons;\n title: string;\n moreDetails?: string;\n disableStartCallButton?: boolean;\n isMobile?: boolean;\n onSubmitSurvey?: (survey: CallSurvey) => Promise<CallSurveyResponse | undefined>;\n /**\n * Optional callback to redirect users to custom screens when survey is done, note that default end call screen will be shown if this callback is not provided\n * This callback can be used to redirect users to different screens depending on survey state, whether it is submitted, skipped or has a problem when submitting the survey\n */\n onSurveyClosed?: (surveyState: 'sent' | 'skipped' | 'error', surveyError?: string) => void;\n onSurveySubmittedCustom?: (\n callId: string,\n surveyId: string,\n /**\n * This is the survey results containing star survey data and API tag survey data.\n * This part of the result will always be sent to the calling sdk\n * This callback provides user with the ability to gain access to survey data\n */\n submittedSurvey: CallSurvey,\n /**\n * This is the survey results containing free form text\n * This part of the result will not be handled by composites\n * User will need to collect and handle this information 100% on their own\n * Free form text survey is not going to show in the UI if onSurveySubmitted is not populated\n */\n improvementSuggestions: CallSurveyImprovementSuggestions\n ) => Promise<void>;\n}): JSX.Element => {\n const {\n onSubmitSurvey,\n onSurveySubmittedCustom,\n onSurveyClosed,\n iconName,\n title,\n moreDetails,\n disableStartCallButton,\n isMobile\n } = props;\n const strings = useLocale().strings.call;\n const [ratings, setRatings] = useState(0);\n const [issuesSelected, setIssuesSelected] = useState<CallSurvey | undefined>();\n const [showSubmitFeedbackButton, setShowSubmitFeedbackButton] = useState(false);\n const [improvementSuggestions, setImprovementSuggestions] = useState<CallSurveyImprovementSuggestions>({});\n\n const [showDefaultAfterSubmitScreen, setShowDefaultAfterSubmitScreen] = useState<boolean>(false);\n\n const [showDefaultAfterDismissedScreen, setShowDefaultAfterDismissedScreen] = useState<boolean>(false);\n\n const [submitButtonDisabled, setSubmitButtonDisabled] = useState<boolean>(false);\n\n const theme = useTheme();\n\n return (\n <>\n {showDefaultAfterSubmitScreen && <ThankYouForFeedbackPage iconName={iconName} />}\n {showDefaultAfterDismissedScreen && (\n <NoticePage\n iconName={iconName}\n title={title}\n moreDetails={moreDetails}\n dataUiId={'left-call-page'}\n disableStartCallButton={disableStartCallButton}\n />\n )}\n {!showDefaultAfterSubmitScreen && !showDefaultAfterDismissedScreen && (\n <Stack verticalAlign=\"center\" className={surveyContainerStyle(!!isMobile)}>\n <Text className={questionTextStyle(theme)}>{strings.surveyTitle}</Text>\n <SurveyContent\n setShowSubmitFeedbackButton={(showButton: boolean) => {\n setShowSubmitFeedbackButton(showButton);\n }}\n setRatings={(rating: number) => {\n setRatings(rating);\n }}\n setIssuesSelected={(issuesSelected: CallSurvey) => {\n setIssuesSelected(issuesSelected);\n }}\n setImprovementSuggestions={\n onSurveySubmittedCustom\n ? (improvementSuggestions: CallSurveyImprovementSuggestions) => {\n setImprovementSuggestions(improvementSuggestions);\n }\n : undefined\n }\n />\n <Stack horizontal horizontalAlign=\"end\">\n <DefaultButton\n style={{ marginTop: '1rem', marginRight: '0.5rem' }}\n onClick={() => {\n if (onSurveyClosed) {\n onSurveyClosed('skipped');\n } else {\n setShowDefaultAfterDismissedScreen(true);\n }\n }}\n >\n {strings.surveySkipButtonLabel}\n </DefaultButton>\n\n {showSubmitFeedbackButton && (\n <PrimaryButton\n disabled={submitButtonDisabled}\n style={{ marginTop: '1rem', marginLeft: '0.5rem' }}\n onClick={async () => {\n const surveyResults: CallSurvey = { overallRating: { score: ratings } };\n if (issuesSelected?.overallRating) {\n surveyResults.overallRating = { score: ratings, issues: issuesSelected.overallRating.issues };\n }\n if (issuesSelected?.audioRating) {\n surveyResults.audioRating = { score: ratings, issues: issuesSelected.audioRating.issues };\n }\n if (issuesSelected?.screenshareRating) {\n surveyResults.screenshareRating = {\n score: ratings,\n issues: issuesSelected.screenshareRating.issues\n };\n }\n if (issuesSelected?.videoRating) {\n surveyResults.videoRating = { score: ratings, issues: issuesSelected.videoRating.issues };\n }\n if (onSubmitSurvey) {\n // disable submit button while waiting for the survey to submit\n setSubmitButtonDisabled(true);\n // submitting survey results to calling\n onSubmitSurvey(surveyResults)\n .then((res) => {\n // if contoso provided callback to handle their own survey data, send over the submitted survey results\n if (onSurveySubmittedCustom) {\n onSurveySubmittedCustom(\n res?.callId ?? '',\n res?.id ?? '',\n surveyResults,\n improvementSuggestions\n ).then(() => setSubmitButtonDisabled(false));\n } else {\n // if callback is not provided, enable the submit button after survey is submitted\n setSubmitButtonDisabled(false);\n }\n\n // redirect to new screen\n if (onSurveyClosed) {\n // redirect to new screen according to contoso's callback set up\n onSurveyClosed('sent');\n } else {\n // if call back not provided, redirect to default screen\n setShowDefaultAfterSubmitScreen(true);\n }\n })\n .catch((e) => {\n // if there is an error submitting the survey, log the error in the console\n console.log('error when submitting survey: ' + e);\n // if contoso provided redirect callback, pass contoso the error so they can redirect to a corresponding error screen\n if (onSurveyClosed) {\n onSurveyClosed('error', e);\n }\n });\n }\n }}\n >\n {strings.surveyConfirmButtonLabel}\n </PrimaryButton>\n )}\n </Stack>\n </Stack>\n )}\n </>\n );\n};\n"]}
@@ -1,22 +1,15 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  import React from 'react';
4
- /* @conditional-compile-remove(end-of-call-survey) */
5
4
  import { StarSurvey } from './StarSurvey';
6
- /* @conditional-compile-remove(end-of-call-survey) */
7
5
  import { TagsSurvey } from './TagsSurvey';
8
- /* @conditional-compile-remove(end-of-call-survey) */
9
6
  import { useState } from 'react';
10
- /* @conditional-compile-remove(end-of-call-survey) */
11
7
  import { Stack } from '@fluentui/react';
12
8
  /**
13
9
  * @private
14
10
  */
15
- export const SurveyContent = (
16
- /* @conditional-compile-remove(end-of-call-survey) */ props) => {
17
- /* @conditional-compile-remove(end-of-call-survey) */
11
+ export const SurveyContent = (props) => {
18
12
  const [showTagsSurvey, setShowTagsSurvey] = useState(false);
19
- /* @conditional-compile-remove(end-of-call-survey) */
20
13
  const onStarRatingSelected = (ratings) => {
21
14
  if (ratings < 5) {
22
15
  setShowTagsSurvey(true);
@@ -27,7 +20,6 @@ export const SurveyContent = (
27
20
  }
28
21
  props.setRatings(ratings);
29
22
  };
30
- /* @conditional-compile-remove(end-of-call-survey) */
31
23
  const onIssuesSelected = (selectedTags, improvementSuggestions) => {
32
24
  props.setIssuesSelected(selectedTags);
33
25
  props.setShowSubmitFeedbackButton(true);
@@ -35,10 +27,8 @@ export const SurveyContent = (
35
27
  props.setImprovementSuggestions(improvementSuggestions);
36
28
  }
37
29
  };
38
- /* @conditional-compile-remove(end-of-call-survey) */
39
30
  return (React.createElement(Stack, { "data-ui-id": "call-composite-survey" },
40
31
  React.createElement(StarSurvey, { onStarRatingSelected: onStarRatingSelected }),
41
32
  showTagsSurvey && (React.createElement(TagsSurvey, { onConfirm: onIssuesSelected, showFreeFormTextField: !(props.setImprovementSuggestions === undefined) }))));
42
- return React.createElement(React.Fragment, null);
43
33
  };
44
34
  //# sourceMappingURL=SurveyContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SurveyContent.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/SurveyContent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,qDAAqD;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAWjC,qDAAqD;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;AAC3B,qDAAqD,CAAC,KASrD,EACY,EAAE;IACf,qDAAqD;IACrD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5D,qDAAqD;IACrD,MAAM,oBAAoB,GAAG,CAAC,OAAe,EAAQ,EAAE;QACrD,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;YAChB,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACxB,KAAK,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;QAC1C,CAAC;QACD,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC,CAAC;IACF,qDAAqD;IACrD,MAAM,gBAAgB,GAAG,CACvB,YAAwB,EACxB,sBAAyD,EACnD,EAAE;QACR,KAAK,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;QACtC,KAAK,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,sBAAsB,IAAI,KAAK,CAAC,yBAAyB,EAAE,CAAC;YAC9D,KAAK,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC,CAAC;IACF,qDAAqD;IACrD,OAAO,CACL,oBAAC,KAAK,kBAAY,uBAAuB;QACvC,oBAAC,UAAU,IAAC,oBAAoB,EAAE,oBAAoB,GAAI;QAEzD,cAAc,IAAI,CACjB,oBAAC,UAAU,IACT,SAAS,EAAE,gBAAgB,EAC3B,qBAAqB,EAAE,CAAC,CAAC,KAAK,CAAC,yBAAyB,KAAK,SAAS,CAAC,GACvE,CACH,CACK,CACT,CAAC;IAEF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { StarSurvey } from './StarSurvey';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { TagsSurvey } from './TagsSurvey';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useState } from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport {\n _AudioIssue,\n _OverallIssue,\n _ScreenshareIssue,\n _VideoIssue,\n CallSurveyImprovementSuggestions\n} from '@internal/react-components';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey } from '@azure/communication-calling';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { Stack } from '@fluentui/react';\n\n/**\n * @private\n */\nexport const SurveyContent = (\n /* @conditional-compile-remove(end-of-call-survey) */ props: {\n /* @conditional-compile-remove(end-of-call-survey) */\n setShowSubmitFeedbackButton: (showButton: boolean) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n setRatings: (rating: number) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n setIssuesSelected: (issuesSelected: CallSurvey) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n setImprovementSuggestions?: (improvementSuggestions: CallSurveyImprovementSuggestions) => void;\n }\n): JSX.Element => {\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showTagsSurvey, setShowTagsSurvey] = useState(false);\n /* @conditional-compile-remove(end-of-call-survey) */\n const onStarRatingSelected = (ratings: number): void => {\n if (ratings < 5) {\n setShowTagsSurvey(true);\n props.setShowSubmitFeedbackButton(true);\n } else {\n props.setShowSubmitFeedbackButton(true);\n }\n props.setRatings(ratings);\n };\n /* @conditional-compile-remove(end-of-call-survey) */\n const onIssuesSelected = (\n selectedTags: CallSurvey,\n improvementSuggestions?: CallSurveyImprovementSuggestions\n ): void => {\n props.setIssuesSelected(selectedTags);\n props.setShowSubmitFeedbackButton(true);\n if (improvementSuggestions && props.setImprovementSuggestions) {\n props.setImprovementSuggestions(improvementSuggestions);\n }\n };\n /* @conditional-compile-remove(end-of-call-survey) */\n return (\n <Stack data-ui-id=\"call-composite-survey\">\n <StarSurvey onStarRatingSelected={onStarRatingSelected} />\n\n {showTagsSurvey && (\n <TagsSurvey\n onConfirm={onIssuesSelected}\n showFreeFormTextField={!(props.setImprovementSuggestions === undefined)}\n />\n )}\n </Stack>\n );\n\n return <></>;\n};\n"]}
1
+ {"version":3,"file":"SurveyContent.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/SurveyContent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,U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Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { StarSurvey } from './StarSurvey';\nimport { TagsSurvey } from './TagsSurvey';\nimport { useState } from 'react';\nimport {\n _AudioIssue,\n _OverallIssue,\n _ScreenshareIssue,\n _VideoIssue,\n CallSurveyImprovementSuggestions\n} from '@internal/react-components';\nimport { CallSurvey } from '@azure/communication-calling';\nimport { Stack } from '@fluentui/react';\n\n/**\n * @private\n */\nexport const SurveyContent = (props: {\n setShowSubmitFeedbackButton: (showButton: boolean) => void;\n setRatings: (rating: number) => void;\n setIssuesSelected: (issuesSelected: CallSurvey) => void;\n setImprovementSuggestions?: (improvementSuggestions: CallSurveyImprovementSuggestions) => void;\n}): JSX.Element => {\n const [showTagsSurvey, setShowTagsSurvey] = useState(false);\n const onStarRatingSelected = (ratings: number): void => {\n if (ratings < 5) {\n setShowTagsSurvey(true);\n props.setShowSubmitFeedbackButton(true);\n } else {\n props.setShowSubmitFeedbackButton(true);\n }\n props.setRatings(ratings);\n };\n\n const onIssuesSelected = (\n selectedTags: CallSurvey,\n improvementSuggestions?: CallSurveyImprovementSuggestions\n ): void => {\n props.setIssuesSelected(selectedTags);\n props.setShowSubmitFeedbackButton(true);\n if (improvementSuggestions && props.setImprovementSuggestions) {\n props.setImprovementSuggestions(improvementSuggestions);\n }\n };\n\n return (\n <Stack data-ui-id=\"call-composite-survey\">\n <StarSurvey onStarRatingSelected={onStarRatingSelected} />\n\n {showTagsSurvey && (\n <TagsSurvey\n onConfirm={onIssuesSelected}\n showFreeFormTextField={!(props.setImprovementSuggestions === undefined)}\n />\n )}\n </Stack>\n );\n};\n"]}
@@ -1,23 +1,16 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  import React from 'react';
4
- /* @conditional-compile-remove(end-of-call-survey) */
5
4
  import { _TagsSurvey } from "../../../../react-components/src";
6
- /* @conditional-compile-remove(end-of-call-survey) */
7
5
  import { useLocale } from '../localization';
8
6
  /** @private */
9
- export const TagsSurvey = (
10
- /* @conditional-compile-remove(end-of-call-survey) */ props) => {
11
- /* @conditional-compile-remove(end-of-call-survey) */
7
+ export const TagsSurvey = (props) => {
12
8
  const strings = useLocale().strings.call;
13
- /* @conditional-compile-remove(end-of-call-survey) */
14
9
  const tagsSurveyStrings = {
15
10
  tagsSurveyQuestion: strings.tagsSurveyQuestion,
16
11
  tagsSurveyHelperText: strings.tagsSurveyHelperText,
17
12
  tagsSurveyTextFieldDefaultText: strings.tagsSurveyTextFieldDefaultText
18
13
  };
19
- /* @conditional-compile-remove(end-of-call-survey) */
20
14
  return (React.createElement(_TagsSurvey, { callIssuesToTag: strings.surveyIssues, categoryHeadings: strings.surveyIssuesHeadingStrings, onConfirm: props.onConfirm, strings: tagsSurveyStrings, showFreeFormTextField: props.showFreeFormTextField }));
21
- return React.createElement(React.Fragment, null);
22
15
  };
23
16
  //# sourceMappingURL=TagsSurvey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TagsSurvey.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/TagsSurvey.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,qDAAqD;AACrD,OAAO,EACL,WAAW,EAQZ,yCAAmC;AAGpC,qDAAqD;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,eAAe;AACf,MAAM,CAAC,MAAM,UAAU,GAAG;AACxB,qDAAqD,CAAC,KAKrD,EACY,EAAE;IACf,qDAAqD;IACrD,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACzC,qDAAqD;IACrD,MAAM,iBAAiB,GAAuB;QAC5C,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;QAC9C,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QAClD,8BAA8B,EAAE,OAAO,CAAC,8BAA8B;KACvE,CAAC;IAEF,qDAAqD;IACrD,OAAO,CACL,oBAAC,WAAW,IACV,eAAe,EAAE,OAAO,CAAC,YAAY,EACrC,gBAAgB,EAAE,OAAO,CAAC,0BAA0B,EACpD,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,OAAO,EAAE,iBAAiB,EAC1B,qBAAqB,EAAE,KAAK,CAAC,qBAAqB,GAClD,CACH,CAAC;IAEF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport {\n _TagsSurvey,\n _TagsSurveyStrings,\n _AudioIssue,\n _OverallIssue,\n _ScreenshareIssue,\n _VideoIssue,\n _CallSurvey,\n CallSurveyImprovementSuggestions\n} from '@internal/react-components';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { _captionSettingsSelector } from '@internal/calling-component-bindings';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useLocale } from '../localization';\n\n/** @private */\nexport const TagsSurvey = (\n /* @conditional-compile-remove(end-of-call-survey) */ props: {\n /* @conditional-compile-remove(end-of-call-survey) */\n onConfirm?: (survey: _CallSurvey, improvementSuggestions?: CallSurveyImprovementSuggestions) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n showFreeFormTextField?: boolean;\n }\n): JSX.Element => {\n /* @conditional-compile-remove(end-of-call-survey) */\n const strings = useLocale().strings.call;\n /* @conditional-compile-remove(end-of-call-survey) */\n const tagsSurveyStrings: _TagsSurveyStrings = {\n tagsSurveyQuestion: strings.tagsSurveyQuestion,\n tagsSurveyHelperText: strings.tagsSurveyHelperText,\n tagsSurveyTextFieldDefaultText: strings.tagsSurveyTextFieldDefaultText\n };\n\n /* @conditional-compile-remove(end-of-call-survey) */\n return (\n <_TagsSurvey\n callIssuesToTag={strings.surveyIssues}\n categoryHeadings={strings.surveyIssuesHeadingStrings}\n onConfirm={props.onConfirm}\n strings={tagsSurveyStrings}\n showFreeFormTextField={props.showFreeFormTextField}\n />\n );\n\n return <></>;\n};\n"]}
1
+ {"version":3,"file":"TagsSurvey.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/TagsSurvey.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,WAAW,EAQZ,yCAAmC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,eAAe;AACf,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAG1B,EAAe,EAAE;IAChB,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACzC,MAAM,iBAAiB,GAAuB;QAC5C,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;QAC9C,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QAClD,8BAA8B,EAAE,OAAO,CAAC,8BAA8B;KACvE,CAAC;IAEF,OAAO,CACL,oBAAC,WAAW,IACV,eAAe,EAAE,OAAO,CAAC,YAAY,EACrC,gBAAgB,EAAE,OAAO,CAAC,0BAA0B,EACpD,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,OAAO,EAAE,iBAAiB,EAC1B,qBAAqB,EAAE,KAAK,CAAC,qBAAqB,GAClD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport {\n _TagsSurvey,\n _TagsSurveyStrings,\n _AudioIssue,\n _OverallIssue,\n _ScreenshareIssue,\n _VideoIssue,\n _CallSurvey,\n CallSurveyImprovementSuggestions\n} from '@internal/react-components';\nimport { _captionSettingsSelector } from '@internal/calling-component-bindings';\nimport { useLocale } from '../localization';\n\n/** @private */\nexport const TagsSurvey = (props: {\n onConfirm?: (survey: _CallSurvey, improvementSuggestions?: CallSurveyImprovementSuggestions) => void;\n showFreeFormTextField?: boolean;\n}): JSX.Element => {\n const strings = useLocale().strings.call;\n const tagsSurveyStrings: _TagsSurveyStrings = {\n tagsSurveyQuestion: strings.tagsSurveyQuestion,\n tagsSurveyHelperText: strings.tagsSurveyHelperText,\n tagsSurveyTextFieldDefaultText: strings.tagsSurveyTextFieldDefaultText\n };\n\n return (\n <_TagsSurvey\n callIssuesToTag={strings.surveyIssues}\n categoryHeadings={strings.surveyIssuesHeadingStrings}\n onConfirm={props.onConfirm}\n strings={tagsSurveyStrings}\n showFreeFormTextField={props.showFreeFormTextField}\n />\n );\n};\n"]}
@@ -172,6 +172,7 @@ export declare const DEFAULT_COMPOSITE_ICONS: {
172
172
  RichTextInsertTableFilledIcon: React.JSX.Element;
173
173
  RichTextTableInsertMenuIcon: React.JSX.Element;
174
174
  RichTextTableDeleteMenuIcon: React.JSX.Element;
175
+ ContextualMenuMicMutedIcon: React.JSX.Element;
175
176
  };
176
177
  /** @private */
177
178
  export type CompositeIconProps<Icons> = IIconProps & {
@@ -1,10 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- /* @conditional-compile-remove(end-of-call-survey) */
4
3
  import { mergeStyles } from '@fluentui/react';
5
- /* @conditional-compile-remove(end-of-call-survey) */
6
4
  import { _pxToRem } from "../../../../../acs-ui-common/src";
7
- /* @conditional-compile-remove(end-of-call-survey) */
8
5
  /**
9
6
  * @private
10
7
  */
@@ -14,7 +11,6 @@ export const questionTextStyle = (theme) => mergeStyles({
14
11
  lineHeight: _pxToRem(20),
15
12
  color: theme.palette.neutralPrimary
16
13
  });
17
- /* @conditional-compile-remove(end-of-call-survey) */
18
14
  /**
19
15
  * @private
20
16
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Survey.styles.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/styles/Survey.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,qDAAqD;AACrD,OAAO,EAAS,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACrD,qDAAqD;AACrD,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAEnD,qDAAqD;AACrD;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAY,EAAU,EAAE,CACxD,WAAW,CAAC;IACV,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;IACxB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;CACpC,CAAC,CAAC;AAEL,qDAAqD;AACrD;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,QAAiB,EAAU,EAAE,CAChE,WAAW,CACT,QAAQ;IACN,CAAC,CAAC;QACE,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,kBAAkB;KAC9B;IACH,CAAC,CAAC;QACE,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,kBAAkB;KAC9B,CACN,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { Theme, mergeStyles } from '@fluentui/react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { _pxToRem } from '@internal/acs-ui-common';\n\n/* @conditional-compile-remove(end-of-call-survey) */\n/**\n * @private\n */\nexport const questionTextStyle = (theme: Theme): string =>\n mergeStyles({\n fontWeight: 600,\n fontSize: _pxToRem(20),\n lineHeight: _pxToRem(20),\n color: theme.palette.neutralPrimary\n });\n\n/* @conditional-compile-remove(end-of-call-survey) */\n/**\n * @private\n */\nexport const surveyContainerStyle = (isMobile: boolean): string =>\n mergeStyles(\n isMobile\n ? {\n width: '20rem',\n position: 'absolute',\n top: '10%',\n left: '50%',\n transform: 'translateX(-50%)'\n }\n : {\n width: '24rem',\n position: 'absolute',\n top: '20%',\n left: '50%',\n transform: 'translateX(-50%)'\n }\n );\n"]}
1
+ {"version":3,"file":"Survey.styles.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/styles/Survey.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAS,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAY,EAAU,EAAE,CACxD,WAAW,CAAC;IACV,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;IACxB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;CACpC,CAAC,CAAC;AAEL;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,QAAiB,EAAU,EAAE,CAChE,WAAW,CACT,QAAQ;IACN,CAAC,CAAC;QACE,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,kBAAkB;KAC9B;IACH,CAAC,CAAC;QACE,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,kBAAkB;KAC9B,CACN,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Theme, mergeStyles } from '@fluentui/react';\nimport { _pxToRem } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport const questionTextStyle = (theme: Theme): string =>\n mergeStyles({\n fontWeight: 600,\n fontSize: _pxToRem(20),\n lineHeight: _pxToRem(20),\n color: theme.palette.neutralPrimary\n });\n\n/**\n * @private\n */\nexport const surveyContainerStyle = (isMobile: boolean): string =>\n mergeStyles(\n isMobile\n ? {\n width: '20rem',\n position: 'absolute',\n top: '10%',\n left: '50%',\n transform: 'translateX(-50%)'\n }\n : {\n width: '24rem',\n position: 'absolute',\n top: '20%',\n left: '50%',\n transform: 'translateX(-50%)'\n }\n );\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-react",
3
- "version": "1.17.0-alpha-202405310013",
3
+ "version": "1.17.0-alpha-202406020014",
4
4
  "sideEffects": false,
5
5
  "description": "React library for building modern communication user experiences utilizing Azure Communication Services",
6
6
  "keywords": [
@@ -44,11 +44,11 @@
44
44
  "react-linkify": "^1.0.0-alpha",
45
45
  "react-use-draggable-scroll": "^0.4.7",
46
46
  "reselect": "^4.0.0",
47
- "roosterjs-content-model-api": "^9.3.0",
48
- "roosterjs-content-model-core": "^9.3.0",
49
- "roosterjs-content-model-dom": "^9.3.0",
50
- "roosterjs-content-model-plugins": "^9.3.0",
51
- "roosterjs-content-model-types": "^9.3.0",
47
+ "roosterjs-content-model-api": "^9.4.0",
48
+ "roosterjs-content-model-core": "^9.4.0",
49
+ "roosterjs-content-model-dom": "^9.4.0",
50
+ "roosterjs-content-model-plugins": "^9.4.0",
51
+ "roosterjs-content-model-types": "^9.4.0",
52
52
  "textarea-caret-ts": "^4.1.1",
53
53
  "use-debounce": "^10.0.0",
54
54
  "uuid": "^9.0.0"