@azure/communication-react 1.20.0-alpha-202409241651 → 1.20.0-alpha-202409260015

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/communication-react.d.ts +15 -14
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-4h-naDvk.js → ChatMessageComponentAsRichTextEditBox-D42-cJxc.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-4h-naDvk.js.map → ChatMessageComponentAsRichTextEditBox-D42-cJxc.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-ChJjJ010.js → RichTextSendBoxWrapper-BkOCT0LJ.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-ChJjJ010.js.map → RichTextSendBoxWrapper-BkOCT0LJ.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-DwDfOjtr.js → index-Bb1hVEre.js} +157 -344
  7. package/dist/dist-cjs/communication-react/index-Bb1hVEre.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/baseSelectors.d.ts +2 -2
  12. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  13. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -3
  14. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -5
  16. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +3 -12
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +2 -7
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +3 -0
  22. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +8 -22
  23. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/incomingCallStackSelector.js.map +1 -1
  25. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  26. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +3 -8
  27. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  28. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +7 -3
  29. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +8 -1
  30. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  31. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +3 -2
  32. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +2 -4
  33. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  34. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +1 -6
  35. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  36. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
  37. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +3 -3
  38. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -1
  40. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  41. package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +1 -1
  42. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -2
  43. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  44. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +0 -1
  45. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  46. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +1 -1
  47. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +0 -4
  48. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  49. package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js +2 -1
  50. package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js.map +1 -1
  51. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  52. package/dist/dist-esm/communication-react/src/index.js +0 -2
  53. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  54. package/dist/dist-esm/react-components/src/components/IncomingCallNotification.js +7 -30
  55. package/dist/dist-esm/react-components/src/components/IncomingCallNotification.js.map +1 -1
  56. package/dist/dist-esm/react-components/src/components/IncomingCallStack.js +1 -5
  57. package/dist/dist-esm/react-components/src/components/IncomingCallStack.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/components/InputBoxButton.d.ts +1 -1
  59. package/dist/dist-esm/react-components/src/components/InputBoxButton.js +8 -9
  60. package/dist/dist-esm/react-components/src/components/InputBoxButton.js.map +1 -1
  61. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +0 -2
  62. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  63. package/dist/dist-esm/react-components/src/components/ParticipantList.js +1 -4
  64. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  65. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +5 -7
  66. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  67. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +14 -18
  68. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
  69. package/dist/dist-esm/react-components/src/components/SendBox.js +11 -21
  70. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  71. package/dist/dist-esm/react-components/src/components/StreamMedia.d.ts +1 -1
  72. package/dist/dist-esm/react-components/src/components/StreamMedia.js +5 -3
  73. package/dist/dist-esm/react-components/src/components/StreamMedia.js.map +1 -1
  74. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +1 -6
  75. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  76. package/dist/dist-esm/react-components/src/components/VideoGallery.js +1 -3
  77. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  78. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +2 -0
  79. package/dist/dist-esm/react-components/src/components/VideoTile.js +3 -11
  80. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  81. package/dist/dist-esm/react-components/src/components/index.js +0 -2
  82. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  83. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +1 -4
  84. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +2 -4
  85. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.d.ts +8 -0
  87. package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.js +27 -0
  88. package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.js.map +1 -1
  89. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +3 -3
  90. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +3 -3
  91. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  92. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  93. package/dist/dist-esm/react-components/src/theming/icons.js +0 -8
  94. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  95. package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
  96. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +1 -1
  97. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
  98. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  99. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +1 -7
  100. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  101. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  102. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +2 -2
  103. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +2 -10
  104. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  105. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +2 -2
  106. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  107. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +3 -15
  108. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  109. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -11
  110. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  111. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +8 -23
  112. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +1 -1
  113. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +1 -4
  114. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  115. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +0 -4
  116. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  117. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +0 -2
  118. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  119. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
  120. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +7 -8
  121. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js +1 -7
  122. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js.map +1 -1
  123. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -3
  124. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  125. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +1 -1
  126. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +1 -8
  127. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  128. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  129. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -1
  130. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +5 -15
  131. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  132. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +1 -1
  133. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  134. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -1
  135. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -6
  136. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  137. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +0 -1
  138. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  139. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -1
  140. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +0 -2
  141. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  142. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +3 -14
  143. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
  144. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +1 -3
  145. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
  146. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +1 -7
  147. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
  148. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +6 -19
  149. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  150. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +0 -4
  151. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  152. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +0 -3
  153. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  154. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  155. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +2 -13
  156. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  157. package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -4
  158. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  159. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +4 -4
  160. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  161. package/dist/tsdoc-metadata.json +1 -1
  162. package/package.json +1 -1
  163. package/dist/dist-cjs/communication-react/index-DwDfOjtr.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"createHandlers.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/handlers/createHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAOlC,6CAA6C;AAC7C,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,EACxB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,0BAA0B,EAAE,mCAAgC;AAIrE,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,mDAAmD;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,kCAAkC,EAAyB,MAAM,wBAAwB,CAAC;AA8CnG;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAiC,UAAU,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE;;IAC/F,MAAM,CAAC,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACnE,iDAAiD;IACjD,MAAM,SAAS,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,EAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,IAA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ACH,CAAC,CAAA;QACD,iDAAiD;QACjD,QAAQ,EAAE,sBAAsB;YAC9B,CAAC,CAAC,GAAS,EAAE,kDAAC,OAAA,sBAAsB,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,QAAQ,EAAE,CAAC,CAAA,GAAA;YAC1F,CAAC,CAAC,qBAAqB,CAAC,QAAQ,IAClC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Call, CallAgent, StartCallOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { IncomingCallCommon } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport {\n isCommunicationUserIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isPhoneNumberIdentifier\n} from '@azure/communication-common';\nimport { CommunicationIdentifier } from '@azure/communication-common';\n\nimport { _toCommunicationIdentifier } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { DeclarativeCallAgent } from '@internal/calling-stateful-client';\nimport { StatefulCallClient, StatefulDeviceManager } from '@internal/calling-stateful-client';\nimport memoizeOne from 'memoize-one';\nimport { isACSCallParticipants } from '../utils/callUtils';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { createLocalVideoStream } from '../utils/callUtils';\nimport { createDefaultCommonCallingHandlers, CommonCallingHandlers } from './createCommonHandlers';\n\nimport { VideoBackgroundEffectsDependency } from './createCommonHandlers';\n/* @conditional-compile-remove(DNS) */\nimport { DeepNoiseSuppressionEffectDependency } from './createCommonHandlers';\n\n/**\n * Object containing all the handlers required for calling components.\n *\n * Calling related components from this package are able to pick out relevant handlers from this object.\n * See {@link useHandlers} and {@link usePropsFor}.\n *\n * @public\n */\nexport interface CallingHandlers extends CommonCallingHandlers {\n onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => Call | undefined;\n}\n\n/**\n * Configuration options to include video effect background dependency.\n * @public\n */\nexport type CallingHandlersOptions = {\n onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n /* @conditional-compile-remove(DNS) */\n /**\n * Dependency resolver for deep noise suppression effect.\n * @beta\n */\n onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;\n};\n\n/**\n * Type of {@link createDefaultCallingHandlers}.\n *\n * @public\n */\nexport type CreateDefaultCallingHandlers = (\n callClient: StatefulCallClient,\n callAgent: CallAgent | undefined,\n deviceManager: StatefulDeviceManager | undefined,\n call: Call | undefined,\n\n options?: CallingHandlersOptions\n) => CallingHandlers;\n\n/**\n * Create the default implementation of {@link CallingHandlers} for teams call.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const createDefaultCallingHandlers: CreateDefaultCallingHandlers = memoizeOne((...args) => {\n const [callClient, callAgent, deviceManager, call, options] = args;\n /* @conditional-compile-remove(breakout-rooms) */\n const callState = call?.id ? callClient.getState().calls[call?.id] : undefined;\n /* @conditional-compile-remove(breakout-rooms) */\n const breakoutRoomOriginCallId = callState?.breakoutRooms?.breakoutRoomOriginCallId;\n /* @conditional-compile-remove(breakout-rooms) */\n const breakoutRoomOriginCall = callAgent?.calls.find((call) => call.id === breakoutRoomOriginCallId);\n const commonCallingHandlers = createDefaultCommonCallingHandlers(callClient, deviceManager, call, options);\n return {\n ...commonCallingHandlers,\n // FIXME: onStartCall API should use string, not the underlying SDK types.\n onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined => {\n /* @conditional-compile-remove(teams-adhoc-call) */\n return callAgent?.startCall(participants, options);\n if (!isACSCallParticipants(participants)) {\n throw new Error('TeamsUserIdentifier in Teams call is not supported!');\n }\n return callAgent?.startCall(participants, options);\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant: async (\n userId: string | CommunicationIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n if (isPhoneNumberIdentifier(participant)) {\n call?.addParticipant(participant, options);\n } else if (isCommunicationUserIdentifier(participant) || isMicrosoftTeamsUserIdentifier(participant)) {\n call?.addParticipant(participant);\n }\n },\n onRemoveParticipant: async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n await call?.removeParticipant(participant);\n },\n /* @conditional-compile-remove(one-to-n-calling) */\n onAcceptCall: async (incomingCallId: string, useVideo?: boolean): Promise<void> => {\n const localVideoStream = useVideo ? await createLocalVideoStream(callClient) : undefined;\n const incomingCall = (callAgent as DeclarativeCallAgent)?.incomingCalls.find(\n (incomingCall: IncomingCallCommon) => incomingCall.id === incomingCallId\n );\n if (incomingCall) {\n await incomingCall.accept(\n localVideoStream ? { videoOptions: { localVideoStreams: [localVideoStream] } } : undefined\n );\n }\n },\n /* @conditional-compile-remove(one-to-n-calling) */\n onRejectCall: async (incomingCallId: string): Promise<void> => {\n const incomingCall = (callAgent as DeclarativeCallAgent)?.incomingCalls.find(\n (incomingCall: IncomingCallCommon) => incomingCall.id === incomingCallId\n );\n if (incomingCall) {\n await incomingCall.reject();\n }\n },\n /* @conditional-compile-remove(breakout-rooms) */\n onHangUp: breakoutRoomOriginCall\n ? async () => breakoutRoomOriginCall.hangUp().then(() => commonCallingHandlers.onHangUp())\n : commonCallingHandlers.onHangUp\n };\n});\n\n/**\n * Handlers only for calling components\n * @internal\n */\nexport interface _ComponentCallingHandlers {\n /** VideoGallery callback prop to start local spotlight */\n onStartLocalSpotlight: () => Promise<void>;\n /** VideoGallery callback prop to stop local spotlight */\n onStopLocalSpotlight: () => Promise<void>;\n /** VideoGallery callback prop to start remote spotlight */\n onStartRemoteSpotlight: (userIds: string[]) => Promise<void>;\n /** VideoGallery callback prop to stop remote spotlight */\n onStopRemoteSpotlight: (userIds: string[]) => Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"createHandlers.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/handlers/createHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAKlC,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,EACxB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,0BAA0B,EAAE,mCAAgC;AAGrE,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,kCAAkC,EAAyB,MAAM,wBAAwB,CAAC;AA8CnG;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAiC,UAAU,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE;;IAC/F,MAAM,CAAC,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACnE,iDAAiD;IACjD,MAAM,SAAS,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,EAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/E,iDAAiD;IACjD,MAAM,wBAAwB,GAAG,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,aAAa,0CAAE,wBAAwB,CAAC;IACpF,iDAAiD;IACjD,MAAM,sBAAsB,GAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,wBAAwB,CAAC,CAAC;IACrG,MAAM,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AM,gBAAgB,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,sBAAsB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACzF,MAAM,YAAY,GAAI,SAAkC,aAAlC,SAAS,uBAAT,SAAS,CAA2B,aAAa,CAAC,IAAI,CAC1E,CAAC,YAAgC,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,KAAK,cAAc,CACzE,CAAC;YACF,IAAI,YAAY,EAAE,CAAC;gBACjB,MAAM,YAAY,CAAC,MAAM,CACvB,gBAAgB,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,EAAE,iBAAiB,EAAE,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAC3F,CAAC;YACJ,CAAC;QACH,CAAC,CAAA,EACD,YAAY,EAAE,CAAO,cAAsB,EAAiB,EAAE;YAC5D,MAAM,YAAY,GAAI,SAAkC,aAAlC,SAAS,uBAAT,SAAS,CAA2B,aAAa,CAAC,IAAI,CAC1E,CAAC,YAAgC,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,KAAK,cAAc,CACzE,CAAC;YACF,IAAI,YAAY,EAAE,CAAC;gBACjB,MAAM,YAAY,CAAC,MAAM,EAAE,CAAC;YAC9B,CAAC;QACH,CAAC,CAAA;QACD,iDAAiD;QACjD,QAAQ,EAAE,sBAAsB;YAC9B,CAAC,CAAC,GAAS,EAAE,kDAAC,OAAA,sBAAsB,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,QAAQ,EAAE,CAAC,CAAA,GAAA;YAC1F,CAAC,CAAC,qBAAqB,CAAC,QAAQ,IAClC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Call, CallAgent, StartCallOptions } from '@azure/communication-calling';\nimport { IncomingCallCommon } from '@azure/communication-calling';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport {\n isCommunicationUserIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isPhoneNumberIdentifier\n} from '@azure/communication-common';\nimport { CommunicationIdentifier } from '@azure/communication-common';\n\nimport { _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { DeclarativeCallAgent } from '@internal/calling-stateful-client';\nimport { StatefulCallClient, StatefulDeviceManager } from '@internal/calling-stateful-client';\nimport memoizeOne from 'memoize-one';\nimport { isACSCallParticipants } from '../utils/callUtils';\nimport { createLocalVideoStream } from '../utils/callUtils';\nimport { createDefaultCommonCallingHandlers, CommonCallingHandlers } from './createCommonHandlers';\n\nimport { VideoBackgroundEffectsDependency } from './createCommonHandlers';\n/* @conditional-compile-remove(DNS) */\nimport { DeepNoiseSuppressionEffectDependency } from './createCommonHandlers';\n\n/**\n * Object containing all the handlers required for calling components.\n *\n * Calling related components from this package are able to pick out relevant handlers from this object.\n * See {@link useHandlers} and {@link usePropsFor}.\n *\n * @public\n */\nexport interface CallingHandlers extends CommonCallingHandlers {\n onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => Call | undefined;\n}\n\n/**\n * Configuration options to include video effect background dependency.\n * @public\n */\nexport type CallingHandlersOptions = {\n onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n /* @conditional-compile-remove(DNS) */\n /**\n * Dependency resolver for deep noise suppression effect.\n * @beta\n */\n onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;\n};\n\n/**\n * Type of {@link createDefaultCallingHandlers}.\n *\n * @public\n */\nexport type CreateDefaultCallingHandlers = (\n callClient: StatefulCallClient,\n callAgent: CallAgent | undefined,\n deviceManager: StatefulDeviceManager | undefined,\n call: Call | undefined,\n\n options?: CallingHandlersOptions\n) => CallingHandlers;\n\n/**\n * Create the default implementation of {@link CallingHandlers} for teams call.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const createDefaultCallingHandlers: CreateDefaultCallingHandlers = memoizeOne((...args) => {\n const [callClient, callAgent, deviceManager, call, options] = args;\n /* @conditional-compile-remove(breakout-rooms) */\n const callState = call?.id ? callClient.getState().calls[call?.id] : undefined;\n /* @conditional-compile-remove(breakout-rooms) */\n const breakoutRoomOriginCallId = callState?.breakoutRooms?.breakoutRoomOriginCallId;\n /* @conditional-compile-remove(breakout-rooms) */\n const breakoutRoomOriginCall = callAgent?.calls.find((call) => call.id === breakoutRoomOriginCallId);\n const commonCallingHandlers = createDefaultCommonCallingHandlers(callClient, deviceManager, call, options);\n return {\n ...commonCallingHandlers,\n // FIXME: onStartCall API should use string, not the underlying SDK types.\n onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined => {\n return callAgent?.startCall(participants, options);\n if (!isACSCallParticipants(participants)) {\n throw new Error('TeamsUserIdentifier in Teams call is not supported!');\n }\n return callAgent?.startCall(participants, options);\n },\n onAddParticipant: async (\n userId: string | CommunicationIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n if (isPhoneNumberIdentifier(participant)) {\n call?.addParticipant(participant, options);\n } else if (isCommunicationUserIdentifier(participant) || isMicrosoftTeamsUserIdentifier(participant)) {\n call?.addParticipant(participant);\n }\n },\n onRemoveParticipant: async (userId: string | CommunicationIdentifier): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n await call?.removeParticipant(participant);\n },\n onAcceptCall: async (incomingCallId: string, useVideo?: boolean): Promise<void> => {\n const localVideoStream = useVideo ? await createLocalVideoStream(callClient) : undefined;\n const incomingCall = (callAgent as DeclarativeCallAgent)?.incomingCalls.find(\n (incomingCall: IncomingCallCommon) => incomingCall.id === incomingCallId\n );\n if (incomingCall) {\n await incomingCall.accept(\n localVideoStream ? { videoOptions: { localVideoStreams: [localVideoStream] } } : undefined\n );\n }\n },\n onRejectCall: async (incomingCallId: string): Promise<void> => {\n const incomingCall = (callAgent as DeclarativeCallAgent)?.incomingCalls.find(\n (incomingCall: IncomingCallCommon) => incomingCall.id === incomingCallId\n );\n if (incomingCall) {\n await incomingCall.reject();\n }\n },\n /* @conditional-compile-remove(breakout-rooms) */\n onHangUp: breakoutRoomOriginCall\n ? async () => breakoutRoomOriginCall.hangUp().then(() => commonCallingHandlers.onHangUp())\n : commonCallingHandlers.onHangUp\n };\n});\n\n/**\n * Handlers only for calling components\n * @internal\n */\nexport interface _ComponentCallingHandlers {\n /** VideoGallery callback prop to start local spotlight */\n onStartLocalSpotlight: () => Promise<void>;\n /** VideoGallery callback prop to stop local spotlight */\n onStopLocalSpotlight: () => Promise<void>;\n /** VideoGallery callback prop to start remote spotlight */\n onStartRemoteSpotlight: (userIds: string[]) => Promise<void>;\n /** VideoGallery callback prop to stop remote spotlight */\n onStopRemoteSpotlight: (userIds: string[]) => Promise<void>;\n}\n"]}
@@ -15,7 +15,6 @@ import { isPhoneNumberIdentifier } from '@azure/communication-common';
15
15
  import { _toCommunicationIdentifier } from "../../../acs-ui-common/src";
16
16
  import memoizeOne from 'memoize-one';
17
17
  import { isTeamsCallParticipants } from '../utils/callUtils';
18
- /* @conditional-compile-remove(one-to-n-calling) */
19
18
  import { createLocalVideoStream } from '../utils/callUtils';
20
19
  import { createDefaultCommonCallingHandlers } from './createCommonHandlers';
21
20
  /**
@@ -69,17 +68,13 @@ export const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAge
69
68
  }
70
69
  /* @conditional-compile-remove(teams-identity-support) */
71
70
  yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
72
- }),
73
- /* @conditional-compile-remove(one-to-n-calling) */
74
- onAcceptCall: (incomingCallId, useVideo) => __awaiter(void 0, void 0, void 0, function* () {
71
+ }), onAcceptCall: (incomingCallId, useVideo) => __awaiter(void 0, void 0, void 0, function* () {
75
72
  const localVideoStream = useVideo ? yield createLocalVideoStream(callClient) : undefined;
76
73
  const incomingCall = callAgent === null || callAgent === void 0 ? void 0 : callAgent.incomingCalls.find((incomingCall) => incomingCall.id === incomingCallId);
77
74
  if (incomingCall) {
78
75
  yield incomingCall.accept(localVideoStream ? { videoOptions: { localVideoStreams: [localVideoStream] } } : undefined);
79
76
  }
80
- }),
81
- /* @conditional-compile-remove(one-to-n-calling) */
82
- onRejectCall: (incomingCallId) => __awaiter(void 0, void 0, void 0, function* () {
77
+ }), onRejectCall: (incomingCallId) => __awaiter(void 0, void 0, void 0, function* () {
83
78
  const incomingCall = callAgent === null || callAgent === void 0 ? void 0 : callAgent.incomingCalls.find((incomingCall) => incomingCall.id === incomingCallId);
84
79
  if (incomingCall) {
85
80
  yield incomingCall.reject();
@@ -1 +1 @@
1
- {"version":3,"file":"createTeamsCallHandlers.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/handlers/createTeamsCallHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AASlC,OAAO,EAEL,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,6BAA6B,CAAC;AACrC,8DAA8D;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAU,0BAA0B,EAAE,mCAAgC;AAI7E,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,mDAAmD;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EACL,kCAAkC,EAGnC,MAAM,wBAAwB,CAAC;AAkBhC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,UAAU,CACzD,CACE,UAA8B,EAC9B,SAA0B,EAC1B,aAAqC,EACrC,IAAgB,EAChB,OAIC,EACqB,EAAE;IACxB,uCACK,kCAAkC,CAAC,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,KAC/E,WAAW,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,EAAE;YACrC,8DAA8D;YAC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AS,CAAgC,aAAa,CAAC,IAAI,CAC/E,CAAC,YAAgC,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,KAAK,cAAc,CACzE,CAAC;YACF,IAAI,YAAY,EAAE,CAAC;gBACjB,MAAM,YAAY,CAAC,MAAM,EAAE,CAAC;YAC9B,CAAC;QACH,CAAC,CAAA,IACD;AACJ,CAAC,CACF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CACpD,UAA8B,EAC9B,SAA+F,EAC/F,aAAgD,EAChD,IAAqF,EACrF,UAAiD,EACZ,EAAE;IACvC,OAAO,iCAAiC,CAAC,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;AACvF,CAAC,CAAC;AAEF,yDAAyD;AACzD,MAAM,gCAAgC,GAAG,CACvC,SAAyB,EACzB,YAAuC,EACvC,OAA+B,EACpB,EAAE;IACb,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;SAAM,CAAC;QACN,OAAO,SAAS,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAQ,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { StartCallOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { IncomingCallCommon } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support-beta) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall, TeamsCallAgent, TeamsCallAgentOptions } from '@azure/communication-calling';\nimport {\n CommunicationIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsAppIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(teams-identity-support-beta) */\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { Common, _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { StatefulCallClient, StatefulDeviceManager } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { DeclarativeTeamsCallAgent } from '@internal/calling-stateful-client';\nimport memoizeOne from 'memoize-one';\nimport { ReactElement } from 'react';\nimport { isTeamsCallParticipants } from '../utils/callUtils';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { createLocalVideoStream } from '../utils/callUtils';\nimport {\n createDefaultCommonCallingHandlers,\n CommonCallingHandlers,\n VideoBackgroundEffectsDependency\n} from './createCommonHandlers';\n/* @conditional-compile-remove(DNS) */\nimport { DeepNoiseSuppressionEffectDependency } from './createCommonHandlers';\n/**\n * Object containing all the teams call handlers required for calling components.\n *\n * Calling related components from this package are able to pick out relevant handlers from this object.\n * See {@link useHandlers} and {@link usePropsFor}.\n *\n * @public\n */\nexport interface TeamsCallingHandlers extends CommonCallingHandlers {\n onStartCall: (\n participants: CommunicationIdentifier[],\n options?: StartCallOptions\n ) => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;\n}\n\n/**\n * Create the default implementation of {@link TeamsCallingHandlers} for teams call.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const createDefaultTeamsCallingHandlers = memoizeOne(\n (\n callClient: StatefulCallClient,\n callAgent?: TeamsCallAgent,\n deviceManager?: StatefulDeviceManager,\n call?: TeamsCall,\n options?: {\n onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n /* @conditional-compile-remove(DNS) */\n onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;\n }\n ): TeamsCallingHandlers => {\n return {\n ...createDefaultCommonCallingHandlers(callClient, deviceManager, call, options),\n onStartCall: (participants, options) => {\n /* @conditional-compile-remove(teams-identity-support-beta) */\n const threadId = options?.threadId;\n if (!isTeamsCallParticipants(participants)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n if (callAgent) {\n /* @conditional-compile-remove(teams-identity-support-beta) */\n return callAgent.startCall(participants, threadId ? { threadId, ...options } : undefined);\n /* @conditional-compile-remove(teams-identity-support) */\n // Remove when teams identity in stable support multiple participants\n return teamsSingleParticipantTrampoline(callAgent as TeamsCallAgent, participants, options);\n }\n\n return undefined;\n },\n /* @conditional-compile-remove(teams-identity-support-beta) */\n onAddParticipant: async (\n userId: string | CommunicationIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n /* @conditional-compile-remove(teams-identity-support) */\n const threadId = options?.threadId;\n if (isCommunicationUserIdentifier(participant)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n\n if (isMicrosoftTeamsAppIdentifier(participant)) {\n throw new Error('Adding Microsoft Teams app identifier is not supported!');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n if (isPhoneNumberIdentifier(participant)) {\n call?.addParticipant(participant, threadId ? { threadId } : undefined);\n }\n /* @conditional-compile-remove(teams-identity-support) */\n call?.addParticipant(participant);\n },\n onRemoveParticipant: async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n if (isCommunicationUserIdentifier(participant)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n\n if (isMicrosoftTeamsAppIdentifier(participant)) {\n throw new Error('Removing Microsoft Teams app identifier is not supported!');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n await call?.removeParticipant(participant);\n },\n /* @conditional-compile-remove(one-to-n-calling) */\n onAcceptCall: async (incomingCallId: string, useVideo?: boolean): Promise<void> => {\n const localVideoStream = useVideo ? await createLocalVideoStream(callClient) : undefined;\n const incomingCall = (callAgent as DeclarativeTeamsCallAgent)?.incomingCalls.find(\n (incomingCall: IncomingCallCommon) => incomingCall.id === incomingCallId\n );\n if (incomingCall) {\n await incomingCall.accept(\n localVideoStream ? { videoOptions: { localVideoStreams: [localVideoStream] } } : undefined\n );\n }\n },\n /* @conditional-compile-remove(one-to-n-calling) */\n onRejectCall: async (incomingCallId: string): Promise<void> => {\n const incomingCall = (callAgent as DeclarativeTeamsCallAgent)?.incomingCalls.find(\n (incomingCall: IncomingCallCommon) => incomingCall.id === incomingCallId\n );\n if (incomingCall) {\n await incomingCall.reject();\n }\n }\n };\n }\n);\n\n/**\n * Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with\n * the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and\n * DeclarativeCall may be undefined. If undefined, their associated handlers will not be created and returned.\n *\n * @param callClient - StatefulCallClient returned from\n * {@link @azure/communication-react#createStatefulCallClient}.\n * @param callAgent - Instance of {@link @azure/communication-calling#TeamsCallClient}.\n * @param deviceManager - Instance of {@link @azure/communication-calling#DeviceManager}.\n * @param call - Instance of {@link @azure/communication-calling#TeamsCall}.\n * @param _ - React component that you want to generate handlers for.\n *\n * @public\n */\nexport const createTeamsCallingHandlersForComponent = <Props>(\n callClient: StatefulCallClient,\n callAgent: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent,\n deviceManager: StatefulDeviceManager | undefined,\n call: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall,\n _Component: (props: Props) => ReactElement | null\n): Common<TeamsCallingHandlers, Props> => {\n return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call);\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\nconst teamsSingleParticipantTrampoline = (\n callAgent: TeamsCallAgent,\n participants: CommunicationIdentifier[],\n options?: TeamsCallAgentOptions\n): TeamsCall => {\n if (participants.length !== 1) {\n throw new Error('Only one participant is supported in Teams call!');\n } else {\n return callAgent.startCall(participants[0] as any, options);\n }\n};\n"]}
1
+ {"version":3,"file":"createTeamsCallHandlers.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/handl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gCAAgC,GAAG,CACvC,SAAyB,EACzB,YAAuC,EACvC,OAA+B,EACpB,EAAE;IACb,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;SAAM,CAAC;QACN,OAAO,SAAS,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAQ,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { StartCallOptions } from '@azure/communication-calling';\nimport { IncomingCallCommon } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support-beta) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall, TeamsCallAgent, TeamsCallAgentOptions } from '@azure/communication-calling';\nimport {\n CommunicationIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsAppIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(teams-identity-support-beta) */\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { Common, _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { StatefulCallClient, StatefulDeviceManager } from '@internal/calling-stateful-client';\nimport { DeclarativeTeamsCallAgent } from '@internal/calling-stateful-client';\nimport memoizeOne from 'memoize-one';\nimport { ReactElement } from 'react';\nimport { isTeamsCallParticipants } from '../utils/callUtils';\nimport { createLocalVideoStream } from '../utils/callUtils';\nimport {\n createDefaultCommonCallingHandlers,\n CommonCallingHandlers,\n VideoBackgroundEffectsDependency\n} from './createCommonHandlers';\n/* @conditional-compile-remove(DNS) */\nimport { DeepNoiseSuppressionEffectDependency } from './createCommonHandlers';\n/**\n * Object containing all the teams call handlers required for calling components.\n *\n * Calling related components from this package are able to pick out relevant handlers from this object.\n * See {@link useHandlers} and {@link usePropsFor}.\n *\n * @public\n */\nexport interface TeamsCallingHandlers extends CommonCallingHandlers {\n onStartCall: (\n participants: CommunicationIdentifier[],\n options?: StartCallOptions\n ) => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;\n}\n\n/**\n * Create the default implementation of {@link TeamsCallingHandlers} for teams call.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const createDefaultTeamsCallingHandlers = memoizeOne(\n (\n callClient: StatefulCallClient,\n callAgent?: TeamsCallAgent,\n deviceManager?: StatefulDeviceManager,\n call?: TeamsCall,\n options?: {\n onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n /* @conditional-compile-remove(DNS) */\n onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;\n }\n ): TeamsCallingHandlers => {\n return {\n ...createDefaultCommonCallingHandlers(callClient, deviceManager, call, options),\n onStartCall: (participants, options) => {\n /* @conditional-compile-remove(teams-identity-support-beta) */\n const threadId = options?.threadId;\n if (!isTeamsCallParticipants(participants)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n if (callAgent) {\n /* @conditional-compile-remove(teams-identity-support-beta) */\n return callAgent.startCall(participants, threadId ? { threadId, ...options } : undefined);\n /* @conditional-compile-remove(teams-identity-support) */\n // Remove when teams identity in stable support multiple participants\n return teamsSingleParticipantTrampoline(callAgent as TeamsCallAgent, participants, options);\n }\n\n return undefined;\n },\n /* @conditional-compile-remove(teams-identity-support-beta) */\n onAddParticipant: async (\n userId: string | CommunicationIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n /* @conditional-compile-remove(teams-identity-support) */\n const threadId = options?.threadId;\n if (isCommunicationUserIdentifier(participant)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n\n if (isMicrosoftTeamsAppIdentifier(participant)) {\n throw new Error('Adding Microsoft Teams app identifier is not supported!');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n if (isPhoneNumberIdentifier(participant)) {\n call?.addParticipant(participant, threadId ? { threadId } : undefined);\n }\n /* @conditional-compile-remove(teams-identity-support) */\n call?.addParticipant(participant);\n },\n onRemoveParticipant: async (userId: string | CommunicationIdentifier): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n if (isCommunicationUserIdentifier(participant)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n\n if (isMicrosoftTeamsAppIdentifier(participant)) {\n throw new Error('Removing Microsoft Teams app identifier is not supported!');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n await call?.removeParticipant(participant);\n },\n onAcceptCall: async (incomingCallId: string, useVideo?: boolean): Promise<void> => {\n const localVideoStream = useVideo ? await createLocalVideoStream(callClient) : undefined;\n const incomingCall = (callAgent as DeclarativeTeamsCallAgent)?.incomingCalls.find(\n (incomingCall: IncomingCallCommon) => incomingCall.id === incomingCallId\n );\n if (incomingCall) {\n await incomingCall.accept(\n localVideoStream ? { videoOptions: { localVideoStreams: [localVideoStream] } } : undefined\n );\n }\n },\n onRejectCall: async (incomingCallId: string): Promise<void> => {\n const incomingCall = (callAgent as DeclarativeTeamsCallAgent)?.incomingCalls.find(\n (incomingCall: IncomingCallCommon) => incomingCall.id === incomingCallId\n );\n if (incomingCall) {\n await incomingCall.reject();\n }\n }\n };\n }\n);\n\n/**\n * Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with\n * the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and\n * DeclarativeCall may be undefined. If undefined, their associated handlers will not be created and returned.\n *\n * @param callClient - StatefulCallClient returned from\n * {@link @azure/communication-react#createStatefulCallClient}.\n * @param callAgent - Instance of {@link @azure/communication-calling#TeamsCallClient}.\n * @param deviceManager - Instance of {@link @azure/communication-calling#DeviceManager}.\n * @param call - Instance of {@link @azure/communication-calling#TeamsCall}.\n * @param _ - React component that you want to generate handlers for.\n *\n * @public\n */\nexport const createTeamsCallingHandlersForComponent = <Props>(\n callClient: StatefulCallClient,\n callAgent: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent,\n deviceManager: StatefulDeviceManager | undefined,\n call: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall,\n _Component: (props: Props) => ReactElement | null\n): Common<TeamsCallingHandlers, Props> => {\n return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call);\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\nconst teamsSingleParticipantTrampoline = (\n callAgent: TeamsCallAgent,\n participants: CommunicationIdentifier[],\n options?: TeamsCallAgentOptions\n): TeamsCall => {\n if (participants.length !== 1) {\n throw new Error('Only one participant is supported in Teams call!');\n } else {\n return callAgent.startCall(participants[0] as any, options);\n }\n};\n"]}
@@ -59,4 +59,7 @@ export type GetSelector<Component extends (props: any) => JSX.Element | undefine
59
59
  * @public
60
60
  */
61
61
  export declare const getSelector: <Component extends (props: any) => JSX.Element | undefined>(component: Component) => GetSelector<Component>;
62
+ /**
63
+ * Selector for new components that are conditionally compiled. Comment out when there is no CC'd components
64
+ */
62
65
  //# sourceMappingURL=usePropsFor.d.ts.map
@@ -1,16 +1,13 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  import { CameraButton, EndCallButton, ErrorBar, MicrophoneButton, DevicesButton, ParticipantList, ScreenShareButton, VideoGallery } from "../../../react-components/src";
4
- /* @conditional-compile-remove(one-to-n-calling) */
5
4
  import { IncomingCallStack } from "../../../react-components/src";
6
5
  import { NotificationStack } from "../../../react-components/src";
7
6
  import { Dialpad } from "../../../react-components/src";
8
- /* @conditional-compile-remove(PSTN-calls) */
9
7
  import { HoldButton } from "../../../react-components/src";
10
8
  import { RaiseHandButton } from "../../../react-components/src";
11
9
  import { raiseHandButtonSelector } from '../callControlSelectors';
12
10
  import { cameraButtonSelector, microphoneButtonSelector, devicesButtonSelector, screenShareButtonSelector } from '../callControlSelectors';
13
- /* @conditional-compile-remove(PSTN-calls) */
14
11
  import { holdButtonSelector } from '../callControlSelectors';
15
12
  import { videoGallerySelector } from '../videoGallerySelector';
16
13
  import { participantListSelector } from '../participantListSelector';
@@ -22,7 +19,6 @@ import { errorBarSelector } from '../errorBarSelector';
22
19
  import { reactionButtonSelector } from '../callControlSelectors';
23
20
  import { ReactionButton } from "../../../react-components/src";
24
21
  import { notificationStackSelector } from '../notificationStackSelector';
25
- /* @conditional-compile-remove(one-to-n-calling) */
26
22
  import { incomingCallStackSelector } from '../incomingCallStackSelector';
27
23
  /**
28
24
  * Primary hook to get all hooks necessary for a calling Component.
@@ -62,14 +58,6 @@ const emptySelector = () => ({});
62
58
  */
63
59
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
64
60
  export const getSelector = (component) => {
65
- /* @conditional-compile-remove(PSTN-calls) */
66
- if (component === HoldButton) {
67
- return findConditionalCompiledSelector(component);
68
- }
69
- /* @conditional-compile-remove(one-to-n-calling) */
70
- if (component === IncomingCallStack) {
71
- return findConditionalCompiledSelector(component);
72
- }
73
61
  return findSelector(component);
74
62
  };
75
63
  const findSelector = (component) => {
@@ -102,20 +90,18 @@ const findSelector = (component) => {
102
90
  return reactionButtonSelector;
103
91
  case NotificationStack:
104
92
  return notificationStackSelector;
105
- }
106
- return undefined;
107
- };
108
- /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
109
- const findConditionalCompiledSelector = (component) => {
110
- switch (component) {
111
- /* @conditional-compile-remove(PSTN-calls) */
112
93
  case HoldButton:
113
- /* @conditional-compile-remove(PSTN-calls) */
114
94
  return holdButtonSelector;
115
- /* @conditional-compile-remove(one-to-n-calling) */
116
95
  case IncomingCallStack:
117
- /* @conditional-compile-remove(one-to-n-calling) */
118
96
  return incomingCallStackSelector;
119
97
  }
98
+ return undefined;
120
99
  };
100
+ /**
101
+ * Selector for new components that are conditionally compiled. Comment out when there is no CC'd components
102
+ */
103
+ // const findConditionalCompiledSelector = (component: (props: any) => JSX.Element | undefined): any => {
104
+ // switch (component) {
105
+ // }
106
+ // };
121
107
  //# sourceMappingURL=usePropsFor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePropsFor.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/hooks/usePropsFor.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,YAAY,EACb,sCAAmC;AACpC,mDAAmD;AACnD,OAAO,EAAE,iBAAiB,EAAE,sCAAmC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,sCAAmC;AAC/D,OAAO,EAAE,OAAO,EAAE,sCAAmC;AACrD,6CAA6C;AAC7C,OAAO,EAAE,UAAU,EAAE,sCAAmC;AACxD,OAAO,EAAE,eAAe,EAAE,sCAAmC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAEL,oBAAoB,EAEpB,wBAAwB,EAExB,qBAAqB,EAErB,yBAAyB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,6CAA6C;AAC7C,OAAO,EAAE,kBAAkB,EAAsB,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAwB,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAA2B,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EAA8B,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AACvG,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,kBAAkB,EAAE,sCAAmC;AAChE,OAAO,EAAoB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,sCAAmC;AAG5D,OA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AAwB,CAAC;QAClC,KAAK,YAAY;YACf,OAAO,oBAAoB,CAAC;QAC9B,KAAK,iBAAiB;YACpB,OAAO,yBAAyB,CAAC;QACnC,KAAK,aAAa;YAChB,OAAO,qBAAqB,CAAC;QAC/B,KAAK,eAAe;YAClB,OAAO,uBAAuB,CAAC;QACjC,KAAK,kBAAkB;YACrB,OAAO,0BAA0B,CAAC;QACpC,KAAK,aAAa;YAChB,OAAO,aAAa,CAAC;QACvB,KAAK,QAAQ;YACX,OAAO,gBAAgB,CAAC;QAC1B,KAAK,eAAe;YAClB,OAAO,uBAAuB,CAAC;QACjC,KAAK,cAAc;YACjB,OAAO,sBAAsB,CAAC;QAChC,KAAK,iBAAiB;YACpB,OAAO,yBAAyB,CAAC;IACrC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,6CAA6C,CAAC,mDAAmD;AACjG,MAAM,+BAA+B,GAAG,CAAC,SAAkD,EAAO,EAAE;IAClG,QAAQ,SAAS,EAAE,CAAC;QAClB,6CAA6C;QAC7C,KAAK,UAAU;YACb,6CAA6C;YAC7C,OAAO,kBAAkB,CAAC;QAC5B,mDAAmD;QACnD,KAAK,iBAAiB;YACpB,mDAAmD;YACnD,OAAO,yBAAyB,CAAC;IACrC,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n CameraButton,\n EndCallButton,\n ErrorBar,\n MicrophoneButton,\n DevicesButton,\n ParticipantList,\n ScreenShareButton,\n VideoGallery\n} from '@internal/react-components';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { IncomingCallStack } from '@internal/react-components';\n\nimport { NotificationStack } from '@internal/react-components';\nimport { Dialpad } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { HoldButton } from '@internal/react-components';\nimport { RaiseHandButton } from '@internal/react-components';\nimport { raiseHandButtonSelector } from '../callControlSelectors';\nimport {\n CameraButtonSelector,\n cameraButtonSelector,\n MicrophoneButtonSelector,\n microphoneButtonSelector,\n DevicesButtonSelector,\n devicesButtonSelector,\n ScreenShareButtonSelector,\n screenShareButtonSelector\n} from '../callControlSelectors';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { holdButtonSelector, HoldButtonSelector } from '../callControlSelectors';\nimport { VideoGallerySelector, videoGallerySelector } from '../videoGallerySelector';\nimport { ParticipantListSelector, participantListSelector } from '../participantListSelector';\nimport { ParticipantsButtonSelector, participantsButtonSelector } from '../participantsButtonSelector';\nimport { useHandlers } from './useHandlers';\nimport { useSelector } from './useSelector';\nimport { Common } from '@internal/acs-ui-common';\nimport { AreEqual } from '@internal/acs-ui-common';\nimport { ParticipantsButton } from '@internal/react-components';\nimport { ErrorBarSelector, errorBarSelector } from '../errorBarSelector';\nimport { CommonCallingHandlers } from '../handlers/createCommonHandlers';\nimport { reactionButtonSelector } from '../callControlSelectors';\nimport { ReactionButton } from '@internal/react-components';\nimport { _ComponentCallingHandlers } from '../handlers/createHandlers';\n\nimport { notificationStackSelector, NotificationStackSelector } from '../notificationStackSelector';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { incomingCallStackSelector, IncomingCallStackSelector } from '../incomingCallStackSelector';\n\n/**\n * Primary hook to get all hooks necessary for a calling Component.\n *\n * Most straightforward usage of calling components looks like:\n *\n * @example\n * ```\n * import { ParticipantList, usePropsFor } from '@azure/communication-react';\n *\n * const App = (): JSX.Element => {\n * // ... code to setup Providers ...\n *\n * return <ParticipantList {...usePropsFor(ParticipantList)}/>\n * }\n * ```\n *\n * @public\n */\nexport const usePropsFor = <Component extends (props: any) => JSX.Element>(\n component: Component\n): GetSelector<Component> extends (props: any) => any\n ? ReturnType<GetSelector<Component>> &\n Common<CommonCallingHandlers & _ComponentCallingHandlers, Parameters<Component>[0]>\n : undefined => {\n const selector = getSelector(component);\n const props = useSelector(selector);\n const handlers = useHandlers<Parameters<Component>[0]>(component);\n if (props !== undefined) {\n return { ...props, ...handlers } as any;\n }\n return undefined as any;\n};\n\n/**\n * A type for trivial selectors that return no data.\n *\n * Used as a default return value if {@link usePropsFor} is called for a component that requires no data.\n *\n * @public\n */\nexport type EmptySelector = () => Record<string, never>;\n\nconst emptySelector: EmptySelector = (): Record<string, never> => ({});\n\n/**\n * Specific type of the selector applicable to a given Component.\n *\n * @public\n */\nexport type GetSelector<Component extends (props: any) => JSX.Element | undefined> =\n AreEqual<Component, typeof VideoGallery> extends true\n ? VideoGallerySelector\n : AreEqual<Component, typeof DevicesButton> extends true\n ? DevicesButtonSelector\n : AreEqual<Component, typeof MicrophoneButton> extends true\n ? MicrophoneButtonSelector\n : AreEqual<Component, typeof CameraButton> extends true\n ? CameraButtonSelector\n : AreEqual<Component, typeof ScreenShareButton> extends true\n ? ScreenShareButtonSelector\n : AreEqual<Component, typeof ParticipantList> extends true\n ? ParticipantListSelector\n : AreEqual<Component, typeof ParticipantsButton> extends true\n ? ParticipantsButtonSelector\n : AreEqual<Component, typeof EndCallButton> extends true\n ? EmptySelector\n : AreEqual<Component, typeof ErrorBar> extends true\n ? ErrorBarSelector\n : AreEqual<Component, typeof Dialpad> extends true\n ? EmptySelector\n : AreEqual<Component, typeof HoldButton> extends true\n ? /* @conditional-compile-remove(PSTN-calls) */ HoldButtonSelector\n : AreEqual<Component, typeof NotificationStack> extends true\n ? NotificationStackSelector\n : AreEqual<Component, typeof IncomingCallStack> extends true\n ? /* @conditional-compile-remove(one-to-n-calling) */ IncomingCallStackSelector\n : undefined;\n\n/**\n * Get the selector for a specified component.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const getSelector = <Component extends (props: any) => JSX.Element | undefined>(\n component: Component\n): GetSelector<Component> => {\n /* @conditional-compile-remove(PSTN-calls) */\n if (component === HoldButton) {\n return findConditionalCompiledSelector(component);\n }\n /* @conditional-compile-remove(one-to-n-calling) */\n if (component === IncomingCallStack) {\n return findConditionalCompiledSelector(component);\n }\n\n return findSelector(component);\n};\n\nconst findSelector = (component: (props: any) => JSX.Element | undefined): any => {\n // Dialpad only has handlers currently and doesn't require any props from the stateful layer so return the emptySelector\n if (component === Dialpad) {\n return emptySelector;\n }\n\n switch (component) {\n case VideoGallery:\n return videoGallerySelector;\n case MicrophoneButton:\n return microphoneButtonSelector;\n case CameraButton:\n return cameraButtonSelector;\n case ScreenShareButton:\n return screenShareButtonSelector;\n case DevicesButton:\n return devicesButtonSelector;\n case ParticipantList:\n return participantListSelector;\n case ParticipantsButton:\n return participantsButtonSelector;\n case EndCallButton:\n return emptySelector;\n case ErrorBar:\n return errorBarSelector;\n case RaiseHandButton:\n return raiseHandButtonSelector;\n case ReactionButton:\n return reactionButtonSelector;\n case NotificationStack:\n return notificationStackSelector;\n }\n return undefined;\n};\n\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nconst findConditionalCompiledSelector = (component: (props: any) => JSX.Element | undefined): any => {\n switch (component) {\n /* @conditional-compile-remove(PSTN-calls) */\n case HoldButton:\n /* @conditional-compile-remove(PSTN-calls) */\n return holdButtonSelector;\n /* @conditional-compile-remove(one-to-n-calling) */\n case IncomingCallStack:\n /* @conditional-compile-remove(one-to-n-calling) */\n return incomingCallStackSelector;\n }\n};\n"]}
1
+ {"version":3,"file":"usePropsFor.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/hooks/usePropsFor.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,YAAY,EACb,sCAAmC;AACpC,OAAO,EAAE,iBAAiB,EAAE,sCAAmC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,sCAAmC;AAC/D,OAAO,EAAE,OAAO,EAAE,sCAAmC;AAErD,OAAO,EAAE,UAAU,EAAE,sCAAmC;AACxD,OAAO,EAAE,e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,CAAC,CAAC,EAAE,CAAC,CAAC;AAoCvE;;;;;;;GAOG;AACH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,SAAoB,EACI,EAAE;IAC1B,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,SAAkD,EAAO,EAAE;IAC/E,wHAAwH;IACxH,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;QAC1B,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,YAAY;YACf,OAAO,oBAAoB,CAAC;QAC9B,KAAK,gBAAgB;YACnB,OAAO,wBAAwB,CAAC;QAClC,KAAK,YAAY;YACf,OAAO,oBAAoB,CAAC;QAC9B,KAAK,iBAAiB;YACpB,OAAO,yBAAyB,CAAC;QACnC,KAAK,aAAa;YAChB,OAAO,qBAAqB,CAAC;QAC/B,KAAK,eAAe;YAClB,OAAO,uBAAuB,CAAC;QACjC,KAAK,kBAAkB;YACrB,OAAO,0BAA0B,CAAC;QACpC,KAAK,aAAa;YAChB,OAAO,aAAa,CAAC;QACvB,KAAK,QAAQ;YACX,OAAO,gBAAgB,CAAC;QAC1B,KAAK,eAAe;YAClB,OAAO,uBAAuB,CAAC;QACjC,KAAK,cAAc;YACjB,OAAO,sBAAsB,CAAC;QAChC,KAAK,iBAAiB;YACpB,OAAO,yBAAyB,CAAC;QACnC,KAAK,UAAU;YACb,OAAO,kBAAkB,CAAC;QAC5B,KAAK,iBAAiB;YACpB,OAAO,yBAAyB,CAAC;IACrC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AACF;;GAEG;AACH,yGAAyG;AACzG,yBAAyB;AACzB,MAAM;AACN,KAAK","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n CameraButton,\n EndCallButton,\n ErrorBar,\n MicrophoneButton,\n DevicesButton,\n ParticipantList,\n ScreenShareButton,\n VideoGallery\n} from '@internal/react-components';\nimport { IncomingCallStack } from '@internal/react-components';\n\nimport { NotificationStack } from '@internal/react-components';\nimport { Dialpad } from '@internal/react-components';\n\nimport { HoldButton } from '@internal/react-components';\nimport { RaiseHandButton } from '@internal/react-components';\nimport { raiseHandButtonSelector } from '../callControlSelectors';\nimport {\n CameraButtonSelector,\n cameraButtonSelector,\n MicrophoneButtonSelector,\n microphoneButtonSelector,\n DevicesButtonSelector,\n devicesButtonSelector,\n ScreenShareButtonSelector,\n screenShareButtonSelector\n} from '../callControlSelectors';\nimport { holdButtonSelector, HoldButtonSelector } from '../callControlSelectors';\nimport { VideoGallerySelector, videoGallerySelector } from '../videoGallerySelector';\nimport { ParticipantListSelector, participantListSelector } from '../participantListSelector';\nimport { ParticipantsButtonSelector, participantsButtonSelector } from '../participantsButtonSelector';\nimport { useHandlers } from './useHandlers';\nimport { useSelector } from './useSelector';\nimport { Common } from '@internal/acs-ui-common';\nimport { AreEqual } from '@internal/acs-ui-common';\nimport { ParticipantsButton } from '@internal/react-components';\nimport { ErrorBarSelector, errorBarSelector } from '../errorBarSelector';\nimport { CommonCallingHandlers } from '../handlers/createCommonHandlers';\nimport { reactionButtonSelector } from '../callControlSelectors';\nimport { ReactionButton } from '@internal/react-components';\nimport { _ComponentCallingHandlers } from '../handlers/createHandlers';\nimport { notificationStackSelector, NotificationStackSelector } from '../notificationStackSelector';\nimport { incomingCallStackSelector, IncomingCallStackSelector } from '../incomingCallStackSelector';\n\n/**\n * Primary hook to get all hooks necessary for a calling Component.\n *\n * Most straightforward usage of calling components looks like:\n *\n * @example\n * ```\n * import { ParticipantList, usePropsFor } from '@azure/communication-react';\n *\n * const App = (): JSX.Element => {\n * // ... code to setup Providers ...\n *\n * return <ParticipantList {...usePropsFor(ParticipantList)}/>\n * }\n * ```\n *\n * @public\n */\nexport const usePropsFor = <Component extends (props: any) => JSX.Element>(\n component: Component\n): GetSelector<Component> extends (props: any) => any\n ? ReturnType<GetSelector<Component>> &\n Common<CommonCallingHandlers & _ComponentCallingHandlers, Parameters<Component>[0]>\n : undefined => {\n const selector = getSelector(component);\n const props = useSelector(selector);\n const handlers = useHandlers<Parameters<Component>[0]>(component);\n if (props !== undefined) {\n return { ...props, ...handlers } as any;\n }\n return undefined as any;\n};\n\n/**\n * A type for trivial selectors that return no data.\n *\n * Used as a default return value if {@link usePropsFor} is called for a component that requires no data.\n *\n * @public\n */\nexport type EmptySelector = () => Record<string, never>;\n\nconst emptySelector: EmptySelector = (): Record<string, never> => ({});\n\n/**\n * Specific type of the selector applicable to a given Component.\n *\n * @public\n */\nexport type GetSelector<Component extends (props: any) => JSX.Element | undefined> =\n AreEqual<Component, typeof VideoGallery> extends true\n ? VideoGallerySelector\n : AreEqual<Component, typeof DevicesButton> extends true\n ? DevicesButtonSelector\n : AreEqual<Component, typeof MicrophoneButton> extends true\n ? MicrophoneButtonSelector\n : AreEqual<Component, typeof CameraButton> extends true\n ? CameraButtonSelector\n : AreEqual<Component, typeof ScreenShareButton> extends true\n ? ScreenShareButtonSelector\n : AreEqual<Component, typeof ParticipantList> extends true\n ? ParticipantListSelector\n : AreEqual<Component, typeof ParticipantsButton> extends true\n ? ParticipantsButtonSelector\n : AreEqual<Component, typeof EndCallButton> extends true\n ? EmptySelector\n : AreEqual<Component, typeof ErrorBar> extends true\n ? ErrorBarSelector\n : AreEqual<Component, typeof Dialpad> extends true\n ? EmptySelector\n : AreEqual<Component, typeof HoldButton> extends true\n ? HoldButtonSelector\n : AreEqual<Component, typeof NotificationStack> extends true\n ? NotificationStackSelector\n : AreEqual<Component, typeof IncomingCallStack> extends true\n ? IncomingCallStackSelector\n : undefined;\n\n/**\n * Get the selector for a specified component.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const getSelector = <Component extends (props: any) => JSX.Element | undefined>(\n component: Component\n): GetSelector<Component> => {\n return findSelector(component);\n};\n\nconst findSelector = (component: (props: any) => JSX.Element | undefined): any => {\n // Dialpad only has handlers currently and doesn't require any props from the stateful layer so return the emptySelector\n if (component === Dialpad) {\n return emptySelector;\n }\n\n switch (component) {\n case VideoGallery:\n return videoGallerySelector;\n case MicrophoneButton:\n return microphoneButtonSelector;\n case CameraButton:\n return cameraButtonSelector;\n case ScreenShareButton:\n return screenShareButtonSelector;\n case DevicesButton:\n return devicesButtonSelector;\n case ParticipantList:\n return participantListSelector;\n case ParticipantsButton:\n return participantsButtonSelector;\n case EndCallButton:\n return emptySelector;\n case ErrorBar:\n return errorBarSelector;\n case RaiseHandButton:\n return raiseHandButtonSelector;\n case ReactionButton:\n return reactionButtonSelector;\n case NotificationStack:\n return notificationStackSelector;\n case HoldButton:\n return holdButtonSelector;\n case IncomingCallStack:\n return incomingCallStackSelector;\n }\n return undefined;\n};\n/**\n * Selector for new components that are conditionally compiled. Comment out when there is no CC'd components\n */\n// const findConditionalCompiledSelector = (component: (props: any) => JSX.Element | undefined): any => {\n// switch (component) {\n// }\n// };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"incomingCallStackSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/incomingCallStackSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAWtE;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA8B,cAAc,CAChF,CAAC,gBAAgB,EAAE,uBAAuB,EAAE,gBAAgB,CAAC,EAC7D,CACE,aAAa,EACb,oBAAoB,EACpB,aAAa,EAIb,EAAE;IACF,sDAAsD;IACtD,MAAM,sBAAsB,GAAG,aAAa,CAAC,GAAG,CAC9C,CACE,YAA4G,EAC5G,EAAE;QACF,uCACK,YAAY,KACf,UAAU,EAAE;gBACV,WAAW,EAAE,YAAY,CAAC,UAAU,CAAC,WAAW,IAAI,gBAAgB;aACrE,EACD,cAAc,EACZ,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,IAAI,uBAAuB,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;gBACnG,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAC,MAAM,MAAK,CAAC;gBACjC,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,IAAI,IACV;IACJ,CAAC,CACF,CAAC;IACF,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,GAAG,CAC5D,CACE,YAA4G,EAC5G,EAAE;QACF,uCACK,YAAY,KACf,UAAU,EAAE;gBACV,WAAW,EAAE,YAAY,CAAC,UAAU,CAAC,WAAW,IAAI,gBAAgB;aACrE,EACD,cAAc,EACZ,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,IAAI,uBAAuB,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;gBACnG,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAC,MAAM,MAAK,CAAC;gBACjC,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,IAAI,IACV;IACJ,CAAC,CACF,CAAC;IACF,OAAO;QACL,mBAAmB,EAAE,sBAAsB;QAC3C,oBAAoB,EAAE,6BAA6B;KACpD,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallClientState, IncomingCallState } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { TeamsIncomingCallState } from '@internal/calling-stateful-client';\nimport { getDeviceManager, getIncomingCalls, getRemovedIncomingCalls } from './baseSelectors';\nimport { createSelector } from 'reselect';\nimport { IncomingCallStackCall } from '@internal/react-components';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\n\n/**\n * Selector to get the active and removed incoming calls.\n * @public\n */\nexport type IncomingCallStackSelector = (state: CallClientState) => {\n activeIncomingCalls: IncomingCallStackCall[];\n removedIncomingCalls: IncomingCallStackCall[];\n};\n\n/**\n * Select the active and removed incoming calls from the stateful client for the IncomingCallNotificationStackComponent.\n * @public\n */\nexport const incomingCallStackSelector: IncomingCallStackSelector = createSelector(\n [getIncomingCalls, getRemovedIncomingCalls, getDeviceManager],\n (\n incomingCalls,\n removedIncomingCalls,\n deviceManager\n ): {\n activeIncomingCalls: IncomingCallStackCall[];\n removedIncomingCalls: IncomingCallStackCall[];\n } => {\n // Convert incoming call state to active incoming call\n const componentIncomingCalls = incomingCalls.map(\n (\n incomingCall: IncomingCallState | /* @conditional-compile-remove(one-to-n-calling) */ TeamsIncomingCallState\n ) => {\n return {\n ...incomingCall,\n callerInfo: {\n displayName: incomingCall.callerInfo.displayName || 'Unknown Caller'\n },\n videoAvailable:\n (incomingCall.callerInfo.identifier && isPhoneNumberIdentifier(incomingCall.callerInfo.identifier)) ||\n deviceManager?.cameras.length === 0\n ? false\n : true\n };\n }\n );\n const componentRemovedIncomingCalls = removedIncomingCalls.map(\n (\n incomingCall: IncomingCallState | /* @conditional-compile-remove(one-to-n-calling) */ TeamsIncomingCallState\n ) => {\n return {\n ...incomingCall,\n callerInfo: {\n displayName: incomingCall.callerInfo.displayName || 'Unknown Caller'\n },\n videoAvailable:\n (incomingCall.callerInfo.identifier && isPhoneNumberIdentifier(incomingCall.callerInfo.identifier)) ||\n deviceManager?.cameras.length === 0\n ? false\n : true\n };\n }\n );\n return {\n activeIncomingCalls: componentIncomingCalls,\n removedIncomingCalls: componentRemovedIncomingCalls\n };\n }\n);\n"]}
1
+ {"version":3,"file":"incomingCallStackSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/incomingCallStackSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAA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V;IACJ,CAAC,CACF,CAAC;IACF,OAAO;QACL,mBAAmB,EAAE,sBAAsB;QAC3C,oBAAoB,EAAE,6BAA6B;KACpD,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallClientState, IncomingCallState } from '@internal/calling-stateful-client';\nimport { TeamsIncomingCallState } from '@internal/calling-stateful-client';\nimport { getDeviceManager, getIncomingCalls, getRemovedIncomingCalls } from './baseSelectors';\nimport { createSelector } from 'reselect';\nimport { IncomingCallStackCall } from '@internal/react-components';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\n\n/**\n * Selector to get the active and removed incoming calls.\n * @public\n */\nexport type IncomingCallStackSelector = (state: CallClientState) => {\n activeIncomingCalls: IncomingCallStackCall[];\n removedIncomingCalls: IncomingCallStackCall[];\n};\n\n/**\n * Select the active and removed incoming calls from the stateful client for the IncomingCallNotificationStackComponent.\n * @public\n */\nexport const incomingCallStackSelector: IncomingCallStackSelector = createSelector(\n [getIncomingCalls, getRemovedIncomingCalls, getDeviceManager],\n (\n incomingCalls,\n removedIncomingCalls,\n deviceManager\n ): {\n activeIncomingCalls: IncomingCallStackCall[];\n removedIncomingCalls: IncomingCallStackCall[];\n } => {\n // Convert incoming call state to active incoming call\n const componentIncomingCalls = incomingCalls.map((incomingCall: IncomingCallState | TeamsIncomingCallState) => {\n return {\n ...incomingCall,\n callerInfo: {\n displayName: incomingCall.callerInfo.displayName || 'Unknown Caller'\n },\n videoAvailable:\n (incomingCall.callerInfo.identifier && isPhoneNumberIdentifier(incomingCall.callerInfo.identifier)) ||\n deviceManager?.cameras.length === 0\n ? false\n : true\n };\n });\n const componentRemovedIncomingCalls = removedIncomingCalls.map(\n (incomingCall: IncomingCallState | TeamsIncomingCallState) => {\n return {\n ...incomingCall,\n callerInfo: {\n displayName: incomingCall.callerInfo.displayName || 'Unknown Caller'\n },\n videoAvailable:\n (incomingCall.callerInfo.identifier && isPhoneNumberIdentifier(incomingCall.callerInfo.identifier)) ||\n deviceManager?.cameras.length === 0\n ? false\n : true\n };\n }\n );\n return {\n activeIncomingCalls: componentIncomingCalls,\n removedIncomingCalls: componentRemovedIncomingCalls\n };\n }\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,yDAAyD;AACzD,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AAQvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAIxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAQxE,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAcrH,yDAAyD;AACzD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,aAAa,EACb,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG3G,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC7G,sDAAsD;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,mCAAmC,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport type { CallingBaseSelectorProps } from './baseSelectors';\nexport * from './callControlSelectors';\nexport { createDefaultCallingHandlers } from './handlers/createHandlers';\n/* @conditional-compile-remove(teams-identity-support) */\nexport { createDefaultTeamsCallingHandlers } from './handlers/createTeamsCallHandlers';\nexport type { ParticipantListSelector } from './participantListSelector';\nexport type { ParticipantsButtonSelector } from './participantsButtonSelector';\nexport type { VideoGallerySelector } from './videoGallerySelector';\nexport type { ErrorBarSelector } from './errorBarSelector';\n\nexport type { NotificationStackSelector } from './notificationStackSelector';\n\nexport { notificationStackSelector } from './notificationStackSelector';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonSelector } from './callControlSelectors';\nexport type { IncomingCallStackSelector } from './incomingCallStackSelector';\nexport { incomingCallStackSelector } from './incomingCallStackSelector';\n\nexport type {\n _StartCaptionsButtonSelector,\n _CaptionSettingsSelector,\n _CaptionsBannerSelector\n} from './captionsSelector';\n\nexport { _captionsBannerSelector, _startCaptionsButtonSelector, _captionSettingsSelector } from './captionsSelector';\n\nexport type { CallingHandlers, CreateDefaultCallingHandlers } from './handlers/createHandlers';\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallingHandlers } from './handlers/createTeamsCallHandlers';\nexport type { CommonCallingHandlers } from './handlers/createCommonHandlers';\nexport type { CaptionsOptions } from './handlers/createCommonHandlers';\n\nexport type { VideoBackgroundEffectsDependency } from './handlers/createCommonHandlers';\n\n/* @conditional-compile-remove(DNS) */\nexport type { DeepNoiseSuppressionEffectDependency } from './handlers/createCommonHandlers';\n\nexport type { _ComponentCallingHandlers, CallingHandlersOptions } from './handlers/createHandlers';\n/* @conditional-compile-remove(teams-identity-support) */\nexport { useTeamsCall, useTeamsCallAgent } from './providers';\n\nexport {\n CallAgentProvider,\n CallClientProvider,\n CallProvider,\n useCall,\n useCallAgent,\n useCallClient,\n useDeviceManager\n} from './providers';\nexport type { CallAgentProviderProps, CallClientProviderProps, CallProviderProps } from './providers';\n\nexport { usePropsFor as useCallingPropsFor, getSelector as getCallingSelector } from './hooks/usePropsFor';\nexport type { GetSelector as GetCallingSelector, EmptySelector } from './hooks/usePropsFor';\n\nexport { useSelector as useCallingSelector } from './hooks/useSelector';\nexport { useHandlers as useCallingHandlers } from './hooks/useHandlers';\n\nexport { _isInCall, _isPreviewOn, _isInLobbyOrConnecting, _updateUserDisplayNames } from './utils/callUtils';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { _getEnvironmentInfo } from './utils/callUtils';\n\nexport { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId } from './utils/videoGalleryUtils';\nexport type { _VideoGalleryRemoteParticipantsMemoFn } from './utils/videoGalleryUtils';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,yDAAyD;AACzD,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AAQvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAQxE,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAcrH,yDAAyD;AACzD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,aAAa,EACb,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG3G,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC7G,sDAAsD;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,mCAAmC,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport type { CallingBaseSelectorProps } from './baseSelectors';\nexport * from './callControlSelectors';\nexport { createDefaultCallingHandlers } from './handlers/createHandlers';\n/* @conditional-compile-remove(teams-identity-support) */\nexport { createDefaultTeamsCallingHandlers } from './handlers/createTeamsCallHandlers';\nexport type { ParticipantListSelector } from './participantListSelector';\nexport type { ParticipantsButtonSelector } from './participantsButtonSelector';\nexport type { VideoGallerySelector } from './videoGallerySelector';\nexport type { ErrorBarSelector } from './errorBarSelector';\n\nexport type { NotificationStackSelector } from './notificationStackSelector';\n\nexport { notificationStackSelector } from './notificationStackSelector';\nexport type { HoldButtonSelector } from './callControlSelectors';\nexport type { IncomingCallStackSelector } from './incomingCallStackSelector';\nexport { incomingCallStackSelector } from './incomingCallStackSelector';\n\nexport type {\n _StartCaptionsButtonSelector,\n _CaptionSettingsSelector,\n _CaptionsBannerSelector\n} from './captionsSelector';\n\nexport { _captionsBannerSelector, _startCaptionsButtonSelector, _captionSettingsSelector } from './captionsSelector';\n\nexport type { CallingHandlers, CreateDefaultCallingHandlers } from './handlers/createHandlers';\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallingHandlers } from './handlers/createTeamsCallHandlers';\nexport type { CommonCallingHandlers } from './handlers/createCommonHandlers';\nexport type { CaptionsOptions } from './handlers/createCommonHandlers';\n\nexport type { VideoBackgroundEffectsDependency } from './handlers/createCommonHandlers';\n\n/* @conditional-compile-remove(DNS) */\nexport type { DeepNoiseSuppressionEffectDependency } from './handlers/createCommonHandlers';\n\nexport type { _ComponentCallingHandlers, CallingHandlersOptions } from './handlers/createHandlers';\n/* @conditional-compile-remove(teams-identity-support) */\nexport { useTeamsCall, useTeamsCallAgent } from './providers';\n\nexport {\n CallAgentProvider,\n CallClientProvider,\n CallProvider,\n useCall,\n useCallAgent,\n useCallClient,\n useDeviceManager\n} from './providers';\nexport type { CallAgentProviderProps, CallClientProviderProps, CallProviderProps } from './providers';\n\nexport { usePropsFor as useCallingPropsFor, getSelector as getCallingSelector } from './hooks/usePropsFor';\nexport type { GetSelector as GetCallingSelector, EmptySelector } from './hooks/usePropsFor';\n\nexport { useSelector as useCallingSelector } from './hooks/useSelector';\nexport { useHandlers as useCallingHandlers } from './hooks/useHandlers';\n\nexport { _isInCall, _isPreviewOn, _isInLobbyOrConnecting, _updateUserDisplayNames } from './utils/callUtils';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { _getEnvironmentInfo } from './utils/callUtils';\n\nexport { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId } from './utils/videoGalleryUtils';\nexport type { _VideoGalleryRemoteParticipantsMemoFn } from './utils/videoGalleryUtils';\n"]}
@@ -4,7 +4,7 @@ import { createSelector } from 'reselect';
4
4
  import { getIdentifier, getDisplayName, getIsScreenSharingOn, getIsMuted } from './baseSelectors';
5
5
  import { getRole } from './baseSelectors';
6
6
  import { isHideAttendeeNamesEnabled } from './baseSelectors';
7
- import { _isRingingPSTNParticipant, _updateUserDisplayNames } from './utils/callUtils';
7
+ import { _convertParticipantState, _updateUserDisplayNames } from './utils/callUtils';
8
8
  import { memoizedConvertAllremoteParticipants } from './utils/participantListSelectorUtils';
9
9
  import { memoizedConvertToVideoTileReaction, memoizedSpotlight } from './utils/participantListSelectorUtils';
10
10
  import { getLocalParticipantRaisedHand } from './baseSelectors';
@@ -37,7 +37,7 @@ const convertRemoteParticipantsToParticipantListParticipants = (remoteParticipan
37
37
  * We want to check the participant to see if they are a PSTN participant joining the call
38
38
  * and mapping their state to be 'Ringing'
39
39
  */
40
- const state = _isRingingPSTNParticipant(participant);
40
+ const state = _convertParticipantState(participant);
41
41
  const displayName = maskDisplayNameWithRole(participant.displayName, localUserRole, participant.role, isHideAttendeeNamesEnabled);
42
42
  const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
43
43
  const spotlight = memoizedSpotlight(spotlightedParticipants, toFlatCommunicationIdentifier(participant.identifier));
@@ -80,7 +80,7 @@ export const participantListSelector = createSelector([
80
80
  ], (userId, displayName, remoteParticipants, isScreenSharingOn, isMuted, raisedHand, role, partitipantCount, isHideAttendeeNamesEnabled, localParticipantReactionState, spotlightCallFeature) => {
81
81
  const localUserCanRemoveOthers = localUserCanRemoveOthersTrampoline(role);
82
82
  const participants = remoteParticipants
83
- ? convertRemoteParticipantsToParticipantListParticipants(updateUserDisplayNamesTrampoline(Object.values(remoteParticipants)), localUserCanRemoveOthers, isHideAttendeeNamesEnabled, role, spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.spotlightedParticipants)
83
+ ? convertRemoteParticipantsToParticipantListParticipants(_updateUserDisplayNames(Object.values(remoteParticipants)), localUserCanRemoveOthers, isHideAttendeeNamesEnabled, role, spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.spotlightedParticipants)
84
84
  : [];
85
85
  participants.push({
86
86
  userId: userId,
@@ -103,11 +103,6 @@ export const participantListSelector = createSelector([
103
103
  totalParticipantCount: totalParticipantCount
104
104
  };
105
105
  });
106
- const updateUserDisplayNamesTrampoline = (remoteParticipants) => {
107
- /* @conditional-compile-remove(PSTN-calls) */
108
- return _updateUserDisplayNames(remoteParticipants);
109
- return remoteParticipants;
110
- };
111
106
  const localUserCanRemoveOthersTrampoline = (role) => {
112
107
  return role === 'Presenter' || role === 'Unknown' || role === undefined;
113
108
  };
@@ -1 +1 @@
1
- {"version":3,"file":"participantListSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/participantListSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EACL,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,UAAU,EAEX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EAAE,kCAAkC,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAC7G,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAErG,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,uCAAuC,EAAE,MAAM,2CAA2C,CAAC;AAEpG,MAAM,sDAAsD,GAAG,CAC7D,kBAA4C,EAC5C,wBAAiC,EACjC,0BAAoC,EACpC,aAA+B,EAC/B,uBAAkD,EAChB,EAAE;IACpC,MAAM,kBAAkB,GAAG,CACzB,SAA6D,EAC3B,EAAE;QACpC,OAAO,CACL,kBAAkB;YAChB,uCAAuC;aACtC,MAA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,EAAE,CAAC;IACP,YAAY,CAAC,IAAI,CAAC;QAChB,MAAM,EAAE,MAAM;QACd,WAAW,EAAE,WAAW;QACxB,eAAe,EAAE,iBAAiB;QAClC,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,WAAW;QAClB,iDAAiD;QACjD,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE,kCAAkC,CAAC,6BAA6B,CAAC;QAC3E,SAAS,EAAE,iBAAiB,CAAC,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,uBAAuB,EAAE,MAAM,CAAC;KACpF,CAAC,CAAC;IACH,0DAA0D;IAC1D,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;IAC/C,OAAO;QACL,YAAY,EAAE,YAAY;QAC1B,QAAQ,EAAE,MAAM;QAChB,0DAA0D;QAC1D,qBAAqB,EAAE,qBAAqB;KAC7C,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,gCAAgC,GAAG,CAAC,kBAA4C,EAA4B,EAAE;IAClH,6CAA6C;IAC7C,OAAO,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;IACnD,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAC;AAEF,MAAM,kCAAkC,GAAG,CAAC,IAAa,EAAW,EAAE;IACpE,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,CAAC;AAC1E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { createSelector } from 'reselect';\nimport {\n getIdentifier,\n getDisplayName,\n getIsScreenSharingOn,\n getIsMuted,\n CallingBaseSelectorProps\n} from './baseSelectors';\nimport { getRole } from './baseSelectors';\nimport { isHideAttendeeNamesEnabled } from './baseSelectors';\nimport { CallParticipantListParticipant } from '@internal/react-components';\nimport { _isRingingPSTNParticipant, _updateUserDisplayNames } from './utils/callUtils';\nimport { memoizedConvertAllremoteParticipants } from './utils/participantListSelectorUtils';\nimport { memoizedConvertToVideoTileReaction, memoizedSpotlight } from './utils/participantListSelectorUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\nimport { getLocalParticipantReactionState } from './baseSelectors';\nimport { getSpotlightCallFeature } from './baseSelectors';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { getParticipantCount } from './baseSelectors';\nimport { isMicrosoftTeamsAppIdentifier, isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { ParticipantRole, SpotlightedParticipant } from '@azure/communication-calling';\nimport { maskDisplayNameWithRole } from './utils/callUtils';\nimport { getRemoteParticipantsExcludingConsumers } from './getRemoteParticipantsExcludingConsumers';\n\nconst convertRemoteParticipantsToParticipantListParticipants = (\n remoteParticipants: RemoteParticipantState[],\n localUserCanRemoveOthers: boolean,\n isHideAttendeeNamesEnabled?: boolean,\n localUserRole?: ParticipantRole,\n spotlightedParticipants?: SpotlightedParticipant[]\n): CallParticipantListParticipant[] => {\n const conversionCallback = (\n memoizeFn: (...args: any[]) => CallParticipantListParticipant\n ): CallParticipantListParticipant[] => {\n return (\n remoteParticipants\n // Filter out MicrosoftBot participants\n .filter((participant: RemoteParticipantState) => {\n return !isMicrosoftTeamsAppIdentifier(participant.identifier);\n return true;\n })\n /**\n * hiding participants who are inLobby, idle, or connecting in ACS clients till we can admit users through ACS clients.\n * phone users will be in the connecting state until they are connected to the call.\n */\n .filter((participant) => {\n return (\n !['InLobby', 'Idle', 'Connecting', 'Disconnected'].includes(participant.state) ||\n isPhoneNumberIdentifier(participant.identifier)\n );\n })\n .map((participant: RemoteParticipantState) => {\n const isScreenSharing = Object.values(participant.videoStreams).some(\n (videoStream) => videoStream.mediaStreamType === 'ScreenSharing' && videoStream.isAvailable\n );\n /**\n * We want to check the participant to see if they are a PSTN participant joining the call\n * and mapping their state to be 'Ringing'\n */\n const state = _isRingingPSTNParticipant(participant);\n const displayName = maskDisplayNameWithRole(\n participant.displayName,\n localUserRole,\n participant.role,\n isHideAttendeeNamesEnabled\n );\n const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);\n const spotlight = memoizedSpotlight(\n spotlightedParticipants,\n toFlatCommunicationIdentifier(participant.identifier)\n );\n return memoizeFn(\n toFlatCommunicationIdentifier(participant.identifier),\n displayName,\n state,\n participant.isMuted,\n isScreenSharing,\n participant.isSpeaking,\n participant.raisedHand,\n localUserCanRemoveOthers,\n remoteParticipantReaction,\n spotlight\n );\n })\n .sort((a, b) => {\n const nameA = a.displayName?.toLowerCase() || '';\n const nameB = b.displayName?.toLowerCase() || '';\n if (nameA < nameB) {\n return -1;\n } else if (nameA > nameB) {\n return 1;\n } else {\n return 0;\n }\n })\n );\n };\n return memoizedConvertAllremoteParticipants(conversionCallback);\n};\n\n/**\n * Selector type for {@link ParticipantList} component.\n *\n * @public\n */\nexport type ParticipantListSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n participants: CallParticipantListParticipant[];\n myUserId: string;\n /* @conditional-compile-remove(total-participant-count) */\n totalParticipantCount?: number;\n};\n\n/**\n * Selects data that drives {@link ParticipantList} component.\n *\n * @public\n */\nexport const participantListSelector: ParticipantListSelector = createSelector(\n [\n getIdentifier,\n getDisplayName,\n getRemoteParticipantsExcludingConsumers,\n getIsScreenSharingOn,\n getIsMuted,\n getLocalParticipantRaisedHand,\n getRole,\n getParticipantCount,\n isHideAttendeeNamesEnabled,\n getLocalParticipantReactionState,\n getSpotlightCallFeature\n ],\n (\n userId,\n displayName,\n remoteParticipants,\n isScreenSharingOn,\n isMuted,\n raisedHand,\n role,\n partitipantCount,\n isHideAttendeeNamesEnabled,\n localParticipantReactionState,\n spotlightCallFeature\n ): {\n participants: CallParticipantListParticipant[];\n myUserId: string;\n totalParticipantCount?: number;\n } => {\n const localUserCanRemoveOthers = localUserCanRemoveOthersTrampoline(role);\n const participants = remoteParticipants\n ? convertRemoteParticipantsToParticipantListParticipants(\n updateUserDisplayNamesTrampoline(Object.values(remoteParticipants)),\n localUserCanRemoveOthers,\n isHideAttendeeNamesEnabled,\n role,\n spotlightCallFeature?.spotlightedParticipants\n )\n : [];\n participants.push({\n userId: userId,\n displayName: displayName,\n isScreenSharing: isScreenSharingOn,\n isMuted: isMuted,\n raisedHand: raisedHand,\n state: 'Connected',\n // Local participant can never remove themselves.\n isRemovable: false,\n reaction: memoizedConvertToVideoTileReaction(localParticipantReactionState),\n spotlight: memoizedSpotlight(spotlightCallFeature?.spotlightedParticipants, userId)\n });\n /* @conditional-compile-remove(total-participant-count) */\n const totalParticipantCount = partitipantCount;\n return {\n participants: participants,\n myUserId: userId,\n /* @conditional-compile-remove(total-participant-count) */\n totalParticipantCount: totalParticipantCount\n };\n }\n);\n\nconst updateUserDisplayNamesTrampoline = (remoteParticipants: RemoteParticipantState[]): RemoteParticipantState[] => {\n /* @conditional-compile-remove(PSTN-calls) */\n return _updateUserDisplayNames(remoteParticipants);\n return remoteParticipants;\n};\n\nconst localUserCanRemoveOthersTrampoline = (role?: string): boolean => {\n return role === 'Presenter' || role === 'Unknown' || role === undefined;\n};\n"]}
1
+ {"version":3,"file":"participantListSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/participantListSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EACL,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,UAAU,EAEX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EAAE,kCAAkC,EAAE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E,qBAAqB;KAC7C,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,kCAAkC,GAAG,CAAC,IAAa,EAAW,EAAE;IACpE,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,CAAC;AAC1E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { createSelector } from 'reselect';\nimport {\n getIdentifier,\n getDisplayName,\n getIsScreenSharingOn,\n getIsMuted,\n CallingBaseSelectorProps\n} from './baseSelectors';\nimport { getRole } from './baseSelectors';\nimport { isHideAttendeeNamesEnabled } from './baseSelectors';\nimport { CallParticipantListParticipant } from '@internal/react-components';\nimport { _convertParticipantState, _updateUserDisplayNames } from './utils/callUtils';\nimport { memoizedConvertAllremoteParticipants } from './utils/participantListSelectorUtils';\nimport { memoizedConvertToVideoTileReaction, memoizedSpotlight } from './utils/participantListSelectorUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\nimport { getLocalParticipantReactionState } from './baseSelectors';\nimport { getSpotlightCallFeature } from './baseSelectors';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { getParticipantCount } from './baseSelectors';\nimport { isMicrosoftTeamsAppIdentifier, isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { ParticipantRole, SpotlightedParticipant } from '@azure/communication-calling';\nimport { maskDisplayNameWithRole } from './utils/callUtils';\nimport { getRemoteParticipantsExcludingConsumers } from './getRemoteParticipantsExcludingConsumers';\n\nconst convertRemoteParticipantsToParticipantListParticipants = (\n remoteParticipants: RemoteParticipantState[],\n localUserCanRemoveOthers: boolean,\n isHideAttendeeNamesEnabled?: boolean,\n localUserRole?: ParticipantRole,\n spotlightedParticipants?: SpotlightedParticipant[]\n): CallParticipantListParticipant[] => {\n const conversionCallback = (\n memoizeFn: (...args: any[]) => CallParticipantListParticipant\n ): CallParticipantListParticipant[] => {\n return (\n remoteParticipants\n // Filter out MicrosoftBot participants\n .filter((participant: RemoteParticipantState) => {\n return !isMicrosoftTeamsAppIdentifier(participant.identifier);\n return true;\n })\n /**\n * hiding participants who are inLobby, idle, or connecting in ACS clients till we can admit users through ACS clients.\n * phone users will be in the connecting state until they are connected to the call.\n */\n .filter((participant) => {\n return (\n !['InLobby', 'Idle', 'Connecting', 'Disconnected'].includes(participant.state) ||\n isPhoneNumberIdentifier(participant.identifier)\n );\n })\n .map((participant: RemoteParticipantState) => {\n const isScreenSharing = Object.values(participant.videoStreams).some(\n (videoStream) => videoStream.mediaStreamType === 'ScreenSharing' && videoStream.isAvailable\n );\n /**\n * We want to check the participant to see if they are a PSTN participant joining the call\n * and mapping their state to be 'Ringing'\n */\n const state = _convertParticipantState(participant);\n const displayName = maskDisplayNameWithRole(\n participant.displayName,\n localUserRole,\n participant.role,\n isHideAttendeeNamesEnabled\n );\n const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);\n const spotlight = memoizedSpotlight(\n spotlightedParticipants,\n toFlatCommunicationIdentifier(participant.identifier)\n );\n return memoizeFn(\n toFlatCommunicationIdentifier(participant.identifier),\n displayName,\n state,\n participant.isMuted,\n isScreenSharing,\n participant.isSpeaking,\n participant.raisedHand,\n localUserCanRemoveOthers,\n remoteParticipantReaction,\n spotlight\n );\n })\n .sort((a, b) => {\n const nameA = a.displayName?.toLowerCase() || '';\n const nameB = b.displayName?.toLowerCase() || '';\n if (nameA < nameB) {\n return -1;\n } else if (nameA > nameB) {\n return 1;\n } else {\n return 0;\n }\n })\n );\n };\n return memoizedConvertAllremoteParticipants(conversionCallback);\n};\n\n/**\n * Selector type for {@link ParticipantList} component.\n *\n * @public\n */\nexport type ParticipantListSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n participants: CallParticipantListParticipant[];\n myUserId: string;\n /* @conditional-compile-remove(total-participant-count) */\n totalParticipantCount?: number;\n};\n\n/**\n * Selects data that drives {@link ParticipantList} component.\n *\n * @public\n */\nexport const participantListSelector: ParticipantListSelector = createSelector(\n [\n getIdentifier,\n getDisplayName,\n getRemoteParticipantsExcludingConsumers,\n getIsScreenSharingOn,\n getIsMuted,\n getLocalParticipantRaisedHand,\n getRole,\n getParticipantCount,\n isHideAttendeeNamesEnabled,\n getLocalParticipantReactionState,\n getSpotlightCallFeature\n ],\n (\n userId,\n displayName,\n remoteParticipants,\n isScreenSharingOn,\n isMuted,\n raisedHand,\n role,\n partitipantCount,\n isHideAttendeeNamesEnabled,\n localParticipantReactionState,\n spotlightCallFeature\n ): {\n participants: CallParticipantListParticipant[];\n myUserId: string;\n totalParticipantCount?: number;\n } => {\n const localUserCanRemoveOthers = localUserCanRemoveOthersTrampoline(role);\n const participants = remoteParticipants\n ? convertRemoteParticipantsToParticipantListParticipants(\n _updateUserDisplayNames(Object.values(remoteParticipants)),\n localUserCanRemoveOthers,\n isHideAttendeeNamesEnabled,\n role,\n spotlightCallFeature?.spotlightedParticipants\n )\n : [];\n participants.push({\n userId: userId,\n displayName: displayName,\n isScreenSharing: isScreenSharingOn,\n isMuted: isMuted,\n raisedHand: raisedHand,\n state: 'Connected',\n // Local participant can never remove themselves.\n isRemovable: false,\n reaction: memoizedConvertToVideoTileReaction(localParticipantReactionState),\n spotlight: memoizedSpotlight(spotlightCallFeature?.spotlightedParticipants, userId)\n });\n /* @conditional-compile-remove(total-participant-count) */\n const totalParticipantCount = partitipantCount;\n return {\n participants: participants,\n myUserId: userId,\n /* @conditional-compile-remove(total-participant-count) */\n totalParticipantCount: totalParticipantCount\n };\n }\n);\n\nconst localUserCanRemoveOthersTrampoline = (role?: string): boolean => {\n return role === 'Presenter' || role === 'Unknown' || role === undefined;\n};\n"]}
@@ -2,7 +2,12 @@ import { DeviceManagerState, RemoteParticipantState, StatefulCallClient } from "
2
2
  import { CallState as CallStatus, LocalVideoStream, ParticipantRole } from '@azure/communication-calling';
3
3
  import { EnvironmentInfo } from '@azure/communication-calling';
4
4
  import { CommunicationIdentifier, CommunicationUserIdentifier, MicrosoftTeamsUserIdentifier, PhoneNumberIdentifier, UnknownIdentifier } from '@azure/communication-common';
5
- type ParticipantConnectionState = 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected';
5
+ /**
6
+ * Type for connmection state
7
+ *
8
+ * @internal
9
+ */
10
+ export type ParticipantConnectionState = 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected' | 'Reconnecting';
6
11
  /**
7
12
  * Check if the call state represents being in the call
8
13
  *
@@ -55,7 +60,7 @@ export declare const isACSCallParticipants: (participants: CommunicationIdentifi
55
60
  * @private
56
61
  * Checks whether the user is a 'Ringing' PSTN user.
57
62
  */
58
- export declare const _isRingingPSTNParticipant: (participant: RemoteParticipantState) => ParticipantConnectionState;
63
+ export declare const _convertParticipantState: (participant: RemoteParticipantState) => ParticipantConnectionState;
59
64
  /**
60
65
  * @private
61
66
  * Changes the display name of the participant based on the local and remote user's role.
@@ -66,5 +71,4 @@ export declare const maskDisplayNameWithRole: (displayName: string | undefined,
66
71
  * @private
67
72
  */
68
73
  export declare const createLocalVideoStream: (callClient: StatefulCallClient) => Promise<LocalVideoStream | undefined>;
69
- export {};
70
74
  //# sourceMappingURL=callUtils.d.ts.map
@@ -104,7 +104,14 @@ export const isACSCallParticipants = (participants) => {
104
104
  * @private
105
105
  * Checks whether the user is a 'Ringing' PSTN user.
106
106
  */
107
- export const _isRingingPSTNParticipant = (participant) => {
107
+ export const _convertParticipantState = (participant) => {
108
+ var _a;
109
+ /* @conditional-compile-remove(remote-ufd) */
110
+ if (participant.diagnostics &&
111
+ participant.diagnostics['ServerConnection'] &&
112
+ ((_a = participant.diagnostics['ServerConnection']) === null || _a === void 0 ? void 0 : _a.value) === false) {
113
+ return 'Reconnecting';
114
+ }
108
115
  return isPhoneNumberIdentifier(participant.identifier) && participant.state === 'Connecting'
109
116
  ? 'Ringing'
110
117
  : participant.state;
@@ -1 +1 @@
1
- {"version":3,"file":"callUtils.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/utils/callUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,EAA2B,gBAAgB,EAAmB,MAAM,8BAA8B,CAAC;AAC1G,sDAAsD;AACtD,OAAO,EAAE,QAAQ,EAAmB,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAGL,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,EAIxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,6BAA6B,EAAE,mCAAgC;AAYtF;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,UAAuB,EAAW,EAAE,CAC5D,CAAC,CAAC,UAAU;IACZ,CAAC,CAAC,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAEzG;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,UAAkC,EAAW,EAAE,CACpF,CAAC,CAAC,UAAU,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAE1F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,aAAiC,EAAW,EAAE;IACzE,iHAAiH;IACjH,gFAAgF;IAChF,OAAO,aAAa,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC;AACzG,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAO,UAA8B,EAAiB,EAAE;IACjG,MAAM,eAAe,GAAG,UAAU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AAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAO,UAA8B,EAAyC,EAAE;IACpH,MAAM,MAAM,GAAG,MAAM,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,GAAG,aAAa,CAAC,cAAc,CAAA,CAAC;IACzE,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DeviceManagerState, RemoteParticipantState, StatefulCallClient } from '@internal/calling-stateful-client';\nimport { CallState as CallStatus, LocalVideoStream, ParticipantRole } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { Features, EnvironmentInfo } from '@azure/communication-calling';\nimport {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isPhoneNumberIdentifier,\n MicrosoftTeamsUserIdentifier,\n PhoneNumberIdentifier,\n UnknownIdentifier\n} from '@azure/communication-common';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n\ntype ParticipantConnectionState =\n | 'Idle'\n | 'Connecting'\n | 'Ringing'\n | 'Connected'\n | 'Hold'\n | 'InLobby'\n | 'EarlyMedia'\n | 'Disconnected';\n\n/**\n * Check if the call state represents being in the call\n *\n * @internal\n */\nexport const _isInCall = (callStatus?: CallStatus): boolean =>\n !!callStatus &&\n !['None', 'Disconnected', 'Connecting', 'Ringing', 'EarlyMedia', 'Disconnecting'].includes(callStatus);\n\n/**\n * Check if the call state represents being in the lobby or waiting to be admitted.\n *\n * @internal\n */\nexport const _isInLobbyOrConnecting = (callStatus: CallStatus | undefined): boolean =>\n !!callStatus && ['Connecting', 'Ringing', 'InLobby', 'EarlyMedia'].includes(callStatus);\n\n/**\n * Check if the device manager local video is on when not part of a call\n * i.e. do unparented views exist.\n *\n * @internal\n */\nexport const _isPreviewOn = (deviceManager: DeviceManagerState): boolean => {\n // TODO: we should take in a LocalVideoStream that developer wants to use as their 'Preview' view. We should also\n // handle cases where 'Preview' view is in progress and not necessary completed.\n return deviceManager.unparentedViews.length > 0 && deviceManager.unparentedViews[0].view !== undefined;\n};\n\n/**\n * Dispose of all preview views\n * We assume all unparented views are local preview views.\n *\n * @private\n */\nexport const disposeAllLocalPreviewViews = async (callClient: StatefulCallClient): Promise<void> => {\n const unparentedViews = callClient.getState().deviceManager.unparentedViews;\n for (const view of unparentedViews) {\n await callClient.disposeView(undefined, undefined, view);\n }\n};\n\n/**\n * Update the users displayNames based on the type of user they are\n *\n * @internal\n */\nexport const _updateUserDisplayNames = (participants: RemoteParticipantState[]): RemoteParticipantState[] => {\n if (participants) {\n return memoizedUpdateDisplayName((memoizedFn) => {\n return Object.values(participants).map((p) => {\n const pid = toFlatCommunicationIdentifier(p.identifier);\n return memoizedFn(pid, p);\n });\n });\n } else {\n return [];\n }\n};\n\nconst memoizedUpdateDisplayName = memoizeFnAll((participantId: string, participant: RemoteParticipantState) => {\n if (isPhoneNumberIdentifier(participant.identifier)) {\n return {\n ...participant,\n displayName: participant.identifier.phoneNumber\n };\n } else {\n return participant;\n }\n});\n\n/* @conditional-compile-remove(unsupported-browser) */\n/**\n * Check whether the call is in a supported browser\n *\n * @internal\n */\nexport const _getEnvironmentInfo = async (callClient: StatefulCallClient): Promise<EnvironmentInfo> => {\n const environmentInfo = await callClient.feature(Features.DebugInfo).getEnvironmentInfo();\n return environmentInfo;\n};\n\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for Teams call\n */\nexport const isTeamsCallParticipants = (\n participants: CommunicationIdentifier[]\n): participants is (PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | UnknownIdentifier)[] => {\n return participants.every((p) => !isCommunicationUserIdentifier(p));\n};\n\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for ACS call\n */\nexport const isACSCallParticipants = (\n participants: CommunicationIdentifier[]\n): participants is (PhoneNumberIdentifier | CommunicationUserIdentifier | UnknownIdentifier)[] => {\n return participants.every((p) => !isMicrosoftTeamsUserIdentifier(p));\n};\n\n/**\n * @private\n * Checks whether the user is a 'Ringing' PSTN user.\n */\nexport const _isRingingPSTNParticipant = (participant: RemoteParticipantState): ParticipantConnectionState => {\n return isPhoneNumberIdentifier(participant.identifier) && participant.state === 'Connecting'\n ? 'Ringing'\n : participant.state;\n};\n\n/**\n * @private\n * Changes the display name of the participant based on the local and remote user's role.\n */\nexport const maskDisplayNameWithRole = (\n displayName: string | undefined,\n localUserRole?: ParticipantRole,\n participantRole?: ParticipantRole,\n isHideAttendeeNamesEnabled?: boolean\n): string | undefined => {\n let maskedDisplayName = displayName;\n if (isHideAttendeeNamesEnabled && participantRole && participantRole === 'Attendee') {\n if (localUserRole && localUserRole === 'Attendee') {\n maskedDisplayName = '{AttendeeRole}';\n }\n if (\n localUserRole &&\n (localUserRole === 'Presenter' || localUserRole === 'Co-organizer' || localUserRole === 'Organizer')\n ) {\n maskedDisplayName = `{AttendeeRole}(${displayName})`;\n }\n }\n return maskedDisplayName;\n};\n\n/**\n * Helper to create a local video stream from the selected camera.\n * @private\n */\nexport const createLocalVideoStream = async (callClient: StatefulCallClient): Promise<LocalVideoStream | undefined> => {\n const camera = await callClient?.getState().deviceManager.selectedCamera;\n if (camera) {\n return new LocalVideoStream(camera);\n }\n return undefined;\n};\n"]}
1
+ {"version":3,"file":"callUtils.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/utils/callUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,EAA2B,gBAAgB,EAAmB,MAAM,8BAA8B,CAAC;AAC1G,sDAAsD;AACtD,OAAO,EAAE,QAAQ,EAAmB,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAGL,6BAA6B,EAC7B,8BA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,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,GAAG,aAAa,CAAC,cAAc,CAAA,CAAC;IACzE,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DeviceManagerState, RemoteParticipantState, StatefulCallClient } from '@internal/calling-stateful-client';\nimport { CallState as CallStatus, LocalVideoStream, ParticipantRole } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { Features, EnvironmentInfo } from '@azure/communication-calling';\nimport {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isPhoneNumberIdentifier,\n MicrosoftTeamsUserIdentifier,\n PhoneNumberIdentifier,\n UnknownIdentifier\n} from '@azure/communication-common';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n\n/**\n * Type for connmection state\n *\n * @internal\n */\nexport type ParticipantConnectionState =\n | 'Idle'\n | 'Connecting'\n | 'Ringing'\n | 'Connected'\n | 'Hold'\n | 'InLobby'\n | 'EarlyMedia'\n | 'Disconnected'\n | 'Reconnecting';\n\n/**\n * Check if the call state represents being in the call\n *\n * @internal\n */\nexport const _isInCall = (callStatus?: CallStatus): boolean =>\n !!callStatus &&\n !['None', 'Disconnected', 'Connecting', 'Ringing', 'EarlyMedia', 'Disconnecting'].includes(callStatus);\n\n/**\n * Check if the call state represents being in the lobby or waiting to be admitted.\n *\n * @internal\n */\nexport const _isInLobbyOrConnecting = (callStatus: CallStatus | undefined): boolean =>\n !!callStatus && ['Connecting', 'Ringing', 'InLobby', 'EarlyMedia'].includes(callStatus);\n\n/**\n * Check if the device manager local video is on when not part of a call\n * i.e. do unparented views exist.\n *\n * @internal\n */\nexport const _isPreviewOn = (deviceManager: DeviceManagerState): boolean => {\n // TODO: we should take in a LocalVideoStream that developer wants to use as their 'Preview' view. We should also\n // handle cases where 'Preview' view is in progress and not necessary completed.\n return deviceManager.unparentedViews.length > 0 && deviceManager.unparentedViews[0].view !== undefined;\n};\n\n/**\n * Dispose of all preview views\n * We assume all unparented views are local preview views.\n *\n * @private\n */\nexport const disposeAllLocalPreviewViews = async (callClient: StatefulCallClient): Promise<void> => {\n const unparentedViews = callClient.getState().deviceManager.unparentedViews;\n for (const view of unparentedViews) {\n await callClient.disposeView(undefined, undefined, view);\n }\n};\n\n/**\n * Update the users displayNames based on the type of user they are\n *\n * @internal\n */\nexport const _updateUserDisplayNames = (participants: RemoteParticipantState[]): RemoteParticipantState[] => {\n if (participants) {\n return memoizedUpdateDisplayName((memoizedFn) => {\n return Object.values(participants).map((p) => {\n const pid = toFlatCommunicationIdentifier(p.identifier);\n return memoizedFn(pid, p);\n });\n });\n } else {\n return [];\n }\n};\n\nconst memoizedUpdateDisplayName = memoizeFnAll((participantId: string, participant: RemoteParticipantState) => {\n if (isPhoneNumberIdentifier(participant.identifier)) {\n return {\n ...participant,\n displayName: participant.identifier.phoneNumber\n };\n } else {\n return participant;\n }\n});\n\n/* @conditional-compile-remove(unsupported-browser) */\n/**\n * Check whether the call is in a supported browser\n *\n * @internal\n */\nexport const _getEnvironmentInfo = async (callClient: StatefulCallClient): Promise<EnvironmentInfo> => {\n const environmentInfo = await callClient.feature(Features.DebugInfo).getEnvironmentInfo();\n return environmentInfo;\n};\n\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for Teams call\n */\nexport const isTeamsCallParticipants = (\n participants: CommunicationIdentifier[]\n): participants is (PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | UnknownIdentifier)[] => {\n return participants.every((p) => !isCommunicationUserIdentifier(p));\n};\n\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for ACS call\n */\nexport const isACSCallParticipants = (\n participants: CommunicationIdentifier[]\n): participants is (PhoneNumberIdentifier | CommunicationUserIdentifier | UnknownIdentifier)[] => {\n return participants.every((p) => !isMicrosoftTeamsUserIdentifier(p));\n};\n\n/**\n * @private\n * Checks whether the user is a 'Ringing' PSTN user.\n */\nexport const _convertParticipantState = (participant: RemoteParticipantState): ParticipantConnectionState => {\n /* @conditional-compile-remove(remote-ufd) */\n if (\n participant.diagnostics &&\n participant.diagnostics['ServerConnection'] &&\n participant.diagnostics['ServerConnection']?.value === false\n ) {\n return 'Reconnecting';\n }\n return isPhoneNumberIdentifier(participant.identifier) && participant.state === 'Connecting'\n ? 'Ringing'\n : participant.state;\n};\n\n/**\n * @private\n * Changes the display name of the participant based on the local and remote user's role.\n */\nexport const maskDisplayNameWithRole = (\n displayName: string | undefined,\n localUserRole?: ParticipantRole,\n participantRole?: ParticipantRole,\n isHideAttendeeNamesEnabled?: boolean\n): string | undefined => {\n let maskedDisplayName = displayName;\n if (isHideAttendeeNamesEnabled && participantRole && participantRole === 'Attendee') {\n if (localUserRole && localUserRole === 'Attendee') {\n maskedDisplayName = '{AttendeeRole}';\n }\n if (\n localUserRole &&\n (localUserRole === 'Presenter' || localUserRole === 'Co-organizer' || localUserRole === 'Organizer')\n ) {\n maskedDisplayName = `{AttendeeRole}(${displayName})`;\n }\n }\n return maskedDisplayName;\n};\n\n/**\n * Helper to create a local video stream from the selected camera.\n * @private\n */\nexport const createLocalVideoStream = async (callClient: StatefulCallClient): Promise<LocalVideoStream | undefined> => {\n const camera = await callClient?.getState().deviceManager.selectedCamera;\n if (camera) {\n return new LocalVideoStream(camera);\n }\n return undefined;\n};\n"]}
@@ -1,7 +1,8 @@
1
- import { DominantSpeakersInfo, RemoteParticipantState as RemoteParticipantConnectionState } from '@azure/communication-calling';
1
+ import { DominantSpeakersInfo } from '@azure/communication-calling';
2
2
  import { ParticipantRole } from '@azure/communication-calling';
3
3
  import { RemoteParticipantState, RemoteVideoStreamState } from "../../../calling-stateful-client/src";
4
4
  import { VideoGalleryRemoteParticipant } from "../../../react-components/src";
5
+ import { ParticipantConnectionState } from './callUtils';
5
6
  import { RaisedHandState } from "../../../calling-stateful-client/src";
6
7
  import { Reaction } from "../../../react-components/src";
7
8
  import { Spotlight } from "../../../react-components/src";
@@ -14,7 +15,7 @@ export declare const _videoGalleryRemoteParticipantsMemo: _VideoGalleryRemotePar
14
15
  /** @private */
15
16
  export declare const convertRemoteParticipantToVideoGalleryRemoteParticipant: (userId: string, isMuted: boolean, isSpeaking: boolean, videoStreams: {
16
17
  [key: number]: RemoteVideoStreamState;
17
- }, state: RemoteParticipantConnectionState, displayName?: string, raisedHand?: RaisedHandState, contentSharingStream?: HTMLElement, reaction?: Reaction, spotlight?: Spotlight) => VideoGalleryRemoteParticipant;
18
+ }, state: ParticipantConnectionState, displayName?: string, raisedHand?: RaisedHandState, contentSharingStream?: HTMLElement, reaction?: Reaction, spotlight?: Spotlight) => VideoGalleryRemoteParticipant;
18
19
  /** @private */
19
20
  export declare const memoizeLocalParticipant: (this: any, identifier: any, displayName: any, isMuted: any, isScreenSharingOn: any, localVideoStream: any, localScreenSharingStream: any, role: any, raisedHand: any, reaction: any, localSpotlight: any, capabilities: any) => {
20
21
  userId: any;
@@ -2,7 +2,7 @@
2
2
  // Licensed under the MIT License.
3
3
  import { memoizeFnAll, toFlatCommunicationIdentifier } from "../../../acs-ui-common/src";
4
4
  import memoizeOne from 'memoize-one';
5
- import { _isRingingPSTNParticipant } from './callUtils';
5
+ import { _convertParticipantState } from './callUtils';
6
6
  import { maskDisplayNameWithRole } from './callUtils';
7
7
  import { checkIsSpeaking } from './SelectorUtils';
8
8
  import { isPhoneNumberIdentifier } from '@azure/communication-common';
@@ -28,7 +28,7 @@ export const _videoGalleryRemoteParticipantsMemo = (remoteParticipants, isHideAt
28
28
  isPhoneNumberIdentifier(participant.identifier));
29
29
  })
30
30
  .map((participant) => {
31
- const state = _isRingingPSTNParticipant(participant);
31
+ const state = _convertParticipantState(participant);
32
32
  const displayName = maskDisplayNameWithRole(participant.displayName, localUserRole, participant.role, isHideAttendeeNamesEnabled);
33
33
  const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
34
34
  const spotlight = participant.spotlight;
@@ -72,8 +72,6 @@ export const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId,
72
72
  videoStream,
73
73
  screenShareStream,
74
74
  isScreenSharingOn: screenShareStream !== undefined && screenShareStream.isAvailable,
75
- /* @conditional-compile-remove(one-to-n-calling) */
76
- /* @conditional-compile-remove(PSTN-calls) */
77
75
  state,
78
76
  raisedHand,
79
77
  reaction,