@azure/communication-react 1.3.2-alpha-202207190020.0 → 1.3.2-alpha-202207200014.0

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 (60) hide show
  1. package/dist/dist-cjs/communication-react/index.js +264 -281
  2. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  3. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  4. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.d.ts.map +1 -1
  5. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js +7 -13
  6. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js.map +1 -1
  7. package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts.map +1 -1
  8. package/dist/dist-esm/react-components/src/components/DevicesButton.js +2 -12
  9. package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
  10. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +2 -12
  12. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts.map +1 -1
  14. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +3 -13
  15. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
  16. package/dist/dist-esm/react-components/src/components/utils/common.d.ts +13 -0
  17. package/dist/dist-esm/react-components/src/components/utils/common.d.ts.map +1 -1
  18. package/dist/dist-esm/react-components/src/components/utils/common.js +15 -0
  19. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  20. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.d.ts.map +1 -1
  21. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +23 -6
  22. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +1 -1
  23. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/ModalLocalAndRemotePIP.d.ts +0 -0
  24. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.d.ts.map +1 -0
  25. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/ModalLocalAndRemotePIP.js +0 -0
  26. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -0
  27. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/PeoplePaneContent.d.ts +2 -5
  28. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts.map +1 -0
  29. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/PeoplePaneContent.js +6 -14
  30. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -0
  31. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/SidePaneHeader.d.ts +2 -0
  32. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts.map +1 -0
  33. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/SidePaneHeader.js +1 -3
  34. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -0
  35. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/TabHeader.d.ts +2 -0
  36. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts.map +1 -0
  37. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/TabHeader.js +5 -6
  38. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -0
  39. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/styles/MobilePane.styles.d.ts +0 -0
  40. package/dist/dist-esm/react-composites/src/composites/common/styles/MobilePane.styles.d.ts.map +1 -0
  41. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/styles/MobilePane.styles.js +0 -0
  42. package/dist/dist-esm/react-composites/src/composites/common/styles/MobilePane.styles.js.map +1 -0
  43. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/styles/PeoplePaneContent.styles.d.ts +0 -0
  44. package/dist/dist-esm/react-composites/src/composites/common/styles/PeoplePaneContent.styles.d.ts.map +1 -0
  45. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/styles/PeoplePaneContent.styles.js +0 -0
  46. package/dist/dist-esm/react-composites/src/composites/common/styles/PeoplePaneContent.styles.js.map +1 -0
  47. package/dist/tsdoc-metadata.json +1 -1
  48. package/package.json +8 -8
  49. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ModalLocalAndRemotePIP.d.ts.map +0 -1
  50. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ModalLocalAndRemotePIP.js.map +0 -1
  51. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeoplePaneContent.d.ts.map +0 -1
  52. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeoplePaneContent.js.map +0 -1
  53. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/SidePaneHeader.d.ts.map +0 -1
  54. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/SidePaneHeader.js.map +0 -1
  55. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/TabHeader.d.ts.map +0 -1
  56. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/TabHeader.js.map +0 -1
  57. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/MobilePane.styles.d.ts.map +0 -1
  58. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/MobilePane.styles.js.map +0 -1
  59. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/PeoplePaneContent.styles.d.ts.map +0 -1
  60. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/PeoplePaneContent.styles.js.map +0 -1
@@ -191,7 +191,7 @@ const fromFlatCommunicationIdentifier = (id) => {
191
191
  // Copyright (c) Microsoft Corporation.
192
192
  // Licensed under the MIT license.
193
193
  // GENERATED FILE. DO NOT EDIT MANUALLY.
194
- var telemetryVersion = '1.3.2-alpha-202207190020.0';
194
+ var telemetryVersion = '1.3.2-alpha-202207200014.0';
195
195
 
196
196
  // Copyright (c) Microsoft Corporation.
197
197
  /**
@@ -364,7 +364,7 @@ const getCallState = (state, props) => { var _a; return (_a = state.calls[props.
364
364
 
365
365
  // Copyright (c) Microsoft Corporation.
366
366
  // Licensed under the MIT license.
367
- var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
367
+ var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
368
368
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
369
369
  return new (P || (P = Promise))(function (resolve, reject) {
370
370
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -402,7 +402,7 @@ const _isPreviewOn = (deviceManager) => {
402
402
  *
403
403
  * @private
404
404
  */
405
- const disposeAllLocalPreviewViews = (callClient) => __awaiter$s(void 0, void 0, void 0, function* () {
405
+ const disposeAllLocalPreviewViews = (callClient) => __awaiter$t(void 0, void 0, void 0, function* () {
406
406
  const unparentedViews = callClient.getState().deviceManager.unparentedViews;
407
407
  for (const view of unparentedViews) {
408
408
  yield callClient.disposeView(undefined, undefined, view);
@@ -509,7 +509,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
509
509
 
510
510
  // Copyright (c) Microsoft Corporation.
511
511
  // Licensed under the MIT license.
512
- var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
512
+ var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
513
513
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
514
514
  return new (P || (P = Promise))(function (resolve, reject) {
515
515
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -533,7 +533,7 @@ const areStreamsEqual = (prevStream, newStream) => {
533
533
  * @public
534
534
  */
535
535
  const createDefaultCallingHandlers = memoizeOne__default['default']((callClient, callAgent, deviceManager, call) => {
536
- const onStartLocalVideo = () => __awaiter$r(void 0, void 0, void 0, function* () {
536
+ const onStartLocalVideo = () => __awaiter$s(void 0, void 0, void 0, function* () {
537
537
  // Before the call object creates a stream, dispose of any local preview streams.
538
538
  // @TODO: is there any way to parent the unparented view to the call object instead
539
539
  // of disposing and creating a new stream?
@@ -553,7 +553,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
553
553
  yield call.startVideo(stream);
554
554
  }
555
555
  });
556
- const onStopLocalVideo = (stream) => __awaiter$r(void 0, void 0, void 0, function* () {
556
+ const onStopLocalVideo = (stream) => __awaiter$s(void 0, void 0, void 0, function* () {
557
557
  const callId = call === null || call === void 0 ? void 0 : call.id;
558
558
  if (!callId) {
559
559
  return;
@@ -566,7 +566,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
566
566
  });
567
567
  }
568
568
  });
569
- const onToggleCamera = (options) => __awaiter$r(void 0, void 0, void 0, function* () {
569
+ const onToggleCamera = (options) => __awaiter$s(void 0, void 0, void 0, function* () {
570
570
  if (call && _isInCall(call.state)) {
571
571
  const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
572
572
  if (stream) {
@@ -596,19 +596,19 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
596
596
  const onStartCall = (participants, options) => {
597
597
  return callAgent ? callAgent.startCall(participants, options) : undefined;
598
598
  };
599
- const onSelectMicrophone = (device) => __awaiter$r(void 0, void 0, void 0, function* () {
599
+ const onSelectMicrophone = (device) => __awaiter$s(void 0, void 0, void 0, function* () {
600
600
  if (!deviceManager) {
601
601
  return;
602
602
  }
603
603
  return deviceManager.selectMicrophone(device);
604
604
  });
605
- const onSelectSpeaker = (device) => __awaiter$r(void 0, void 0, void 0, function* () {
605
+ const onSelectSpeaker = (device) => __awaiter$s(void 0, void 0, void 0, function* () {
606
606
  if (!deviceManager) {
607
607
  return;
608
608
  }
609
609
  return deviceManager.selectSpeaker(device);
610
610
  });
611
- const onSelectCamera = (device, options) => __awaiter$r(void 0, void 0, void 0, function* () {
611
+ const onSelectCamera = (device, options) => __awaiter$s(void 0, void 0, void 0, function* () {
612
612
  if (!deviceManager) {
613
613
  return;
614
614
  }
@@ -631,19 +631,19 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
631
631
  }, options);
632
632
  }
633
633
  });
634
- const onToggleMicrophone = () => __awaiter$r(void 0, void 0, void 0, function* () {
634
+ const onToggleMicrophone = () => __awaiter$s(void 0, void 0, void 0, function* () {
635
635
  if (!call || !_isInCall(call.state)) {
636
636
  throw new Error(`Please invoke onToggleMicrophone after call is started`);
637
637
  }
638
638
  return call.isMuted ? yield call.unmute() : yield call.mute();
639
639
  });
640
- const onStartScreenShare = () => __awaiter$r(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
641
- const onStopScreenShare = () => __awaiter$r(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
642
- const onToggleScreenShare = () => __awaiter$r(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
643
- const onHangUp = () => __awaiter$r(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp()); });
640
+ const onStartScreenShare = () => __awaiter$s(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
641
+ const onStopScreenShare = () => __awaiter$s(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
642
+ const onToggleScreenShare = () => __awaiter$s(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
643
+ const onHangUp = () => __awaiter$s(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp()); });
644
644
  /* @conditional-compile-remove(PSTN-calls) */
645
- const onToggleHold = () => __awaiter$r(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.state) === 'LocalHold' ? yield (call === null || call === void 0 ? void 0 : call.resume()) : yield (call === null || call === void 0 ? void 0 : call.hold()); });
646
- const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$r(void 0, void 0, void 0, function* () {
645
+ const onToggleHold = () => __awaiter$s(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.state) === 'LocalHold' ? yield (call === null || call === void 0 ? void 0 : call.resume()) : yield (call === null || call === void 0 ? void 0 : call.hold()); });
646
+ const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$s(void 0, void 0, void 0, function* () {
647
647
  var _a;
648
648
  if (!call || call.localVideoStreams.length === 0) {
649
649
  return;
@@ -659,7 +659,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
659
659
  const { view } = (_a = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _a !== void 0 ? _a : {};
660
660
  return view ? { view } : undefined;
661
661
  });
662
- const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$r(void 0, void 0, void 0, function* () {
662
+ const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$s(void 0, void 0, void 0, function* () {
663
663
  if (!call) {
664
664
  return;
665
665
  }
@@ -687,7 +687,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
687
687
  }
688
688
  return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
689
689
  });
690
- const onDisposeRemoteStreamView = (userId) => __awaiter$r(void 0, void 0, void 0, function* () {
690
+ const onDisposeRemoteStreamView = (userId) => __awaiter$s(void 0, void 0, void 0, function* () {
691
691
  if (!call) {
692
692
  return;
693
693
  }
@@ -708,7 +708,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
708
708
  callClient.disposeView(call.id, participant.identifier, screenShareStream);
709
709
  }
710
710
  });
711
- const onDisposeLocalStreamView = () => __awaiter$r(void 0, void 0, void 0, function* () {
711
+ const onDisposeLocalStreamView = () => __awaiter$s(void 0, void 0, void 0, function* () {
712
712
  // If the user is currently in a call, dispose of the local stream view attached to that call.
713
713
  const callState = call && callClient.getState().calls[call.id];
714
714
  const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
@@ -720,11 +720,11 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
720
720
  // TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one.
721
721
  yield disposeAllLocalPreviewViews(callClient);
722
722
  });
723
- const onRemoveParticipant = (userId) => __awaiter$r(void 0, void 0, void 0, function* () {
723
+ const onRemoveParticipant = (userId) => __awaiter$s(void 0, void 0, void 0, function* () {
724
724
  yield (call === null || call === void 0 ? void 0 : call.removeParticipant(fromFlatCommunicationIdentifier(userId)));
725
725
  });
726
726
  /* @conditional-compile-remove(PSTN-calls) */
727
- const onAddParticipant = (participant, options) => __awaiter$r(void 0, void 0, void 0, function* () {
727
+ const onAddParticipant = (participant, options) => __awaiter$s(void 0, void 0, void 0, function* () {
728
728
  if (communicationCommon.isPhoneNumberIdentifier(participant)) {
729
729
  yield (call === null || call === void 0 ? void 0 : call.addParticipant(participant, options));
730
730
  }
@@ -733,7 +733,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
733
733
  }
734
734
  });
735
735
  /* @conditional-compile-remove(dialpad) */
736
- const onSendDtmfTone = (dtmfTone) => __awaiter$r(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
736
+ const onSendDtmfTone = (dtmfTone) => __awaiter$s(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
737
737
  return {
738
738
  onHangUp,
739
739
  /* @conditional-compile-remove(PSTN-calls) */
@@ -3280,21 +3280,15 @@ const ChatMessageActionFlyout = (props) => {
3280
3280
  messageReadByList
3281
3281
  ]);
3282
3282
  // gap space uses pixels
3283
- return (React__default['default'].createElement(react.ContextualMenu, { id: "chat-composite-message-contextual-menu", alignTargetEdge: true, gapSpace: 5 /*px*/, isBeakVisible: false, items: menuItems, hidden: props.hidden, target: props.target, onDismiss: props.onDismiss, directionalHint: react.DirectionalHint.topRightEdge, className: chatMessageMenuStyle }));
3283
+ return (React__default['default'].createElement(react.ContextualMenu, { id: "chat-composite-message-contextual-menu", alignTargetEdge: true, gapSpace: 5 /*px*/, isBeakVisible: false, items: menuItems, hidden: props.hidden, target: props.target, onDismiss: props.onDismiss, directionalHint: react.DirectionalHint.topRightEdge, className: chatMessageMenuStyle, calloutProps: preventUnwantedDismissProps }));
3284
3284
  };
3285
+ /**
3286
+ * Similar to {@link preventDismissOnEvent}, but not prevent dismissing from scrolling, since it is causing bugs in chat thread.
3287
+ */
3285
3288
  const preventUnwantedDismissProps = {
3286
- // Disable dismiss on resize to work around a couple Fluent UI bugs
3287
- // - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
3288
- // happens when we change the VideoGallery layout, or even when the video stream element is internally resized
3289
- // by the headless SDK.
3290
- // - There is a `preventDismissOnEvent` prop that we could theoretically use to only dismiss when the target of
3291
- // of the 'resize' event is the window itself. But experimentation shows that setting that prop doesn't
3292
- // deterministically avoid dismissal.
3293
- //
3294
- // A side effect of this workaround is that the context menu stays open when window is resized, and may
3295
- // get detached from original target visually. That bug is preferable to the bug when this value is not set -
3296
- // The Callout (frequently) gets dismissed automatically.
3297
- preventDismissOnResize: true
3289
+ preventDismissOnEvent: (ev) => {
3290
+ return ev.type === 'resize';
3291
+ }
3298
3292
  };
3299
3293
 
3300
3294
  // Copyright (c) Microsoft Corporation.
@@ -3378,7 +3372,7 @@ const chatMessageActionMenuProps = (menuProps) => {
3378
3372
  return actionMenuProps;
3379
3373
  };
3380
3374
 
3381
- var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
3375
+ var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
3382
3376
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3383
3377
  return new (P || (P = Promise))(function (resolve, reject) {
3384
3378
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -3409,7 +3403,7 @@ const _FileDownloadCards = (props) => {
3409
3403
  /* @conditional-compile-remove(file-sharing) */
3410
3404
  localeStrings.downloadFile
3411
3405
  ]);
3412
- const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$q(void 0, void 0, void 0, function* () {
3406
+ const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$r(void 0, void 0, void 0, function* () {
3413
3407
  if (!props.downloadHandler) {
3414
3408
  window.open(file.url, '_blank', 'noopener,noreferrer');
3415
3409
  }
@@ -3547,7 +3541,7 @@ const ChatMessageComponentAsMessageBubble = React__default['default'].memo(Messa
3547
3541
 
3548
3542
  // Copyright (c) Microsoft Corporation.
3549
3543
  // Licensed under the MIT license.
3550
- var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
3544
+ var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
3551
3545
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3552
3546
  return new (P || (P = Promise))(function (resolve, reject) {
3553
3547
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -3581,7 +3575,7 @@ const ChatMessageComponent = (props) => {
3581
3575
  return React__default['default'].createElement(React__default['default'].Fragment, null);
3582
3576
  }
3583
3577
  else if (isEditing) {
3584
- return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$p(void 0, void 0, void 0, function* () {
3578
+ return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$q(void 0, void 0, void 0, function* () {
3585
3579
  props.onUpdateMessage &&
3586
3580
  props.message.messageId &&
3587
3581
  (yield props.onUpdateMessage(props.message.messageId, text, metadata, options));
@@ -3607,6 +3601,21 @@ const ChatMessageComponent = (props) => {
3607
3601
  const convertRemToPx = (rem) => {
3608
3602
  return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
3609
3603
  };
3604
+ /**
3605
+ * Converts units of rem to units of pixels
3606
+ * @private
3607
+ * Disable dismiss on resize to work around a couple Fluent UI bugs
3608
+ * - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
3609
+ * happens when we change the VideoGallery layout, or even when the video stream element is internally resized
3610
+ * by the headless SDK.
3611
+ * - We also want to prevent dismiss when chat pane is scrolling especially a new message is added.
3612
+ * A side effect of this workaround is that the context menu stays open when window is resized, and may
3613
+ * get detached from original target visually. That bug is preferable to the bug when this value is not set -
3614
+ * The Callout (frequently) gets dismissed automatically.
3615
+ */
3616
+ const preventDismissOnEvent = (ev) => {
3617
+ return ev.type === 'resize' || ev.type === 'scroll';
3618
+ };
3610
3619
 
3611
3620
  // Copyright (c) Microsoft Corporation.
3612
3621
  /**
@@ -3691,7 +3700,7 @@ const getParticipantsWhoHaveReadMessage = (message, readReceiptsBySenderId) => {
3691
3700
 
3692
3701
  // Copyright (c) Microsoft Corporation.
3693
3702
  // Licensed under the MIT license.
3694
- var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
3703
+ var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
3695
3704
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3696
3705
  return new (P || (P = Promise))(function (resolve, reject) {
3697
3706
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -3918,7 +3927,7 @@ const MessageThread = (props) => {
3918
3927
  setChatMessagesInitialized(chatMessagesInitialized);
3919
3928
  };
3920
3929
  // we try to only send those message status if user is scrolled to the bottom.
3921
- const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$o(void 0, void 0, void 0, function* () {
3930
+ const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
3922
3931
  if (!isAtBottomOfScrollRef.current ||
3923
3932
  !document.hasFocus() ||
3924
3933
  !messagesRef.current ||
@@ -3969,7 +3978,7 @@ const MessageThread = (props) => {
3969
3978
  setIsAtBottomOfScrollRef(atBottom);
3970
3979
  }, [scrollToBottom, sendMessageStatusIfAtBottom]);
3971
3980
  // Infinite scrolling + threadInitialize function
3972
- const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$o(void 0, void 0, void 0, function* () {
3981
+ const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
3973
3982
  if (chatScrollDivRef.current && !isLoadingChatMessagesRef.current) {
3974
3983
  if (onLoadPreviousChatMessages) {
3975
3984
  isLoadingChatMessagesRef.current = true;
@@ -4415,18 +4424,7 @@ const ParticipantItem = (props) => {
4415
4424
  menuItems && menuItems.length > 0 && (React__default['default'].createElement(React__default['default'].Fragment, null,
4416
4425
  menuButton,
4417
4426
  React__default['default'].createElement(react.ContextualMenu, { items: menuItems, hidden: menuHidden, target: containerRef, onItemClick: onDismissMenu, onDismiss: onDismissMenu, directionalHint: react.DirectionalHint.bottomRightEdge, className: contextualMenuStyle, calloutProps: {
4418
- // Disable dismiss on resize to work around a couple Fluent UI bugs
4419
- // - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
4420
- // happens when we change the VideoGallery layout, or even when the video stream element is internally resized
4421
- // by the headless SDK.
4422
- // - There is a `preventDismissOnEvent` prop that we could theoretically use to only dismiss when the target of
4423
- // of the 'resize' event is the window itself. But experimentation shows that setting that prop doesn't
4424
- // deterministically avoid dismissal.
4425
- //
4426
- // A side effect of this workaround is that the context menu stays open when window is resized, and may
4427
- // get detached from original target visually. That bug is preferable to the bug when this value is not set -
4428
- // The Callout (frequently) gets dismissed automatically.
4429
- preventDismissOnResize: true
4427
+ preventDismissOnEvent
4430
4428
  } })))));
4431
4429
  };
4432
4430
 
@@ -6466,18 +6464,7 @@ const generateDefaultDeviceMenuProps = (props, strings) => {
6466
6464
  maxWidth: '95%'
6467
6465
  }
6468
6466
  },
6469
- // Disable dismiss on resize to work around a couple Fluent UI bugs
6470
- // - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
6471
- // happens when we change the VideoGallery layout, or even when the video stream element is internally resized
6472
- // by the headless SDK.
6473
- // - There is a `preventDismissOnEvent` prop that we could theoretically use to only dismiss when the target of
6474
- // of the 'resize' event is the window itself. But experimentation shows that setting that prop doesn't
6475
- // deterministically avoid dismissal.
6476
- //
6477
- // A side effect of this workaround is that the context menu stays open when window is resized, and may
6478
- // get detached from original target visually. That bug is preferable to the bug when this value is not set -
6479
- // The Callout (frequently) gets dismissed automatically.
6480
- preventDismissOnResize: true
6467
+ preventDismissOnEvent
6481
6468
  }
6482
6469
  };
6483
6470
  const menuItemStyles = react.merge(buttonFlyoutItemStyles, (_b = (_a = props.styles) === null || _a === void 0 ? void 0 : _a.menuItemStyles) !== null && _b !== void 0 ? _b : {});
@@ -6590,7 +6577,7 @@ const DevicesButton = (props) => {
6590
6577
 
6591
6578
  // Copyright (c) Microsoft Corporation.
6592
6579
  // Licensed under the MIT license.
6593
- var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6580
+ var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6594
6581
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6595
6582
  return new (P || (P = Promise))(function (resolve, reject) {
6596
6583
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6627,7 +6614,7 @@ const CameraButton = (props) => {
6627
6614
  const toggleAnnouncerString = React.useCallback((isCameraOn) => {
6628
6615
  setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
6629
6616
  }, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
6630
- const onToggleClick = React.useCallback(() => __awaiter$n(void 0, void 0, void 0, function* () {
6617
+ const onToggleClick = React.useCallback(() => __awaiter$o(void 0, void 0, void 0, function* () {
6631
6618
  // Throttle click on camera, need to await onToggleCamera then allow another click
6632
6619
  if (onToggleCamera) {
6633
6620
  setWaitForCamera(true);
@@ -6759,7 +6746,7 @@ const lightThemeCallButtonStyles = {
6759
6746
 
6760
6747
  // Copyright (c) Microsoft Corporation.
6761
6748
  // Licensed under the MIT license.
6762
- var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6749
+ var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6763
6750
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6764
6751
  return new (P || (P = Promise))(function (resolve, reject) {
6765
6752
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6800,7 +6787,7 @@ const MicrophoneButton = (props) => {
6800
6787
  const toggleAnnouncerString = React.useCallback((isMicOn) => {
6801
6788
  setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
6802
6789
  }, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
6803
- const onToggleClick = React.useCallback(() => __awaiter$m(void 0, void 0, void 0, function* () {
6790
+ const onToggleClick = React.useCallback(() => __awaiter$n(void 0, void 0, void 0, function* () {
6804
6791
  if (onToggleMicrophone) {
6805
6792
  try {
6806
6793
  yield onToggleMicrophone();
@@ -6901,18 +6888,7 @@ const ParticipantsButton = (props) => {
6901
6888
  styles: react.merge(participantsButtonMenuPropsStyle, styles === null || styles === void 0 ? void 0 : styles.menuStyles),
6902
6889
  items: [],
6903
6890
  calloutProps: {
6904
- // Disable dismiss on resize to work around a couple Fluent UI bugs
6905
- // - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
6906
- // happens when we change the VideoGallery layout, or even when the video stream element is internally resized
6907
- // by the headless SDK.
6908
- // - There is a `preventDismissOnEvent` prop that we could theoretically use to only dismiss when the target of
6909
- // of the 'resize' event is the window itself. But experimentation shows that setting that prop doesn't
6910
- // deterministically avoid dismissal.
6911
- //
6912
- // A side effect of this workaround is that the context menu stays open when window is resized, and may
6913
- // get detached from original target visually. That bug is preferable to the bug when this value is not set -
6914
- // The Callout (frequently) gets dismissed automatically.
6915
- preventDismissOnResize: true
6891
+ preventDismissOnEvent
6916
6892
  }
6917
6893
  };
6918
6894
  if (participantCount > 0) {
@@ -6941,7 +6917,7 @@ const ParticipantsButton = (props) => {
6941
6917
  },
6942
6918
  // Disable dismiss on resize to work around a couple Fluent UI bugs
6943
6919
  // See reasoning in the props for the parent menu.
6944
- preventDismissOnResize: true
6920
+ preventDismissOnEvent
6945
6921
  }
6946
6922
  },
6947
6923
  'data-ui-id': ids.participantButtonPeopleMenuItem
@@ -8215,7 +8191,7 @@ const findConditionalCompiledSelector = (component) => {
8215
8191
 
8216
8192
  // Copyright (c) Microsoft Corporation.
8217
8193
  // Licensed under the MIT license.
8218
- var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
8194
+ var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
8219
8195
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8220
8196
  return new (P || (P = Promise))(function (resolve, reject) {
8221
8197
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -8238,35 +8214,35 @@ const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, ch
8238
8214
  let messageIterator = undefined;
8239
8215
  let readReceiptIterator = undefined;
8240
8216
  return {
8241
- onSendMessage: (content, options) => __awaiter$l(void 0, void 0, void 0, function* () {
8217
+ onSendMessage: (content, options) => __awaiter$m(void 0, void 0, void 0, function* () {
8242
8218
  const sendMessageRequest = {
8243
8219
  content,
8244
8220
  senderDisplayName: chatClient.getState().displayName
8245
8221
  };
8246
8222
  yield chatThreadClient.sendMessage(sendMessageRequest, options);
8247
8223
  }),
8248
- onUpdateMessage: (messageId, content, metadata, options) => __awaiter$l(void 0, void 0, void 0, function* () {
8224
+ onUpdateMessage: (messageId, content, metadata, options) => __awaiter$m(void 0, void 0, void 0, function* () {
8249
8225
  const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
8250
8226
  updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
8251
8227
  yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
8252
8228
  }),
8253
- onDeleteMessage: (messageId) => __awaiter$l(void 0, void 0, void 0, function* () {
8229
+ onDeleteMessage: (messageId) => __awaiter$m(void 0, void 0, void 0, function* () {
8254
8230
  yield chatThreadClient.deleteMessage(messageId);
8255
8231
  }),
8256
8232
  // This handler is designed for chatThread to consume
8257
- onMessageSeen: (chatMessageId) => __awaiter$l(void 0, void 0, void 0, function* () {
8233
+ onMessageSeen: (chatMessageId) => __awaiter$m(void 0, void 0, void 0, function* () {
8258
8234
  yield chatThreadClient.sendReadReceipt({ chatMessageId });
8259
8235
  }),
8260
- onTyping: () => __awaiter$l(void 0, void 0, void 0, function* () {
8236
+ onTyping: () => __awaiter$m(void 0, void 0, void 0, function* () {
8261
8237
  yield chatThreadClient.sendTypingNotification();
8262
8238
  }),
8263
- onRemoveParticipant: (userId) => __awaiter$l(void 0, void 0, void 0, function* () {
8239
+ onRemoveParticipant: (userId) => __awaiter$m(void 0, void 0, void 0, function* () {
8264
8240
  yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
8265
8241
  }),
8266
- updateThreadTopicName: (topicName) => __awaiter$l(void 0, void 0, void 0, function* () {
8242
+ updateThreadTopicName: (topicName) => __awaiter$m(void 0, void 0, void 0, function* () {
8267
8243
  yield chatThreadClient.updateTopic(topicName);
8268
8244
  }),
8269
- onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$l(void 0, void 0, void 0, function* () {
8245
+ onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$m(void 0, void 0, void 0, function* () {
8270
8246
  var _a, _b, _c;
8271
8247
  if (messageIterator === undefined) {
8272
8248
  // Lazy definition so that errors in the method call are reported correctly.
@@ -8957,7 +8933,7 @@ const findSelector = (component) => {
8957
8933
 
8958
8934
  // Copyright (c) Microsoft Corporation.
8959
8935
  // Licensed under the MIT license.
8960
- var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
8936
+ var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
8961
8937
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8962
8938
  return new (P || (P = Promise))(function (resolve, reject) {
8963
8939
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -9006,10 +8982,10 @@ class ProxyDeviceManager {
9006
8982
  this.selectCamera = (videoDeviceInfo) => {
9007
8983
  this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
9008
8984
  };
9009
- this.videoDevicesUpdated = () => __awaiter$k(this, void 0, void 0, function* () {
8985
+ this.videoDevicesUpdated = () => __awaiter$l(this, void 0, void 0, function* () {
9010
8986
  this._context.setDeviceManagerCameras(dedupeById(yield this._deviceManager.getCameras()));
9011
8987
  });
9012
- this.audioDevicesUpdated = () => __awaiter$k(this, void 0, void 0, function* () {
8988
+ this.audioDevicesUpdated = () => __awaiter$l(this, void 0, void 0, function* () {
9013
8989
  this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
9014
8990
  this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
9015
8991
  });
@@ -9206,7 +9182,7 @@ class CallIdHistory {
9206
9182
 
9207
9183
  // Copyright (c) Microsoft Corporation.
9208
9184
  // Licensed under the MIT license.
9209
- var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
9185
+ var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
9210
9186
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9211
9187
  return new (P || (P = Promise))(function (resolve, reject) {
9212
9188
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -9691,7 +9667,7 @@ class CallContext$1 {
9691
9667
  * @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
9692
9668
  */
9693
9669
  withAsyncErrorTeedToState(action, target) {
9694
- return (...args) => __awaiter$j(this, void 0, void 0, function* () {
9670
+ return (...args) => __awaiter$k(this, void 0, void 0, function* () {
9695
9671
  try {
9696
9672
  return yield action(...args);
9697
9673
  }
@@ -9755,7 +9731,7 @@ const findOldestCallEnded = (calls) => {
9755
9731
 
9756
9732
  // Copyright (c) Microsoft Corporation.
9757
9733
  // Licensed under the MIT license.
9758
- var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
9734
+ var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
9759
9735
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9760
9736
  return new (P || (P = Promise))(function (resolve, reject) {
9761
9737
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -9775,63 +9751,63 @@ class ProxyCall {
9775
9751
  switch (prop) {
9776
9752
  case 'mute': {
9777
9753
  return this._context.withAsyncErrorTeedToState(function (...args) {
9778
- return __awaiter$i(this, void 0, void 0, function* () {
9754
+ return __awaiter$j(this, void 0, void 0, function* () {
9779
9755
  return yield target.mute(...args);
9780
9756
  });
9781
9757
  }, 'Call.mute');
9782
9758
  }
9783
9759
  case 'unmute': {
9784
9760
  return this._context.withAsyncErrorTeedToState(function (...args) {
9785
- return __awaiter$i(this, void 0, void 0, function* () {
9761
+ return __awaiter$j(this, void 0, void 0, function* () {
9786
9762
  return yield target.unmute(...args);
9787
9763
  });
9788
9764
  }, 'Call.unmute');
9789
9765
  }
9790
9766
  case 'startVideo': {
9791
9767
  return this._context.withAsyncErrorTeedToState(function (...args) {
9792
- return __awaiter$i(this, void 0, void 0, function* () {
9768
+ return __awaiter$j(this, void 0, void 0, function* () {
9793
9769
  return yield target.startVideo(...args);
9794
9770
  });
9795
9771
  }, 'Call.startVideo');
9796
9772
  }
9797
9773
  case 'stopVideo': {
9798
9774
  return this._context.withAsyncErrorTeedToState(function (...args) {
9799
- return __awaiter$i(this, void 0, void 0, function* () {
9775
+ return __awaiter$j(this, void 0, void 0, function* () {
9800
9776
  return yield target.stopVideo(...args);
9801
9777
  });
9802
9778
  }, 'Call.stopVideo');
9803
9779
  }
9804
9780
  case 'startScreenSharing': {
9805
9781
  return this._context.withAsyncErrorTeedToState(function (...args) {
9806
- return __awaiter$i(this, void 0, void 0, function* () {
9782
+ return __awaiter$j(this, void 0, void 0, function* () {
9807
9783
  return yield target.startScreenSharing(...args);
9808
9784
  });
9809
9785
  }, 'Call.startScreenSharing');
9810
9786
  }
9811
9787
  case 'stopScreenSharing': {
9812
9788
  return this._context.withAsyncErrorTeedToState(function (...args) {
9813
- return __awaiter$i(this, void 0, void 0, function* () {
9789
+ return __awaiter$j(this, void 0, void 0, function* () {
9814
9790
  return yield target.stopScreenSharing(...args);
9815
9791
  });
9816
9792
  }, 'Call.stopScreenSharing');
9817
9793
  }
9818
9794
  case 'hold': {
9819
9795
  return this._context.withAsyncErrorTeedToState(function (...args) {
9820
- return __awaiter$i(this, void 0, void 0, function* () {
9796
+ return __awaiter$j(this, void 0, void 0, function* () {
9821
9797
  return yield target.hold(...args);
9822
9798
  });
9823
9799
  }, 'Call.hold');
9824
9800
  }
9825
9801
  case 'resume': {
9826
9802
  return this._context.withAsyncErrorTeedToState(function (...args) {
9827
- return __awaiter$i(this, void 0, void 0, function* () {
9803
+ return __awaiter$j(this, void 0, void 0, function* () {
9828
9804
  return yield target.resume(...args);
9829
9805
  });
9830
9806
  }, 'Call.resume');
9831
9807
  }
9832
9808
  case 'addParticipant': {
9833
9809
  return this._context.withAsyncErrorTeedToState(function (...args) {
9834
- return __awaiter$i(this, void 0, void 0, function* () {
9810
+ return __awaiter$j(this, void 0, void 0, function* () {
9835
9811
  return yield target.addParticipant(...args);
9836
9812
  });
9837
9813
  }, 'Call.addParticipant');
@@ -10039,7 +10015,7 @@ class RemoteVideoStreamSubscriber {
10039
10015
 
10040
10016
  // Copyright (c) Microsoft Corporation.
10041
10017
  // Licensed under the MIT license.
10042
- var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10018
+ var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10043
10019
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10044
10020
  return new (P || (P = Promise))(function (resolve, reject) {
10045
10021
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -10049,7 +10025,7 @@ var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments,
10049
10025
  });
10050
10026
  };
10051
10027
  function createViewRemoteVideo(context, internalContext, callId, participantId, stream, options) {
10052
- return __awaiter$h(this, void 0, void 0, function* () {
10028
+ return __awaiter$i(this, void 0, void 0, function* () {
10053
10029
  // Render RemoteVideoStream that is part of a Call
10054
10030
  const streamId = stream.id;
10055
10031
  let participantKey;
@@ -10157,7 +10133,7 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
10157
10133
  });
10158
10134
  }
10159
10135
  function createViewLocalVideo(context, internalContext, callId, options) {
10160
- return __awaiter$h(this, void 0, void 0, function* () {
10136
+ return __awaiter$i(this, void 0, void 0, function* () {
10161
10137
  _logEvent(callingStatefulLogger, {
10162
10138
  name: EventNames.START_LOCAL_STREAM_RENDERING,
10163
10139
  level: 'info',
@@ -10273,7 +10249,7 @@ function createViewLocalVideo(context, internalContext, callId, options) {
10273
10249
  });
10274
10250
  }
10275
10251
  function createViewUnparentedVideo(context, internalContext, stream, options) {
10276
- return __awaiter$h(this, void 0, void 0, function* () {
10252
+ return __awaiter$i(this, void 0, void 0, function* () {
10277
10253
  const renderInfo = internalContext.getUnparentedRenderInfo(stream);
10278
10254
  if (renderInfo && renderInfo.status === 'Rendered') {
10279
10255
  console.warn('Unparented LocalVideoStream is already rendered');
@@ -10833,7 +10809,7 @@ class CallSubscriber {
10833
10809
 
10834
10810
  // Copyright (c) Microsoft Corporation.
10835
10811
  // Licensed under the MIT license.
10836
- var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10812
+ var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10837
10813
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10838
10814
  return new (P || (P = Promise))(function (resolve, reject) {
10839
10815
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -10853,14 +10829,14 @@ class ProxyIncomingCall {
10853
10829
  switch (prop) {
10854
10830
  case 'accept': {
10855
10831
  return this._context.withAsyncErrorTeedToState(function (...args) {
10856
- return __awaiter$g(this, void 0, void 0, function* () {
10832
+ return __awaiter$h(this, void 0, void 0, function* () {
10857
10833
  return yield target.accept(...args);
10858
10834
  });
10859
10835
  }, 'IncomingCall.accept');
10860
10836
  }
10861
10837
  case 'reject': {
10862
10838
  return this._context.withAsyncErrorTeedToState(function (...args) {
10863
- return __awaiter$g(this, void 0, void 0, function* () {
10839
+ return __awaiter$h(this, void 0, void 0, function* () {
10864
10840
  return yield target.reject(...args);
10865
10841
  });
10866
10842
  }, 'IncomingCall.reject');
@@ -11198,7 +11174,7 @@ class InternalCallContext {
11198
11174
 
11199
11175
  // Copyright (c) Microsoft Corporation.
11200
11176
  // Licensed under the MIT license.
11201
- var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11177
+ var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11202
11178
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11203
11179
  return new (P || (P = Promise))(function (resolve, reject) {
11204
11180
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -11220,7 +11196,7 @@ class ProxyCallClient {
11220
11196
  get(target, prop) {
11221
11197
  switch (prop) {
11222
11198
  case 'createCallAgent': {
11223
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$f(this, void 0, void 0, function* () {
11199
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$g(this, void 0, void 0, function* () {
11224
11200
  // createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
11225
11201
  // callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
11226
11202
  // callAgent if the createCallAgent succeeds.
@@ -11233,7 +11209,7 @@ class ProxyCallClient {
11233
11209
  }), 'CallClient.createCallAgent');
11234
11210
  }
11235
11211
  case 'getDeviceManager': {
11236
- return this._context.withAsyncErrorTeedToState(() => __awaiter$f(this, void 0, void 0, function* () {
11212
+ return this._context.withAsyncErrorTeedToState(() => __awaiter$g(this, void 0, void 0, function* () {
11237
11213
  // As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
11238
11214
  // DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
11239
11215
  // throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
@@ -11356,7 +11332,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
11356
11332
 
11357
11333
  // Copyright (c) Microsoft Corporation.
11358
11334
  // Licensed under the MIT license.
11359
- var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11335
+ var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11360
11336
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11361
11337
  return new (P || (P = Promise))(function (resolve, reject) {
11362
11338
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -11631,7 +11607,7 @@ class ChatContext$1 {
11631
11607
  * @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
11632
11608
  */
11633
11609
  withAsyncErrorTeedToState(f, target) {
11634
- return (...args) => __awaiter$e(this, void 0, void 0, function* () {
11610
+ return (...args) => __awaiter$f(this, void 0, void 0, function* () {
11635
11611
  try {
11636
11612
  return yield f(...args);
11637
11613
  }
@@ -11738,7 +11714,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
11738
11714
 
11739
11715
  // Copyright (c) Microsoft Corporation.
11740
11716
  // Licensed under the MIT license.
11741
- var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11717
+ var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11742
11718
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11743
11719
  return new (P || (P = Promise))(function (resolve, reject) {
11744
11720
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -11822,7 +11798,7 @@ class EventSubscriber {
11822
11798
  this.fetchLastParticipantMessage(event.threadId, 'participantAdded');
11823
11799
  };
11824
11800
  // This is a hot fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK
11825
- this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$d(this, void 0, void 0, function* () {
11801
+ this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$e(this, void 0, void 0, function* () {
11826
11802
  var e_1, _a;
11827
11803
  try {
11828
11804
  for (var _b = __asyncValues$1(this.chatClient
@@ -11908,7 +11884,7 @@ class EventSubscriber {
11908
11884
 
11909
11885
  // Copyright (c) Microsoft Corporation.
11910
11886
  // Licensed under the MIT license.
11911
- var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11887
+ var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11912
11888
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11913
11889
  return new (P || (P = Promise))(function (resolve, reject) {
11914
11890
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -11930,7 +11906,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
11930
11906
  const threadsIterator = iteratorCreator(...args);
11931
11907
  return {
11932
11908
  next() {
11933
- return __awaiter$c(this, void 0, void 0, function* () {
11909
+ return __awaiter$d(this, void 0, void 0, function* () {
11934
11910
  const result = yield threadsIterator.next();
11935
11911
  if (!result.done && result.value) {
11936
11912
  decorateFn(result.value, context);
@@ -11945,7 +11921,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
11945
11921
  const pages = threadsIterator.byPage(settings);
11946
11922
  return {
11947
11923
  next() {
11948
- return __awaiter$c(this, void 0, void 0, function* () {
11924
+ return __awaiter$d(this, void 0, void 0, function* () {
11949
11925
  const result = yield pages.next();
11950
11926
  const page = result.value;
11951
11927
  if (!result.done && result.value) {
@@ -12029,7 +12005,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
12029
12005
 
12030
12006
  // Copyright (c) Microsoft Corporation.
12031
12007
  // Licensed under the MIT license.
12032
- var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12008
+ var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12033
12009
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12034
12010
  return new (P || (P = Promise))(function (resolve, reject) {
12035
12011
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -12048,14 +12024,14 @@ class ProxyChatThreadClient {
12048
12024
  return createDecoratedListMessages(chatThreadClient, this._context);
12049
12025
  }
12050
12026
  case 'getMessage': {
12051
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12027
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12052
12028
  const message = yield chatThreadClient.getMessage(...args);
12053
12029
  this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
12054
12030
  return message;
12055
12031
  }), 'ChatThreadClient.getMessage');
12056
12032
  }
12057
12033
  case 'sendMessage': {
12058
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12034
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12059
12035
  // Retry logic?
12060
12036
  const [request, options] = args;
12061
12037
  const { content } = request;
@@ -12095,7 +12071,7 @@ class ProxyChatThreadClient {
12095
12071
  }), 'ChatThreadClient.sendMessage');
12096
12072
  }
12097
12073
  case 'addParticipants': {
12098
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12074
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12099
12075
  const result = yield chatThreadClient.addParticipants(...args);
12100
12076
  const [addRequest] = args;
12101
12077
  const participantsToAdd = addRequest.participants;
@@ -12104,7 +12080,7 @@ class ProxyChatThreadClient {
12104
12080
  }), 'ChatThreadClient.addParticipants');
12105
12081
  }
12106
12082
  case 'deleteMessage': {
12107
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12083
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12108
12084
  // DeleteMessage is able to either delete local one(for failed message) or synced message
12109
12085
  const [messageId] = args;
12110
12086
  if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
@@ -12122,7 +12098,7 @@ class ProxyChatThreadClient {
12122
12098
  return createDecoratedListReadReceipts(chatThreadClient, this._context);
12123
12099
  }
12124
12100
  case 'removeParticipant': {
12125
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12101
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12126
12102
  const result = yield chatThreadClient.removeParticipant(...args);
12127
12103
  const [removeIdentifier] = args;
12128
12104
  this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
@@ -12130,7 +12106,7 @@ class ProxyChatThreadClient {
12130
12106
  }), 'ChatThreadClient.removeParticipant');
12131
12107
  }
12132
12108
  case 'updateMessage': {
12133
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12109
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12134
12110
  const result = yield chatThreadClient.updateMessage(...args);
12135
12111
  const [messageId, updateOption] = args;
12136
12112
  this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
@@ -12138,7 +12114,7 @@ class ProxyChatThreadClient {
12138
12114
  }), 'ChatThreadClient.updateMessage');
12139
12115
  }
12140
12116
  case 'updateTopic': {
12141
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12117
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12142
12118
  const result = yield chatThreadClient.updateTopic(...args);
12143
12119
  const [topic] = args;
12144
12120
  this._context.updateThreadTopic(chatThreadClient.threadId, topic);
@@ -12146,7 +12122,7 @@ class ProxyChatThreadClient {
12146
12122
  }), 'ChatThreadClient.updateTopic');
12147
12123
  }
12148
12124
  case 'getProperties': {
12149
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12125
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12150
12126
  const result = yield chatThreadClient.getProperties(...args);
12151
12127
  this._context.updateThread(chatThreadClient.threadId, result);
12152
12128
  return result;
@@ -12183,7 +12159,7 @@ const createDecoratedListThreads = (chatClient, context) => {
12183
12159
 
12184
12160
  // Copyright (c) Microsoft Corporation.
12185
12161
  // Licensed under the MIT license.
12186
- var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12162
+ var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12187
12163
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12188
12164
  return new (P || (P = Promise))(function (resolve, reject) {
12189
12165
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -12202,7 +12178,7 @@ const proxyChatClient = {
12202
12178
  switch (prop) {
12203
12179
  case 'createChatThread': {
12204
12180
  return context.withAsyncErrorTeedToState(function (...args) {
12205
- return __awaiter$a(this, void 0, void 0, function* () {
12181
+ return __awaiter$b(this, void 0, void 0, function* () {
12206
12182
  const result = yield chatClient.createChatThread(...args);
12207
12183
  const thread = result.chatThread;
12208
12184
  if (thread) {
@@ -12215,7 +12191,7 @@ const proxyChatClient = {
12215
12191
  }
12216
12192
  case 'deleteChatThread': {
12217
12193
  return context.withAsyncErrorTeedToState(function (...args) {
12218
- return __awaiter$a(this, void 0, void 0, function* () {
12194
+ return __awaiter$b(this, void 0, void 0, function* () {
12219
12195
  const result = yield chatClient.deleteChatThread(...args);
12220
12196
  context.deleteThread(args[0]);
12221
12197
  return result;
@@ -12235,7 +12211,7 @@ const proxyChatClient = {
12235
12211
  }
12236
12212
  case 'startRealtimeNotifications': {
12237
12213
  return context.withAsyncErrorTeedToState(function (...args) {
12238
- return __awaiter$a(this, void 0, void 0, function* () {
12214
+ return __awaiter$b(this, void 0, void 0, function* () {
12239
12215
  const ret = yield chatClient.startRealtimeNotifications(...args);
12240
12216
  if (!receiver.eventSubscriber) {
12241
12217
  receiver.eventSubscriber = new EventSubscriber(chatClient, context);
@@ -12246,7 +12222,7 @@ const proxyChatClient = {
12246
12222
  }
12247
12223
  case 'stopRealtimeNotifications': {
12248
12224
  return context.withAsyncErrorTeedToState(function (...args) {
12249
- return __awaiter$a(this, void 0, void 0, function* () {
12225
+ return __awaiter$b(this, void 0, void 0, function* () {
12250
12226
  const ret = yield chatClient.stopRealtimeNotifications(...args);
12251
12227
  if (receiver.eventSubscriber) {
12252
12228
  receiver.eventSubscriber.unsubscribe();
@@ -12830,7 +12806,7 @@ const convertObservableFileUploadToFileUploadsUiState = (fileUploads) => {
12830
12806
 
12831
12807
  // Copyright (c) Microsoft Corporation.
12832
12808
  // Licensed under the MIT license.
12833
- var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12809
+ var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12834
12810
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12835
12811
  return new (P || (P = Promise))(function (resolve, reject) {
12836
12812
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -12956,9 +12932,9 @@ class AzureCommunicationChatAdapter {
12956
12932
  this.unsubscribeAllEvents();
12957
12933
  }
12958
12934
  fetchInitialData() {
12959
- return __awaiter$9(this, void 0, void 0, function* () {
12935
+ return __awaiter$a(this, void 0, void 0, function* () {
12960
12936
  // If get properties fails we dont want to try to get the participants after.
12961
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
12937
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
12962
12938
  var e_1, _a;
12963
12939
  yield this.chatThreadClient.getProperties();
12964
12940
  try {
@@ -12992,8 +12968,8 @@ class AzureCommunicationChatAdapter {
12992
12968
  this.context.offStateChange(handler);
12993
12969
  }
12994
12970
  sendMessage(content, options = {}) {
12995
- return __awaiter$9(this, void 0, void 0, function* () {
12996
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
12971
+ return __awaiter$a(this, void 0, void 0, function* () {
12972
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
12997
12973
  /* @conditional-compile-remove(file-sharing) */
12998
12974
  options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
12999
12975
  /* @conditional-compile-remove(file-sharing) */
@@ -13010,49 +12986,49 @@ class AzureCommunicationChatAdapter {
13010
12986
  });
13011
12987
  }
13012
12988
  sendReadReceipt(chatMessageId) {
13013
- return __awaiter$9(this, void 0, void 0, function* () {
13014
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
12989
+ return __awaiter$a(this, void 0, void 0, function* () {
12990
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
13015
12991
  yield this.handlers.onMessageSeen(chatMessageId);
13016
12992
  }));
13017
12993
  });
13018
12994
  }
13019
12995
  sendTypingIndicator() {
13020
- return __awaiter$9(this, void 0, void 0, function* () {
12996
+ return __awaiter$a(this, void 0, void 0, function* () {
13021
12997
  yield this.handlers.onTyping();
13022
12998
  });
13023
12999
  }
13024
13000
  removeParticipant(userId) {
13025
- return __awaiter$9(this, void 0, void 0, function* () {
13026
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
13001
+ return __awaiter$a(this, void 0, void 0, function* () {
13002
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
13027
13003
  yield this.handlers.onRemoveParticipant(userId);
13028
13004
  }));
13029
13005
  });
13030
13006
  }
13031
13007
  setTopic(topicName) {
13032
- return __awaiter$9(this, void 0, void 0, function* () {
13033
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
13008
+ return __awaiter$a(this, void 0, void 0, function* () {
13009
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
13034
13010
  yield this.handlers.updateThreadTopicName(topicName);
13035
13011
  }));
13036
13012
  });
13037
13013
  }
13038
13014
  loadPreviousChatMessages(messagesToLoad) {
13039
- return __awaiter$9(this, void 0, void 0, function* () {
13040
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
13015
+ return __awaiter$a(this, void 0, void 0, function* () {
13016
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
13041
13017
  return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
13042
13018
  }));
13043
13019
  });
13044
13020
  }
13045
13021
  updateMessage(messageId, content, metadata, options) {
13046
- return __awaiter$9(this, void 0, void 0, function* () {
13047
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
13022
+ return __awaiter$a(this, void 0, void 0, function* () {
13023
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
13048
13024
  /* @conditional-compile-remove(file-sharing) */
13049
13025
  return yield this.handlers.onUpdateMessage(messageId, content, metadata, options);
13050
13026
  }));
13051
13027
  });
13052
13028
  }
13053
13029
  deleteMessage(messageId) {
13054
- return __awaiter$9(this, void 0, void 0, function* () {
13055
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
13030
+ return __awaiter$a(this, void 0, void 0, function* () {
13031
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
13056
13032
  return yield this.handlers.onDeleteMessage(messageId);
13057
13033
  }));
13058
13034
  });
@@ -13133,7 +13109,7 @@ class AzureCommunicationChatAdapter {
13133
13109
  this.emitter.off(event, listener);
13134
13110
  }
13135
13111
  asyncTeeErrorToEventEmitter(f) {
13136
- return __awaiter$9(this, void 0, void 0, function* () {
13112
+ return __awaiter$a(this, void 0, void 0, function* () {
13137
13113
  try {
13138
13114
  return yield f();
13139
13115
  }
@@ -13175,7 +13151,7 @@ const convertEventType = (type) => {
13175
13151
  *
13176
13152
  * @public
13177
13153
  */
13178
- const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$9(void 0, void 0, void 0, function* () {
13154
+ const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$a(void 0, void 0, void 0, function* () {
13179
13155
  const chatClient = createStatefulChatClient({
13180
13156
  userId,
13181
13157
  displayName,
@@ -13238,7 +13214,7 @@ beforeDispose) => {
13238
13214
  if (!credential || !displayName || !endpoint || !threadId || !userId) {
13239
13215
  return;
13240
13216
  }
13241
- (() => __awaiter$9(void 0, void 0, void 0, function* () {
13217
+ (() => __awaiter$a(void 0, void 0, void 0, function* () {
13242
13218
  if (adapterRef.current) {
13243
13219
  // Dispose the old adapter when a new one is created.
13244
13220
  //
@@ -13270,7 +13246,7 @@ beforeDispose) => {
13270
13246
  // Dispose any existing adapter when the component unmounts.
13271
13247
  React.useEffect(() => {
13272
13248
  return () => {
13273
- (() => __awaiter$9(void 0, void 0, void 0, function* () {
13249
+ (() => __awaiter$a(void 0, void 0, void 0, function* () {
13274
13250
  if (adapterRef.current) {
13275
13251
  if (beforeDisposeRef.current) {
13276
13252
  yield beforeDisposeRef.current(adapterRef.current);
@@ -13291,7 +13267,7 @@ beforeDispose) => {
13291
13267
  *
13292
13268
  * @public
13293
13269
  */
13294
- const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$9(void 0, void 0, void 0, function* () {
13270
+ const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$a(void 0, void 0, void 0, function* () {
13295
13271
  return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);
13296
13272
  });
13297
13273
  const isChatError = (e) => {
@@ -13472,7 +13448,7 @@ const sendboxContainerStyles = {
13472
13448
 
13473
13449
  // Copyright (c) Microsoft Corporation.
13474
13450
  // Licensed under the MIT license.
13475
- var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
13451
+ var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
13476
13452
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13477
13453
  return new (P || (P = Promise))(function (resolve, reject) {
13478
13454
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -13493,7 +13469,7 @@ const AvatarPersona = (props) => {
13493
13469
  const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
13494
13470
  const [data, setData] = React.useState();
13495
13471
  React.useEffect(() => {
13496
- (() => __awaiter$8(void 0, void 0, void 0, function* () {
13472
+ (() => __awaiter$9(void 0, void 0, void 0, function* () {
13497
13473
  if (dataProvider && userId) {
13498
13474
  const newData = yield dataProvider(userId);
13499
13475
  if (avatarDeepDifferenceCheck(data, newData)) {
@@ -14168,7 +14144,7 @@ const getCallCompositePage = (call, previousCall) => {
14168
14144
 
14169
14145
  // Copyright (c) Microsoft Corporation.
14170
14146
  // Licensed under the MIT license.
14171
- var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
14147
+ var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
14172
14148
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14173
14149
  return new (P || (P = Promise))(function (resolve, reject) {
14174
14150
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -14187,68 +14163,68 @@ _component) => {
14187
14163
  return createCompositeHandlers(useAdapter());
14188
14164
  };
14189
14165
  const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
14190
- onCreateLocalStreamView: (options) => __awaiter$7(void 0, void 0, void 0, function* () {
14166
+ onCreateLocalStreamView: (options) => __awaiter$8(void 0, void 0, void 0, function* () {
14191
14167
  return yield adapter.createStreamView(undefined, options);
14192
14168
  }),
14193
- onCreateRemoteStreamView: (userId, options) => __awaiter$7(void 0, void 0, void 0, function* () {
14169
+ onCreateRemoteStreamView: (userId, options) => __awaiter$8(void 0, void 0, void 0, function* () {
14194
14170
  return yield adapter.createStreamView(userId, options);
14195
14171
  }),
14196
- onHangUp: () => __awaiter$7(void 0, void 0, void 0, function* () {
14172
+ onHangUp: () => __awaiter$8(void 0, void 0, void 0, function* () {
14197
14173
  yield adapter.leaveCall();
14198
14174
  }),
14199
14175
  /* @conditional-compile-remove(PSTN-calls) */
14200
- onToggleHold: () => __awaiter$7(void 0, void 0, void 0, function* () {
14176
+ onToggleHold: () => __awaiter$8(void 0, void 0, void 0, function* () {
14201
14177
  var _a;
14202
14178
  return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold' ? yield adapter.resumeCall() : yield adapter.holdCall();
14203
14179
  }),
14204
14180
  /* @conditional-compile-remove(PSTN-calls) */
14205
- onAddParticipant: (participant, options) => __awaiter$7(void 0, void 0, void 0, function* () {
14181
+ onAddParticipant: (participant, options) => __awaiter$8(void 0, void 0, void 0, function* () {
14206
14182
  return yield adapter.addParticipant(participant, options);
14207
14183
  }),
14208
- onRemoveParticipant: (userId) => __awaiter$7(void 0, void 0, void 0, function* () {
14184
+ onRemoveParticipant: (userId) => __awaiter$8(void 0, void 0, void 0, function* () {
14209
14185
  yield adapter.removeParticipant(userId);
14210
14186
  }),
14211
- onSelectCamera: (deviceInfo, options) => __awaiter$7(void 0, void 0, void 0, function* () {
14187
+ onSelectCamera: (deviceInfo, options) => __awaiter$8(void 0, void 0, void 0, function* () {
14212
14188
  yield adapter.setCamera(deviceInfo, options);
14213
14189
  }),
14214
- onSelectMicrophone: (deviceInfo) => __awaiter$7(void 0, void 0, void 0, function* () {
14190
+ onSelectMicrophone: (deviceInfo) => __awaiter$8(void 0, void 0, void 0, function* () {
14215
14191
  yield adapter.setMicrophone(deviceInfo);
14216
14192
  }),
14217
- onSelectSpeaker: (deviceInfo) => __awaiter$7(void 0, void 0, void 0, function* () {
14193
+ onSelectSpeaker: (deviceInfo) => __awaiter$8(void 0, void 0, void 0, function* () {
14218
14194
  yield adapter.setSpeaker(deviceInfo);
14219
14195
  }),
14220
14196
  onStartCall: (participants, options) => {
14221
14197
  const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));
14222
14198
  return adapter.startCall(rawIds, options);
14223
14199
  },
14224
- onStartScreenShare: () => __awaiter$7(void 0, void 0, void 0, function* () {
14200
+ onStartScreenShare: () => __awaiter$8(void 0, void 0, void 0, function* () {
14225
14201
  yield adapter.startScreenShare();
14226
14202
  }),
14227
- onStopScreenShare: () => __awaiter$7(void 0, void 0, void 0, function* () {
14203
+ onStopScreenShare: () => __awaiter$8(void 0, void 0, void 0, function* () {
14228
14204
  yield adapter.stopScreenShare();
14229
14205
  }),
14230
- onToggleCamera: (options) => __awaiter$7(void 0, void 0, void 0, function* () {
14206
+ onToggleCamera: (options) => __awaiter$8(void 0, void 0, void 0, function* () {
14231
14207
  isCameraOn(adapter.getState()) ? yield adapter.stopCamera() : yield adapter.startCamera(options);
14232
14208
  }),
14233
- onToggleMicrophone: () => __awaiter$7(void 0, void 0, void 0, function* () {
14209
+ onToggleMicrophone: () => __awaiter$8(void 0, void 0, void 0, function* () {
14234
14210
  var _b;
14235
14211
  return ((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.isMuted) ? yield adapter.unmute() : yield adapter.mute();
14236
14212
  }),
14237
- onToggleScreenShare: () => __awaiter$7(void 0, void 0, void 0, function* () {
14213
+ onToggleScreenShare: () => __awaiter$8(void 0, void 0, void 0, function* () {
14238
14214
  var _c;
14239
14215
  return ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.isScreenSharingOn)
14240
14216
  ? yield adapter.stopScreenShare()
14241
14217
  : yield adapter.startScreenShare();
14242
14218
  }),
14243
- onStartLocalVideo: () => __awaiter$7(void 0, void 0, void 0, function* () {
14219
+ onStartLocalVideo: () => __awaiter$8(void 0, void 0, void 0, function* () {
14244
14220
  if (adapter.getState().call) {
14245
14221
  return adapter.startCamera();
14246
14222
  }
14247
14223
  }),
14248
- onDisposeLocalStreamView: () => __awaiter$7(void 0, void 0, void 0, function* () {
14224
+ onDisposeLocalStreamView: () => __awaiter$8(void 0, void 0, void 0, function* () {
14249
14225
  return adapter.disposeStreamView();
14250
14226
  }),
14251
- onDisposeRemoteStreamView: (userId) => __awaiter$7(void 0, void 0, void 0, function* () {
14227
+ onDisposeRemoteStreamView: (userId) => __awaiter$8(void 0, void 0, void 0, function* () {
14252
14228
  return adapter.disposeStreamView(userId);
14253
14229
  })
14254
14230
  }));
@@ -15288,7 +15264,7 @@ const localPreviewTileStyle = {
15288
15264
 
15289
15265
  // Copyright (c) Microsoft Corporation.
15290
15266
  // Licensed under the MIT license.
15291
- var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
15267
+ var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
15292
15268
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15293
15269
  return new (P || (P = Promise))(function (resolve, reject) {
15294
15270
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -15308,7 +15284,7 @@ const LocalPreview = (props) => {
15308
15284
  const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector$1(devicePermissionSelector);
15309
15285
  const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
15310
15286
  const adapter = useAdapter();
15311
- const onToggleMic = React.useCallback(() => __awaiter$6(void 0, void 0, void 0, function* () {
15287
+ const onToggleMic = React.useCallback(() => __awaiter$7(void 0, void 0, void 0, function* () {
15312
15288
  isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();
15313
15289
  }), [adapter, isLocalMicrophoneEnabled]);
15314
15290
  const theme = useTheme();
@@ -15639,7 +15615,7 @@ const mainScreenContainerStyleMobile = react.mergeStyles(Object.assign(Object.as
15639
15615
 
15640
15616
  // Copyright (c) Microsoft Corporation.
15641
15617
  // Licensed under the MIT license.
15642
- var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
15618
+ var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
15643
15619
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15644
15620
  return new (P || (P = Promise))(function (resolve, reject) {
15645
15621
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -15686,7 +15662,7 @@ const MainScreen = (props) => {
15686
15662
  const CallComposite = (props) => {
15687
15663
  const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop' } = props;
15688
15664
  React.useEffect(() => {
15689
- (() => __awaiter$5(void 0, void 0, void 0, function* () {
15665
+ (() => __awaiter$6(void 0, void 0, void 0, function* () {
15690
15666
  yield adapter.askDevicePermission({ video: true, audio: true });
15691
15667
  adapter.queryCameras();
15692
15668
  adapter.queryMicrophones();
@@ -15777,7 +15753,7 @@ class DiagnosticsForwarder {
15777
15753
 
15778
15754
  // Copyright (c) Microsoft Corporation.
15779
15755
  // Licensed under the MIT license.
15780
- var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
15756
+ var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
15781
15757
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15782
15758
  return new (P || (P = Promise))(function (resolve, reject) {
15783
15759
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -15942,29 +15918,29 @@ class AzureCommunicationCallAdapter {
15942
15918
  this.callAgent.dispose();
15943
15919
  }
15944
15920
  queryCameras() {
15945
- return __awaiter$4(this, void 0, void 0, function* () {
15946
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
15921
+ return __awaiter$5(this, void 0, void 0, function* () {
15922
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
15947
15923
  return this.deviceManager.getCameras();
15948
15924
  }));
15949
15925
  });
15950
15926
  }
15951
15927
  queryMicrophones() {
15952
- return __awaiter$4(this, void 0, void 0, function* () {
15953
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
15928
+ return __awaiter$5(this, void 0, void 0, function* () {
15929
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
15954
15930
  return this.deviceManager.getMicrophones();
15955
15931
  }));
15956
15932
  });
15957
15933
  }
15958
15934
  querySpeakers() {
15959
- return __awaiter$4(this, void 0, void 0, function* () {
15960
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
15935
+ return __awaiter$5(this, void 0, void 0, function* () {
15936
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
15961
15937
  return this.deviceManager.isSpeakerSelectionAvailable ? this.deviceManager.getSpeakers() : [];
15962
15938
  }));
15963
15939
  });
15964
15940
  }
15965
15941
  askDevicePermission(constrain) {
15966
- return __awaiter$4(this, void 0, void 0, function* () {
15967
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
15942
+ return __awaiter$5(this, void 0, void 0, function* () {
15943
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
15968
15944
  yield this.deviceManager.askDevicePermission(constrain);
15969
15945
  }));
15970
15946
  });
@@ -16014,7 +15990,7 @@ class AzureCommunicationCallAdapter {
16014
15990
  });
16015
15991
  }
16016
15992
  createStreamView(remoteUserId, options) {
16017
- return __awaiter$4(this, void 0, void 0, function* () {
15993
+ return __awaiter$5(this, void 0, void 0, function* () {
16018
15994
  if (remoteUserId === undefined) {
16019
15995
  return yield this.handlers.onCreateLocalStreamView(options);
16020
15996
  }
@@ -16024,7 +16000,7 @@ class AzureCommunicationCallAdapter {
16024
16000
  });
16025
16001
  }
16026
16002
  disposeStreamView(remoteUserId) {
16027
- return __awaiter$4(this, void 0, void 0, function* () {
16003
+ return __awaiter$5(this, void 0, void 0, function* () {
16028
16004
  if (remoteUserId === undefined) {
16029
16005
  yield this.handlers.onDisposeLocalStreamView();
16030
16006
  }
@@ -16035,7 +16011,7 @@ class AzureCommunicationCallAdapter {
16035
16011
  }
16036
16012
  leaveCall() {
16037
16013
  var _a;
16038
- return __awaiter$4(this, void 0, void 0, function* () {
16014
+ return __awaiter$5(this, void 0, void 0, function* () {
16039
16015
  const callId = (_a = this.call) === null || _a === void 0 ? void 0 : _a.id;
16040
16016
  yield this.handlers.onHangUp();
16041
16017
  this.unsubscribeCallEvents();
@@ -16050,29 +16026,29 @@ class AzureCommunicationCallAdapter {
16050
16026
  });
16051
16027
  }
16052
16028
  setCamera(device, options) {
16053
- return __awaiter$4(this, void 0, void 0, function* () {
16054
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16029
+ return __awaiter$5(this, void 0, void 0, function* () {
16030
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16055
16031
  yield this.handlers.onSelectCamera(device, options);
16056
16032
  }));
16057
16033
  });
16058
16034
  }
16059
16035
  setMicrophone(device) {
16060
- return __awaiter$4(this, void 0, void 0, function* () {
16061
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16036
+ return __awaiter$5(this, void 0, void 0, function* () {
16037
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16062
16038
  yield this.handlers.onSelectMicrophone(device);
16063
16039
  }));
16064
16040
  });
16065
16041
  }
16066
16042
  setSpeaker(device) {
16067
- return __awaiter$4(this, void 0, void 0, function* () {
16068
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16043
+ return __awaiter$5(this, void 0, void 0, function* () {
16044
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16069
16045
  yield this.handlers.onSelectSpeaker(device);
16070
16046
  }));
16071
16047
  });
16072
16048
  }
16073
16049
  startCamera(options) {
16074
- return __awaiter$4(this, void 0, void 0, function* () {
16075
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16050
+ return __awaiter$5(this, void 0, void 0, function* () {
16051
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16076
16052
  if (!isCameraOn(this.getState())) {
16077
16053
  yield this.handlers.onToggleCamera(options);
16078
16054
  }
@@ -16080,8 +16056,8 @@ class AzureCommunicationCallAdapter {
16080
16056
  });
16081
16057
  }
16082
16058
  stopCamera() {
16083
- return __awaiter$4(this, void 0, void 0, function* () {
16084
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16059
+ return __awaiter$5(this, void 0, void 0, function* () {
16060
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16085
16061
  if (isCameraOn(this.getState())) {
16086
16062
  yield this.handlers.onToggleCamera();
16087
16063
  }
@@ -16089,8 +16065,8 @@ class AzureCommunicationCallAdapter {
16089
16065
  });
16090
16066
  }
16091
16067
  mute() {
16092
- return __awaiter$4(this, void 0, void 0, function* () {
16093
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16068
+ return __awaiter$5(this, void 0, void 0, function* () {
16069
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16094
16070
  var _a, _b;
16095
16071
  this.context.setIsLocalMicrophoneEnabled(false);
16096
16072
  if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && !((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
@@ -16100,8 +16076,8 @@ class AzureCommunicationCallAdapter {
16100
16076
  });
16101
16077
  }
16102
16078
  unmute() {
16103
- return __awaiter$4(this, void 0, void 0, function* () {
16104
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16079
+ return __awaiter$5(this, void 0, void 0, function* () {
16080
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16105
16081
  var _a, _b;
16106
16082
  this.context.setIsLocalMicrophoneEnabled(true);
16107
16083
  if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && ((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
@@ -16111,8 +16087,8 @@ class AzureCommunicationCallAdapter {
16111
16087
  });
16112
16088
  }
16113
16089
  startScreenShare() {
16114
- return __awaiter$4(this, void 0, void 0, function* () {
16115
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16090
+ return __awaiter$5(this, void 0, void 0, function* () {
16091
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16116
16092
  var _a;
16117
16093
  if (!((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn)) {
16118
16094
  yield this.handlers.onToggleScreenShare();
@@ -16121,8 +16097,8 @@ class AzureCommunicationCallAdapter {
16121
16097
  });
16122
16098
  }
16123
16099
  stopScreenShare() {
16124
- return __awaiter$4(this, void 0, void 0, function* () {
16125
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16100
+ return __awaiter$5(this, void 0, void 0, function* () {
16101
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16126
16102
  var _a;
16127
16103
  if ((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn) {
16128
16104
  yield this.handlers.onToggleScreenShare();
@@ -16166,20 +16142,20 @@ class AzureCommunicationCallAdapter {
16166
16142
  this.subscribeCallEvents();
16167
16143
  }
16168
16144
  removeParticipant(userId) {
16169
- return __awaiter$4(this, void 0, void 0, function* () {
16145
+ return __awaiter$5(this, void 0, void 0, function* () {
16170
16146
  this.handlers.onRemoveParticipant(userId);
16171
16147
  });
16172
16148
  }
16173
16149
  /* @conditional-compile-remove(PSTN-calls) */
16174
16150
  addParticipant(participant, options) {
16175
- return __awaiter$4(this, void 0, void 0, function* () {
16151
+ return __awaiter$5(this, void 0, void 0, function* () {
16176
16152
  this.handlers.onAddParticipant(participant, options);
16177
16153
  });
16178
16154
  }
16179
16155
  /* @conditional-compile-remove(PSTN-calls) */
16180
16156
  holdCall() {
16181
16157
  var _a;
16182
- return __awaiter$4(this, void 0, void 0, function* () {
16158
+ return __awaiter$5(this, void 0, void 0, function* () {
16183
16159
  if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) !== 'LocalHold') {
16184
16160
  this.handlers.onToggleHold();
16185
16161
  }
@@ -16188,7 +16164,7 @@ class AzureCommunicationCallAdapter {
16188
16164
  /* @conditional-compile-remove(PSTN-calls) */
16189
16165
  resumeCall() {
16190
16166
  var _a;
16191
- return __awaiter$4(this, void 0, void 0, function* () {
16167
+ return __awaiter$5(this, void 0, void 0, function* () {
16192
16168
  if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold') {
16193
16169
  this.handlers.onToggleHold();
16194
16170
  }
@@ -16262,7 +16238,7 @@ class AzureCommunicationCallAdapter {
16262
16238
  this.emitter.off(event, listener);
16263
16239
  }
16264
16240
  asyncTeeErrorToEventEmitter(f) {
16265
- return __awaiter$4(this, void 0, void 0, function* () {
16241
+ return __awaiter$5(this, void 0, void 0, function* () {
16266
16242
  try {
16267
16243
  return yield f();
16268
16244
  }
@@ -16296,7 +16272,7 @@ class AzureCommunicationCallAdapter {
16296
16272
  * @public
16297
16273
  */
16298
16274
  const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator,
16299
- /* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId }) => __awaiter$4(void 0, void 0, void 0, function* () {
16275
+ /* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId }) => __awaiter$5(void 0, void 0, void 0, function* () {
16300
16276
  const callClient = createStatefulCallClient({
16301
16277
  userId,
16302
16278
  /* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId
@@ -16358,7 +16334,7 @@ beforeDispose) => {
16358
16334
  if (!credential || !displayName || !locator || !userId) {
16359
16335
  return;
16360
16336
  }
16361
- (() => __awaiter$4(void 0, void 0, void 0, function* () {
16337
+ (() => __awaiter$5(void 0, void 0, void 0, function* () {
16362
16338
  if (adapterRef.current) {
16363
16339
  // Dispose the old adapter when a new one is created.
16364
16340
  //
@@ -16389,7 +16365,7 @@ beforeDispose) => {
16389
16365
  // Dispose any existing adapter when the component unmounts.
16390
16366
  React.useEffect(() => {
16391
16367
  return () => {
16392
- (() => __awaiter$4(void 0, void 0, void 0, function* () {
16368
+ (() => __awaiter$5(void 0, void 0, void 0, function* () {
16393
16369
  if (adapterRef.current) {
16394
16370
  if (beforeDisposeRef.current) {
16395
16371
  yield beforeDisposeRef.current(adapterRef.current);
@@ -16410,7 +16386,7 @@ beforeDispose) => {
16410
16386
  *
16411
16387
  * @public
16412
16388
  */
16413
- const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator) => __awaiter$4(void 0, void 0, void 0, function* () {
16389
+ const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator) => __awaiter$5(void 0, void 0, void 0, function* () {
16414
16390
  const deviceManager = (yield callClient.getDeviceManager());
16415
16391
  return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager);
16416
16392
  });
@@ -16856,7 +16832,7 @@ const modalLayerHostStyle = {
16856
16832
 
16857
16833
  // Copyright (c) Microsoft Corporation.
16858
16834
  // Licensed under the MIT license.
16859
- var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
16835
+ var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
16860
16836
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16861
16837
  return new (P || (P = Promise))(function (resolve, reject) {
16862
16838
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -16917,36 +16893,36 @@ class CallWithChatBackedCallAdapter {
16917
16893
  this.joinCall = (microphoneOn) => {
16918
16894
  return this.callWithChatAdapter.joinCall(microphoneOn);
16919
16895
  };
16920
- this.leaveCall = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(); });
16896
+ this.leaveCall = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(); });
16921
16897
  this.startCall = (participants, options) => {
16922
16898
  return this.callWithChatAdapter.startCall(participants, options);
16923
16899
  };
16924
- this.setCamera = (sourceId, options) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setCamera(sourceId, options); });
16925
- this.setMicrophone = (sourceId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setMicrophone(sourceId); });
16926
- this.setSpeaker = (sourceId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setSpeaker(sourceId); });
16927
- this.askDevicePermission = (constraints) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.askDevicePermission(constraints); });
16928
- this.queryCameras = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryCameras(); });
16929
- this.queryMicrophones = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryMicrophones(); });
16930
- this.querySpeakers = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.querySpeakers(); });
16931
- this.startCamera = (options) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startCamera(options); });
16932
- this.stopCamera = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopCamera(); });
16933
- this.mute = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.mute(); });
16934
- this.unmute = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.unmute(); });
16935
- this.startScreenShare = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startScreenShare(); });
16936
- this.stopScreenShare = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopScreenShare(); });
16937
- this.removeParticipant = (userId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
16938
- this.createStreamView = (remoteUserId, options) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.createStreamView(remoteUserId, options); });
16939
- this.disposeStreamView = (remoteUserId, options) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.disposeStreamView(remoteUserId, options); });
16900
+ this.setCamera = (sourceId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setCamera(sourceId, options); });
16901
+ this.setMicrophone = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setMicrophone(sourceId); });
16902
+ this.setSpeaker = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setSpeaker(sourceId); });
16903
+ this.askDevicePermission = (constraints) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.askDevicePermission(constraints); });
16904
+ this.queryCameras = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryCameras(); });
16905
+ this.queryMicrophones = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryMicrophones(); });
16906
+ this.querySpeakers = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.querySpeakers(); });
16907
+ this.startCamera = (options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startCamera(options); });
16908
+ this.stopCamera = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopCamera(); });
16909
+ this.mute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.mute(); });
16910
+ this.unmute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.unmute(); });
16911
+ this.startScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startScreenShare(); });
16912
+ this.stopScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopScreenShare(); });
16913
+ this.removeParticipant = (userId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
16914
+ this.createStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.createStreamView(remoteUserId, options); });
16915
+ this.disposeStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.disposeStreamView(remoteUserId, options); });
16940
16916
  /* @conditional-compile-remove(PSTN-calls) */
16941
- this.holdCall = () => __awaiter$3(this, void 0, void 0, function* () {
16917
+ this.holdCall = () => __awaiter$4(this, void 0, void 0, function* () {
16942
16918
  yield this.callWithChatAdapter.holdCall();
16943
16919
  });
16944
16920
  /* @conditional-compile-remove(PSTN-calls) */
16945
- this.resumeCall = () => __awaiter$3(this, void 0, void 0, function* () {
16921
+ this.resumeCall = () => __awaiter$4(this, void 0, void 0, function* () {
16946
16922
  yield this.callWithChatAdapter.resumeCall();
16947
16923
  });
16948
16924
  /* @conditional-compile-remove(PSTN-calls) */
16949
- this.addParticipant = (participant, options) => __awaiter$3(this, void 0, void 0, function* () {
16925
+ this.addParticipant = (participant, options) => __awaiter$4(this, void 0, void 0, function* () {
16950
16926
  yield this.callWithChatAdapter.addParticipant(participant, options);
16951
16927
  });
16952
16928
  this.callWithChatAdapter = callWithChatAdapter;
@@ -16967,7 +16943,7 @@ function callAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState)
16967
16943
 
16968
16944
  // Copyright (c) Microsoft Corporation.
16969
16945
  // Licensed under the MIT license.
16970
- var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
16946
+ var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
16971
16947
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16972
16948
  return new (P || (P = Promise))(function (resolve, reject) {
16973
16949
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -16988,12 +16964,12 @@ class CallWithChatBackedChatAdapter {
16988
16964
  // For onStateChange we must convert CallWithChat state to chat state. This involves creating a new handler to be passed into the onStateChange.
16989
16965
  // In order to unsubscribe the handler when offStateChange is called we must have a mapping of the original handler to the newly created handler.
16990
16966
  this.eventStore = new Map();
16991
- this.fetchInitialData = () => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.fetchInitialData(); });
16992
- this.sendMessage = (content) => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendMessage(content); });
16993
- this.sendReadReceipt = (chatMessageId) => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendReadReceipt(chatMessageId); });
16994
- this.sendTypingIndicator = () => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendTypingIndicator(); });
16995
- this.removeParticipant = (userId) => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
16996
- this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.loadPreviousChatMessages(messagesToLoad); });
16967
+ this.fetchInitialData = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.fetchInitialData(); });
16968
+ this.sendMessage = (content) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendMessage(content); });
16969
+ this.sendReadReceipt = (chatMessageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendReadReceipt(chatMessageId); });
16970
+ this.sendTypingIndicator = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendTypingIndicator(); });
16971
+ this.removeParticipant = (userId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
16972
+ this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.loadPreviousChatMessages(messagesToLoad); });
16997
16973
  this.dispose = () => this.callWithChatAdapter.dispose();
16998
16974
  this.onStateChange = (handler) => {
16999
16975
  const convertedHandler = (state) => {
@@ -17032,12 +17008,12 @@ class CallWithChatBackedChatAdapter {
17032
17008
  return this.callWithChatAdapter.off(event, listener);
17033
17009
  }
17034
17010
  };
17035
- this.updateMessage = (messageId, content, metadata) => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.updateMessage(messageId, content, metadata); });
17036
- this.deleteMessage = (messageId) => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.deleteMessage(messageId); });
17011
+ this.updateMessage = (messageId, content, metadata) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.updateMessage(messageId, content, metadata); });
17012
+ this.deleteMessage = (messageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.deleteMessage(messageId); });
17037
17013
  this.clearErrors = (errorTypes) => {
17038
17014
  throw new Error(`Method not supported in CallWithChatComposite.`);
17039
17015
  };
17040
- this.setTopic = (topicName) => __awaiter$2(this, void 0, void 0, function* () {
17016
+ this.setTopic = (topicName) => __awaiter$3(this, void 0, void 0, function* () {
17041
17017
  throw new Error(`Chat Topics are not supported in CallWithChatComposite.`);
17042
17018
  });
17043
17019
  /* @conditional-compile-remove(file-sharing) */
@@ -17225,10 +17201,9 @@ const SidePaneHeader = (props) => {
17225
17201
  iconHovered: { color: theme.palette.neutralSecondary },
17226
17202
  iconPressed: { color: theme.palette.neutralSecondary }
17227
17203
  }), [theme.palette.neutralSecondary]);
17228
- const callWithChatStrings = useCallWithChatCompositeStrings();
17229
17204
  return (React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "space-between", styles: sidePaneHeaderContainerStyles },
17230
17205
  React__default['default'].createElement(react.Stack.Item, { styles: sidePaneHeaderStyles }, props.headingText),
17231
- React__default['default'].createElement(react.CommandBarButton, { ariaLabel: callWithChatStrings.dismissSidePaneButtonLabel, styles: sidePaneCloseButtonStyles, iconProps: { iconName: 'cancel' }, onClick: props.onClose })));
17206
+ React__default['default'].createElement(react.CommandBarButton, { ariaLabel: props.strings.dismissSidePaneButtonLabel, styles: sidePaneCloseButtonStyles, iconProps: { iconName: 'cancel' }, onClick: props.onClose })));
17232
17207
  };
17233
17208
 
17234
17209
  // Copyright (c) Microsoft Corporation.
@@ -17446,7 +17421,7 @@ const copyLinkButtonStyles = {
17446
17421
  */
17447
17422
  const linkIconStyles = { marginRight: '0.5rem' };
17448
17423
 
17449
- var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
17424
+ var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
17450
17425
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17451
17426
  return new (P || (P = Promise))(function (resolve, reject) {
17452
17427
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -17459,7 +17434,7 @@ var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments,
17459
17434
  * @private
17460
17435
  */
17461
17436
  const PeoplePaneContent = (props) => {
17462
- const { callAdapter, chatAdapter, inviteLink, onFetchParticipantMenuItems, setDrawerMenuItems, strings } = props;
17437
+ const { inviteLink, onFetchParticipantMenuItems, setDrawerMenuItems, strings, onRemoveParticipant } = props;
17463
17438
  const participantListDefaultProps = usePropsFor$1(ParticipantList);
17464
17439
  const setDrawerMenuItemsForParticipant = React.useMemo(() => {
17465
17440
  return (participant) => {
@@ -17480,13 +17455,13 @@ const PeoplePaneContent = (props) => {
17480
17455
  setDrawerMenuItems
17481
17456
  ]);
17482
17457
  const participantListProps = React.useMemo(() => {
17483
- const onRemoveParticipant = (participantId) => __awaiter$1(void 0, void 0, void 0, function* () { return removeParticipantFromCallWithChat(callAdapter, chatAdapter, participantId); });
17458
+ const onRemoveAParticipant = (participantId) => __awaiter$2(void 0, void 0, void 0, function* () { return onRemoveParticipant(participantId); });
17484
17459
  return Object.assign(Object.assign({}, participantListDefaultProps), {
17485
17460
  // Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked
17486
- onRemoveParticipant: props.mobileView ? undefined : onRemoveParticipant,
17461
+ onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,
17487
17462
  // We want the drawer menu items to appear when participants in ParticipantList are clicked
17488
17463
  onParticipantClick: props.mobileView ? setDrawerMenuItemsForParticipant : undefined });
17489
- }, [participantListDefaultProps, props.mobileView, setDrawerMenuItemsForParticipant, callAdapter, chatAdapter]);
17464
+ }, [participantListDefaultProps, props.mobileView, setDrawerMenuItemsForParticipant, onRemoveParticipant]);
17490
17465
  const participantList = (React__default['default'].createElement(ParticipantListWithHeading, { isMobile: props.mobileView, participantListProps: participantListProps, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, title: props.strings.peoplePaneSubTitle }));
17491
17466
  const theme = react.useTheme();
17492
17467
  const copyLinkButtonStylesThemed = React.useMemo(() => react.concatStyleSets(copyLinkButtonStyles, {
@@ -17506,14 +17481,6 @@ const PeoplePaneContent = (props) => {
17506
17481
  React__default['default'].createElement(react.DefaultButton, { text: strings.copyInviteLinkButtonLabel, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "Link", style: linkIconStyles }), onClick: () => copy__default['default'](inviteLink), styles: copyLinkButtonStylesThemed }))),
17507
17482
  participantList));
17508
17483
  };
17509
- /**
17510
- * In a CallWithChat when a participant is removed, we must remove them from both
17511
- * the call and the chat thread.
17512
- */
17513
- const removeParticipantFromCallWithChat = (callAdapter, chatAdapter, participantId) => __awaiter$1(void 0, void 0, void 0, function* () {
17514
- yield callAdapter.removeParticipant(participantId);
17515
- yield chatAdapter.removeParticipant(participantId);
17516
- });
17517
17484
  /**
17518
17485
  * Create default contextual menu items for particant
17519
17486
  * @param participant - participant to create contextual menu items for
@@ -17522,12 +17489,12 @@ const removeParticipantFromCallWithChat = (callAdapter, chatAdapter, participant
17522
17489
  * @param localParticipantUserId - Local participant user id
17523
17490
  * @returns - IContextualMenuItem[]
17524
17491
  */
17525
- const createDefaultContextualMenuItems = (participant, callWithChatStrings, onRemoveParticipant, localParticipantUserId) => {
17492
+ const createDefaultContextualMenuItems = (participant, strings, onRemoveParticipant, localParticipantUserId) => {
17526
17493
  const menuItems = [];
17527
17494
  if ((participant === null || participant === void 0 ? void 0 : participant.userId) !== localParticipantUserId) {
17528
17495
  menuItems.push({
17529
17496
  key: 'remove',
17530
- text: callWithChatStrings.removeMenuLabel,
17497
+ text: strings.removeMenuLabel,
17531
17498
  onClick: () => {
17532
17499
  if (participant === null || participant === void 0 ? void 0 : participant.userId) {
17533
17500
  onRemoveParticipant === null || onRemoveParticipant === void 0 ? void 0 : onRemoveParticipant(participant === null || participant === void 0 ? void 0 : participant.userId);
@@ -17619,8 +17586,9 @@ const mobilePaneButtonStyles = {
17619
17586
  * @private
17620
17587
  */
17621
17588
  const TabHeader = (props) => {
17589
+ const { onClose, onChatButtonClicked, onPeopleButtonClicked, activeTab, strings } = props;
17622
17590
  const theme = useTheme();
17623
- const haveMultipleTabs = props.onChatButtonClicked && props.onPeopleButtonClicked;
17591
+ const haveMultipleTabs = onChatButtonClicked && onPeopleButtonClicked;
17624
17592
  const mobilePaneButtonStylesThemed = React.useMemo(() => {
17625
17593
  return react.concatStyleSets(mobilePaneButtonStyles, {
17626
17594
  root: {
@@ -17638,15 +17606,22 @@ const TabHeader = (props) => {
17638
17606
  }
17639
17607
  : {});
17640
17608
  }, [theme, haveMultipleTabs]);
17641
- const strings = useCallWithChatCompositeStrings();
17642
17609
  return (React__default['default'].createElement(react.Stack, { horizontal: true, grow: true, styles: mobilePaneControlBarStyle },
17643
- React__default['default'].createElement(react.DefaultButton, { ariaLabel: strings.returnToCallButtonAriaLabel, ariaDescription: strings.returnToCallButtonAriaDescription, onClick: props.onClose, styles: mobilePaneBackButtonStyles, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }), autoFocus: true }),
17644
- React__default['default'].createElement(react.Stack.Item, { grow: true }, props.onChatButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: props.onChatButtonClicked, styles: mobilePaneButtonStylesThemed, checked: props.activeTab === 'chat', role: 'tab' }, strings.chatButtonLabel))),
17645
- React__default['default'].createElement(react.Stack.Item, { grow: true }, props.onPeopleButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: props.onPeopleButtonClicked, styles: mobilePaneButtonStylesThemed, checked: props.activeTab === 'people', role: 'tab' }, strings.peopleButtonLabel))),
17610
+ React__default['default'].createElement(react.DefaultButton, { ariaLabel: strings.returnToCallButtonAriaLabel, ariaDescription: strings.returnToCallButtonAriaDescription, onClick: onClose, styles: mobilePaneBackButtonStyles, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }), autoFocus: true }),
17611
+ React__default['default'].createElement(react.Stack.Item, { grow: true }, onChatButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: onChatButtonClicked, styles: mobilePaneButtonStylesThemed, checked: activeTab === 'chat', role: 'tab' }, strings.chatButtonLabel))),
17612
+ React__default['default'].createElement(react.Stack.Item, { grow: true }, onPeopleButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: onPeopleButtonClicked, styles: mobilePaneButtonStylesThemed, checked: activeTab === 'people', role: 'tab' }, strings.peopleButtonLabel))),
17646
17613
  React__default['default'].createElement(react.DefaultButton, { styles: mobilePaneHiddenIconStyles, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }) })));
17647
17614
  };
17648
17615
 
17649
- // Copyright (c) Microsoft Corporation.
17616
+ var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
17617
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17618
+ return new (P || (P = Promise))(function (resolve, reject) {
17619
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17620
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17621
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17622
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
17623
+ });
17624
+ };
17650
17625
  /**
17651
17626
  * Pane that is used to store chat and people for CallWithChat composite
17652
17627
  * @private
@@ -17657,7 +17632,7 @@ const CallWithChatPane = (props) => {
17657
17632
  const paneStyles = hidden ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;
17658
17633
  const callWithChatStrings = useCallWithChatCompositeStrings();
17659
17634
  const theme = useTheme();
17660
- const header = props.activePane === 'none' ? null : props.mobileView ? (React__default['default'].createElement(TabHeader, Object.assign({}, props, { activeTab: props.activePane }))) : (React__default['default'].createElement(SidePaneHeader, Object.assign({}, props, { headingText: props.activePane === 'chat'
17635
+ const header = props.activePane === 'none' ? null : props.mobileView ? (React__default['default'].createElement(TabHeader, Object.assign({}, props, { strings: callWithChatStrings, activeTab: props.activePane }))) : (React__default['default'].createElement(SidePaneHeader, Object.assign({}, props, { strings: callWithChatStrings, headingText: props.activePane === 'chat'
17661
17636
  ? callWithChatStrings.chatPaneTitle
17662
17637
  : props.activePane === 'people'
17663
17638
  ? callWithChatStrings.peoplePaneTitle
@@ -17669,8 +17644,16 @@ const CallWithChatPane = (props) => {
17669
17644
  /* @conditional-compile-remove(file-sharing) */
17670
17645
  fileSharing: props.fileSharing
17671
17646
  }, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData })));
17647
+ /**
17648
+ * In a CallWithChat when a participant is removed, we must remove them from both
17649
+ * the call and the chat thread.
17650
+ */
17651
+ const removeParticipantFromCallWithChat = (participantId) => __awaiter$1(void 0, void 0, void 0, function* () {
17652
+ yield props.callAdapter.removeParticipant(participantId);
17653
+ yield props.chatAdapter.removeParticipant(participantId);
17654
+ });
17672
17655
  const peopleContent = (React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
17673
- React__default['default'].createElement(PeoplePaneContent, Object.assign({}, props, { setDrawerMenuItems: setDrawerMenuItems, strings: callWithChatStrings }))));
17656
+ React__default['default'].createElement(PeoplePaneContent, Object.assign({}, props, { onRemoveParticipant: removeParticipantFromCallWithChat, setDrawerMenuItems: setDrawerMenuItems, strings: callWithChatStrings }))));
17674
17657
  // Use document.getElementById until Fluent's Stack supports componentRef property: https://github.com/microsoft/fluentui/issues/20410
17675
17658
  const modalLayerHostElement = document.getElementById(props.modalLayerHostId);
17676
17659
  const modalHostRef = React.useRef(modalLayerHostElement);