@azure/communication-react 1.26.0-alpha-202504100018 → 1.26.0-alpha-202504162032

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 (47) hide show
  1. package/dist/communication-react.d.ts +13 -13
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DzVuW5SN.js → ChatMessageComponentAsRichTextEditBox-ClBYNQcI.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DzVuW5SN.js.map → ChatMessageComponentAsRichTextEditBox-ClBYNQcI.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CWem6AxN.js → RichTextSendBoxWrapper-zKj5z_6J.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CWem6AxN.js.map → RichTextSendBoxWrapper-zKj5z_6J.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-B61VVYm8.js → index-Y6qfhE4K.js} +118 -31
  7. package/dist/dist-cjs/communication-react/index-Y6qfhE4K.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-stateful-client/src/CallClientState.d.ts +2 -2
  12. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  13. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +3 -0
  14. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  15. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +2 -0
  16. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +15 -6
  17. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  18. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +1 -1
  19. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  20. package/dist/dist-esm/react-components/src/components/RealTimeText.d.ts +3 -3
  21. package/dist/dist-esm/react-components/src/components/RealTimeText.js +1 -1
  22. package/dist/dist-esm/react-components/src/components/RealTimeText.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.d.ts +3 -3
  24. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js +1 -1
  25. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.d.ts +3 -3
  27. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js +1 -1
  28. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js.map +1 -1
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +14 -3
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +12 -2
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -1
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +1 -1
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +2 -2
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +1 -0
  39. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +6 -8
  40. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  41. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +10 -5
  42. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  43. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +4 -0
  44. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +50 -0
  45. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  46. package/package.json +2 -2
  47. package/dist/dist-cjs/communication-react/index-B61VVYm8.js.map +0 -1
@@ -187,7 +187,7 @@ function getDefaultExportFromCjs (x) {
187
187
  // Copyright (c) Microsoft Corporation.
188
188
  // Licensed under the MIT License.
189
189
  // GENERATED FILE. DO NOT EDIT MANUALLY.
190
- var telemetryVersion = '1.26.0-alpha-202504100018';
190
+ var telemetryVersion = '1.26.0-alpha-202504162032';
191
191
 
192
192
 
193
193
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -5686,6 +5686,9 @@ class CallSubscriber {
5686
5686
  this._safeSubscribeInitTeamsMeetingConference = () => {
5687
5687
  this._safeSubscribe(this.initTeamsMeetingConference);
5688
5688
  };
5689
+ this._safeSubscribeInitRealTimeText = () => {
5690
+ this._safeSubscribe(this.initRealTimeText);
5691
+ };
5689
5692
  /* @conditional-compile-remove(local-recording-notification) */
5690
5693
  this._safeSubscribeInitLocalRecordingNotificationSubscriber = () => {
5691
5694
  this._safeSubscribe(this.initLocalRecordingNotificationSubscriber);
@@ -5706,6 +5709,7 @@ class CallSubscriber {
5706
5709
  /* @conditional-compile-remove(total-participant-count) */
5707
5710
  this._call.on('totalParticipantCountChanged', this.totalParticipantCountChangedHandler);
5708
5711
  this._call.on('mutedByOthers', this.mutedByOthersHandler);
5712
+ this._safeSubscribeInitRealTimeText();
5709
5713
  for (const localVideoStream of this._call.localVideoStreams) {
5710
5714
  this._internalContext.setLocalRenderInfo(this._callIdRef.callId, localVideoStream.mediaStreamType, localVideoStream, 'NotRendered', undefined);
5711
5715
  }
@@ -5717,7 +5721,7 @@ class CallSubscriber {
5717
5721
  }
5718
5722
  };
5719
5723
  this.unsubscribe = () => {
5720
- var _a, _b, _c, _d, _e;
5724
+ var _a, _b, _c, _d;
5721
5725
  this._call.off('stateChanged', this.stateChanged);
5722
5726
  this._call.off('stateChanged', this._safeSubscribeInitCaptionSubscriber);
5723
5727
  this._call.off('stateChanged', this._safeSubscribeInitTeamsMeetingConference);
@@ -5752,10 +5756,12 @@ class CallSubscriber {
5752
5756
  this._pptLiveSubscriber.unsubscribe();
5753
5757
  (_b = this._CaptionsFeatureSubscriber) === null || _b === undefined ? undefined : _b.unsubscribe();
5754
5758
  /* @conditional-compile-remove(rtt) */
5755
- (_c = this._realTimeTextSubscriber) === null || _c === undefined ? undefined : _c.unsubscribe();
5756
- (_d = this._raiseHandSubscriber) === null || _d === undefined ? undefined : _d.unsubscribe();
5759
+ if (this._realTimeTextSubscriber) {
5760
+ this._realTimeTextSubscriber.unsubscribe();
5761
+ }
5762
+ (_c = this._raiseHandSubscriber) === null || _c === undefined ? undefined : _c.unsubscribe();
5757
5763
  this._capabilitiesSubscriber.unsubscribe();
5758
- (_e = this._reactionSubscriber) === null || _e === undefined ? undefined : _e.unsubscribe();
5764
+ (_d = this._reactionSubscriber) === null || _d === undefined ? undefined : _d.unsubscribe();
5759
5765
  this._spotlightSubscriber.unsubscribe();
5760
5766
  this._breakoutRoomsSubscriber.unsubscribe();
5761
5767
  /* @conditional-compile-remove(together-mode) */
@@ -5783,6 +5789,11 @@ class CallSubscriber {
5783
5789
  this._call.off('stateChanged', this._safeSubscribeInitTeamsMeetingConference);
5784
5790
  }
5785
5791
  };
5792
+ this.initRealTimeText = () => {
5793
+ if (this._context.getState().userId.kind !== 'microsoftTeamsUser') {
5794
+ this._realTimeTextSubscriber = new RealTimeTextSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.RealTimeText));
5795
+ }
5796
+ };
5786
5797
  /* @conditional-compile-remove(local-recording-notification) */
5787
5798
  this.initLocalRecordingNotificationSubscriber = () => {
5788
5799
  // Subscribe to LocalRecordingFeature as it is only available in interop scenarios
@@ -5884,8 +5895,6 @@ class CallSubscriber {
5884
5895
  /* @conditional-compile-remove(together-mode) */
5885
5896
  this._togetherModeSubscriber = new TogetherModeSubscriber(this._callIdRef, this._context, this._internalContext, this._call.feature(communicationCalling.Features.TogetherMode));
5886
5897
  this._mediaAccessSubscriber = new MediaAccessSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.MediaAccess));
5887
- /* @conditional-compile-remove(rtt) */
5888
- this._realTimeTextSubscriber = new RealTimeTextSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.RealTimeText));
5889
5898
  this.subscribe();
5890
5899
  }
5891
5900
  // This is a helper function to safely call subscriber functions. This is needed in order to prevent events
@@ -6363,6 +6372,9 @@ class ProxyCallCommon {
6363
6372
  const proxyFeature = new ProxySpotlightCallFeature(this._context);
6364
6373
  return new Proxy(spotlightFeature, proxyFeature);
6365
6374
  }
6375
+ if (args[0] === communicationCalling.Features.RealTimeText && this._context.getState().userId.kind === 'microsoftTeamsUser') {
6376
+ return;
6377
+ }
6366
6378
  return target.feature(...args);
6367
6379
  }, 'Call.feature');
6368
6380
  }
@@ -16432,7 +16444,7 @@ class _ErrorBoundary extends React.Component {
16432
16444
  // Copyright (c) Microsoft Corporation.
16433
16445
  // Licensed under the MIT License.
16434
16446
  /* @conditional-compile-remove(rich-text-editor) */
16435
- const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DzVuW5SN.js'); }));
16447
+ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-ClBYNQcI.js'); }));
16436
16448
  /**
16437
16449
  * @private
16438
16450
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -16440,7 +16452,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
16440
16452
  *
16441
16453
  * @conditional-compile-remove(rich-text-editor)
16442
16454
  */
16443
- const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DzVuW5SN.js'); });
16455
+ const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-ClBYNQcI.js'); });
16444
16456
  /**
16445
16457
  * @private
16446
16458
  */
@@ -26124,7 +26136,7 @@ const _Caption = (props) => {
26124
26136
  /* @conditional-compile-remove(rtt) */
26125
26137
  /* @conditional-compile-remove(rtt) */
26126
26138
  /**
26127
- * @beta
26139
+ * @public
26128
26140
  * A component for displaying a single line of RealTimeText
26129
26141
  */
26130
26142
  const RealTimeText = (props) => {
@@ -26831,7 +26843,7 @@ var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments,
26831
26843
  };
26832
26844
  /* @conditional-compile-remove(rtt) */
26833
26845
  /**
26834
- * @beta
26846
+ * @public
26835
26847
  * a component for realTimeText modal
26836
26848
  */
26837
26849
  const RealTimeTextModal = (props) => {
@@ -27233,7 +27245,7 @@ const IncomingCallStack = (props) => {
27233
27245
  * Can be used with {@link ControlBar}
27234
27246
  *
27235
27247
  * @param props - properties for the start RealTimeText button.
27236
- * @beta
27248
+ * @public
27237
27249
  */
27238
27250
  const StartRealTimeTextButton = (props) => {
27239
27251
  const { onStartRealTimeText, isRealTimeTextOn } = props;
@@ -32339,7 +32351,7 @@ const AttachmentDownloadErrorBar = (props) => {
32339
32351
  /**
32340
32352
  * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox with lazy loading
32341
32353
  */
32342
- const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-CWem6AxN.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
32354
+ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-zKj5z_6J.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
32343
32355
  /**
32344
32356
  * @private
32345
32357
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -32347,7 +32359,7 @@ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function
32347
32359
  *
32348
32360
  /* @conditional-compile-remove(rich-text-editor-composite-support)
32349
32361
  */
32350
- const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-CWem6AxN.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
32362
+ const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-zKj5z_6J.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
32351
32363
  /**
32352
32364
  * @private
32353
32365
  */
@@ -39926,7 +39938,7 @@ const CallArrangement = (props) => {
39926
39938
  padding: verticalControlBar ? '0.25rem' : 'unset'
39927
39939
  }) }, isLegacyCallControlEnabled((_o = props.callControlProps) === null || _o === undefined ? undefined : _o.options) ? (React.createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight, isMobile: props.mobileView, peopleButtonChecked: isPeoplePaneOpen, onPeopleButtonClicked: togglePeoplePane, displayVertical: verticalControlBar }))) : (React.createElement(CommonCallControlBar, Object.assign({}, props.callControlProps, { callControls: props.callControlProps.options, callAdapter: adapter, mobileView: props.mobileView, disableButtonsForLobbyPage: isInLobby, disableButtonsForHoldScreen: isInLocalHold, peopleButtonChecked: isPeoplePaneOpen, onPeopleButtonClicked: togglePeoplePane, onMoreButtonClicked: onMoreButtonClicked, isCaptionsSupported: (useTeamsCaptions && hasJoinedCall) || hasJoinedCall,
39928
39940
  /* @conditional-compile-remove(rtt) */
39929
- isRealTimeTextSupported: hasJoinedCall && !props.isPstnCall,
39941
+ isRealTimeTextSupported: hasJoinedCall && props.isRTTSupportedCall,
39930
39942
  /* @conditional-compile-remove(rtt) */
39931
39943
  onStartRealTimeText: onStartRealTimeText,
39932
39944
  /* @conditional-compile-remove(rtt) */
@@ -39934,7 +39946,7 @@ const CallArrangement = (props) => {
39934
39946
  ((_p = props.callControlProps) === null || _p === undefined ? undefined : _p.options) !== false && showDrawer && (React.createElement(react.Stack, { styles: drawerContainerStylesValue },
39935
39947
  React.createElement(PreparedMoreDrawer, { callControls: props.callControlProps.options, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked, disableButtonsForHoldScreen: isInLocalHold, isCaptionsSupported: (useTeamsCaptions && hasJoinedCall) || hasJoinedCall,
39936
39948
  /* @conditional-compile-remove(rtt) */
39937
- isRealTimeTextSupported: hasJoinedCall && !props.isPstnCall,
39949
+ isRealTimeTextSupported: hasJoinedCall && props.isRTTSupportedCall,
39938
39950
  /* @conditional-compile-remove(rtt) */
39939
39951
  onStartRealTimeText: onStartRealTimeText,
39940
39952
  /* @conditional-compile-remove(rtt) */
@@ -39987,7 +39999,7 @@ const remoteVideoViewOptions = {
39987
39999
  */
39988
40000
  const MediaGallery = (props) => {
39989
40001
  var _a, _b;
39990
- const { pinnedParticipants = [], setPinnedParticipants, setIsPromptOpen, setPromptProps, hideSpotlightButtons, videoTilesOptions, captionsOptions } = props;
40002
+ const { pinnedParticipants = [], setPinnedParticipants, setIsPromptOpen, setPromptProps, hideSpotlightButtons, videoTilesOptions, captionsOptions, compositeContainerAspectRatio } = props;
39991
40003
  const videoGalleryProps = usePropsFor$1(VideoGallery);
39992
40004
  const cameraSwitcherCameras = useSelector$1(localVideoCameraCycleButtonSelector);
39993
40005
  const cameraSwitcherCallback = useHandlers();
@@ -39995,11 +40007,10 @@ const MediaGallery = (props) => {
39995
40007
  const userRole = useSelector$1(getRole);
39996
40008
  const capabilities = useSelector$1(getCapabilites);
39997
40009
  const isRoomsCall = useSelector$1(getIsRoomsCall);
40010
+ const reactionResources = useSelector$1(getReactionResources);
39998
40011
  const containerRef = React.useRef(null);
39999
40012
  const containerWidth = _useContainerWidth(containerRef);
40000
40013
  const containerHeight = _useContainerHeight(containerRef);
40001
- const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;
40002
- const reactionResources = useSelector$1(getReactionResources);
40003
40014
  const layoutBasedOnTilePosition = getVideoGalleryLayoutBasedOnLocalOptions((_a = props.localVideoTileOptions) === null || _a === undefined ? undefined : _a.position);
40004
40015
  const cameraSwitcherProps = React.useMemo(() => {
40005
40016
  return Object.assign(Object.assign({}, cameraSwitcherCallback), cameraSwitcherCameras);
@@ -40058,7 +40069,7 @@ const MediaGallery = (props) => {
40058
40069
  };
40059
40070
  return (React.createElement(VideoGallery, Object.assign({}, videoGalleryProps, { videoTilesOptions: videoTilesOptions, localVideoViewOptions: localVideoViewOptions$2, remoteVideoViewOptions: remoteVideoViewOptions, styles: galleryStyles, layout: layoutBasedOnUserSelection(), showCameraSwitcherInLocalPreview: props.isMobile, localVideoCameraCycleButtonProps: cameraSwitcherProps, onRenderAvatar: onRenderAvatar, remoteVideoTileMenu: remoteVideoTileMenuOptions, overflowGalleryPosition: overflowGalleryPosition, localVideoTileSize: props.localVideoTileOptions === false || userRole === 'Consumer' || (isRoomsCall && userRole === 'Unknown')
40060
40071
  ? 'hidden'
40061
- : props.isMobile && containerAspectRatio < 1
40072
+ : props.isMobile && compositeContainerAspectRatio && compositeContainerAspectRatio < 1
40062
40073
  ? '9:16'
40063
40074
  : '16:9', pinnedParticipants: pinnedParticipants, onPinParticipant: onPinParticipant, onUnpinParticipant: onUnpinParticipant, reactionResources: reactionResources, onStartLocalSpotlight: hideSpotlightButtons ? undefined : onStartLocalSpotlightWithPrompt, onStopLocalSpotlight: hideSpotlightButtons ? undefined : onStopLocalSpotlightWithPrompt, onStartRemoteSpotlight: hideSpotlightButtons ? undefined : onStartRemoteSpotlightWithPrompt, onStopRemoteSpotlight: hideSpotlightButtons ? undefined : onStopRemoteSpotlightWithPrompt, onMuteParticipant: ((_a = capabilities === null || capabilities === undefined ? undefined : capabilities.muteOthers) === null || _a === undefined ? undefined : _a.isPresent) || userRole === 'Unknown'
40064
40075
  ? videoGalleryProps.onMuteParticipant
@@ -40076,7 +40087,6 @@ const MediaGallery = (props) => {
40076
40087
  overflowGalleryPosition,
40077
40088
  userRole,
40078
40089
  isRoomsCall,
40079
- containerAspectRatio,
40080
40090
  pinnedParticipants,
40081
40091
  onPinParticipant,
40082
40092
  onUnpinParticipant,
@@ -40088,7 +40098,8 @@ const MediaGallery = (props) => {
40088
40098
  onStopRemoteSpotlightWithPrompt,
40089
40099
  layoutBasedOnTilePosition,
40090
40100
  capabilities === null || capabilities === undefined ? undefined : capabilities.muteOthers,
40091
- props.localScreenShareView
40101
+ props.localScreenShareView,
40102
+ compositeContainerAspectRatio
40092
40103
  ]);
40093
40104
  return (React.createElement("div", { ref: containerRef, style: mediaGalleryContainerStyles },
40094
40105
  React.createElement(Announcer$1, { announcementString: announcerString, ariaLive: 'polite' }),
@@ -40424,6 +40435,11 @@ const CallPage = (props) => {
40424
40435
  const renderDtmfDialerFromStart = showDtmfDialer(callees, remoteParticipantsConnected, disableAutoShowDtmfDialer);
40425
40436
  const [dtmfDialerPresent, setDtmfDialerPresent] = React.useState(renderDtmfDialerFromStart);
40426
40437
  const isPstnCall = callees === null || callees === undefined ? undefined : callees.some((callee) => communicationCommon.isPhoneNumberIdentifier(callee));
40438
+ const isCTECall = useSelector$1((state) => state.userId.kind === 'microsoftTeamsUser');
40439
+ const containerRef = React.useRef(null);
40440
+ const containerWidth = _useContainerWidth(containerRef);
40441
+ const containerHeight = _useContainerHeight(containerRef);
40442
+ const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;
40427
40443
  const strings = useLocale().strings.call;
40428
40444
  const pinnedParticipantsChecked = React.useMemo(() => pinnedParticipants.filter((pinnedParticipant) => remoteParticipantsConnected.find((remoteParticipant) => toFlatCommunicationIdentifier(remoteParticipant.identifier) === pinnedParticipant)), [pinnedParticipants, remoteParticipantsConnected]);
40429
40445
  // Reduce the controls shown when mobile view is enabled.
@@ -40448,10 +40464,10 @@ const CallPage = (props) => {
40448
40464
  return (React.createElement(DtmfDialpadPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors, onDismissError: props.onDismissError, capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent, compositeAudioContext: compositeAudioContext }));
40449
40465
  }
40450
40466
  else {
40451
- return (React.createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, remoteVideoTileMenuOptions: options === null || options === undefined ? undefined : options.remoteVideoTileMenuOptions, drawerMenuHostId: drawerMenuHostId, localVideoTileOptions: options === null || options === undefined ? undefined : options.localVideoTile, userSetOverflowGalleryPosition: userSetOverflowGalleryPosition, userSetGalleryLayout: galleryLayout, pinnedParticipants: pinnedParticipantsChecked, setPinnedParticipants: setPinnedParticipants, setIsPromptOpen: setIsPromptOpen, setPromptProps: setPromptProps, hideSpotlightButtons: (_a = options === null || options === undefined ? undefined : options.spotlight) === null || _a === undefined ? undefined : _a.hideSpotlightButtons, videoTilesOptions: options === null || options === undefined ? undefined : options.videoTilesOptions, captionsOptions: options === null || options === undefined ? undefined : options.captionsBanner, localScreenShareView: (_b = options === null || options === undefined ? undefined : options.galleryOptions) === null || _b === undefined ? undefined : _b.localScreenShareView })));
40467
+ return (React.createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, remoteVideoTileMenuOptions: options === null || options === undefined ? undefined : options.remoteVideoTileMenuOptions, drawerMenuHostId: drawerMenuHostId, localVideoTileOptions: options === null || options === undefined ? undefined : options.localVideoTile, userSetOverflowGalleryPosition: userSetOverflowGalleryPosition, userSetGalleryLayout: galleryLayout, pinnedParticipants: pinnedParticipantsChecked, setPinnedParticipants: setPinnedParticipants, setIsPromptOpen: setIsPromptOpen, setPromptProps: setPromptProps, hideSpotlightButtons: (_a = options === null || options === undefined ? undefined : options.spotlight) === null || _a === undefined ? undefined : _a.hideSpotlightButtons, videoTilesOptions: options === null || options === undefined ? undefined : options.videoTilesOptions, captionsOptions: options === null || options === undefined ? undefined : options.captionsBanner, localScreenShareView: (_b = options === null || options === undefined ? undefined : options.galleryOptions) === null || _b === undefined ? undefined : _b.localScreenShareView, compositeContainerAspectRatio: containerAspectRatio })));
40452
40468
  }
40453
40469
  };
40454
- return (React.createElement(React.Fragment, null,
40470
+ return (React.createElement("div", { ref: containerRef, style: { height: '100%', width: '100%' } },
40455
40471
  React.createElement(CallArrangement, { id: drawerMenuHostId, complianceBannerProps: Object.assign(Object.assign({}, complianceBannerProps), { strings }), errorBarProps: (options === null || options === undefined ? undefined : options.errorBar) !== false && errorBarProps, showErrorNotifications: (_a = options === null || options === undefined ? undefined : options.errorBar) !== null && _a !== undefined ? _a : true, mutedNotificationProps: mutedNotificationProps, callControlProps: {
40456
40472
  callInvitationURL: callInvitationURL,
40457
40473
  onFetchParticipantMenuItems: onFetchParticipantMenuItems,
@@ -40459,7 +40475,7 @@ const CallPage = (props) => {
40459
40475
  increaseFlyoutItemSize: mobileView
40460
40476
  }, onFetchAvatarPersonaData: onFetchAvatarPersonaData, mobileView: mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => _isInCall(callStatus) ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (onRenderGalleryContentTrampoline()) : (React.createElement(NetworkReconnectTile, Object.assign({}, networkReconnectTileProps, { isMobile: mobileView })))) : (galleryContentWhenNotInCall), updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onCloseChatPane: onCloseChatPane, dataUiId: 'call-page', latestErrors: props.latestErrors, latestNotifications: latestNotifications, onDismissError: props.onDismissError, onDismissNotification: onDismissNotification, onUserSetOverflowGalleryPositionChange: onSetUserSetOverflowGalleryPosition, onUserSetGalleryLayoutChange: onUserSetGalleryLayoutChange, userSetGalleryLayout: galleryLayout, capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent, setIsPromptOpen: setIsPromptOpen, setPromptProps: setPromptProps, hideSpotlightButtons: (_b = options === null || options === undefined ? undefined : options.spotlight) === null || _b === undefined ? undefined : _b.hideSpotlightButtons, pinnedParticipants: pinnedParticipantsChecked, setPinnedParticipants: setPinnedParticipants,
40461
40477
  /* @conditional-compile-remove(call-readiness) */
40462
- doNotShowCameraAccessNotifications: ((_d = (_c = props.options) === null || _c === undefined ? undefined : _c.deviceChecks) === null || _d === undefined ? undefined : _d.camera) === 'doNotPrompt', captionsOptions: options === null || options === undefined ? undefined : options.captionsBanner, dtmfDialerOptions: disableAutoShowDtmfDialer, notificationOptions: props.notificationOptions, isPstnCall: isPstnCall }),
40478
+ doNotShowCameraAccessNotifications: ((_d = (_c = props.options) === null || _c === undefined ? undefined : _c.deviceChecks) === null || _d === undefined ? undefined : _d.camera) === 'doNotPrompt', captionsOptions: options === null || options === undefined ? undefined : options.captionsBanner, dtmfDialerOptions: disableAutoShowDtmfDialer, notificationOptions: props.notificationOptions, isRTTSupportedCall: !isPstnCall && !isCTECall }),
40463
40479
  React.createElement(Prompt, Object.assign({ isOpen: isPromptOpen, onDismiss: () => setIsPromptOpen(false) }, promptProps))));
40464
40480
  };
40465
40481
  /**
@@ -42816,11 +42832,22 @@ const MainScreen = (props) => {
42816
42832
  const closeSidePane = () => {
42817
42833
  setSidePaneRenderer(undefined);
42818
42834
  };
42819
- adapter.on('callEnded', closeSidePane);
42835
+ /* @conditional-compile-remove(together-mode) */
42836
+ const resetUserGalleryLayout = () => {
42837
+ if (userSetGalleryLayout === 'togetherMode') {
42838
+ setUserSetGalleryLayout('floatingLocalVideo');
42839
+ }
42840
+ };
42841
+ const handleCallEnded = () => {
42842
+ closeSidePane();
42843
+ /* @conditional-compile-remove(together-mode) */
42844
+ resetUserGalleryLayout();
42845
+ };
42846
+ adapter.on('callEnded', handleCallEnded);
42820
42847
  return () => {
42821
- adapter.off('callEnded', closeSidePane);
42848
+ adapter.off('callEnded', handleCallEnded);
42822
42849
  };
42823
- }, [adapter]);
42850
+ }, [adapter, /* @conditional-compile-remove(together-mode) */ userSetGalleryLayout]);
42824
42851
  const compositeAudioContext = useAudio();
42825
42852
  const capabilitiesChangedInfoAndRole = useSelector$1(capabilitiesChangedInfoAndRoleSelector);
42826
42853
  const capabilitiesChangedNotificationBarProps = useTrackedCapabilityChangedNotifications(capabilitiesChangedInfoAndRole);
@@ -44350,7 +44377,12 @@ class AzureCommunicationCallAdapter {
44350
44377
  (_g = this.call) === null || _g === undefined ? undefined : _g.feature(communicationCalling.Features.Capabilities).on('capabilitiesChanged', this.capabilitiesChanged.bind(this));
44351
44378
  (_h = this.call) === null || _h === undefined ? undefined : _h.feature(communicationCalling.Features.Spotlight).on('spotlightChanged', this.spotlightChanged.bind(this));
44352
44379
  /* @conditional-compile-remove(rtt) */
44353
- (_j = this.call) === null || _j === undefined ? undefined : _j.feature(communicationCalling.Features.RealTimeText).on('realTimeTextReceived', this.realTimeTextReceived.bind(this));
44380
+ try {
44381
+ (_j = this.call) === null || _j === void 0 ? void 0 : _j.feature(communicationCalling.Features.RealTimeText).on('realTimeTextReceived', this.realTimeTextReceived.bind(this));
44382
+ }
44383
+ catch (e) {
44384
+ console.log('RealTimeText feature is not supported');
44385
+ }
44354
44386
  const breakoutRoomsFeature = (_k = this.call) === null || _k === undefined ? undefined : _k.feature(communicationCalling.Features.BreakoutRooms);
44355
44387
  if (breakoutRoomsFeature) {
44356
44388
  breakoutRoomsFeature.on('breakoutRoomsUpdated', this.breakoutRoomsUpdated.bind(this));
@@ -44369,7 +44401,12 @@ class AzureCommunicationCallAdapter {
44369
44401
  (_e = this.call) === null || _e === undefined ? undefined : _e.off('roleChanged', this.roleChanged.bind(this));
44370
44402
  this.unsubscribeFromCaptionEvents();
44371
44403
  /* @conditional-compile-remove(rtt) */
44372
- (_f = this.call) === null || _f === undefined ? undefined : _f.feature(communicationCalling.Features.RealTimeText).off('realTimeTextReceived', this.realTimeTextReceived.bind(this));
44404
+ try {
44405
+ (_f = this.call) === null || _f === void 0 ? void 0 : _f.feature(communicationCalling.Features.RealTimeText).off('realTimeTextReceived', this.realTimeTextReceived.bind(this));
44406
+ }
44407
+ catch (e) {
44408
+ console.log('RealTimeText feature is not supported');
44409
+ }
44373
44410
  if (this.callingSoundSubscriber) {
44374
44411
  this.callingSoundSubscriber.unsubscribeAll();
44375
44412
  }
@@ -45867,9 +45904,29 @@ class CallWithChatContext {
45867
45904
  * Created for easy use with the {@link CallWithChatComposite}.
45868
45905
  */
45869
45906
  class AzureCommunicationCallWithChatAdapter {
45907
+ // This function is used to store a listener to the internal map of chat event listeners and should be
45908
+ // used when a listener subscribes to a chat event
45909
+ storeChatEventListener(event, listener) {
45910
+ var _a;
45911
+ if (!this.chatEventListeners.has(event)) {
45912
+ this.chatEventListeners.set(event, new Set());
45913
+ }
45914
+ (_a = this.chatEventListeners.get(event)) === null || _a === undefined ? undefined : _a.add(listener);
45915
+ }
45916
+ // This function is used to remove a listener from the internal map of chat event listeners and should
45917
+ // be used when a listener unsubscribes from a chat event
45918
+ removeChatEventListener(event, listener) {
45919
+ var _a;
45920
+ if (this.chatEventListeners.has(event)) {
45921
+ (_a = this.chatEventListeners.get(event)) === null || _a === undefined ? undefined : _a.delete(listener);
45922
+ }
45923
+ }
45870
45924
  constructor(callAdapter, chatAdapter) {
45871
45925
  this.emitter = new events.EventEmitter();
45872
45926
  this.isAdapterDisposed = false;
45927
+ // This map is used to store the listeners subscribed to chat events so that we can re-subscribe them
45928
+ // to the new chat adapter when the thread id changes
45929
+ this.chatEventListeners = new Map();
45873
45930
  this.bindPublicMethods();
45874
45931
  this.callAdapter = callAdapter;
45875
45932
  this.context = new CallWithChatContext(callWithChatAdapterStateFromBackingStates(callAdapter));
@@ -45994,11 +46051,23 @@ class AzureCommunicationCallWithChatAdapter {
45994
46051
  updateChatAdapter(chatAdapter) {
45995
46052
  var _a;
45996
46053
  (_a = this.chatAdapter) === null || _a === undefined ? undefined : _a.offStateChange(this.onChatStateChange);
46054
+ this.updateChatEventListeners(chatAdapter);
45997
46055
  this.chatAdapter = chatAdapter;
45998
46056
  this.chatAdapter.onStateChange(this.onChatStateChange);
45999
46057
  this.context.updateClientStateWithChatState(chatAdapter.getState());
46000
46058
  this.emitter.emit('chatInitialized', this.chatAdapter);
46001
46059
  }
46060
+ updateChatEventListeners(chatAdapter) {
46061
+ var _a;
46062
+ for (const [eventName, listeners] of this.chatEventListeners) {
46063
+ for (const listener of listeners) {
46064
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
46065
+ (_a = this.chatAdapter) === null || _a === undefined ? undefined : _a.off(eventName, listener);
46066
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
46067
+ chatAdapter.on(eventName, listener);
46068
+ }
46069
+ }
46070
+ }
46002
46071
  bindPublicMethods() {
46003
46072
  this.joinCall.bind(this);
46004
46073
  this.leaveCall.bind(this);
@@ -46115,6 +46184,8 @@ class AzureCommunicationCallWithChatAdapter {
46115
46184
  }
46116
46185
  this.callAdapter.offStateChange(this.onCallStateChange);
46117
46186
  this.callAdapter.dispose();
46187
+ // Clear chat event listeners
46188
+ this.chatEventListeners.clear();
46118
46189
  }
46119
46190
  /** Remove a participant from the Call only. */
46120
46191
  removeParticipant(userId) {
@@ -46575,36 +46646,43 @@ class AzureCommunicationCallWithChatAdapter {
46575
46646
  this.callAdapter.on('isSpokenLanguageChanged', listener);
46576
46647
  break;
46577
46648
  case 'messageReceived':
46649
+ this.storeChatEventListener('messageReceived', listener);
46578
46650
  this.executeWithResolvedChatAdapter((adapter) => {
46579
46651
  adapter.on('messageReceived', listener);
46580
46652
  });
46581
46653
  break;
46582
46654
  case 'messageEdited':
46655
+ this.storeChatEventListener('messageEdited', listener);
46583
46656
  this.executeWithResolvedChatAdapter((adapter) => {
46584
46657
  adapter.on('messageEdited', listener);
46585
46658
  });
46586
46659
  break;
46587
46660
  case 'messageDeleted':
46661
+ this.storeChatEventListener('messageDeleted', listener);
46588
46662
  this.executeWithResolvedChatAdapter((adapter) => {
46589
46663
  adapter.on('messageDeleted', listener);
46590
46664
  });
46591
46665
  break;
46592
46666
  case 'messageSent':
46667
+ this.storeChatEventListener('messageSent', listener);
46593
46668
  this.executeWithResolvedChatAdapter((adapter) => {
46594
46669
  adapter.on('messageSent', listener);
46595
46670
  });
46596
46671
  break;
46597
46672
  case 'messageRead':
46673
+ this.storeChatEventListener('messageRead', listener);
46598
46674
  this.executeWithResolvedChatAdapter((adapter) => {
46599
46675
  adapter.on('messageRead', listener);
46600
46676
  });
46601
46677
  break;
46602
46678
  case 'chatParticipantsAdded':
46679
+ this.storeChatEventListener('chatParticipantsAdded', listener);
46603
46680
  this.executeWithResolvedChatAdapter((adapter) => {
46604
46681
  adapter.on('participantsAdded', listener);
46605
46682
  });
46606
46683
  break;
46607
46684
  case 'chatParticipantsRemoved':
46685
+ this.storeChatEventListener('chatParticipantsRemoved', listener);
46608
46686
  this.executeWithResolvedChatAdapter((adapter) => {
46609
46687
  adapter.on('participantsRemoved', listener);
46610
46688
  });
@@ -46613,6 +46691,7 @@ class AzureCommunicationCallWithChatAdapter {
46613
46691
  this.callAdapter.on('error', listener);
46614
46692
  break;
46615
46693
  case 'chatError':
46694
+ this.storeChatEventListener('chatError', listener);
46616
46695
  this.executeWithResolvedChatAdapter((adapter) => {
46617
46696
  adapter.on('error', listener);
46618
46697
  });
@@ -46683,36 +46762,43 @@ class AzureCommunicationCallWithChatAdapter {
46683
46762
  this.callAdapter.off('isSpokenLanguageChanged', listener);
46684
46763
  break;
46685
46764
  case 'messageReceived':
46765
+ this.removeChatEventListener('messageReceived', listener);
46686
46766
  this.executeWithResolvedChatAdapter((adapter) => {
46687
46767
  adapter.off('messageReceived', listener);
46688
46768
  });
46689
46769
  break;
46690
46770
  case 'messageEdited':
46771
+ this.removeChatEventListener('messageEdited', listener);
46691
46772
  this.executeWithResolvedChatAdapter((adapter) => {
46692
46773
  adapter.off('messageEdited', listener);
46693
46774
  });
46694
46775
  break;
46695
46776
  case 'messageDeleted':
46777
+ this.removeChatEventListener('messageDeleted', listener);
46696
46778
  this.executeWithResolvedChatAdapter((adapter) => {
46697
46779
  adapter.off('messageDeleted', listener);
46698
46780
  });
46699
46781
  break;
46700
46782
  case 'messageSent':
46783
+ this.removeChatEventListener('messageSent', listener);
46701
46784
  this.executeWithResolvedChatAdapter((adapter) => {
46702
46785
  adapter.off('messageSent', listener);
46703
46786
  });
46704
46787
  break;
46705
46788
  case 'messageRead':
46789
+ this.removeChatEventListener('messageRead', listener);
46706
46790
  this.executeWithResolvedChatAdapter((adapter) => {
46707
46791
  adapter.off('messageRead', listener);
46708
46792
  });
46709
46793
  break;
46710
46794
  case 'chatParticipantsAdded':
46795
+ this.removeChatEventListener('chatParticipantsAdded', listener);
46711
46796
  this.executeWithResolvedChatAdapter((adapter) => {
46712
46797
  adapter.off('participantsAdded', listener);
46713
46798
  });
46714
46799
  break;
46715
46800
  case 'chatParticipantsRemoved':
46801
+ this.removeChatEventListener('chatParticipantsRemoved', listener);
46716
46802
  this.executeWithResolvedChatAdapter((adapter) => {
46717
46803
  adapter.off('participantsRemoved', listener);
46718
46804
  });
@@ -46721,6 +46807,7 @@ class AzureCommunicationCallWithChatAdapter {
46721
46807
  this.callAdapter.off('error', listener);
46722
46808
  break;
46723
46809
  case 'chatError':
46810
+ this.removeChatEventListener('chatError', listener);
46724
46811
  this.executeWithResolvedChatAdapter((adapter) => {
46725
46812
  adapter.off('error', listener);
46726
46813
  });
@@ -47737,4 +47824,4 @@ exports.useTeamsCall = useTeamsCall;
47737
47824
  exports.useTeamsCallAdapter = useTeamsCallAdapter;
47738
47825
  exports.useTeamsCallAgent = useTeamsCallAgent;
47739
47826
  exports.useTheme = useTheme;
47740
- //# sourceMappingURL=index-B61VVYm8.js.map
47827
+ //# sourceMappingURL=index-Y6qfhE4K.js.map