@azure/communication-react 1.11.1-alpha-202401040013 → 1.11.1-alpha-202401050013

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 (64) hide show
  1. package/dist/communication-react.d.ts +71 -0
  2. package/dist/dist-cjs/communication-react/index.js +270 -56
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +5 -0
  7. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -0
  8. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +22 -6
  10. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +9 -3
  12. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +27 -13
  13. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +3 -2
  15. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +24 -7
  16. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.d.ts +1 -1
  18. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +15 -3
  19. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  20. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +31 -0
  21. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  22. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +3 -0
  23. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +31 -0
  24. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  25. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
  26. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +7 -1
  27. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  28. package/dist/dist-esm/calling-stateful-client/src/Converter.js +2 -0
  29. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  30. package/dist/dist-esm/calling-stateful-client/src/ReactionSubscriber.d.ts +16 -0
  31. package/dist/dist-esm/calling-stateful-client/src/ReactionSubscriber.js +24 -0
  32. package/dist/dist-esm/calling-stateful-client/src/ReactionSubscriber.js.map +1 -0
  33. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +1 -0
  34. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  35. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
  36. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  37. package/dist/dist-esm/communication-react/src/index.d.ts +1 -0
  38. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  39. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +2 -0
  40. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +24 -4
  41. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  42. package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +2 -0
  43. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +6 -2
  44. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
  45. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +3 -1
  46. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  47. package/dist/dist-esm/react-components/src/components/VideoGallery.js +3 -1
  48. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  49. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +3 -0
  50. package/dist/dist-esm/react-components/src/components/VideoTile.js +34 -1
  51. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  52. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +12 -1
  53. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +32 -1
  54. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  55. package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.d.ts +5 -0
  56. package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js +12 -0
  57. package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/index.d.ts +1 -0
  59. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +21 -0
  61. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
  62. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +13 -0
  63. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  64. package/package.json +1 -1
@@ -170,7 +170,7 @@ function getDefaultExportFromCjs (x) {
170
170
  // Copyright (c) Microsoft Corporation.
171
171
  // Licensed under the MIT License.
172
172
  // GENERATED FILE. DO NOT EDIT MANUALLY.
173
- var telemetryVersion = '1.11.1-alpha-202401040013';
173
+ var telemetryVersion = '1.11.1-alpha-202401050013';
174
174
 
175
175
 
176
176
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -406,6 +406,14 @@ const getLocalParticipantRaisedHand$1 = (state, props) => {
406
406
  var _a, _b;
407
407
  return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.raiseHand) === null || _b === void 0 ? void 0 : _b.localParticipantRaisedHand;
408
408
  };
409
+ /* @conditional-compile-remove(reaction) */
410
+ /**
411
+ * @private
412
+ */
413
+ const getLocalParticipantReactionState = (state, props) => {
414
+ var _a;
415
+ return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.localParticipantReaction;
416
+ };
409
417
  /**
410
418
  * @private
411
419
  */
@@ -1718,6 +1726,8 @@ function convertSdkCallToDeclarativeCall(call) {
1718
1726
  recording: { isRecordingActive: false },
1719
1727
  /* @conditional-compile-remove(raise-hand) */
1720
1728
  raiseHand: { raisedHands: [] },
1729
+ /* @conditional-compile-remove(reaction) */
1730
+ localParticipantReaction: undefined,
1721
1731
  transcription: { isTranscriptionActive: false },
1722
1732
  screenShareRemoteParticipant: undefined,
1723
1733
  startTime: new Date(),
@@ -1818,6 +1828,8 @@ let CallContext$2 = class CallContext {
1818
1828
  constructor(userId, maxListeners = 50,
1819
1829
  /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId) {
1820
1830
  this._callIdHistory = new CallIdHistory();
1831
+ /* @conditional-compile-remove(reaction) */
1832
+ this._timeOutId = {};
1821
1833
  /**
1822
1834
  * Tees direct errors to state.
1823
1835
  * @remarks
@@ -2116,6 +2128,31 @@ let CallContext$2 = class CallContext {
2116
2128
  }
2117
2129
  });
2118
2130
  }
2131
+ /* @conditional-compile-remove(reaction) */
2132
+ setReceivedReactionFromParticipant(callId, participantKey, reactionMessage) {
2133
+ this.modifyState((draft) => {
2134
+ const call = draft.calls[this._callIdHistory.latestCallId(callId)];
2135
+ if (!call) {
2136
+ return;
2137
+ }
2138
+ clearTimeout(this._timeOutId[participantKey]);
2139
+ const participant = call.remoteParticipants[participantKey];
2140
+ const newReactionState = reactionMessage
2141
+ ? { reactionMessage: reactionMessage, receivedAt: new Date() }
2142
+ : undefined;
2143
+ if (participantKey === toFlatCommunicationIdentifier(this._state.userId)) {
2144
+ call.localParticipantReaction = newReactionState;
2145
+ }
2146
+ else {
2147
+ participant.reactionState = newReactionState;
2148
+ }
2149
+ if (reactionMessage) {
2150
+ this._timeOutId[participantKey] = setTimeout(() => {
2151
+ clearParticipantReactionState(this, callId, participantKey);
2152
+ }, 5120);
2153
+ }
2154
+ });
2155
+ }
2119
2156
  setCallTranscriptionActive(callId, isTranscriptionActive) {
2120
2157
  this.modifyState((draft) => {
2121
2158
  const call = draft.calls[this._callIdHistory.latestCallId(callId)];
@@ -2626,6 +2663,10 @@ const findOldestCallEnded = (calls) => {
2626
2663
  }
2627
2664
  return oldestCallId;
2628
2665
  };
2666
+ /* @conditional-compile-remove(reaction) */
2667
+ function clearParticipantReactionState(callContext, callId, participantKey) {
2668
+ callContext.setReceivedReactionFromParticipant(callId, participantKey, null);
2669
+ }
2629
2670
 
2630
2671
  // Copyright (c) Microsoft Corporation.
2631
2672
  // Licensed under the MIT License.
@@ -3687,6 +3728,30 @@ class CapabilitiesSubscriber {
3687
3728
  }
3688
3729
  }
3689
3730
 
3731
+ // Copyright (c) Microsoft Corporation.
3732
+ // Licensed under the MIT License.
3733
+ /* @conditional-compile-remove(reaction) */
3734
+ /**
3735
+ * @private
3736
+ */
3737
+ class ReactionSubscriber {
3738
+ constructor(callIdRef, context, raiseHand) {
3739
+ this.subscribe = () => {
3740
+ this._reaction.on('reaction', this.onReactionEvent);
3741
+ };
3742
+ this.unsubscribe = () => {
3743
+ this._reaction.off('reaction', this.onReactionEvent);
3744
+ };
3745
+ this.onReactionEvent = (event) => {
3746
+ this._context.setReceivedReactionFromParticipant(this._callIdRef.callId, event.identifier, event.reactionMessage);
3747
+ };
3748
+ this._callIdRef = callIdRef;
3749
+ this._context = context;
3750
+ this._reaction = raiseHand;
3751
+ this.subscribe();
3752
+ }
3753
+ }
3754
+
3690
3755
  // Copyright (c) Microsoft Corporation.
3691
3756
  // Licensed under the MIT License.
3692
3757
  /**
@@ -3721,7 +3786,7 @@ class CallSubscriber {
3721
3786
  }
3722
3787
  };
3723
3788
  this.unsubscribe = () => {
3724
- var _a, _b;
3789
+ var _a, _b, _c;
3725
3790
  this._call.off('stateChanged', this.stateChanged);
3726
3791
  /* @conditional-compile-remove(close-captions) */
3727
3792
  this._call.off('stateChanged', this.initCaptionSubscriber);
@@ -3756,6 +3821,8 @@ class CallSubscriber {
3756
3821
  (_b = this._raiseHandSubscriber) === null || _b === void 0 ? void 0 : _b.unsubscribe();
3757
3822
  /* @conditional-compile-remove(capabilities) */
3758
3823
  this._capabilitiesSubscriber.unsubscribe();
3824
+ /* @conditional-compile-remove(reaction) */
3825
+ (_c = this._reactionSubscriber) === null || _c === void 0 ? void 0 : _c.unsubscribe();
3759
3826
  };
3760
3827
  this.stateChanged = () => {
3761
3828
  this._context.setCallState(this._callIdRef.callId, this._call.state);
@@ -3844,6 +3911,8 @@ class CallSubscriber {
3844
3911
  this._transcriptionSubscriber = new TranscriptionSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.Transcription));
3845
3912
  /* @conditional-compile-remove(raise-hand) */
3846
3913
  this._raiseHandSubscriber = new RaiseHandSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.RaiseHand));
3914
+ /* @conditional-compile-remove(reaction) */
3915
+ this._reactionSubscriber = new ReactionSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.Reaction));
3847
3916
  /* @conditional-compile-remove(optimal-video-count) */
3848
3917
  this._optimalVideoCountSubscriber = new OptimalVideoCountSubscriber({
3849
3918
  callIdRef: this._callIdRef,
@@ -12788,6 +12857,37 @@ const raiseHandLimitedSpaceStyles = {
12788
12857
  // position at the bottom
12789
12858
  bottom: 0
12790
12859
  };
12860
+ /**
12861
+ * @private
12862
+ */
12863
+ const playFrames = react.memoizeFunction(() => react.keyframes({
12864
+ from: {
12865
+ backgroundPosition: '0px 8568px'
12866
+ },
12867
+ to: {
12868
+ backgroundPosition: '0px 0px'
12869
+ }
12870
+ }));
12871
+ /* @conditional-compile-remove(reaction) */
12872
+ /**
12873
+ * @private
12874
+ */
12875
+ const reactionRenderingStyle = (args) => react.mergeStyles({
12876
+ height: '100%',
12877
+ width: '100%',
12878
+ overflow: 'hidden',
12879
+ animationName: playFrames(),
12880
+ backgroundImage: args.backgroundImageUrl,
12881
+ animationDuration: '5.12s',
12882
+ animationTimingFunction: `steps(102)`,
12883
+ backgroundSize: `cover`,
12884
+ animationPlayState: 'running',
12885
+ animationIterationCount: 'infinite',
12886
+ justifyContent: 'center',
12887
+ alignItems: 'center',
12888
+ backgroundPosition: `center`,
12889
+ transform: `scale(${84 < args.personaSize ? 84 / args.personaSize : args.personaSize / 84})`
12890
+ });
12791
12891
 
12792
12892
  // Copyright (c) Microsoft Corporation.
12793
12893
  // Licensed under the MIT License.
@@ -12798,6 +12898,18 @@ const getVideoTileOverrideColor = (isVideoRendered, theme, color) => {
12798
12898
  // when video is being rendered, the info has a grey-ish background, so no use of theme
12799
12899
  return { color: isVideoRendered ? react.DefaultPalette[color] : theme.palette[color] };
12800
12900
  };
12901
+ /* @conditional-compile-remove(reaction) */
12902
+ /**
12903
+ * Temporary mapping of paths for the reaction emoji resources.
12904
+ * @private
12905
+ */
12906
+ const reactionEmoji = new Map([
12907
+ ['like', `url('/assets/reactions/likeEmoji.png')`],
12908
+ ['applause', `url('/assets/reactions/clapEmoji.png')`],
12909
+ ['heart', `url('/assets/reactions/heartEmoji.png')`],
12910
+ ['laugh', `url('/assets/reactions/laughEmoji.png')`],
12911
+ ['surprised', `url('/assets/reactions/surprisedEmoji.png')`]
12912
+ ]);
12801
12913
 
12802
12914
  // Copyright (c) Microsoft Corporation.
12803
12915
  // Licensed under the MIT License.
@@ -12933,7 +13045,9 @@ const VideoTile = (props) => {
12933
13045
  /* @conditional-compile-remove(pinned-participants) */
12934
13046
  isPinned, onRenderPlaceholder, renderElement, showLabel = true, showMuteIndicator = true, styles, userId, noVideoAvailableAriaLabel, isSpeaking,
12935
13047
  /* @conditional-compile-remove(raise-hand) */
12936
- raisedHand, personaMinSize = DEFAULT_PERSONA_MIN_SIZE_PX, personaMaxSize = DEFAULT_PERSONA_MAX_SIZE_PX,
13048
+ raisedHand,
13049
+ /* @conditional-compile-remove(reaction) */
13050
+ reaction, personaMinSize = DEFAULT_PERSONA_MIN_SIZE_PX, personaMaxSize = DEFAULT_PERSONA_MAX_SIZE_PX,
12937
13051
  /* @conditional-compile-remove(pinned-participants) */
12938
13052
  contextualMenu } = props;
12939
13053
  /* @conditional-compile-remove(pinned-participants) */
@@ -13010,6 +13124,21 @@ const VideoTile = (props) => {
13010
13124
  const callingPalette = theme.callingPalette;
13011
13125
  /* @conditional-compile-remove(raise-hand) */
13012
13126
  raisedHandBackgroundColor = callingPalette.raiseHandGold;
13127
+ /* @conditional-compile-remove(reaction) */
13128
+ const backgroundImageUrl = reaction !== undefined ? reactionEmoji.get(reaction === null || reaction === void 0 ? void 0 : reaction.reactionType) : '';
13129
+ /* @conditional-compile-remove(reaction) */
13130
+ const currentTimestamp = new Date();
13131
+ /* @conditional-compile-remove(reaction) */
13132
+ const currentUnixTimeStamp = Math.floor(currentTimestamp.getTime() / 1000);
13133
+ /* @conditional-compile-remove(reaction) */
13134
+ const receivedUnixTimestamp = reaction ? Math.floor(reaction.receivedAt.getTime() / 1000) : undefined;
13135
+ /* @conditional-compile-remove(reaction) */
13136
+ const canRenderReaction = receivedUnixTimestamp ? currentUnixTimeStamp - receivedUnixTimestamp < 3000 : false;
13137
+ /* @conditional-compile-remove(reaction) */
13138
+ const reactionContainerStyles = React.useCallback(() => reactionRenderingStyle({
13139
+ backgroundImageUrl,
13140
+ personaSize
13141
+ }), [backgroundImageUrl, personaSize]);
13013
13142
  return (React.createElement(react.Stack, Object.assign({ "data-ui-id": ids.videoTile, className: react.mergeStyles(rootStyles, {
13014
13143
  background: theme.palette.neutralLighter,
13015
13144
  borderRadius: theme.effects.roundedCorner4
@@ -13031,6 +13160,16 @@ const VideoTile = (props) => {
13031
13160
  ? 0.4
13032
13161
  : 1
13033
13162
  }) }, onRenderPlaceholder ? (onRenderPlaceholder(userId !== null && userId !== void 0 ? userId : '', placeholderOptions, DefaultPlaceholder)) : (React.createElement(DefaultPlaceholder, Object.assign({}, placeholderOptions))))),
13163
+ /* @conditional-compile-remove(reaction) */
13164
+ canRenderReaction && (React.createElement(react.Stack, { className: react.mergeStyles(videoContainerStyles, {
13165
+ display: 'flex',
13166
+ justifyContent: 'center',
13167
+ alignItems: 'center',
13168
+ backgroundColor: reaction ? 'rgba(0, 0, 0, 0.5)' : 'transparent'
13169
+ }) },
13170
+ React.createElement("div", { style: { height: '33.33%' } }),
13171
+ React.createElement("div", { style: { height: '84px', width: '84px' } },
13172
+ React.createElement("div", { className: reactionContainerStyles() })))),
13034
13173
  (canShowLabel || participantStateString) && (React.createElement(react.Stack, { horizontal: true, className: tileInfoContainerStyle, tokens: tileInfoContainerTokens },
13035
13174
  React.createElement(react.Stack, { horizontal: true, className: tileInfoStyle },
13036
13175
  canShowLabel && (React.createElement(react.Text, { className: react.mergeStyles(displayNameStyle), title: displayName, style: { color: participantStateString ? theme.palette.neutralSecondary : 'inherit' }, "data-ui-id": "video-tile-display-name" }, displayName)),
@@ -13162,7 +13301,9 @@ const _RemoteVideoTile = React.memo((props) => {
13162
13301
  onKeyDown: menuKind === 'drawer' ? onKeyDown : undefined, style: remoteVideoTileWrapperStyle },
13163
13302
  React.createElement(VideoTile, Object.assign({ key: userId, userId: userId, initialsName: (_a = remoteParticipant.displayName) !== null && _a !== void 0 ? _a : '', renderElement: renderVideoStreamElement, displayName: displayName, onRenderPlaceholder: onRenderAvatar, isMuted: remoteParticipant.isMuted,
13164
13303
  /* @conditional-compile-remove(raise-hand) */
13165
- raisedHand: remoteParticipant.raisedHand, isSpeaking: remoteParticipant.isSpeaking, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize, showLabel: props.showLabel,
13304
+ raisedHand: remoteParticipant.raisedHand,
13305
+ /* @conditional-compile-remove(reaction) */
13306
+ reaction: remoteParticipant.reaction, isSpeaking: remoteParticipant.isSpeaking, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize, showLabel: props.showLabel,
13166
13307
  /* @conditional-compile-remove(one-to-n-calling) */
13167
13308
  /* @conditional-compile-remove(PSTN-calls) */
13168
13309
  participantState: participantState }, videoTileContextualMenuProps, {
@@ -13421,7 +13562,9 @@ const LocalVideoCameraCycleButton = (props) => {
13421
13562
  const _LocalVideoTile = React.memo((props) => {
13422
13563
  const { isAvailable, isMuted, onCreateLocalStreamView, onDisposeLocalStreamView, localVideoViewOptions, renderElement, userId, showLabel, displayName, initialsName, onRenderAvatar, showMuteIndicator, styles, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription,
13423
13564
  /* @conditional-compile-remove(raise-hand) */
13424
- raisedHand } = props;
13565
+ raisedHand,
13566
+ /* @conditional-compile-remove(reaction) */
13567
+ reaction } = props;
13425
13568
  const localVideoStreamProps = React.useMemo(() => ({
13426
13569
  isMirrored: localVideoViewOptions === null || localVideoViewOptions === void 0 ? void 0 : localVideoViewOptions.isMirrored,
13427
13570
  isStreamAvailable: isAvailable,
@@ -13458,7 +13601,9 @@ const _LocalVideoTile = React.memo((props) => {
13458
13601
  ]);
13459
13602
  return (React.createElement(VideoTile, { key: userId !== null && userId !== void 0 ? userId : 'local-video-tile', userId: userId, renderElement: renderVideoStreamElement, showLabel: showLabel, displayName: displayName, initialsName: initialsName, styles: styles, onRenderPlaceholder: onRenderAvatar, isMuted: isMuted, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize,
13460
13603
  /* @conditional-compile-remove(raise-hand) */
13461
- raisedHand: raisedHand }));
13604
+ raisedHand: raisedHand,
13605
+ /* @conditional-compile-remove(reaction) */
13606
+ reaction: reaction }));
13462
13607
  });
13463
13608
  const FloatingLocalCameraCycleButton = (props) => {
13464
13609
  const { showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription } = props;
@@ -15843,7 +15988,9 @@ const VideoGallery = (props) => {
15843
15988
  return (React.createElement(react.Stack, { styles: localVideoTileContainerStyles, key: "local-video-tile-key", tabIndex: 0, "aria-label": strings.localVideoMovementLabel, role: 'dialog' },
15844
15989
  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,
15845
15990
  /* @conditional-compile-remove(raise-hand) */
15846
- raisedHand: localParticipant.raisedHand })));
15991
+ raisedHand: localParticipant.raisedHand,
15992
+ /* @conditional-compile-remove(reaction) */
15993
+ reaction: localParticipant.reaction })));
15847
15994
  }, [
15848
15995
  isNarrow,
15849
15996
  localParticipant,
@@ -17759,7 +17906,8 @@ const DialpadButton = (props) => {
17759
17906
  var _a, _b, _c, _d;
17760
17907
  const theme = react.useTheme();
17761
17908
  const { digit, index, onClick, onLongPress, isMobile = false,
17762
- /* @conditional-compile-remove(dtmf-dialer) */ dtmfToneAudioContext } = props;
17909
+ /* @conditional-compile-remove(dtmf-dialer) */ dtmfToneAudioContext,
17910
+ /* @conditional-compile-remove(dtmf-dialer) */ disableDtmfPlayback } = props;
17763
17911
  /* @conditional-compile-remove(dtmf-dialer) */
17764
17912
  const [buttonPressed, setButtonPressed] = React.useState(false);
17765
17913
  /* @conditional-compile-remove(dtmf-dialer) */
@@ -17777,7 +17925,9 @@ const DialpadButton = (props) => {
17777
17925
  return (React.createElement(react.DefaultButton, Object.assign({ "data-test-id": `dialpad-button-${props.index}`, styles: react.concatStyleSets(buttonStyles$1(), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.button) }, longPressHandlers, { onKeyDown: (e) => {
17778
17926
  /* @conditional-compile-remove(dtmf-dialer) */
17779
17927
  if ((e.key === 'Enter' || e.key === ' ') && !buttonPressed) {
17780
- dtmfToneSound.current.play();
17928
+ if (!disableDtmfPlayback) {
17929
+ dtmfToneSound.current.play();
17930
+ }
17781
17931
  longPressHandlers.onKeyDown();
17782
17932
  setButtonPressed(true);
17783
17933
  return;
@@ -17793,12 +17943,27 @@ const DialpadButton = (props) => {
17793
17943
  longPressHandlers.onKeyUp();
17794
17944
  }, onMouseDown: () => {
17795
17945
  /* @conditional-compile-remove(dtmf-dialer) */
17796
- dtmfToneSound.current.play();
17946
+ if (!disableDtmfPlayback) {
17947
+ dtmfToneSound.current.play();
17948
+ }
17797
17949
  longPressHandlers.onMouseDown();
17798
17950
  }, onMouseUp: () => {
17799
17951
  /* @conditional-compile-remove(dtmf-dialer) */
17800
17952
  dtmfToneSound.current.stop();
17801
17953
  longPressHandlers.onMouseUp();
17954
+ }, onMouseLeave: () => {
17955
+ /* @conditional-compile-remove(dtmf-dialer) */
17956
+ dtmfToneSound.current.stop();
17957
+ }, onTouchStart: () => {
17958
+ /* @conditional-compile-remove(dtmf-dialer) */
17959
+ if (!disableDtmfPlayback) {
17960
+ dtmfToneSound.current.play();
17961
+ }
17962
+ longPressHandlers.onTouchStart();
17963
+ }, onTouchEnd: () => {
17964
+ /* @conditional-compile-remove(dtmf-dialer) */
17965
+ dtmfToneSound.current.stop();
17966
+ longPressHandlers.onTouchEnd();
17802
17967
  } }),
17803
17968
  React.createElement(react.Stack, null,
17804
17969
  React.createElement(react.Text, { className: react.mergeStyles(digitStyles(theme), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.digit) }, props.digit),
@@ -17890,7 +18055,9 @@ const DialpadContainer = (props) => {
17890
18055
  */
17891
18056
  index: columnIndex + rowIndex * rows.length, digit: button.digit, letter: button.letter, styles: props.styles, onClick: onClickDialpad, onLongPress: onLongPressDialpad, isMobile: isMobile,
17892
18057
  /* @conditional-compile-remove(dtmf-dialer) */
17893
- dtmfToneAudioContext: dtmfToneAudioContext.current })))));
18058
+ dtmfToneAudioContext: dtmfToneAudioContext.current,
18059
+ /* @conditional-compile-remove(dtmf-dialer) */
18060
+ disableDtmfPlayback: props.disableDtmfPlayback })))));
17894
18061
  }))));
17895
18062
  };
17896
18063
  /**
@@ -19286,6 +19453,48 @@ const COMPONENT_LOCALE_ZH_TW = { strings: createComponentStrings(zh_TW$1) };
19286
19453
  */
19287
19454
  const checkIsSpeaking = (participant) => participant.isSpeaking && !participant.isMuted;
19288
19455
 
19456
+ // Copyright (c) Microsoft Corporation.
19457
+ // Licensed under the MIT License.
19458
+ const convertRemoteParticipantToParticipantListParticipant = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers) => {
19459
+ const identifier = fromFlatCommunicationIdentifier(userId);
19460
+ return {
19461
+ userId,
19462
+ displayName,
19463
+ state,
19464
+ isMuted,
19465
+ isScreenSharing,
19466
+ isSpeaking,
19467
+ // ACS users can not remove Teams users.
19468
+ // Removing unknown types of users is undefined.
19469
+ isRemovable: (communicationCommon.getIdentifierKind(identifier).kind === 'communicationUser' ||
19470
+ communicationCommon.getIdentifierKind(identifier).kind === 'phoneNumber') &&
19471
+ localUserCanRemoveOthers
19472
+ };
19473
+ };
19474
+ /* @conditional-compile-remove(reaction) */
19475
+ /**
19476
+ * @private
19477
+ */
19478
+ const memoizedConvertAllremoteParticipantsBeta = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction) => {
19479
+ return convertRemoteParticipantToParticipantListParticipantBeta(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction);
19480
+ });
19481
+ /* @conditional-compile-remove(reaction) */
19482
+ /**
19483
+ * @private
19484
+ */
19485
+ const memoizedConvertToVideoTileReaction = memoizeOne((reactionState) => {
19486
+ return reactionState && reactionState.reactionMessage
19487
+ ? {
19488
+ reactionType: reactionState.reactionMessage.reactionType,
19489
+ receivedAt: reactionState.receivedAt
19490
+ }
19491
+ : undefined;
19492
+ });
19493
+ /* @conditional-compile-remove(reaction) */
19494
+ const convertRemoteParticipantToParticipantListParticipantBeta = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction) => {
19495
+ return Object.assign(Object.assign({}, convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers)), { reaction });
19496
+ };
19497
+
19289
19498
  // Copyright (c) Microsoft Corporation.
19290
19499
  // Licensed under the MIT License.
19291
19500
  /** @internal */
@@ -19313,24 +19522,34 @@ const _videoGalleryRemoteParticipantsMemo = (remoteParticipants, isHideAttendeeN
19313
19522
  let displayName = participant.displayName;
19314
19523
  /* @conditional-compile-remove(hide-attendee-name) */
19315
19524
  displayName = maskDisplayNameWithRole(displayName, localUserRole, participant.role, isHideAttendeeNamesEnabled);
19525
+ /* @conditional-compile-remove(reaction) */
19526
+ const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
19316
19527
  return memoizedFn(toFlatCommunicationIdentifier(participant.identifier), participant.isMuted, checkIsSpeaking(participant), participant.videoStreams, state, displayName,
19317
19528
  /* @conditional-compile-remove(raise-hand) */
19318
- participant.raisedHand);
19529
+ participant.raisedHand,
19530
+ /* @conditional-compile-remove(reaction) */
19531
+ remoteParticipantReaction);
19319
19532
  }));
19320
19533
  });
19321
19534
  };
19322
19535
  const memoizedAllConvertRemoteParticipant = memoizeFnAll((userId, isMuted, isSpeaking, videoStreams, state, displayName,
19323
19536
  /* @conditional-compile-remove(raise-hand) */
19324
- raisedHand // temp unknown type to build stable
19537
+ raisedHand, // temp unknown type to build stable
19538
+ /* @conditional-compile-remove(reaction) */
19539
+ reaction // temp unknown type to build stable
19325
19540
  ) => {
19326
19541
  return convertRemoteParticipantToVideoGalleryRemoteParticipant(userId, isMuted, isSpeaking, videoStreams, state, displayName,
19327
19542
  /* @conditional-compile-remove(raise-hand) */
19328
- raisedHand);
19543
+ raisedHand,
19544
+ /* @conditional-compile-remove(reaction) */
19545
+ reaction);
19329
19546
  });
19330
19547
  /** @private */
19331
19548
  const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId, isMuted, isSpeaking, videoStreams, state, displayName,
19332
19549
  /* @conditional-compile-remove(raise-hand) */
19333
- raisedHand // temp unknown type to build stable
19550
+ raisedHand, // temp unknown type to build stable
19551
+ /* @conditional-compile-remove(reaction) */
19552
+ reaction // temp unknown type to build stable
19334
19553
  ) => {
19335
19554
  const rawVideoStreamsArray = Object.values(videoStreams);
19336
19555
  let videoStream = undefined;
@@ -19357,7 +19576,9 @@ raisedHand // temp unknown type to build stable
19357
19576
  /* @conditional-compile-remove(PSTN-calls) */
19358
19577
  state,
19359
19578
  /* @conditional-compile-remove(raise-hand) */
19360
- raisedHand: raisedHand
19579
+ raisedHand: raisedHand,
19580
+ /* @conditional-compile-remove(reaction) */
19581
+ reaction: reaction
19361
19582
  };
19362
19583
  };
19363
19584
  const convertRemoteVideoStreamToVideoGalleryStream = (stream) => {
@@ -19378,7 +19599,8 @@ const convertRemoteVideoStreamToVideoGalleryStream = (stream) => {
19378
19599
  /** @private */
19379
19600
  const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream,
19380
19601
  /* @conditional-compile-remove(rooms) */ role,
19381
- /* @conditional-compile-remove(raise-hand) */ raisedHand) => {
19602
+ /* @conditional-compile-remove(raise-hand) */ raisedHand,
19603
+ /* @conditional-compile-remove(reaction) */ reaction) => {
19382
19604
  var _a, _b;
19383
19605
  return ({
19384
19606
  userId: identifier,
@@ -19393,7 +19615,9 @@ const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, is
19393
19615
  /* @conditional-compile-remove(rooms) */
19394
19616
  role,
19395
19617
  /* @conditional-compile-remove(raise-hand) */
19396
- raisedHand: raisedHand
19618
+ raisedHand: raisedHand,
19619
+ /* @conditional-compile-remove(reaction) */
19620
+ reaction: reaction
19397
19621
  });
19398
19622
  });
19399
19623
 
@@ -19437,7 +19661,9 @@ const videoGallerySelector = reselect.createSelector([
19437
19661
  /* @conditional-compile-remove(raise-hand) */
19438
19662
  getLocalParticipantRaisedHand$1,
19439
19663
  /* @conditional-compile-remove(hide-attendee-name) */
19440
- isHideAttendeeNamesEnabled
19664
+ isHideAttendeeNamesEnabled,
19665
+ /* @conditional-compile-remove(reaction) */
19666
+ getLocalParticipantReactionState
19441
19667
  ], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName, identifier, dominantSpeakers,
19442
19668
  /* @conditional-compile-remove(optimal-video-count) */
19443
19669
  optimalVideoCount,
@@ -19446,7 +19672,9 @@ role,
19446
19672
  /* @conditional-compile-remove(raise-hand) */
19447
19673
  raisedHand,
19448
19674
  /* @conditional-compile-remove(hide-attendee-name) */
19449
- isHideAttendeeNamesEnabled) => {
19675
+ isHideAttendeeNamesEnabled,
19676
+ /* @conditional-compile-remove(reaction) */
19677
+ localParticipantReaction) => {
19450
19678
  const screenShareRemoteParticipant = screenShareRemoteParticipantId && remoteParticipants
19451
19679
  ? remoteParticipants[screenShareRemoteParticipantId]
19452
19680
  : undefined;
@@ -19454,6 +19682,8 @@ isHideAttendeeNamesEnabled) => {
19454
19682
  const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);
19455
19683
  dominantSpeakerIds === null || dominantSpeakerIds === void 0 ? void 0 : dominantSpeakerIds.forEach((speaker, idx) => (idx));
19456
19684
  const noRemoteParticipants = [];
19685
+ /* @conditional-compile-remove(reaction) */
19686
+ const localParticipantReactionState = memoizedConvertToVideoTileReaction(localParticipantReaction);
19457
19687
  return {
19458
19688
  screenShareParticipant: screenShareRemoteParticipant
19459
19689
  ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName,
@@ -19464,7 +19694,9 @@ isHideAttendeeNamesEnabled) => {
19464
19694
  /* @conditional-compile-remove(rooms) */
19465
19695
  role,
19466
19696
  /* @conditional-compile-remove(raise-hand) */
19467
- raisedHand),
19697
+ raisedHand,
19698
+ /* @conditional-compile-remove(reaction) */
19699
+ localParticipantReactionState),
19468
19700
  remoteParticipants: _videoGalleryRemoteParticipantsMemo(updateUserDisplayNamesTrampoline$2(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants),
19469
19701
  /* @conditional-compile-remove(hide-attendee-name) */
19470
19702
  isHideAttendeeNamesEnabled,
@@ -19480,36 +19712,6 @@ const updateUserDisplayNamesTrampoline$2 = (remoteParticipants) => {
19480
19712
  return _updateUserDisplayNames(remoteParticipants);
19481
19713
  };
19482
19714
 
19483
- // Copyright (c) Microsoft Corporation.
19484
- // Licensed under the MIT License.
19485
- const convertRemoteParticipantToParticipantListParticipant = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers) => {
19486
- const identifier = fromFlatCommunicationIdentifier(userId);
19487
- return {
19488
- userId,
19489
- displayName,
19490
- state,
19491
- isMuted,
19492
- isScreenSharing,
19493
- isSpeaking,
19494
- // ACS users can not remove Teams users.
19495
- // Removing unknown types of users is undefined.
19496
- isRemovable: (communicationCommon.getIdentifierKind(identifier).kind === 'communicationUser' ||
19497
- communicationCommon.getIdentifierKind(identifier).kind === 'phoneNumber') &&
19498
- localUserCanRemoveOthers
19499
- };
19500
- };
19501
- /* @conditional-compile-remove(raise-hand) */
19502
- /**
19503
- * @private
19504
- */
19505
- const memoizedConvertAllremoteParticipantsBeta = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers) => {
19506
- return convertRemoteParticipantToParticipantListParticipantBeta(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers);
19507
- });
19508
- /* @conditional-compile-remove(raise-hand) */
19509
- const convertRemoteParticipantToParticipantListParticipantBeta = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers) => {
19510
- return Object.assign(Object.assign({}, convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers)), { raisedHand });
19511
- };
19512
-
19513
19715
  // Copyright (c) Microsoft Corporation.
19514
19716
  // Licensed under the MIT License.
19515
19717
  const convertRemoteParticipantsToParticipantListParticipants = (remoteParticipants, localUserCanRemoveOthers, isHideAttendeeNamesEnabled, localUserRole) => {
@@ -19537,9 +19739,13 @@ const convertRemoteParticipantsToParticipantListParticipants = (remoteParticipan
19537
19739
  let displayName = participant.displayName;
19538
19740
  /* @conditional-compile-remove(hide-attendee-name) */
19539
19741
  displayName = maskDisplayNameWithRole(displayName, localUserRole, participant.role, isHideAttendeeNamesEnabled);
19742
+ /* @conditional-compile-remove(reaction) */
19743
+ const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
19540
19744
  return memoizeFn(toFlatCommunicationIdentifier(participant.identifier), displayName, state, participant.isMuted, isScreenSharing, participant.isSpeaking,
19541
19745
  /* @conditional-compile-remove(raise-hand) */
19542
- participant.raisedHand, localUserCanRemoveOthers);
19746
+ participant.raisedHand, localUserCanRemoveOthers,
19747
+ /* @conditional-compile-remove(reaction) */
19748
+ remoteParticipantReaction);
19543
19749
  })
19544
19750
  .sort((a, b) => {
19545
19751
  var _a, _b;
@@ -19556,7 +19762,7 @@ const convertRemoteParticipantsToParticipantListParticipants = (remoteParticipan
19556
19762
  }
19557
19763
  }));
19558
19764
  };
19559
- /* @conditional-compile-remove(raise-hand) */
19765
+ /* @conditional-compile-remove(reaction) */
19560
19766
  return memoizedConvertAllremoteParticipantsBeta(conversionCallback);
19561
19767
  };
19562
19768
  /**
@@ -19574,12 +19780,16 @@ const participantListSelector = reselect.createSelector([
19574
19780
  getRole$1,
19575
19781
  getParticipantCount,
19576
19782
  /* @conditional-compile-remove(hide-attendee-name) */
19577
- isHideAttendeeNamesEnabled
19783
+ isHideAttendeeNamesEnabled,
19784
+ /* @conditional-compile-remove(reaction) */
19785
+ getLocalParticipantReactionState
19578
19786
  ], (userId, displayName, remoteParticipants, isScreenSharingOn, isMuted,
19579
19787
  /* @conditional-compile-remove(raise-hand) */
19580
19788
  raisedHand, role, partitipantCount,
19581
19789
  /* @conditional-compile-remove(hide-attendee-name) */
19582
- isHideAttendeeNamesEnabled) => {
19790
+ isHideAttendeeNamesEnabled,
19791
+ /* @conditional-compile-remove(reaction) */
19792
+ localParticipantReactionState) => {
19583
19793
  const localUserCanRemoveOthers = localUserCanRemoveOthersTrampoline(role);
19584
19794
  const participants = remoteParticipants
19585
19795
  ? convertRemoteParticipantsToParticipantListParticipants(updateUserDisplayNamesTrampoline$1(Object.values(remoteParticipants)), localUserCanRemoveOthers,
@@ -19588,6 +19798,8 @@ isHideAttendeeNamesEnabled) => {
19588
19798
  /* @conditional-compile-remove(hide-attendee-name) */
19589
19799
  role)
19590
19800
  : [];
19801
+ /* @conditional-compile-remove(reaction) */
19802
+ const localParticipantReaction = memoizedConvertToVideoTileReaction(localParticipantReactionState);
19591
19803
  participants.push({
19592
19804
  userId: userId,
19593
19805
  displayName: displayName,
@@ -19597,7 +19809,9 @@ isHideAttendeeNamesEnabled) => {
19597
19809
  raisedHand: raisedHand,
19598
19810
  state: 'Connected',
19599
19811
  // Local participant can never remove themselves.
19600
- isRemovable: false
19812
+ isRemovable: false,
19813
+ /* @conditional-compile-remove(reaction) */
19814
+ reaction: localParticipantReaction
19601
19815
  });
19602
19816
  /* @conditional-compile-remove(total-participant-count) */
19603
19817
  const totalParticipantCount = partitipantCount;