@azure/communication-react 1.16.0-alpha-202404170013 → 1.16.0-alpha-202404190012

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 (119) hide show
  1. package/dist/communication-react.d.ts +1 -1
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DZWR3o3q.js → ChatMessageComponentAsRichTextEditBox-WGqg2woK.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DZWR3o3q.js.map → ChatMessageComponentAsRichTextEditBox-WGqg2woK.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{index-pky6z3v4.js → index-oaEwmItW.js} +175 -232
  5. package/dist/dist-cjs/communication-react/index-oaEwmItW.js.map +1 -0
  6. package/dist/dist-cjs/communication-react/index.js +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  8. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -1
  10. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +0 -2
  12. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  13. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -2
  14. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -2
  16. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +3 -13
  18. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +1 -3
  20. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +2 -1
  22. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +6 -13
  23. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +2 -10
  25. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  26. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  27. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +0 -4
  28. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  29. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +0 -3
  30. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  31. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -1
  32. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  33. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +68 -4
  34. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
  35. package/dist/dist-esm/calling-stateful-client/src/ReactionSubscriber.js +0 -1
  36. package/dist/dist-esm/calling-stateful-client/src/ReactionSubscriber.js.map +1 -1
  37. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  38. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  39. package/dist/dist-esm/react-components/src/components/Drawer/ReactionDrawerMenuItem.js +0 -8
  40. package/dist/dist-esm/react-components/src/components/Drawer/ReactionDrawerMenuItem.js.map +1 -1
  41. package/dist/dist-esm/react-components/src/components/Drawer/index.js +0 -1
  42. package/dist/dist-esm/react-components/src/components/Drawer/index.js.map +1 -1
  43. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +3 -11
  44. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
  45. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js +0 -7
  46. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js.map +1 -1
  47. package/dist/dist-esm/react-components/src/components/ReactionButton.js +0 -10
  48. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  49. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +2 -7
  50. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  51. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +9 -2
  52. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +44 -2
  53. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -1
  54. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js +0 -6
  55. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js.map +1 -1
  56. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js +0 -10
  57. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js +3 -14
  59. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.js +0 -6
  61. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.js.map +1 -1
  62. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +0 -2
  63. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  64. package/dist/dist-esm/react-components/src/components/VideoGallery.js +6 -21
  65. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  66. package/dist/dist-esm/react-components/src/components/VideoTile.js +1 -4
  67. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  68. package/dist/dist-esm/react-components/src/components/index.js +0 -1
  69. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  70. package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js +0 -7
  71. package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js.map +1 -1
  72. package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.js +0 -17
  73. package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.js.map +1 -1
  74. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +2 -1
  75. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
  76. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +0 -4
  77. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  78. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  79. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  80. package/dist/dist-esm/react-components/src/theming/icons.js +1 -7
  81. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  82. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
  83. package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -1
  84. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  85. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +1 -3
  86. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  87. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -1
  88. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  89. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +1 -3
  90. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  91. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +0 -11
  92. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  93. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +2 -6
  94. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  95. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +1 -5
  96. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  97. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Reaction.js +0 -6
  98. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Reaction.js.map +1 -1
  99. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +0 -1
  100. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  101. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +7 -1
  102. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +26 -4
  103. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  104. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  105. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -2
  106. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  107. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +0 -1
  108. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  109. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +0 -9
  110. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  111. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +0 -2
  112. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  113. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  114. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js +1 -1
  115. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -1
  116. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  117. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  118. package/package.json +1 -1
  119. package/dist/dist-cjs/communication-react/index-pky6z3v4.js.map +0 -1
@@ -176,7 +176,7 @@ function getDefaultExportFromCjs (x) {
176
176
  // Copyright (c) Microsoft Corporation.
177
177
  // Licensed under the MIT License.
178
178
  // GENERATED FILE. DO NOT EDIT MANUALLY.
179
- var telemetryVersion = '1.16.0-alpha-202404170013';
179
+ var telemetryVersion = '1.16.0-alpha-202404190012';
180
180
 
181
181
 
182
182
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -424,7 +424,6 @@ const getSpotlightCallFeature = (state, props) => {
424
424
  var _a;
425
425
  return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.spotlight;
426
426
  };
427
- /* @conditional-compile-remove(reaction) */
428
427
  /**
429
428
  * @private
430
429
  */
@@ -685,7 +684,6 @@ const raiseHandButtonSelector = reselect__namespace.createSelector([getLocalPart
685
684
  disabled: callState === 'InLobby' ? true : (_a = callState === 'Connecting') !== null && _a !== void 0 ? _a : false
686
685
  };
687
686
  });
688
- /* @conditional-compile-remove(reaction) */
689
687
  /**
690
688
  * Selector for {@link ReactionButton} component.
691
689
  *
@@ -909,7 +907,6 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
909
907
  yield (raiseHandFeature === null || raiseHandFeature === void 0 ? void 0 : raiseHandFeature.raiseHand());
910
908
  }
911
909
  });
912
- /* @conditional-compile-remove(reaction) */
913
910
  const onReactionClick = (reaction) => __awaiter$R(void 0, void 0, void 0, function* () {
914
911
  var _c;
915
912
  if (reaction === 'like' ||
@@ -1190,7 +1187,6 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
1190
1187
  onRaiseHand,
1191
1188
  onLowerHand,
1192
1189
  onToggleRaiseHand,
1193
- /* @conditional-compile-remove(reaction) */
1194
1190
  onReactionClick: onReactionClick,
1195
1191
  /* @conditional-compile-remove(PSTN-calls) */
1196
1192
  onAddParticipant: notImplemented,
@@ -1451,6 +1447,24 @@ class ProxyDeviceManager {
1451
1447
  this._deviceManager.on('audioDevicesUpdated', this.audioDevicesUpdated);
1452
1448
  this._deviceManager.on('selectedMicrophoneChanged', this.selectedMicrophoneChanged);
1453
1449
  this._deviceManager.on('selectedSpeakerChanged', this.selectedSpeakerChanged);
1450
+ // Subscribe to browser camera permissions changes
1451
+ try {
1452
+ navigator.permissions.query({ name: 'camera' }).then((cameraPermissions) => {
1453
+ cameraPermissions.addEventListener('change', this.permissionsApiStateChangeHandler);
1454
+ });
1455
+ }
1456
+ catch (e) {
1457
+ console.info('Could not subscribe to Permissions API Camera changed events, API is not supported by browser', e);
1458
+ }
1459
+ // Subscribe to browser microphone permissions changes
1460
+ try {
1461
+ navigator.permissions.query({ name: 'microphone' }).then((micPermissions) => {
1462
+ micPermissions.addEventListener('change', this.permissionsApiStateChangeHandler);
1463
+ });
1464
+ }
1465
+ catch (e) {
1466
+ console.info('Could not subscribe to Permissions API Microphone changed events, API is not supported by browser', e);
1467
+ }
1454
1468
  };
1455
1469
  /**
1456
1470
  * This is used to unsubscribe DeclarativeDeviceManager from the DeviceManager events.
@@ -1460,7 +1474,28 @@ class ProxyDeviceManager {
1460
1474
  this._deviceManager.off('audioDevicesUpdated', this.audioDevicesUpdated);
1461
1475
  this._deviceManager.off('selectedMicrophoneChanged', this.selectedMicrophoneChanged);
1462
1476
  this._deviceManager.off('selectedSpeakerChanged', this.selectedSpeakerChanged);
1477
+ // Unsubscribe from browser camera permissions changes
1478
+ try {
1479
+ navigator.permissions.query({ name: 'camera' }).then((cameraPermissions) => {
1480
+ cameraPermissions.removeEventListener('change', this.permissionsApiStateChangeHandler);
1481
+ });
1482
+ }
1483
+ catch (e) {
1484
+ console.info('Could not Unsubscribe to Permissions API Camera changed events, API is not supported by browser', e);
1485
+ }
1486
+ // Unsubscribe from browser microphone permissions changes
1487
+ try {
1488
+ navigator.permissions.query({ name: 'microphone' }).then((micPermissions) => {
1489
+ micPermissions.removeEventListener('change', this.permissionsApiStateChangeHandler);
1490
+ });
1491
+ }
1492
+ catch (e) {
1493
+ console.info('Could not Unsubscribe to Permissions API Camera changed events, API is not supported by browser', e);
1494
+ }
1463
1495
  };
1496
+ this.permissionsApiStateChangeHandler = () => __awaiter$O(this, void 0, void 0, function* () {
1497
+ yield this.updateDevicePermissionState();
1498
+ });
1464
1499
  /**
1465
1500
  * Used to set a camera inside the proxy device manager.
1466
1501
  *
@@ -1485,6 +1520,32 @@ class ProxyDeviceManager {
1485
1520
  this.selectedSpeakerChanged = () => {
1486
1521
  this._context.setDeviceManagerSelectedSpeaker(this._deviceManager.selectedSpeaker);
1487
1522
  };
1523
+ this.updateDevicePermissionState = (sdkDeviceAccessState) => __awaiter$O(this, void 0, void 0, function* () {
1524
+ let hasCameraPermission = !!(sdkDeviceAccessState === null || sdkDeviceAccessState === void 0 ? void 0 : sdkDeviceAccessState.video);
1525
+ let hasMicPermission = !!(sdkDeviceAccessState === null || sdkDeviceAccessState === void 0 ? void 0 : sdkDeviceAccessState.audio);
1526
+ // Supplement the SDK values with values from the Permissions API to get a better understanding of the device
1527
+ // permission state. The SDK only uses the getUserMedia API to determine the device permission state. However,
1528
+ // this returns false if the camera is in use by another application. The Permissions API can provide more
1529
+ // information about the device permission state, but is not supported yet in Firefox or Android WebView.
1530
+ // Note: It also has the limitation where it cannot detect if the device is blocked by the Operating System
1531
+ // permissions.
1532
+ try {
1533
+ const [cameraPermissions, micPermissions] = yield Promise.all([
1534
+ navigator.permissions.query({ name: 'camera' }),
1535
+ navigator.permissions.query({ name: 'microphone' })
1536
+ ]);
1537
+ hasCameraPermission = cameraPermissions.state === 'granted';
1538
+ hasMicPermission = micPermissions.state === 'granted';
1539
+ }
1540
+ catch (e) {
1541
+ console.info('Permissions API is not supported by browser', e);
1542
+ }
1543
+ this._context.setDeviceManagerDeviceAccess({
1544
+ video: hasCameraPermission,
1545
+ audio: hasMicPermission
1546
+ });
1547
+ this.setDeviceManager();
1548
+ });
1488
1549
  this._deviceManager = deviceManager;
1489
1550
  this._context = context;
1490
1551
  this.setDeviceManager();
@@ -1535,11 +1596,10 @@ class ProxyDeviceManager {
1535
1596
  }
1536
1597
  case 'askDevicePermission': {
1537
1598
  return this._context.withAsyncErrorTeedToState((...args) => {
1538
- return target.askDevicePermission(...args).then((deviceAccess) => {
1539
- this._context.setDeviceManagerDeviceAccess(deviceAccess);
1540
- this.setDeviceManager();
1599
+ return target.askDevicePermission(...args).then((deviceAccess) => __awaiter$O(this, void 0, void 0, function* () {
1600
+ yield this.updateDevicePermissionState(deviceAccess);
1541
1601
  return deviceAccess;
1542
- });
1602
+ }));
1543
1603
  }, 'DeviceManager.askDevicePermission');
1544
1604
  }
1545
1605
  default:
@@ -1796,7 +1856,6 @@ function convertSdkCallToDeclarativeCall(call) {
1796
1856
  /* @conditional-compile-remove(ppt-live) */
1797
1857
  pptLive: { isActive: false },
1798
1858
  raiseHand: { raisedHands: [] },
1799
- /* @conditional-compile-remove(reaction) */
1800
1859
  localParticipantReaction: undefined,
1801
1860
  transcription: { isTranscriptionActive: false },
1802
1861
  screenShareRemoteParticipant: undefined,
@@ -1897,7 +1956,6 @@ immer.enablePatches();
1897
1956
  * @private
1898
1957
  */
1899
1958
  const MAX_CALL_HISTORY_LENGTH = 10;
1900
- /* @conditional-compile-remove(reaction) */
1901
1959
  /**
1902
1960
  * @private
1903
1961
  */
@@ -1909,7 +1967,6 @@ let CallContext$2 = class CallContext {
1909
1967
  constructor(userId, maxListeners = 50,
1910
1968
  /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId) {
1911
1969
  this._callIdHistory = new CallIdHistory();
1912
- /* @conditional-compile-remove(reaction) */
1913
1970
  this._timeOutId = {};
1914
1971
  /**
1915
1972
  * Tees direct errors to state.
@@ -2261,7 +2318,6 @@ let CallContext$2 = class CallContext {
2261
2318
  }
2262
2319
  });
2263
2320
  }
2264
- /* @conditional-compile-remove(reaction) */
2265
2321
  setReceivedReactionFromParticipant(callId, participantKey, reactionMessage) {
2266
2322
  this.modifyState((draft) => {
2267
2323
  const call = draft.calls[this._callIdHistory.latestCallId(callId)];
@@ -2851,7 +2907,6 @@ const findOldestCallEnded = (calls) => {
2851
2907
  }
2852
2908
  return oldestCallId;
2853
2909
  };
2854
- /* @conditional-compile-remove(reaction) */
2855
2910
  function clearParticipantReactionState(callContext, callId, participantKey) {
2856
2911
  callContext.setReceivedReactionFromParticipant(callId, participantKey, null);
2857
2912
  }
@@ -4042,7 +4097,6 @@ class CapabilitiesSubscriber {
4042
4097
 
4043
4098
  // Copyright (c) Microsoft Corporation.
4044
4099
  // Licensed under the MIT License.
4045
- /* @conditional-compile-remove(reaction) */
4046
4100
  /**
4047
4101
  * @private
4048
4102
  */
@@ -4201,7 +4255,6 @@ class CallSubscriber {
4201
4255
  (_b = this._CaptionsFeatureSubscriber) === null || _b === void 0 ? void 0 : _b.unsubscribe();
4202
4256
  (_c = this._raiseHandSubscriber) === null || _c === void 0 ? void 0 : _c.unsubscribe();
4203
4257
  this._capabilitiesSubscriber.unsubscribe();
4204
- /* @conditional-compile-remove(reaction) */
4205
4258
  (_d = this._reactionSubscriber) === null || _d === void 0 ? void 0 : _d.unsubscribe();
4206
4259
  /* @conditional-compile-remove(spotlight) */
4207
4260
  this._spotlightSubscriber.unsubscribe();
@@ -4300,7 +4353,6 @@ class CallSubscriber {
4300
4353
  this._pptLiveSubscriber = new PPTLiveSubscriber(this._callIdRef, this._context, this._call);
4301
4354
  this._transcriptionSubscriber = new TranscriptionSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.Transcription));
4302
4355
  this._raiseHandSubscriber = new RaiseHandSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.RaiseHand));
4303
- /* @conditional-compile-remove(reaction) */
4304
4356
  this._reactionSubscriber = new ReactionSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.Reaction));
4305
4357
  this._optimalVideoCountSubscriber = new OptimalVideoCountSubscriber({
4306
4358
  callIdRef: this._callIdRef,
@@ -6684,11 +6736,9 @@ const GalleryRightButton = () => {
6684
6736
  return rtl ? React.createElement(reactIcons.ChevronLeft20Regular, null) : React.createElement(reactIcons.ChevronRight20Regular, null);
6685
6737
  };
6686
6738
  const ControlButtonRaiseHandIcon = () => {
6687
- /* @conditional-compile-remove(reaction) */
6688
6739
  return React.createElement(reactIcons.HandRight20Regular, null);
6689
6740
  };
6690
6741
  const ControlButtonLowerHandIcon = () => {
6691
- /* @conditional-compile-remove(reaction) */
6692
6742
  return React.createElement(reactIcons.HandRightOff20Regular, null);
6693
6743
  };
6694
6744
  /**
@@ -6714,7 +6764,6 @@ const DEFAULT_COMPONENT_ICONS = {
6714
6764
  ControlButtonLowerHand: React.createElement(ControlButtonLowerHandIcon, null),
6715
6765
  RaiseHandContextualMenuItem: React.createElement(reactIcons.HandRight20Regular, null),
6716
6766
  LowerHandContextualMenuItem: React.createElement(reactIcons.HandRightOff20Regular, null),
6717
- /* @conditional-compile-remove(reaction) */
6718
6767
  ReactionButtonIcon: React.createElement(reactIcons.Emoji20Regular, null),
6719
6768
  /* @conditional-compile-remove(attachment-upload) */
6720
6769
  CancelAttachmentUpload: React.createElement(reactIcons.Dismiss16Regular, null),
@@ -10008,7 +10057,8 @@ const insertTableMenuFocusZone = (theme) => {
10008
10057
  return react.mergeStyles({
10009
10058
  lineHeight: '12px',
10010
10059
  width: '5.125rem',
10011
- border: `solid 0.0625rem ${theme.palette.neutralTertiaryAlt}`
10060
+ border: `solid 0.0625rem ${theme.palette.neutralTertiaryAlt}`,
10061
+ boxSizing: 'border-box'
10012
10062
  });
10013
10063
  };
10014
10064
  /**
@@ -10396,13 +10446,22 @@ const getEditingTable = (editor, node) => {
10396
10446
  * CopyPastePlugin is a plugin for handling copy and paste events in the editor.
10397
10447
  */
10398
10448
  class CopyPastePlugin {
10449
+ constructor() {
10450
+ this.editor = null;
10451
+ }
10399
10452
  getName() {
10400
10453
  return 'CopyPastePlugin';
10401
10454
  }
10402
- initialize() { }
10455
+ initialize(editor) {
10456
+ this.editor = editor;
10457
+ }
10403
10458
  dispose() { }
10404
10459
  onPluginEvent(event) {
10405
10460
  removeImageElement(event);
10461
+ if (this.editor !== null && !this.editor.isDisposed()) {
10462
+ // scroll the editor to the correct position after pasting content
10463
+ scrollToBottomAfterContentPaste(event, this.editor);
10464
+ }
10406
10465
  }
10407
10466
  }
10408
10467
  /**
@@ -10424,6 +10483,38 @@ const removeImageElement = (event) => {
10424
10483
  });
10425
10484
  }
10426
10485
  };
10486
+ /**
10487
+ * Scrolls the editor's scroll container to the bottom after content is pasted.
10488
+ * @param event - The plugin event.
10489
+ * @param editor - The editor instance.
10490
+ */
10491
+ const scrollToBottomAfterContentPaste = (event, editor) => {
10492
+ if (event.eventType === roosterjsEditorTypesCompatible.CompatiblePluginEventType.ContentChanged && event.source === roosterjsEditorTypesCompatible.CompatibleChangeSource.Paste) {
10493
+ // current focused position in the editor
10494
+ const focusedPosition = editor.getFocusedPosition();
10495
+ // the cursor position relative to the viewport
10496
+ const cursorRect = focusedPosition && roosterjsEditorDom.getPositionRect(focusedPosition);
10497
+ // the scroll container of the editor
10498
+ const scrollContainer = editor.getScrollContainer();
10499
+ // the scrollContainer position relative to the viewport
10500
+ const scrollContainerRect = roosterjsEditorDom.normalizeRect(scrollContainer.getBoundingClientRect());
10501
+ if (focusedPosition !== null && cursorRect !== null && cursorRect !== undefined && scrollContainerRect !== null) {
10502
+ const textElement = focusedPosition.element;
10503
+ // the caret height is typically the same as the font size of the text
10504
+ const caretHeight = parseFloat(window.getComputedStyle(textElement).fontSize);
10505
+ // 1. scrollContainer.scrollTop represents the number of pixels that the content of scrollContainer is scrolled upward.
10506
+ // 2. subtract the top position of the scrollContainer element (scrollContainerRect.top) to
10507
+ // translate the scroll position from being relative to the document to being relative to the viewport.
10508
+ // 3. add the top position of the cursor (cursorRect.top) to moves the scroll position to the cursor's position.
10509
+ // 4. subtract a caret height to add some space between the cursor and the top edge of the scrollContainer.
10510
+ const updatedScrollTop = scrollContainer.scrollTop - scrollContainerRect.top + cursorRect.top - caretHeight;
10511
+ scrollContainer.scrollTo({
10512
+ top: updatedScrollTop,
10513
+ behavior: 'smooth'
10514
+ });
10515
+ }
10516
+ }
10517
+ };
10427
10518
 
10428
10519
  // Copyright (c) Microsoft Corporation.
10429
10520
  // Licensed under the MIT License.
@@ -12722,7 +12813,7 @@ class ErrorBoundary extends React.Component {
12722
12813
  // Copyright (c) Microsoft Corporation.
12723
12814
  // Licensed under the MIT License.
12724
12815
  /* @conditional-compile-remove(rich-text-editor) */
12725
- const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DZWR3o3q.js'); }));
12816
+ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-WGqg2woK.js'); }));
12726
12817
  /**
12727
12818
  * @private
12728
12819
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -12730,7 +12821,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
12730
12821
  *
12731
12822
  * @conditional-compile-remove(rich-text-editor)
12732
12823
  */
12733
- const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DZWR3o3q.js'); });
12824
+ const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-WGqg2woK.js'); });
12734
12825
  /**
12735
12826
  * @private
12736
12827
  */
@@ -14581,8 +14672,6 @@ const _DrawerMenu = (props) => {
14581
14672
 
14582
14673
  // Copyright (c) Microsoft Corporation.
14583
14674
  // Licensed under the MIT License.
14584
- /* @conditional-compile-remove(reaction) */
14585
- /* @conditional-compile-remove(reaction) */
14586
14675
  /**
14587
14676
  * @private
14588
14677
  */
@@ -14594,7 +14683,6 @@ const playFrames$1 = react.memoizeFunction(() => react.keyframes({
14594
14683
  backgroundPosition: '0px 0px'
14595
14684
  }
14596
14685
  }));
14597
- /* @conditional-compile-remove(reaction) */
14598
14686
  /**
14599
14687
  * @param backgroundImage - the uri for the reaction emoji resource
14600
14688
  * @param animationPlayState - the value is either 'running' or 'paused' based on the mouse hover event
@@ -14629,7 +14717,6 @@ const emojiStyles = (backgroundImage, frameCount) => {
14629
14717
  }
14630
14718
  };
14631
14719
  };
14632
- /* @conditional-compile-remove(reaction) */
14633
14720
  /**
14634
14721
  *
14635
14722
  * @private
@@ -14648,7 +14735,6 @@ const reactionEmojiMenuStyles = () => {
14648
14735
  }
14649
14736
  };
14650
14737
  };
14651
- /* @conditional-compile-remove(reaction) */
14652
14738
  /**
14653
14739
  *
14654
14740
  * @private
@@ -14663,7 +14749,6 @@ const reactionToolTipHostStyle = () => {
14663
14749
  }
14664
14750
  };
14665
14751
  };
14666
- /* @conditional-compile-remove(reaction) */
14667
14752
  /**
14668
14753
  *
14669
14754
  * @private
@@ -14678,7 +14763,6 @@ const mobileViewMenuItemStyle = () => {
14678
14763
  height: '2.625rem'
14679
14764
  };
14680
14765
  };
14681
- /* @conditional-compile-remove(reaction) */
14682
14766
  /**
14683
14767
  * @param backgroundImage - the uri for the reaction emoji resource
14684
14768
  * @param animationPlayState - the value is either 'running' or 'paused' based on the mouse hover event
@@ -14710,8 +14794,6 @@ const mobileViewEmojiStyles = (backgroundImage, animationPlayState) => {
14710
14794
 
14711
14795
  // Copyright (c) Microsoft Corporation.
14712
14796
  // Licensed under the MIT License.
14713
- /* @conditional-compile-remove(reaction) */
14714
- /* @conditional-compile-remove(reaction) */
14715
14797
  /**
14716
14798
  * Maps the individual item in menuProps.items passed in the {@link DrawerMenu} into a UI component.
14717
14799
  *
@@ -14746,11 +14828,9 @@ const _ReactionDrawerMenuItem = (props) => {
14746
14828
  }, style: mobileViewEmojiStyles(resourceUrl ? resourceUrl : '', 'running') }));
14747
14829
  }))));
14748
14830
  };
14749
- /* @conditional-compile-remove(reaction) */
14750
14831
  const drawerMenuItemRootStyles = (hoverBackground, fontSize) => (Object.assign(Object.assign({}, fontSize), { height: '3rem', lineHeight: '3rem', padding: '0rem 0.75rem', cursor: 'pointer', ':hover, :focus': {
14751
14832
  background: hoverBackground
14752
14833
  } }));
14753
- /* @conditional-compile-remove(reaction) */
14754
14834
  const disabledDrawerMenuItemRootStyles = (background) => ({
14755
14835
  pointerEvents: 'none',
14756
14836
  background: background,
@@ -15050,25 +15130,19 @@ const useVideoTileContextualMenuProps = (props) => {
15050
15130
 
15051
15131
  // Copyright (c) Microsoft Corporation.
15052
15132
  // Licensed under the MIT License.
15053
- /* @conditional-compile-remove(reaction) */
15054
15133
  /** @private */
15055
15134
  const REACTION_START_DISPLAY_SIZE = 44;
15056
- /* @conditional-compile-remove(reaction) */
15057
15135
  /** @private */
15058
15136
  const REACTION_NUMBER_OF_ANIMATION_FRAMES = 51;
15059
- /* @conditional-compile-remove(reaction) */
15060
15137
  /** @private */
15061
15138
  const REACTION_SCREEN_SHARE_ANIMATION_TIME_MS = 4133;
15062
- /* @conditional-compile-remove(reaction) */
15063
15139
  /** @private */
15064
15140
  const REACTION_DEFAULT_RESOURCE_FRAME_SIZE_PX = 128;
15065
- /* @conditional-compile-remove(reaction) */
15066
15141
  /** @private */
15067
15142
  const getCombinedKey = (userId, reactionType, receivedAt) => {
15068
15143
  const receivedTime = receivedAt.toISOString();
15069
15144
  return userId + reactionType + receivedTime;
15070
15145
  };
15071
- /* @conditional-compile-remove(reaction) */
15072
15146
  /** @private */
15073
15147
  const getReceivedUnixTime = (receivedTime) => {
15074
15148
  return receivedTime.getTime();
@@ -15231,7 +15305,6 @@ const raiseHandLimitedSpaceStyles = {
15231
15305
  // position at the bottom
15232
15306
  bottom: 0
15233
15307
  };
15234
- /* @conditional-compile-remove(reaction) */
15235
15308
  /**
15236
15309
  * @private
15237
15310
  */
@@ -15243,7 +15316,6 @@ const playFrames = react.memoizeFunction((frameHightPx, frameCount) => react.key
15243
15316
  backgroundPosition: `0px ${frameCount * -frameHightPx}px`
15244
15317
  }
15245
15318
  }));
15246
- /* @conditional-compile-remove(reaction) */
15247
15319
  /**
15248
15320
  * @private
15249
15321
  */
@@ -15410,9 +15482,7 @@ const VideoTileMoreOptionsButton = (props) => {
15410
15482
  const VideoTile = (props) => {
15411
15483
  const { children, displayName, initialsName, isMirrored, isMuted,
15412
15484
  /* @conditional-compile-remove(spotlight) */
15413
- isSpotlighted, isPinned, onRenderPlaceholder, renderElement,
15414
- /* @conditional-compile-remove(reaction) */
15415
- overlay: reactionOverlay, showLabel = true, showMuteIndicator = true, styles, userId, noVideoAvailableAriaLabel, isSpeaking, raisedHand, personaMinSize = DEFAULT_PERSONA_MIN_SIZE_PX, personaMaxSize = DEFAULT_PERSONA_MAX_SIZE_PX, contextualMenu } = props;
15485
+ isSpotlighted, isPinned, onRenderPlaceholder, renderElement, overlay: reactionOverlay, showLabel = true, showMuteIndicator = true, styles, userId, noVideoAvailableAriaLabel, isSpeaking, raisedHand, personaMinSize = DEFAULT_PERSONA_MIN_SIZE_PX, personaMaxSize = DEFAULT_PERSONA_MAX_SIZE_PX, contextualMenu } = props;
15416
15486
  const [isHovered, setIsHovered] = React.useState(false);
15417
15487
  const [isFocused, setIsFocused] = React.useState(false);
15418
15488
  // need to set a default otherwise the resizeObserver will get stuck in an infinite loop.
@@ -15520,7 +15590,6 @@ const VideoTile = (props) => {
15520
15590
  ? 0.4
15521
15591
  : 1
15522
15592
  }) }, onRenderPlaceholder ? (onRenderPlaceholder(userId !== null && userId !== void 0 ? userId : '', placeholderOptions, DefaultPlaceholder)) : (React.createElement(DefaultPlaceholder, Object.assign({}, placeholderOptions))))),
15523
- /* @conditional-compile-remove(reaction) */
15524
15593
  reactionOverlay,
15525
15594
  (canShowLabel || participantStateString) && (React.createElement(react.Stack, { horizontal: true, className: tileInfoContainerStyle, tokens: tileInfoContainerTokens },
15526
15595
  React.createElement(react.Stack, { horizontal: true, className: tileInfoStyle },
@@ -15749,7 +15818,6 @@ const putVideoParticipantsFirst = (remoteParticipants) => {
15749
15818
  const remoteParticipantSortedByVideo = videoParticipants.concat(audioParticipants);
15750
15819
  return remoteParticipantSortedByVideo;
15751
15820
  };
15752
- /* @conditional-compile-remove(reaction) */
15753
15821
  /**
15754
15822
  * @private
15755
15823
  */
@@ -15769,7 +15837,6 @@ const getEmojiResource = (reactionName, reactionResources) => {
15769
15837
  }
15770
15838
  return undefined;
15771
15839
  };
15772
- /* @conditional-compile-remove(reaction) */
15773
15840
  /**
15774
15841
  * @private
15775
15842
  */
@@ -15793,8 +15860,6 @@ const getEmojiFrameCount = (reactionName, reactionResources) => {
15793
15860
 
15794
15861
  // Copyright (c) Microsoft Corporation.
15795
15862
  // Licensed under the MIT License.
15796
- /* @conditional-compile-remove(reaction) */
15797
- /* @conditional-compile-remove(reaction) */
15798
15863
  /**
15799
15864
  * Reaction overlay component for Grid
15800
15865
  *
@@ -15852,8 +15917,6 @@ const ParticipantVideoTileOverlay = React.memo((props) => {
15852
15917
 
15853
15918
  // Copyright (c) Microsoft Corporation.
15854
15919
  // Licensed under the MIT License.
15855
- /* @conditional-compile-remove(reaction) */
15856
- /* @conditional-compile-remove(reaction) */
15857
15920
  /**
15858
15921
  * Calculate the start position for a new reaction in the prescriptive wave pattern
15859
15922
  * @private
@@ -15872,7 +15935,6 @@ function generateStartPositionWave(index, halfCanvasWidth, isOriginAtCanvasCente
15872
15935
  const adjustment = scaleStartPos(index);
15873
15936
  return midPointCoordinate + direction * adjustment * halfCanvasWidth;
15874
15937
  }
15875
- /* @conditional-compile-remove(reaction) */
15876
15938
  /**
15877
15939
  * @private
15878
15940
  */
@@ -15883,7 +15945,6 @@ const reactionOverlayStyle = {
15883
15945
  position: 'absolute',
15884
15946
  width: '100%'
15885
15947
  };
15886
- /* @conditional-compile-remove(reaction) */
15887
15948
  /**
15888
15949
  * @private
15889
15950
  */
@@ -15893,7 +15954,6 @@ function getReactionMovementStyle(reactionXPoint) {
15893
15954
  left: `${reactionXPoint}px`
15894
15955
  };
15895
15956
  }
15896
- /* @conditional-compile-remove(reaction) */
15897
15957
  /**
15898
15958
  * Scale metric to determine the start position of a reaction in presentation mode to avoid overlap.
15899
15959
  * @private
@@ -15940,7 +16000,6 @@ function scaleStartPos(index) {
15940
16000
  return 0;
15941
16001
  }
15942
16002
  }
15943
- /* @conditional-compile-remove(reaction) */
15944
16003
  /**
15945
16004
  * We have only one bucket item for presentation style of the reaction animation.
15946
16005
  * We are choosing to keep the array so that, in future, with styles needed to get updated, one
@@ -15956,7 +16015,6 @@ const ReactionStyleBuckets = [
15956
16015
  opacityMax: 0.9
15957
16016
  }
15958
16017
  ];
15959
- /* @conditional-compile-remove(reaction) */
15960
16018
  /**
15961
16019
  * Return a style bucket based on the number of active sprites.
15962
16020
  * For example, the first three reactions should appear at maximum
@@ -15969,7 +16027,6 @@ function getReactionStyleBucket() {
15969
16027
  const index = 0;
15970
16028
  return ReactionStyleBuckets[index];
15971
16029
  }
15972
- /* @conditional-compile-remove(reaction) */
15973
16030
  /**
15974
16031
  * @private
15975
16032
  */
@@ -15981,7 +16038,6 @@ const moveFrames = react.memoizeFunction((maxHeight, travelHeight) => react.keyf
15981
16038
  transform: `translateY(${travelHeight}px)`
15982
16039
  }
15983
16040
  }));
15984
- /* @conditional-compile-remove(reaction) */
15985
16041
  /**
15986
16042
  * @private
15987
16043
  */
@@ -15993,7 +16049,6 @@ const moveAnimationStyles = (maxHeight, travelHeight) => {
15993
16049
  animationTimingFunction: 'cubic-bezier(0, 0.83, 0.19, 1.09)'
15994
16050
  };
15995
16051
  };
15996
- /* @conditional-compile-remove(reaction) */
15997
16052
  /**
15998
16053
  * @private
15999
16054
  */
@@ -16013,7 +16068,6 @@ const opacityTransition = react.memoizeFunction((maxOpacity) => react.keyframes(
16013
16068
  visibility: 'hidden'
16014
16069
  }
16015
16070
  }));
16016
- /* @conditional-compile-remove(reaction) */
16017
16071
  /**
16018
16072
  * @private
16019
16073
  */
@@ -16024,7 +16078,6 @@ const opacityAnimationStyles = (maxOpacity) => {
16024
16078
  animationDuration: `4.133s`
16025
16079
  };
16026
16080
  };
16027
- /* @conditional-compile-remove(reaction) */
16028
16081
  /**
16029
16082
  * @private
16030
16083
  */
@@ -16036,7 +16089,6 @@ const spriteFrames = react.memoizeFunction((numOfFrames, displaySizePx) => react
16036
16089
  backgroundPosition: `0px -${numOfFrames * displaySizePx}px`
16037
16090
  }
16038
16091
  }));
16039
- /* @conditional-compile-remove(reaction) */
16040
16092
  /**
16041
16093
  * @private
16042
16094
  */
@@ -16058,14 +16110,9 @@ const spriteAnimationStyles = (numOfFrames, displaySizePx, imageUrl) => {
16058
16110
 
16059
16111
  // Copyright (c) Microsoft Corporation.
16060
16112
  // Licensed under the MIT License.
16061
- /* @conditional-compile-remove(reaction) */
16062
- /* @conditional-compile-remove(reaction) */
16063
16113
  const MAX_NUMBER_OF_EMOJIS = 50;
16064
- /* @conditional-compile-remove(reaction) */
16065
16114
  const NUMBER_OF_EMOJI_TYPES = 5;
16066
- /* @conditional-compile-remove(reaction) */
16067
16115
  const REACTION_POSITION_ARRAY_SIZE = 55;
16068
- /* @conditional-compile-remove(reaction) */
16069
16116
  /**
16070
16117
  * The overlay responsible for rendering multiple reactions all at once in presentation mode
16071
16118
  * @internal
@@ -16196,26 +16243,21 @@ const RemoteContentShareReactionOverlay = React.memo((props) => {
16196
16243
 
16197
16244
  // Copyright (c) Microsoft Corporation.
16198
16245
  // Licensed under the MIT License.
16199
- /* @conditional-compile-remove(reaction) */
16200
- /* @conditional-compile-remove(reaction) */
16201
16246
  /**
16202
16247
  * Emoji max size
16203
16248
  * @internal
16204
16249
  */
16205
16250
  const DEFAULT_EMOJI_MAX_SIZE_PX = 70;
16206
- /* @conditional-compile-remove(reaction) */
16207
16251
  /**
16208
16252
  * Emoji min size
16209
16253
  * @internal
16210
16254
  */
16211
16255
  const DEFAULT_EMOJI_MIN_SIZE_PX = 32;
16212
- /* @conditional-compile-remove(reaction) */
16213
16256
  /**
16214
16257
  * Emoji resize scale constant
16215
16258
  * @internal
16216
16259
  */
16217
16260
  const REACTION_EMOJI_RESIZE_SCALE_CONSTANT = 3;
16218
- /* @conditional-compile-remove(reaction) */
16219
16261
  /**
16220
16262
  * Reaction overlay component
16221
16263
  *
@@ -16283,8 +16325,7 @@ const _RemoteVideoTile = React.memo((props) => {
16283
16325
  /* @conditional-compile-remove(spotlight) */ isSpotlighted,
16284
16326
  /* @conditional-compile-remove(spotlight) */ onStartSpotlight,
16285
16327
  /* @conditional-compile-remove(spotlight) */ onStopSpotlight,
16286
- /* @conditional-compile-remove(spotlight) */ maxParticipantsToSpotlight, onUpdateScalingMode, disablePinMenuItem, toggleAnnouncerString, strings,
16287
- /* @conditional-compile-remove(reaction) */ reactionResources, streamId } = props;
16328
+ /* @conditional-compile-remove(spotlight) */ maxParticipantsToSpotlight, onUpdateScalingMode, disablePinMenuItem, toggleAnnouncerString, strings, reactionResources, streamId } = props;
16288
16329
  const remoteVideoStreamProps = React.useMemo(() => ({
16289
16330
  isMirrored: remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.isMirrored,
16290
16331
  isScreenSharingOn,
@@ -16360,7 +16401,6 @@ const _RemoteVideoTile = React.memo((props) => {
16360
16401
  }
16361
16402
  return displayName;
16362
16403
  };
16363
- /* @conditional-compile-remove(reaction) */
16364
16404
  const reactionOverlay = (React.createElement(MeetingReactionOverlay, { overlayMode: "grid-tiles", reaction: remoteParticipant.reaction, reactionResources: reactionResources }));
16365
16405
  /* @conditional-compile-remove(hide-attendee-name) */
16366
16406
  displayName = formatDisplayName();
@@ -16370,9 +16410,7 @@ const _RemoteVideoTile = React.memo((props) => {
16370
16410
  /* @conditional-compile-remove(PSTN-calls) */
16371
16411
  participantState: participantState }, videoTileContextualMenuProps, { isPinned: props.isPinned, onLongTouch: () => setDrawerMenuItemProps(convertContextualMenuItemsToDrawerMenuItemProps$1(contextualMenuProps, () => setDrawerMenuItemProps([]))),
16372
16412
  /* @conditional-compile-remove(spotlight) */
16373
- isSpotlighted: isSpotlighted,
16374
- /* @conditional-compile-remove(reaction) */
16375
- overlay: reactionOverlay })),
16413
+ isSpotlighted: isSpotlighted, overlay: reactionOverlay })),
16376
16414
  drawerMenuItemProps.length > 0 && (React.createElement(react.Layer, { hostId: props.drawerMenuHostId },
16377
16415
  React.createElement(react.Stack, { styles: drawerMenuWrapperStyles },
16378
16416
  React.createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItemProps([]), items: drawerMenuItemProps, heading: remoteParticipant.displayName }))))));
@@ -16482,13 +16520,7 @@ const loadingStyle = react.mergeStyles({
16482
16520
  * https://reactjs.org/docs/react-api.html#reactmemo
16483
16521
  */
16484
16522
  const RemoteScreenShare = React.memo((props) => {
16485
- const { userId, displayName, isMuted, renderElement, onCreateRemoteStreamView, onDisposeRemoteStreamView, isReceiving, participantVideoScalingMode,
16486
- /* @conditional-compile-remove(reaction) */
16487
- reactionResources,
16488
- /* @conditional-compile-remove(reaction) */
16489
- localParticipant,
16490
- /* @conditional-compile-remove(reaction) */
16491
- remoteParticipants,
16523
+ const { userId, displayName, isMuted, renderElement, onCreateRemoteStreamView, onDisposeRemoteStreamView, isReceiving, participantVideoScalingMode, reactionResources, localParticipant, remoteParticipants,
16492
16524
  /* @conditional-compile-remove(ppt-live) */
16493
16525
  isPPTLive } = props;
16494
16526
  const locale = useLocale$1();
@@ -16516,13 +16548,9 @@ const RemoteScreenShare = React.memo((props) => {
16516
16548
  : '';
16517
16549
  /* @conditional-compile-remove(ppt-live) */
16518
16550
  if (isPPTLive) {
16519
- return (React.createElement(VideoTile, { renderElement: renderElement ? (React.createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: isReceiving === false ? 'loading' : 'none' })) : undefined, onRenderPlaceholder: () => React.createElement(LoadingSpinner, { loadingMessage: loadingMessage }),
16520
- /* @conditional-compile-remove(reaction) */
16521
- overlay: React.createElement(MeetingReactionOverlay, { reactionResources: reactionResources, localParticipant: localParticipant, remoteParticipants: remoteParticipants, overlayMode: "screen-share" }) }));
16551
+ return (React.createElement(VideoTile, { renderElement: renderElement ? (React.createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: isReceiving === false ? 'loading' : 'none' })) : undefined, onRenderPlaceholder: () => React.createElement(LoadingSpinner, { loadingMessage: loadingMessage }), overlay: React.createElement(MeetingReactionOverlay, { reactionResources: reactionResources, localParticipant: localParticipant, remoteParticipants: remoteParticipants, overlayMode: "screen-share" }) }));
16522
16552
  }
16523
- return (React.createElement(VideoTile, { displayName: displayName, isMuted: isMuted, renderElement: renderElement ? (React.createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: isReceiving === false ? 'loading' : 'none' })) : undefined, onRenderPlaceholder: () => React.createElement(LoadingSpinner, { loadingMessage: loadingMessage }),
16524
- /* @conditional-compile-remove(reaction) */
16525
- overlay: React.createElement(MeetingReactionOverlay, { reactionResources: reactionResources, localParticipant: localParticipant, remoteParticipants: remoteParticipants, overlayMode: "screen-share" }) }));
16553
+ return (React.createElement(VideoTile, { displayName: displayName, isMuted: isMuted, renderElement: renderElement ? (React.createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: isReceiving === false ? 'loading' : 'none' })) : undefined, onRenderPlaceholder: () => React.createElement(LoadingSpinner, { loadingMessage: loadingMessage }), overlay: React.createElement(MeetingReactionOverlay, { reactionResources: reactionResources, localParticipant: localParticipant, remoteParticipants: remoteParticipants, overlayMode: "screen-share" }) }));
16526
16554
  });
16527
16555
  const LoadingSpinner = (props) => {
16528
16556
  return (React.createElement(react.Stack, { verticalAlign: "center", className: loadingStyle },
@@ -16628,9 +16656,7 @@ const LocalVideoCameraCycleButton = (props) => {
16628
16656
  * @internal
16629
16657
  */
16630
16658
  const _LocalVideoTile = React.memo((props) => {
16631
- const { isAvailable, isMuted, onCreateLocalStreamView, onDisposeLocalStreamView, localVideoViewOptions, renderElement, userId, showLabel, displayName, initialsName, onRenderAvatar, showMuteIndicator, styles, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription, raisedHand,
16632
- /* @conditional-compile-remove(reaction) */
16633
- reaction,
16659
+ const { isAvailable, isMuted, onCreateLocalStreamView, onDisposeLocalStreamView, localVideoViewOptions, renderElement, userId, showLabel, displayName, initialsName, onRenderAvatar, showMuteIndicator, styles, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription, raisedHand, reaction,
16634
16660
  /* @conditional-compile-remove(spotlight) */
16635
16661
  isSpotlighted,
16636
16662
  /* @conditional-compile-remove(spotlight) */
@@ -16644,9 +16670,7 @@ const _LocalVideoTile = React.memo((props) => {
16644
16670
  /* @conditional-compile-remove(spotlight) */
16645
16671
  menuKind,
16646
16672
  /* @conditional-compile-remove(spotlight) */
16647
- strings,
16648
- /* @conditional-compile-remove(reaction) */
16649
- reactionResources } = props;
16673
+ strings, reactionResources } = props;
16650
16674
  /* @conditional-compile-remove(spotlight) */
16651
16675
  const theme = useTheme();
16652
16676
  const localVideoStreamProps = React.useMemo(() => ({
@@ -16731,7 +16755,6 @@ const _LocalVideoTile = React.memo((props) => {
16731
16755
  renderElement,
16732
16756
  showCameraSwitcherInLocalPreview
16733
16757
  ]);
16734
- /* @conditional-compile-remove(reaction) */
16735
16758
  const reactionOverlay = reactionResources !== undefined ? (React.createElement(MeetingReactionOverlay, { overlayMode: "grid-tiles", reaction: reaction, reactionResources: reactionResources })) : undefined;
16736
16759
  return (React.createElement(react.Stack, { className: react.mergeStyles({ width: '100%', height: '100%' }),
16737
16760
  /* @conditional-compile-remove(spotlight) */ onKeyDown: menuKind === 'drawer' ? onKeyDown : undefined },
@@ -16739,9 +16762,7 @@ const _LocalVideoTile = React.memo((props) => {
16739
16762
  /* @conditional-compile-remove(spotlight) */
16740
16763
  isSpotlighted: isSpotlighted }, videoTileContextualMenuProps, {
16741
16764
  /* @conditional-compile-remove(spotlight) */
16742
- onLongTouch: () => setDrawerMenuItemProps(convertContextualMenuItemsToDrawerMenuItemProps(contextualMenuProps, () => setDrawerMenuItemProps([]))),
16743
- /* @conditional-compile-remove(reaction) */
16744
- overlay: reactionOverlay }),
16765
+ onLongTouch: () => setDrawerMenuItemProps(convertContextualMenuItemsToDrawerMenuItemProps(contextualMenuProps, () => setDrawerMenuItemProps([]))), overlay: reactionOverlay }),
16745
16766
  /* @conditional-compile-remove(spotlight) */ drawerMenuItemProps.length > 0 && (React.createElement(react.Layer, { hostId: props.drawerMenuHostId },
16746
16767
  React.createElement(react.Stack, { styles: drawerMenuWrapperStyles },
16747
16768
  React.createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItemProps([]), items: drawerMenuItemProps })))))));
@@ -18779,9 +18800,7 @@ const VideoGallery = (props) => {
18779
18800
  /* @conditional-compile-remove(spotlight) */
18780
18801
  onStopRemoteSpotlight,
18781
18802
  /* @conditional-compile-remove(spotlight) */
18782
- maxParticipantsToSpotlight,
18783
- /* @conditional-compile-remove(reaction) */
18784
- reactionResources } = props;
18803
+ maxParticipantsToSpotlight, reactionResources } = props;
18785
18804
  const ids = useIdentifiers();
18786
18805
  const theme = useTheme();
18787
18806
  const localeStrings = useLocale$1().strings.videoGallery;
@@ -18837,9 +18856,7 @@ const VideoGallery = (props) => {
18837
18856
  return layout === 'default' ? strings.localVideoLabel : isNarrow ? '' : strings.localVideoLabel;
18838
18857
  };
18839
18858
  return (React.createElement(react.Stack, { styles: localVideoTileContainerStyles, key: "local-video-tile-key", tabIndex: 0, "aria-label": strings.localVideoMovementLabel, role: 'dialog' },
18840
- React.createElement(_LocalVideoTile, { userId: localParticipant.userId, onCreateLocalStreamView: onCreateLocalStreamView, onDisposeLocalStreamView: onDisposeLocalStreamView, isAvailable: (_a = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable, isMuted: localParticipant.isMuted, renderElement: (_b = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _b === void 0 ? void 0 : _b.renderElement, displayName: showDisplayNameTrampoline(), initialsName: initialsName, localVideoViewOptions: localVideoViewOptions, onRenderAvatar: onRenderAvatar, showLabel: showLocalVideoTileLabel, showMuteIndicator: showMuteIndicator, showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps: localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel: strings.localVideoCameraSwitcherLabel, localVideoSelectedDescription: strings.localVideoSelectedDescription, styles: localVideoTileStyles, raisedHand: localParticipant.raisedHand,
18841
- /* @conditional-compile-remove(reaction) */
18842
- reaction: localParticipant.reaction,
18859
+ React.createElement(_LocalVideoTile, { userId: localParticipant.userId, onCreateLocalStreamView: onCreateLocalStreamView, onDisposeLocalStreamView: onDisposeLocalStreamView, isAvailable: (_a = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable, isMuted: localParticipant.isMuted, renderElement: (_b = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _b === void 0 ? void 0 : _b.renderElement, displayName: showDisplayNameTrampoline(), initialsName: initialsName, localVideoViewOptions: localVideoViewOptions, onRenderAvatar: onRenderAvatar, showLabel: showLocalVideoTileLabel, showMuteIndicator: showMuteIndicator, showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps: localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel: strings.localVideoCameraSwitcherLabel, localVideoSelectedDescription: strings.localVideoSelectedDescription, styles: localVideoTileStyles, raisedHand: localParticipant.raisedHand, reaction: localParticipant.reaction,
18843
18860
  /* @conditional-compile-remove(spotlight) */
18844
18861
  spotlightedParticipantUserIds: spotlightedParticipants,
18845
18862
  /* @conditional-compile-remove(spotlight) */
@@ -18855,9 +18872,7 @@ const VideoGallery = (props) => {
18855
18872
  /* @conditional-compile-remove(spotlight) */
18856
18873
  drawerMenuHostId: drawerMenuHostId,
18857
18874
  /* @conditional-compile-remove(spotlight) */
18858
- strings: strings,
18859
- /* @conditional-compile-remove(reaction) */
18860
- reactionResources: reactionResources })));
18875
+ strings: strings, reactionResources: reactionResources })));
18861
18876
  }, [
18862
18877
  isNarrow,
18863
18878
  localParticipant,
@@ -18889,7 +18904,6 @@ const VideoGallery = (props) => {
18889
18904
  strings,
18890
18905
  /* @conditional-compile-remove(spotlight) */
18891
18906
  drawerMenuHostId,
18892
- /* @conditional-compile-remove(reaction) */
18893
18907
  reactionResources
18894
18908
  ]);
18895
18909
  const onPinParticipant = React.useCallback((userId) => {
@@ -18957,9 +18971,7 @@ const VideoGallery = (props) => {
18957
18971
  /* @conditional-compile-remove(spotlight) */
18958
18972
  onStopSpotlight: onStopRemoteSpotlight,
18959
18973
  /* @conditional-compile-remove(spotlight) */
18960
- maxParticipantsToSpotlight: maxParticipantsToSpotlight,
18961
- /* @conditional-compile-remove(reaction) */
18962
- reactionResources: reactionResources }));
18974
+ maxParticipantsToSpotlight: maxParticipantsToSpotlight, reactionResources: reactionResources }));
18963
18975
  }, [
18964
18976
  onCreateRemoteStreamView,
18965
18977
  onDisposeRemoteVideoStreamView,
@@ -18980,17 +18992,11 @@ const VideoGallery = (props) => {
18980
18992
  /* @conditional-compile-remove(spotlight) */ onStartRemoteSpotlight,
18981
18993
  /* @conditional-compile-remove(spotlight) */ onStopRemoteSpotlight,
18982
18994
  /* @conditional-compile-remove(spotlight) */ maxParticipantsToSpotlight,
18983
- /* @conditional-compile-remove(reaction) */ reactionResources
18995
+ reactionResources
18984
18996
  ]);
18985
18997
  const screenShareParticipant = remoteParticipants.find((participant) => { var _a; return (_a = participant.screenShareStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
18986
18998
  const localScreenShareStreamComponent = React.createElement(LocalScreenShare, { localParticipant: localParticipant });
18987
- const remoteScreenShareComponent = screenShareParticipant && (React.createElement(RemoteScreenShare, Object.assign({}, screenShareParticipant, { renderElement: (_b = screenShareParticipant.screenShareStream) === null || _b === void 0 ? void 0 : _b.renderElement, onCreateRemoteStreamView: onCreateRemoteStreamView, onDisposeRemoteStreamView: onDisposeRemoteScreenShareStreamView, isReceiving: (_c = screenShareParticipant.screenShareStream) === null || _c === void 0 ? void 0 : _c.isReceiving, participantVideoScalingMode: selectedScalingModeState[screenShareParticipant.userId],
18988
- /* @conditional-compile-remove(reaction) */
18989
- localParticipant: localParticipant,
18990
- /* @conditional-compile-remove(reaction) */
18991
- remoteParticipants: remoteParticipants,
18992
- /* @conditional-compile-remove(reaction) */
18993
- reactionResources: reactionResources,
18999
+ const remoteScreenShareComponent = screenShareParticipant && (React.createElement(RemoteScreenShare, Object.assign({}, screenShareParticipant, { renderElement: (_b = screenShareParticipant.screenShareStream) === null || _b === void 0 ? void 0 : _b.renderElement, onCreateRemoteStreamView: onCreateRemoteStreamView, onDisposeRemoteStreamView: onDisposeRemoteScreenShareStreamView, isReceiving: (_c = screenShareParticipant.screenShareStream) === null || _c === void 0 ? void 0 : _c.isReceiving, participantVideoScalingMode: selectedScalingModeState[screenShareParticipant.userId], localParticipant: localParticipant, remoteParticipants: remoteParticipants, reactionResources: reactionResources,
18994
19000
  /* @conditional-compile-remove(ppt-live) */
18995
19001
  isPPTLive: !((_d = screenShareParticipant.screenShareStream) === null || _d === void 0 ? void 0 : _d.id) })));
18996
19002
  const screenShareComponent = remoteScreenShareComponent
@@ -20280,8 +20286,6 @@ const raiseHandButtonStyles = (theme) => ({
20280
20286
 
20281
20287
  // Copyright (c) Microsoft Corporation.
20282
20288
  // Licensed under the MIT License.
20283
- /* @conditional-compile-remove(reaction) */
20284
- /* @conditional-compile-remove(reaction) */
20285
20289
  /**
20286
20290
  * A button to send reactions.
20287
20291
  *
@@ -20336,7 +20340,6 @@ const ReactionButton = (props) => {
20336
20340
  items: emojiList
20337
20341
  }, onRenderIcon: (_f = props.onRenderIcon) !== null && _f !== void 0 ? _f : onRenderIcon, strings: strings, labelKey: (_g = props.labelKey) !== null && _g !== void 0 ? _g : 'reactionButtonLabel', onRenderMenuIcon: () => React.createElement("div", null), disabled: props.disabled, ariaLabel: strings.ariaLabel })));
20338
20342
  };
20339
- /* @conditional-compile-remove(reaction) */
20340
20343
  const reactionButtonStyles = (theme) => ({
20341
20344
  rootChecked: {
20342
20345
  background: theme.palette.themePrimary,
@@ -22486,7 +22489,7 @@ const convertRemoteParticipantToParticipantListParticipant = (userId, displayNam
22486
22489
  isRemovable: (communicationCommon.getIdentifierKind(identifier).kind === 'communicationUser' ||
22487
22490
  communicationCommon.getIdentifierKind(identifier).kind === 'phoneNumber') &&
22488
22491
  localUserCanRemoveOthers,
22489
- /* @conditional-compile-remove(reaction) */ reaction,
22492
+ reaction,
22490
22493
  /* @conditional-compile-remove(spotlight) */ spotlight
22491
22494
  };
22492
22495
  };
@@ -22496,7 +22499,6 @@ const convertRemoteParticipantToParticipantListParticipant = (userId, displayNam
22496
22499
  const memoizedConvertAllremoteParticipants = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction, spotlight) => {
22497
22500
  return convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction, spotlight);
22498
22501
  });
22499
- /* @conditional-compile-remove(reaction) */
22500
22502
  /**
22501
22503
  * @private
22502
22504
  */
@@ -22548,22 +22550,19 @@ const _videoGalleryRemoteParticipantsMemo = (remoteParticipants, isHideAttendeeN
22548
22550
  let contentSharingStream = undefined;
22549
22551
  /* @conditional-compile-remove(ppt-live) */
22550
22552
  contentSharingStream = participant.contentSharingStream;
22551
- let remoteParticipantReaction = undefined;
22552
- /* @conditional-compile-remove(reaction) */ remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
22553
+ const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
22553
22554
  let spotlight = undefined;
22554
22555
  /* @conditional-compile-remove(spotlight) */ spotlight = participant.spotlight;
22555
22556
  return memoizedFn(toFlatCommunicationIdentifier(participant.identifier), participant.isMuted, checkIsSpeaking(participant), participant.videoStreams, state, displayName, participant.raisedHand, contentSharingStream, remoteParticipantReaction, spotlight);
22556
22557
  }));
22557
22558
  });
22558
22559
  };
22559
- const memoizedAllConvertRemoteParticipant = memoizeFnAll((userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, // temp unknown type to build stable
22560
- spotlight // temp unknown type to build stable
22560
+ const memoizedAllConvertRemoteParticipant = memoizeFnAll((userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight // temp unknown type to build stable
22561
22561
  ) => {
22562
22562
  return convertRemoteParticipantToVideoGalleryRemoteParticipant(userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight);
22563
22563
  });
22564
22564
  /** @private */
22565
- const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, // temp unknown type to build stable
22566
- spotlight // temp unknown type to build stable
22565
+ const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight // temp unknown type to build stable
22567
22566
  ) => {
22568
22567
  const rawVideoStreamsArray = Object.values(videoStreams);
22569
22568
  let videoStream = undefined;
@@ -22601,8 +22600,7 @@ spotlight // temp unknown type to build stable
22601
22600
  /* @conditional-compile-remove(PSTN-calls) */
22602
22601
  state,
22603
22602
  raisedHand,
22604
- /* @conditional-compile-remove(reaction) */
22605
- reaction: reaction,
22603
+ reaction,
22606
22604
  /* @conditional-compile-remove(spotlight) */
22607
22605
  spotlight: spotlight
22608
22606
  };
@@ -22630,8 +22628,7 @@ const convertRemoteContentSharingStreamToVideoGalleryStream = (stream) => {
22630
22628
  };
22631
22629
  };
22632
22630
  /** @private */
22633
- const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, role, raisedHand,
22634
- /* @conditional-compile-remove(reaction) */ reaction,
22631
+ const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, role, raisedHand, reaction,
22635
22632
  /* @conditional-compile-remove(spotlight) */ localSpotlight,
22636
22633
  /* @conditional-compile-remove(spotlight) */ capabilities) => {
22637
22634
  var _a, _b;
@@ -22647,8 +22644,7 @@ const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, is
22647
22644
  },
22648
22645
  role,
22649
22646
  raisedHand: raisedHand,
22650
- /* @conditional-compile-remove(reaction) */
22651
- reaction: reaction,
22647
+ reaction,
22652
22648
  /* @conditional-compile-remove(spotlight) */
22653
22649
  spotlight: localSpotlight,
22654
22650
  /* @conditional-compile-remove(spotlight) */
@@ -22696,7 +22692,6 @@ const videoGallerySelector = reselect.createSelector([
22696
22692
  getLocalParticipantRaisedHand$1,
22697
22693
  /* @conditional-compile-remove(hide-attendee-name) */
22698
22694
  isHideAttendeeNamesEnabled,
22699
- /* @conditional-compile-remove(reaction) */
22700
22695
  getLocalParticipantReactionState,
22701
22696
  /* @conditional-compile-remove(spotlight) */
22702
22697
  getSpotlightCallFeature,
@@ -22704,9 +22699,7 @@ const videoGallerySelector = reselect.createSelector([
22704
22699
  getCapabilities
22705
22700
  ], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName, identifier, dominantSpeakers, optimalVideoCount, role, raisedHand,
22706
22701
  /* @conditional-compile-remove(hide-attendee-name) */
22707
- isHideAttendeeNamesEnabled,
22708
- /* @conditional-compile-remove(reaction) */
22709
- localParticipantReaction,
22702
+ isHideAttendeeNamesEnabled, localParticipantReaction,
22710
22703
  /* @conditional-compile-remove(spotlight) */
22711
22704
  spotlightCallFeature,
22712
22705
  /* @conditional-compile-remove(spotlight) */
@@ -22718,7 +22711,6 @@ capabilities) => {
22718
22711
  const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);
22719
22712
  dominantSpeakerIds === null || dominantSpeakerIds === void 0 ? void 0 : dominantSpeakerIds.forEach((speaker, idx) => (idx));
22720
22713
  const noRemoteParticipants = [];
22721
- /* @conditional-compile-remove(reaction) */
22722
22714
  const localParticipantReactionState = memoizedConvertToVideoTileReaction(localParticipantReaction);
22723
22715
  /* @conditional-compile-remove(spotlight) */
22724
22716
  const spotlightedParticipantIds = memoizeSpotlightedParticipantIds(spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.spotlightedParticipants);
@@ -22726,9 +22718,7 @@ capabilities) => {
22726
22718
  screenShareParticipant: screenShareRemoteParticipant
22727
22719
  ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName, screenShareRemoteParticipant.raisedHand, /* @conditional-compile-remove(ppt-live) */ screenShareRemoteParticipant.contentSharingStream, undefined, /* @conditional-compile-remove(spotlight) */ screenShareRemoteParticipant.spotlight)
22728
22720
  : undefined,
22729
- localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, role, raisedHand,
22730
- /* @conditional-compile-remove(reaction) */
22731
- localParticipantReactionState,
22721
+ localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, role, raisedHand, localParticipantReactionState,
22732
22722
  /* @conditional-compile-remove(spotlight) */
22733
22723
  spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.localParticipantSpotlight,
22734
22724
  /* @conditional-compile-remove(spotlight) */
@@ -22778,9 +22768,7 @@ const convertRemoteParticipantsToParticipantListParticipants = (remoteParticipan
22778
22768
  let displayName = participant.displayName;
22779
22769
  /* @conditional-compile-remove(hide-attendee-name) */
22780
22770
  displayName = maskDisplayNameWithRole(displayName, localUserRole, participant.role, isHideAttendeeNamesEnabled);
22781
- let remoteParticipantReaction = undefined;
22782
- /* @conditional-compile-remove(reaction) */
22783
- remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
22771
+ const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
22784
22772
  let spotlight = undefined;
22785
22773
  /* @conditional-compile-remove(spotlight) */
22786
22774
  spotlight = memoizedSpotlight(spotlightedParticipants, toFlatCommunicationIdentifier(participant.identifier));
@@ -22819,15 +22807,12 @@ const participantListSelector = reselect.createSelector([
22819
22807
  getParticipantCount,
22820
22808
  /* @conditional-compile-remove(hide-attendee-name) */
22821
22809
  isHideAttendeeNamesEnabled,
22822
- /* @conditional-compile-remove(reaction) */
22823
22810
  getLocalParticipantReactionState,
22824
22811
  /* @conditional-compile-remove(spotlight) */
22825
22812
  getSpotlightCallFeature
22826
22813
  ], (userId, displayName, remoteParticipants, isScreenSharingOn, isMuted, raisedHand, role, partitipantCount,
22827
22814
  /* @conditional-compile-remove(hide-attendee-name) */
22828
- isHideAttendeeNamesEnabled,
22829
- /* @conditional-compile-remove(reaction) */
22830
- localParticipantReactionState,
22815
+ isHideAttendeeNamesEnabled, localParticipantReactionState,
22831
22816
  /* @conditional-compile-remove(spotlight) */
22832
22817
  spotlightCallFeature) => {
22833
22818
  const localUserCanRemoveOthers = localUserCanRemoveOthersTrampoline(role);
@@ -22836,8 +22821,6 @@ spotlightCallFeature) => {
22836
22821
  /* @conditional-compile-remove(spotlight) */
22837
22822
  spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.spotlightedParticipants)
22838
22823
  : [];
22839
- /* @conditional-compile-remove(reaction) */
22840
- const localParticipantReaction = memoizedConvertToVideoTileReaction(localParticipantReactionState);
22841
22824
  participants.push({
22842
22825
  userId: userId,
22843
22826
  displayName: displayName,
@@ -22847,8 +22830,7 @@ spotlightCallFeature) => {
22847
22830
  state: 'Connected',
22848
22831
  // Local participant can never remove themselves.
22849
22832
  isRemovable: false,
22850
- /* @conditional-compile-remove(reaction) */
22851
- reaction: localParticipantReaction,
22833
+ reaction: memoizedConvertToVideoTileReaction(localParticipantReactionState),
22852
22834
  /* @conditional-compile-remove(spotlight) */
22853
22835
  spotlight: memoizedSpotlight(spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.spotlightedParticipants, userId)
22854
22836
  });
@@ -26510,11 +26492,6 @@ const useAdapter$1 = () => {
26510
26492
  /**
26511
26493
  * @private
26512
26494
  */
26513
- const UNSUPPORTED_CHAT_THREAD_TYPE = ['@thread.tacv2', '@thread.skype'];
26514
- /**
26515
- * @private
26516
- */
26517
- const TEAMS_LIMITATION_LEARN_MORE = 'https://learn.microsoft.com/en-us/azure/communication-services/concepts/join-teams-meeting#limitations-and-known-issues';
26518
26495
  /**
26519
26496
  * @remarks
26520
26497
  * This value is publicly documented in the ChatComposite API documentation.
@@ -28059,7 +28036,6 @@ const createCompositeHandlers = memoizeOne((adapter, capabilities) => {
28059
28036
  ? yield adapter.lowerHand()
28060
28037
  : yield adapter.raiseHand();
28061
28038
  }),
28062
- /* @conditional-compile-remove(reaction) */
28063
28039
  onReactionClick: (reaction) => __awaiter$k(void 0, void 0, void 0, function* () {
28064
28040
  yield adapter.onReactionClick(reaction);
28065
28041
  }),
@@ -29073,8 +29049,6 @@ const onFetchCustomButtonPropsTrampoline = (options) => {
29073
29049
 
29074
29050
  // Copyright (c) Microsoft Corporation.
29075
29051
  // Licensed under the MIT License.
29076
- /* @conditional-compile-remove(reaction) */
29077
- /* @conditional-compile-remove(reaction) */
29078
29052
  /** @private */
29079
29053
  const Reaction = (props) => {
29080
29054
  const reactionButtonProps = usePropsFor$1(ReactionButton);
@@ -29082,7 +29056,6 @@ const Reaction = (props) => {
29082
29056
  const reactionButtonDisabled = isDisabled(props.option) || reactionButtonProps.disabled;
29083
29057
  return (React.createElement(ReactionButton, Object.assign({ "data-ui-id": "call-composite-reaction-button" }, reactionButtonProps, { showLabel: props.displayType !== 'compact', disabled: reactionButtonDisabled || props.disabled, styles: styles, disableTooltip: props.disableTooltip, persistMenu: true, reactionResources: props.reactionResource })));
29084
29058
  };
29085
- /* @conditional-compile-remove(reaction) */
29086
29059
  const isDisabled = (option) => {
29087
29060
  if (option === undefined || option === true || option === false) {
29088
29061
  return false;
@@ -29149,11 +29122,8 @@ const CallControls = (props) => {
29149
29122
  /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
29150
29123
  const holdButtonProps = usePropsFor$1(HoldButton);
29151
29124
  const raiseHandButtonProps = usePropsFor$1(RaiseHandButton);
29152
- /* @conditional-compile-remove(reaction) */
29153
29125
  const capabilitiesSelector = useSelector$1(capabilitySelector);
29154
- /* @conditional-compile-remove(reaction) */
29155
29126
  const callState = useSelector$1(callStatusSelector);
29156
- /* @conditional-compile-remove(reaction) */
29157
29127
  const isReactionAllowed = callState.callStatus !== 'Connected' ||
29158
29128
  !(capabilitiesSelector === null || capabilitiesSelector === void 0 ? void 0 : capabilitiesSelector.capabilities) ||
29159
29129
  capabilitiesSelector.capabilities.useReactions.isPresent;
@@ -29180,9 +29150,7 @@ const CallControls = (props) => {
29180
29150
  if (showParticipantsButtonInControlBar) {
29181
29151
  numberOfButtons++;
29182
29152
  }
29183
- /* @conditional-compile-remove(reaction) */
29184
29153
  const showReactionButtonInControlBar = isEnabled$2(options === null || options === void 0 ? void 0 : options.reactionButton) && isReactionAllowed && !props.isMobile;
29185
- /* @conditional-compile-remove(reaction) */
29186
29154
  if (showReactionButtonInControlBar) {
29187
29155
  numberOfButtons++;
29188
29156
  }
@@ -29239,7 +29207,6 @@ const CallControls = (props) => {
29239
29207
  showDevicesButtonInControlBar = false;
29240
29208
  showMoreButton = isEnabled$2(options === null || options === void 0 ? void 0 : options.moreButton);
29241
29209
  }
29242
- /* @conditional-compile-remove(reaction) */
29243
29210
  const reactionResources = adapter.getState().reactions;
29244
29211
  const raiseHandButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.raiseHandButton);
29245
29212
  let showRaiseHandButtonInControlBar = raiseHandButtonIsEnabled;
@@ -29321,7 +29288,6 @@ const CallControls = (props) => {
29321
29288
  React.createElement(ControlBar, { layout: props.displayVertical ? 'vertical' : 'horizontal', styles: controlBarStyles(theme.semanticColors.bodyBackground) },
29322
29289
  microphoneButtonIsEnabled && (React.createElement(Microphone, { displayType: options === null || options === void 0 ? void 0 : options.displayType, disabled: isDisabled$4(options === null || options === void 0 ? void 0 : options.microphoneButton) })),
29323
29290
  cameraButtonIsEnabled && (React.createElement(Camera, { displayType: options === null || options === void 0 ? void 0 : options.displayType, disabled: isDisabled$4(options === null || options === void 0 ? void 0 : options.cameraButton) })),
29324
- /* @conditional-compile-remove(reaction) */
29325
29291
  showReactionButtonInControlBar && reactionResources && (React.createElement(Reaction, { displayType: options === null || options === void 0 ? void 0 : options.displayType, reactionResource: reactionResources })),
29326
29292
  showRaiseHandButtonInControlBar && !hideRaiseHandButtonInRoomsCall && (React.createElement(RaiseHand, { displayType: options === null || options === void 0 ? void 0 : options.displayType })),
29327
29293
  screenShareButtonIsEnabled && (React.createElement(ScreenShare, { option: options === null || options === void 0 ? void 0 : options.screenShareButton, displayType: options === null || options === void 0 ? void 0 : options.displayType, disabled: isDisabled$4(options === null || options === void 0 ? void 0 : options.screenShareButton) })),
@@ -30171,11 +30137,8 @@ const CommonCallControlBar = (props) => {
30171
30137
  // only center control bar buttons based on parent container if there are enough space on the screen and not mobile
30172
30138
  const controlBarDesktopContainerStyles = React.useMemo(() => (!props.mobileView && !isOutOfSpace ? { position: 'relative', minHeight: '4.5rem', width: '100%' } : {}), [props.mobileView, isOutOfSpace]);
30173
30139
  const customButtons = React.useMemo(() => generateCustomCallControlBarButton(onFetchCustomButtonPropsTrampoline(options !== false ? options : undefined), options !== false ? options === null || options === void 0 ? void 0 : options.displayType : undefined), [options]);
30174
- /* @conditional-compile-remove(reaction) */
30175
30140
  const capabilitiesSelector = useSelector$1(capabilitySelector);
30176
- /* @conditional-compile-remove(reaction) */
30177
30141
  const callState = useSelector$1(callStatusSelector);
30178
- /* @conditional-compile-remove(reaction) */
30179
30142
  const isReactionAllowed = callState.callStatus !== 'Connected' ||
30180
30143
  !(capabilitiesSelector === null || capabilitiesSelector === void 0 ? void 0 : capabilitiesSelector.capabilities) ||
30181
30144
  capabilitiesSelector.capabilities.useReactions.isPresent;
@@ -30198,7 +30161,6 @@ const CommonCallControlBar = (props) => {
30198
30161
  props.onUserSetGalleryLayout);
30199
30162
  const role = (_b = props.callAdapter.getState().call) === null || _b === void 0 ? void 0 : _b.role;
30200
30163
  const hideRaiseHandButtonInRoomsCall = props.callAdapter.getState().isRoomsCall && role && ['Consumer', 'Unknown'].includes(role);
30201
- /*@conditional-compile-remove(reaction) */
30202
30164
  const reactionResources = props.callAdapter.getState().reactions;
30203
30165
  return (React.createElement("div", { ref: controlBarSizeRef },
30204
30166
  React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
@@ -30217,7 +30179,6 @@ const CommonCallControlBar = (props) => {
30217
30179
  cameraButtonIsEnabled && (React.createElement(Camera, { displayType: options.displayType, styles: commonButtonStyles, splitButtonsForDeviceSelection: !props.mobileView,
30218
30180
  /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
30219
30181
  disabled: props.disableButtonsForHoldScreen || isDisabled$4(options.cameraButton), onClickVideoEffects: props.onClickVideoEffects, componentRef: props.cameraButtonRef, disableTooltip: props.mobileView })),
30220
- /* @conditional-compile-remove(reaction) */
30221
30182
  !props.mobileView &&
30222
30183
  isReactionAllowed &&
30223
30184
  isEnabled$1(options.reactionButton) &&
@@ -30575,7 +30536,6 @@ const MoreDrawer = (props) => {
30575
30536
  const showCaptionsButton = props.isCaptionsSupported &&
30576
30537
  /* @conditional-compile-remove(acs-close-captions) */ drawerSelectionOptions !== false &&
30577
30538
  /* @conditional-compile-remove(acs-close-captions) */ isEnabled(drawerSelectionOptions.captionsButton);
30578
- /* @conditional-compile-remove(reaction) */
30579
30539
  if (props.reactionResources !== undefined) {
30580
30540
  drawerMenuItems.push({
30581
30541
  itemKey: 'reactions',
@@ -31212,7 +31172,7 @@ const SidePaneHeader = (props) => {
31212
31172
  return React.createElement(SidePaneMobileHeader, Object.assign({}, props));
31213
31173
  }
31214
31174
  return (React.createElement(react.Stack, { horizontal: true, horizontalAlign: "space-between", styles: sidePaneHeaderContainerStyles, verticalAlign: "center" },
31215
- React.createElement(react.Stack.Item, { role: "heading", styles: sidePaneHeaderStyles }, props.headingText),
31175
+ React.createElement(react.Stack.Item, { role: "heading", styles: sidePaneHeaderStyles, "aria-label": props.headingText }, props.headingText),
31216
31176
  React.createElement(react.Stack.Item, null,
31217
31177
  React.createElement(react.CommandBarButton, { ariaLabel: props.dismissSidePaneButtonAriaLabel, styles: sidePaneCloseButtonStyles, iconProps: { iconName: 'cancel' }, onClick: props.onClose }))));
31218
31178
  };
@@ -32760,9 +32720,7 @@ const CallArrangement = (props) => {
32760
32720
  isCaptionsSupported: (useTeamsCaptions && hasJoinedCall) ||
32761
32721
  /* @conditional-compile-remove(acs-close-captions) */ hasJoinedCall,
32762
32722
  /* @conditional-compile-remove(close-captions) */
32763
- useTeamsCaptions: useTeamsCaptions, onUserSetGalleryLayout: props.onUserSetGalleryLayoutChange, userSetGalleryLayout: props.userSetGalleryLayout, onSetDialpadPage: props.onSetDialpadPage, dtmfDialerPresent: props.dtmfDialerPresent,
32764
- /* @conditional-compile-remove(reaction) */
32765
- reactionResources: adapter.getState().reactions }))),
32723
+ useTeamsCaptions: useTeamsCaptions, onUserSetGalleryLayout: props.onUserSetGalleryLayoutChange, userSetGalleryLayout: props.userSetGalleryLayout, onSetDialpadPage: props.onSetDialpadPage, dtmfDialerPresent: props.dtmfDialerPresent, reactionResources: adapter.getState().reactions }))),
32766
32724
  React.createElement(react.Stack, { horizontal: true, grow: true },
32767
32725
  React.createElement(react.Stack.Item, { style: callCompositeContainerCSS },
32768
32726
  React.createElement(react.Stack.Item, { styles: callGalleryStyles, grow: true },
@@ -32856,7 +32814,6 @@ const MediaGallery = (props) => {
32856
32814
  const containerWidth = _useContainerWidth(containerRef);
32857
32815
  const containerHeight = _useContainerHeight(containerRef);
32858
32816
  const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;
32859
- /* @conditional-compile-remove(reaction) */
32860
32817
  const reactionResources = adapter.getState().reactions;
32861
32818
  const layoutBasedOnTilePosition = getVideoGalleryLayoutBasedOnLocalOptions((_b = props.localVideoTileOptions) === null || _b === void 0 ? void 0 : _b.position);
32862
32819
  const cameraSwitcherProps = React.useMemo(() => {
@@ -32917,9 +32874,7 @@ const MediaGallery = (props) => {
32917
32874
  ? 'hidden'
32918
32875
  : props.isMobile && containerAspectRatio < 1
32919
32876
  ? '9:16'
32920
- : '16:9', pinnedParticipants: pinnedParticipants, onPinParticipant: onPinParticipant, onUnpinParticipant: onUnpinParticipant,
32921
- /* @conditional-compile-remove(reaction) */
32922
- reactionResources: reactionResources,
32877
+ : '16:9', pinnedParticipants: pinnedParticipants, onPinParticipant: onPinParticipant, onUnpinParticipant: onUnpinParticipant, reactionResources: reactionResources,
32923
32878
  /* @conditional-compile-remove(spotlight) */
32924
32879
  onStartLocalSpotlight: hideSpotlightButtons ? undefined : onStartLocalSpotlightWithPrompt,
32925
32880
  /* @conditional-compile-remove(spotlight) */
@@ -32944,7 +32899,6 @@ const MediaGallery = (props) => {
32944
32899
  onPinParticipant,
32945
32900
  onUnpinParticipant,
32946
32901
  layoutBasedOnTilePosition,
32947
- /* @conditional-compile-remove(reaction) */
32948
32902
  reactionResources,
32949
32903
  /* @conditional-compile-remove(spotlight) */
32950
32904
  onStartLocalSpotlightWithPrompt,
@@ -33788,14 +33742,11 @@ const LocalDeviceSettings = (props) => {
33788
33742
  const role = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role;
33789
33743
  const cameraPermissionGranted = props.cameraPermissionGranted;
33790
33744
  const micPermissionGranted = props.microphonePermissionGranted;
33791
- let roleCanUseCamera = true;
33792
- let roleCanUseMic = true;
33793
- roleCanUseCamera = role === 'Consumer' ? false : true;
33794
- roleCanUseMic = role === 'Consumer' ? false : true;
33745
+ const roleCanUseCamera = role !== 'Consumer';
33746
+ const roleCanUseMic = role !== 'Consumer';
33795
33747
  // TODO: speaker permission is tied to microphone permission (when you request 'audio' permission using the SDK) its
33796
33748
  // actually granting access to query both microphone and speaker. However the browser popup asks you explicity for
33797
33749
  // 'microphone'. This needs investigation on how we want to handle this and maybe needs follow up with SDK team.
33798
- /* @conditional-compile-remove(call-readiness) */
33799
33750
  React.useEffect(() => {
33800
33751
  if (cameraPermissionGranted) {
33801
33752
  adapter.queryCameras();
@@ -36018,7 +35969,7 @@ class CallContext {
36018
35969
  selectedVideoBackgroundEffect: undefined,
36019
35970
  cameraStatus: undefined,
36020
35971
  sounds: options === null || options === void 0 ? void 0 : options.callingSounds,
36021
- /* @conditional-compile-remove(reaction) */ reactions: options === null || options === void 0 ? void 0 : options.reactionResources
35972
+ reactions: options === null || options === void 0 ? void 0 : options.reactionResources
36022
35973
  };
36023
35974
  this.emitter.setMaxListeners((_d = options === null || options === void 0 ? void 0 : options.maxListeners) !== null && _d !== void 0 ? _d : 50);
36024
35975
  this.bindPublicMethods();
@@ -36274,7 +36225,6 @@ class AzureCommunicationCallAdapter {
36274
36225
  this.startScreenShare.bind(this);
36275
36226
  this.stopScreenShare.bind(this);
36276
36227
  this.raiseHand.bind(this);
36277
- /* @conditional-compile-remove(reaction) */
36278
36228
  this.onReactionClick.bind(this);
36279
36229
  this.lowerHand.bind(this);
36280
36230
  this.removeParticipant.bind(this);
@@ -36608,7 +36558,6 @@ class AzureCommunicationCallAdapter {
36608
36558
  }));
36609
36559
  });
36610
36560
  }
36611
- /* @conditional-compile-remove(reaction) */
36612
36561
  onReactionClick(reaction) {
36613
36562
  return __awaiter$5(this, void 0, void 0, function* () {
36614
36563
  return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
@@ -37456,7 +37405,6 @@ class CallWithChatBackedCallAdapter {
37456
37405
  this.stopScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopScreenShare(); });
37457
37406
  this.raiseHand = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.raiseHand(); });
37458
37407
  this.lowerHand = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.lowerHand(); });
37459
- /* @conditional-compile-remove(reaction) */
37460
37408
  this.onReactionClick = (reaction) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.onReactionClick(reaction); });
37461
37409
  this.removeParticipant = (userId) => __awaiter$4(this, void 0, void 0, function* () {
37462
37410
  let participant = userId;
@@ -37586,7 +37534,6 @@ function callAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState)
37586
37534
  videoBackgroundImages: callWithChatAdapterState.videoBackgroundImages,
37587
37535
  onResolveVideoEffectDependency: callWithChatAdapterState.onResolveVideoEffectDependency,
37588
37536
  selectedVideoBackgroundEffect: callWithChatAdapterState.selectedVideoBackgroundEffect,
37589
- /* @conditional-compile-remove(reaction) */
37590
37537
  reactions: callWithChatAdapterState.reactions
37591
37538
  };
37592
37539
  }
@@ -38138,7 +38085,6 @@ function callWithChatAdapterStateFromBackingStates(callAdapter) {
38138
38085
  /* @conditional-compile-remove(hide-attendee-name) */
38139
38086
  /** Hide attendee names in teams meeting */
38140
38087
  hideAttendeeNames: callAdapterState.hideAttendeeNames,
38141
- /* @conditional-compile-remove(reaction) */
38142
38088
  reactions: callAdapterState.reactions
38143
38089
  };
38144
38090
  }
@@ -38157,30 +38103,6 @@ function mergeCallAdapterStateIntoCallWithChatAdapterState(existingCallWithChatA
38157
38103
  return Object.assign(Object.assign({}, existingCallWithChatAdapterState), { userId: callAdapterState.userId, page: callAdapterState.page, displayName: callAdapterState.displayName, devices: callAdapterState.devices, call: callAdapterState.call, isLocalPreviewMicrophoneEnabled: callAdapterState.isLocalPreviewMicrophoneEnabled, isTeamsCall: callAdapterState.isTeamsCall, latestCallErrors: callAdapterState.latestErrors, videoBackgroundImages: callAdapterState.videoBackgroundImages, onResolveVideoEffectDependency: callAdapterState.onResolveVideoEffectDependency, selectedVideoBackgroundEffect: callAdapterState.selectedVideoBackgroundEffect });
38158
38104
  }
38159
38105
 
38160
- // Copyright (c) Microsoft Corporation.
38161
- // Licensed under the MIT License.
38162
- /**
38163
- * Get chat thread from a teams url.
38164
- * As per documented on the Chat SDK: https://docs.microsoft.com/en-us/azure/communication-services/quickstarts/chat/meeting-interop?pivots=platform-web#get-a-teams-meeting-chat-thread-for-a-communication-services-user
38165
- *
38166
- * @private
38167
- */
38168
- const getChatThreadFromTeamsLink = (teamsMeetingLink) => {
38169
- // Get the threadId from the url - this also contains the call locator ID that will be removed in the threadId.split
38170
- let threadId = teamsMeetingLink.replace('https://teams.microsoft.com/l/meetup-join/', '');
38171
- // Unescape characters that applications like Outlook encode when creating joinable links
38172
- threadId = decodeURIComponent(threadId);
38173
- // Extract just the chat guid from the link, stripping away the call locator ID
38174
- threadId = threadId.split(/^(.*?@thread\.v2)/gm)[1];
38175
- if (!threadId || threadId.length === 0) {
38176
- if (UNSUPPORTED_CHAT_THREAD_TYPE.some((t) => teamsMeetingLink.includes(t))) {
38177
- throw new Error(`Teams Channel Meetings are not currently supported, read more ${TEAMS_LIMITATION_LEARN_MORE}`);
38178
- }
38179
- throw new Error('Could not get chat thread from teams link');
38180
- }
38181
- return threadId;
38182
- };
38183
-
38184
38106
  // Copyright (c) Microsoft Corporation.
38185
38107
  // Licensed under the MIT License.
38186
38108
  var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
@@ -38311,7 +38233,6 @@ class AzureCommunicationCallWithChatAdapter {
38311
38233
  this.stopScreenShare.bind(this);
38312
38234
  this.raiseHand.bind(this);
38313
38235
  this.lowerHand.bind(this);
38314
- /* @conditional-compile-remove(reaction) */
38315
38236
  this.onReactionClick.bind(this);
38316
38237
  this.removeParticipant.bind(this);
38317
38238
  this.createStreamView.bind(this);
@@ -38517,7 +38438,7 @@ class AzureCommunicationCallWithChatAdapter {
38517
38438
  yield this.callAdapter.lowerHand();
38518
38439
  });
38519
38440
  }
38520
- /* @conditional-compile-remove(reaction) */
38441
+ /** Reaction clicked by the local user. */
38521
38442
  onReactionClick(reaction) {
38522
38443
  return __awaiter$2(this, void 0, void 0, function* () {
38523
38444
  yield this.callAdapter.onReactionClick(reaction);
@@ -38931,12 +38852,34 @@ class CallAndChatProvider {
38931
38852
  * @public
38932
38853
  */
38933
38854
  class TeamsMeetingLinkProvider {
38934
- constructor(locator) {
38855
+ constructor(locator,
38856
+ /** @conditional-compile-remove(meeting-id) */ callAdapterPromise) {
38935
38857
  this.locator = locator;
38858
+ /** @conditional-compile-remove(meeting-id) */
38859
+ this.callAdapterPromise = callAdapterPromise;
38936
38860
  }
38937
38861
  getChatThread() {
38938
38862
  return __awaiter$2(this, void 0, void 0, function* () {
38939
- return getChatThreadFromTeamsLink(this.locator.meetingLink);
38863
+ /** @conditional-compile-remove(meeting-id) */
38864
+ {
38865
+ // Wait for the call to be connected and get the chat thread ID from `call.callInfo`.
38866
+ const chatThreadPromise = new Promise((resolve) => {
38867
+ this.callAdapterPromise.then((callAdapter) => {
38868
+ // Ensure function is idempotent by removing any existing subscription.
38869
+ this.callAdapterSubscription && callAdapter.offStateChange(this.callAdapterSubscription);
38870
+ this.callAdapterSubscription = (state) => {
38871
+ var _a, _b, _c;
38872
+ if (((_a = state.call) === null || _a === void 0 ? void 0 : _a.state) === 'Connected' && ((_b = state.call.info) === null || _b === void 0 ? void 0 : _b.threadId)) {
38873
+ this.callAdapterSubscription && callAdapter.offStateChange(this.callAdapterSubscription);
38874
+ this.callAdapterSubscription = undefined;
38875
+ resolve((_c = state.call.info) === null || _c === void 0 ? void 0 : _c.threadId);
38876
+ }
38877
+ };
38878
+ callAdapter.onStateChange(this.callAdapterSubscription);
38879
+ });
38880
+ });
38881
+ return chatThreadPromise;
38882
+ }
38940
38883
  });
38941
38884
  }
38942
38885
  }
@@ -39128,7 +39071,7 @@ const isTeamsMeetingLocator = (locator) => {
39128
39071
  };
39129
39072
  const _createChatThreadAdapterInner = (locator, adapter) => {
39130
39073
  if ('meetingLink' in locator) {
39131
- return new TeamsMeetingLinkProvider(locator);
39074
+ return new TeamsMeetingLinkProvider(locator, /** @conditional-compile-remove(meeting-id) */ adapter);
39132
39075
  }
39133
39076
  /** @conditional-compile-remove(meeting-id) */
39134
39077
  if ('meetingId' in locator) {
@@ -39709,4 +39652,4 @@ exports.useTeamsCall = useTeamsCall;
39709
39652
  exports.useTeamsCallAdapter = useTeamsCallAdapter;
39710
39653
  exports.useTeamsCallAgent = useTeamsCallAgent;
39711
39654
  exports.useTheme = useTheme;
39712
- //# sourceMappingURL=index-pky6z3v4.js.map
39655
+ //# sourceMappingURL=index-oaEwmItW.js.map